arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.11778cs.LGcs.ITmath.ITstat.ML
收藏

关于Transformer在Gaussian mixtures上下文分类中的训练收敛性

On the Training Convergence of Transformers for In-Context Classification of Gaussian Mixtures

University of Virginia(弗吉尼亚大学)

Wei Shen, Ruida Zhou, Jing Yang, Cong Shen

AI总结:

本文从理论上研究了transformer在上下文分类任务中的训练动态,证明通过梯度下降训练的单层transformer在Gaussian mixtures分类中以线性速率收敛到全局最优模型,并量化了提示长度对ICL推理误差的影响。

摘要:

尽管transformer在实践中已展现出令人印象深刻的上下文学习(ICL)能力,但对允许transformer执行ICL的底层机制的理论理解仍处于起步阶段。本工作旨在从理论上研究transformer在上下文分类任务中的训练动态。我们证明,在某些假设下,对于Gaussian mixtures的上下文分类,通过梯度下降训练的单层transformer以线性速率收敛到全局最优模型。我们进一步量化了训练和测试提示长度对已训练transformer的ICL推理误差的影响。我们表明,当训练和测试提示的长度足够大时,已训练transformer的预测接近标签的真实分布。实验结果证实了这些理论发现。

英文摘要:

Although transformers have demonstrated impressive capabilities for in-context learning (ICL) in practice, theoretical understanding of the underlying mechanism that allows transformers to perform ICL is still in its infancy. This work aims to theoretically study the training dynamics of transformers for in-context classification tasks. We demonstrate that, for in-context classification of Gaussian mixtures under certain assumptions, a single-layer transformer trained via gradient descent converges to a globally optimal model at a linear rate. We further quantify the impact of the training and testing prompt lengths on the ICL inference error of the trained transformer. We show that when the lengths of training and testing prompts are sufficiently large, the prediction of the trained transformer approaches the ground truth distribution of the labels. Experimental results corroborate the theoretical findings.

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

↑