arXiv(opens in a new tab)cs.LGOct 2026Cited by 2 papers on PaperVantage

Manuscript Offprint

arXiv:2610.25725

Anatomy of Off-Policy Policy Gradient: Importance Sampling, KL Regularization, and Baselines

Haoqun Cao, Yurun Yuan, Tengyang Xie

Abstract

Reinforcement learning has become a central tool for large language model (LLM) post-training, where policy gradient methods are routinely deployed off-policy, even though vanilla policy gradient assumes on-policy sampling. We study when such off-policy deployment is justified, and what roles its core ingredients, including importance sampling, KL regularization, and baselines, play in handling the resulting distribution shift. We show that for a general class of off-policy policy gradient updates, consistency, in the sense that the optimal policy remains a stationary point, requires one of two structures at the optimal policy: trajectory-level importance weighting, which suffers from the well-known curse of horizon, or KL regularization with a baseline equal to the optimal soft value, instantiated by the grouped mean. Focusing on the KL route, we identify it with the group-relative policy gradient (GRPG) update, establish an equivalence to a trajectory-level Bellman residual minimization objective, and obtain a finite-sample regret bound under all-policy coverage. This also gives a theoretical account of a variant of the empirically successful GRPO objective. We further uncover a hidden role of baselines in the off-policy setting: a constant shift in the baseline implements pessimism, the standard remedy in offline RL for partial data coverage. We instantiate this via the asymmetric REINFORCE objective, and connect it to the game-theoretic offline RL framework, showing a regret bound with single-policy coverage. Together, these results offer a unified theoretical view of off-policy policy gradient in LLM post-training and connect it to classical ideas in offline RL.

1 Introduction

The recent years have witnessed a tremendous amount of work using reinforcement learning (RL) for large language models (LLMs), with applications ranging from instruction following and human preference alignment (Ziegler et al., 2019; Ouyang et al., 2022; Bai et al., 2022) to mathematical and code reasoning (Shao et al., 2024; Guo et al., 2025). The task of next-token prediction is formulated as a long-horizon sequential decision problem, and the language model is trained as a policy through standard policy optimization techniques.

Among policy optimization methods in RL, policy gradient (Williams, 1992; Sutton et al., 1999) is a fundamental approach and a building block of many modern algorithms. It has also been widely adopted in LLM post-training (Ahmadian et al., 2024). In its vanilla form, policy gradient requires on-policy sampling to construct an unbiased gradient estimate; in practice, however, it is routinely deployed off-policy, with various modifications, due to considerations such as replay buffers (Wang et al., 2017), distributed actor-learner asynchrony (Espeholt et al., 2018), or the cost of regenerating rollouts after each update (Schulman et al., 2017b; Shao et al., 2024). A fundamental question is then: when does off-policy policy gradient work for LLM post-training, and how do its core ingredients — importance sampling, KL regularization, and baselines — play their roles? To

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

our knowledge, this question has not been systematically studied in the LLM literature, and this work aims to fill the gap.

When data is sampled from a behavior policy rather than the current learner, one inherits the setting of offline (or batch) RL (Lange et al., 2012; Fujimoto et al., 2019; Levine et al., 2020), where a long line of work has converged on the pessimism principle: under partial data coverage, the learner should be conservative on regions where data is sparse, in order to avoid overestimation (Jin et al., 2021; Xie et al., 2021). A second focus of this work is to bridge the empirical practice of off-policy LLM post-training with the principles developed in the offline RL literature.

Classical off-policy policy gradient methods make the update valid by recovering a quantity of the target policy from behavior data: expectations under π\pi via importance weighting (Precup et al., 2000; Jiang and Li, 2016; Wang et al., 2017; Espeholt et al., 2018), the state distribution dπd^{\pi} via density-ratio estimation (Liu et al., 2019), or the action value QπQ^{\pi} via an off-policy critic (Degris et al., 2012). None of these scales comfortably to LLM post-training: trajectory-level importance weights have variance exponential in the horizon, density ratios over text states are hard to estimate, and a critic adds substantial overhead. The off-policy objectives that work in practice use none of them, relying only on KL regularization and a grouped-mean baseline; this paper asks why that minimal set of ingredients suffices (see Appendix B for further discussion).

The off-policy objectives we study (e.g., Shao et al., 2024; Yuan et al., 2025; Arnal et al., 2025) and related works in this direction with similar objectives (e.g., Ji et al., 2024; Wang et al., 2025; Tang et al., 2025; Wang et al., 2026) have been extensively studied empirically in recent LLM post-training work; our goal in this paper is to provide a unified theoretical understanding of when and why they remain consistent under off-policy distribution shift, what role each ingredient (importance sampling, KL, baseline) plays in this, and how the resulting guarantees connect to the offline RL literature.

Contributions This work develops a theoretical framework for off-policy policy gradient in LLM post-training.

(1) A characterization of consistent off-policy PG updates. We show that for a general class of off-policy PG updates in the autoregressive setting, a consistent update, i.e., one that preserves the optimal policy as a stationary point, must at the optimal policy either use trajectory-level importance weights or use KL regularization paired with a baseline equal to the optimal soft value (Proposition 1). The importance-sampling route suffers from the well-known curse of horizon, so we focus on the KL route, with the grouped-mean baseline, in the rest of the paper.

(2) Analysis of KL regularization with a grouped-mean baseline. We identify the KL route with the group-relative policy gradient (GRPG) update, develop the intuition behind its correctness, and establish an equivalence to a trajectory-level Bellman residual minimization (TBRM) objective of Yuan et al. (2025) (Proposition 2). This connects GRPG, a variant of the empirically successful GRPO objective (Shao et al., 2024), to classical value-based RL principles. We further give a finite-sample regret bound under all-policy coverage (Theorem 3).

(3) A hidden role of baselines: implementing pessimism. Within the KL route, we show that a constant shift in the baseline has a surprising effect beyond variance reduction: it implements pessimism, the standard remedy in offline RL for partial coverage. We connect this insight to the asymmetric REINFORCE (AsymRE) objective of Arnal et al. (2025), providing a game-theoretic interpretation connecting it to the adversarial offline RL framework of Cheng et al. (2022), and upgrade the regret bound from all-policy to single-policy coverage (Theorem 5).

Taken together, these three parts trace a single path from the off-policy policy-gradient update template to the two finite-sample guarantees. Figure 1 lays out that path, together with the equivalences and the coverage conditions encountered along the way, and may be useful as a map while reading the rest of the paper.

References (40)