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.


翻译:大型语言模型(LLMs)通过上下文学习展现出强大的少样本泛化能力,但其在动态随机环境中的推理机制仍不透明。先前研究主要聚焦于静态任务,忽视了当信念需要持续更新时所必需的在线适应能力——这是LLMs作为世界模型或智能体运作的关键能力。我们引入贝叶斯滤波框架来评估LLMs的在线推理性能。我们的概率探测套件涵盖多元离散分布(如骰子投掷)和连续分布(如高斯过程),其中真实参数随时间动态变化。研究发现,虽然LLM的信念更新近似于贝叶斯后验,但更精确的描述是具有模型特定折扣因子(小于1)的指数遗忘滤波器。这揭示了LLMs系统性地对旧证据进行折扣处理的现象,且该现象在不同模型架构间存在显著差异。尽管模型固有先验常存在校准偏差,但其更新机制本身仍保持结构化和原则性。我们进一步在模拟智能体任务中验证了这些发现,并提出了能以最小计算成本有效重新校准先验的提示策略。

0
下载
关闭预览

相关内容

【CVPR2024】ViewDiff: 3D一致的图像生成与文本到图像模型
专知会员服务
30+阅读 · 2024年3月10日
【NeurIPS2023】大型语言模型是视觉推理协调器
专知会员服务
30+阅读 · 2023年10月24日
《用于代码弱点识别的 LLVM 中间表示》CMU
专知会员服务
14+阅读 · 2022年12月12日
AAAI 2022 | ProtGNN:自解释图神经网络
专知
10+阅读 · 2022年2月28日
图机器学习 2.2-2.4 Properties of Networks, Random Graph
图与推荐
10+阅读 · 2020年3月28日
【NeurIPS2019】图变换网络:Graph Transformer Network
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员