arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2310.08540cs.CLcs.AIcs.LG
收藏

预训练Transformer是通过梯度下降进行上下文学习的吗?

Do pretrained Transformers Learn In-Context by Gradient Descent?

Johns Hopkins University(约翰斯·霍普金斯大学)

Lingfeng Shen, Aayush Mishra, Daniel Khashabi

AI总结:

本研究质疑预训练Transformer的上下文学习(ICL)与梯度下降(GD)的等价性假设,通过LLaMa-7B实证分析发现两者在演示顺序敏感性、性能指标及输出分布上存在不一致,表明该等价性仍是开放假设。

摘要:

大型语言模型中上下文学习(ICL)的出现仍然是一个部分被理解的显著现象。为了解释ICL,最近的研究建立了与梯度下降(GD)的理论联系。我们提出疑问:这种联系在实际的预训练语言模型中是否成立?我们指出了先前工作中的限制性假设,这些假设使得它们的设置与语言模型训练的实际设置大相径庭。例如,它们的实验验证使用ICL目标(明确为ICL训练模型),这与实际场景中涌现的ICL不同。此外,这些研究中理论手工构建的权重具有与真实LLM不匹配的属性。我们还在真实模型中寻找证据。我们观察到,ICL和GD对观察演示的顺序有不同的敏感性。最后,我们在自然设置中探测并比较ICL与GD假设。我们对在自然数据上预训练的语言模型(LLaMa-7B)进行了全面的实证分析。我们对三个性能指标的比较突出了ICL和GD作为数据集、模型和演示数量等各种因素的函数的不一致行为。我们观察到ICL和GD以不同方式修改语言模型的输出分布。这些结果表明,ICL和GD之间的等价性仍然是一个开放的假设,并呼吁进一步的研究。

英文摘要:

The emergence of In-Context Learning (ICL) in LLMs remains a remarkable phenomenon that is partially understood. To explain ICL, recent studies have created theoretical connections to Gradient Descent (GD). We ask, do such connections hold up in actual pre-trained language models? We highlight the limiting assumptions in prior works that make their setup considerably different from the practical setup in which language models are trained. For example, their experimental verification uses \emph{ICL objective} (training models explicitly for ICL), which differs from the emergent ICL in the wild. Furthermore, the theoretical hand-constructed weights used in these studies have properties that don't match those of real LLMs. We also look for evidence in real models. We observe that ICL and GD have different sensitivity to the order in which they observe demonstrations. Finally, we probe and compare the ICL vs. GD hypothesis in a natural setting. We conduct comprehensive empirical analyses on language models pre-trained on natural data (LLaMa-7B). Our comparisons of three performance metrics highlight the inconsistent behavior of ICL and GD as a function of various factors such as datasets, models, and the number of demonstrations. We observe that ICL and GD modify the output distribution of language models differently. These results indicate that \emph{the equivalence between ICL and GD remains an open hypothesis} and calls for further studies.

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

↑