STAPO: Stabilizing Reinforcement Learning for LLMs by Silencing Rare Spurious Tokens

Shiqi Liu, Zeyu He, Guojian Zhan, Letian Tao, Zhilong Zheng, Jiang Wu, Yinuo Wang, Yang Guan, Kehua Sheng, Bo Zhang, Keqiang Li, Jingliang Duan, Shengbo Eben Li

TL;DR

Imagine listening to a tight, harmonious band, except one vocalist randomly shrieks off-key—and yet, because the song finishes on time, the whole band gets paid a bonus, encouraging that singer to shriek louder next time. When training Large Language Models (LLMs) with Reinforcement Learning (RL), a tiny fraction of "spurious tokens" (around 0.01%) act just like that singer, hijacking sequence-level rewards and destabilizing the entire model. By surgically muting just this microscopic fraction of noisy tokens during updates, STAPO prevents late-stage model collapse while boosting reasoning accuracy across math and coding benchmarks.

Figure 1: Core Idea. (a) In RLVR training, we argue that spurious tokens, which are rare and uninformative tokens within otherwise correct responses, can harm training stability, analogous to a dissonant vocalist disrupting the harmony of a performance. (b) By masking this negligible fraction (near 0.01%) of spurious tokens during the RL process of Qwen3-8B-Base, STAPO approaches the Pareto frontier of AIME24 Acc and entropy stability, compared to GRPO, 20-Entropy, and JustRL.

What Problem Does This Paper Address?

Reinforcement Learning with Verifiable Rewards (RLVR)—where a model generates a long chain of thought and gets a binary "right" or "wrong" grade at the very end—is the secret sauce behind modern reasoning LLMs like OpenAI-o1 and DeepSeek-R1.

However, RLVR has a coarse credit-assignment problem: every single token in a winning response inherits the exact same positive reward. Meanwhile, RL training walks a tightrope with policy entropy (a measure of randomness and exploration in token predictions). If entropy drops too fast, the model stops exploring and converges prematurely; if entropy explodes, the model descends into repetitive, nonsensical gibberish. Existing methods try to tame entropy globally using blunt heuristics like regularizers or clipping, which often stifle genuine exploration.

The authors ask a more granular question: Are all tokens equally responsible for training instability? They discover the hidden culprits are spurious tokens—rare, accidental, or illogical tokens (like a random typo or stray symbol) that slip into an otherwise correct answer, soak up massive gradient updates, and throw optimization off course.

Methods

The authors build upon standard group-based RL frameworks (specifically DAPO/JustRL, variations of Group Relative Policy Optimization that remove KL penalties and use asymmetric clipping). Their core innovation is Spurious-Token-Aware Policy Optimization (STAPO), powered by a lightweight filtering mechanism called Silencing Spurious Tokens (S2T).

Rather than masking all rare tokens—which kills exploration—the authors categorize tokens within correct answers along two axes: sampling probability (how likely the specific token was) and state entropy (how uncertain the model was at that step).

Token quadrants and gradient norms

Here is how S2T separates noise from genuine exploration:

  1. Isolate rare tokens: Identify tokens in positively rewarded sequences whose sampling probability falls below a small fixed threshold ($\tau_p = 0.002$).
  2. Check the model's confidence (Entropy): Compute the entropy distribution over those rare tokens in the current mini-batch.
  3. High entropy + Low probability = The model was genuinely uncertain and exploring valid reasoning branches. Keep these.
  4. Low entropy + Low probability = The model was actually confident about what should come next, meaning this rare token was just a freak sampling accident. Silence these.
  5. Mask and Renormalize: STAPO applies a binary mask to zero out the gradients of tokens falling in the bottom $q=75\%$ entropy quantile of rare tokens, dynamically re-averaging the loss over the remaining valid tokens.

Datasets

No new datasets are introduced; the authors use established reasoning benchmarks:

  • Math Training: DAPO-MATH-17K.
  • Math Evaluation: AIME24, AIME25, AMC23, MATH500, Minerva, and OlympiadBench.
  • Code Training: Eurus-RL-Code.
  • Code Evaluation: HumanEval+, MBPP+, and LiveCodeBench v6.

Key Insights and Ideas

  • The 0.01% Butterfly Effect: Training collapse in RLVR isn't a systemic failure of the whole sequence; after warm-up, masking less than 0.01% of tokens is enough to completely stabilize policy entropy.
  • Why Freak Tokens Hit Hardest: The authors prove mathematically (Theorem 3.3) and show empirically that tokens in the low-probability, low-entropy quadrant generate disproportionately massive gradient norms (+16.7% higher than normal high-prob/high-entropy tokens). Because they are rare surprises in confident states, the math of policy gradients amplifies their update, aggressively pushing the model toward garbage directions.
  • Digits vs. Discourse: Word clouds of Qwen3-1.7B training reveal a striking semantic split. Silenced spurious tokens are mostly stray digits (1, 2, 5) and formatting symbols ($, x), whereas preserved low-probability/high-entropy tokens are structural reasoning pivots like "Wait", "This", "Let", and "Since".

Key Results

Tested on Qwen3 base models (1.7B, 8B, and 14B) against GRPO, 20-Entropy, and JustRL:

  • Math Reasoning: Under training-aligned decoding, STAPO beats the strongest baselines across model scales, improving average relative accuracy by 18.49% (1.7B), 5.78% (8B), and 10.20% (14B). On the 14B model, STAPO reaches 52.81% on AIME24 (under standard evaluation decoding) and 67.80% average accuracy across all six math benchmarks.
  • Stability Over Long Horizons: While JustRL and 20-Entropy suffer from late-stage entropy explosions and GRPO suffers from entropy collapse, STAPO maintains flat, stable entropy and climbing accuracy past 3,000 gradient steps.
  • Zero-Tuning Generalization to Code: Using the exact same hyperparameters ($\tau_p = 0.002, q = 75\%$) on Qwen3-1.7B-Base, STAPO outperforms the best coding baseline by 5.79% in relative average accuracy (reaching 44.97% average across HumanEval+, MBPP+, and LCB v6).

Limitations and Future Work

  • Only Positive Responses Analyzed: Currently, STAPO only filters spurious tokens inside correct responses (positive advantage). The authors note that analyzing and filtering noisy tokens within incorrect responses (negative advantage) remains an open avenue for future work.
  • Domain Scope: Experiments are currently focused on verifiable math and coding tasks; the authors plan to extend STAPO to broader, more diverse task domains.

Summary updated

BibTeX
@inproceedings{liu2026stapo,
  author = {Shiqi Liu and Zeyu He and Guojian Zhan and Letian Tao and Zhilong Zheng and Jiang WU and Yinuo Wang and Yang Guan and Kehua Sheng and Bo Zhang and Keqiang Li and Jingliang Duan and Shengbo Eben Li},
  title = {{STAPO: Stabilizing Reinforcement Learning for LLMs by Silencing Rare Spurious Tokens}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=xnL7HqJSHm},
}
Figure