arXiv:2505.20561cs.LGcs.AI2025-05被引 9

用贝叶斯强化学习让大模型学会主动反思,提升推理效率。

Beyond Markovian: Reflective Exploration via Bayes-Adaptive RL for LLM Reasoning

  • 将强化学习建模为贝叶斯框架,让模型根据信念更新主动获取信息。
  • 在数学与合成任务上,测试时表现优于传统RL,token使用更少。
  • 适合研究大模型自我反思机制或提升推理效率的开发者。

通过强化学习训练的大语言模型展现出强大的推理能力及涌现的反思行为,如重新思考与错误修正,这被视为一种上下文中的探索。然而,传统强化学习获得的马尔可夫策略仅依赖当前状态,无法激励对相同状态添加额外上下文,因而缺乏反思探索的动力。探索仅在训练阶段有用,无法在推理时产生持续改进。为此,本文将反思探索置于贝叶斯强化学习框架中,优化由训练数据诱导的马尔可夫决策过程后验分布下的期望回报。该框架生成适应不确定性的策略,通过信念更新自然激励信息收集动作,诱发自我反思行为。我们提出的算法BARL指导模型根据观察结果切换与拼接策略,提供何时何地反思的明确准则。在合成与数学推理任务上的实验表明,BARL优于传统强化学习方法,在测试阶段表现更优且更具词元效率。代码已开源。

原文摘要 · Abstract (English)

Large Language Models (LLMs) trained via Reinforcement Learning (RL) have exhibited strong reasoning capabilities and emergent reflective behaviors, such as rethinking and error correction, as a form of in-context exploration. However, the Markovian policy obtained from conventional RL training does not give rise to reflective exploration behaviors since the policy depends on the history only through the state and therefore has no incentive to enrich identical states with additional context. Instead, RL exploration is only useful during training to learn the optimal policy in a trial-and-error manner. Therefore, it remains unclear whether reflective reasoning will emerge during RL, or why it is beneficial. To remedy this, we recast reflective exploration within a Bayesian RL framework, which optimizes the expected return under a posterior distribution over Markov decision processes induced by the training data. This Bayesian formulation admits uncertainty-adaptive policies that, through belief updates, naturally incentivize information-gathering actions and induce self-reflection behaviors. Our resulting algorithm, BARL, instructs the LLM to stitch and switch strategies based on the observed outcomes, offering principled guidance on when and how the model should reflectively explore. Empirical results on both synthetic and mathematical reasoning tasks demonstrate that BARL outperforms conventional RL approaches, achieving superior test-time performance and token efficiency. Our code is available at https://github.com/shenao-zhang/BARL.

大模型推理贝叶斯RL自我反思强化学习

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。