Manuscript Offprint

arXiv:2610.29999

EPIC: Rethinking Trust Regions for Autoregressive LLM Policies via Exact-KL Prefix Importance-Ratio Clipping

Chengxi Li, Hanlin Wu, Zhicheng Cai, Huan-ang Gao, Wei-Ying Ma, Jingjing Liu, Hao Zhou

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Reinforcement learning (RL) based on PPO-style clipping has become an effective approach to improving the reasoning capabilities of large language models (LLMs). However, standard token-level clipping measures policy change only through the conditional probability of the current token, while the prefix conditioning context is itself generated by the policy. This mismatch becomes especially consequential in long-response and off-policy training. We reformulate autoregressive generation as a finite-horizon Markov decision process and derive its performance-difference identity under behavior-policy sampling. The resulting change of measure identifies the cumulative likelihood ratio of the generated prefix as the exact importance weight for each stepwise policy-improvement term. Starting from the monotonic-improvement principle of trust-region policy optimization, we then construct a prefix-level trust region using the exact reverse-KL coordinate r−1−log⁡rr - 1 - \log r, whose behavior-policy expectation equals the corresponding prefix-distribution KL divergence. This yields EPIC, a PPO-style sequence-clipping method that directly regulates prefix-level policy drift without relying on a local quadratic approximation or expert-routing replay. Experiments on off-policy reinforcement learning with a sparse mixture-of-experts language model show that EPIC consistently outperforms standard and sequence-level clipping baselines across mathematical-reasoning benchmarks, while remaining competitive with routing-replay-based alternatives. Code is available at https://github.com/LiChengxi666/EPIC.

1 Introduction

Reinforcement learning with verifiable rewards (RLVR) has become a central component of large language model (LLM) post-training, driving substantial advances in reasoning and coding capabilities [1–4]. In throughput-oriented modern LLM RL pipelines such as slime [5] and verl [6], fully asynchronous rollout generation and policy optimization [7], together with differences in kernel implementations between inference and training engines [8], inevitably introduce distributional mismatch that precludes strictly on-policy training. PPO-style clipping [9] is widely adopted to stabilize RL training by discarding gradient contributions associated with large deviations in current-to-behavior probability ratios, which serve as a proxy for policy divergence.

However, even among recently released large-scale models, the appropriate clipping mechanism and granularity for autoregressive LLMs remain unsettled: For example, Ling-2.6 [10], Qwen-AgentWorld [11], and Harvey Tenet [12] adopt sequence-level clipping through GSPO, whereas DeepSeek-V4 [13] and GLM-5 [14] continue to use token-level clipping through GRPO.

∗^{*}Equal contribution. ‡^{\ddagger}Project Lead. †^{\dagger}Corresponding author.

(a) Ratio granularity.

At position t=6t = 6: which likelihood factors are used?

12345678
Wecompute2+3=5.
w6=r6w_{6}=r_{6}
Wecompute2+3=5.
w=(∏k=18rk)1/8w = \left(\prod_{k=1}^{8} r_{k}\right)^{1/8}
Wecompute2+3=5.
r6pre=∏k=16rkr_{6}^{\mathrm{pre}} = \prod_{k=1}^{6} r_{k}

(b) Illustrative clipping behavior.

A. Token ratios: [1.1, 1.1, 1.1, 1.1, 1.1, 1.1]

GRPO1.101.101.101.101.10
EPIC1.101.211.331.461.61

rtnr_{t}^{n}: no local ratio exceeds 1.2

rtprer_{t}^{\mathrm{pre}}: accumulated drift is visible

B. Token ratios: [1.10, 1.10, 1.3, 1.3, 1.3]

GSPO1.211.211.211.211.21
EPIC1.101.211.572.042.65

s: shared ratio >1.2; all positions clipped

rtprer_{t}^{\mathrm{pre}}: early prefix below the bound

Hatched boxes indicate ratios clipped by the method-specific bound.

(c) Process memory in use.

—— EPIC

—— GRPO Clip-Higher + R2

—— GRPO Clip-Higher + R3

Figure

Figure 1 Over view of EPIC. (a) How GRPO, GSPO, and EPIC compute importance ratios along an autoregressive response. (b) Positive-advantage updates with illustrative clipping bounds. GRPO clips token ratios independently, whereas GSPO uses a shared response-level ratio and can clip all positions together. In these examples, EPIC detects cumulative drift missed by GRPO while preserving early-prefix signals suppressed by GSPO. Hatched boxes indicate clipped positions. (c) Driver-process resident CPU memory during training. EPIC uses substantially less memory than GRPO Clip-Higher combined with R2 or R3, without requiring expert-routing replay. The vertical axis is logarithmic.

This unresolved problem is particularly consequential in modern high-throughput LLM training pipelines, where decoupling rollout generation from optimization improves efficiency but introduces policy lag, causing training to rely on samples generated by outdated behavior policies [15–18]. Existing clipping-based methods remain susceptible to training instability in these off-policy settings [3, 8]. To mitigate this instability, current mixture-of-experts (MoE) training pipelines often rely on auxiliary routing-alignment mechanisms, such as Vanilla Routing Replay (R2) [8] and Rollout Routing Replay (R3) [19], to explicitly suppress the distribution mismatch. However, R2 and R3 limit the freedom of learning and incur additional memory overhead to store expert routing indices, while leaving the more fundamental challenge unresolved: how to stably train LLMs in substantially off-policy settings?

To address this challenge, we revisit the original design and motivation of PPO-clip and reformulate this technique in the autoregressive LLM RL setting. TRPO seeks conservative policy improvement by constraining the KL divergence from the behavior policy, while PPO-clip replaces this update with a first-order clipped surrogate [9, 20]. We formulate autoregressive generation as a finite-horizon MDP and derive its performance-difference identity under behavior-policy sampling. The resulting change of measure identifies the cumulative prefix ratio as the exact importance weight for each stepwise improvement term [21]. Applying the monotonic-improvement principle of TRPO then leads to a trust region over the behavior- and updated-policy-induced prefix distributions. Thus, the prefix ratio both measures each autoregressive improvement term and provides the ratio coordinate for its KL constraint.

Motivated by this distinction, we propose EPIC, a prefix-aware clipped objective for off-policy LLM reinforcement learning. Based on the prefix policy ratio rprer^{\mathrm{pre}}, we use the exact reverse-KL coordinate rpre−1−log⁡rprer^{\mathrm{pre}} - 1 - \log r^{\mathrm{pre}}, whose expectation under the behavior policy equals the KL divergence between the behavior- and updated-policy-induced prefix distributions. Combining this exact KL characterization with the monotonic-improvement framework of TRPO, we translate the prefix-level trust region into a practical PPO-style clipped objective. This construction stabilizes strongly off-policy MoE training without expert-routing replay, thereby avoiding the additional storage and system complexity required to record and replay expert assignments. Figure 1 illustrates how EPIC differs from token- and response-level clipping and highlights its memory efficiency relative to routing replay.

In conclusion, our contributions are threefold:

  • We reformulate trust-region policy optimization for autoregressive generation. By deriving the performance-difference identity under behavior-policy sampling, we show that the cumulative prefix ratio is the exact change-of-measure factor for each stepwise improvement term, and extend the TRPO monotonic-improvement principle to policy-induced prefix distributions.

  • Based on this formulation, we develop EPIC, a practical PPO-style clipped objective that constructs prefix-ratio bounds from the exact reverse-KL coordinate rpre−1−log⁡rprer^{\text{pre}} - 1 - \log r^{\text{pre}} and implements the resulting prefix-level trust region through efficient token-level computation.

  • In strongly off-policy MoE training, EPIC outperforms GSPO by 6.50 percentage points. Compared with routing-replay baselines, EPIC achieves competitive four-benchmark performance while reducing median driver-side process memory by 77.5% and 93.0% relative to R2 and R3.

References (39)