TL;DR
This paper demonstrates that transformers inherently exhibit a simplicity bias toward learning low-sensitivity functions—functions whose predictions are unlikely to flip when random perturbations are introduced to input tokens or patches. Across vision and language tasks, transformers consistently learn functions with significantly lower sensitivity than CNNs, MLPs, and LSTMs. Crucially, lower sensitivity correlates with flatter loss minima and superior out-of-distribution robustness against common corruptions.
What Problem Does This Paper Address?
While transformers achieve state-of-the-art accuracy and robustness across computer vision and natural language processing, their foundational inductive biases remain poorly understood. Prior work established that neural networks exhibit a "simplicity bias" (often formalized as a spectral bias toward low frequencies in continuous domains or low-degree polynomials on Boolean cubes). However, defining a unified simplicity metric that spans continuous images and discrete text—and explains why transformers are often more robust than other architectures—has remained an open challenge.
Methods
- Sensitivity as a Unified Simplicity Metric: The authors define function sensitivity as the probability that a model’s prediction changes when an input token or image patch is randomly perturbed:
- Text: Replace a token with a uniform random token or inject Gaussian noise into layer-normalized token embeddings.
- Vision: Inject Gaussian noise ($\mathcal{N}(0, \sigma^2 I)$) into an individual image patch.
- Theoretical Weak Spectral Bias: Using the Neural Tangent Kernel (NTK) and Conjugate Kernel (CK) frameworks in the infinite-width limit, the authors prove that transformers with linear attention on the Boolean cube have eigenfunctions aligned with the Fourier basis. Lower-order monomials possess larger eigenvalues, formally proving a weak spectral simplicity bias.
- Synthetic Disentanglement: A synthetic sequence classification task is constructed where two competing solutions have equal predictive power: one relying on a sparse token and one relying on frequent tokens. This isolates whether attention prefers sparsity or low sensitivity.
- Sensitivity Regularization: The authors introduce training-time interventions to directly reduce sensitivity:
- Data augmentation: Training with Gaussian-corrupted images.
- Explicit regularization: Adding a Mean Squared Error (MSE) penalty between the network’s outputs on clean versus single-patch-perturbed inputs.
Datasets
- Synthetic Sequence Dataset: A custom token vocabulary designed to cleanly decouple input token sparsity from overall function sensitivity.
- Vision Benchmarks:
- MNIST & Fashion-MNIST: Digit and clothing classification.
- CIFAR-10 & SVHN: Real-world object and house-number recognition.
- CIFAR-10-C: Benchmark testing robustness across 14 algorithmically generated corruption types (blur, noise, weather, digital artifacts) at severity levels 1 and 2.
- Language Benchmarks:
- MRPC (Microsoft Research Paraphrase Corpus): 5,801 sentence pairs.
- QQP (Quora Question Pairs): >400k question pairs for duplicate detection.
Key Insights and Ideas
- Transformers Naturally Learn Lower-Sensitivity Functions: ViTs and RoBERTa models consistently learn functions with orders-of-magnitude lower sensitivity than MLPs, CNNs, and LSTMs, even when controlling for training accuracy, optimization algorithms (SGD vs. Adam), and model depths.
- Sensitivity Trumps Sparsity: When given a choice between sparse and frequent predictive features, self-attention does not blindly prefer sparse tokens; it specifically selects whichever feature representation produces the lowest overall sensitivity.
- Uniform vs. Recency Attention: LSTMs are heavily sensitive to late tokens (reflecting recency bias and short memory). In contrast, transformers distribute sensitivity uniformly across sequence positions—with the exception of the
[CLS]token, which serves as a global information aggregator and thus has higher sensitivity. - A Bridge Between Robustness and Flat Minima: Sensitivity (perturbation in input space) correlates with flatness of the loss landscape (perturbation in parameter space). Adding sensitivity regularization flattens the training minima and boosts robustness across diverse corruption types—even non-noise corruptions like blur and digital distortion.
Key Results
- Vision Sensitivity: On CIFAR-10, the end-of-training sensitivity was 0.3673 for DenseNet-121 and 0.0827 for ResNet-18, compared to just 0.0050 for ViT-small and 0.0014 for ViT-simple. On Fashion-MNIST, ViT achieved a sensitivity of 0.0098, compared to 0.0453 for CNN and $>0.05$ for MLPs.
- Language Sensitivity: On MRPC, sensitivity was 0.15 for LSTM, 0.002 for RoBERTa (Softmax), and 0.001 for RoBERTa (ReLU). On QQP, LSTM sensitivity was 0.09, while RoBERTa models scored 0.02–0.03.
- Robustness & Regularization on CIFAR-10-C: ViTs outperformed CNNs across nearly all 14 corruption categories. Adding sensitivity regularization to ViT-small further reduced sensitivity from 0.0050 to 0.0026 and improved corruption accuracy across blur, noise, and weather.
- Minima Flatness: ViT-small trained with sensitivity regularization demonstrated significantly flatter minima than vanilla ViT-small, reducing parameter output sharpness ($\text{ShOp}$) from 39.166 to 9.025 and prediction flip sharpness ($\text{ShPred}$) from 0.5346 to 0.3982.
Limitations and Future Work
- Theoretical Scope: The spectral bias proof relies on linear attention and infinite-width approximations on the Boolean cube; it does not theoretically compare the rate of spectral decay between transformers and other architectures (e.g., CNNs).
- Attention Mask Differences: Causal models (e.g., GPT-2) exhibit higher sensitivity than bidirectional models (RoBERTa) due to causal masking; exploring how autoregressive constraints interact with sensitivity is left for future work.
- Out-of-Distribution Generalization: While the link to common corruptions is established, exploring whether low-sensitivity bias directly prevents the reliance on spurious correlations in complex real-world OOD scenarios remains open.
Summary updated