Frontier RL: 알고리즘과 안정화Frontier RL: Algorithms & Stability
frontier lab들의 RL 목적함수를 한 틀로 비교하고, long-horizon·비동기 staleness·학습–추론 불일치를 다루는 엔지니어링까지.The frontier labs' RL objectives in one frame, and the engineering behind long-horizon training, async staleness and training–inference mismatch.
- 프론티어 RL 목적함수 지도 — 하나의 틀The frontier RL landscape — one template for every objective50 분min
GRPO, DAPO, Dr. GRPO, GSPO, CISPO, IcePop, TIS와 각 랩의 변형을 "토큰당 가중치 × advantage × ∇log π" 하나의 틀로 다시 쓰고, 집계·정규화·ratio 단위·clip/mask·IS 보정·KL을 갈아 끼우는 부품으로 본다. DeepSeek, Qwen, Kimi, MiniMax, MiMo, GLM, MAI, Olmo, Nemotron의 선택을 한 표로 비교한다.Rewrite GRPO, DAPO, Dr. GRPO, GSPO, CISPO, IcePop, TIS and each lab's variant as one template — per-token weight × advantage × ∇log π — whose components (aggregation, normalisation, ratio level, clip/mask, IS correction, KL) are interchangeable parts. Then compare the choices of DeepSeek, Qwen, Kimi, MiniMax, MiMo, GLM, MAI, Olmo and Nemotron in one table.
- 시퀀스냐 토큰이냐 — 집계, 정규화, ratio 단위Sequence vs token — aggregation, normalisation and the unit of the ratio50 분min
손실 집계 방식이 실제로 최적화하는 목적함수를 유도하고(sequence-mean은 (r−b)/|y|를 최적화한다), GSPO·GMPO·SAPO가 ratio의 단위를 어떻게 바꾸는지, 토큰 ratio와 시퀀스 ratio의 bias·variance를 NumPy로 잰다. 신호 없는 그룹, dynamic sampling, 적응형 그룹 크기의 비용도 계산한다.Derive the objective each loss-aggregation mode actually optimises (sequence-mean optimises (r−b)/|y|), see how GSPO, GMPO and SAPO change the unit of the ratio, and measure the bias and variance of token versus sequence ratios in NumPy. Then compute the cost of zero-variance groups, dynamic sampling and adaptive group sizes.
- Clipping과 importance sampling — 어떤 토큰의 gradient를 끄는가Clipping and importance sampling — which tokens lose their gradient55 분min
PPO clip, dual-clip, clip-higher, CISPO, SAPO, DPPO를 ratio와 advantage 부호의 함수인 gradient 가중치 하나로 비교하고, 행동·근접·현재 정책을 나누는 decoupled PPO와 bypass 방식, 엔진 불일치를 다루는 TIS·MIS·IcePop·CIS, 시퀀스 단위 mask(V3.2, Geo-RS, TRM)의 bias·variance와 길이 의존성을 NumPy로 잰다.Compare PPO clip, dual-clip, clip-higher, CISPO, SAPO and DPPO as one gradient-weight function of the ratio and the sign of the advantage; separate the behaviour, proximal and current policies (decoupled PPO and the bypass mode); and measure in NumPy the bias, variance and length dependence of the engine-mismatch corrections (TIS, MIS, IcePop, CIS) and of sequence-level masks (V3.2, Geo-RS, TRM).
- 정규화 — KL, 엔트로피, 길이Regularisation — KL, entropy and length55 분min
KL 항을 손실에 넣을 때 추정량과 샘플 분포가 gradient를 어떻게 바꾸는지(k1·k2·k3, k3+, DeepSeek-V3.2의 ρ·k3, 보상 안의 KL과 손실 안의 KL), Kimi k1.5의 mirror descent와 제곱 log-ratio 정규화, 엔트로피 붕괴를 공분산으로 유도하고 clip-higher·엔트로피 보너스·Clip-Cov/KL-Cov·controller로 다루는 법, 그리고 길이 제어(overlong shaping, 길이 보상, budget)를 정리한다.How the estimator and the sampling distribution change the gradient of a KL loss (k1, k2, k3, k3+, DeepSeek-V3.2's ρ·k3, KL in the reward vs in the loss); Kimi k1.5's mirror descent and squared log-ratio regulariser; entropy collapse derived as a covariance and handled with clip-higher, entropy bonuses, Clip-Cov/KL-Cov and controllers; and length control (overlong shaping, length rewards, budgets).
- Long-horizon RL — 긴 궤적의 credit, context 관리, 예산Long-horizon RL — credit, context management and budgets over long trajectories50 분min
수백 turn·수백만 토큰짜리 agent 궤적에서 무엇이 깨지는지 유도한다. 결과 보상의 turn당 SNR이 1/√K로 떨어지는 이유와 할인·process 보상·GiGPO·reverse curriculum이 각각 사는 것과 내주는 것, 정책이 관리된 context(접기·요약·discard-all·preserved thinking) 위에서 행동할 때 학습 샘플과 정규화가 어떻게 바뀌는지, 토큰·시간 예산과 끝나지 않은 궤적의 처리가 목적함수를 어떻게 바꾸는지를 그림과 코드로 확인한다.What breaks in agent trajectories of hundreds of turns and millions of tokens. Derive why the per-turn SNR of an outcome reward falls as 1/√K and what discounting, process rewards, GiGPO and reverse curricula buy and cost; how training samples and normalisation change when the policy acts on a managed context (folding, summaries, discard-all, preserved thinking); and how token and time budgets, and the handling of unfinished trajectories, change the objective — with figures and code.
- 비동기 RL과 stalenessAsynchronous RL and staleness50 분min
동기 RL이 왜 GPU를 놀리는지 길이 꼬리로 계산하고, one-step-off·완전 비동기·partial/interruptible rollout을 하나의 시뮬레이터로 비교한다. 낡은 샘플이 gradient에 넣는 두 가지 bias(정책 bias와 길이·선택 bias)를 유도하고, decoupled PPO, staleness 상한 τ, 토큰 단위 freshness, 스케줄링 규칙이 각각 어디를 막는지 프론티어 랩의 공개 선택과 함께 본다.Compute from the length tail why synchronous RL leaves GPUs idle, then compare one-step-off, fully asynchronous and partial/interruptible rollout in one simulator. Derive the two biases a stale sample adds to the gradient (policy bias and length/selection bias), and see which part decoupled PPO, a staleness bound τ, token-level freshness and scheduling rules each address, alongside the frontier labs' published choices.
- 학습–추론 불일치 엔지니어링Engineering away the training–inference mismatch50 분min
같은 weight인데 rollout 엔진과 trainer의 log-prob가 다른 원인을 통계적 모양(조밀한 잡음, 드문 큰 점프, 체계적 오프셋)으로 나누고, 각 모양이 긴 시퀀스에서 어떻게 쌓이는지 유도한다. FP32 LM head, batch-invariant kernel과 bit-exact rollout, routing replay(R2/R3·Keep Routing), Keep Sampling Mask와 processed log-prob, 같은 양자화, score centering과 IS 보정이 각각 무엇을 없애고 무엇을 남기는지, 비용과 함께 본다.Sort the reasons why the rollout engine and the trainer disagree on log-probs at identical weights by their statistical shape — dense noise, rare large jumps, systematic offsets — and derive how each shape accumulates over long sequences. Then see what each fix removes and what it leaves, with its cost — FP32 LM head, batch-invariant kernels and bit-exact rollout, routing replay (R2/R3, Keep Routing), Keep Sampling Mask and processed log-probs, matched quantisation, score centering and IS corrections.
- Score centering — 불일치가 만드는 drift와 가산 보정Score centering — the drift a mismatch adds, and an additive fix45 분min
다른 모델의 데이터로 하는 SFT는 멀쩡한데 왜 online RL은 작은 수치 불일치에도 무너지는가. 정책 경사를 prefix마다 drift(보상 평균 × sampler 기대 score)와 signal(공분산)로 분해하고, drift가 sampler로의 증류이며 sampler가 trainer를 따라 움직일 때 끝없이 쌓인다는 것, group centering이 그것을 0으로 보장하는 곳은 root뿐이라는 것, clip한 IS가 그것을 어디에 남기는지를 유도한다. 그다음 기대 score를 빼는 가산 보정(score centering), IS와의 결합, top-k 근사와 그 비용, 논문의 측정 결과를 설정 그대로 본다.Why does SFT on another model's data train fine while online RL falls over from a small numerical mismatch? Split the policy gradient at every prefix into drift (mean reward × the sampler-expected score) and signal (a covariance); derive that drift is distillation toward the sampler and never stops when the sampler tracks the trainer, that group centring guarantees it is zero only at the root, and where clipped IS leaves it. Then the additive fix that subtracts the expected score (score centering), its composition with IS, the top-k approximation and its cost, and the paper's measurements with their exact settings.
- 안정화 플레이북 — 지표로 읽는 RL 실패와 각 lab의 처방The stability playbook — reading RL failures from metrics, and what each lab did50 분min
긴 RL 실행이 망가지는 방식은 몇 가지로 정해져 있고, 각각은 보상이 무너지기 전에 특정 지표에 먼저 나타난다. entropy·clip 비율(방향별)·ratio·grad norm·길이·zero-variance 그룹·mismatch k3·MoE load를 어떻게 계산하고 읽는지, entropy가 왜 Cov(log π, A)를 따라 움직이는지 유도하고, 장난감 실행 시뮬레이터와 triage 표로 고장을 주입·진단하며 각 lab이 실제로 쓴 처방을 정리한다.Long RL runs break in a small number of ways, and each shows up in a specific metric before the reward collapses. How to compute and read entropy, clip fractions by side, ratio statistics, grad norm, length, zero-variance groups, mismatch k3 and MoE load; a derivation of why entropy follows Cov(log π, A); a toy run simulator and a triage table to inject and diagnose failures; and the interventions each lab actually used.
- 보상과 환경 — 검증기, rubric·생성형 보상, 다중 환경 RLVR, 환경 합성, 난이도Rewards and environments — verifiers, rubric and generative rewards, multi-environment RLVR, environment synthesis, difficulty55 분min
RLVR과 agent RL에서 보상과 환경은 곧 데이터셋이다. 검증기의 오류가 정책에 무엇을 가르치는지(어려운 과제일수록 hack이 이득인 이유), rubric·생성형 보상과 그룹 단위 채점(GRS·GAR), 여러 보상을 합칠 때의 정규화(합 뒤 정규화 대 보상별 정규화, GDPO), 여러 환경을 한 실행에 섞는 법, agent 환경 합성과 강화, 난이도 선별과 curriculum을 각 lab의 수치와 함께 유도하고 장난감 시뮬레이터로 확인한다.In RLVR and agent RL the reward and the environment are the dataset. We derive what verifier errors teach a policy (and why hacking pays most on hard tasks), cover rubric and generative rewards and groupwise grading (GRS, GAR), multi-reward normalisation (sum-then-normalise vs per-reward normalisation, GDPO), mixing many environments in one run, synthesising and hardening agent environments, and difficulty filtering and curricula — with each lab's numbers and two toy simulators.