Abstract
Vision Transformers have emerged as powerful, scalable and versatile representation learners. To capture both global and local features, a learnable [CLS] class token is typically prepended to the input sequence of patch tokens. Despite their distinct nature, both token types are processed identically throughout the model. In this work, we investigate the friction between global and local feature learning under different pre-training strategies by analyzing the interactions between class and patch tokens. Our analysis reveals that standard normalization layers introduce an implicit differentiation between these token types. Building on this insight, we propose specialized processing paths that selectively disentangle the computational flow of class and patch tokens, particularly within normalization layers and early query-key-value projections. This targeted specialization leads to significantly improved patch representation quality for dense prediction tasks. Our experiments demonstrate segmentation performance gains of over 2 mIoU points on standard benchmarks, while maintaining strong classification accuracy. The proposed modifications introduce only an 8% increase in parameters, with no additional computational overhead. Through comprehensive ablations, we provide insights into which architectural components benefit most from specialization and how our approach generalizes across model scales and learning frameworks.
The Friction in Vision Transformers
In a standard Vision Transformer (ViT), the architecture receives a sequence of "patch tokens" representing local image regions and a single [CLS] token intended to aggregate global information. Despite their fundamentally different roles, standard ViTs treat them as functionally interchangeable, passing them through identical linear layers and normalization steps.
Recent research indicates that this "one-size-fits-all" approach creates computational friction. Patch tokens often lose local context as the model repurposes them to store global information, leading to noisy attention maps and high-norm feature artifacts. While previous solutions like "registers" (dummy tokens) help mask these artifacts, they do not address the underlying architectural friction between global and local feature learning.
Architecture Specialization
To resolve this, we propose Architecture Specialization, which disentangles the processing paths for the [CLS] token and patch tokens in specific model components:
- Specialized Normalization: Analysis shows that standard LayerNorm layers implicitly attempt to separate tokens by using different channels for each. We make this explicit by providing the
[CLS]and patch tokens with separate learnable parameters in normalization layers. - Targeted Layer Specialization: We also specialize the Query-Key-Value (QKV) projections—the linear layers preparing tokens for the attention mechanism.
- Strategic Placement: Specialization is most effective in the first third of the transformer blocks, where token distributions are most distinct.
- Efficiency: Because the number of operations remains constant—simply selecting different weights based on token type—there is zero increase in FLOPs during inference.
Experimental Results
Our specialized models were evaluated across a wide array of benchmarks, including ADE20K, Cityscapes, and PASCAL VOC for segmentation, and KITTI and NYU Depth v2 for depth estimation.
On a ViT-L model, specialization improved average mIoU across segmentation benchmarks by 1.1 to 2.2 points. Depth estimation error (RMSE) also improved significantly. Qualitatively, PCA visualizations of the features demonstrate that specialized models produce sharper, more semantically coherent segments with fewer artifacts compared to baseline methods.
These gains come at a modest cost of an ~8% increase in total parameters, which can be further reduced to 0.2% using Low-Rank Adaptation (LoRA) while maintaining most performance benefits.
Conclusion and Future Work
By allowing the [CLS] token its own "lane," patch tokens are no longer forced to sacrifice local descriptive power for global pooling. While highly effective for self-supervised models like DINOv2, the gains are less consistent for purely supervised models at larger scales, likely due to the lack of a local loss. Future work will investigate if similar token friction exists in multi-modal models or Large Language Models (LLMs) where special tokens are frequently utilized.
Summary updated