arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.17024cs.CLcs.LGstat.ML
收藏

迈向自回归下一个词元预测:上下文学习源于泛化

Towards Auto-Regressive Next-Token Prediction: In-Context Learning Emerges from Generalization

Zixuan Gong, Xiaolin Hu, Huayi Tang, Yong Liu

AI总结:

本文采用自回归下一个词元预测范式,通过形式化预训练与上下文学习框架,提出依赖数据、主题和优化的PAC-贝叶斯泛化界,证明上下文学习源于序列和主题的泛化,并用实验验证。

摘要:

大型语言模型(LLMs)已展现出显著的上下文学习(ICL)能力。然而,现有关于ICL的理论分析主要存在两个局限性:(a)有限的独立同分布(i.i.d.)设定。大多数研究集中于监督函数学习任务,其中提示由i.i.d.的输入-标签对构建。这种i.i.d.假设与真实语言学习场景显著不同,在真实场景中提示词元是相互依赖的。(b)缺乏涌现性解释。大多数文献从隐式优化的角度回答ICL做什么,但在阐明ICL如何涌现以及预训练阶段对ICL的影响方面有所不足。在本文中,为扩展(a),我们采用了一种更实际的范式——自回归下一个词元预测(AR-NTP),这与语言模型的实际训练紧密对齐。具体而言,在AR-NTP中,我们强调提示词元依赖性,即基于前面的序列预测每个后续词元。为解决(b),我们形式化了一个系统的预训练和ICL框架,突出序列和主题的层级结构,以及两级期望。最后,我们为预训练LLMs提出了依赖于数据、依赖于主题和依赖于优化的PAC-贝叶斯泛化界,研究得出ICL源于序列和主题的泛化。我们的理论得到了数值线性动态系统、合成GINC和真实语言数据集上的实验支持。

英文摘要:

Large language models (LLMs) have demonstrated remarkable in-context learning (ICL) abilities. However, existing theoretical analysis of ICL primarily exhibits two limitations: (a) Limited i.i.d. Setting. Most studies focus on supervised function learning tasks where prompts are constructed with i.i.d. input-label pairs. This i.i.d. assumption diverges significantly from real language learning scenarios where prompt tokens are interdependent. (b) Lack of Emergence Explanation. Most literature answers what ICL does from an implicit optimization perspective but falls short in elucidating how ICL emerges and the impact of pre-training phase on ICL. In our paper, to extend (a), we adopt a more practical paradigm, auto-regressive next-token prediction (AR-NTP), which closely aligns with the actual training of language models. Specifically, within AR-NTP, we emphasize prompt token-dependency, which involves predicting each subsequent token based on the preceding sequence. To address (b), we formalize a systematic pre-training and ICL framework, highlighting the layer-wise structure of sequences and topics, alongside a two-level expectation. In conclusion, we present data-dependent, topic-dependent and optimization-dependent PAC-Bayesian generalization bounds for pre-trained LLMs, investigating that ICL emerges from the generalization of sequences and topics. Our theory is supported by experiments on numerical linear dynamic systems, synthetic GINC and real-world language datasets.

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

↑