Accelerating Augmentation Invariance Pretraining

Our work tackles the computational challenges of contrastive learning methods, particularly for the pretraining of Vision Transformers (ViTs). Despite the effectiveness of contrastive learning, the substantial computational resources required for training often hinder their practical application. To mitigate this issue, we propose an acceleration framework, leveraging ViT's unique ability to generalize across inputs of varying sequence lengths. Our method employs a mix of sequence compression strategies, including randomized token dropout and flexible patch scaling, to reduce the cost of gradient estimation and accelerate convergence. We further provide an in-depth analysis of the gradient estimation error of various acceleration strategies as well as their impact on downstream tasks, offering valuable insights into the trade-offs between acceleration and performance. We also propose a novel procedure to identify an optimal acceleration schedule to adjust the sequence compression ratios to the training progress, ensuring efficient training without sacrificing downstream performance. Our approach significantly reduces computational overhead across various self-supervised learning algorithms on large-scale datasets. In ImageNet, our method achieves speedups of 4$\times$ in MoCo, 3.3$\times$ in SimCLR, and 2.5$\times$ in DINO, demonstrating substantial efficiency gains.

Paper

References (35)

Scroll for more · 23 remaining

Similar papers

Peer review

Reviewer 95eS3/10 · confidence 2/52024-06-19

Summary

This submission proposed to accelerate the training of ViT by two methods: 1) Randomly drop tokens for input. 2) Dynamically resize patches into different dimension. The second method is published in previous works.

Strengths

N.A.

Weaknesses

1. The novelity of the sumission is limited: In first propsoed method, dropping tokens randomly (masking) is a common trick for performance improvement (as cited by authors). It is natural to connect improvement to training acceleration. For the second method, as author point out that the method comes from published work.

Questions

1. In Sec. 4.2, author mentioned that "large patches cannot be directly encoded", why large patches cannot be encoded (to what and by what?) Please add more explanation on the motivation of patch scaling.

Rating

3

Confidence

2

Soundness

2

Presentation

2

Contribution

2

Limitations

N.A.

Reviewer Q1ps5/10 · confidence 4/52024-07-03

Summary

This paper presents an acceleration framework for Vision Transformers in contrastive learning. It utilizerandomized token dropout and patch-scaling to reduce the sequence length to accelerate training. Based on an analysis of the gradient estimation error, this paper proposes an automated procedure to identify an optimal acceleration schedule. Extensive experiments demonstrate that accelerated pretraining achieves comparable performance on visual understanding tasks, while effectively reducing computation costs.

Strengths

Strength: 1. The motivation is clear and reasonable. 2. Extensive experiments demonstrate the approach's effectiveness in reducing the training time while keeping comparable comparisons. 3. This paper is well-organized and clearly-written.

Weaknesses

Weakness: 1. Lower ceiling. It seems like that this framework will lead to a decrease in the optimal performance of pretraining. For instance, in Fig.1(b), Accelerated MoCo's highest performance is lower than MoCo, although much faster. By the way, ImageNet-1K performance is much more important than ImageNet-100, especially for a SSL method. 2. Missing important metric. This paper reports NN and Linear Probing to evaluate the approach, however, full-finetuning top-1 accuracy (on ImageNet-1K) is a critical metric for SSL method. Adding this metric can make this paper more convincing. 3. Changed structure. Since this paper utilizes flexible patch embedding, the structure is not a naive ViT anymore, which may undermine the application of this paper in many scenarios. 4. Limited evaluation. This paper only conduct experiments based on MoCo-v3, more evaluation on other SSL frameworks (e.g, another contrastive learning method or a MIM method) will make it solid.

Questions

Please see the comments above.

Rating

5

Confidence

4

Soundness

3

Presentation

3

Contribution

2

Limitations

Please see the comments above.

Authorsrebuttal2024-08-13

Final comment

Dear reviewer, As promised, we evaluated the accelerated models trained with different training budgets using the full finetuning protocol and compared them to our baseline MoCo model. (We followed the MoCo-V3 paper and code in our finetuning evaluations). As can be seen in the table below, under this evaluation protocol, the speedup is even more pronounced (compared to what we showed in the paper using Linear Probe evaluations). Specifically, the model trained with about 10% of the budget already achieved a result comparable to unaccelerated training (only 0.24% worse). Overall, the main concerns were 1) the lower ceiling in some evaluations, 2) the absence of finetuning results, 3) the changed backbone architecture, and 4) the lack of experiments beyond MoCo. Additional experiments for 2 and 4 were conducted and will be added to the paper. We believe that concern #3 was a misunderstanding and concern #1 should now be less critical, given that we observe similar performances on both linear probing and finetuning (of all conducted experiments, only nearest neighbor evaluations on IN1k showed slightly lower performance ceilings). We thank the reviewer for helping us improve our paper, and ask the reviewer to reassess the final score to account for these improvements. | Algorithm | Acceleration | Training Budget (M) | FT (%) | |:----:|:----:|:-----:|:----:| | **MoCo** | ✔| 308| 80.56| |**MoCo** | ✔ | 617 | 81.61 | | **MoCo**| ✔ | 1080 | 81.81| | **MoCo**| ✔ | 1542 | 81.92 | |**MoCo** | ✗ | 6150 | 81.85 * | \* As mentioned in the paper, our non-accelerated model is slightly worse than the officially released MoCo-v3 model. While we used the same overall training budget, we could only train with relatively smaller batch sizes of 1024 (as opposed to the original 4096), which to the best of our knowledge is the cause of the gap. However, keep in mind that, the goal of the paper is to propose and validate a training acceleration technique. The results above show that, given the same training loss (which in the case of MoCo depends on the batch size), our acceleration method can significantly speed up convergence. We expect similar convergence speedups when training with higher batch sizes.

Reviewer geFN6/10 · confidence 4/52024-07-13

Summary

This work focuses on speeding up contrastive learning with vision transformers. Two methods, specifically tailored to ViTs, are investigated for making pretraining more efficient: randomised token dropout and flexible patch scaling. Additionally, the authors analyse the gradient estimation errors from these methods and create an automated strategy for optimal acceleration during pretraining. The resulting approach can achieve similar performances for a fraction of the budget, specifically 1/5 for ImageNet-100 and 1/3 for ImageNet-1k.

Strengths

**Originality** TknDrop is clearly inspired by common usage in MIM and patch scaling is taken from FlexiViT. These are therefore not original ideas but have not been explored for speeding up contrastive ViTs. The more original aspect of the paper, however, is the automatic scheduling of these techniques through gradient error monitoring. **Quality** The construction of the final dynamic acceleration method is methodical and thorough. Extensive ablations are performed to find the optimal combination that achieves the most effective acceleration. The experimental section overall is of very high quality. **Clarity** The paper is very clearly written throughout, and the structure is very natural and easy to follow. The plentiful figures and tables are effectively communicating the right information, though Figure 7 could have a larger font. It is however unclear what Lq=50 means in terms of the token dropout ratios (0, 0.25, 0.5, 0.75, 0.9). Does it mean that 50 tokens are kept out of the total 197 (meaning roughly 0.75 for the dropout ratio)? **Significance** The simplicity and automated nature of the method makes it seem easy for practitioners and researchers to use themselves. This can indeed facilitate a wider adoption of self-supervised pretraining for those with modest compute resources. However, while the authors point out that their narrow focus on MoCov3 + contrastive learning + ViT allows for a deeper study, the paper suffers a bit by not showing any generalisation to other types of training, like supervised pre-training on ImageNet.

Weaknesses

My main concern is that the scope of the paper is rather narrow. It does one thing and it does it well, but this limits its potential impact. The proposed method is not limited to only contrastive pretraining and a single experiment that shows how it also applies to supervised pretraining on ImageNet would help show how generally applicable it is. It’s not quite clear how the values 1/3 and 1/5 for the budget are obtained for the caption of Figure 1. Section 6.4 claims a 4x speedup on ImageNet. These claims can be made more consistent throughout.

Questions

Are the speedup techniques explored in this paper orthogonal/complementary to e.g. resolution scaling or curriculum learning that have been explored in other works? Can longer training with token dropout and patch scaling yield better results than the baseline, I.e. using the same budget of 520M on ImagetNet-100? Are the overheads for automatically scheduling the acceleration accounted for in the budget, or are the optimal decision points for the scheduler computed offline and fixed before training?

Rating

6

Confidence

4

Soundness

3

Presentation

4

Contribution

2

Limitations

There is no section that discusses the limitations of the proposed method explicitly. I would like to see some of the questions I’ve asked answered in such a section, or as part of the conclusion.

Reviewer GyCT4/10 · confidence 3/52024-07-13

Summary

The paper presents a framework to speed up the pre-training of Vision Transformers (ViTs) in a self-supervised contrastive learning setup. The proposed method incorporates randomized token dropout and flexible patch scaling. The authors leverage this framework to analyze estimated gradient errors and its downstream performance. Additionally, they propose to determine an optimal dynamic acceleration schedule during training. Experimental findings demonstrate improvements in the convergence rate of the MoCo-v3 model across IN-100 and IN-1k datasets.

Strengths

- The proposed acceleration framework brings noticeable improvements in the pre-training convergence of MoCo-v3 on IN-100 and IN-1k. - The framework incorporates various sequence compression strategies. The authors investigate how these strategies affect gradient estimation errors and analyze their impact on downstream performance. - The acceleration framework includes a dynamic scheduler that adapts during training. It is validated across different training budgets and supported by ablation studies that highlight the importance of the individual contribution of token dropout and patch-scaling.

Weaknesses

- The proposed framework consists of two components: (1) randomized token dropout and (2) flexible patch scaling. Both ideas exist and have generally been studied for efficient pre-training of ViTs. For instance, the idea of dropping tokens in ViTs has been explored in various forms since their introduction. Recent research has focused on more sophisticated and targeted ways of applying token dropout in ViTs [1, 2, 3]. As a result, the main contributions of this work may be a bit limited. - In section 4.3 - 'Since there are many more linear operations than quadratic ones, the time complexity of linear operations dominates. Thus, for the sake of simplicity, we consider the time complexity of the ViT architecture to be linear in the sequence length'. This statement seems oversimplified. While it's true that there are more distinct linear operations, this doesn't automatically mean they dominate the time complexity. I am not convinced that having more linear operations would negate the impact of the quadratic operation, even with a sequence length of ~200. This assertion requires further clarification and possibly revision. - The concepts of randomized token dropout and patch scaling could potentially benefit ViTs in other self-supervised learning (SSL) approaches such as distillation-based SSL (DINO [4], iBOT [5]). I think there will be more contribution if the authors explored pre-training of ViTs in a broader SSL setting than being restricted to just MoCo-v3. - I am skeptical about labeling the described approach as truly dynamic acceleration. Although it employs cost-adjusted MSE to compare strategies efficiently, the acceleration schedule is predetermined based on the analysis of intermediate checkpoints from a pre-trained model (as mentioned in section 5.1 under Dynamic Acceleration). A genuinely dynamic acceleration approach would involve real-time adjustments during training. Therefore, the method could be better described as an optimized static schedule that varies across different training stages rather than a fully adaptive, dynamic approach. [1] Marin, Dmitrii, et al. "Token pooling in vision transformers." arXiv preprint arXiv:2110.03860 (2021). [2] Ryoo, Michael S., et al. "Tokenlearner: What can 8 learned tokens do for images and videos?." arXiv preprint arXiv:2106.11297 (2021). [3] Wang, Yulin, et al. "Not all images are worth 16x16 words: Dynamic transformers for efficient image recognition." Advances in neural information processing systems 34 (2021): 11960-11973. [4] Caron, Mathilde, et al. "Emerging properties in self-supervised vision transformers." Proceedings of the IEEE/CVF international conference on computer vision. 2021. [5] Zhou, Jinghao, et al. "ibot: Image bert pre-training with online tokenizer." arXiv preprint arXiv:2111.07832 (2021).

Questions

- Line 210: 'The variance is a function of their computational cost.' Could you provide references or further clarification on how variance is a direct function of computational cost? - Line 268 - 'The only modification was the use of a non-symmetric loss.' Is there a specific reason for this, considering that MoCo-v3 uses symmetric loss? - Line 271 - 'Non-symmetric version produces more diverse batches.' Could you elaborate on what diverse batches mean and how beneficial they are exactly? - See weaknesses.

Rating

4

Confidence

3

Soundness

2

Presentation

3

Contribution

2

Limitations

The limitations are not discussed.

Reviewer GyCT2024-08-10

Response to Rebuttal

Thank you for the responses. Most things have been addressed. I'm not fully convinced by the claim that linear operations dominate the time complexity; when purely speaking asymptotically, we still refer to ViTs as having a quadratic complexity in sequence length. Perhaps consider changing the section header to reflect a focus on low-resolution settings. Overall, I would have preferred a broader focus on general contrastive settings, as promised in the abstract, rather than just MoCo. Also, DINO is not a contrastive setup; it's a distillation-based method. It's great that you're getting good results with it, but I'm unsure if it fits the contrastive theme of the paper.

Authorsrebuttal2024-08-10

Discussion

Thank you for engaging during the discussion period. **Linear time complexity** There's a couple of things we'd wanna add. First, we completely agree that transformers have quadratic time complexity wrt the sequence length. This quadratic complexity is a bottleneck (and thus cannot be ignored) for NLP applications, where sequence length is often in the thousands, and some vision applications like segmentation or image generation where images are processed at high resolution (640x640 and even higher). However, contrastive learning (and most other self-supervised learning and recognition applications) has been traditionally studied at the baseline resolution of 224x224 (which with a patch size of 16x16 yields a sequence length of 196). We have not modified the resolution of these algorithms in our paper. So, while we understand the reviewer's point, we used the linear approximation simply because it simplifies how time is accounted for, and because at the standard 224x224 resolution (used in nearly all papers in contrastive learning), the approximation is very accurate. Also, note that the proposed approach would be even more effective if the quadratic operations were the dominant ones, as the impact of reducing the sequence length would be even higher. We will seek to further clarify this in the paper. **DINO:** While contrastive and distillation-based methods are not exactly the same, they both learn through view invariance (seeking to represent different views by the same embedding). To include DINO and SimCLR results, we would slightly modify the abstract and introduction to be slightly more general (saying "We focus our evaluation efforts on view-invariance pretraining methods including contrastive learning algorithms like MoCo and SimCLR and distillation-based methods like DINO."). Please let us know if you think this would still not be appropriate.

Authorsrebuttal2024-08-13

Final comment

Dear reviewer, please read our final message to all reviewers. We truly appreciate your efforts in reviewing our paper. We hope you consider upgrading the final score to reflect the significant improvements made to the paper during the review cycle (many of them as a result of your valuable suggestions).

Authorsrebuttal2024-08-10

Discussion

Dear Reviewer, Thank you for your thoughtful review and the time you’ve invested in evaluating our work. We have carefully addressed the points you raised in our rebuttal, and we would greatly appreciate the opportunity to clarify or discuss any remaining questions or concerns you may have. Thank you once again for your valuable feedback.

Reviewer geFN2024-08-12

Response to authors

I thank the authors for their detailed response, and apologise for the delay in mine. I appreciate the additional experiments performed using SimCLR and DINO and think these offer valuable extra signal in the evaluation. On the other hand, I was similar to reviewer GyCT confused by the wording of "dynamic acceleration schedule" and thought that this meant it was optimised online. I see now that it is predefined and fixed. Overall, I still see the scope and contribution as the main limitation of this paper, and that this limits its impact. Thank you for the high quality responses overall. Having read all reviews and responses, I am happy to stand by my original score of weak accept.

Authorsrebuttal2024-08-10

Discussion

Dear Reviewer, Thank you for your thoughtful review and the time you’ve invested in evaluating our work. We have carefully addressed the points you raised in our rebuttal, and we would greatly appreciate the opportunity to clarify or discuss any remaining questions or concerns you may have. Thank you once again for your valuable feedback.

Authorsrebuttal2024-08-10

Discussion

Dear Reviewer, Thank you for your thoughtful review and the time you’ve invested in evaluating our work. We have carefully addressed the points you raised in our rebuttal, and we would greatly appreciate the opportunity to clarify or discuss any remaining questions or concerns you may have. Thank you once again for your valuable feedback.

Authorsrebuttal2024-08-13

Final comment

Please read our final message to all reviewers. We truly appreciate your efforts in reviewing our paper. We hope you consider upgrading the final score to reflect the significant improvements made to the paper during the review cycle, and hopefully a renewed understanding of the intended contributions of our work.

Authorsrebuttal2024-08-13

Post-rebuttal appeal

We thank again all reviewers for the thoughtful comments, and for helping us improve our paper. As a result of this review process, we have **further validated the proposed acceleration framework with two other self-supervised methods** (DINO and SimCLR) and strengthened each comparison by conducting **finetuning experiments**. We will also revise the paper to clarify our contributions, as we’ve detailed before. Overall, our paper proposes a pretraining acceleration method that is shown to **significantly speed up the convergence of a variety of self-supervised methods**, including constrastive frameworks (MoCo, SimCLR), and distillation-based frameworks (DINO) **demonstrating its broad usability**. Given the generality of the proposed method (as acknowledged by several reviewers), we believe it also has the potential to accelerate pre-training frameworks beyond those investigated in the paper. Finally, given the compute-intensive nature of model pre-training and its implications on reproducibility, energy costs, and carbon footprints, we believe that **further research on accelerated training is essential for advancing sustainable AI practices. Our paper aims to inspire continued exploration in this area**, promoting the development of more efficient training methodologies that can 1) reduce the environmental impact of machine learning and 2) improve accessibility for researchers with limited resources. In light of these considerations and the significant improvements made to the paper during the review cycle, we ask all reviewers to reassess their final scores. Best regards, The authors

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC