LLM推理像带折扣的贝叶斯更新,旧证据被逐渐遗忘。
Large Language Models as Discounted Bayesian Filters
- 将LLM视为带折扣因子的贝叶斯滤波器,动态更新信念。
- 发现不同模型对旧证据的遗忘速率差异大,折扣因子均小于1。
- 提出轻量提示法可有效校准先验,适合构建在线智能体。
大型语言模型(LLMs)通过上下文学习展现出强大的少样本泛化能力,但在动态随机环境中的推理过程仍不清晰。以往研究多关注静态任务,忽视了信念需持续更新的在线适应需求,而这正是LLM作为世界模型或智能体的关键能力。本文引入贝叶斯滤波框架,评估LLM的在线推断能力。我们的概率探测套件涵盖多元离散分布(如骰子投掷)和连续分布(如高斯过程),其中真实参数随时间变化。结果表明,尽管LLM的信念更新类似贝叶斯后验,但更准确地描述为具有模型特异性折扣因子(小于1)的指数遗忘滤波器。这揭示了系统性地弱化旧证据的现象,且该现象在不同模型架构间显著不同。虽然内在先验常存在校准偏差,但其更新机制本身仍具结构性与原则性。我们在模拟智能体任务中验证了这些发现,并提出了仅需少量计算成本的提示策略,以有效重校准先验。
原文摘要 · Abstract (English)
Large Language Models (LLMs) demonstrate strong few-shot generalization through in-context learning, yet their reasoning in dynamic and stochastic environments remains opaque. Prior studies mainly focus on static tasks and overlook the online adaptation required when beliefs must be continuously updated, which is a key capability for LLMs acting as world models or agents. We introduce a Bayesian filtering framework to evaluate online inference in LLMs. Our probabilistic probe suite spans both multivariate discrete distributions, such as dice rolls, and continuous distributions, such as Gaussian processes, where ground-truth parameters shift over time. We find that while LLM belief updates resemble Bayesian posteriors, they are more accurately characterized by an exponential forgetting filter with a model-specific discount factor smaller than one. This reveals systematic discounting of older evidence that varies significantly across model architectures. Although inherent priors are often miscalibrated, the updating mechanism itself remains structured and principled. We further validate these findings in a simulated agent task and propose prompting strategies that effectively recalibrate priors with minimal computational cost.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。