Papers
Topics
Authors
Recent
Search
2000 character limit reached

ST-PPO: Stabilized PPO for LLMs

Updated 29 November 2025
  • ST-PPO is a reinforcement learning algorithm that adapts PPO for multi-turn LLM tasks by incorporating turn-level importance sampling.
  • It corrects clipping bias through gradient normalization to reduce high-variance updates and promote training stability.
  • Empirical evaluations in multi-hop and medical QA tasks demonstrate that ST-PPO outperforms token-level PPO with improved success rates and accuracy.

ST-PPO (Stabilized Off-Policy Proximal Policy Optimization) is a reinforcement learning algorithm designed to stabilize and enhance the training of LLMs acting as multi-turn agents. ST-PPO addresses instability in Proximal Policy Optimization (PPO) that arises when applying token-level optimization in multi-turn tasks such as multi-hop question answering, search, and reasoning. By introducing turn-level importance sampling and clipping-bias correction, ST-PPO aligns the optimization granularity with the structure of multi-turn environments and normalizes high-variance gradients from off-policy samples, resulting in improved stability and performance in large-model training contexts (Li et al., 25 Nov 2025).

1. Algorithmic Structure and Definitions

ST-PPO operates within a multi-turn Markov decision process (MDP), where interaction is decomposed into discrete “turns”—contiguous sequences of agent-generated tokens bounded by tool calls or special markers such as <eot>. The full trajectory y=(y1;y2;;yK)y = (y^1; y^2; \ldots; y^K) consists of KK turns, each defined by its boundary (tkstart,tkend)(t_k^{\text{start}}, t_k^{\text{end}}). Let xDx \in \mathcal{D} denote the user query, yty_t the tt-th output token, and yk=(ytkstart,,ytkend)y^k = (y_{t_k^{\text{start}}}, \ldots, y_{t_k^{\text{end}}}) the kk-th turn.

For each turn kk, state sk=(x,y1,,yk1)s_k = (x, y^1, \ldots, y^{k-1}) and action KK0 are defined. The policy KK1, parameterized as an auto-regressive LLM (LM), outputs KK2. The critic KK3 estimates turn-level state value. Token-level advantages KK4 are computed using Generalized Advantage Estimation (GAE) with discount KK5 and GAE parameter KK6. The PPO clipping parameter KK7 is set to KK8.

Standard token-level PPO surrogate objective is:

KK9

where (tkstart,tkend)(t_k^{\text{start}}, t_k^{\text{end}})0.

ST-PPO integrates two modifications:

  1. Turn-level importance sampling
  2. Clipping-bias correction

Algorithmic steps (Algorithm 1) include trajectory rollout, turn detection via loss mask or end-of-turn tokens, GAE advantage computation, gradient formation using turn-level ratios, calculation of clipping-bias norms (tkstart,tkend)(t_k^{\text{start}}, t_k^{\text{end}})1 and (tkstart,tkend)(t_k^{\text{start}}, t_k^{\text{end}})2, surrogate gradient normalization, and updates to policy and critic.

2. Turn-Level Importance Sampling

In multi-turn tasks, the dialogue trajectory is segmented by grouping agent tokens (loss_mask=1) as turns. Each turn’s importance sampling ratio is defined as the geometric mean of token-level ratios:

(tkstart,tkend)(t_k^{\text{start}}, t_k^{\text{end}})3

This reduces variance compared to full product sequence-level ratios, yet preserves sub-goal credit assignment. The turn-level PPO surrogate objective is:

(tkstart,tkend)(t_k^{\text{start}}, t_k^{\text{end}})4

Under inactive clipping, the gradient assignment aggregates token advantages (tkstart,tkend)(t_k^{\text{start}}, t_k^{\text{end}})5 for each turn, weighted by (tkstart,tkend)(t_k^{\text{start}}, t_k^{\text{end}})6. Lemma 1 formalizes the resulting clean turn-level credit assignment.

This approach matches the natural decomposition of multi-turn tasks into reasoning and tool-call stages. Token-level importance sampling is overly noisy—variance increases as off-policy drift grows—while sequence-level sampling discards useful sub-goal structure. Turn-level importance sampling strikes a balance.

3. Clipping-Bias Correction

PPO’s clipped surrogate discards tokens or turns whose importance ratio falls outside (tkstart,tkend)(t_k^{\text{start}}, t_k^{\text{end}})7, introducing a systematic bias term in the gradient. Gradient decomposition (Lemma 2) yields:

(tkstart,tkend)(t_k^{\text{start}}, t_k^{\text{end}})8

For token-level PPO:

(tkstart,tkend)(t_k^{\text{start}}, t_k^{\text{end}})9

where xDx \in \mathcal{D}0 is the set of tokens with inactive clipping.

During large-model training, xDx \in \mathcal{D}1 grows and oscillates, indicating unreliable critic estimation and off-policy drift. To dampen such gradients, S-PPO rescales by xDx \in \mathcal{D}2:

xDx \in \mathcal{D}3

For turn-level PPO, similar bias correction applies:

xDx \in \mathcal{D}4

with θJST-PPO(θ)</h1><p>1Cturn(θ)2θJTurn-PPO(θ)\nabla_\theta J_\text{ST-PPO}(\theta)</h1> <p>\frac{1}{\Vert C_\text{turn}(\theta) \Vert_2} \cdot \nabla_\theta J_\text{Turn-PPO}(\theta) .

Samples associated with high clipping bias are down-weighted, resulting in stabilized gradient variance.

4. ST-PPO: Combined Approach

ST-PPO synthesizes turn-level importance sampling and clipping-bias correction. The turn-level ratio xDx \in \mathcal{D}5 is used for credit assignment and gradients are normalized by the turn-level clipping bias norm xDx \in \mathcal{D}6:

xDx \in \mathcal{D}7

Since division by a positive scalar preserves the gradient direction, ST-PPO has fixed points identical to Turn-PPO, but applies more conservative updates when samples are risky. Figure diagnostics demonstrate that this procedure effectively stabilizes the training process.

5. Theoretical Properties and Stability Analysis

Lemma 1 proves that turn-level importance sampling yields correct credit assignment and aggregates token-level advantages proportionally to the turn’s geometric mean ratio. Lemma 2 decomposes PPO’s gradient, identifying the clipping-bias term’s contribution to instability as off-policy drift intensifies.

Down-weighting the clipping-bias term using ST-PPO’s normalization controls both variance and bias in the learning signal. Experimental diagnostics (e.g., gradient norm and clipping ratio curves in Figures 2–5) show that ST-PPO maintains lower gradient magnitudes and reduced clipping rates, preventing training collapse. Although no closed-form variance bounds are provided, xDx \in \mathcal{D}8-norm trends empirically validate improved stability.

6. Empirical Evaluation

Experiments examine general QA (Natural Questions), multi-hop QA (HotpotQA), and medical multiple-choice QA tasks (AlphaMed19K, MedQA, MedMCQA, PubMedQA, MMLU-M, MedXpert). Models use a 3-passage dense retriever on Wikipedia and the Qwen-2.5-7B base policy. Evaluation metrics include Exact Match (EM), success rate, and accuracy.

Findings are summarized as:

  • Token-level PPO and GRPO collapse mid-training and require early stopping.
  • Turn-level PPO improves stability but still collapses on larger models.
  • S-PPO prevents collapse and improves peak performance.
  • ST-PPO achieves smooth, stable learning curves and superior success rates.

Stability metrics indicate ST-PPO and S-PPO achieve 10–20% clipping ratios (versus 40–60% for token-level PPO), consistently lower KL divergence to the behavior policy, and reduced gradient norms. Ablations show complementary effects: turn-level IS lowers gradient norm and boosts performance, bias-correction alone stabilizes training, and ST-PPO outperforms both. In medical QA (Table 2), ST-PPO attains 49.90% average accuracy, exceeding Search-R1 (token-level PPO RL, 45.37%) and baseline retrieval-augmented generation (RAG) and chain-of-thought (CoT) models.

7. Implementation Guidance and Practical Recommendations

Key hyperparameters consist of:

  • Hardware: 8 × NVIDIA H100, FSDP with offloading, gradient checkpointing.
  • Policy learning rate: xDx \in \mathcal{D}9; Critic learning rate: yty_t0
  • Warm-up ratios: 0.285 (policy), 0.015 (critic)
  • Effective batch size: 512; Mini-batches: 256; Micro-batches: 64 (policy), 8 (critic)
  • GAE yty_t1, yty_t2
  • PPO KL penalty coefficient: 0.001; Clipping parameter yty_t3
  • Maximum tokens: 4096; Response ≤ 500; Context ≤ 2048; Retrieved ≤ 500
  • Sampling through vLLM (TP size 4), GPU memory utilization 0.6, temperature 1.0, top-yty_t4 1.0
  • Token grouping for turn detection: agent tokens (loss_mask=1) segmented between environment tokens

Practically, monitoring the clipping ratio and clipping-bias norm is recommended. If training instability or clipping ratios >50% arise, clipping-bias normalization should be introduced. yty_t5 empirically balances off-policy weight and variance. If critic reliability deteriorates, a cold restart may be employed, but ST-PPO largely obviates this need. Surging yty_t6 can signal the requirement for more frequent critic updates or smaller learning rates.

A plausible implication is that in large, multi-turn agent tasks, applying both turn-level importance sampling and clipping-bias correction together offers substantial robustness against training collapse, outperforming baseline PPO and its single-modification counterparts.


In summary, ST-PPO extends standard PPO by matching optimization granularity with task structure and counteracting high-variance, unreliable updates. Empirical and theoretical results confirm that ST-PPO yields stable training dynamics and superior performance for multi-turn LLM agent tasks, without necessitating early stopping or intricate manual intervention (Li et al., 25 Nov 2025).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to ST-PPO.