Curved Representation Space of Vision Transformers
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
- 2015Deep Residual Learning for Image Recognitioncited by 52,096
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,139
- 2014ImageNet Large Scale Visual Recognition Challengecited by 8,498
- 2014Explaining and Harnessing Adversarial Examplescited by 7,364
- 2016Densely Connected Convolutional Networkscited by 6,720
- 2017On Calibration of Modern Neural Networkscited by 4,960
- 2018MobileNetV2: Inverted Residuals and Linear Bottleneckscited by 4,795
- 2020Training data-efficient image transformers & distillation through attentioncited by 4,586
- 2022A ConvNet for the 2020scited by 3,579
- 2019Searching for MobileNetV3cited by 1,994
- 2021Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutionscited by 1,962
35 more
- 2021Swin Transformer V2: Scaling Up Capacity and Resolutioncited by 1,228
- 2021Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNetcited by 1,101
- 2016Adversarial Machine Learning at Scalecited by 936
- 2021Twins: Revisiting the Design of Spatial Attention in Vision Transformerscited by 565
- 2021Intriguing Properties of Vision Transformerscited by 446
- 2021Early Convolutions Help Transformers See Bettercited by 396
- 2021Revisiting the Calibration of Modern Neural Networkscited by 390
- 2014On the Number of Linear Regions of Deep Neural Networkscited by 381
- 2018Why ReLU networks yield high-confidence predictions far away from the training data and how to mitigate the problemcited by 323
- 2022How Do Vision Transformers Work?cited by 307
- 2016On the Expressive Power of Deep Neural Networkscited by 306
- 2019On Mixup Training: Improved Calibration and Predictive Uncertainty for Deep Neural Networkscited by 305
- 2021Focal Self-attention for Local-Global Interactions in Vision Transformerscited by 288
- 2021Understanding Robustness of Transformers for Image Classificationcited by 249
- 2021LocalViT: Analyzing Locality in Vision Transformerscited by 228
- 2021Vision Transformers are Robust Learnerscited by 207
- 2018Sensitivity and Generalization in Neural Networks: an Empirical Studycited by 189
- 2021Are Transformers More Robust Than CNNs?cited by 187
- 2019Complexity of Linear Regions in Deep Networkscited by 167
- 2017Bounding and Counting Linear Regions of Deep Neural Networkscited by 161
- 2019Deep ReLU Networks Have Surprisingly Few Activation Patternscited by 161
- 2016Robust Large Margin Deep Neural Networkscited by 118
- 2021Shuffle Transformer: Rethinking Spatial Shuffle for Vision Transformercited by 115
- 2015Representation Benefits of Deep Feedforward Networkscited by 86
- 2015Conditional Deep Learning for Energy-Efficient and Enhanced Pattern Recognitioncited by 67
- 2021Understanding Softmax Confidence and Uncertaintycited by 63
- 2021Adversarial Robustness Comparison of Vision Transformer and MLP-Mixer to CNNscited by 57
- 2020Combining Ensembles and Data Augmentation can Harm your Calibrationcited by 44
- 2021Reveal of Vision Transformers Robustness against Adversarial Attackscited by 43
- 2020Empirical Studies on the Properties of Linear Regions in Deep Neural Networkscited by 36
- 2020Boundary thickness and robustness in learning modelscited by 26
- 2021Deep ReLU Networks Preserve Expected Lengthcited by 17
- 2022Aries: Efficient Testing of Deep Neural Networks via Labeling-Free Accuracy Estimationcited by 9
- 2019Trajectory growth lower bounds for random sparse deep ReLU networkscited by 4
- 2019Investigating Decision Boundaries of Trained Neural Networkscited by 3
Built on by
Citing papers per year: 2023: 1; 2024: 2; 2025: 3; 2026: 2.
8 papers.
- 2024Improving Local Training in Federated Learning via Temperature Scalingcited by 5
- 2025Torch-Uncertainty: A Deep Learning Framework for Uncertainty Quantificationcited by 4
- 2023Anomaly Score: Evaluating Generative Models and Individual Generated Images based on Complexity and Vulnerabilitycited by 2
- 2025Attacking Attention of Foundation Models Disrupts Downstream Taskscited by 2
- 2024Impact of Regularization on Calibration and Robustness: from the Representation Space Perspectivecited by 1
- 2025SALVE: Sparse Autoencoder-Latent Vector Editing for Mechanistic Control of Neural Networkscited by 1
- 2026Temperature Scaling Attack Disrupting Model Confidence in Federated Learningcited by 0
- 2026MPT: Missing Prototype Tracking via Barycentric Reconstruction in Vehicular Federated Learningcited by 0
- 2026MPT: Missing Prototype Tracking via Barycentric Reconstruction in Vehicular Federated Learning11 Sep 2026
- 2026Temperature Scaling Attack Disrupting Model Confidence in Federated Learning6 Feb 2026
- 2025SALVE: Sparse Autoencoder-Latent Vector Editing for Mechanistic Control of Neural Networks17 Dec 2025
- 2025Torch-Uncertainty: A Deep Learning Framework for Uncertainty Quantification13 Nov 2025
- 2025Attacking Attention of Foundation Models Disrupts Downstream Tasks3 Jun 2025
- 2024Impact of Regularization on Calibration and Robustness: from the Representation Space Perspective5 Oct 2024
- 2024Improving Local Training in Federated Learning via Temperature Scaling18 Jan 2024
- 2023Anomaly Score: Evaluating Generative Models and Individual Generated Images based on Complexity and Vulnerability17 Dec 2023