This note summarizes the 19-item reading list recommended in Cameron R. Wolfe’s post “Score Centering”. Numbers, tables and section numbers were checked against the originals (arXiv HTML and blogs). For results presented only as figures, only the values stated in the body text and captions are reproduced. Items marked [Interpretation] are the reader’s interpretation, not claims of the paper.
Related lessons: /study/rlhf/off-policy-mismatch/ · /study/rlhf/rlvr-grpo/ · /study/rl/ppo/ · /study/rlhf/rlhf-ppo/
0. Problem setup and notation
In LLM RL, rollouts are usually produced by an inference engine (the sampler) such as vLLM or SGLang, while gradients are computed by a training engine (the trainer) such as FSDP or Megatron. Even with identical weights, the two engines assign different token probabilities, and with asynchronous rollouts the sampler’s weights lag a few steps behind. So “on-policy” RL is in practice off-policy. This is called training-inference mismatch (TIM).
The notation used in this note is as follows (the sources use different symbols; they have been aligned where possible).
| Symbol | Meaning |
|---|---|
| or | current policy probability computed by the trainer |
| probability computed by the trainer at the weights that produced the rollout | |
| , , | probability the sampler (inference engine) actually sampled from |
| policy ratio | |
| cross-engine ratio at the same weights | |
| , | advantage, reward |
The mismatch splits into two components.
1. At a glance
| Topic | What the sources say | Things to consider [Interpretation] |
|---|---|---|
| Numerical gap between sampler and trainer | VeXact (A1): on Qwen3-30B-A3B, reward with vLLM rollouts drops after step 280, while a bit-exact engine keeps improving. A KL monitor does not catch the early degradation | Numerical mismatch alone can cause collapse. Monitoring KL alone is not enough |
| MoE router mismatch | R3 (A4): MoE has more than twice the KL of a dense model, and replaying the routing mask eliminates collapse. GSPO (C8) claims stability without replay | For MoE, routing replay or sequence-level ratios are candidates |
| CISPO on its own | DPPO (C9): on an MoE Base model without routing replay, CISPO suddenly collapses completely. The main cause of instability is updates that sharply cut probabilities on negative samples (0.5% or less of all updates) | Start by instrumenting probability changes on negative-advantage tokens |
| Lower bound on IS weights | The original CISPO, TIS and CIS (C2–C4) set no lower bound. The CIS ablation reports that raising small weights is harmful | If your setup applies a lower bound, revisit its justification |
| Token-level vs sequence-level | When Speed Kills Stability (A3): token-level TIS/MIS eventually collapse and only sequence-level holds. CTPO (C5): a fixed clip clips up to 20% of later tokens | The longer the trajectory, the bigger the later-token problem may become |
| When the policy lags | DLC (A2): with a stale sampler, IS breaks down once ESS falls below 1/2. Score centering (B1): under staleness, SC + TIS is the best combination | Applies to asynchronous rollouts. Using SC requires the rollout engine to store top-k logprobs |
| Groups where all rewards are equal | Score centering (B1) has no effect on groups with zero advantage | If 0/G groups dominate on hard tasks, its effective range is narrow |
| Length | The longest experiment is IcePop’s 65,536 tokens | No source experiments with 100K+ tokens combined with asynchrony |
2. List
A. Training-inference mismatch and RL stability
A1. VeXact: diagnosing TIM with a zero-mismatch reference
- Tianle Zhong et al., ByteDance·University of Virginia · arXiv 2605.14220 (v1 2026-05-14, v2 2026-09-29; based on v2) · “Diagnosing Training-Inference Mismatch in LLM Reinforcement Learning via a Zero-Mismatch Reference”
- In one line: using a rollout engine that is bit-exact with the training engine (VeXact) as a reference makes it possible to show, in isolation, that numerical mismatch at identical weights is by itself enough to make RL collapse.
- Method
- TIM definition (§2, Eq. 1): . Its batch-mean magnitude is small, but the maximum reaches about 1.0 (Figure 1, Qwen3-1.7B GRPO).
- VeXact (§3.1): the same HuggingFace model implementation as FSDP + batch-invariant kernels (RMSNorm, batched matmul, fused MoE) + attention KV splitting disabled. Speed is recovered with chunked prefill, CUDA Graph and pipeline parallelism.
- Experiments: REINFORCE is used to isolate TIM alone (§3.2, dense Qwen3-1.7B and MoE Qwen3-30B-A3B); then, in GRPO, they compare recomputation (the trainer recomputes the old logprobs), bypass (the sampler’s values are used as-is) and post-hoc corrections (§4). The MoE setup: DAPO-Math-17k, global batch 512, response 20,480, 64 H100s, FSDP2 + vLLM/VeXact.
- Results
- MoE REINFORCE (Figure 2): with vLLM, train/val reward fell after step 280 from 0.574/0.293 → 0.255/0.067. VeXact rose to 0.753/0.534.
- Dense GRPO (Figure 3): VeXact held a train reward of about 0.93. vLLM recomputation fell from about 0.87 → 0.40 over the first 650 steps and collapsed to near 0 after about step 1665. vLLM bypass dropped to about 0.4 (without reaching 0).
- KL (K1/K3) under recomputation stayed almost identical to VeXact for the first 700 steps and failed to catch the early degradation (Figure 4). With recomputation, the loss contribution becomes skewed to one side depending on the sign of the advantage (Figure 5, qualitative).
- With bypass, in the first 10 steps on GSM8K, 17.3% of token logprob change directions disagreed with the sign of the advantage. Among post-hoc corrections, token-level TIS () + sequence rejection () came closest to VeXact (Figure 6, qualitative).
- [Interpretation] An MoE + separately served vLLM setup is exactly the configuration in which this paper shows collapse. The first thing to check is whether the trainer recomputes the old logprobs or bypasses them. is defined on a sum over tokens (), so it cannot be used as-is for very long trajectories. Asynchronous staleness is only discussed, not tested (§6).
A2. DLC: separating numerical error from policy lag
- Yu Li et al. (Yufa Zhou, Tian Lan) · arXiv 2610.40945 (2026-10-29) · “On the Origin and Evolution of Training-Inference Mismatch in LLM Reinforcement Learning”
- In one line: if the mismatch is split into the engine’s numerical error (discrepancy) and the policy lag that comes from stale weights, the former is nearly constant and is removed by centering, while the latter amplifies itself and requires ratio clipping and resynchronization.
- Method
-
Decomposition (§4.2, Eq. 2): the trainer runs one extra forward pass with the sampler’s weights to obtain
-
DLC (§7.1, Algorithm 1): score centering on the top-128 head + clipping the lag ratio relative to the sampler weights (, dual-clip ) + resynchronizing the sampler when falls below 1/2.
-
Setup (§3.2): Qwen3-0.6B·1.7B non-thinking, Countdown (reward ±1), 64 prompts × 8 samples, SGD lr 1e-2, 40 steps × 3 runs. Samplers: vLLM BF16 (reference) / FP8 weights + KV cache (quantized) / synchronized every 64 steps (stale, i.e. for all 40 steps).
-
- Results
- The quantized error was constant at about 0.02 nats per token. In the stale setting the discrepancy was below and the lag was two orders of magnitude larger (Figure 2d).
- Qwen3-0.6B at step 40 (Table 2, deviation = KL relative to on-policy / noise floor, accuracy %): stale — score centering 31.7 / 12.2, IS + centering 2.10 / 32.0, DLC 1.93 / 31.7, PPO 699 / 0.0. Quantized — score centering alone 0.80 / 46.5 (on-policy 46.5).
- Qwen3-1.7B stale (Table 4): with IS, ESS dropped below 1/2 at step 11, and by step 30 the deviation was 152× with 0.5% accuracy. IS + resynchronization 2.6 / 36.6%, DLC 0.6 / 51.9% (on-policy 57.6%).
- Continuous asynchrony (max version gap 4, mean lag 2.85 versions, Table 9, single run): DLC 1.2 / 55.9%, IS 1.4 / 52.9% (on-policy 56.8%). Cost: 113.2 s per step vs 50.4 s on-policy (Table 7, including 54.2 s for the forward pass with sampler weights).
- [Interpretation] Asynchronous rollout is a “lag” problem. Token-level IS/clip alone can fail from the point where ESS collapses, so a rule that monitors the ESS of the lag ratio and discards rollouts or resynchronizes below a threshold is worth considering. The evidence comes from 0.6B–8B dense models, a single Countdown task and 40-step experiments. The extra forward pass with sampler weights is expensive at long context.
A3. When Speed Kills Stability
- Jiacai Liu, Yingru Li et al. · blog (original 2025-09-17; moved and revised on 2026-11-15 to richardli.xyz/post/rl-collapse-training-inference)
- In one line: the probability gap between vLLM and FSDP is largest on low-probability tokens and is amplified by multi-turn tool use; token-level corrections fail while sequence-level TIS/MIS hold up.
- Method
- Setup: VeRL, multi-turn tool-integrated reasoning, Qwen3-14B-Base, GRPO, vLLM sampler + FSDP trainer, L20 GPUs. 1024 trajectories per step (64 prompts × 16), lr 1e-6.
- Metric: vllm-kl = over model-generated tokens ( estimator). Tracked together with fsdp-ppl and gradient norm.
- Corrections (§4.2.1): TIS, which truncates the sequence-level IS at , and MIS, which removes sequences exceeding from the loss. Token-level IS is biased because the state occupancy and advantage belong to the behavior policy.
- Results
- vllm-kl magnitude (Figure 7): H20 5e-4–1e-3, L20 1e-3–1e-2, A100 1e-2–1. A collapsed L20 run recovers when continued on H20 from the step-200 checkpoint (Figure 8).
- The mismatch concentrates on tokens whose vLLM probability is near 0 (Figure 4) and is larger in outputs after the first turn. Comparing max_tool_turn 20 vs 100, more tool calls lead to faster collapse (Figures 5·6).
- No effect: vLLM lm_head in FP32 (Figure 11), disabling chunked prefill (Figure 12), enforce_eager·free_cache_engine (Figure 13). Effective: on A100, disabling cascade attention lowers vllm-kl from 5e-2–1e-1 → about 1e-3 (Figure 21). Top-p 0.98–0.999 reduces spikes but slows the reward increase (Figure 19).
- Resuming from step 200, token-level TIS () eventually collapses while sequence-level TIS holds (Figure 14). Token-level MIS also collapses (Figure 18). Sequence-level MIS shows the highest reward/accuracy (Figure 17, qualitative).
- [Interpretation] Long agent trajectories with many tool responses fit the condition this post points to (OOD context → low-probability tokens). CISPO-style token-level clipping belongs to the same family as this post’s “token-level TIS”. Looking at vllm-kl and fsdp-ppl per turn is the first step. On the other hand, a sequence-level ratio grows multiplicatively with length, so almost all very long trajectories could be filtered out. The authors write that they later proposed length-normalized variants (Geo-MIS/Geo-RS), but there are no experiments on them in this post.
- The revision states that it narrows the scope of the claims to runs supported by experiments and corrects some derivations and figure interpretations. The summary above is based on the original and was not cross-checked against the revision.
A4. R3: aligning training and inference routers in MoE
- Wenhan Ma et al., Peking University·Xiaomi · arXiv 2510.11370 (v1 2025-10-13, v3 2026-11-09, ICML 2026) · “Stabilizing MoE Reinforcement Learning by Aligning Training and Inference Routers”
- In one line: in MoE, the router’s expert choices differ between training and inference, so the mismatch is larger than in dense models. Reusing the inference-time routing mask in the training forward pass (Rollout Routing Replay, R3) eliminates collapse.
- Method
- Measurement (§3): generate with Qwen3-30B-A3B in SGLang and recompute in Megatron. 2,048 problems, about 20 million tokens. They measure KL, the fraction of extreme tokens, and router mismatch.
- R3 (§4.1): the inference Top-K mask is reused as-is in training, but the gating softmax is computed from the training logits to keep the gradient. The mask is cached together with the prefix KV cache, so multi-turn needs no re-prefill (§4.2).
- Experiments (§5.1): VeRL + Megatron + SGLang, batch 256 × n=8, response up to 30,720, GRPO (clip 0.20/0.27)·GSPO·TIS ().
- Results
- KL: MoE 1.535e-3 vs dense (Qwen3-8B) 6.4e-4. About 10% of routers pick a different expert, and 94% of tokens disagree in at least one layer (Figure 4). With R3, KL drops from 1.5e-3 → 7.5e-4 and the frequency of large-mismatch tokens falls to 1/10.
- Table 1 (Qwen3-30B-A3B-SFT, mini_step=1, mean score / collapse step): GRPO 62.23 / 60, GRPO+TIS 66.24 / 105, GRPO+R3 71.83 / none, GRPO+TIS+R3 70.14 / none. mini_step=8: GRPO 48.84 / 120, GSPO 66.76, GRPO+R3 68.05.
- SWE-bench Verified (Table 2, trained on R2E-Gym-Lite): GRPO 31.80 (collapses at about step 90) → GRPO+R3 38.60.
- Cost (Table 4): 10 steps 4820 s → 4967 s (103.45%). CPU memory grows by 2.5GB per node for inference and 1.5GB for training.
- [Interpretation] This is the most direct evidence for the MoE + agent task combination. TIS alone collapsed at step 105, while R3 did not collapse. However, the experiments use SGLang + Megatron and do not cover vLLM. Whether it is valid to replay a mask produced by a stale policy onto the latest weights cannot be answered by this paper.
- Caution: the text says “TIS+R3 is 3.29 points lower than R3 alone”, but the difference in Table 1 is 71.83 − 70.14 = 1.69, which does not match.
A5. Defeating Nondeterminism in LLM Inference
- Horace He et al., Thinking Machines Lab · blog (2025-09-10)
- In one line: the main cause of inference nondeterminism is not concurrency but kernels changing their order of operations with batch size (lack of batch invariance). Making the sampler and trainer bit-identical with batch-invariant kernels yields truly on-policy RL.
- Method
- Cause: floating-point addition is not associative. A forward kernel is deterministic run-to-run for the same input, but when the batch size changes with server load, the reduction order changes and so does the result.
- Fix: RMSNorm fixes the per-element reduction order, matmul uses a single kernel configuration for all shapes, and attention updates the KV cache first and fixes the split size rather than the number of splits.
- Implementation: replace ops via the vLLM FlexAttention backend +
torch.Library. The code is in the batch-invariant-ops repository.
- Results
- Qwen3-235B-A22B-Instruct-2507, temperature 0, 1000 tokens × 1000 runs: 80 distinct completions (the most common appearing 78 times), first diverging at token 103. With batch-invariant kernels, all 1000 were identical.
- Speed (Qwen3-8B, 1 GPU, 1000 sequences, 90–110 output tokens): default vLLM 26 s, deterministic vLLM 55 s, 42 s after improving the attention kernel.
- RL (Bigmath RLVR, Qwen 2.5-VL instruct 8B, max rollout 4096): without correction the reward collapses (loss·KL spike near step 318); with importance weighting KL is about 0.001 with occasional spikes; with bit-exact matching KL is 0.
- [Interpretation] This direction removes numerical TIM at the source, and A1’s VeXact follows it. However, the speed measurements use short outputs and an 8B model, so whether the cost is affordable for large MoE models at long context must be measured separately. Only the numerical mismatch disappears; asynchronous staleness (A2’s lag) and MoE routing mismatch need separate correction.
B. Score centering and off-policy drift
B1. Score Centering Stabilizes Off-policy RL
-
Martin Marek, Max Ryabinin, Together AI · arXiv 2609.20807 (2026-09-17) · code martin-marek/score-centering
-
In one line: under TIM, the policy gradient contains a drift (bias) term that accumulates every step, and an additive correction that subtracts the sampler’s expected score cancels it.
-
Key derivation (§4, Eq. 3): writing the score of token as , the gradient computed from samples drawn from the sampler is
Only when is , so that the drift vanishes. Group centering still leaves drift: the group mean is zero per prompt, but the expected advantage per prefix is not.
-
Correction (Eq. 4, 8): . As a loss,
There is no ratio, clipping or masking, and without a critic it gives the same expected update as an exact value baseline.
-
Top-k approximation (§4.1, A.1): the sampler returns only top-k logprobs (k=128). The tail is filled with trainer probabilities rescaled by ( is the head). When combined with IS (A.2), for a weight the head coefficient is set to , with .
-
Results
- Setup: group-centered REINFORCE (), group size 8, SGD lr 1e-2. 0.6B uses 64 prompts and length 512; 30B uses 16 prompts and length 1024.
- Figure 1 (Qwen3-30B-A3B-Base, INTELLECT-2 math, no router replay): with an FP8 sampler even uncorrected PG is stable (58%). With an FP4 KV cache, PG collapses within 200 steps, while SC reaches 52% / TIS 51%. With an INT8 sampler + INT4 KV, SC 30% / TIS 12% / the rest below 5%.
- Figure 3 (Qwen3-0.6B, 3 levels of weight noise): DPPO collapses at about step 160/80/20, and TIS collapses at the two larger levels at about step 180/40. At the largest noise, only SC (alone or combined with TIS/MIS) was stable.
- Figure 4: with an INT8 sampler, SC alone and combined are both best. Under staleness (the engine updated only every 64 steps), SC + TIS/MIS combined is best and better than SC alone. The cost at k=128 is within 1% wall-clock, and k=32 was close to full (Figure 5).
-
Limitations (§6): the remaining term is a covariance under the sampler rather than the trainer, so severe staleness needs IS in combination. The results deliberately create severe mismatch on short sequences as a proxy for long training.
-
[Interpretation] The paper’s Table 1 places CISPO in the same row as TIS (ratio clip ). A setup with CISPO-style clipping + slightly stale rollouts corresponds to “SC + TIS”, the best combination in the paper’s staleness experiments, so one only needs to add the centering term as in the A.2 formula. What is needed is for the rollout engine to store top-k logprobs. On the other hand, a group where all rewards are equal has zero advantage, so both drift and signal are zero and SC has no effect.
B2. Off-Policy Drift in LLM RL (Chris Liu)
- Chris Liu · blog (2026-03-02, v2 2026-05-18, marked WIP)
- In one line: “on-policy” LLM RL is in practice off-policy because of engine mismatch and policy staleness; before correcting, measure first and pick the correction that matches the cause of the mismatch.
- Content
- The decomposition from Section 0 ( = TIM × staleness) and six causes: precision, kernel, tensor parallelism, MoE routing, async lag, quantized inference.
- Diagnostic metrics: per-token log ratio, KL (/), , , Pearson correlation between rollout/actor probabilities.
- Comparison of about 50 methods: PPO clip, DPPO, GSPO, SAPO, CISPO, IcePop mask (), MinPRO, M2PO, OAPL, etc. Gives a decision tree from symptoms (A–F) to actions.
- Main claims
- Thresholds (author’s rules of thumb): healthy is Pearson ≥ 0.99 and KL below 0.02. If Pearson is below 0.95 it is a backend problem that algorithmic correction cannot rescue. If exceeds 0.3, use rejection sampling; at 2.0–4.0, RS + token TIS; if ESS is below 0.3 or the mask exceeds 25%, the system must be fixed.
- Length trap: with a per-token ratio of 1.1, the sequence ratio is about 2.6 at 10 tokens, about 117 at 50 tokens, and about 13,780 at 100 tokens. For variable lengths, geometric-mean aggregation is recommended.
- Async: one-step off-policy gives 1.2–1.4× speedup, fully async 1.92–2.66× (Qwen2.5-Math-7B). OAPL reported stability even at a lag of 400+ updates.
- A length surge of more than 20% within 100 steps is a precursor to collapse; halve the learning rate.
- Score centering is not covered (written before B1). Instead it provides diagnostic metrics, thresholds, MoE routing countermeasures (R3, Keep Routing, IcePop) and a taxonomy of async modes. The post itself is WIP, and the thresholds are rules of thumb from verl, so other stacks need recalibration.
B3. RLHF Book, Score Centering section of the Policy Gradients chapter
- Nathan Lambert · rlhfbook.com/c/06-policy-gradients
- In one line: introduces score centering not as a replacement for TIS but as a correction used on top of TIS, and lays out the derivation and top-k implementation code in textbook notation.
- Content
- eq. 55–59: , , , .
- eq. 61 loss: . It is computed in a single backward pass.
- eq. 62–63 top-k: the tail is filled with and . Includes PyTorch example code (tail mass clamped at 1e-6, coefficients detached).
- TIS from the preceding section: a one-sided cap , example . The log-ratio clamp of ±10 is for numerical stability.
- Main claims: drift enters only through the mean advantage and pushes the weights in the same direction regardless of which token was sampled, pulling the learner toward the stale/quantized sampler and accumulating instability. The book’s Table 2 (adapted from B1 Table 1) summarizes the ratio handling of each method: TIS/CISPO , MIS (IcePop) , PPO , DAPO , GSPO , TOPR , DPPO TV 0.2. There are no experimental numbers.
- [Interpretation] eq. 61 uses the sequence-level advantage as-is, so it can be layered directly on GRPO advantages. The book’s code is a standalone version without IS, so when combining it with CISPO weighting you need B1’s A.2 formula for .
B4. StableReinforce (Tinker docs)
- Thinking Machines Lab · Tinker docs (marked Alpha)
- In one line: documentation for using a REINFORCE-variant loss (
stable_reinforce) said to be stable even when the sampling policy and the training policy differ. The formula for the main objective is not disclosed. - Content
-
Create the sampling client with
record_stability_info=Trueand attachsequence_idprovenance to the training datum. Recorded sequences can be used for training for 1 day after sampling. -
forward_backward(data, loss_fn="stable_reinforce", loss_fn_config={"kl_coeff": 0.01}). Inputs aretarget_tokens, samplinglogprobs, andadvantages. -
Sampler–learner KL: instead of a reference model, it estimates and adds between the sampler and the learner .
The gradient of is , which raises the probability of sampled tokens regardless of advantage and keeps the learner near the sampler. grows quickly on tokens where the learner’s probability is much larger than the sampler’s. Defaults are
kl_coeff0.01 andkl_estimator“k1”.
-
- The docs say it is “extremely stable” in internal post-training including highly off-policy async RL and low-precision numerics, but give no numbers. Whether
record_stability_inforecords top-k logprobs (i.e. whether this is score centering) cannot be confirmed from the docs. - [Interpretation] The KL term also gives gradient to tokens in zero-advantage groups, so tokens that would otherwise be discarded with no signal serve as an anchor tying the learner to the sampler. Whether this helps or slows training needs experiments.
B5. Score Centering explainer (Cameron R. Wolfe)
- Cameron R. Wolfe · Substack (2026-11-09)
- In one line: an explainer that walks through the B1 paper step by step, starting from TIM and the limits of IS, with an attached PyTorch implementation that has IS options. This note’s reading list comes from here.
- Content: the limits of IS (multiplicative ratios increase variance, and clip/mask introduces bias that brings drift back), a description of the experiment that reproduces instability with ( a fixed isotropic Gaussian), and an implementation with a top-k head + rescaled trainer tail. The code uses
top_k = 128,group_size = 8,is_method ∈ {none, tis(clamp max 2.0), mis([0.5, 5.0])}, and correction coefficient . Because a sampled token can fall outside the top-k, the sampled-token logprob is stored separately. - Main claims (all experiments cited from the paper): offline training is stable only with non-negative rewards; online, group-centered rewards are the most stable but drift remains. Under severe staleness, SC alone does not stabilize training, so the SC + IS combination is recommended. Because of the top-k approximation, drift removal is only approximate.
- [Interpretation] The explanation that “clipping introduces bias and brings drift back” means that a setup using only CISPO-style clipping can accumulate drift in long training. The example code has undefined variables and does not run as-is, so it should be checked against the paper’s repo.
C. Importance sampling and related techniques
C1. IcePop: two-sided masking on the engine ratio
- Ling Team (Anqi Shen et al.), Inclusion AI · arXiv 2510.18855 (2025-10-21) · “Every Step Evolves: Scaling Reinforcement Learning for Trillion-Scale Thinking Model” §2.3.2
- In one line: two-sided masking that discards the gradient entirely for tokens whose training/inference engine probability ratio falls outside prevents the mismatch from accumulating in MoE RL.
- Method
-
Problem: because the engines are separate, probabilities differ even at the same , and this is amplified by MoE routing and long CoT. Theorem 1 (conditional): grows as .
-
Objective: multiply the GRPO term by .
-
Inside the interval it corrects by ; everything outside is discarded. Settings: , , lr 2e-6, KL coefficient 0, 480 prompts × 8 rollouts per step, up to 65,536 tokens.
-
- Results
- Ring-mini-2.0 (16.8B MoE, 0.75B active), AIME25 Avg@64: more than 14 percentage points above the 63% base, a 6% relative gap over TIS (Figure 5).
- Masked tokens are 1–2‰ of training tokens and have higher entropy than tokens overall (Figure 12). The baseline’s reward collapses after 180–200 steps (Figure 10).
- Sensitivity (Figure 13): is stable, is immediately unstable, is stable but also includes tokens with higher log prob.
- [Interpretation] IcePop masks, rather than clips, outside the interval. Logging the fraction and entropy of out-of-interval tokens lets you compare against the 1–2‰ reference. IcePop’s only captures the engine gap at the same , so if rollouts are several steps stale, policy lag will mix into the ratio and the out-of-interval fraction will grow.
C2. TIS: Truncated Importance Sampling (blog)
- Feng Yao, Liyuan Liu, Dinghuai Zhang, Chengyu Dong, Jingbo Shang, Jianfeng Gao · blog (posted 2025-08-05, revised 2025-10-13) · “Your Efficient RL Framework Secretly Brings You Off-Policy RL Training”
- Only the first part of the original Notion page was read; it was supplemented with the authors’ presentation slides, the NeurIPS 2025 OPT workshop abstract (“On the Rollout-Training Mismatch in Modern RL Systems”), the authors’ Flash-RL README, and the TIS definition in §2.2 of the C3 paper.
- In one line: vLLM (rollout) and FSDP (training) give different token probabilities even with the same weights, making on-policy RL effectively off-policy; this is corrected with truncated importance sampling that clips only the upper end.
- Method: the ideal update actually becomes . TIS multiplies by replaced with . System patches, such as making vLLM return the actual sampling probabilities or raising the LM head to FP32, help but leave a gap, so they chose algorithmic correction.
- Results (based on the slide text)
- Maximum token-probability gap: 1.0 on DAPO Qwen2.5-32B·DS-Qwen2.5-1.5B, about 0.4 in ordinary RL on GSM8K with 0.5B, about 1.0 with INT8 rollouts.
- Comparing PPO, Recompute, PPO-IS, Vanilla-IS and TIS on GSM8K·PPO·Qwen2.5-0.5B-Instruct, only TIS worked consistently. When the gap is small, the TIS gain is small but it does no harm.
- In DAPO-32B, rollout takes about 70% of training time. Using INT8/FP8 quantized rollouts together with TIS matches BF16 + TIS performance (FlashRL).
- [Interpretation] TIS has no lower bound and only clips the upper end. The slides say the maximum gap grows with longer responses and more different parallel configurations, so for long trajectories per-token mismatch statistics (max, mean) should be examined by length bucket.
C3. CIS: Calibrated Importance Sampling
- Tianrun Yu et al., Brigham Young University·UNC Chapel Hill · arXiv 2609.32444 (2026-09-26) · “Rethinking Training-Inference Mismatch in LLM Reinforcement Learning: Where It Arises and How to Correct It”
- In one line: decomposes the ratio into “token confidence” and the “cross-engine log-odds shift”, and proposes calibrated IS, which applies a constant threshold only to the shift so that the upper cap narrows as confidence grows.
- Method
-
Lemma 3.1: with , , ,
In MoE, is heavy-tailed, and routing mismatch fattens the tail.
-
Theorem 3.2: the error bound of exact IS is dominated by . In a trained MoE, is 7.07 at and 9.2e6 at .
-
CIS (Eq. 4): , with stop-gradient applied. Defaults , . Only the upper end is clipped; the lower end is left as is.
-
Rewriting a fixed cap (TIS) in terms of the shift gives , so bias concentrates on low-confidence tokens (Eq. 5).
-
- Results
- Table 1 (RL on GSM8K, average of 5 math benchmarks, 3 seeds): on Qwen1.5-MoE-A2.7B, CIS 34.78 / IcePop 34.18 / KPop 33.50 / Exact 32.48 / TIS 31.40 / no correction 30.99 / GSPO 28.90. On Qwen3-30B-A3B, CIS 69.88 / GSPO 69.23 / TIS 69.14 / no correction 68.26. The paper states explicitly that the gap to IcePop is within seed variance in some columns.
- Table 2 ablation: a two-sided band that raises small weights () collapsed to an average of 6.01 (below the base of 28.93). TIS gave 8.88, and removing the floor () gave 29.02.
- 99.96% of comes from the side (Figure 5a). Total bias is 0.0064 for CIS vs 0.0078 for TIS.
- [Interpretation] A setup that puts a lower bound on IS weights goes in the same direction as this paper’s band, even if weaker, in that it raises small weights. This gives grounds to look at the fraction of tokens below the bound and at an ablation that removes the bound. Validation was done only up to 1,024 generated tokens and within 2 versions of staleness (under 1% stale tokens) (§D.6).
C4. CISPO (MiniMax-M1)
- MiniMax · arXiv 2506.13585 (2025-06-16) · “MiniMax-M1: Scaling Test-Time Compute Efficiently with Lightning Attention” §3.1
- In one line: instead of clipping token updates as in PPO/GRPO, it clips only the IS weight, so tokens with large ratios keep receiving gradient.
- Method
-
Problem: reflection tokens (However, Recheck, Wait, Aha) have low probability, so after the first update their grows, they get clipped out, and they no longer contribute to subsequent off-policy updates. Under 16 off-policy updates per generation batch, widening DAPO’s upper bound had little effect.
-
Objective (Eq. 4–5):
-
is set large so there is effectively no lower bound, and only is tuned. There is no KL term, and DAPO’s dynamic sampling and length penalty are used. Multiplying by a token mask optionally expresses the same discard condition as the PPO trust region (Eq. 6–7).
-
- Results: Qwen2.5-32B-base zero-RL, on AIME 2024 higher than GRPO and DAPO at the same step, reaching DAPO’s performance in 50% of the steps (Figure 2). Clipping the weight makes the gradient slightly biased, but every token’s contribution is preserved.
- Same paper, §3.2: raising the LM head to FP32 brought the training/inference probability correlation from about 0.9x → 0.99x. AdamW , eps 1e-15, and early termination when 3,000 consecutive tokens have probability above 0.99.
- [Interpretation] The original paper sets no lower bound, and the value of is not given in §3.1. Values such as an upper cap of 5 come from IcePop and DPPO. C9 (DPPO) reports that CISPO collapsed on Qwen3-30B-A3B-Base without routing replay, so if CISPO is used alone on MoE, the mismatch trend should be monitored.
C5. CTPO: IS from a cumulative-token perspective
- Yuheng Zhang et al., UIUC·University of Michigan·Amazon · arXiv 2605.07331 (2026-05-08) · “Rethinking Importance Sampling in LLM Policy Optimization: A Cumulative Token Perspective”
- In one line: between the token ratio (biased) and the full-sequence ratio (high variance), it uses the cumulative ratio up to position and widens the clip range in proportion to .
- Method
- Cumulative ratio (§3.1): . Proposition 1: in the token-level policy gradient, this prefix correction is unbiased. GRPO’s ignores the difference in prefix distributions and is biased.
- Proposition 2 (§3.2): if , then . GSPO’s length-normalized ratio is not exact sequence IS.
- Position-adaptive clip (§3.3): since , set , () and apply a PPO-style clip on the interval . , .
- Results
- Table 2 (tool-integrated reasoning, avg@32, average over 4 benchmarks): on Qwen3-4B, GRPO 43.2 / GSPO 47.7 / CTPO 51.4; on Qwen3-14B, 54.6 / 55.5 / 58.8. However, on 14B HMMT 25, GRPO’s 51.5 is higher than CTPO’s 48.0.
- Applying a fixed clip to the cumulative ratio clips up to 20% of later tokens and close to 0% of early ones. The adaptive clip gives 5–10% regardless of position (Figure 1). Table 3: fixed clip 55.7 vs adaptive clip 58.8 (Qwen3-14B average).
- [Interpretation] By this paper’s account, token-level IS is a biased estimator that lacks prefix correction. However, the experiments go up to 5 turns·8,000 tokens, so whether the cumulative ratio holds up numerically on very long trajectories is unverified. The observation that the standard deviation of the cumulative log ratio grows as can be used for diagnostics right away.
C6. TRM: Trust Region Masking
- Yingru Li et al., Fudan University·CUHK Shenzhen · arXiv 2512.23075 (2025-12-28, based on v5 2026-06-26) · “Trust Region Masking for Long-Horizon LLM Reinforcement Learning”
- In one line: because the bound on the surrogate error depends on the maximum token divergence, if even one token leaves the trust region, the whole sequence is masked.
- Method
-
The classical bound is : . With and it is about 1677, which is meaningless (§3.1). They present Pinsker-Marginal , Mixed , and , the minimum of the Adaptive bounds.
-
Limits of token-level methods (§4.1): PPO clip leaks gradient when and , and token masking only changes the loss while the divergence between the two policies stays the same.
-
TRM (Algorithm 1):
is the total batch size. Without full logits, use (for the max) and (for the mean). They recommend combining the max and mean criteria and monitoring that acceptance stays at 70% or above.
-
- Results
- Numerical example (§4.4): with , , , vs the classical bound of 1677 (409×).
- Experiments (§5, Qwen3-8B-Base, DAPO-MATH-17k, vLLM + FSDP, AIME25 avg@32): with PPO clip the PPL gap grew and the score dropped (Figure 1), while TRM-Max () and TRM-Avg () were stable (Figure 2). The looser Max 0.1 and Avg 0.002 failed on their own and succeeded when combined (Figure 3). There is no score table.
- Length bias (Appendix F): , so long sequences are systematically rejected. They propose a length-neutral variant, LN-TRM.
- [Interpretation] At tens of thousands of tokens or more, max-based acceptance would plunge as . LN-TRM, a mean-based criterion, or turn-level masking are more realistic than the original. The three causes it lists (backend differences, MoE routing, distributed staleness) are a common combination in large-MoE agent RL.
C7. TOPR: Tapered Off-Policy REINFORCE
- Nicolas Le Roux et al., Mila·Reliant AI · arXiv 2503.14286 (2025-03-18)
- In one line: treats correct trajectories like SFT with weight 1 and incorrect trajectories with IS whose ratio is truncated to , training stably even fully offline without a KL term.
- Method
-
General form (§3, Eq. 7): the trajectory-level ratio is clipped with truncation limits , per reward sign.
-
Basic form (Eq. 8): is the set of correct and the set of incorrect trajectories.
-
Since , the contribution of incorrect trajectories naturally shrinks as their probability falls, and since , even low-probability correct trajectories are guaranteed a minimum learning rate. A baseline changes the effective fraction of correct answers to (Eq. 12).
-
- Results
- Llama 3 8B, GSM8K·MATH, reward ±1, lr 5e-7, up to 512 tokens: naive REINFORCE collapses, and PPO () makes no progress because most data lies outside the clip range (Fig. 1).
- Performance peaks at an effective correct fraction of 10–20% (Fig. 5–6). Untruncated IS, with gradient clipping 100 and 60% incorrect answers, gives 31% bad reasoning (base 12%) (Fig. 7).
- With Anna Karenina sampling, GSM8K pass@1 is 79.6% vs 75.4% for uniform. Verifier (Table 2): accuracy 32.6% → 70.9%, invalid 34.2% → 0.90%.
- [Interpretation] The key is a design with different weight limits per advantage sign. It supports variants that cap the negative-advantage side at 1, and it points in the same direction as C9’s “instability comes from large updates on negative samples”. The ratio is trajectory-level and the experiments use 512 tokens, so on long trajectories the ratio would stick to 0 or the cap. Only the idea should be carried over to the token level.
C8. GSPO: Group Sequence Policy Optimization
- Chujie Zheng et al., Qwen Team·Alibaba · arXiv 2507.18071 (2025-07-24)
- In one line: clips and optimizes a length-normalized sequence likelihood ratio instead of token ratios, stabilizing MoE RL without routing replay.
- Method
-
Diagnosis (§3): GRPO’s token weights have only one sample per token, so they do not correct the distribution and only add high-variance noise. The unit of reward and the unit of optimization should match.
-
Objective (§4.1, Eq. 5–7):
-
Every token of a response receives the same weight . GSPO-token (§4.3): . Its value equals , but it allows per-token advantages, which suits multi-turn RL.
-
- Results
- Qwen3-30B-A3B-Base cold-start, split into 4 mini-batches. Clip ranges: GSPO 3e-4 / 4e-4, GRPO 0.2 / 0.27. At equal compute, GSPO leads on training reward and on AIME’24, LiveCodeBench and CodeForces (Figure 1, no numerical table).
- It is more efficient even though the fraction of clipped tokens is two orders of magnitude larger than GRPO’s (Figure 2).
- In the 48-layer Qwen3-30B-A3B-Base, about 10% of the active experts for the same sample change after every gradient update. GRPO requires Routing Replay, but GSPO does not (§5.3). The paper also mentions the possibility of using inference-engine likelihoods without recomputation (§5.4).
- [Interpretation] “10% of experts change per update” is direct evidence that token ratios are shaken by routing, and it would be larger if rollouts are several steps stale. For long multi-turn trajectories, GSPO-token is a candidate. However, in C3 Table 1, GSPO is sometimes below no correction depending on the model (Qwen1.5-MoE 28.90 vs 30.99). It is better treated as an ablation target than as a replacement.
C9. DPPO: rethinking the trust region in LLM RL
- Penghui Qi et al., Sea AI Lab·National University of Singapore · arXiv 2602.04879 (2026-02-04, based on v3 2026-06-12) · “Rethinking the Trust Region in LLM Reinforcement Learning”
- In one line: instead of PPO, which clips on the single sampled-token ratio, it determines the trust-region mask from an estimate of the divergence (TV/KL) between policy distributions.
- Method
- Problem (§4.2): is a single-sample estimate of TV. When a probability changes from , and it is clipped even though its TV contribution is negligible, while gives and passes even though 0.19 of mass moves.
- Objective (§4.3, Eq. 12): . if or ; otherwise 1. Replacing with gives PPO.
- Approximations (§4.4): Binary TV ; Binary KL is the Bernoulli KL over (sampled token, rest); Top-K uses the top K + other. is 0.15–0.2 for TV and 0.05 for KL.
- Unified form (Appendix C, Eq. 23): . PG-TIS (CISPO) has , (stability experiments), and in the scaling experiments.
- Results
- Stability (§5, DeepSeek-R1-Distill-Qwen-1.5B): PG-IS and CISPO without a trust region saw growing mismatch and collapsed, while DPPO was stable (Figure 3). A trust region based on the recomputed distribution (MiniRL) also collapsed. The reference must be the rollout distribution, and skipping recomputation also cuts cost by about 25% (§5.2).
- The main cause of instability is updates that cut probability by more than 0.5 on negative samples, and these make up 0.5% or less of the total (§5.3, Figure 5). TIS actually worsened stability (§5.4).
- Scaling (§7, 5 configurations including Qwen3-30B-A3B-Base): CISPO suddenly collapsed completely on an MoE Base without R3, and DPPO without R3 outperformed baselines that used R3. RLHF AlpacaEval 2.0 LC-WR 80.90 vs GRPO 77.05 (Table 2).
- [Interpretation] This is the most direct counterexample for an MoE + CISPO-style clip setup. Weight clipping only truncates the weight and does not block the update, so the trend of mean and the fraction of “tokens whose probability is sharply cut under negative advantage” should be instrumented first. The Binary TV mask needs only the sampled-token probabilities from both engines, so it can be implemented with vLLM logprobs alone. Experiments go up to 16,384 tokens, and since the trust-region reference is the rollout policy, the mask fraction will grow with stale rollouts.
C comparison table
| Method | IS unit | Weight handling | Tokens whose gradient is discarded | Purpose |
|---|---|---|---|---|
| IcePop | token (cross-engine ratio) | mask outside , inside ratio correction + PPO clip | yes (outside interval, 1–2‰) | suppress accumulation of engine mismatch (MoE) |
| TIS | token (cross-engine ratio) | truncate upper end, | none | correct vLLM·FSDP mismatch, allow quantized rollouts |
| CIS | token (cross-engine ratio) | confidence-dependent cap, | none | spread truncation bias evenly across confidence levels |
| CISPO | token (new/old policy) | clip IS weight + sg, effectively no lower bound | none (mask optional) | keep gradient on low-probability reasoning tokens |
| CTPO | cumulative (product up to position ) | position-adaptive clip, width | yes (5–10% regardless of position) | unbiased prefix correction + lower variance than sequence |
| TRM | sequence-level decision (max/mean of token KL) | mask entire violating sequence | yes (whole sequence) | guaranteed valid improvement at long horizon |
| TOPR | trajectory | truncate by reward sign: correct 1, incorrect | none (incorrect decays as ratio→0) | stable offline training without KL |
| GSPO | sequence (length-normalized geometric mean) | sequence-level PPO clip | yes (whole response, about 100× the fraction of GRPO) | stabilize MoE RL, remove routing replay |
| DPPO | token (decision by distribution divergence) | mask when TV/KL exceeds in the diverging direction | yes (tokens exceeding divergence) | fix over-constraint of low-probability tokens and under-constraint of high-probability tokens |
Caveats when reading
- For results presented only in figures (IcePop Figures 5·10–13, CISPO Figure 2, GSPO Figures 1–3, TRM Figures 1–3, DPPO Figures 3–9, VeXact’s KL·gradient norm curves, etc.), only the numbers stated in the text were reproduced. Places marked “qualitative” have no numbers.
- Experiment lengths: IcePop 65,536 tokens, R3 30,720, VeXact 20,480, DPPO 16,384, CTPO 8,000, CIS 1,024, score centering 1,024, TOPR 512. No source directly experiments with trajectories of 100K+ tokens or with the combination of asynchronous staleness and MoE, so every [Interpretation] is unverified under those conditions.
- B2’s thresholds are the author’s rules of thumb, and B3’s statement that “many frontier labs quietly use this method” is unsourced. B4 does not disclose the formula of its main objective.
- For C1 (IcePop) and C4 (CISPO), only the designated sections and adjacent sections were read. The rest of those papers (Ring-1T benchmarks, the M1 model description) was read only at the abstract level.
Cameron R. Wolfe의 글 “Score Centering”이 추천한 읽기 목록 19편을 정리한다. 원문(arXiv HTML·블로그)과 숫자·표·절 번호를 대조했다. 그림으로만 제시된 결과는 본문 문장과 caption에 적힌 수치만 옮겼다. [해석] 표시는 논문 주장이 아니라 읽은 사람의 해석이다.
관련 레슨: /study/rlhf/off-policy-mismatch/ · /study/rlhf/rlvr-grpo/ · /study/rl/ppo/ · /study/rlhf/rlhf-ppo/
0. 문제 설정과 표기
LLM RL에서 rollout은 보통 vLLM·SGLang 같은 추론 엔진(sampler)이 만들고, gradient는 FSDP·Megatron 같은 학습 엔진(trainer)이 계산한다. 같은 가중치라도 두 엔진의 토큰 확률은 다르고, 비동기 rollout이면 sampler의 가중치가 몇 step 뒤처져 있다. 그래서 “on-policy” RL이 실제로는 off-policy가 된다. 이를 training-inference mismatch(TIM) 라 부른다.
이 노트의 표기는 다음과 같다(자료마다 기호가 달라 가능한 한 맞췄다).
| 기호 | 뜻 |
|---|---|
| 또는 | trainer가 계산한 현재 policy 확률 |
| rollout을 만든 가중치 에서 trainer가 계산한 확률 | |
| , , | sampler(추론 엔진)가 실제로 샘플링한 확률 |
| 정책 ratio | |
| 같은 가중치에서의 엔진 간 ratio | |
| , | advantage, reward |
불일치는 두 성분으로 나뉜다.
1. 한눈에 보기
| 주제 | 자료가 말하는 것 | 생각할 점 [해석] |
|---|---|---|
| sampler와 trainer의 수치 차이 | VeXact(A1): Qwen3-30B-A3B에서 vLLM rollout은 step 280 뒤 reward가 떨어지고, bit 단위로 일치하는 엔진은 계속 오른다. KL 모니터는 초기 열화를 못 잡는다 | 수치 mismatch만으로도 무너질 수 있다. KL만 보는 감시는 부족하다 |
| MoE router 불일치 | R3(A4): MoE는 KL이 dense의 2배 이상이고, routing mask를 replay하면 붕괴가 사라진다. GSPO(C8)는 replay 없이 안정이라고 주장한다 | MoE라면 routing replay나 sequence 단위 ratio가 후보다 |
| CISPO 단독 사용 | DPPO(C9): routing replay 없는 MoE Base 모델에서 CISPO가 갑자기 완전 붕괴한다. 불안정의 주원인은 음수 샘플에서 확률을 크게 깎는 update(전체의 0.5% 이하)다 | 음수 advantage 토큰의 확률 변화부터 계측할 것 |
| IS 가중치의 하한 | CISPO 원형·TIS·CIS(C2–C4)는 하한을 두지 않는다. CIS ablation은 작은 가중치를 위로 올리면 해롭다고 보고한다 | 하한을 거는 설정이라면 근거를 다시 볼 것 |
| token 단위 대 sequence 단위 | When Speed Kills Stability(A3): token 단위 TIS/MIS는 나중에 붕괴하고 sequence 단위만 버틴다. CTPO(C5): 고정 clip은 뒤쪽 토큰을 최대 20% clip한다 | 긴 trajectory일수록 뒤쪽 토큰 문제가 커질 수 있다 |
| policy가 뒤처질 때 | DLC(A2): stale sampler에서 IS는 ESS가 1/2 아래로 내려가면 무너진다. Score centering(B1): staleness에서는 SC + TIS 조합이 최상이다 | 비동기 rollout에 해당한다. SC를 쓰려면 rollout 엔진이 top-k logprob을 저장해야 한다 |
| 보상이 모두 같은 그룹 | score centering(B1)은 advantage가 0인 그룹에는 효과가 없다 | 어려운 과제에서 0/G 그룹이 대부분이면 효과 범위가 좁다 |
| 길이 | 가장 긴 실험이 IcePop의 65,536 토큰이다 | 10만 토큰 이상 + 비동기 조합은 어느 자료도 실험하지 않았다 |
2. 목록
A. Training-inference mismatch와 RL 안정성
A1. VeXact: zero-mismatch 기준선으로 TIM 진단하기
- Tianle Zhong 외, ByteDance·University of Virginia · arXiv 2605.14220 (v1 2026-05-14, v2 2026-09-29, v2 기준) · “Diagnosing Training-Inference Mismatch in LLM Reinforcement Learning via a Zero-Mismatch Reference”
- 한 줄: 학습 엔진과 bit 단위로 일치하는 rollout 엔진(VeXact)을 기준선으로 두면, 같은 가중치에서의 수치 불일치만으로도 RL이 붕괴함을 분리해 보일 수 있다.
- 방법
- TIM 정의(§2, Eq. 1): . batch 평균 크기는 작지만 최댓값은 1.0 근처까지 간다(Figure 1, Qwen3-1.7B GRPO).
- VeXact(§3.1): FSDP와 같은 HuggingFace 모델 구현 + batch-invariant kernel(RMSNorm, batched matmul, fused MoE) + attention KV splitting 비활성화. 속도는 chunked prefill·CUDA Graph·pipeline parallelism으로 보완한다.
- 실험: REINFORCE로 TIM만 분리(§3.2, dense Qwen3-1.7B와 MoE Qwen3-30B-A3B)한 뒤, GRPO에서 old logprob을 trainer가 다시 계산하는 recomputation, sampler 값을 그대로 쓰는 bypass, 사후 보정을 비교한다(§4). MoE 설정은 DAPO-Math-17k, global batch 512, response 20,480, H100 64장, FSDP2 + vLLM/VeXact.
- 결과
- MoE REINFORCE(Figure 2): vLLM은 step 280 이후 train/val reward가 0.574/0.293 → 0.255/0.067로 하락했다. VeXact는 0.753/0.534까지 올랐다.
- Dense GRPO(Figure 3): VeXact는 train reward 약 0.93을 유지했다. vLLM recomputation은 첫 650 step에 약 0.87 → 0.40으로 떨어지고 약 step 1665 이후 0 근처로 붕괴했다. vLLM bypass는 약 0.4로 하락했다(0까지는 가지 않음).
- KL(K1/K3)은 recomputation에서 첫 700 step 동안 VeXact와 거의 같아 초기 열화를 잡지 못했다(Figure 4). recomputation은 advantage 부호에 따라 loss 기여가 한쪽으로 치우친다(Figure 5, 정성).
- bypass에서는 GSM8K 첫 10 step에서 token logprob 변화 방향의 17.3%가 advantage 부호와 어긋났다. 사후 보정 중에서는 token-level TIS() + sequence rejection() 조합이 VeXact에 가장 가까웠다(Figure 6, 정성).
- [해석] MoE + 분리된 vLLM 서빙 구성은 이 논문이 붕괴를 보인 구성과 같다. trainer가 old logprob을 recompute하는지 bypass하는지부터 확인해야 한다. 는 토큰 합() 기준이라 아주 긴 trajectory에는 그대로 못 쓴다. 비동기 staleness는 논의만 있고 실험은 없다(§6).
A2. DLC: 수치 오차와 policy lag의 분리
- Yu Li 외 (Yufa Zhou, Tian Lan) · arXiv 2610.40945 (2026-10-29) · “On the Origin and Evolution of Training-Inference Mismatch in LLM Reinforcement Learning”
- 한 줄: mismatch를 엔진의 수치 오차(discrepancy)와 stale 가중치에서 오는 policy lag로 분리하면, 전자는 거의 상수라 centering으로 지워지고 후자는 스스로 증폭되어 ratio clip과 재동기화가 필요하다.
- 방법
-
분해(§4.2, Eq. 2): trainer가 sampler 가중치로 forward를 한 번 더 해서 다음을 얻는다.
-
DLC(§7.1, Algorithm 1): top-128 head에서 score centering + lag ratio 를 sampler 가중치 기준으로 clip(, dual-clip ) + 가 1/2 미만이면 sampler를 재동기화한다.
-
설정(§3.2): Qwen3-0.6B·1.7B non-thinking, Countdown(reward ±1), 64 prompt × 8 sample, SGD lr 1e-2, 40 step × 3회. sampler는 vLLM BF16(기준) / FP8 weight + KV cache(quantized) / 64 step마다 동기화(stale, 즉 40 step 내내 ).
-
- 결과
- quantized 오차는 토큰당 약 0.02 nats로 일정했다. stale에서는 discrepancy가 미만이고 lag가 두 자릿수 배 컸다(Figure 2d).
- Qwen3-0.6B step 40(Table 2, deviation = on-policy 대비 KL / noise floor, accuracy %): stale에서 score centering 31.7 / 12.2, IS + centering 2.10 / 32.0, DLC 1.93 / 31.7, PPO 699 / 0.0. quantized에서는 score centering만으로 0.80 / 46.5(on-policy 46.5).
- Qwen3-1.7B stale(Table 4): IS는 ESS가 step 11에 1/2 아래로 떨어지고 step 30에 deviation 152배, accuracy 0.5%. IS + 재동기화 2.6 / 36.6%, DLC 0.6 / 51.9%(on-policy 57.6%).
- 연속 비동기(최대 version gap 4, 평균 2.85 version 지연, Table 9, 단일 run): DLC 1.2 / 55.9%, IS 1.4 / 52.9%(on-policy 56.8%). 비용은 step당 113.2 s 대 on-policy 50.4 s(Table 7, sampler 가중치 forward 54.2 s 포함).
- [해석] 비동기 rollout은 “lag” 문제다. token 단위 IS/clip만으로는 ESS가 무너지는 지점부터 실패할 수 있으므로, lag ratio의 ESS를 모니터하고 임계 아래면 rollout을 버리거나 재동기화하는 규칙을 검토할 만하다. 근거는 0.6B–8B dense, Countdown 단일 과제, 40 step 실험이다. sampler 가중치로의 추가 forward는 긴 context에서 비용이 크다.
A3. When Speed Kills Stability
- Jiacai Liu, Yingru Li 외 · 블로그 (2025-09-17 원본. 2026-11-15에 richardli.xyz/post/rl-collapse-training-inference로 이전·개정)
- 한 줄: vLLM과 FSDP의 확률 차이는 저확률 토큰에서 가장 크고 multi-turn tool 사용에서 증폭되며, token 단위 보정은 실패하고 sequence 단위 TIS/MIS가 버틴다.
- 방법
- 설정: VeRL, multi-turn tool-integrated reasoning, Qwen3-14B-Base, GRPO, vLLM sampler + FSDP trainer, L20 GPU. step당 1024 trajectory(64 prompt × 16), lr 1e-6.
- 지표: vllm-kl = 모델이 생성한 토큰에 대한 ( estimator). fsdp-ppl, gradient norm과 함께 추적한다.
- 보정(§4.2.1): sequence 단위 IS를 로 자르는 TIS, 를 넘는 sequence를 loss에서 빼는 MIS. token 단위 IS는 state occupancy와 advantage가 behavior policy의 것이라 편향된다.
- 결과
- vllm-kl 크기(Figure 7): H20 5e-4–1e-3, L20 1e-3–1e-2, A100 1e-2–1. 붕괴한 L20 run을 step 200 체크포인트에서 H20으로 이어 돌리면 회복한다(Figure 8).
- 불일치는 vLLM 확률이 0에 가까운 토큰에 집중되고(Figure 4), 첫 turn이 아닌 출력에서 크다. max_tool_turn 20 대 100을 비교하면 tool call이 많을수록 붕괴가 빠르다(Figure 5·6).
- 효과 없음: vLLM lm_head FP32(Figure 11), chunked prefill 끄기(Figure 12), enforce_eager·free_cache_engine(Figure 13). 효과 있음: A100에서 cascade attention을 끄면 vllm-kl이 5e-2–1e-1 → 약 1e-3(Figure 21). top-p 0.98–0.999는 spike를 줄이지만 reward 상승이 느려진다(Figure 19).
- step 200에서 재개했을 때 token 단위 TIS()는 나중에 붕괴하고 sequence 단위 TIS는 유지된다(Figure 14). token 단위 MIS도 붕괴한다(Figure 18). sequence 단위 MIS가 가장 높은 reward/accuracy를 보인다(Figure 17, 정성).
- [해석] tool 응답이 많은 긴 agent trajectory는 이 글이 지목한 조건(OOD context → 저확률 토큰)에 해당한다. CISPO식 token 단위 clip은 이 글의 “token-level TIS”와 같은 계열이다. vllm-kl·fsdp-ppl을 turn별로 보는 것이 첫 단계다. 반면 sequence 단위 ratio는 길이에 따라 곱으로 커져 매우 긴 trajectory는 거의 전부 걸러질 수 있다. 저자들은 길이 정규화판(Geo-MIS/Geo-RS)을 후속으로 제시했다고 적었으나 이 글 본문에는 실험이 없다.
- 개정판은 주장 범위를 실험이 뒷받침하는 run으로 좁히고 일부 유도·그림 해석을 고쳤다고 밝힌다. 위 요약은 원본 기준이며 개정판과 대조하지 않았다.
A4. R3: MoE의 학습·추론 router 맞추기
- Wenhan Ma 외, Peking University·Xiaomi · arXiv 2510.11370 (v1 2025-10-13, v3 2026-11-09, ICML 2026) · “Stabilizing MoE Reinforcement Learning by Aligning Training and Inference Routers”
- 한 줄: MoE는 학습·추론 사이에 router의 expert 선택이 달라져 dense보다 불일치가 크다. 추론 때의 routing mask를 학습 forward에서 재사용(Rollout Routing Replay, R3)하면 붕괴가 사라진다.
- 방법
- 측정(§3): Qwen3-30B-A3B로 SGLang에서 생성하고 Megatron에서 재계산. 2,048문제, 약 2천만 토큰. KL, 극단 토큰 비율, router 불일치를 잰다.
- R3(§4.1): 추론의 Top-K mask를 학습에서 그대로 쓰되, gating softmax는 학습 logit으로 계산해 gradient를 유지한다. mask는 prefix KV cache와 함께 캐시해 multi-turn에서 re-prefill이 필요 없다(§4.2).
- 실험(§5.1): VeRL + Megatron + SGLang, batch 256 × n=8, response 최대 30,720, GRPO(clip 0.20/0.27)·GSPO·TIS().
- 결과
- KL: MoE 1.535e-3 대 dense(Qwen3-8B) 6.4e-4. router의 약 10%가 다른 expert를 고르고, 토큰의 94%가 한 층 이상에서 불일치한다(Figure 4). R3를 쓰면 KL이 1.5e-3 → 7.5e-4로 줄고 큰 불일치 토큰 빈도가 1/10이 된다.
- Table 1(Qwen3-30B-A3B-SFT, mini_step=1, 평균 점수 / 붕괴 step): GRPO 62.23 / 60, GRPO+TIS 66.24 / 105, GRPO+R3 71.83 / 없음, GRPO+TIS+R3 70.14 / 없음. mini_step=8: GRPO 48.84 / 120, GSPO 66.76, GRPO+R3 68.05.
- SWE-bench Verified(Table 2, R2E-Gym-Lite로 학습): GRPO 31.80(약 step 90에서 붕괴) → GRPO+R3 38.60.
- 비용(Table 4): 10 step 4820 s → 4967 s(103.45%). CPU 메모리가 node당 추론 2.5GB, 학습 1.5GB 늘어난다.
- [해석] MoE + agent 과제 조합에 가장 직접적인 근거다. TIS만으로는 step 105에 붕괴했고 R3는 붕괴가 없었다. 다만 실험은 SGLang + Megatron이고 vLLM은 다루지 않는다. stale policy가 만든 mask를 최신 가중치에 replay해도 되는지는 이 논문으로 답할 수 없다.
- 주의: 본문은 “TIS+R3가 R3 단독보다 3.29점 낮다”고 쓰지만 Table 1의 차이는 71.83 − 70.14 = 1.69로 맞지 않는다.
A5. Defeating Nondeterminism in LLM Inference
- Horace He 외, Thinking Machines Lab · 블로그 (2025-09-10)
- 한 줄: 추론 비결정성의 주원인은 동시성이 아니라 kernel이 batch 크기에 따라 연산 순서를 바꾸는 것(batch invariance 부재)이다. batch-invariant kernel로 sampler와 trainer를 bit 단위로 맞추면 진짜 on-policy RL이 된다.
- 방법
- 원인: floating-point 덧셈은 결합법칙이 성립하지 않는다. forward kernel은 같은 입력에 대해 run마다 결정적이지만, 서버 부하에 따라 batch 크기가 바뀌면 reduction 순서가 바뀌어 결과가 달라진다.
- 해법: RMSNorm은 원소별 reduction 순서를 고정하고, matmul은 모든 shape에 kernel 구성 하나만 쓰며, attention은 KV cache를 먼저 갱신하고 split 개수가 아니라 split 크기를 고정한다.
- 구현: vLLM FlexAttention backend +
torch.Library로 연산을 교체한다. 코드는 batch-invariant-ops 저장소에 있다.
- 결과
- Qwen3-235B-A22B-Instruct-2507, temperature 0, 1000 token × 1000회: 서로 다른 completion이 80개(최빈 78회)였고 103번째 토큰에서 처음 갈렸다. batch-invariant kernel에서는 1000개가 모두 같았다.
- 속도(Qwen3-8B, GPU 1장, 1000 sequence, 출력 90–110 token): vLLM 기본 26 s, 결정적 vLLM 55 s, attention kernel 개선 후 42 s.
- RL(Bigmath RLVR, Qwen 2.5-VL instruct 8B, 최대 rollout 4096): 보정이 없으면 reward가 붕괴(step 318 근처 loss·KL spike)하고, importance weighting을 쓰면 KL 약 0.001에 간헐 spike, bit 단위 일치에서는 KL 0이다.
- [해석] 수치 TIM을 원천 제거하는 방향이고 A1의 VeXact가 이를 따른다. 다만 속도 측정이 짧은 출력·8B 기준이라 긴 context의 대형 MoE에서 감당할 만한 비용인지는 따로 재야 한다. 이것으로 없어지는 것은 수치 불일치뿐이고, 비동기 staleness(A2의 lag)와 MoE routing 불일치는 별도 보정이 필요하다.
B. Score centering과 off-policy drift
B1. Score Centering Stabilizes Off-policy RL
-
Martin Marek, Max Ryabinin, Together AI · arXiv 2609.20807 (2026-09-17) · 코드 martin-marek/score-centering
-
한 줄: TIM 아래의 policy gradient에는 매 step 쌓이는 drift(bias) 항이 있고, sampler 기대 score를 빼는 additive 보정으로 이를 상쇄한다.
-
핵심 유도(§4, Eq. 3): 토큰 의 score를 라 하면, sampler 에서 뽑은 샘플로 계산한 gradient는
일 때만 이라 drift가 사라진다. group centering으로도 drift는 남는다: group 평균은 prompt 단위로 0이지만 prefix별 기대 advantage는 0이 아니다.
-
보정(Eq. 4, 8): . loss로 쓰면
ratio·clipping·masking이 없고, critic 없이 exact value baseline과 같은 기대 update를 준다.
-
top-k 근사(§4.1, A.1): sampler는 top-k logprob만 반환한다(k=128). tail은 trainer 확률을 로 rescale해 채운다(는 head). IS와 결합할 때(A.2)는 가중 에 대해 head 계수를 , 로 둔다.
-
결과
- 설정: group-centered REINFORCE(), group size 8, SGD lr 1e-2. 0.6B는 64 prompt·길이 512, 30B는 16 prompt·길이 1024.
- Figure 1(Qwen3-30B-A3B-Base, INTELLECT-2 math, router replay 없음): FP8 sampler는 보정 없는 PG도 안정(58%). FP4 KV cache는 PG가 200 step 안에 붕괴하고 SC 52% / TIS 51%. INT8 sampler + INT4 KV는 SC 30% / TIS 12% / 나머지 5% 미만.
- Figure 3(Qwen3-0.6B, weight noise 3단계): DPPO는 약 step 160/80/20에 붕괴, TIS는 큰 두 단계에서 약 step 180/40에 붕괴. 가장 큰 noise에서는 SC(단독 또는 TIS/MIS 결합)만 안정했다.
- Figure 4: INT8 sampler에서는 SC 단독·결합 모두 최상. staleness(엔진을 64 step마다만 갱신)에서는 SC + TIS/MIS 결합이 최상이고 SC 단독보다 낫다. 비용은 k=128에서 wall-clock 1% 이내이고, k=32도 full과 비슷했다(Figure 5).
-
한계(§6): 남는 항이 trainer가 아니라 sampler 기준 covariance라 심한 staleness에서는 IS 결합이 필요하다. 결과는 짧은 sequence에서 의도적으로 심한 mismatch를 만들어 긴 학습의 proxy로 쓴 것이다.
-
[해석] 논문 Table 1은 CISPO를 TIS(ratio clip )와 같은 행으로 취급한다. CISPO식 clip + 약간 stale한 rollout 구성은 논문 staleness 실험에서 최상인 “SC + TIS” 조합에 해당하므로, A.2 식대로 centering 항만 추가하면 된다. 필요한 것은 rollout 엔진의 top-k logprob 저장이다. 반면 보상이 모두 같은 그룹은 advantage가 0이라 drift도 signal도 0이므로 SC 효과가 없다.
B2. Off-Policy Drift in LLM RL (Chris Liu)
- Chris Liu · 블로그 (2026-03-02, v2 2026-05-18, WIP 표기)
- 한 줄: “on-policy” LLM RL은 엔진 mismatch와 policy staleness 때문에 실제로는 off-policy이며, 보정하기 전에 먼저 측정하고 mismatch 원인에 맞는 보정을 골라야 한다.
- 내용
- 0절의 분해( = TIM × staleness)와 원인 6가지: precision, kernel, tensor parallelism, MoE routing, async lag, quantized inference.
- 진단 지표: 토큰별 log ratio, KL(/), , , rollout/actor 확률의 Pearson 상관.
- 약 50개 방법 비교: PPO clip, DPPO, GSPO, SAPO, CISPO, IcePop mask(), MinPRO, M2PO, OAPL 등. 증상(A–F)에서 조치로 가는 decision tree를 준다.
- 주요 주장
- 임계값(저자 경험칙): 정상은 Pearson ≥ 0.99, KL 0.02 미만. Pearson이 0.95 미만이면 backend 문제라 알고리즘 보정으로 못 구한다. 이 0.3을 넘으면 rejection sampling, 2.0–4.0이면 RS + token TIS, ESS가 0.3 미만이거나 mask가 25%를 넘으면 시스템을 고쳐야 한다.
- Length trap: 토큰당 ratio가 1.1이면 sequence ratio는 10 토큰에서 약 2.6, 50 토큰에서 약 117, 100 토큰에서 약 13,780이다. 가변 길이라면 기하평균 집계를 권한다.
- Async: one-step off-policy 1.2–1.4배, fully async 1.92–2.66배 속도(Qwen2.5-Math-7B). OAPL은 lag 400 update 이상에서도 안정을 보고했다.
- 100 step 안에 길이가 20% 넘게 급증하면 붕괴 전조이니 학습률을 절반으로 줄인다.
- score centering은 다루지 않는다(B1보다 먼저 쓰임). 대신 진단 지표·임계값·MoE routing 대책(R3, Keep Routing, IcePop)·async 모드 분류를 준다. 글 자체가 WIP이고, 임계값은 verl 기준 경험칙이라 다른 스택에서는 재보정이 필요하다.
B3. RLHF Book, Policy Gradients 장의 Score Centering 절
- Nathan Lambert · rlhfbook.com/c/06-policy-gradients
- 한 줄: score centering을 TIS를 대체하는 것이 아니라 TIS에 더해 쓰는 보정으로 소개하고, 유도와 top-k 구현 코드를 교과서 표기로 정리한다.
- 내용
- eq. 55–59: , , , .
- eq. 61 loss: . backward 한 번으로 계산된다.
- eq. 62–63 top-k: tail은 로 채우고 . PyTorch 예시 코드가 있다(tail mass clamp 1e-6, 계수 detach).
- 직전 절의 TIS: 한쪽 cap, 예시 . log ratio clamp ±10은 수치 안정용이다.
- 주요 주장: drift는 advantage 평균을 통해서만 들어와 어떤 토큰이 뽑혔든 같은 방향으로 가중치를 밀고, learner를 stale·quantized sampler 쪽으로 끌어 불안정을 누적시킨다. 책의 Table 2(B1 Table 1 각색)는 방법별 ratio 처리를 정리한다: TIS/CISPO , MIS(IcePop) , PPO , DAPO , GSPO , TOPR , DPPO TV 0.2. 실험 수치는 없다.
- [해석] eq. 61은 sequence 단위 advantage 를 그대로 쓰므로 GRPO advantage에 바로 얹을 수 있다. 책의 코드는 IS 결합이 없는 단독 버전이라, CISPO 가중과 합칠 때는 B1 A.2의 식을 써야 한다.
B4. StableReinforce (Tinker 문서)
- Thinking Machines Lab · Tinker 문서 (Alpha 표기)
- 한 줄: sampling policy와 학습 policy가 달라도 안정적이라고 하는 REINFORCE 변형 loss(
stable_reinforce)의 사용법 문서다. 주 objective의 수식은 공개하지 않는다. - 내용
-
sampling client를
record_stability_info=True로 만들고 학습 datum에sequence_idprovenance를 붙인다. 기록된 sequence는 sampling 후 1일간 학습에 쓸 수 있다. -
forward_backward(data, loss_fn="stable_reinforce", loss_fn_config={"kl_coeff": 0.01}). 입력은target_tokens, samplinglogprobs,advantages. -
sampler–learner KL: reference model이 아니라 sampler 와 learner 사이의 를 추정해 더한다.
의 gradient는 로, advantage와 무관하게 샘플된 토큰 확률을 올려 learner를 sampler 근처에 둔다. 는 learner 확률이 sampler보다 훨씬 큰 토큰에서 빠르게 커진다. 기본값은
kl_coeff0.01,kl_estimator“k1”.
-
- 문서는 highly off-policy async RL과 저정밀 수치를 포함한 내부 post-training에서 “extremely stable”하다고 하지만 수치는 없다.
record_stability_info가 top-k logprob을 기록하는지(즉 score centering인지)는 문서로 확인할 수 없다. - [해석] KL 항은 advantage가 0인 그룹의 토큰에도 gradient를 주므로, 신호 없이 버려지던 토큰들이 learner를 sampler 쪽에 묶는 anchor로 쓰인다. 도움이 될지 학습을 늦출지는 실험이 필요하다.
B5. Score Centering 해설 (Cameron R. Wolfe)
- Cameron R. Wolfe · Substack (2026-11-09)
- 한 줄: B1 논문을 TIM과 IS의 한계부터 단계별로 풀어 설명하고 IS 옵션이 달린 PyTorch 구현을 붙인 해설이다. 이 노트의 읽기 목록이 여기서 나왔다.
- 내용: IS의 한계(곱셈 ratio는 분산을 키우고, clip/mask는 bias를 넣어 drift를 되살린다), (는 고정 isotropic Gaussian)로 불안정을 재현하는 실험 설명, top-k head + rescale한 trainer tail 구현. 코드는
top_k = 128,group_size = 8,is_method ∈ {none, tis(clamp max 2.0), mis([0.5, 5.0])}, 보정 계수 . 샘플된 토큰이 top-k 밖일 수 있어 sampled-token logprob은 따로 저장한다. - 주요 주장(실험은 모두 논문 인용): offline 학습은 non-negative reward에서만 안정하고, online은 group-centered reward가 가장 안정하지만 drift는 남는다. 심한 staleness에서는 SC 단독으로 안정화하지 못하므로 SC + IS 결합을 권한다. top-k 근사 때문에 drift 제거는 근사일 뿐이다.
- [해석] “clip이 bias를 넣어 drift를 되살린다”는 설명은 CISPO식 clip만 쓰는 구성이 긴 학습에서 drift를 누적시킬 수 있음을 뜻한다. 예시 코드는 미정의 변수가 있어 그대로 실행되지는 않으니 논문 repo와 대조해야 한다.
C. Importance sampling과 관련 기법
C1. IcePop: 엔진 ratio 양방향 masking
- Ling Team(Anqi Shen 외), Inclusion AI · arXiv 2510.18855 (2025-10-21) · “Every Step Evolves: Scaling Reinforcement Learning for Trillion-Scale Thinking Model” §2.3.2
- 한 줄: 학습·추론 엔진의 확률 비가 밖인 토큰은 gradient를 아예 버리는 양방향 masking으로 MoE RL의 mismatch 누적을 막는다.
- 방법
-
문제: 엔진이 분리되어 같은 에서도 확률이 다르고, MoE routing과 긴 CoT에서 증폭된다. Theorem 1(조건부): 이 로 커진다.
-
목적함수: GRPO 항 앞에 를 곱한다.
-
구간 안에서는 로 보정하고 밖은 전부 버린다. 설정: , , lr 2e-6, KL 계수 0, step당 480 prompt × 8 rollout, 최대 65,536 토큰.
-
- 결과
- Ring-mini-2.0(16.8B MoE, 활성 0.75B), AIME25 Avg@64: base 63%에서 14%p 이상 상승, TIS 대비 상대 6% 격차(Figure 5).
- mask되는 토큰은 학습 토큰의 1–2‰이고 전체 토큰보다 entropy가 높다(Figure 12). baseline은 180–200 step 뒤 reward가 붕괴한다(Figure 10).
- 민감도(Figure 13): 안정, 즉시 불안정, 는 안정이지만 log prob이 더 높은 토큰까지 포함된다.
- [해석] IcePop은 구간 밖을 clip이 아니라 mask한다. 구간 밖 토큰 비율과 entropy를 기록하면 1–2‰ 기준과 비교할 수 있다. IcePop의 는 같은 에서의 엔진 차이만 보므로, rollout이 몇 step stale하면 ratio에 policy lag가 섞여 이탈 비율이 더 커질 것이다.
C2. TIS: Truncated Importance Sampling (블로그)
- Feng Yao, Liyuan Liu, Dinghuai Zhang, Chengyu Dong, Jingbo Shang, Jianfeng Gao · 블로그 (2025-08-05 게시, 2025-10-13 수정) · “Your Efficient RL Framework Secretly Brings You Off-Policy RL Training”
- 원문 Notion 페이지는 앞부분만 읽었고, 저자 발표 슬라이드, NeurIPS 2025 OPT workshop 초록(“On the Rollout-Training Mismatch in Modern RL Systems”), 저자의 Flash-RL README, C3 논문 §2.2의 TIS 정의로 보충했다.
- 한 줄: vLLM(rollout)과 FSDP(학습)가 같은 가중치로도 토큰 확률이 달라 on-policy RL이 사실상 off-policy가 되며, 상한만 자르는 truncated importance sampling으로 보정한다.
- 방법: 이상적 갱신 가 실제로는 가 된다. TIS는 를 로 바꿔 곱한다. vLLM이 실제 sampling 확률을 반환하게 하거나 LM head를 FP32로 올리는 시스템 패치는 도움이 되지만 차이가 남아서, 알고리즘 보정을 택했다.
- 결과(슬라이드 텍스트 기준)
- 토큰 확률 최대 차이: DAPO Qwen2.5-32B·DS-Qwen2.5-1.5B에서 1.0, GSM8K 0.5B 일반 RL에서 약 0.4, INT8 rollout에서 약 1.0.
- GSM8K·PPO·Qwen2.5-0.5B-Instruct에서 PPO, Recompute, PPO-IS, Vanilla-IS, TIS를 비교하면 TIS만 일관되게 동작했다. 차이가 작으면 TIS 이득도 작지만 해는 없다.
- DAPO-32B에서 rollout이 학습 시간의 약 70%를 차지한다. TIS와 함께 INT8/FP8 양자화 rollout을 써도 BF16 + TIS 성능과 맞는다(FlashRL).
- [해석] TIS는 하한이 없고 상한만 자른다. 슬라이드는 응답이 길수록, 병렬 구성이 다를수록 최대 차이가 커진다고 하므로, 긴 trajectory에서는 토큰별 mismatch 통계(max, mean)를 길이 구간별로 봐야 한다.
C3. CIS: Calibrated Importance Sampling
- Tianrun Yu 외, Brigham Young University·UNC Chapel Hill · arXiv 2609.32444 (2026-09-26) · “Rethinking Training-Inference Mismatch in LLM Reinforcement Learning: Where It Arises and How to Correct It”
- 한 줄: ratio를 “토큰 confidence”와 “엔진 간 log-odds 변위”로 분해하고, 변위에만 상수 임계값을 걸어 confidence가 높을수록 상한이 좁아지는 calibrated IS를 제안한다.
- 방법
-
Lemma 3.1: , , 라 하면
MoE에서 는 heavy tail이고 routing 불일치가 꼬리를 키운다.
-
Theorem 3.2: 정확한 IS의 오차 상한은 에 지배된다. 학습된 MoE에서 는 일 때 7.07, 일 때 9.2e6이다.
-
CIS(Eq. 4): , stop-gradient 적용. 기본 , . 상한만 자르고 하한은 그대로 둔다.
-
고정 상한 (TIS)를 변위로 바꿔 쓰면 라서, 저 confidence 토큰에 bias가 몰린다(Eq. 5).
-
- 결과
- Table 1(GSM8K로 RL, 수학 벤치마크 5개 평균, seed 3개): Qwen1.5-MoE-A2.7B에서 CIS 34.78 / IcePop 34.18 / KPop 33.50 / Exact 32.48 / TIS 31.40 / 보정 없음 30.99 / GSPO 28.90. Qwen3-30B-A3B에서 CIS 69.88 / GSPO 69.23 / TIS 69.14 / 보정 없음 68.26. IcePop과의 차이는 일부 열에서 seed 편차 이내라고 명시한다.
- Table 2 ablation: 작은 가중치를 위로 올리는 양방향 band()는 평균 6.01로 붕괴했다(base 28.93 미만). TIS 은 8.88, floor 제거()는 29.02.
- 의 99.96%가 쪽에서 나온다(Figure 5a). 전체 bias는 CIS 0.0064 대 TIS 0.0078.
- [해석] IS 가중치에 하한을 거는 설정은, 이 논문의 band보다 약하더라도 작은 가중치를 위로 올린다는 점에서 같은 방향이다. 하한 아래 토큰 비율과 하한 제거 ablation을 볼 근거가 된다. 검증은 최대 1,024 생성 토큰, staleness 2 version 이내(stale 토큰 1% 미만)에서만 했다(§D.6).
C4. CISPO (MiniMax-M1)
- MiniMax · arXiv 2506.13585 (2025-06-16) · “MiniMax-M1: Scaling Test-Time Compute Efficiently with Lightning Attention” §3.1
- 한 줄: PPO/GRPO처럼 토큰 update를 clip하지 않고 IS 가중치만 clip해서, ratio가 큰 토큰도 gradient를 계속 받게 한다.
- 방법
-
문제: 반성 토큰(However, Recheck, Wait, Aha)은 저확률이라 첫 update 뒤 가 커져 clip으로 빠지고, 이후 off-policy update에 기여하지 못한다. 생성 batch당 off-policy update 16회 조건에서 DAPO의 상한 확대는 효과가 작았다.
-
목적함수(Eq. 4–5):
-
를 크게 두어 하한은 사실상 걸지 않고 만 튜닝한다. KL 항은 없고 DAPO의 dynamic sampling·length penalty를 쓴다. 토큰 mask 를 곱하면 PPO trust region과 같은 폐기 조건도 옵션으로 표현된다(Eq. 6–7).
-
- 결과: Qwen2.5-32B-base zero-RL, AIME 2024에서 같은 step 기준 GRPO·DAPO보다 높고, DAPO의 성능에 50% step으로 도달했다(Figure 2). 가중치 clip으로 gradient가 약간 biased되지만 모든 토큰의 기여를 유지한다.
- 같은 논문 §3.2: LM head를 FP32로 올려 학습·추론 확률 상관을 약 0.9x → 0.99x로 맞췄다. AdamW , eps 1e-15, 확률 0.99를 넘는 토큰이 3,000개 연속되면 조기 종료한다.
- [해석] 원 논문은 하한을 걸지 않으며 값도 §3.1에 없다. 상한 5 같은 값의 근거는 IcePop·DPPO 쪽이다. C9(DPPO)는 CISPO가 Qwen3-30B-A3B-Base에서 routing replay 없이 붕괴했다고 보고하므로, MoE에서 CISPO를 단독으로 쓴다면 mismatch 추이를 감시해야 한다.
C5. CTPO: 누적 토큰 관점의 IS
- Yuheng Zhang 외, UIUC·University of Michigan·Amazon · arXiv 2605.07331 (2026-05-08) · “Rethinking Importance Sampling in LLM Policy Optimization: A Cumulative Token Perspective”
- 한 줄: 토큰 ratio(편향)와 전체 sequence ratio(고분산) 사이에서, 위치 까지의 누적 ratio를 쓰고 clip 폭을 에 비례해 넓힌다.
- 방법
- 누적 ratio(§3.1): . Proposition 1: 토큰 단위 policy gradient에서 이 prefix 보정은 unbiased다. GRPO의 는 prefix 분포 차이를 무시해 biased다.
- Proposition 2(§3.2): 이면 . GSPO의 길이 정규화 ratio는 정확한 sequence IS가 아니다.
- 위치 적응 clip(§3.3): 이므로 , ()로 두고 구간 에서 PPO식 clip을 한다. , .
- 결과
- Table 2(tool-integrated reasoning, avg@32, 벤치마크 4개 평균): Qwen3-4B에서 GRPO 43.2 / GSPO 47.7 / CTPO 51.4, Qwen3-14B에서 54.6 / 55.5 / 58.8. 단 14B HMMT 25는 GRPO 51.5가 CTPO 48.0보다 높다.
- 고정 clip 를 누적 ratio에 쓰면 뒤쪽 토큰의 clip 비율이 최대 20%이고 앞쪽은 0% 근처다. 적응 clip은 위치와 무관하게 5–10%다(Figure 1). Table 3: 고정 clip 55.7 대 적응 clip 58.8(Qwen3-14B 평균).
- [해석] 이 논문 기준으로 토큰 단위 IS는 prefix 보정이 빠진 biased 추정이다. 다만 실험은 최대 5 turn·8,000 토큰이라 아주 긴 trajectory에서 누적 ratio가 수치적으로 버티는지는 미검증이다. 누적 log ratio의 표준편차가 로 커진다는 관찰은 진단용으로 바로 쓸 수 있다.
C6. TRM: Trust Region Masking
- Yingru Li 외, Fudan University·CUHK Shenzhen · arXiv 2512.23075 (2025-12-28, v5 2026-06-26 기준) · “Trust Region Masking for Long-Horizon LLM Reinforcement Learning”
- 한 줄: surrogate 오차의 상한이 토큰 divergence의 최댓값에 좌우되므로, trust region을 벗어난 토큰이 하나라도 있으면 sequence 전체를 mask한다.
- 방법
-
고전 상한은 : . , 이면 약 1677로 무의미하다(§3.1). Pinsker-Marginal , Mixed , 그리고 Adaptive 상한의 최솟값 를 제시한다.
-
토큰 단위 방법의 한계(§4.1): PPO clip은 이고 일 때 gradient가 새고, 토큰 masking은 loss만 바꿀 뿐 정책 쌍의 divergence는 그대로다.
-
TRM(Algorithm 1):
은 전체 batch 크기다. full logit이 없으면 (max용), (평균용)를 쓴다. max 기준과 평균 기준의 결합을 권하고, acceptance가 70% 이상인지 감시하라고 한다.
-
- 결과
- 수치 예(§4.4): , , 에서 대 고전 상한 1677(409배).
- 실험(§5, Qwen3-8B-Base, DAPO-MATH-17k, vLLM + FSDP, AIME25 avg@32): PPO clip은 PPL gap이 커지며 점수가 하락했고(Figure 1), TRM-Max()·TRM-Avg()는 안정했다(Figure 2). 느슨한 Max 0.1·Avg 0.002는 단독으로는 실패하고 결합하면 성공했다(Figure 3). 점수 표는 없다.
- 길이 편향(Appendix F): 라 긴 sequence가 체계적으로 탈락한다. 길이 중립 변형 LN-TRM을 제안한다.
- [해석] 수만 토큰 이상이면 max 기준 acceptance가 로 급락할 것이다. 원형보다 LN-TRM이나 평균 기준, 혹은 turn 단위 mask가 현실적이다. 원인으로 든 세 가지(backend 차이, MoE routing, 분산 staleness)는 대형 MoE agent RL에서 흔한 조합이다.
C7. TOPR: Tapered Off-Policy REINFORCE
- Nicolas Le Roux 외, Mila·Reliant AI · arXiv 2503.14286 (2025-03-18)
- 한 줄: 정답 trajectory는 SFT처럼 가중치 1로, 오답 trajectory는 ratio를 로 자른 IS로 다뤄 KL 항 없이 완전 offline에서도 안정적으로 학습한다.
- 방법
-
일반식(§3, Eq. 7): 보상 부호별 절단 한계 , 로 trajectory 단위 ratio 를 clip한다.
-
기본형(Eq. 8): 는 정답, 는 오답 집합.
-
이라 오답은 확률이 내려갈수록 기여가 자연히 줄고, 이라 저확률 정답도 최소 학습률을 보장받는다. baseline 는 유효 정답 비율을 로 바꾼다(Eq. 12).
-
- 결과
- Llama 3 8B, GSM8K·MATH, 보상 ±1, lr 5e-7, 최대 512 토큰: naive REINFORCE는 붕괴하고, PPO()는 대부분의 데이터가 clip 범위 밖이라 진전이 없다(Fig. 1).
- 유효 정답 비율 10–20%에서 성능이 최대다(Fig. 5–6). 절단 없는 IS는 gradient clipping 100, 오답 60% 조건에서 bad reasoning 31%(base 12%)(Fig. 7).
- Anna Karenina sampling으로 GSM8K pass@1 79.6% 대 uniform 75.4%. verifier(Table 2): 정확도 32.6% → 70.9%, invalid 34.2% → 0.90%.
- [해석] 핵심은 advantage 부호별로 가중치 한계를 다르게 두는 설계다. 음수 advantage 쪽 상한을 1로 두는 변형의 근거가 되고, C9의 “불안정은 음수 샘플의 큰 update에서 나온다”와 같은 방향이다. ratio가 trajectory 단위이고 512 토큰 실험이라, 긴 trajectory에서는 ratio가 0이나 상한에 붙는다. 아이디어만 토큰 단위로 옮겨야 한다.
C8. GSPO: Group Sequence Policy Optimization
- Chujie Zheng 외, Qwen Team·Alibaba · arXiv 2507.18071 (2025-07-24)
- 한 줄: 토큰 ratio 대신 길이로 정규화한 sequence likelihood ratio로 clip·최적화해서 MoE RL을 routing replay 없이 안정화한다.
- 방법
-
진단(§3): GRPO의 토큰 가중치는 토큰당 샘플이 1개뿐이라 분포 보정이 되지 않고 고분산 noise만 넣는다. 보상의 단위와 최적화의 단위가 맞아야 한다.
-
목적함수(§4.1, Eq. 5–7):
-
한 응답의 모든 토큰이 같은 가중치 를 받는다. GSPO-token(§4.3): . 값은 와 같지만 토큰별 advantage를 쓸 수 있어 multi-turn RL에 맞다.
-
- 결과
- Qwen3-30B-A3B-Base cold-start, mini-batch 4개 분할. clip 범위는 GSPO 3e-4 / 4e-4, GRPO 0.2 / 0.27. 같은 compute에서 GSPO가 학습 reward와 AIME’24·LiveCodeBench·CodeForces 모두 우세하다(Figure 1, 수치 표 없음).
- clip되는 토큰 비율이 GRPO보다 두 자릿수 많은데도 효율이 높다(Figure 2).
- 48층 Qwen3-30B-A3B-Base는 gradient update 한 번마다 같은 샘플에서 활성 expert가 약 10% 바뀐다. GRPO는 Routing Replay가 필수지만 GSPO는 필요 없다(§5.3). 추론 엔진 likelihood를 재계산 없이 쓸 가능성도 언급한다(§5.4).
- [해석] “update마다 expert 10% 변경”은 토큰 ratio가 routing 때문에 흔들린다는 직접 근거이고, rollout이 여러 step stale하면 더 커진다. multi-turn 긴 trajectory에서는 GSPO-token이 후보다. 다만 C3 Table 1에서 GSPO는 모델에 따라 보정 없음보다 낮기도 하다(Qwen1.5-MoE 28.90 대 30.99). 대체보다 ablation 대상으로 보는 편이 맞다.
C9. DPPO: LLM RL의 trust region 다시 보기
- Penghui Qi 외, Sea AI Lab·National University of Singapore · arXiv 2602.04879 (2026-02-04, v3 2026-06-12 기준) · “Rethinking the Trust Region in LLM Reinforcement Learning”
- 한 줄: 샘플된 토큰 ratio 하나로 clip하는 PPO 대신, 정책 분포의 divergence(TV/KL) 추정치로 trust region mask를 정한다.
- 방법
- 문제(§4.2): 은 TV의 단일 샘플 추정이다. 확률이 로 바뀌면 으로 clip되지만 TV 기여는 미미하고, 은 로 통과하지만 질량 0.19가 이동한다.
- 목적함수(§4.3, Eq. 12): . 이거나 이면 , 그 외에는 1. 를 로 바꾸면 PPO가 된다.
- 근사(§4.4): Binary TV , Binary KL은 (샘플 토큰, 나머지) Bernoulli KL, Top-K는 상위 K개 + other. 는 TV 0.15–0.2, KL 0.05.
- 통합식(Appendix C, Eq. 23): . PG-TIS(CISPO)는 , (안정성 실험), 확장 실험은 .
- 결과
- 안정성(§5, DeepSeek-R1-Distill-Qwen-1.5B): trust region 없는 PG-IS·CISPO는 mismatch가 커지다 붕괴하고 DPPO는 안정했다(Figure 3). 재계산 분포 기준 trust region(MiniRL)도 붕괴했다. 기준은 rollout 분포여야 하고, 재계산을 생략해 비용도 약 25% 줄어든다(§5.2).
- 불안정의 주원인은 음수 샘플에서 확률을 0.5 넘게 깎는 update이고, 이는 전체의 0.5% 이하다(§5.3, Figure 5). TIS는 오히려 안정성을 악화시켰다(§5.4).
- 확장(§7, Qwen3-30B-A3B-Base 등 5개 구성): CISPO는 R3 없는 MoE Base에서 갑작스럽게 완전 붕괴했고, DPPO는 R3 없이도 R3를 쓴 baseline보다 우세했다. RLHF AlpacaEval 2.0 LC-WR 80.90 대 GRPO 77.05(Table 2).
- [해석] MoE + CISPO식 clip 구성에 가장 직접적인 반례다. 가중치 clip은 가중치만 자를 뿐 update를 막지 않으므로, 평균 추이와 “음수 advantage에서 확률을 크게 깎는 토큰” 비율을 먼저 계측해야 한다. Binary TV mask는 두 엔진의 샘플 토큰 확률만 있으면 계산되므로 vLLM logprob만으로 구현할 수 있다. 실험은 최대 16,384 토큰이고 trust region 기준이 rollout 정책이라 stale rollout에서는 mask 비율이 늘 것이다.
C 비교표
| 방법 | IS 단위 | 가중치 처리 | gradient를 버리는 토큰 | 목적 |
|---|---|---|---|---|
| IcePop | token (엔진 간 ratio) | 밖은 mask, 안쪽은 ratio 보정 + PPO clip | 있음 (구간 밖, 1–2‰) | 엔진 mismatch 누적 억제 (MoE) |
| TIS | token (엔진 간 ratio) | 상한 truncate, | 없음 | vLLM·FSDP mismatch 보정, 양자화 rollout 허용 |
| CIS | token (엔진 간 ratio) | confidence 의존 상한, | 없음 | truncation bias를 confidence 전 구간에 고르게 |
| CISPO | token (new/old policy) | IS 가중치 clip + sg, 하한 사실상 없음 | 없음 (mask는 옵션) | 저확률 추론 토큰의 gradient 유지 |
| CTPO | 누적 (위치 까지 곱) | 위치 적응 clip, 폭 | 있음 (위치 무관 5–10%) | prefix 보정 unbiased + sequence보다 저분산 |
| TRM | sequence 단위 판정 (토큰 KL의 max/평균) | 위반 sequence 전체 mask | 있음 (sequence 통째) | long-horizon에서 유효한 개선 보장 |
| TOPR | trajectory | 보상 부호별 truncate: 정답 1, 오답 | 없음 (오답은 ratio→0으로 감쇠) | KL 없이 안정적인 offline 학습 |
| GSPO | sequence (길이 정규화 기하평균) | sequence 단위 PPO clip | 있음 (응답 통째, GRPO 대비 약 100배 비율) | MoE RL 안정화, routing replay 제거 |
| DPPO | token (판정은 분포 divergence) | TV/KL이 를 넘고 멀어지는 방향이면 mask | 있음 (divergence 초과 토큰) | 저확률 토큰 과잉 제약·고확률 토큰 과소 제약 해소 |
읽을 때 주의
- 그림으로만 제시된 결과(IcePop Figure 5·10–13, CISPO Figure 2, GSPO Figure 1–3, TRM Figure 1–3, DPPO Figure 3–9, VeXact의 KL·gradient norm 곡선 등)는 본문에 적힌 수치만 옮겼다. “정성”이라고 적은 곳은 수치가 없다.
- 실험 길이: IcePop 65,536 토큰, R3 30,720, VeXact 20,480, DPPO 16,384, CTPO 8,000, CIS 1,024, score centering 1,024, TOPR 512. 10만 토큰 이상 trajectory, 비동기 staleness와 MoE의 조합을 직접 실험한 자료는 없으므로 **[해석]**은 모두 그 조건에서 미검증이다.
- B2의 임계값은 저자 경험칙이고, B3의 “많은 frontier lab이 조용히 이 방법을 쓴다”는 진술은 출처가 없다. B4는 주 objective 수식이 공개되지 않았다.
- C1(IcePop)과 C4(CISPO)는 지정된 절과 인접 절만 읽었다. 논문의 나머지(Ring-1T 벤치마크, M1 모델 소개)는 초록 수준이다.