mlsanityData to 14 Oct 2026

Curved Representation Space of Vision Transformers

arXiv 2210.05742 ↗First posted 11 Oct 2022cs.CVcited by 8

Not on the map. Why?

Abstract (arXiv)

Neural networks with self-attention (a.k.a. Transformers) like ViT and Swin have emerged as a better alternative to traditional convolutional neural networks (CNNs). However, our understanding of how the new architecture works is still limited. In this paper, we focus on the phenomenon that Transformers show higher robustness against corruptions than CNNs, while not being overconfident. This is contrary to the intuition that robustness increases with confidence. We resolve this contradiction by empirically investigating how the output of the penultimate layer moves in the representation space as the input data moves linearly within a small area. In particular, we show the following. (1) While CNNs exhibit fairly linear relationship between the input and output movements, Transformers show nonlinear relationship for some data. For those data, the output of Transformers moves in a curved trajectory as the input moves linearly. (2) When a data is located in a curved region, it is hard to move it out of the decision region since the output moves along a curved trajectory instead of a straight line to the decision boundary, resulting in high robustness of Transformers. (3) If a data is slightly modified to jump out of the curved region, the movements afterwards become linear and the output goes to the decision boundary directly. In other words, there does exist a decision boundary near the data, which is hard to find only because of the curved representation space. This explains the underconfident prediction of Transformers. Also, we examine mathematical properties of the attention operation that induce nonlinear response to linear perturbation. Finally, we share our additional findings, regarding what contributes to the curved representation space of Transformers, and how the curvedness evolves during training.

Key facts. Cited by 8 papers in the map (data through 14 Oct 2026). Builds on 47 of its 52 references that are in the map. First posted on arXiv 11 Oct 2022.

Builds on

47 of 52 references.

References · 47

  1. 2015Deep Residual Learning for Image Recognitioncited by 52,096
  2. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
  3. 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,139
  4. 2014ImageNet Large Scale Visual Recognition Challengecited by 8,498
  5. 2014Explaining and Harnessing Adversarial Examplescited by 7,364
  6. 2016Densely Connected Convolutional Networkscited by 6,720
  7. 2017On Calibration of Modern Neural Networkscited by 4,960
  8. 2018MobileNetV2: Inverted Residuals and Linear Bottleneckscited by 4,795
  9. 2020Training data-efficient image transformers & distillation through attentioncited by 4,586
  10. 2022A ConvNet for the 2020scited by 3,579
  11. 2019Searching for MobileNetV3cited by 1,994
  12. 2021Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutionscited by 1,962
35 more
  1. 2021Swin Transformer V2: Scaling Up Capacity and Resolutioncited by 1,228
  2. 2021Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNetcited by 1,101
  3. 2016Adversarial Machine Learning at Scalecited by 936
  4. 2021Twins: Revisiting the Design of Spatial Attention in Vision Transformerscited by 565
  5. 2021Intriguing Properties of Vision Transformerscited by 446
  6. 2021Early Convolutions Help Transformers See Bettercited by 396
  7. 2021Revisiting the Calibration of Modern Neural Networkscited by 390
  8. 2014On the Number of Linear Regions of Deep Neural Networkscited by 381
  9. 2018Why ReLU networks yield high-confidence predictions far away from the training data and how to mitigate the problemcited by 323
  10. 2022How Do Vision Transformers Work?cited by 307
  11. 2016On the Expressive Power of Deep Neural Networkscited by 306
  12. 2019On Mixup Training: Improved Calibration and Predictive Uncertainty for Deep Neural Networkscited by 305
  13. 2021Focal Self-attention for Local-Global Interactions in Vision Transformerscited by 288
  14. 2021Understanding Robustness of Transformers for Image Classificationcited by 249
  15. 2021LocalViT: Analyzing Locality in Vision Transformerscited by 228
  16. 2021Vision Transformers are Robust Learnerscited by 207
  17. 2018Sensitivity and Generalization in Neural Networks: an Empirical Studycited by 189
  18. 2021Are Transformers More Robust Than CNNs?cited by 187
  19. 2019Complexity of Linear Regions in Deep Networkscited by 167
  20. 2017Bounding and Counting Linear Regions of Deep Neural Networkscited by 161
  21. 2019Deep ReLU Networks Have Surprisingly Few Activation Patternscited by 161
  22. 2016Robust Large Margin Deep Neural Networkscited by 118
  23. 2021Shuffle Transformer: Rethinking Spatial Shuffle for Vision Transformercited by 115
  24. 2015Representation Benefits of Deep Feedforward Networkscited by 86
  25. 2015Conditional Deep Learning for Energy-Efficient and Enhanced Pattern Recognitioncited by 67
  26. 2021Understanding Softmax Confidence and Uncertaintycited by 63
  27. 2021Adversarial Robustness Comparison of Vision Transformer and MLP-Mixer to CNNscited by 57
  28. 2020Combining Ensembles and Data Augmentation can Harm your Calibrationcited by 44
  29. 2021Reveal of Vision Transformers Robustness against Adversarial Attackscited by 43
  30. 2020Empirical Studies on the Properties of Linear Regions in Deep Neural Networkscited by 36
  31. 2020Boundary thickness and robustness in learning modelscited by 26
  32. 2021Deep ReLU Networks Preserve Expected Lengthcited by 17
  33. 2022Aries: Efficient Testing of Deep Neural Networks via Labeling-Free Accuracy Estimationcited by 9
  34. 2019Trajectory growth lower bounds for random sparse deep ReLU networkscited by 4
  35. 2019Investigating Decision Boundaries of Trained Neural Networkscited by 3

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2023: 1; 2024: 2; 2025: 3; 2026: 2.

8 papers.