Masked Image Residual Learning for Scaling Deeper Vision Transformers

Deeper Vision Transformers (ViTs) are more challenging to train. We expose a degradation problem in deeper layers of ViT when using masked image modeling (MIM) for pre-training. To ease the training of deeper ViTs, we introduce a self-supervised learning framework called Masked Image Residual Learning (MIRL), which significantly alleviates the degradation problem, making scaling ViT along depth a promising direction for performance upgrade. We reformulate the pre-training objective for deeper layers of ViT as learning to recover the residual of the masked image. We provide extensive empirical evidence showing that deeper ViTs can be effectively optimized using MIRL and easily gain accuracy from increased depth. With the same level of computational complexity as ViT-Base and ViT-Large, we instantiate 4.5$\times$ and 2$\times$ deeper ViTs, dubbed ViT-S-54 and ViT-B-48. The deeper ViT-S-54, costing 3$\times$ less than ViT-Large, achieves performance on par with ViT-Large. ViT-B-48 achieves 86.2% top-1 accuracy on ImageNet. On one hand, deeper ViTs pre-trained with MIRL exhibit excellent generalization capabilities on downstream tasks, such as object detection and semantic segmentation. On the other hand, MIRL demonstrates high pre-training efficiency. With less pre-training time, MIRL yields competitive performance compared to other approaches.

Paper

References (69)

Scroll for more · 38 remaining

Similar papers

Peer review

Reviewer DfMD6/10 · confidence 5/52023-06-26

Summary

This paper finds that the deep layers of ViT fail to benefit from MIM pre-training. The authors replace deeper layers of MAE pre-trained ViTs with random initialization and demonstrate that this modified model achieves better performances than the original MAE pre-trained model. To this end, the authors conclude that MIM pre-training is only effective for shallow layers. To address this, Masked Image Residual Learning (MIRL) is proposed. Experiments under various benchmarks demonstrate the efficacy of the proposed MIRL method.

Strengths

1. This paper is well-written and easy to follow. 2. The authors have systematically analyzed whether MIM pre-training is effective for deeper layers of ViTs. 3. The proposed method and the motivation are highly connected. 4. Experiments are sufficient and the code is provided in the supplementary material.

Weaknesses

**Major Concerns:** 1. **Unfair comparisons against other methods.** I have carefully checked the fine-tuning configuration of both MIRL (Table 2 in the supplementary material) and MAE [21], and find that *MIRL incorporates an extra exponential moving average (EMA)* while others do not, which appears to be an unfair comparison. It is better to fine-tune all models pre-trained by MIRL *without* EMA. Also, several hyper-parameters have been carefully tuned compared with MAE [21], such as base learning rate, batch size, and warmup epochs. Therefore, it is better to compare with MAE which is fine-tuned under the exact same configuration. 2. **Lack of intuitive explanation of residual learning.** I recognize the efficacy of learning residual in MIM, but the underlying motivation remains unclear. In other words, given the observation that deep layers of ViT fail to benefit from MIM pre-training, why learning residual can alleviate this problem? 3. **Observation I and II cannot be reflected in Figure 2 by using a single plot named "truncated MAE".** If my understanding is correct, models of these two observations are pre-trained in different ways. Specifically, the model of Observation I should be pre-trained by vanilla MAE while the model of Observation II should be pre-trained by truncated MAE. Therefore, these two observations cannot be reflected in Figure 2. It is better to plot three curves in Figure 2, including vanilla MAE, vanilla MAE with truncated fine-tuning (Observation I), and truncated MAE (Observation II). **Minor Questions/Suggestions:** 4. Typo in Eq. (6). It should be $||\mathbf{x}^i - \hat{\mathbf{x}}_g^i - \hat{\xi}_g^i||_2^2$. 5. It is better to combine Table 1 in the main submission with Table 4 in the supplementary material to better compare the configuration (including #params and FLOPs) of different backbones. 6. It is encouraged to plot vanilla MAE with ViT-B and ViT-L in Figure 6 to demonstrate the scaling behavior of the proposed method. 7. It is better to compare deep ViTs pre-trained with vanilla MAE. 8. The configuration of Table 2a is not clear. Is residual learning performed on both pixel and feature? 9. The setting of Table 2d is confusing. Its caption says "multi-encoder" while in lines 203-212 is "multi-decoder".

Questions

I do not have any questions. Please refer to the weaknesses section. I am willing to raise my rating if the authors succeed in demonstrating that their improvements come from the proposed method and not from carefully tuned hyperparameters during fine-tuning. **Post Rebuttal Comments** Thanks for the rebuttal and additional comments. My concerns are well addressed. Since using EMA in fine-tuning will not affect the performance significantly, the reviewer thinks it might be a fair comparison. Also, the explanation of why residual learning works is intuitive. Therefore, I will raise my rating to 6 and the authors are supposed to revise their paper according to our dialog, including (1) clarification about the EMA, (2) an intuitive explanation about why it works, and (3) comparison with CVPR'23 works.

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, ethical considerations.

Confidence

5: You are absolutely certain about your assessment. You are very familiar with the related work and checked the math/other details carefully.

Soundness

2 fair

Presentation

3 good

Contribution

3 good

Limitations

The authors have discussed the limitations.

Reviewer DfMD2023-08-15

Post Rebuttal Comments from Reviewer DfMD

I appreciate the rebuttal and most of my concerns are addressed. However, I found that the author did not compare the proposed method with some CVPR'23 works, e.g., [A] and [B]. Moreover, [B] seems to be very similar to the proposed method. The main difference lies in the reconstruction targets. The proposed method reconstruct residuals while [B] reconstructs raw RGB pixels. It is suggested to compare some new state-of-the-art methods. [A] Haochen Wang et al. Hard patches mining for masked image modeling. In CVPR 2023. [B] Haoqing Wang et al. Masked Image Modeling with Local Multi-Scale Reconstruction. In CVPR 2023.

Authorsrebuttal2023-08-16

Thanks for the reviewer's response. We are truly pleased to hear that our rebuttal has helpfully addressed some concerns of the reviewer. We noticed the two CVPR'23 papers[1,2] mentioned by the reviewer. Given that the CVPR 2023 conference took place after our initial submission, we did not have a chance to cite them earlier. However, we are happy to cite these papers in our revised version. Having read the paper [2], it is evident to us that LocalMIM [2] is fundamentally different to our own work. We would like to share a couple of key differences: 1. Our motivation is distinct from LocalMIM's. We initiated our research by uncovering a negative optimization issue in the deeper layers of networks during MIM pre-training. To the best of our knowledge, our work is the first to expose this problem, underscoring the novelty of our paper — a sentiment echoed by Reviewer 6uey. Following this, our primary focus has been on tackling this degradation challenge. Conversely, LocalMIM is designed for local multi-scale reconstruction where the lower and upper layers reconstruct fine-scale and coarse-scale supervisions respectively in order to accelerate the training converge speed. It is crafted with hierarchical architectures like Swin[3] in mind, which inherently contain less low-level information in the higher layers. However, the effectiveness of LocalMIM on plain Transformer architectures appears to be limited. In essence, the issue that LocalMIM tackles may not even be present in a plain Transformer architecture, as ViTs contain no downsampling operations, ensuring that low-level information is preserved in the deeper layers. To shed light on this, our ablation study titled "MIRL vs. simple multi-decoders" (see Lines 203-212) provides an insightful perspective. The ablation results summarized in the table below indicate that LocalMIM (represented as multi-decoders) does not improve accuracy when used with a plain encoder architecture | model | multi-decoders | vanilla MAE | MIRL| | -------- | :-------: | :-------: | :-------: | ViT-B-48 | 84.5 | 84.5 | 85.3 | Additionally, based on the results provided in [1], which are listed in the table below, LocalMIM significantly improves the Swin encoder, but yields only a 0.1% accuracy increase for the ViT encoder when compared to the baseline MAE. |method| ViT-B | Swin-B | | -------- | :-------: | :-------: | MAE / GreenMIM [4] | 82.9 | 83.2 | LocalMIM-Pixels [2] | 83.0 | 83.7 | LocalMIM-HOG [2] |83.3 | 83.8 | The core feature of our framework, distinct from LocalMIM, is the image residual learning we propose. This methodology alleviates the degradation problem. The idea is straightforward yet has proven to be a highly practical solution to the degradation problem without bells and whistles. 2. The other distinction is that we focus on scaling deeper Vision Transformers. By leveraging MIRL, we unleashed the potential of slender ViT variants after addressing the degradation problem. As highlighted by Reviewer igwC, this is an under-explored area of research, one that LocalMIM [2] has not ventured into. [1] Wang, Haochen, et al. "Hard patches mining for masked image modeling." Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2023. [2] Wang, Haoqing, et al. "Masked Image Modeling with Local Multi-Scale Reconstruction." Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2023. [3] Liu, Ze, et al. "Swin transformer: Hierarchical vision transformer using shifted windows." Proceedings of the IEEE/CVF international conference on computer vision. 2021. [4] Huang, Lang, et al. "Green hierarchical vision transformer for masked image modeling." Advances in Neural Information Processing Systems 35 (2022): 19997-20010.

Reviewer DfMD2023-08-17

Thanks for the comments. My concerns are well addressed. Since using EMA in fine-tuning will not affect the performance significantly, the reviewer thinks it might be a fair comparison. Also, the explanation of why residual learning works is intuitive. Therefore, I will raise my rating to 6 and the authors are supposed to revise their paper according to our dialog, including (1) clarification about the EMA, (2) an intuitive explanation about why it works, and (3) comparison with CVPR'23 works.

Authorsrebuttal2023-08-18

Thanks

Thanks for the constructive feedback and recognition of our work. We will incorporate the suggestions into our revised paper.

Reviewer 6uey5/10 · confidence 4/52023-07-04

Summary

In this paper, the authors propose a new mask image modeling method, which is helpful for deep ViT model pretraining.

Strengths

Please refer to Questions

Weaknesses

Please refer to Questions

Questions

### strength 1. The paper is well-written and easy to follow 2. The proposed method starts from an interesting observation and is novel. 3. The experiment results seem good. ### Weakness 1. The experiment lacks some necessary reuslts. For example, ViT-L is deeper than ViT-B and has 24 layers by default, it may benefit from the proposed method. This would be a fair comparison and further prove the effectiveness of the proposed method. 2. Following 1, there is no baseline for the deeper models except Table.2(b). So when comparing with MAE, the gain of the proposed method is not clear. 3. I'm confused about the design of ViT-S-54, why use 54 layers? if it uses 48 layers, its params and FLOPs will be more similar to ViT-B and the comparison would be more fair. 4. I also have a question about the method design, why the segments are divided into two groups to predict content and residual? Take Fig4 as an example, denote input as x, if H1 predicts x0, H2 predicts x1 = x-x0, H3 further predicts x2 = x-x0-x1 and so on, such a sequential design seem more consistent with the model architecture, will it perform better? 5. A question about detail, MAE uses the pixel-normed patch as the prediction target, which is critical for its performance. Is this also used in the proposed method and the reported MAE baselines(300/800)? 6. Some baseline methods are missed. For example, MaskFeat[1] for ViT-B, Data2Vec[2], PeCO[3], BootMAE[4] and CAE[5] for ViT-B/L. 7. A small typo in Table.2(d), should it be multi-decoders? [1] Masked Feature Prediction for Self-Supervised Visual Pre-Training [2]data2vec: A General Framework for Self-supervised Learning in Speech, Vision and Language [3]PeCo: Perceptual Codebook for BERT Pre-training of Vision Transformers [4]Bootstrapped Masked Autoencoders for Vision BERT Pretraining [5]Context Autoencoder for Self-Supervised Representation Learning

Rating

5: Borderline accept: Technically solid paper where reasons to accept outweigh reasons to reject, e.g., limited evaluation. Please use sparingly.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

3 good

Presentation

3 good

Contribution

3 good

Limitations

Please refer to Questions

Reviewer igwC6/10 · confidence 4/52023-07-07

Summary

This paper delves into the degradation issue encountered in the deeper layers of Vision Transformer (ViT) and proposes a self-supervised learning framework called Masked Image Residual Learning (MIRL). MIRL reformulates the learning objective to recover the residual of the masked image and makes scaling ViT along depth a promising direction for enhancing performance. Experimental results demonstrate promising improvements on various downstream tasks with increased depth, highlighting the effectiveness of the MIRL method.

Strengths

1.Tackling the degradation issue in training deeper vision-Transformers (ViT) in the context of MIM pre-training is a practical problem and is also a under-explored area of research. 2.This paper presents several interesting observations and shows the MIM introduces negative optimization in the deeper layers of ViT that would hinder further pre-training performances. Thre proposed method is simple and effective for solving this problem. 3.The authors conduct extensive and comprehensive experiments that show the effectiveness and efficiency of the proposed method.

Weaknesses

1.While the proposed method has shown promising results, it still lacks an in-depth explanation, e.g., choosing the training objective for encouraging deep layers to recover the image residual. The rationale behind dividing different segments and providing the proposed reconstruction terms could benefit from offering additional theoretical justifications, such as utilizing tools like Mutual Information. 2.It would be beneficial to provide further clarity on the mechanism to ensure precise reconstruction of the main component and residual of the image in the shallower and deeper parts, respectively. Given that they share the same training objective, disentangling them poses a nontrivial challenge. 3.An ablation study could be added to investigate whether assigning different regularization weights to different segment loss parts is beneficial, whether the MIRL approach incurs additional training time and other costs.

Questions

Training the vision-Transformers with varying scales often requires distinct hyper-parameters. For instance, the optimal hyper-parameters for training ViT-Large and ViT-Small typically differ. It would be interesting to investigate if the proposed MIRL approach can alleviate this phenomenon when training vision Transformers with varying scales. Overall, this paper addresses an important problem and provides some insights through observations and the proposed solutions. While it leans more towards empirical findings, it would be beneficial to provide additional theoretical evidence to support the claims.

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, ethical considerations.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

3 good

Presentation

3 good

Contribution

3 good

Limitations

See the above comments.

Reviewer Pj1d5/10 · confidence 5/52023-07-08

Summary

This paper clarifies that MIM pretraining can induce negative optimization in deeper layers of ViT through comparison between vanilla MAE and truncated MAE. Based on this observation, this paper proposes a MAE-based framework named Masked Image Residual Learning (MIRL) for alleviating the degradation problem and training deeper ViT. In MIRL, The objective of MIM is decoupled to recovering the main component of images from the features of shallower layers, and recovering the residual from the features of deeper layers. Ablation experiments shows that MIRL outperforms MAE and MIM baselines with multiple decoders, and help deeper ViTs (e.g., ViT-S-54 and ViT-B-48) achieve better performance compared to previous methods on ImageNet.

Strengths

1. In this paper, the degradation problem in the MIM pretraining of ViT is illustrated by well-designed experiments. 2. Training deeper ViT with MIM has not been widely studied in previous works. 3. The idea of recovering the residual of images is interesting, and ablation experiments show the effectiveness of MIRL.

Weaknesses

1. Although this paper has cited some previous works that provide supervision to different layers of ViT (like deepMIM[1]), there is no comparison between MIRL and these previous methods in this paper. 2. Using multiple decoders in MIRL will significantly increase training time compared with MAE. A comparison of training time between MIRL and MAE should be included. 3. On the dense prediction tasks, MIRL does not show significant improvement (even weaker performance) compared to MAE with a similar number of parameters. 4. This paper says that MIRL alleviates the degradation problem in deeper layers of ViT. However, This paper does not provide evidence on whether the phenomenon in observation II still exists in the proposed method. 5. The baseline results of pretraining deeper ViTs (like ViT-S-54 ViT-B-48) with MAE are not provided in this paper. [1] Sucheng Ren, Fangyun Wei, Samuel Albanie, Zheng Zhang, and Han Hu. Deepmim: Deep supervision for masked image modeling. arXiv preprint arXiv:2303.08817, 2023.

Questions

1. The results in Table 2(d) show the comparison between MIRL and MIM baselines with multiple decoders. Did the baseline method here use DID? If not, can "residual learning + DID" significantly outperform "multi-decoders + DID"? 2. A comparison of training time between MIRL and MAE should be included. Other questions have been mentioned in weaknesses.

Rating

5: Borderline accept: Technically solid paper where reasons to accept outweigh reasons to reject, e.g., limited evaluation. Please use sparingly.

Confidence

5: You are absolutely certain about your assessment. You are very familiar with the related work and checked the math/other details carefully.

Soundness

3 good

Presentation

3 good

Contribution

3 good

Limitations

The authors have addressed the limitations of this paper.

Reviewer Cuwd5/10 · confidence 5/52023-07-10

Summary

* This paper propose a Masked Image Modeling pretraining framework, which boost the pretraining performance in deeper deeper layers of ViT architecture. * Deeper vision transformers are hard to train, so authors introduce a new pretraining objective for mim, which can alleviate the degradation problem in deeper vit. * MIRL segment the encoding blocks into several blocks(such as 4) and use different decoders to reconstruct the target. * various experiments are conducted, with less pre-training time, MIRL can achieve competitive performance compared to other mim approaches especially in deeper vit.

Strengths

* well motivated and well written, training and pretraining in deeper vit architecture is important, experiments show that pretraining in deeper vit-base can get similar result with vit-base. * The downstream task performance(in table 4) show superior performance than MAE framework, +2.5 bbox mAP, +1.8 mask AP.

Weaknesses

* Since MIRL with deeper layers is different from the standard vit architecture(more deep than original vit), the fully supervised performance of the the same layers should be reported, the compare is a little in Table 3. * I am interested that would this framework be also work in convnet mask image modeling framework(such as simmim, spark) ?

Questions

please refer to the weakness

Rating

5: Borderline accept: Technically solid paper where reasons to accept outweigh reasons to reject, e.g., limited evaluation. Please use sparingly.

Confidence

5: You are absolutely certain about your assessment. You are very familiar with the related work and checked the math/other details carefully.

Soundness

2 fair

Presentation

2 fair

Contribution

2 fair

Limitations

None

Reviewer igwC2023-08-18

I appreciate the author's efforts in providing responses, which have addressed most of my concerns. Overall, I find this work to be of good quality and interesting, and I am willing to increase my rating.

Authorsrebuttal2023-08-18

Thanks

We appreciate the recognition of our work. Thanks again for the constructive feedback.

Reviewer 6uey2023-08-18

The rebuttal solved my concerns partly. So I keep my score as Borderline accept.

Authorsrebuttal2023-08-18

Thanks for the response. We are glad to have resolved some of the concerns raised.

Reviewer Pj1d2023-08-21

Thanks for authors’ effort in the rebuttal. The responses have addressed most of my concerns. I will keep my rate and recommend accepting this paper.

Authorsrebuttal2023-08-21

Thanks

We are glad to have resolved some of the concerns raised. Thanks for the recognition of our work.

Authorsrebuttal2023-08-21

Thanks for the response and recognition of our work.

Program Chairsdecision2023-09-21

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC