TL;DR
Group Relative Policy Optimization (GRPO) stalls whenever all sampled responses in a group fail, yielding zero advantage and discarding valuable reasoning. Spectral Policy Optimization (SPO) solves this by using AI feedback to score intermediate reasoning steps in failed trajectories, transforming flat zero rewards into continuous "spectral" credit. This enables models to learn from partially correct answers, improving mathematical reasoning performance across 7B to 32B models.
What Problem Does This Paper Address?
Reinforcement learning from outcome-based rewards (such as verifiable final answers) has powered the recent wave of reasoning models like DeepSeek-R1. To avoid training an explicit critic network, GRPO normalizes rewards within a sampled group of completions for a given prompt.
However, this design has an Achilles' heel: all-negative-sample groups. When a problem is difficult—or when context length is constrained—every sampled response may produce an incorrect final answer. Because every response gets a reward of 0, the group mean is 0, the variance is 0, and the resulting advantages are all identically 0. No policy update occurs, and the entire batch of rollouts is wasted. This wastes compute and prevents the model from learning how to solve harder problems where it cannot yet produce a fully correct answer from start to finish.
Methods
SPO replaces the "black-and-white" binary outcome reward of failed responses with a diversified, step-aware scalar reward using Reinforcement Learning from AI Feedback (RLAIF):
- Reasoning Trajectory Score (RTS): Given a reference solution and a failed sampled trajectory, a strong judge LLM (e.g., OpenAI
o4-minior AnthropicClaude-3.7-Sonnet) evaluates the response sentence by sentence to pinpoint the exact location of the first substantive logical or computational mistake. The ratio of tokens/steps before this error relative to the total length determines the $RTS \in [0, 1]$. -
Spectral Reward Formulation: The reward for a negative sample is computed via a shifted logistic curve: $$r_{\text{AIF}}(y) = \frac{1}{1 + \exp\big(\beta(RTS(y) - \gamma)\big)}$$ This penalizes solutions that fail immediately while amplifying credit for chains of thought that remain logically sound for most of the trajectory.
-
Targeted Application: To avoid noise, process supervision is applied strictly to all-negative groups, and during online training, only during early training epochs (the first 3 epochs) so the policy internalizes early corrective signals without destabilizing later convergence.
- Theoretical Justification: The authors prove on a stylized 2-step decision model that SPO achieves provably faster learning of early reasoning steps and converges locally faster to the optimal policy than standard GRPO.
Datasets
- Training:
- Offline RL: Evaluated on the GAIR/LIMO dataset (curated reasoning prompts).
- Online RL: AIME collections (1997–2023), providing ~1,000 challenging competition math problems per epoch.
- Evaluation Benchmarks:
- Evaluated across 10 benchmarks: AIME24, AIME25, AMC23, MATH500, OlympiadBench, GradeSchool, and multilingual out-of-domain Chinese exams (CHMath24, Kaoyan, Gaokao).
- Note on benchmarks: No new benchmarks were created; established benchmarks were selected to test both in-domain and out-of-domain transfer.
Key Insights and Ideas
- Not all errors are equal: An answer truncated by maximum token limits or flawed by an arithmetic error at the very last line contains far more valuable signal than total hallucination. Standard GRPO treats both as zero.
- Stronger models produce better negative samples: Larger or distilled models (e.g., DeepSeek-R1 distillations) write longer reasoning paths (averaging ~6k tokens vs. ~1k for base instruct models). Their failures are disproportionately due to length limits or late-stage slips, making them ideal beneficiaries of intermediate credit.
- Discarding failures encourages forgetting: Solely learning from problems the model can already solve causes policies to overfit to narrow heuristics. Learning from negative samples improved out-of-domain generalization on Chinese competition benchmarks (e.g., Kaoyan and Gaokao) even when trained solely on English AIME data.
Key Results
- Offline RL: Training solely on negative samples via SPO matched or outperformed training solely on positive samples. For
Qwen2.5-32B-Instruct, training only on negative samples improved AMC23 (avg@16) from 64.22% to 69.53% and AIME24 from 17.08% to 20.42%. - Online RL: Across various base and distilled models, SPO consistently outperformed both the initial baseline and standard GRPO:
- DeepSeek-R1-Distill-Qwen-7B: Overall benchmark average reached 65.41% with SPO, compared to 63.72% for standard GRPO and 62.85% baseline (achieving 75.00% on CHMath24 vs. 71.04% for GRPO).
- DeepSeek-R1-Distill-Llama-8B: Overall average rose to 53.81% under SPO vs. 53.06% for GRPO and 51.58% baseline.
- Qwen2.5-14B & 32B-Instruct: SPO consistently delivered higher overall reasoning averages across all 10 evaluation sets compared to standard GRPO.
Limitations and Future Work
- Judge Robustness: Relying on a single LLM judge can introduce noise due to evaluator hallucination or misinterpretation. The authors suggest an ensemble voting scheme (e.g., taking the minimum score across multiple judge APIs) to enforce conservative scoring.
- Theoretical Scope: The theoretical proof is restricted to a stylized population-level setting ($H=2$ steps, binary branching). Expanding theory to general horizon lengths, group sizes $G > 2$, and stochastic sample dynamics remains open.
- All-Positive Groups: SPO does not address all-positive sample groups (where reward variance is also zero). Future work could incorporate length-regularization rewards to encourage conciseness once correctness is mastered.
Summary updated