Introduction
Reinforcement Learning with Verifiable Rewards (RLVR) has become a cornerstone for training reasoning-heavy Large Language Models (LLMs). Group Relative Policy Optimization (GRPO) is a prominent algorithm in this space, favored for its efficiency as it eliminates the need for a separate value model. However, standard GRPO is susceptible to "length bias"—a phenomenon where models learn to produce excessively verbose responses to maximize reward, as advantage calculations apply uniformly across all tokens. While variants like DAPO and Dr. GRPO attempt to mitigate this via hard-coded heuristics, they lack the flexibility to adapt to varying prompt complexities. This paper introduces $\lambda$-GRPO, a framework that unifies these approaches and introduces a learnable parameter to dynamically adjust length preferences.
Unifying GRPO Frameworks
The authors demonstrate that GRPO, DAPO, and Dr. GRPO share a common objective function structure, differing primarily in how they weight sampled outputs. By formalizing this relationship, they propose $\lambda$-GRPO, which replaces static weighting with a function $f(o_i, \lambda) \propto h_i^\lambda$, where $h_i$ represents the normalized length of a response.
The Learnable λ Parameter
Unlike previous methods that fix the relationship between length and weight, $\lambda$-GRPO treats $\lambda$ as a learnable parameter updated via Stochastic Gradient Descent (SGD) jointly with the model's weights. This allows the optimization process to find the ideal balance of verbosity for a given task:
- $\lambda > 0$: The model favors longer responses.
- $\lambda < 0$: The model favors shorter, more concise responses.
- $\lambda = 0$: The model is length-neutral.
This adaptive mechanism reduces the variance of the training signal and prevents "entropy collapse"—a common failure mode where models lose reasoning diversity—without inflating the actual response length.
Experimental Results
The effectiveness of $\lambda$-GRPO was evaluated using Qwen2.5 base models at 1.5B, 3B, and 7B scales. Training was conducted on 8,523 challenging math problems from GSM8K and MATH, with evaluation spanning eight diverse reasoning benchmarks.
Across all model sizes, $\lambda$-GRPO consistently outperformed both vanilla GRPO and the DAPO heuristic:
- 1.5B Model: Achieved 37.8% average accuracy (+1.9% over GRPO).
- 3B Model: Reached 43.8% average accuracy (+1.0% over GRPO).
- 7B Model: Scored 53.5% average accuracy (+1.7% over GRPO).
Notably, these improvements come with zero additional computational overhead during training or inference, as the $\lambda$ parameter adds negligible complexity to the optimization loop.
Conclusion and Future Work
$\lambda$-GRPO provides a robust, principled solution to the length bias problem in RLVR. By transforming a hard-coded heuristic into a learnable preference, it enables more stable and efficient training of reasoning models. Future research will explore the portability of this method to other model families like Llama and investigate adaptive schedules for the length-scaling hyperparameters to further enhance stability in diverse training environments.
Summary updated