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

大型语言模型中的上下文函数学习

In-Context Function Learning in Large Language Models

Helmholtz Munich(海德堡-慕尼黑亥姆霍兹研究中心);University of Tübingen(图宾根大学);University of Technology Nuremberg(纽伦堡技术大学)

Elif Akata, Konstantinos Voudouris, Vincent Fortuin, Eric Schulz

AI总结:

本研究通过高斯过程视角分析大型语言模型的上下文学习机制,发现其学习曲线受函数生成核影响,并通过训练后处理可调整归纳偏置以提升样本效率。

摘要:

大型语言模型(LLMs)可以在推理时通过少量示例学习。我们通过高斯过程(GPs)的视角研究这种上下文学习现象。我们构建了受控实验,其中模型观察到从已知GP先验中抽取的多变量标量值函数样本序列。我们评估预测误差与示例数量的关系,并将其与两个原理性参考进行比较:(i)一个经验性GP回归学习者,其提供可实现误差的下限;(ii)1近邻(1-NN)规则的预期误差,其提供数据驱动的上限。在不同模型规模下,我们发现LLM的学习曲线强烈受到函数生成核的影响,并随着示例数量的增加接近GP下限。我们随后通过基于似然的分析研究这些模型的归纳偏置。我们发现LLM的预测在较不平滑的GP核下更可能正确。最后,我们探讨是否可以通过训练后处理改变这些归纳偏置并提高在从平滑GP核采样函数上的样本效率。我们发现,强化学习和监督微调都能有效改变归纳偏置,使其朝着训练数据方向发展。共同,我们的框架量化了LLMs在多变量函数学习任务中像GP学习者程度,并提供了调整其归纳偏置的工具。

英文摘要:

Large language models (LLMs) can learn from a few demonstrations provided at inference time. We study this in-context learning phenomenon through the lens of Gaussian Processes (GPs). We build controlled experiments where models observe sequences of multivariate scalar-valued function samples drawn from known GP priors. We evaluate prediction error in relation to the number of demonstrations and compare against two principled references: (i) an empirical GP-regression learner that gives a lower bound on achievable error, and (ii) the expected error of a 1-nearest-neighbor (1-NN) rule, which gives a data-driven upper bound. Across model sizes, we find that LLM learning curves are strongly influenced by the function-generating kernels and approach the GP lower bound as the number of demonstrations increases. We then study the inductive biases of these models using a likelihood-based analysis. We find that LLM predictions are most likely under less smooth GP kernels. Finally, we explore whether post-training can shift these inductive biases and improve sample-efficiency on functions sampled from GPs with smoother kernels. We find that both reinforcement learning and supervised fine-tuning can effectively shift inductive biases in the direction of the training data. Together, our framework quantifies the extent to which LLMs behave like GP learners and provides tools for steering their inductive biases for continuous function learning tasks.

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

↑