[Paper Review] MIM-Refiner: A Contrastive Learning Boost from Intermediate Pre-Trained Representations
MIM-Refiner enhances pre-trained Masked Image Modeling (MIM) models by refining intermediate representations through multiple contrastive learning heads attached to high-quality encoder blocks, using a novel Nearest Neighbor Alignment (NNA) objective. This short, effective refinement boosts performance to state-of-the-art levels on ImageNet-1K, achieving 84.7% linear probing accuracy and 64.2% 1-shot classification—surpassing larger models trained on vastly more data.
We introduce MIM (Masked Image Modeling)-Refiner, a contrastive learning boost for pre-trained MIM models. MIM-Refiner is motivated by the insight that strong representations within MIM models generally reside in intermediate layers. Accordingly, MIM-Refiner leverages multiple contrastive heads that are connected to different intermediate layers. In each head, a modified nearest neighbor objective constructs semantic clusters that capture semantic information which improves performance on downstream tasks, including off-the-shelf and fine-tuning settings. The refinement process is short and simple - yet highly effective. Within a few epochs, we refine the features of MIM models from subpar to state-of-the-art, off-the-shelf features. Refining a ViT-H, pre-trained with data2vec 2.0 on ImageNet-1K, sets a new state-of-the-art in linear probing (84.7%) and low-shot classification among models that are pre-trained on ImageNet-1K. MIM-Refiner efficiently combines the advantages of MIM and ID objectives and compares favorably against previous state-of-the-art SSL models on a variety of benchmarks such as low-shot classification, long-tailed classification, clustering and semantic segmentation.
Motivation & Objective
- To address the poor downstream performance of MIM models despite strong pre-training, especially in low-data regimes.
- To identify that representation quality in MIM models peaks in intermediate encoder blocks, not the final layer, due to decoder limitations.
- To develop a lightweight, efficient method to refine MIM features into semantic clusters without retraining from scratch.
- To improve generalization and transferability of MIM features for downstream tasks like linear probing, clustering, and few-shot classification.
- To outperform larger models trained on orders of magnitude more data by refining a ViT-H model pre-trained with data2vec 2.0 on ImageNet-1K.
Proposed method
- MIM-Refiner introduces multiple contrastive learning heads attached to intermediate blocks of the MIM encoder, particularly those with peak representation quality.
- Each contrastive head applies a modified Nearest Neighbor Alignment (NNA) objective that aligns each sample with its nearest neighbor and repels all others in the batch.
- The NNA objective improves signal quality by focusing on positive pairs via nearest neighbor selection, rather than pushing negatives apart.
- The refinement process is sequential and short, requiring only a few epochs of training on the same ImageNet-1K data used in pre-training.
- Batch normalization layers are essential in the contrastive heads, as they stabilize training and prevent performance degradation.
- The method preserves the original MIM model weights and only fine-tunes the contrastive heads and normalization layers.

Experimental results
Research questions
- RQ1Why do MIM models perform poorly on downstream tasks despite strong pre-training, especially in low-shot settings?
- RQ2Where in the MIM encoder do the most semantically meaningful representations reside, and how can they be leveraged?
- RQ3Can a lightweight, short refinement process significantly improve MIM model features without retraining the entire model?
- RQ4Does using multiple contrastive heads on intermediate layers outperform single-head contrastive learning on the final layer?
- RQ5Can refined MIM models surpass larger models trained on substantially more data in extreme low-shot scenarios?
Key findings
- MIM-Refiner achieves a new state-of-the-art linear probing accuracy of 84.7% on ImageNet-1K using a ViT-H model pre-trained with data2vec 2.0.
- The method sets a new SOTA of 64.2% accuracy in 1-shot ImageNet-1K classification, outperforming larger models like DINOv2-g, OpenCLIP-G, and MAWS-6.5B trained on up to 2000× more data.
- Refined models achieve 82.3% k-NN accuracy and 67.3% k-means clustering accuracy, indicating strong semantic clustering in the latent space.
- The refinement process is highly efficient, requiring only a few epochs to elevate features from subpar to SOTA quality.
- When fine-tuned with 100% of the labels, refined models slightly outperform their original counterparts, confirming no degradation in high-data regimes.
- Transfer to other datasets like ADE20K and VTAB shows strong generalization, with MAE-Refined achieving high mIoU and average rank across benchmarks.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.