通过动态压缩序列长度,大幅加速视觉Transformer的自监督预训练。
Accelerating Augmentation Invariance Pretraining
- 用随机丢弃令牌和灵活分块缩放降低梯度计算开销。
- 在ImageNet上实现4倍(MoCo)、3.3倍(SimCLR)加速,性能不降。
- 自动调整压缩比例,适合大规模视觉模型高效训练。
本工作针对对比学习方法在视觉Transformer(ViT)预训练中的计算挑战。尽管对比学习效果优异,但训练所需的大量计算资源常限制其实际应用。我们提出一种加速框架,利用ViT对不同序列长度输入的泛化能力。通过组合随机令牌丢弃与灵活分块缩放等序列压缩策略,降低梯度估计成本并加速收敛。我们深入分析了不同加速策略的梯度估计误差及其对下游任务的影响,揭示加速与性能间的权衡。此外,提出一种新流程,根据训练进度动态调整序列压缩比,确保高效训练且不牺牲下游性能。该方法在多个自监督学习算法和大规模数据集上显著降低计算开销。在ImageNet上,相比基准方法,我们的方法实现了MoCo 4×、SimCLR 3.3×、DINO 2.5× 的加速比,展现显著效率提升。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。