TL;DR
Reinforcement Learning with Verifiable Rewards (RLVR) powers state-of-the-art reasoning models like DeepSeek-R1, yet why it succeeds—or catastrophically fails—has lacked a solid optimization theory. This paper introduces the Gradient Gap to formalize the true improvement vector from incorrect to correct outputs, proving sharp step-size thresholds that separate smooth convergence from total collapse. The resulting theory mathematically justifies common heuristics like length normalization and explains why reasoning models often plateau strictly below 100% accuracy.
What Problem Does This Paper Address?
RLVR aligns large language models (LLMs) on complex reasoning and coding tasks using automated binary feedback (0 for failure, 1 for success). While algorithms like GRPO, DAPO, and Dr. GRPO bypass brittle reward models and produce impressive empirical results, their optimization mechanics have remained a black box.
Because binary rewards provide extremely sparse signals, practitioners often rely on trial-and-error heuristics—such as sequence length normalization and advantage standardization—to keep training from destabilizing or collapsing. Until now, there has been no rigorous theoretical foundation explaining under what conditions policy gradient updates converge under binary feedback, how learning rates should scale with sequence length, or why performance can unexpectedly stagnate.
Methods
The authors analyze policy gradient dynamics at both the trajectory level (treating a full response as a unit) and the token level (accounting for autoregressive token-by-token generation).
-
The Gradient Gap: The authors decompose the standard policy gradient into: $$\nabla_\theta J_q(\pi_\theta) = J_q(1 - J_q) \cdot (g_q^+ - g_q^-)$$ where $g_q^+$ and $g_q^-$ are the expected score functions (log-probability gradients) evaluated over positive (correct) and negative (incorrect) response spaces, respectively. The difference $(g_q^+ - g_q^-)$ is the Gradient Gap, which indicates the unscaled direction toward desirable outputs.
-
Log-Odds and Martingale Analysis: By examining the step-by-step change in the log-odds ratio $\log \frac{J_q}{1 - J_q}$, the authors apply log-moment-generating functions (log-MGFs) and martingale concentration techniques to bound progress under sub-exponential generation length assumptions.
- Connecting Theory to GRPO & Dr. GRPO: The framework evaluates how effective step sizes behave in popular algorithms relative to theoretical stability criteria.
Datasets
The authors validate their theoretical predictions using:
- Synthetic Contextual Bandits: A 100-armed linear contextual bandit benchmark adapted from prior RL theory literature.
- Mathematical Reasoning Benchmarks (LLM experiments):
- GSM8K: Grade-school math word problems.
- DeepScaleR: Advanced competition mathematics sourced from AMC and AIME competitions.
- DAPO-17k: A collection of challenging multi-step math competition problems.
No new datasets were introduced.
Key Insights and Ideas
- The Danger of the "Negative Space" (Overshooting causes collapse): The negative response space is vast and highly variable ($Var^-$), whereas correct solutions usually share a few consistent modes ($Var^+$). A second-order expansion shows that when the step size $\eta$ is too large, the variance of incorrect answers overwhelms the first-order gain, driving accuracy monotonically to zero—even when the update points in the right direction.
- Length Normalization is Mathematically Necessary: At the token level, stable step sizes must scale inversely with sequence length ($1/T$). GRPO explicitly normalizes updates by $1/|\vec{o}|$, matching the theoretical upper bound, whereas variants lacking length normalization risk overshooting on longer reasoning traces.
- Why RLVR Stagnates Below 100%: Standard GRPO normalizes advantages by the reward standard deviation $\sigma(q) = \sqrt{J_q(1 - J_q)}$. As accuracy $J_q \to 1$, this normalization causes the effective step size to blow up ($\eta_k \propto 1/\sqrt{1 - J_q}$), violating the theoretical stability condition ($\eta_k \lesssim 1 - J_q$) and causing the policy to overshoot and plateau before reaching perfection.
Key Results
- Sharp Thresholds: The authors prove that below a critical learning rate threshold ($\eta \lesssim \Delta \mu_q / (L + G^2)$), the error decreases at a linear rate. Above it, performance strictly decreases step-by-step to 0 ($J_q(K) \to 0$).
- Bandit Simulations: In 100-armed bandit experiments, contexts with large alignment gaps converge exponentially fast, whereas poorly aligned contexts cross a critical threshold and collapse to zero accuracy.
- LLM Validation with Qwen2.5-Math-7B: Fine-tuning Qwen2.5-Math-7B with GRPO across GSM8K, DeepScaleR, and DAPO-17k demonstrates that empirical accuracy maps closely to the predicted logistic curve when plotted against the cumulative gradient gap.
Limitations and Future Work
- Single-Prompt Assumption: The core theoretical proofs assume optimization over a single prompt $q$. In practice, batches contain diverse prompts where an update direction that helps one question may cause another to overshoot.
- Future Directions: Developing prompt-adaptive optimization schemes that rescale updates based on per-prompt difficulty and gradient alignment, exploring the statistical dynamics of multi-prompt batching, and formalizing curriculum learning schedules for RLVR.
Summary updated