Clip Your Sequences Fairly: Enforcing Length Fairness for Sequence-Level RL
Hanyi Mao, Quanjia Xiao, Lei Pang, Haixiao Liu
TL;DR
This work addresses length-dependent bias in sequence-level RL for LLMs caused by fixed clipping of the sequence-level log-IS ratio $S(y|x)$. It introduces FSPO, a log-space clipping method with a $\,\sqrt{L}$-scaled band $b_L$ that achieves length fairness and preserves IS semantics. The authors formalize Length Reweighting Error (LRE), prove a cosine-direction guarantee between clipped and true updates under mild assumptions, and show $S_L$ is asymptotically Gaussian, supporting the clipping design. Empirically, FSPO yields flatter length-wise clip rates, more stable learning dynamics, and superior performance on MATH500, AIME24, and AIME25, with the largest gains on the 8B model, validating its practical impact for RLVR in LLMs.
Abstract
We propose FSPO (Fair Sequence Policy Optimization), a sequence-level reinforcement learning method for LLMs that enforces length-fair clipping on the importance-sampling (IS) weight. We study RL methods with sequence-level IS and identify a mismatch when PPO/GRPO-style clipping is transplanted to sequences: a fixed clip range systematically reweights short vs. long responses, distorting the optimization direction. FSPO introduces a simple remedy: we clip the sequence log-IS ratio with a band that scales as $\sqrt{L}$. Theoretically, we formalize length fairness via a Length Reweighting Error (LRE) and prove that small LRE yields a cosine directional guarantee between the clipped and true updates. Empirically, FSPO flattens clip rates across length bins, stabilizes training, and outperforms baselines across model sizes and evaluation datasets, with the largest gains on the Qwen3-8B-Base model.
