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 · DOI

Reinforcement Learning (RL) has become the essential "secret sauce" behind the significant reasoning leaps observed in modern Large Language Models (LLMs) like DeepSeek-R1 and OpenAI’s o1. To prevent these models from "collapsing" or losing their foundational knowledge during the fine-tuning process, researchers typically employ Kullback-Leibler (KL) regularization. This technique penalizes the model if its behavior drifts too far from a reference policy.

However, the practical implementation of KL regularization in the field is currently inconsistent. Researchers frequently mix "forward" versus "reverse" KL, "normalized" versus "unnormalized" forms, and various estimators without a clear understanding of how these choices interact with off-policy sampling—the process of training on data generated by an older version of the model. This research introduces Regularized Policy Gradient (RPG), a unified mathematical framework that resolves these inconsistencies and achieves state-of-the-art reasoning performance.

The RPG Framework

The RPG framework provides a compact, unified derivation that clarifies the relationship between different regularization penalties. One of its primary contributions is the proof that the popular $k_3$ penalty is mathematically equivalent to the Unnormalized KL (UKL). By establishing this foundation, the authors provide exact gradient-equivalent surrogates for both fully differentiable and REINFORCE-style losses.

The RPG Core Engine framework, illustrating the unified process from inputs to updated policy.

Beyond mathematical unification, the RPG approach is highly memory-efficient. It allows reference probabilities to be pre-computed, meaning only one model needs to be active in GPU memory during training. This offers a significant advantage over traditional PPO or GRPO setups, which often require maintaining multiple model copies simultaneously.

Correcting the Weighting Mismatch

A critical insight of the RPG framework is the discovery of a "weighting mismatch" in the widely used GRPO algorithm. The authors found that GRPO’s KL term omits an essential importance weight when training off-policy. In a theoretically sound off-policy setting, the KL penalty must be weighted by the ratio of the current policy to the sampling policy. RPG corrects this omission, leading to significantly more stable training updates and smoother curves for reward and entropy.

RPG-Style Clipping for Stability

To handle the high variance inherent in off-policy importance sampling, the framework introduces a robust "RPG-Style Clip" mechanism. This dual-clip method prevents massive, unstable updates by clipping the importance ratio $w(x)$.

The RPG-Style Dual-Clip mechanism, showing how the loss term is clipped for both positive and negative advantages to ensure training stability.

As shown in the visualization, the mechanism not only prevents the model from moving too far in a positive direction but also enforces a lower bound for negative advantages. This ensures the model does not over-correct in the wrong direction when it receives negative feedback, maintaining the integrity of the reasoning process.

Key Results and Performance

The RPG framework consistently outperforms strong baselines on challenging mathematical reasoning benchmarks:

  • AIME Performance: RPG-REINFORCE with the RPG-Style Clip improved accuracy by up to +6 absolute percentage points over the DAPO baseline.
  • State-of-the-Art for Model Size: Using a Qwen3-4B model, the framework achieved 52% accuracy on AIME 2025, surpassing the official Qwen3-4B-Instruct model's 47%.
  • Training Stability: Compared to GRPO, which often exhibits high volatility, RPG training curves for reward, entropy, and response length were significantly more controlled.

While the introduction of clipping does introduce a controllable bias, the results demonstrate that a mathematically "correct" REINFORCE algorithm, when paired with RPG-Style Clipping, is more stable and scalable for LLM reasoning than many more complex PPO-based alternatives.

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