Learning with Unmasked Tokens Drives Stronger Vision Learners

Taekyung Kim, Sanghyuk Chun, Byeongho Heo, Dongyoon Han · DOI

Abstract

Masked image modeling (MIM) has become a leading self-supervised learning strategy. MIMs such as Masked Autoencoder (MAE) learn strong representations by randomly masking input tokens for the encoder to process, with the decoder reconstructing the masked tokens to the input. However, MIM pre-trained encoders often exhibit a limited attention span, attributed to MIM's sole focus on regressing masked tokens only, which may impede the encoder's broader context learning. To tackle the limitation, we improve MIM by explicitly incorporating unmasked tokens into the training process. Specifically, our method enables the encoder to learn from broader context supervision, allowing unmasked tokens to experience broader contexts while the decoder reconstructs masked tokens. Thus, the encoded unmasked tokens are equipped with extensive contextual information, empowering masked tokens to leverage the enhanced unmasked tokens for MIM. As a result, our simple remedy trains more discriminative representations revealed by achieving 84.2% top-1 accuracy with ViT-B on ImageNet-1K with 0.6%p gain. We attribute the success to the enhanced pre-training method, as evidenced by the singular value spectrum and attention analyses. Finally, our models achieve significant performance gains at the downstream semantic segmentation and fine-grained visual classification tasks; and on diverse robust evaluation metrics.

Introduction

Masked Image Modeling (MIM) has revolutionized how we train Vision Transformers (ViTs). By hiding parts of an image and asking a model to reconstruct them—much like a crossword puzzle for pixels—frameworks like Masked Autoencoders (MAE) have set new benchmarks in self-supervised learning. However, standard MIM strategies focus almost entirely on the masked tokens. The encoder processes the visible patches, and the decoder tries to predict the missing ones.

Researchers at NAVER AI Lab argue this creates a "local dependency" problem: because the training objective is just to fill in nearby pixels (like color or texture), the encoder develops a very short attention span. When visualizing the attention maps of MAE-trained models, they are often found to be "nearsighted," focusing only on immediate neighbors rather than understanding the broader structure or shape of objects. This lack of global context limits how well the model generalizes to downstream tasks like semantic segmentation or fine-grained classification.

Methodology: The LUT Framework

The authors propose a "simple remedy" called Learning with Unmasked Tokens (LUT). The core idea is to make the unmasked tokens "active" participants in the learning process rather than just passive inputs.

The LUT architecture utilizes dual encoders and a Broader Contextualization Loss ($L_{BC}$) to integrate global context into unmasked tokens.

As shown in the architecture diagram, LUT employs a dual-encoder system:

  1. Learnable Encoder ($f_\theta$): The primary model being trained, which receives a masked version of the image ($U_r$).
  2. Context Encoder ($g$): A momentum-based version of the learnable encoder that receives the entire unmasked image ($V$).

In addition to the standard reconstruction loss ($L_{MIM}$), LUT adds a Broader Contextualization Loss ($L_{BC}$). This objective takes the representations of the unmasked patches from the learnable encoder and aligns them with a global representation derived from the context encoder. By aligning sparse, visible patches with a "summary" of the whole image, the encoder is forced to learn how local details fit into the global scene.

Results and Key Insights

LUT demonstrates significant improvements across a wide array of standard benchmarks, including ImageNet-1K, ADE20K for semantic segmentation, and various fine-grained visual classification (FGVC) tasks.

  • Performance Gains: LUT achieved 84.2% top-1 accuracy with a ViT-B/16 on ImageNet-1K, a +0.6%p improvement over the MAE baseline. On ViT-L, it reached 86.0%.
  • Efficiency: LUT is remarkably efficient. A LUT model trained for only 400 epochs matches the accuracy of an MAE model trained for 1600 epochs, effectively cutting the required GPU time by 75% to reach the same performance level.

The "Aha" Moment in Attention

Visualizations confirm that LUT successfully addresses the "nearsightedness" of standard MIM.

Comparison of attention maps between MAE and LUT. LUT exhibits a significantly broader attention span, capturing entire object structures like the body of a bird or the shell of a turtle.

While MAE focuses on a tiny radius around a query point, LUT's attention spreads across the entire object. This broader perspective leads to more robust representations, as evidenced by LUT's superior performance on out-of-distribution (OOD) benchmarks like ImageNet-A (adversarial) and ImageNet-R (renditions).

Higher Rank Representations

Using spectral analysis (looking at singular values), the authors found that LUT utilizes the embedding space much better than MAE. It produces a "higher rank" feature space, meaning the information is spread out more effectively across the model's dimensions rather than collapsing into a few dominant patterns.

Conclusion

Learning with Unmasked Tokens (LUT) provides a simple yet powerful enhancement to Masked Image Modeling. By explicitly supervising unmasked tokens with global context, LUT trains Vision Transformers that are more discriminative, robust, and efficient. This work highlights that giving models a "wider perspective" during pre-training is key to building stronger vision learners.

Summary updated

BibTeX
@inproceedings{kim2024learning,
  author = {Taekyung Kim and Sanghyuk Chun and Byeongho Heo and Dongyoon Han},
  title = {{Learning with Unmasked Tokens Drives Stronger Vision Learners}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-72754-2\_20},
}
Figure