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

大型语言模型是潜变量模型:解释上下文学习并为其寻找好的示例

Large Language Models Are Latent Variable Models: Explaining and Finding Good Demonstrations for In-Context Learning

University of California, Santa Barbara(加利福尼亚大学圣巴巴拉分校);University of California, Irvine(加利福尼亚大学欧文分校)

Xinyi Wang, Wanrong Zhu, Michael Saxon, Mark Steyvers, William Yang Wang

AI总结:

本研究通过贝叶斯视角将大型语言模型视为潜变量模型,解释上下文学习机制,并提出一种利用小型LM选择最优少样本示例并泛化至更大模型的算法,在多数据集上显著提升性能。

摘要:

近年来,预训练大型语言模型(LLMs)在实现被称为上下文学习的推理时少样本学习能力方面展现了显著效率。然而,现有文献强调了这种能力对少样本示例选择的敏感性。当前对于这种能力如何从常规语言模型预训练目标中产生的潜在机制的理解,仍与现实世界的LLMs脱节。本研究旨在通过贝叶斯视角考察上下文学习现象,将现实世界的LLMs视为潜变量模型。在此前提下,我们提出一种算法,使用小型LM从一组标注数据中选择最优示例,然后将所选示例直接泛化到更大的LLMs。我们在八个真实世界文本分类数据集上对八个GPT模型平均而言,展示了对基线的显著改进。我们还在数学应用题数据集GSM8K上展示了我们算法的现实有效性。我们的实证发现支持了我们的假设,即LLMs隐式推断包含任务信息的潜变量。

英文摘要:

In recent years, pre-trained large language models (LLMs) have demonstrated remarkable efficiency in achieving an inference-time few-shot learning capability known as in-context learning. However, existing literature has highlighted the sensitivity of this capability to the selection of few-shot demonstrations. Current understandings of the underlying mechanisms by which this capability arises from regular language model pretraining objectives remain disconnected from the real-world LLMs. This study aims to examine the in-context learning phenomenon through a Bayesian lens, viewing real-world LLMs as latent variable models. On this premise, we propose an algorithm to select optimal demonstrations from a set of annotated data with a small LM, and then directly generalize the selected demonstrations to larger LMs. We demonstrate significant improvement over baselines, averaged over eight GPT models on eight real-world text classification datasets. We also demonstrate the real-world usefulness of our algorithm on GSM8K, a math word problem dataset. Our empirical findings support our hypothesis that LLMs implicitly infer a latent variable containing task information.

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

↑