From Prompts to Posteriors: Can LLM Agents Perform Bayesian Inference in Context?

📄 arXiv: 2610.29331v1 📥 PDF

作者: Linus Filbry, Luckeciano C. Melo, Yarin Gal

分类: cs.AI

发布日期: 2026-10-21

备注: 10 pages, 6 figures in main text


💡 一句话要点

评估大型语言模型在上下文中进行贝叶斯推断的能力

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大型语言模型 贝叶斯推断 科学发现 信念更新 推理能力 评估框架

📋 核心要点

  1. 现有研究假设大型语言模型无法进行有效的贝叶斯信念更新,依赖于简化和启发式方法,限制了其在科学发现中的应用。
  2. 本文提出了一种原则性评估框架,分析LLMs的贝叶斯推理能力,包括定性和定量的评估方法。
  3. 实验结果表明,尽管LLMs在信念更新中通常违反贝叶斯法则,但在具备现代推理和代码执行能力时,其性能显著提升。

📝 摘要(中文)

大型语言模型(LLMs)在科学发现过程中被广泛应用,从文献综合到假设生成,再到实验设计。这些任务的统一原则是随着证据的积累不断更新信念,而贝叶斯推断提供了自然的框架。然而,现有研究假设LLMs无法在上下文中进行原则性的贝叶斯信念更新,依赖简化和启发式方法。为挑战这一假设,本文提出了对LLMs贝叶斯推理能力的原则性评估,分析模型的内部一致性及其恢复外部确定后验的能力。研究发现,LLMs在上下文中更新信念时通常违反贝叶斯法则,但当具备现代推理能力和代码执行能力时,其性能显著提升,能够接近解析上不可处理的后验。我们的评估表明,当前具备适当工具的LLMs已经可以用于科学发现中的复杂信念更新,快速提升AI驱动的科学发现的效率和规模。

🔬 方法详解

问题定义:本文旨在评估大型语言模型在上下文中进行贝叶斯推断的能力,现有方法未能充分利用LLMs的潜力,导致信念更新不准确。

核心思路:通过建立一个评估框架,结合定性和定量分析,探讨LLMs在贝叶斯推理中的一致性和能力,挑战传统假设。

技术框架:评估框架包括多个模块,首先是定性案例分析以探讨概率一致性,其次是定量基准测试以评估贝叶斯推理能力,最后分析非贝叶斯更新对下游任务性能的影响。

关键创新:本文的主要创新在于系统性地评估LLMs的贝叶斯推理能力,揭示了其在复杂信念更新中的潜力,尤其是在具备现代推理和代码执行能力时的表现。

关键设计:在评估过程中,采用了多种定量指标来衡量模型的推理能力,并设计了特定的实验场景以测试模型在不同条件下的表现。具体参数设置和损失函数的选择也经过精心设计,以确保评估的有效性。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,尽管LLMs在信念更新中通常违反贝叶斯法则,但在具备现代推理和代码执行能力时,其性能显著提升,能够接近解析上不可处理的后验。这一发现为LLMs在科学发现中的应用提供了新的可能性。

🎯 应用场景

该研究的潜在应用领域包括科学研究、数据分析和决策支持系统。通过提升LLMs在贝叶斯推理中的能力,可以加速科学发现的过程,推动AI在各个领域的应用,特别是在需要快速更新信念的动态环境中。

📄 摘要(原文)

Large language models (LLMs) are increasingly applied across the scientific discovery pipeline, from synthesizing literature to generating hypotheses to informing experimental design. A unifying principle behind these tasks is the need to continuously update beliefs as evidence accumulates, for which Bayesian inference provides a natural framework. However, existing work assumes that LLMs cannot carry out principled Bayesian belief updating in context, instead relying on simplifications and heuristics. To challenge this assumption, we present a principled evaluation of Bayesian reasoning capabilities in LLMs, analyzing both the model's internal consistency as well as its ability to recover an externally determined posterior. Specifically, we build an evaluation framework spanning qualitative epistemological examples to probe probabilistic coherence, quantitative benchmarks of Bayesian inference capabilities, and analyses of the impact of non-Bayesian updates on downstream task performance. Across different scenarios, we find that LLMs generally violate Bayes' rule when updating their beliefs in context. However, when equipped with modern reasoning abilities and code execution capabilities, their performance drastically improves, enabling even the close approximation of analytically intractable posteriors. Our evaluation shows that current LLMs with access to appropriate tools could already be used to make complex belief updates in scientific discovery, enabling rapid acceleration of the efficiency and scale of AI-powered scientific discovery.