Local Masked Reconstruction for Efficient Self-Supervised Learning on High-Resolution Images

Jun Chen, Faizan Farooq Khan, Ming Hu, Ammar Sherif, Zongyuan Ge, Boyang Li, Mohamed Elhoseiny

Abstract

Generative self-supervised learning (SSL) methods like Masked Autoencoders (MAE) have achieved remarkable success but suffer from quadratic computational complexity relative to image resolution. We present Local Masked Reconstruction (LoMaR), a simple yet effective approach that restricts the reconstruction of masked patches to small local windows. By leveraging the observation that local context is often sufficient for patch reconstruction, LoMaR achieves significant speedups—up to 5x over state-of-the-art methods—while simultaneously improving downstream performance on high-resolution tasks.

Introduction

Self-supervised pretraining has become a cornerstone of modern computer vision. However, the standard approach of attending to all visible patches across an entire image creates a scalability bottleneck. As resolution increases, the number of patches grows, and the $O(n^2)$ complexity of Transformers makes pretraining prohibitively expensive. LoMaR addresses this by enforcing a local reconstruction bottleneck, demonstrating that global attention is largely redundant for the generative task of pixel reconstruction.

Methodology: Local Masked Reconstruction

LoMaR shifts the reconstruction paradigm from global to local through a four-step process:

  1. Local Window Sampling: Instead of processing the full image, the model samples multiple small, square windows (e.g., $7 \times 7$ patches) at random spatial locations.
  2. Random Window Masking: Within these windows, a high percentage of patches (typically 80%) are masked.
  3. Encoder-Only Architecture: Unlike MAE's heavy decoder, LoMaR uses a simple Transformer encoder that processes both visible and masked patches within the sampled window.
  4. Reconstruction: A lightweight MLP head reconstructs the original pixels of the masked patches.
Comparison of MAE's global attention versus LoMaR's local window-based attention and masking strategy.

This design ensures that the self-attention complexity remains linear with respect to the number of windows, enabling efficient scaling to high-resolution inputs.

Key Insights

The success of LoMaR is rooted in several observations:

  • Locality Sufficiency: Visualization of attention weights in global models reveals that decoders primarily focus on immediate neighbors. LoMaR explicitly enforces this inductive bias.
  • Efficiency through Sparsity: By processing only a fraction of the total image patches per iteration, the model can ingest significantly more data within the same compute budget.
  • Translation Invariance: Random window sampling encourages the model to learn features robust to spatial shifts, mimicking the beneficial biases of convolutional networks.

Experimental Results

LoMaR was evaluated on ImageNet-1K, iNaturalist 2018, MS COCO, and ADE20K. It consistently outperformed predecessors in both speed and accuracy.

Top-1 Accuracy vs. Pretraining Time on ImageNet-1K, demonstrating that LoMaR reaches higher accuracy levels significantly faster than MAE and BEiT.
  • Efficiency: For $384 \times 384$ resolution, LoMaR is 2.5x faster than MAE and 5.0x faster than BEiT. At $448 \times 448$, the speedup over BEiT grows to 5.3x.
  • Accuracy: LoMaR achieved 84.5% Top-1 accuracy on ImageNet-1K (384 resolution), surpassing MAE by 0.2% and BEiT by 0.8%.
  • Downstream Tasks: On MS COCO, LoMaR improved upon MAE by 0.5 $AP^{box}$ for object detection and 0.5 $AP^{mask}$ for instance segmentation.

Limitations and Future Work

While LoMaR excels in fine-tuning scenarios, it currently underperforms in linear probing compared to MAE. This is likely due to the distribution shift between local window training and global image inference, as well as the absence of a deep decoder to refine features. Future research will explore bridging this gap and extending the local reconstruction principle to video, where temporal dimensions further exacerbate computational costs.

Summary updated

BibTeX
@inproceedings{chen2025local,
  author = {Jun Chen and Faizan Farooq Khan and Ming Hu and Ammar Sherif and Zongyuan Ge and Boyang Li and Mohamed Elhoseiny},
  title = {{Local Masked Reconstruction for Efficient Self-Supervised Learning on High-Resolution Images}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2025},
  doi = {10.1109/wacv61041.2025.00781},
}
Figure