NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

What Do Self-Supervised Vision Transformers Learn?

Namuk Park, Wonjae Kim, Byeongho Heo, Taekyung Kim, Sangdoo Yun

Introduction

Self-Supervised Learning (SSL) has become the gold standard in computer vision for pre-training models without relying on human-annotated labels. Within this space, two dominant paradigms have emerged for training Vision Transformers (ViTs): Contrastive Learning (CL) and Masked Image Modeling (MIM).

Models utilizing CL, such as MoCo, learn by comparing two different views of the same image, attempting to make their global representations similar. In contrast, MIM models, like MAE or SimMIM, learn by "filling in the blanks," reconstructing missing patches of an image.

While empirical evidence shows that CL typically excels at "linear probing" (evaluating frozen features) and MIM dominates at "fine-tuning" (updating the entire model), the underlying reasons for these performance gaps have remained unclear. This paper provides a deep dive into these two paradigms, revealing that they learn fundamentally opposite representations. CL focuses on global shapes and low-frequency signals, while MIM prioritizes local textures and high-frequency details. Ultimately, the authors demonstrate that combining these approaches leads to superior performance across the board.

Analytical Methods and Datasets

To understand what these models actually "see" internally, the authors conducted a rigorous comparative study using several analytical tools:

  • Attention Distance: Measures whether the model focuses on nearby pixels (local) or the entire image (global).
  • Normalized Mutual Information (NMI): Quantifies "attention collapse," a phenomenon where the model's attention becomes independent of the specific pixel it is looking at.
  • Singular Value Decomposition (SVD): Analyzes the "volume" and diversity of the representation space.
  • Fourier Analysis: Determines if the model relies on low-frequency (smooth shapes) or high-frequency (sharp textures) information.
  • Hybrid Training: Tests a simple linear combination of both CL and MIM losses: $\mathcal{L} = (1 - \lambda)\mathcal{L}_{MIM} + \lambda\mathcal{L}_{CL}$.

The study primarily uses ImageNet-1K for pre-training and initial evaluation. To test generalizability and specific biases, they also evaluated on Stylized ImageNet (to test "shape bias"), COCO (for downstream object detection and segmentation), iNaturalist 2018 (for fine-grained classification), and ADE20K (for semantic segmentation).

Key Insights: Attention Collapse and Frequency Splits

One of the most striking findings of the study is the phenomenon of Attention Collapse in CL. In the later layers of CL-trained ViTs, the attention maps "collapse" so that every single pixel (query token) ends up looking at the exact same global pattern—usually the object's boundary. While this global focus is excellent for identifying what an object is, it destroys the local, token-level information necessary for dense prediction tasks like segmentation.

Attention maps for MoCo and SimMIM across different depths.

Conversely, MIM models maintain localized attention even in deeper layers. In fact, in MIM models with shallow heads (like SimMIM), the last few layers of the backbone actually start acting like an implicit decoder. Their discriminative power for classification decreases in these final layers as they shift focus to pixel-level reconstruction.

Furthermore, Fourier analysis reveals a distinct Frequency Split. CL acts as a low-pass filter, capturing the "gist" or shape of an object. MIM acts as a high-pass filter, capturing fine-grained textures and local structures. Because CL is "image-level" and shape-biased while MIM is "token-level" and texture-biased, they learn highly complementary features.

Key Results: Performance and Hybridization

The differing internal representations directly explain the models' downstream performance characteristics. CL (e.g., MoCo v3) significantly outperforms MIM in linear probing because its later layers are already highly optimized for global, linearly separable classification features. However, MIM (e.g., SimMIM) scales much better to large models (ViT-L/H) during fine-tuning, as its diverse, localized token representations provide a richer foundation for the model to adapt to new tasks.

Performance comparison of CL and MIM methods across linear probing, fine-tuning, and model scaling.

Testing on Stylized ImageNet confirmed these biases: CL shows a much higher "shape bias" than MIM or even supervised models, whereas MIM is much more sensitive to high-frequency noise, proving its reliance on texture.

Because their strengths are so perfectly opposed, Hybridization proves highly effective. Even a simple weighted sum of the two losses ($\lambda=0.2$) outperforms both vanilla CL and MIM. For instance, on the ADE20K segmentation task, the hybrid model achieved 42.2 mIoU, significantly higher than SimMIM (35.4) or MoCo v3 (39.7).

Limitations and Future Work

The authors acknowledge that their hybrid approach—a simple linear combination of losses—is likely just the beginning. Future research directions include:

  • Architecture-Specific SSL: Applying MIM to the early layers (where it excels at local features) and CL to the later layers (where it excels at global shapes).
  • Multi-stage ViTs: Exploring how these dynamics change in hierarchical models like Swin Transformers, as this study focused on "plain" ViTs.
  • Efficiency: Training with two objectives simultaneously increases computational overhead. Finding more efficient ways to "harmonize" these methods will be necessary for large-scale, practical use.

Summary updated

BibTeX
@inproceedings{park2023what,
  author = {Namuk Park and Wonjae Kim and Byeongho Heo and Taekyung Kim and Sangdoo Yun},
  title = {{What Do Self-Supervised Vision Transformers Learn?}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=azCKuYyS74},
}
Figure