TL;DR
When training Large Language Models (LLMs) with reinforcement learning, the data you generate is almost immediately outdated by the time your GPUs actually learn from it—a mismatch that causes training to violently destabilize. Instead of relying on brittle heuristics like hard-clipping gradients or awkwardly normalizing by sequence length, VESPO uses variational math to derive a smooth, closed-form "shock absorber" for entire sequences. The result is a zero-overhead drop-in algorithm that keeps LLM training remarkably calm and accurate even when data is $64\times$ stale.
What Problem Does This Paper Address?
To teach LLMs multi-step math or coding via Reinforcement Learning (RL), systems generate massive batches of text ("rollouts") and update the model in smaller steps. Because generation and training are often decoupled—and run on different software engines like vLLM versus Megatron—you almost always end up doing off-policy learning: updating today's policy ($\pi$) using text generated by yesterday's slightly different behavior policy ($\mu$). This gap gets even worse in Mixture-of-Experts (MoE) models, where tiny numerical differences flip router decisions across layers.
To mathematically correct for this stale data, standard RL uses importance sampling: multiplying the gradient by the probability ratio $W = \pi(\text{sequence}) / \mu(\text{sequence})$. Here’s the catch: for an autoregressive LLM, a sequence ratio is the product of hundreds or thousands of per-token ratios. Tiny per-token differences compound multiplicatively, causing $W$ (and its variance) to explode exponentially with sequence length.
Existing fixes are largely heuristic compromises:
- Token-level clipping (e.g., PPO, GRPO): Clips ratios token-by-token, breaking inter-token dependencies and abruptly zeroing out gradients at an arbitrary boundary.
- Length normalization (e.g., GSPO): Takes the geometric mean across $T$ tokens ($W^{1/T}$), which tames variance at the cost of introducing a severe length bias.
The authors ask: Can we derive a principled, smooth way to reshape sequence-level weights directly, without breaking the sequence apart or normalizing by length?
Methods
The authors reframe weight reshaping as a change of measure. Multiplying gradients by any reshaping function $\phi(W)$ is mathematically equivalent to sampling from an implicit intermediate "proposal" distribution $Q$.
What makes an ideal $Q$? While KL-regularized variational updates are classical, VESPO's novelty lies in setting up a constrained optimization over $Q$ using the sequence-level ratio $W$ itself as the tilting statistic:
- Keep $Q$ close to the stale behavior policy $\mu$ (via KL divergence) so our existing samples remain informative.
- Tilt $Q$ toward high-importance trajectories favored by the current policy $\pi$.
- Enforce a strict moment constraint ($\mathbb{E}_Q[W] \le C$) to cap estimator variance.
Solving this via Lagrange multipliers yields a clean, closed-form reshaping kernel (shifted so on-policy $W=1$ gets a weight of $1$):
$$\phi(W) = W^{c_1} \exp\big(c_2(1 - W)\big)$$
Here, the power term $W^{c_1}$ gently down-weights unlikely sequences ($W \ll 1$), while the exponential term $\exp(c_2(1 - W))$ smoothly suppresses exploding ratios ($W \gg 1$) without hard-clipping discontinuities.
In practice, VESPO uses fixed asymmetric integer coefficients—$(c_1, c_2) = (2, 3)$ for positive advantages and $(3, 2)$ for negative ones—computed in log-space with zero extra memory or forward passes compared to GRPO.
Datasets
No new datasets are introduced; the authors use established benchmarks for training and evaluation:
- Mathematical Reasoning: Trained on DAPO-Math (using verifier rewards); evaluated on AIME 2024, AIME 2025, AMC 2023, and MATH-500.
- Code Generation (Cross-domain transfer): Trained on PRIME-RL/Eurus-2-RL-Data (using execution rewards); evaluated on HumanEval+, MBPP+, and LiveCodeBench v6.
Key Insights and Ideas
- Length normalization is a trap: Ablating VESPO by adding $\sqrt{T}$ or $T$ length normalization actually causes gradient spikes and training collapse. Normalizing by length causes longer responses to dominate batch gradients, creating a runaway feedback loop toward ever-longer outputs. VESPO proves you can operate on raw sequence weights safely without it.
- Asymmetry saves models from self-hatred: Negative-advantage samples (mistakes) need stronger suppression when $W < 1$ than positive ones—hence $(3, 2)$ vs. $(2, 3)$. Otherwise, the model aggressively penalizes sequences it already dislikes, destabilizing gradients.
- A sharp theoretical threshold ($c_1 \ge 1$): The authors prove an explicit variance bound showing that second-moment variance control is finite if and only if the power exponent $c_1 \ge 1$, giving theoretical teeth to hyperparameter selection.
- Software fixes and math fixes stack: On MoE models, VESPO without engineering workarounds matches GRPO equipped with Routing Replay (which forces expert routing consistency), and combining VESPO with Routing Replay achieves the highest performance overall.
Key Results
Using a single fixed hyperparameter setting across all models, tasks, and staleness levels:
- Big gains on MoE: At $8\times$ staleness on
Qwen3-30B-A3B-Base(an MoE model), VESPO reaches 70.0% average math accuracy, beating GSPO (59.1%), GRPO (57.0%), SAPO (51.7%), and recent reshaping methods like BAPO (63.6%), TOPR (48.7%), and CISPO (48.7%). It also matches or beats baselines on denseLlama-3.2-3B-Instruct(28.3%) andQwen3-8B-Base(60.9%). - Extreme staleness immunity: Pushing rollout staleness from $4\times$ up to $64\times$ on the 30B MoE model, VESPO's training reward curves remain virtually identical. At $64\times$ staleness, VESPO holds 61.8% math accuracy, whereas GRPO drops to 48.6%, GSPO to 47.6%, and SAPO collapses to 16.5%.
- Zero-tuning code transfer: Plugging the exact same math coefficients into code training on the 30B MoE yields 63.0% average pass@10 across HumanEval+, MBPP+, and LiveCodeBench v6, outperforming SAPO (61.8%) and GRPO (60.9%).
Limitations and Future Work
- Fixed hyperparameters vs. dual optimization: Theory identifies a valid regime ($c_1 \ge 1$) rather than unique numbers; in practice, $(c_1, c_2)$ are fixed integers rather than solved dynamically for a specific variance budget $C$.
- Task and scale scope: Evaluation is limited to objective rewards (math verifiers and code execution) up to a 30B MoE scale; subjective preference-model (RLHF) rewards were not tested.
- Entangled mismatch: In the MoE experiments, numerical train-inference engine mismatch was not isolated and measured separately from policy staleness. Future work could explore untangling these discrepancy sources or extending VESPO to preference-based RL.
Summary updated