TL;DR
When training language models via reinforcement learning on hard math or planning tasks, models waste massive amounts of compute generating attempts that either completely fail or effortlessly succeed—yielding zero learning signal. By mathematically deriving the ideal mid-trajectory states to practice from, the authors introduce Variance-driven State Resampling (VSR): a plug-in replay mechanism that restarts rollouts right at the "frontier" of a model's capability. This simple shift naturally creates an automatic reverse curriculum, boosting reasoning accuracy while generating significantly fewer tokens per update.
What Problem Does This Paper Address?
Reinforcement Learning with Verifiable Rewards (RLVR)—using algorithms like GRPO (Group Relative Policy Optimization)—has become the standard recipe for teaching LLMs to reason. In GRPO, a model generates a group of responses to a prompt and compares them against each other to figure out which actions were better.
Here is the catch: if a problem is too hard, every single attempt fails. If it’s too easy, every attempt succeeds. When all outcomes in a group are identical, the relative advantage collapses to zero, and the model learns nothing.
Usually, we view this at the prompt level. However, the authors point out that even inside a brutally hard competition math problem, intermediate states aren't equally hopeless. If a model stumbles upon a crucial algebraic reduction halfway through a proof, continuations from that partial prefix might suddenly yield a 50/50 mix of successes and failures—rich learning signal! Because standard on-policy training starts exclusively from the initial prompt, it rarely visits these golden intermediate states. The authors ask: under a fixed compute budget, what is the mathematically optimal distribution of states to sample from to minimize gradient variance?
Methods
First, the authors tackle the math. Treating LLM generation as a sequential state-action process (where a "state" is the prompt plus a partial token prefix), they optimize the state-sampling distribution alongside the reward baseline. Under homogeneity assumptions about gradient norms, the variance-minimizing state distribution takes a clean closed form (a Neyman allocation): $$\mu_{\mathrm{var}}^\pi(s) \propto d^\pi(s) \sigma_\pi(s)$$ In plain English, you want to sample states proportional to reachability under the current policy ($d^\pi(s)$) multiplied by outcome uncertainty ($\sigma_\pi(s)$, the standard deviation of rewards from that state).
Because computing $d^\pi$ and $\sigma_\pi$ exactly for an LLM is intractable, the authors build VSR (Variance-driven State Resampling) as a lightweight, plug-in approximation for GRPO-style algorithms:
- Approximating $d^\pi(s)$ (Prefix Replay Buffer): VSR stores token-level prefixes from recent successful trajectories in a sliding-window buffer, evicting old entries so the buffer tracks the evolving policy. At each step, training batches mix fresh prompts with replayed mid-trajectory prefixes (with prefix tokens masked out of the loss).
- Approximating $\sigma_\pi(s)$ (Zero-Cost Variance Proxy): Instead of spending extra rollouts to measure how uncertain a prefix is, VSR estimates a prefix's success probability $\hat{p}_i$ by linearly interpolating between the prompt's overall group success rate and the final trajectory reward ($1$), weighted by how far along the prefix is in the text. Uncertainty is then scored simply as $\sqrt{\hat{p}_i(1 - \hat{p}_i)}$.
- Cold-Start Seeding: If a base model never succeeds on hard prompts initially, the buffer can be seeded with prefixes from a few expert trajectories, which naturally get evicted as the model begins succeeding on its own.
Datasets
No new benchmarks were introduced; the authors evaluate on challenging subsets of existing reasoning and agentic suites:
- Mathematical Reasoning: Trained on a 1K hard subset of OpenR1-Math-220k (filtered for prompts with very low base-policy pass rates, plus DeepSeek-R1 trajectories for cold-start seeding). Evaluated on AIME24, AIME25, AMC23, OlympiadBench, MATH500, and Minerva.
- Long-Horizon Agentic Tasks: Evaluated (without expert cold-starting) on grid-based puzzle and navigation environments: Sokoban and three BabyAI levels (SynthLoc, OneRoom, MiniBoss).
Key Insights and Ideas
- An Emergent Reverse Curriculum: You don't need to hand-craft a difficulty schedule. Early in training, the model only gets mixed outcomes very close to the goal, so $d^\pi(s)\sigma_\pi(s)$ concentrates near the end of trajectories. Once the model masters finishing from late prefixes, $\sigma_\pi(s)$ drops to zero there, and the high-variance "frontier" automatically walks backward toward the start state!
- Deep Connection to GRPO: When you apply importance-sampling corrections to the optimal $\mu_{\mathrm{var}}^\pi$ distribution, the $1/\sigma_\pi(s)$ term in the denominator yields the exact same standardized reward-residual formula that GRPO already uses heuristically via group-relative normalization.
- Shorter Rollouts = Cheaper Updates: Launching rollouts halfway through a reasoning trace or agentic episode mechanically requires generating fewer new tokens to reach the end, slashing token budgets per update while delivering denser reward signals.
Key Results
- Math Reasoning: On Llama-3.2-3B-Instruct, VSR+GRPO achieves a 19.1% average across the six math benchmarks, outperforming standard GRPO (15.4%), prompt-level adaptive budgeting via Reinforce-Ada (15.0%), and uniform expert-prefix resets (17.1%) — including a jump from 39.2% to 54.0% on MATH500. On Qwen2.5-7B-Instruct, VSR+GRPO reaches 37.6% avg vs. 36.1% for GRPO (which actually degraded below the 37.2% base model due to overfitting on the tiny fraction of solvable prompts).
- Agentic Planning: Plugged into GiGPO on BabyAI, VSR boosts Qwen2.5-1.5B-Instruct average success rates from 30.4% to 47.6%, and Sokoban from 12.7% to 18.8%. For Qwen2.5-3B-Instruct, BabyAI climbs from 42.9% to 49.1% and Sokoban from 21.5% to 25.9%.
- Compute Efficiency & Ablations: At matched update counts on agentic tasks, Qwen2.5-1.5B with VSR generatesless than half the tokens of baseline GiGPO (39.27M vs. 81.30M). Ablations confirm both ingredients matter: removing recency eviction causes learning to plateau early (36.7% on BabyAI), and across three seeds, variance scoring beats uniform replay (48.2% vs. 44.0%).
Limitations and Future Work
The authors are refreshingly candid about the gap between their clean theory and practical VSR:
- Biased Approximations: Practical VSR omits exact off-policy density-ratio ($d^\pi/\mu$) corrections, filters the buffer to store only successful trajectories (to avoid wasting compute on dead-end states), and relies on a coarse, uncalibrated linear interpolation for $\sigma_\pi$.
- Experimental Scope: Math experiments rely on expert trajectories for cold-starting (which accounts for part of the gain, as shown by controls), and most main agentic curves and the no-recency ablation are single-seed runs.
- Future Directions: Designing tighter, low-cost state uncertainty estimators and conducting broader multi-seed evaluations across larger-scale training runs.
Summary updated