On the Design of KL-Regularized Policy Gradient Algorithms for LLM Reasoning

Yifan Zhang, Yifeng Liu, Huizhuo Yuan, Yang Yuan, Quanquan Gu, Andrew C Yao

TL;DR

The Regularized Policy Gradient (RPG) framework provides a unified mathematical "Rosetta Stone" for KL-regularized reinforcement learning in Large Language Models (LLMs). By correcting theoretical mismatches in popular algorithms like GRPO and introducing a novel "RPG-Style Clip" for stability, the authors achieve state-of-the-art reasoning performance, surpassing models like Qwen3-4B-Instruct on challenging math benchmarks.

What Problem Does This Paper Address?

Reinforcement Learning (RL) is the engine behind the recent "reasoning" breakthroughs in LLMs (such as DeepSeek-R1). To prevent a model from collapsing or generating nonsensical text during training, researchers rely on Kullback-Leibler (KL) regularization, which penalizes the model if it drifts too far from a safe "reference" policy.

However, the implementation of this regularization across the literature is fragmented. Researchers use different KL directions (forward vs. reverse), different estimators ($k_1, k_2, k_3$), and often ignore the mathematical nuances of off-policy estimation (training on data sampled from an older version of the model). This leads to "gradient mismatches," where the code isn't actually optimizing the objective the researcher intended. The authors set out to answer one focused question: Under off-policy settings, what is the exact math required to make training stable and theoretically correct?

Methods

The authors introduce the Regularized Policy Gradient (RPG) view, a compact framework that unifies various KL variants into a single, mathematically sound pipeline.

Overview of the Regularized Policy Gradient (RPG) framework.

Their approach consists of three main pillars:

  1. The RPG Objective: They derive exact gradients for both normalized and unnormalized KL variants. Crucially, they identify that the popular $k_3$ estimator is mathematically equivalent to an unnormalized KL divergence.
  2. RPG-Style Clip: Standard RL clipping (like in PPO) often fails at the scale of LLM reasoning. The authors adapt a "dual-clip" strategy that truncates importance ratios differently for positive and negative advantages.
Visualization of the RPG-Style Dual-Clip strategy for positive and negative advantages.

This clipping mechanism prevents the "moving target" problem and stabilizes training at context lengths up to 8K.

  1. Iterative Reference Updates: Instead of keeping a fixed reference model (which can lead to over-regularization), they periodically update the reference policy to the current policy, creating a "moving trust region" that allows for continuous improvement.

The framework supports two implementation flavors: Fully Differentiable (where the KL term is part of the computational graph) and REINFORCE-style (using stop-gradients). The authors prove these two approaches are gradient-equivalent when weighted correctly.

Datasets

The models were trained on the DAPO-Math-17k dataset (approximately 14k English samples). Evaluation was conducted on high-difficulty mathematical reasoning benchmarks to test the limits of the models' capabilities:

  • AIME 2024 & 2025: American Invitational Mathematics Examination.
  • AMC23: American Mathematics Competitions.
  • MinervaMath & OlympiadBench: Used for broader validation of reasoning skills.

Key Insights and Ideas

  • The GRPO Correction: The authors discovered that GRPO, a widely used RL algorithm for LLMs, actually omits an essential importance weight in its KL term. This causes a gradient mismatch that can lead to instability. RPG provides the "corrected" version.
  • Unnormalized is Often Better: The paper reveals that the widely used $k_3$ penalty is mathematically equivalent to Unnormalized KL (UKL). UKL includes a "mass correction" term that helps the model match the overall distribution of the reference, not just its shape.
  • REINFORCE is Viable Off-Policy: By combining their corrected gradients with the RPG-Style Clip, the authors show that the classic REINFORCE algorithm—often dismissed as too high-variance—can be made highly stable and scalable for modern LLM stacks.
  • Memory Efficiency: Their implementation allows the reference policy's log-probabilities to be pre-computed. This means you only need to keep one model in GPU memory during training, making it significantly more memory-efficient than standard GRPO.

Key Results

The RPG framework consistently outperformed strong baselines like DAPO and GRPO:

  • AIME Performance: On AIME24 and AIME25, RPG-REINFORCE with RPG-Style Clip improved accuracy by up to +6 absolute percentage points over DAPO.
  • Surpassing Official Models: Using a Qwen-4B base, the authors achieved 52% accuracy on AIME25, notably higher than the official Qwen3-4B-Instruct model (47%).
  • Scalability: The training remained stable even at 8K context lengths, showing consistent gains in reward (critic score) and well-controlled response lengths.

Limitations and Future Work

While RPG-Style Clip significantly improves stability, it introduces a controllable bias via the clipping hyperparameters ($\epsilon_1, \epsilon_2$). The authors note that the current "hard" clipping might not be optimal and suggest that developing principled schedules for these parameters (similar to learning rate decay) would be a valuable next step. Additionally, the study focused primarily on mathematical reasoning; extending this unified view to other domains like coding or creative writing remains an open area for exploration.

Summary updated

BibTeX
@inproceedings{zhang2026design,
  author = {Yifan Zhang and Yifeng Liu and Huizhuo Yuan and Yang Yuan and Quanquan Gu and Andrew C Yao},
  title = {{On the Design of KL-Regularized Policy Gradient Algorithms for LLM Reasoning}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=qe060gmfm7},
}
Figure