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

Shenao Zhang, Yaqing Wang, Yinxiao Liu, Tianqi Liu, Peter Grabowski, Eugene Ie, Zhaoran Wang, Yunxuan Li · DOI

Large Language Models (LLMs) often exhibit "self-reflection" during Chain-of-Thought (CoT) reasoning, catching their own errors and pivoting to new strategies. While impressive, this behavior is poorly understood within the standard Reinforcement Learning (RL) paradigm. This paper introduces BARL (Bayes-Adaptive RL), a framework that formalizes reasoning as a Bayesian exploration problem, enabling models to actively explore and switch strategies at test time.

The Markovian Limitation

Standard RL algorithms like PPO or GRPO aim for a Markovian optimal policy, where the next action depends solely on the current state. This creates a paradox: if a model is truly optimal in a Markovian sense, it has no incentive to "reflect" or try a different path because it assumes its initial choice was already the best possible one. Furthermore, standard RL exploration is typically restricted to training; once deployed, the model's policy is frozen and non-adaptive.

The authors argue that reasoning is fundamentally an exploration problem under epistemic uncertainty. The model is uncertain about which reasoning path (or MDP) will lead to the correct answer. To solve complex problems, it must be "uncertainty-adaptive," gathering information as it thinks and switching strategies when its current path is invalidated.

The BARL Framework: Reasoning as Bayesian Exploration

BARL maximizes the Bayes-expected return over a posterior distribution of possible reasoning strategies. Instead of a single fixed path, the model maintains a "belief" over multiple candidate hypotheses (potential world-models or strategies).

Figure 2: A tree-based representation of reasoning paths where the agent explores, backtracks, and switches strategies (e.g., s0 to s1, then s2, then back to s1 and s3) based on internal feedback.

Key components of the BARL framework include:

  • Hypothesis Generation: The model generates a set of candidate answers representing potential strategies.
  • Belief Updating: As tokens are generated, the model maintains a probability distribution over these hypotheses.
  • Strategy Switching: If a reasoning step leads to a discrepancy between internal belief and feedback, the model downweights that hypothesis. This naturally triggers a strategy switch—the behavioral signature of reflection.
  • Policy Gradient: A practical policy gradient weights actions by their posterior probability, training the model to learn when and how to reflectively explore.

Experimental Evaluation

The researchers evaluated BARL across a variety of challenging reasoning tasks, including math benchmarks (GSM8K, MATH, AIME 2024) and a synthetic didactic task. The synthetic task required the agent to repeat a prompt token exactly three times, testing its ability to generalize to unseen tokens.

Figure 4: The synthetic task setup. Standard RL models trained on tokens 0 and 1 fail to generalize to token 2 during evaluation, whereas BARL learns a general strategy-switching behavior that succeeds on unseen tokens.

Key Results and Insights

  • Superior Accuracy and Efficiency: BARL consistently outperformed GRPO and strong progress-reward baselines. Most notably, it achieved these results with massive token efficiency: 1.63x fewer tokens than progress-reward baselines and over 10x fewer tokens than the base Qwen2.5-Math-1.5B model.
  • Reflection as Rational Exploration: Self-reflection is not just a stylistic quirk; it is the optimal behavior for an agent operating under epistemic uncertainty. BARL produces more effective thinking tokens that directly reduce uncertainty rather than just increasing token count.
  • Generalization: As shown in the synthetic task, BARL learns a general "strategy switching" capability that transfers to unseen scenarios, whereas conventional RL often memorizes specific training paths.

Conclusion

By moving beyond Markovian assumptions, BARL provides a principled foundation for LLM reasoning. It demonstrates that "thinking" is a form of Bayesian exploration, where the ability to stitch together parts of different strategies and switch paths when necessary leads to more robust and efficient problem-solving. Future work will focus on reducing the computational overhead of generating hypothesis sets during training and developing more efficient ways to represent model uncertainty.

Summary updated

BibTeX
@inproceedings{zhang2026beyond,
  author = {Shenao Zhang and Yaqing Wang and Yinxiao Liu and Tianqi Liu and Peter Grabowski and Eugene Ie and Zhaoran Wang and Yunxuan Li},
  title = {{Beyond Markovian: Reflective Exploration via Bayes-Adaptive RL for LLM Reasoning}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=vuyk1fSaE4},
}
Figure