arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.11639cs.LGcs.AIcs.CL
收藏

基于Transformer的上下文学习:Softmax注意力自适应函数Lipschitz性

In-Context Learning with Transformers: Softmax Attention Adapts to Function Lipschitzness

The University of Texas at Austin(德克萨斯大学奥斯汀分校)

Liam Collins, Advait Parulekar, Aryan Mokhtari, Sujay Sanghavi, Sanjay Shakkottai

AI总结:

本研究探讨Transformer中softmax注意力在上下文学习中的作用,发现其能自适应回归任务,通过调整窗口实现最近邻预测,并依赖softmax激活,无法被线性激活替代。

摘要:

Transformer的一个显著特性是其执行上下文学习(ICL)的能力,这是一种机器学习框架,其中学习者在推理过程中通过某些数据隐式地接触到新的上下文,并被要求在该上下文中进行预测。因此,该学习者必须在不进行额外训练的情况下适应上下文。我们探讨了在ICL设置中softmax注意力的作用,其中每个上下文编码一个回归任务。我们证明,注意力单元学习一个窗口,并利用该窗口实现一个适应预训练任务景观的最近邻预测器。具体来说,我们证明该窗口随着预训练任务Lipschitz性的降低和标签噪声的增加而变宽。我们还表明,在低秩线性问题上,注意力单元学会在推理前投影到适当的子空间。此外,我们证明这种自适应性关键依赖于softmax激活,因此无法通过先前理论分析中常研究的线性激活来复制。

英文摘要:

A striking property of transformers is their ability to perform in-context learning (ICL), a machine learning framework in which the learner is presented with a novel context during inference implicitly through some data, and tasked with making a prediction in that context. As such, that learner must adapt to the context without additional training. We explore the role of softmax attention in an ICL setting where each context encodes a regression task. We show that an attention unit learns a window that it uses to implement a nearest-neighbors predictor adapted to the landscape of the pretraining tasks. Specifically, we show that this window widens with decreasing Lipschitzness and increasing label noise in the pretraining tasks. We also show that on low-rank, linear problems, the attention unit learns to project onto the appropriate subspace before inference. Further, we show that this adaptivity relies crucially on the softmax activation and thus cannot be replicated by the linear activation often studied in prior theoretical analyses.

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

↑