足够多的抛硬币实验能让 LLMs 表现得像贝叶斯模型
Enough Coin Flips Can Make LLMs Act Bayesian
AI总结:
研究通过抛偏心硬币实验发现,LLMs 在 ICL 中大体遵循贝叶斯后验更新,偏差主要源于先验校准不当而非更新缺陷,且充足演示能使其以贝叶斯方式更新先验。
摘要:
大型语言模型(LLMs)在输入提示中给定 few-shot 示例时展现出泛化能力,这种涌现能力被称为 in-context learning (ICL)。我们研究 LLMs 是否利用 ICL 执行与贝叶斯框架一致的结构化推理,还是依赖模式匹配。在抛偏心硬币的受控实验中,我们发现:(1) LLMs 通常具有有偏先验,导致在 zero-shot 设置下出现初始分歧;(2) 上下文证据的影响大于显式偏差指令;(3) LLMs 大体上遵循贝叶斯后验更新,偏差主要源于先验校准不当而非更新机制缺陷;(4) 注意力大小对贝叶斯推断的影响微乎其微。通过 ICL 提供充足的抛偏心硬币演示后,LLMs 会以贝叶斯方式更新其先验。
英文摘要:
Large language models (LLMs) exhibit the ability to generalize given few-shot examples in their input prompt, an emergent capability known as in-context learning (ICL). We investigate whether LLMs use ICL to perform structured reasoning in ways that are consistent with a Bayesian framework or rely on pattern matching. Using a controlled setting of biased coin flips, we find that: (1) LLMs often possess biased priors, causing initial divergence in zero-shot settings, (2) in-context evidence outweighs explicit bias instructions, (3) LLMs broadly follow Bayesian posterior updates, with deviations primarily due to miscalibrated priors rather than flawed updates, and (4) attention magnitude has negligible effect on Bayesian inference. With sufficient demonstrations of biased coin flips via ICL, LLMs update their priors in a Bayesian manner.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。