English

What to Hide from Your Students: Attention-Guided Masked Image Modeling

Computer Vision and Pattern Recognition 2022-11-07 v2

Abstract

Transformers and masked language modeling are quickly being adopted and explored in computer vision as vision transformers and masked image modeling (MIM). In this work, we argue that image token masking differs from token masking in text, due to the amount and correlation of tokens in an image. In particular, to generate a challenging pretext task for MIM, we advocate a shift from random masking to informed masking. We develop and exhibit this idea in the context of distillation-based MIM, where a teacher transformer encoder generates an attention map, which we use to guide masking for the student. We thus introduce a novel masking strategy, called attention-guided masking (AttMask), and we demonstrate its effectiveness over random masking for dense distillation-based MIM as well as plain distillation-based self-supervised learning on classification tokens. We confirm that AttMask accelerates the learning process and improves the performance on a variety of downstream tasks. We provide the implementation code at https://github.com/gkakogeorgiou/attmask.

Keywords

Cite

@article{arxiv.2203.12719,
  title  = {What to Hide from Your Students: Attention-Guided Masked Image Modeling},
  author = {Ioannis Kakogeorgiou and Spyros Gidaris and Bill Psomas and Yannis Avrithis and Andrei Bursuc and Konstantinos Karantzalos and Nikos Komodakis},
  journal= {arXiv preprint arXiv:2203.12719},
  year   = {2022}
}

Comments

ECCV 2022. Codes and models are available at https://github.com/gkakogeorgiou/attmask

R2 v1 2026-06-24T10:23:58.638Z