RePre: Improving Self-Supervised Vision Transformer with Reconstructive Pre-training

Luya Wang, Feng Liang, Yangguang Li, Honggang Zhang, Wanli Ouyang, Jing Shao

Introduction

Self-supervised learning (SSL) in computer vision has largely been dominated by contrastive learning, which excels at capturing global semantic information by comparing different views of an image. In contrast, natural language processing (NLP) has seen immense success with reconstructive tasks, such as predicting masked words, which helps models understand local context. While contrastive learning is effective for image classification, it often overlooks the fine-grained, low-level details—like textures and edges—essential for dense prediction tasks such as object detection and semantic segmentation.

RePre (Reconstructive Pre-training) bridges this gap. It is a "plug-and-play" framework designed to enhance self-supervised Vision Transformers (ViTs) by adding a pixel-reconstruction branch alongside standard contrastive learning. By fusing multi-level features from the encoder, RePre captures both global semantic context and fine-grained local details, leading to significant performance gains across various vision tasks.

Methodology

The RePre framework extends existing contrastive learning architectures (e.g., MoCo v3, DINO) by incorporating a parallel reconstruction branch.

Multi-hierarchy Feature Fusion

A key innovation of RePre is the use of features from multiple depths of the Transformer encoder. While the final layer's output is highly abstract and semantic, earlier layers contain richer low-level visual information. RePre extracts and fuses these multi-hierarchy features to provide the decoder with a comprehensive representation of the image.

Lightweight Reconstruction Decoder

These fused features are fed into a simple, convolution-based decoder tasked with reconstructing the original raw RGB pixels. Unlike Masked Autoencoders (MAE), RePre does not require a complex masking strategy; it reconstructs the entire image from the full set of tokens.

Detailed architecture of the RePre framework showing multi-hierarchy feature fusion and the reconstruction decoder.

Balanced Optimization

The model is trained using a joint loss function that combines contrastive loss and an $L_1$ reconstruction loss. To balance these objectives, the authors employ an automated "uncertainty weighting" scheme. Importantly, the reconstruction decoder is discarded after pre-training, adding no overhead to the final model's inference speed.

Experiments and Results

The authors pre-trained RePre on the ImageNet-1K dataset and evaluated its performance across several downstream tasks, including linear probing on ImageNet, object detection on MS COCO, and semantic segmentation on Cityscapes.

Performance Gains

RePre consistently improved performance across all tested baselines and architectures, including vanilla ViT and Swin Transformer.

  • ImageNet Classification: RePre boosted Top-1 accuracy by 0.5% to 1.1% across various frameworks. For instance, MoCo v3 (ViT-S) rose from 72.5% to 73.2%.
  • Object Detection & Segmentation: On MS COCO, using MoBY with a Swin-T backbone, RePre increased the box mAP by 1.2% (from 43.6 to 44.8).
  • Semantic Segmentation: DINO with RePre achieved 73.40% mIoU on Cityscapes, outperforming both the standard DINO baseline and supervised pre-training.
Comparison of ImageNet Top-1 accuracy for various SSL methods with and without RePre across different backbones.

Discussion and Insights

The success of RePre highlights the inefficiency of using only the last layer for pixel reconstruction; multi-hierarchy features are essential for capturing the necessary local details. The framework is highly efficient, adding only about 4% training overhead, and is framework-agnostic, making it easily applicable to various SSL methods.

Limitations and Future Work

While effective on ViT-Small and Base models, future research could explore RePre's performance on massive-scale models (e.g., ViT-Huge). Additionally, comparing or hybridizing RePre with masked image modeling approaches like MAE could yield further improvements. Exploring more complex generative objectives beyond simple $L_1$ pixel loss also remains a promising direction.

Summary updated

BibTeX
@inproceedings{wang2022repre,
  author = {Luya Wang and Feng Liang and Yangguang Li and Honggang Zhang and Wanli Ouyang and Jing Shao},
  title = {{RePre: Improving Self-Supervised Vision Transformer with Reconstructive Pre-training}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.24963/ijcai.2022/200},
}
Figure