Revealing the Dark Secrets of Masked Image Modeling

Masked image modeling (MIM) as pre-training is shown to be effective for numerous vision downstream tasks, but how and where MIM works remain unclear. In this paper, we compare MIM with the long-dominant supervised pre-trained models from two perspectives, the visualizations and the experiments, to uncover their key representational differences. From the visualizations, we find that MIM brings locality inductive bias to all layers of the trained models, but supervised models tend to focus locally at lower layers but more globally at higher layers. That may be the reason why MIM helps Vision Transformers that have a very large receptive field to optimize. Using MIM, the model can maintain a large diversity on attention heads in all layers. But for supervised models, the diversity on attention heads almost disappears from the last three layers and less diversity harms the fine-tuning performance. From the experiments, we find that MIM models can perform significantly better on geometric and motion tasks with weak semantics or fine-grained classification tasks, than their supervised counterparts. Without bells and whistles, a standard MIM pre-trained SwinV2-L could achieve state-of-the-art performance on pose estimation (78.9 AP on COCO test-dev and 78.0 AP on CrowdPose), depth estimation (0.287 RMSE on NYUv2 and 1.966 RMSE on KITTI), and video object tracking (70.7 SUC on LaSOT). For the semantic understanding datasets where the categories are sufficiently covered by the supervised pre-training, MIM models can still achieve highly competitive transfer performance. With a deeper understanding of MIM, we hope that our work can inspire new and solid research in this direction.

PDF Abstract CVPR 2023 PDF CVPR 2023 Abstract

Results from the Paper


Task Dataset Model Metric Name Metric Value Global Rank Result Benchmark
Pose Estimation COCO test-dev SwinV2-B 1K-MIM AP 76.7 # 13
Pose Estimation COCO test-dev SwinV2-L 1K-MIM AP 77.2 # 10
Pose Estimation CrowdPose SwinV2-L 1K-MIM AP 75.5 # 4
Pose Estimation CrowdPose SwinV2-B 1K-MIM AP 74.9 # 5
Visual Object Tracking GOT-10k SwinV2-B 1K-MIM Average Overlap 70.8 # 14
Visual Object Tracking GOT-10k SwinV2-L 1K-MIM Average Overlap 72.9 # 12
Monocular Depth Estimation KITTI Eigen split SwinV2-B 1K-MIM absolute relative error 0.052 # 20
RMSE 2.050 # 17
Sq Rel 0.148 # 10
RMSE log 0.078 # 20
Delta < 1.25 0.976 # 18
Delta < 1.25^2 0.998 # 1
Delta < 1.25^3 0.999 # 11
Monocular Depth Estimation KITTI Eigen split SwinV2-L 1K-MIM absolute relative error 0.050 # 13
RMSE 1.966 # 9
Sq Rel 0.139 # 17
RMSE log 0.075 # 12
Delta < 1.25 0.977 # 13
Delta < 1.25^2 0.998 # 1
Delta < 1.25^3 1.000 # 1
Visual Object Tracking LaSOT SwinV2-B 1K-MIM AUC 70 # 18
Visual Object Tracking LaSOT SwinV2-L 1K-MIM AUC 70.7 # 14
Depth Estimation NYU-Depth V2 SwinV2-B 1K-MIM RMS 0.304 # 5
Depth Estimation NYU-Depth V2 SwinV2-L 1K-MIM RMS 0.287 # 3
Monocular Depth Estimation NYU-Depth V2 SwinV2-L 1K-MIM RMSE 0.287 # 17
absolute relative error 0.083 # 18
Delta < 1.25 0.949 # 17
Delta < 1.25^2 0.994 # 14
Delta < 1.25^3 0.999 # 4
log 10 0.035 # 18

Methods