EfficientTrain++: Generalized Curriculum Learning for Efficient Visual Backbone Training
作者: Yulin Wang, Yang Yue, Rui Lu, Yizeng Han, Shiji Song, Gao Huang
分类: cs.CV, cs.AI, cs.LG
发布日期: 2024-05-14
备注: Accepted by IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI). Journal version of arXiv:2211.09703 (ICCV 2023). Code is available at: https://github.com/LeapLabTHU/EfficientTrain
💡 一句话要点
EfficientTrain++:通过广义课程学习高效训练视觉骨干网络
🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture)
关键词: 课程学习 视觉骨干网络 高效训练 傅里叶变换 数据增强
📋 核心要点
- 现有视觉骨干网络训练计算成本高昂,限制了其应用和发展。
- 论文提出广义课程学习方法,通过软选择函数逐步揭示样本中更难的模式。
- EfficientTrain++在ImageNet上将训练时间减少1.5-3.0倍,且不损失精度,并在自监督学习中有效。
📝 摘要(中文)
现代视觉骨干网络的卓越性能通常伴随着昂贵的训练过程。本文通过将课程学习的思想推广到其原始公式之外,即使用由易到难的数据训练模型,来解决这个问题。具体来说,我们将训练课程重新定义为一个软选择函数,该函数在训练过程中逐步揭示每个样本中更难的模式,而不是执行由易到难的样本选择。我们的工作受到视觉骨干网络学习动态的一个有趣观察的启发:在训练的早期阶段,模型主要学习识别数据中一些“易于学习”的判别模式。当通过频率和空间域观察时,这些模式包含较低频率的分量,以及没有失真或数据增强的自然图像内容。受这些发现的启发,我们提出了一种课程,其中模型始终在每个学习阶段利用所有训练数据,但首先启动对每个样本的“易于学习”模式的暴露,随着训练的进行,逐渐引入更难的模式。为了以计算有效的方式实现这个想法,我们在输入的傅里叶频谱中引入了裁剪操作,使模型能够仅从较低频率的分量中学习。然后,我们表明,通过调节数据增强的强度,可以很容易地实现暴露自然图像的内容。最后,我们整合这些方面,并设计具有定制搜索算法的课程表。由此产生的方法EfficientTrain++简单、通用,但效果出奇地好。它在ImageNet-1K/22K上将各种流行模型的训练时间减少了1.5-3.0倍,而不会牺牲准确性。它还证明了在自监督学习(例如,MAE)中的有效性。
🔬 方法详解
问题定义:现有视觉骨干网络的训练过程计算成本高昂,耗时较长。传统的课程学习方法通常侧重于样本选择,即从简单样本到复杂样本的训练顺序,但这种方法可能忽略了每个样本内部的复杂性,并且可能导致训练效率低下。
核心思路:论文的核心思路是将课程学习推广到样本内部的模式学习。模型在训练初期主要学习数据中“易于学习”的判别模式,这些模式通常对应于低频成分和未经过度增强的自然图像内容。因此,通过控制模型对这些“易于学习”模式的暴露程度,可以有效地引导模型学习,并加速训练过程。
技术框架:EfficientTrain++ 的整体框架包括以下几个关键模块:1) 傅里叶频谱裁剪:通过在输入的傅里叶频谱中进行裁剪,使模型仅能学习低频成分,从而模拟“易于学习”的模式。2) 数据增强强度调制:通过调节数据增强的强度,控制模型对自然图像内容的暴露程度。3) 课程表搜索:使用定制的搜索算法,自动寻找最优的课程表,以平衡训练速度和模型性能。
关键创新:论文最重要的技术创新在于将课程学习从样本选择推广到样本内部模式的学习。与传统的课程学习方法不同,EfficientTrain++ 并非选择简单的样本,而是选择样本中“易于学习”的模式,从而更有效地引导模型学习。此外,通过傅里叶频谱裁剪和数据增强强度调制,可以有效地控制模型对这些模式的暴露程度。
关键设计:1) 傅里叶频谱裁剪:使用一个可调节的裁剪半径,控制模型可以访问的低频成分的范围。2) 数据增强强度调制:使用一个可调节的强度参数,控制数据增强的程度。3) 课程表搜索:使用贝叶斯优化等搜索算法,自动寻找最优的裁剪半径和数据增强强度随训练迭代次数变化的曲线。
🖼️ 关键图片
📊 实验亮点
EfficientTrain++ 在 ImageNet-1K 和 ImageNet-22K 数据集上,将多种流行视觉骨干网络(如 ResNet、ViT 等)的训练时间减少了 1.5-3.0 倍,同时保持了与原始训练方法相当甚至更高的精度。例如,在 ImageNet-1K 上,使用 EfficientTrain++ 训练的 ResNet-50 模型,在训练时间缩短 2 倍的情况下,Top-1 准确率与原始模型相当。
🎯 应用场景
EfficientTrain++ 可广泛应用于各种视觉任务,例如图像分类、目标检测、语义分割等。该方法可以显著降低训练成本,加速模型开发周期,并促进更大规模、更复杂模型的训练。此外,该方法在自监督学习中的有效性表明,其可以应用于无标签数据的预训练,从而提高模型在下游任务中的性能。
📄 摘要(原文)
The superior performance of modern visual backbones usually comes with a costly training procedure. We contribute to this issue by generalizing the idea of curriculum learning beyond its original formulation, i.e., training models using easier-to-harder data. Specifically, we reformulate the training curriculum as a soft-selection function, which uncovers progressively more difficult patterns within each example during training, instead of performing easier-to-harder sample selection. Our work is inspired by an intriguing observation on the learning dynamics of visual backbones: during the earlier stages of training, the model predominantly learns to recognize some 'easier-to-learn' discriminative patterns in the data. These patterns, when observed through frequency and spatial domains, incorporate lower-frequency components, and the natural image contents without distortion or data augmentation. Motivated by these findings, we propose a curriculum where the model always leverages all the training data at every learning stage, yet the exposure to the 'easier-to-learn' patterns of each example is initiated first, with harder patterns gradually introduced as training progresses. To implement this idea in a computationally efficient way, we introduce a cropping operation in the Fourier spectrum of the inputs, enabling the model to learn from only the lower-frequency components. Then we show that exposing the contents of natural images can be readily achieved by modulating the intensity of data augmentation. Finally, we integrate these aspects and design curriculum schedules with tailored search algorithms. The resulting method, EfficientTrain++, is simple, general, yet surprisingly effective. It reduces the training time of a wide variety of popular models by 1.5-3.0x on ImageNet-1K/22K without sacrificing accuracy. It also demonstrates efficacy in self-supervised learning (e.g., MAE).