Efficient Self-supervised Vision Transformers for Representation Learning

Chunyuan Li, Jianwei Yang, Pengchuan Zhang, Mei Gao, Bin Xiao, Xiyang Dai, Lu Yuan, Jianfeng Gao

Abstract

Self-supervised learning (SSL) has significantly advanced visual representation learning, yet the computational cost of monolithic Vision Transformers (ViTs) remains a barrier to scaling. We present EsViT (Efficient Self-supervised Vision Transformer), which utilizes a hierarchical multi-stage architecture and a novel region-matching pre-training objective. EsViT recovers the fine-grained semantic correspondence typically lost in hierarchical models, achieving 81.3% top-1 accuracy on ImageNet-1K with a linear probe. Notably, EsViT offers a 10x throughput improvement over monolithic counterparts like MoCo-v3, demonstrating a superior efficiency-accuracy trade-off.

Introduction

While self-supervised learning has revolutionized Natural Language Processing, its application in Computer Vision has traditionally relied on computationally intensive monolithic architectures. Standard Vision Transformers treat images as flat sequences of patches, which, while effective at capturing global and local correspondences, suffer from quadratic complexity. Hierarchical architectures like Swin Transformers offer linear complexity through window-based attention but often fail to capture the "magical" property of monolithic ViTs: the automatic discovery of fine-grained semantic correspondences. EsViT bridges this gap by combining efficient hierarchical backbones with a task designed to explicitly model local dependencies.

Methods

EsViT introduces two core components to optimize self-supervised representation learning:

1. Multi-stage Hierarchical Backbone

EsViT adopts a hierarchical structure (based on the Swin Transformer) that processes images through multiple stages. By gradually merging patches, the model reduces the number of tokens while increasing feature dimensions. Computational efficiency is maintained using sparse, window-based self-attention, ensuring linear complexity relative to image size.

2. Region-Matching Pre-training Task ($L_R$)

To compensate for the loss of fine-grained detail in hierarchical models, we propose a region-level matching objective. In addition to standard view-level matching ($L_V$), EsViT employs a student-teacher framework to match local regions.

EsViT architecture illustrating the dual view-level ($L_V$) and region-level ($L_R$) prediction tasks.

As shown in the diagram above, the model identifies the most similar region in a "teacher" view for every local region in a "student" view using cosine similarity. It then minimizes the cross-entropy between the predicted probability distributions of these matched regions. This task forces the model to learn local structures and dependencies, effectively acting as a non-contrastive proxy for dense prediction tasks.

Experimental Results

The performance of EsViT was evaluated primarily on ImageNet-1K and a suite of 18 downstream datasets.

Efficiency and Accuracy

EsViT achieves a new state-of-the-art for self-supervised models on ImageNet-1K, reaching 81.3% top-1 accuracy. Crucially, it achieves this with significantly higher efficiency than previous methods.

Linear probing accuracy vs. throughput for various self-supervised models. EsViT models (red) occupy the top-right frontier, showing superior speed and accuracy.

As illustrated in the throughput analysis, EsViT provides an order of magnitude higher throughput (10x) compared to MoCo-v3 (ViT-L) while maintaining or exceeding its accuracy. It is also 3.5x more parameter-efficient than comparable monolithic models.

Downstream Transfer and Interpretability

EsViT demonstrates robust generalization, outperforming supervised baselines on 17 out of 18 downstream tasks, including CIFAR, Food-101, and Flowers-102. Qualitative analysis reveals that the region-matching task leads to cleaner and more diverse attention maps, allowing the model to segment foreground objects from backgrounds without explicit labels.

Conclusion

EsViT demonstrates that hierarchical architectures, when paired with appropriate local-matching objectives, can surpass monolithic ViTs in both efficiency and representation quality. By bridging the "correspondence gap," EsViT provides a scalable framework for self-supervised vision, paving the way for training on even larger, uncurated datasets. Future work will focus on further improving performance on dense prediction tasks like object detection and instance segmentation.

Summary updated

BibTeX
@misc{li2021efficient,
  author = {Chunyuan Li and Jianwei Yang and Pengchuan Zhang and Mei Gao and Bin Xiao and Xiyang Dai and Lu Yuan and Jianfeng Gao},
  title = {{Efficient Self-supervised Vision Transformers for Representation Learning}},
  year = {2021},
  eprint = {2106.09785},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2106.09785},
}
Figure