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

为什么更大的语言模型在上下文学习中表现不同?

Why Larger Language Models Do In-context Learning Differently?

University of Wisconsin-Madison(威斯康星大学麦迪逊分校);The University of Hong Kong(香港大学)

Zhenmei Shi, Junyi Wei, Zhuoyan Xu, Yingyu Liang

AI总结:

本研究从理论角度分析了不同规模语言模型在上下文学习中表现差异的原因,发现较大模型因覆盖更多隐藏特征而对噪声更敏感,较小模型则更鲁棒。

摘要:

大型语言模型(LLM)已成为人工智能的强大工具,其关键能力在于上下文学习(ICL),即无需调整模型参数,仅凭少量任务示例便能在未见任务上表现良好。近期一个有趣且神秘的现象是,不同规模的模型可能表现出不同的 ICL 行为:更大的模型对测试上下文中的噪声更为敏感。本研究从理论角度分析这一现象,以增进对 LLM 和 ICL 的理解。我们考察了两种典型设定:(1)使用单层单头线性 Transformer 进行线性回归;(2)使用两层多头 Transformer 进行奇偶分类(非线性数据与非线性模型)。在两种设定下,我们给出了闭式最优解,并发现较小模型侧重于重要的隐藏特征,而较大模型覆盖更多隐藏特征;因此,较小模型对噪声更鲁棒,较大模型更易被干扰,从而导致不同的 ICL 行为。这揭示了 Transformer 的注意力分布及其对 ICL 的影响。在大型基础模型与聊天模型上的初步实验结果为我们的分析提供了积极支持。

英文摘要:

Large language models (LLM) have emerged as a powerful tool for AI, with the key ability of in-context learning (ICL), where they can perform well on unseen tasks based on a brief series of task examples without necessitating any adjustments to the model parameters. One recent interesting mysterious observation is that models of different scales may have different ICL behaviors: larger models tend to be more sensitive to noise in the test context. This work studies this observation theoretically aiming to improve the understanding of LLM and ICL. We analyze two stylized settings: (1) linear regression with one-layer single-head linear transformers and (2) parity classification with two-layer multiple attention heads transformers (non-linear data and non-linear model). In both settings, we give closed-form optimal solutions and find that smaller models emphasize important hidden features while larger ones cover more hidden features; thus, smaller models are more robust to noise while larger ones are more easily distracted, leading to different ICL behaviors. This sheds light on where transformers pay attention to and how that affects ICL. Preliminary experimental results on large base and chat models provide positive support for our analysis.

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

↑