Abstract
Vision Transformers (ViTs) often struggle with generalization on small-scale datasets due to their lack of inherent inductive bias. This research identifies "accumulated trivial attention"—the collective dominance of numerous small attention weights over a few significant ones—as a primary cause of performance degradation, particularly in shallow layers. We propose Suppressing Accumulated Trivial Attention (SATA), a method that utilizes a Trivial Weights Suppression Transformation (TWIST) to dynamically mute background noise. Experimental results on CIFAR-100 and Tiny-ImageNet demonstrate that SATA consistently improves ViT accuracy, achieving gains of up to 2.32%.
Introduction
While Vision Transformers (ViTs) have achieved state-of-the-art performance on large-scale datasets like ImageNet-21k, their performance significantly drops when trained on smaller datasets. Unlike Convolutional Neural Networks (CNNs), which possess an inductive bias for local spatial patterns, ViTs employ a global attention mechanism that starts without such priors. This paper investigates the failure modes of ViTs in data-scarce regimes and identifies a specific phenomenon: the overwhelming influence of accumulated trivial attention weights.
The Problem: Accumulated Trivial Attention
In an ideal attention mechanism, a few critical image patches should receive high weights, while the remainder receive near-zero weights. However, on small datasets, ViTs generate a "long tail" of trivial weights. Individually, these weights are small, but their aggregate sum can exceed the weights of the most important features.
As shown in Figure 1, the noise can be twice as powerful as the signal. In the illustrated example, 62 trivial sequences contribute a sum of 0.69, while the 3 most important sequences only sum to 0.31. This "accumulated noise" is especially prevalent in shallow layers where raw image data has high redundancy and low information density.
Proposed Method: SATA
To address this, the authors introduce SATA (Suppressing Accumulated Trivial Attention). The method consists of two primary steps:
- Divide: Attention weights are categorized into "trivial" and "non-trivial" based on a threshold (either absolute or relative to the maximum weight).
- Suppress: Instead of aggressive deletion, the Trivial Weights Suppression Transformation (TWIST) is applied. This transformation ensures the sum of trivial weights is bounded by a fraction of the maximum attention weight.
A key component of SATA is a learnable scale parameter ($s$). This allows the model to adaptively determine the degree of suppression required for each layer. During training, the model typically learns to apply heavy suppression in shallow, noisy layers and minimal suppression in deeper, more refined layers.
Experimental Results
The SATA method was evaluated on CIFAR-100 and Tiny-ImageNet across various architectures, including the standard ViT and the Pooling-based ViT (PiT). The results indicate that specifically targeting accumulated trivial weights is more effective than general techniques like temperature scaling in the Softmax function.
- ViT on Tiny-ImageNet: Accuracy improved from 56.45% to 58.77% (+2.32%).
- ViT on CIFAR-100: Accuracy improved from 73.70% to 74.93% (+1.23%).
- PiT on CIFAR-100: Achieved an improvement of 1.21%.
Conclusion
Accumulated trivial attention is a significant hurdle for Vision Transformers trained on small datasets. By introducing SATA and the TWIST mechanism, researchers can effectively filter out background noise without losing critical information. This approach allows ViTs to better compete with CNNs in data-constrained environments. Future work will explore how this phenomenon scales with token count and its applicability to hybrid architectural designs.
Summary updated