arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2302.06015cs.LGcs.CVstat.ML
收藏

浅层视觉Transformer的理论理解:学习、泛化与样本复杂度

A Theoretical Understanding of Shallow Vision Transformers: Learning, Generalization, and Sample Complexity

Rensselaer Polytechnic Institute(伦斯勒理工学院);Michigan State University(密歇根州立大学);IBM Research(IBM研究院)

Hongkang Li, Meng Wang, Sijia Liu, Pin-yu Chen

AI总结:

本文首次从理论上分析了浅层视觉Transformer(自注意力加两层感知机)的分类学习,刻画了零泛化误差的样本复杂度,证明SGD训练产生稀疏注意力,并表明令牌稀疏化可提升测试性能。

摘要:

具有自注意力模块的视觉Transformer(ViTs)最近在许多视觉任务中取得了巨大的经验成功。然而,由于层间非凸交互,其理论学习和泛化分析大多难以捉摸。基于一个同时刻画标签相关和标签无关令牌的数据模型,本文首次对训练一个浅层ViT(即一个自注意力层后接一个两层感知机)用于分类任务进行了理论分析。我们刻画了实现零泛化误差所需的样本复杂度。我们的样本复杂度界与标签相关令牌比例倒数、令牌噪声水平以及初始模型误差正相关。我们还证明了使用随机梯度下降(SGD)的训练过程会导致稀疏注意力图,这是对注意力成功的一般直觉的正式验证。此外,本文表明,适当的令牌稀疏化可以通过移除标签无关和/或噪声令牌(包括虚假相关性)来提高测试性能。在合成数据和CIFAR-10数据集上的实证实验验证了我们的理论结果,并推广到更深的ViTs。

英文摘要:

Vision Transformers (ViTs) with self-attention modules have recently achieved great empirical success in many vision tasks. Due to non-convex interactions across layers, however, theoretical learning and generalization analysis is mostly elusive. Based on a data model characterizing both label-relevant and label-irrelevant tokens, this paper provides the first theoretical analysis of training a shallow ViT, i.e., one self-attention layer followed by a two-layer perceptron, for a classification task. We characterize the sample complexity to achieve a zero generalization error. Our sample complexity bound is positively correlated with the inverse of the fraction of label-relevant tokens, the token noise level, and the initial model error. We also prove that a training process using stochastic gradient descent (SGD) leads to a sparse attention map, which is a formal verification of the general intuition about the success of attention. Moreover, this paper indicates that a proper token sparsification can improve the test performance by removing label-irrelevant and/or noisy tokens, including spurious correlations. Empirical experiments on synthetic data and CIFAR-10 dataset justify our theoretical results and generalize to deeper ViTs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑