arXiv:2610.21060cs.LGOct 2026

Manuscript Offprint

arXiv:2610.21060

Bellman-Consistent Trajectory RL for LLM Arithmetic Reasoning

Lianfa Li

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Extended Abstract

Motivation Training Large Language Models (LLMs) for multi-step arithmetic reasoning remains a significant challenge due to sparse terminal rewards and the lack of intermediate guidance. In tasks like Countdown, where models must generate sequential operations to reach a target number, rewards are only allocated at the sequence's end. Standard reinforcement learning approaches assign credit solely to the final step, leaving intermediate reasoning steps without meaningful learning signals. This project addresses this critical bottleneck: the fundamental mismatch between sparse terminal rewards and the dense, step-wise supervision required to learn effective sequential strategies and intermediate representations.

Method To overcome this, we propose a Bellman-consistent trajectory RL framework with three core objectives: (1) transforming sparse terminal rewards into dense token-level supervision via Trajectory Bellman Residual Minimization (TBRM); (2) reducing gradient variance during optimization using a Reinforce Leave-One-Out (RLOO) or Group Relative Policy Optimization (GRPO) strategy; and (3) enabling effective intermediate step learning via hindsight goal relabeling. We evaluate our framework on the Countdown task, conducting ablation studies to quantify each component's contribution to reasoning accuracy and training stability.

Implementation Our method builds on TBRM, utilizing soft reward and Q-functions to provide analytical solutions that allow a single LLM to serve as the Q, V, and policy functions, significantly reducing optimization complexity. The soft performance difference lemma guarantees that TBRM satisfies the optimal BRM solution, preserving token-level consistent optimization for the final reward. Additionally, we prove that the RLOO grouping strategy considerably reduces the variance of soft Bellman residuals, enhancing training stability. Finally, hindsight goal relabeling is applied to failure samples to strengthen intermediate reasoning steps. We evaluate our approach on the Countdown task, benchmarking against standard policy gradient methods and ablated baselines.

Results The TBRM-RLOO framework significantly reduces gradient variance compared to vanilla TBRM or TBRM-GRPO, leading to superior training stability and performance, with hindsight goal relabeling further accelerating learning efficiency. TBRM-RLOO improves rollout accuracy from 0.61 to 0.73 (+20%), Pass@1 from 0.55 to 0.56, and Pass@16 from 0.74 to 0.84 (+14%). Incorporating goal relabeling further boosts Pass@1 to 0.64. RLOO grouping consistently outperforms the GRPO strategy. Compared to SFT, IPO/DPO, RLOO, and vanilla TBRM, our method achieves the top overall Pass@16 performance at 84.0%, outperforming the RLOO baseline by 10.0% (absolute) and SFT by 8.0%. It also exhibits superior single-sample efficiency, dominating the low-compute regime (56.1-64.0% Pass@1 within 100 steps), and successfully circumvents the 72.0% plateau encountered by existing methods via test-time scaling.

Discussion Our results demonstrate that a Bellman-consistent trajectory RL method combined with RLOO variance reduction and hindsight goal relabeling significantly improves LLM performance on multi-step arithmetic tasks. The TBRM framework effectively densifies sparse rewards into token-level supervision, while the RLOO strategy stabilizes training by mitigating optimization variance stemming from prompt or problem difficulty. Hindsight goal relabeling enriches data and accelerates intermediate step learning. While constrained by model complexity and broader task generalization, our findings suggest that this framework provides a robust blueprint for training LLMs on complex, sparsely rewarded reasoning tasks.

Conclusion We introduced a Bellman-consistent trajectory RL method that successfully transforms sparse rewards into dense token-level supervision via TBRM, stabilizes optimization via RLOO variance reduction, and enhances sample efficiency through hindsight goal relabeling. Our framework achieves top-tier results on the Countdown task, balancing exploration and exploitation while successfully bypassing traditional performance plateaus. Future work will investigate the scalability of this approach across diverse multi-step reasoning domains.