Bootstrap Masked Visual Modeling via Hard Patches Mining

Haochen Wang, Junsong Fan, Yuxi Wang, Kaiyou Song, Tiancai Wang +2 more
12/21/2023
6 citations
cs.CV

Official code: Haochen-Wang409/HPM (110 stars, Python, Apache-2.0, last commit 2025-04-16).

Abstract

Masked visual modeling has attracted much attention due to its promising potential in learning generalizable representations. Typical approaches urge models to predict specific contents of masked tokens, which can be intuitively considered as teaching a student (the model) to solve given problems (predicting masked contents).

Show full abstract

Under such settings, the performance is highly correlated with mask strategies (the difficulty of provided problems). We argue that it is equally important for the model to stand in the shoes of a teacher to produce challenging problems by itself. Intuitively, patches with high values of reconstruction loss can be regarded as hard samples, and masking those hard patches naturally becomes a demanding reconstruction task. To empower the model as a teacher, we propose Hard Patches Mining (HPM), predicting patch-wise losses and subsequently determining where to mask. Technically, we introduce an auxiliary loss predictor, which is trained with a relative objective to prevent overfitting to exact loss values. Also, to gradually guide the training procedure, we propose an easy-to-hard mask strategy. Empirically, HPM brings significant improvements under both image and video benchmarks. Interestingly, solely incorporating the extra loss prediction objective leads to better representations, verifying the efficacy of determining where is hard to reconstruct. The code is available at https://github.com/Haochen-Wang409/HPM.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

[CVPR'23 & TPAMI'25] Hard Patches Mining for Masked Image Modeling & Bootstrap Masked Visual Modeling via Hard Patch Mining

1107Python, ShellMar 8, 20231 years agoApache-2.0
ade20kcococomputer-visioncvpr2023imagenet+5 more

Similar Papers

Cite this paper

@article{wang2023bootstrap,
  title  = {Bootstrap Masked Visual Modeling via Hard Patches Mining},
  author = {Haochen Wang and Junsong Fan and Yuxi Wang and Kaiyou Song and Tiancai Wang and Xiangyu Zhang and Zhaoxiang Zhang},
  year   = {2023},
  eprint = {2312.13714},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2312.13714v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2312.13714.svg)](https://codeofpaper.com/paper/2312.13714)

Discussion