arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.06100cs.LGcs.CLcs.ITmath.IT
收藏

过滤胜过微调:一种贝叶斯卡尔曼视角下的大语言模型上下文学习

Filtering Beats Fine Tuning: A Bayesian Kalman View of In Context Learning in LLMs

UC Berkeley School of Information(伯克利大学信息学院)

Andrew Kiruluta

AI总结:

本文提出了一种基于贝叶斯卡尔曼滤波的理论框架,将大语言模型的上下文学习解释为在线状态估计,揭示了推理时学习的协方差塌陷机制,并提供了稳定性及样本效率的理论保证。

摘要:

我们提出一个以理论为导向的框架,将大语言模型(LLMs)在推理时的适应过程解释为在线贝叶斯状态估计。不同于将快速适应视为隐式优化或元学习,我们将任务和上下文特定的学习解释为由线性化状态空间模型所支配的低维潜在适应状态的连续推断。在高斯假设下,适应遵循卡尔曼递归,具有后验均值和协方差的闭式更新。这种视角将先验不确定性提升为一个显式的动态变量。我们证明推理时的学习由协方差塌陷驱动,即由信息性标记引起的后验不确定性快速收缩,这通常在后验均值收敛之前发生。通过在令牌级雅可比矩阵上的可观测性条件,我们建立了贝叶斯滤波器的稳定性,证明了指数协方差收缩率,并推导了均方误差界限。梯度下降、自然梯度方法和元学习更新作为过滤动态的奇异、无噪声极限出现,将基于梯度的适应定位为贝叶斯推断的退化近似。所得到的理论提供了对上下文学习、参数高效适应和测试时学习(无参数更新)的统一概率解释。它提供了稳定性及样本效率的显式保证,通过信息累积提供了提示信息性的原则性解释,并澄清了现有账户中缺失的不确定性动态作用。最小的示例实验验证了该理论的定性预测。

英文摘要:

We present a theory-first framework that interprets inference-time adaptation in large language models (LLMs) as online Bayesian state estimation. Rather than modeling rapid adaptation as implicit optimization or meta-learning, we formulate task- and context-specific learning as the sequential inference of a low-dimensional latent adaptation state governed by a linearized state-space model. Under Gaussian assumptions, adaptation follows a Kalman recursion with closed-form updates for both the posterior mean and covariance. This perspective elevates epistemic uncertainty to an explicit dynamical variable. We show that inference-time learning is driven by covariance collapse, i.e., rapid contraction of posterior uncertainty induced by informative tokens, which typically precedes convergence of the posterior mean. Using observability conditions on token-level Jacobians, we establish stability of the Bayesian filter, prove exponential covariance contraction rates, and derive mean-square error bounds. Gradient descent, natural-gradient methods, and meta-learning updates arise as singular, noise-free limits of the filtering dynamics, positioning optimization-based adaptation as a degenerate approximation of Bayesian inference. The resulting theory provides a unified probabilistic account of in-context learning, parameter-efficient adaptation, and test-time learning without parameter updates. It yields explicit guarantees on stability and sample efficiency, offers a principled interpretation of prompt informativeness via information accumulation, and clarifies the role of uncertainty dynamics absent from existing accounts. Minimal illustrative experiments corroborate the qualitative predictions of the theory.

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

↑