首次揭示视觉Transformer在过拟合下的良性泛化机制
Unveil Benign Overfitting for Transformer in Vision: Training Dynamics, Convergence, and Generalization
- 构建含自注意力与全连接层的Transformer模型,分析梯度下降训练过程
- 发现数据信噪比决定泛化性能:高信噪比时测试误差小,低信噪比时测试误差大
- 理论首次完整刻画Transformer良性过拟合,适合研究泛化理论的学者
Transformer在大型基础模型发展中展现出强大能力,尤其是视觉Transformer(ViT)在视觉领域带来革命性变化,并在实验中取得显著成果。然而,其在过拟合训练数据时的理论泛化能力仍不明确。本文从良性过拟合视角深入研究视觉Transformer的特性。我们分析了一个由带有softmax的自注意力层和全连接层组成的Transformer,在特定数据分布模型下通过梯度下降进行优化的过程。针对softmax带来的挑战及多权重间的相互依赖问题,发展了新的技术手段,成功刻画了训练动态并实现了训练后的泛化。结果确立了一个精确条件,可区分小测试误差阶段与大测试误差区域,该条件基于数据模型中的信噪比。理论结论通过实验仿真得到验证。据我们所知,这是首个对Transformer实现良性过拟合的完整理论刻画。
原文摘要 · Abstract (English)
Transformers have demonstrated great power in the recent development of large foundational models. In particular, the Vision Transformer (ViT) has brought revolutionary changes to the field of vision, achieving significant accomplishments on the experimental side. However, their theoretical capabilities, particularly in terms of generalization when trained to overfit training data, are still not fully understood. To address this gap, this work delves deeply into the benign overfitting perspective of transformers in vision. To this end, we study the optimization of a Transformer composed of a self-attention layer with softmax followed by a fully connected layer under gradient descent on a certain data distribution model. By developing techniques that address the challenges posed by softmax and the interdependent nature of multiple weights in transformer optimization, we successfully characterized the training dynamics and achieved generalization in post-training. Our results establish a sharp condition that can distinguish between the small test error phase and the large test error regime, based on the signal-to-noise ratio in the data model. The theoretical results are further verified by experimental simulation. To the best of our knowledge, this is the first work to characterize benign overfitting for Transformers.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。