Abstract: Vision transformers (ViTs) have gained increasing popularity as they are commonly believed to own higher modeling capacity and representation flexibility than traditional convolutional networks. However, it is questionable whether such potential has been fully unleashed in practice, as the learned ViTs often suffer from over-smoothening, yielding likely redundant models. This paper, for the first time, systematically studies the ubiquitous existence of redundancy at all three levels: patch embedding, attention map, and weight space. In view of them, we advocate a principle of diversity for training ViTs, by presenting corresponding regularizers that encourage the representation diversity and coverage at each of those levels, enabling capturing more discriminative information. Extensive experiments on ImageNet with a number of ViT backbones validate the effectiveness of our proposals, largely eliminating the observed ViT redundancy and significantly boosting the model generalization.
Introduction: The Redundancy Problem in ViTs
Vision Transformers (ViTs) have revolutionized computer vision by modeling global relationships without the rigid inductive biases of CNNs. However, they face a "hidden" efficiency problem: as ViTs grow deeper, the representations of different image patches tend to become overly similar—a phenomenon known as over-smoothing. When this happens, the model's effective capacity collapses; a deep network might perform no better than a much shallower one because its layers repeat the same information. While previous works attempted to mitigate this via architectural changes, this paper argues that redundancy is a "head-to-toe" issue involving embeddings, attention, and weights.
Methods: A Tri-Level Diversification Framework
To address this, we propose a tri-level diversification framework that introduces "diversity regularizers" into the loss function during training, without altering the underlying architecture.
The framework targets three critical levels:
- Patch Embedding Diversity: To prevent patches from becoming too similar, we employ cosine similarity regularization and a contrastive loss. This pulls embeddings of the same patch across layers together while pushing different patches apart, ensuring each token maintains unique information.
- Attention Map Diversity: To ensure different attention heads capture diverse relationships (e.g., texture vs. shape), we apply orthogonal regularization. This forces attention maps to be mathematically distinct from one another.
- Weight Space Diversity: Redundant weights often fall into a low-rank subspace. We use hyperspherical uniformity (Minimum Hyperspherical Separation and Maximum Gram Determinant) to force weight vectors to spread uniformly on a unit sphere, maximizing representative capacity.
Key Results and Insights
The "Principle of Diversity" was evaluated on ImageNet-1k across several backbones, including vanilla ViT, DeiT, and Swin Transformer.
The results demonstrate that our method consistently reduces redundancy and improves accuracy:
- Performance Gains: DeiT-Small achieved a 0.83% accuracy boost, while the deeper DeiT-Small24 saw a gain of 1.76%. Vanilla ViT accuracy improved by over 2.0%.
- Synergy: While diversifying a single level helps, the most significant gains come from addressing all three levels simultaneously, as the regularizers act complementarily to "un-collapse" capacity.
- Qualitative Improvements: Visualization of attention heatmaps shows that diversified models focus on more accurate and varied object features (e.g., distinct animal parts) rather than single blurry regions. t-SNE analysis further confirms that the model better distinguishes between semantically different but visually similar patches.
Conclusion
This work establishes that redundancy is ubiquitous in current ViTs and that enforcing diversity across embeddings, attention, and weights is key to unlocking their full potential. While currently focused on vision, these principles likely extend to other Transformer-based architectures. Future work will explore more computationally efficient regularizers and applications in other modalities.
Summary updated