English

Improving the Behaviour of Vision Transformers with Token-consistent Stochastic Layers

Computer Vision and Pattern Recognition 2022-07-15 v3

Abstract

We introduce token-consistent stochastic layers in vision transformers, without causing any severe drop in performance. The added stochasticity improves network calibration, robustness and strengthens privacy. We use linear layers with token-consistent stochastic parameters inside the multilayer perceptron blocks, without altering the architecture of the transformer. The stochastic parameters are sampled from the uniform distribution, both during training and inference. The applied linear operations preserve the topological structure, formed by the set of tokens passing through the shared multilayer perceptron. This operation encourages the learning of the recognition task to rely on the topological structures of the tokens, instead of their values, which in turn offers the desired robustness and privacy of the visual features. The effectiveness of the token-consistent stochasticity is demonstrated on three different applications, namely, network calibration, adversarial robustness, and feature privacy, by boosting the performance of the respective established baselines.

Keywords

Cite

@article{arxiv.2112.15111,
  title  = {Improving the Behaviour of Vision Transformers with Token-consistent Stochastic Layers},
  author = {Nikola Popovic and Danda Pani Paudel and Thomas Probst and Luc Van Gool},
  journal= {arXiv preprint arXiv:2112.15111},
  year   = {2022}
}

Comments

This article is under consideration at the Computer Vision and Image Understanding journal

R2 v1 2026-06-24T08:35:59.210Z