Track IX · Frontier RL: Algorithms & Stability · 09/10

안정화 플레이북 — 지표로 읽는 RL 실패와 각 lab의 처방The stability playbook — reading RL failures from metrics, and what each lab did

긴 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.

The earlier lessons of this track were about objectives: how the loss is aggregated (sequence vs token), which ratio is clipped or masked (clipping and IS), how KL, entropy and length are regularised (regularisation). This lesson is about the run. A frontier RL job runs for weeks, and the reports that disclose their failures tell a consistent story: runs do not fail in a thousand ways but in about eight, and each of them leaves a fingerprint on a specific metric well before the reward curve bends. MiniMax-M1 saw its reward refuse to rise because train/inference probabilities correlated at only 0.9x; VeXact watched a KL monitor stay flat for 700 steps while the model was already degrading; MiMo-V2.6 saw an MoE layer’s load coefficient of variation go from 0.78 to 2.0 in 20 steps. The goal here is a playbook: what to log, how to compute it, which failure each pattern points to, and what the labs did about it.

What to log, and how to compute it

Every metric below is cheap: all come from tensors the trainer already has (rollout log-probs log⁡μ\log\mu, recomputed log⁡πold\log\pi_{\text{old}}, current log⁡πθ\log\pi_\theta, advantages, masks, rewards, lengths, router counts). Group them into three tiers.

TierMetricDefinition (per batch)HealthyWarning
policyentropy H^\hat H−log⁡μ(yt)‾\overline{-\log\mu(y_t)} over response tokens (or full-vocab entropy if logits are kept)slow decline, or flatfast fall (collapse) or rise with gibberish
policyKL to referencek3 of πθ\pi_\theta vs πref\pi_{\text{ref}}, even when β=0\beta=0grows smoothlykinks, acceleration
updateclip fraction by sidefour cells of (sign A^\hat A) × (ratio above / below the band)a few % on the side the update pushesone side dominates; “opposite” cells non-zero
updateratio statsmean, p99, max of ρt=πθ/πold\rho_t=\pi_\theta/\pi_{\text{old}}max of a fewmax in the tens (stale or mismatched samples)
updategrad normpre-clip global normstationaryspikes, rising floor
datalengthmean, p95, truncation rate (hit the cap), repetition rategrows with difficultytruncation climbs, loops
datarewardtrain mean and a held-out eval, per domainrise togethertrain ↑ while held-out flat
datazero-variance groupsfraction of groups with identical rewardsmoderatemost groups degenerate
systemmismatchk3 of KL(μ ∥ πold)\mathrm{KL}(\mu\,\Vert\,\pi_{\text{old}}), max⁡∣δt∣\max\lvert\delta_t\rvert, out-of-band fraction, token ESSflat, smalltrend up, tail grows
systemMoE loadper-layer CV of expert counts, max/mean, share of cold expertsstableCV and cold share climb

Three details make these numbers trustworthy.

Entropy from samples. For tokens sampled from μ\mu, Ey∼μ[−log⁡μ(y)]=H(μ)\mathbb{E}_{y\sim\mu}[-\log\mu(y)]=H(\mu), so the mean negative log-prob of sampled tokens is an unbiased estimate of the sampler’s entropy. If what you want is the entropy of the policy being trained from stale samples, weight by the ratio: MAI-Thinking-1 drives its controller with H^=1∣T∣∑t−log⁡πθ(yt) ρt\hat H=\frac{1}{|\mathcal T|}\sum_t-\log\pi_\theta(y_t)\,\rho_t (MAI review). Low entropy is not a failure by itself — a model that has learned the task should be confident — the failure is entropy falling faster than the reward rises.

Clip fraction by side. PPO’s clip only removes gradient on the side where the update would push further: for A^>0\hat A>0 when ρ>1+εhigh\rho>1+\varepsilon_{\text{high}}, for A^<0\hat A<0 when ρ<1−εlow\rho<1-\varepsilon_{\text{low}} (clipping and IS). Logging the single number “clip fraction” hides which constraint binds. The upper-positive cell is the entropy lever (next section). The two “opposite” cells (A^>0, ρ<1−ε\hat A>0,\ \rho<1-\varepsilon and A^<0, ρ>1+ε\hat A<0,\ \rho>1+\varepsilon) cannot be produced by the update itself on the first minibatch; when they are non-zero, the ratio moved for another reason — staleness or engine mismatch. MAI-Thinking-1 added an outer clip ρ≤rmax⁡=50\rho\le r_{\max}=50 exactly because, with stale rollouts, the A^<0, ρ≫1\hat A<0,\ \rho\gg1 branch occasionally produced catastrophic grad-norm spikes.

Mismatch, measured in the right direction. Samples come from μ\mu, so δt=log⁡πold(yt)−log⁡μ(yt)\delta_t=\log\pi_{\text{old}}(y_t)-\log\mu(y_t) gives the k1 estimate −δ‾\overline{-\delta} and the k3 estimate eδ−1−δ‾\overline{e^{\delta}-1-\delta} of KL(μ ∥ πold)\mathrm{KL}(\mu\,\|\,\pi_{\text{old}}) (off-policy mismatch). Log the mean and the tail (max⁡∣δ∣\max\lvert\delta\rvert, fraction of ratios outside [0.5,2][0.5,2]), broken down by token-probability bin and by turn. Liu, Li et al. found the gap concentrated on tokens with near-zero sampler probability and larger after the first turn of a tool-use trajectory; causes and fixes are the subject of mismatch engineering.

Why entropy moves: the covariance rule

Before the failure catalogue, one derivation, because it explains why so many interventions act on the upper clip bound. Take one state with a softmax policy π=softmax⁡(z)\pi=\operatorname{softmax}(z) and entropy H=−∑aπalog⁡πaH=-\sum_a\pi_a\log\pi_a. Using ∂πa/∂zb=πa(1[a=b]−πb)\partial\pi_a/\partial z_b=\pi_a(\mathbb 1[a=b]-\pi_b),

∂H∂zb=−πb(log⁡πb+H).\frac{\partial H}{\partial z_b}=-\pi_b\big(\log\pi_b+H\big).

Suppose an update changes the logits by Δzb=η Ab\Delta z_b=\eta\,A_b (a natural-gradient step on softmax logits, where the logit of each action moves in proportion to its advantage). To first order,

ΔH≈∑b∂H∂zb ηAb=−η∑bπb(log⁡πb+H)Ab=−η Cov⁡a∼π(log⁡πa, Aa),\Delta H\approx\sum_b\frac{\partial H}{\partial z_b}\,\eta A_b=-\eta\sum_b\pi_b\big(\log\pi_b+H\big)A_b=-\eta\,\operatorname{Cov}_{a\sim\pi}\big(\log\pi_a,\ A_a\big),

where the last step uses Eπ[log⁡πa+H]=0\mathbb{E}_\pi[\log\pi_a+H]=0, so the sum is a covariance. Cui et al. (2025) make the same point for LLM policy gradients: entropy falls when high-probability tokens have high advantage (the model is confidently right and sharpens) and rises when low-probability tokens get positive advantage (exploration pays off). Now look at the clip: for A^>0\hat A>0 the upper bound 1+εhigh1+\varepsilon_{\text{high}} caps how much a token’s probability can grow per update. A token at πold=0.9\pi_{\text{old}}=0.9 cannot reach the cap anyway, a token at 0.010.01 hits it immediately — so a tight upper bound removes exactly the negative-covariance contributions (rare tokens with positive advantage) and leaves the positive ones. Entropy then falls faster than learning warrants. That is DAPO’s clip-higher argument, MAI’s choice to steer entropy by moving the upper bound, and MiMo-V2.6’s “widen the positive bounds when entropy is too low”. How those controllers are written as objectives is in regularisation; here we only need the diagnostic consequence: a rising upper-positive clip fraction is the leading indicator of entropy collapse.

A toy run with injectable failures

The simulator below is deliberately a toy: a few coupled state variables (skill, entropy, length, mismatch, an exploit propensity, router imbalance) evolve with noise and emit the dashboard metrics. The couplings are qualitative versions of mechanisms described in this lesson — mismatch amplifies itself (IcePop’s conditional bound δt+1≥(1+ημ/2) δt\delta_{t+1}\ge(1+\eta\mu/2)\,\delta_t), truncated responses earn zero reward, learning needs both entropy and non-degenerate groups — but none of the numbers are fitted to a real run.

이 트랙의 앞 레슨들은 목적함수에 관한 것이었다. loss를 어떻게 모으는지(sequence vs token), 어떤 ratio를 clip하거나 mask하는지(clipping과 IS), KL·entropy·길이를 어떻게 정규화하는지(정규화). 이 레슨은 실행(run)에 관한 것이다. 프론티어 RL 작업은 몇 주씩 돌고, 실패를 공개한 보고서들은 일관된 이야기를 한다. 실행은 천 가지 방식으로 망가지지 않고 대략 여덟 가지 방식으로 망가지며, 각각은 보상 곡선이 꺾이기 한참 전에 특정 지표에 흔적을 남긴다. MiniMax-M1은 학습·추론 확률의 상관이 0.9x에 머물러 보상이 오르지 않았고, VeXact는 모델이 이미 나빠지는 동안 KL 모니터가 700 step 동안 평평한 것을 보았고, MiMo-V2.6은 한 MoE 층의 load 변동계수가 20 step 만에 0.78에서 2.0으로 뛰는 것을 보았다. 여기서의 목표는 플레이북이다. 무엇을 기록하고, 어떻게 계산하고, 각 패턴이 어떤 고장을 가리키며, lab들이 무엇을 했는가.

무엇을 기록하고 어떻게 계산하나

아래 지표는 모두 싸다. trainer가 이미 가진 텐서(rollout log-prob log⁡μ\log\mu, 재계산한 log⁡πold\log\pi_{\text{old}}, 현재 log⁡πθ\log\pi_\theta, advantage, mask, 보상, 길이, router count)에서 나온다. 세 층으로 묶는다.

층지표정의(배치당)정상경고
정책entropy H^\hat H응답 토큰의 −log⁡μ(yt)‾\overline{-\log\mu(y_t)} (logit을 보관하면 전체 vocab entropy)천천히 감소하거나 평평급락(붕괴), 또는 횡설수설과 함께 상승
정책참조 모델과의 KLβ=0\beta=0이어도 πθ\pi_\theta 대 πref\pi_{\text{ref}}의 k3매끄럽게 증가꺾임, 가속
업데이트방향별 clip 비율(A^\hat A 부호) × (ratio가 띠 위/아래)의 네 칸업데이트가 미는 쪽에서 몇 %한쪽이 지배; “반대” 칸이 0이 아님
업데이트ratio 통계ρt=πθ/πold\rho_t=\pi_\theta/\pi_{\text{old}}의 평균·p99·최대최대 몇 배최대 수십 배(낡거나 불일치한 샘플)
업데이트grad normclip 전 전역 norm정상 상태spike, 바닥이 올라감
데이터길이평균, p95, 잘림 비율(한도 도달), 반복 비율난이도와 함께 증가잘림 증가, 루프
데이터보상학습 평균과 held-out 평가, 도메인별함께 오름학습↑, held-out 제자리
데이터zero-variance 그룹보상이 모두 같은 그룹의 비율중간대부분 퇴화
시스템mismatchKL(μ ∥ πold)\mathrm{KL}(\mu\,\Vert\,\pi_{\text{old}})의 k3, max⁡∣δt∣\max\lvert\delta_t\rvert, 띠 밖 비율, token ESS평평, 작음상승 추세, 꼬리 증가
시스템MoE load층별 expert count의 CV, max/mean, cold expert 비율안정CV와 cold 비율 상승

이 숫자들을 믿을 수 있게 만드는 세부 세 가지.

샘플로 재는 entropy. μ\mu에서 뽑은 토큰에 대해 Ey∼μ[−log⁡μ(y)]=H(μ)\mathbb{E}_{y\sim\mu}[-\log\mu(y)]=H(\mu)이므로, 샘플 토큰의 음의 log-prob 평균은 sampler entropy의 비편향 추정량이다. 낡은 샘플로 학습 중인 정책의 entropy가 필요하면 ratio로 가중한다. MAI-Thinking-1은 H^=1∣T∣∑t−log⁡πθ(yt) ρt\hat H=\frac{1}{|\mathcal T|}\sum_t-\log\pi_\theta(y_t)\,\rho_t로 제어기를 돌린다(MAI 리뷰). 낮은 entropy 자체는 고장이 아니다. 과제를 익힌 모델은 확신해야 한다. 고장은 entropy가 보상이 오르는 속도보다 빨리 떨어지는 것이다.

방향별 clip 비율. PPO의 clip은 업데이트가 더 밀려는 쪽에서만 gradient를 없앤다. A^>0\hat A>0이면 ρ>1+εhigh\rho>1+\varepsilon_{\text{high}}일 때, A^<0\hat A<0이면 ρ<1−εlow\rho<1-\varepsilon_{\text{low}}일 때다(clipping과 IS). “clip 비율” 하나만 기록하면 어느 제약이 걸리는지 감춰진다. 위쪽-양수 칸은 entropy의 지렛대다(다음 절). 두 “반대” 칸(A^>0, ρ<1−ε\hat A>0,\ \rho<1-\varepsilon와 A^<0, ρ>1+ε\hat A<0,\ \rho>1+\varepsilon)은 첫 minibatch에서는 업데이트 자체로 생길 수 없다. 0이 아니면 ratio가 다른 이유, 즉 staleness나 엔진 불일치로 움직였다는 뜻이다. MAI-Thinking-1이 외곽 clip ρ≤rmax⁡=50\rho\le r_{\max}=50을 넣은 것도 낡은 rollout에서 A^<0, ρ≫1\hat A<0,\ \rho\gg1 가지가 가끔 파국적인 grad-norm spike를 냈기 때문이다.

올바른 방향으로 잰 mismatch. 샘플은 μ\mu에서 나왔으므로 δt=log⁡πold(yt)−log⁡μ(yt)\delta_t=\log\pi_{\text{old}}(y_t)-\log\mu(y_t)로 KL(μ ∥ πold)\mathrm{KL}(\mu\,\|\,\pi_{\text{old}})의 k1 추정 −δ‾\overline{-\delta}와 k3 추정 eδ−1−δ‾\overline{e^{\delta}-1-\delta}를 얻는다(off-policy mismatch). 평균과 꼬리(max⁡∣δ∣\max\lvert\delta\rvert, ratio가 [0.5,2][0.5,2] 밖인 비율)를 토큰 확률 구간별·턴별로 나눠 기록한다. Liu, Li 등은 차이가 sampler 확률이 0에 가까운 토큰에 몰리고, tool 사용 trajectory의 첫 턴 이후에 더 크다는 것을 보였다. 원인과 처방은 mismatch 엔지니어링의 주제다.

entropy가 움직이는 이유: 공분산 규칙

고장 목록 전에 유도 하나. 왜 그렇게 많은 처방이 clip의 위쪽 경계를 건드리는지 설명해 준다. softmax 정책 π=softmax⁡(z)\pi=\operatorname{softmax}(z)와 entropy H=−∑aπalog⁡πaH=-\sum_a\pi_a\log\pi_a인 한 상태를 보자. ∂πa/∂zb=πa(1[a=b]−πb)\partial\pi_a/\partial z_b=\pi_a(\mathbb 1[a=b]-\pi_b)를 쓰면

∂H∂zb=−πb(log⁡πb+H).\frac{\partial H}{\partial z_b}=-\pi_b\big(\log\pi_b+H\big).

업데이트가 logit을 Δzb=η Ab\Delta z_b=\eta\,A_b만큼 바꾼다고 하자(softmax logit에 대한 natural-gradient step으로, 각 행동의 logit이 advantage에 비례해 움직인다). 1차까지

ΔH≈∑b∂H∂zb ηAb=−η∑bπb(log⁡πb+H)Ab=−η Cov⁡a∼π(log⁡πa, Aa)\Delta H\approx\sum_b\frac{\partial H}{\partial z_b}\,\eta A_b=-\eta\sum_b\pi_b\big(\log\pi_b+H\big)A_b=-\eta\,\operatorname{Cov}_{a\sim\pi}\big(\log\pi_a,\ A_a\big)

이다. 마지막 단계는 Eπ[log⁡πa+H]=0\mathbb{E}_\pi[\log\pi_a+H]=0이어서 합이 공분산이 된다는 것을 쓴다. Cui 등(2025)은 LLM 정책 경사에서 같은 점을 지적한다. 확률이 높은 토큰의 advantage가 높으면 entropy가 떨어지고(확신하며 맞히니 날카로워진다), 확률이 낮은 토큰이 양의 advantage를 받으면 오른다(탐색이 보상받는다). 이제 clip을 보자. A^>0\hat A>0에서 위 경계 1+εhigh1+\varepsilon_{\text{high}}는 한 번의 업데이트에서 토큰 확률이 커질 수 있는 정도를 묶는다. πold=0.9\pi_{\text{old}}=0.9인 토큰은 어차피 그 경계에 닿지 못하고, 0.010.01인 토큰은 곧바로 닿는다. 그래서 좁은 위 경계는 정확히 음의 공분산 기여(양의 advantage를 받은 드문 토큰)만 지우고 양의 기여는 남긴다. entropy는 학습이 정당화하는 것보다 빨리 떨어진다. 이것이 DAPO의 clip-higher 논리이고, MAI가 위 경계를 움직여 entropy를 조종하는 이유이며, MiMo-V2.6의 “entropy가 너무 낮으면 양수 쪽 경계를 넓힌다”이다. 이 제어기들을 목적함수로 어떻게 쓰는지는 정규화에 있다. 여기서 필요한 것은 진단적 귀결 하나다. 위쪽-양수 clip 비율의 상승은 entropy 붕괴의 선행 지표다.

고장을 주입하는 장난감 실행

아래 시뮬레이터는 일부러 장난감이다. 몇 개의 결합된 상태 변수(실력, entropy, 길이, mismatch, exploit 성향, router 불균형)가 잡음과 함께 진화하며 대시보드 지표를 낸다. 결합 방식은 이 레슨에서 설명하는 메커니즘의 정성적 판본이다. mismatch는 스스로 증폭되고(IcePop의 조건부 경계 δt+1≥(1+ημ/2) δt\delta_{t+1}\ge(1+\eta\mu/2)\,\delta_t), 잘린 응답은 보상 0을 받고, 학습에는 entropy와 퇴화하지 않은 그룹이 모두 필요하다. 하지만 어떤 숫자도 실제 실행에 맞춘 것이 아니다.

경보 순서alarm order – 최종 held-out 보상final held-out reward – (고장 없음no failure –)
A toy run of 300 steps (all numbers are illustrative, not from any report). Nine panels show the metrics of the dashboard table above; the dashed line marks the injection step, and red dots number the first alarm on each panel after it. Pick a failure and watch which panel fires first — for a mismatch spike the k3 panel leads, then grad norm, and held-out reward moves only after both. Tick the matching intervention and the run recovers; tick the wrong one and it does not. Switch "interventions" to "first alarm + 15 steps" to see that reacting late is not the same as preventing. 300 step짜리 장난감 실행이다(모든 숫자는 예시이고 보고서 값이 아니다). 아홉 패널은 위 대시보드 표의 지표이고, 점선은 고장을 주입한 step, 빨간 점과 번호는 그 뒤 각 패널의 첫 경보다. 고장을 고르고 어느 패널이 먼저 울리는지 보라. mismatch spike라면 k3 패널이 먼저, 그다음 grad norm이 울리고, held-out 보상은 그 둘 다음에야 움직인다. 맞는 개입을 켜면 회복하고, 엉뚱한 개입은 소용이 없다. "개입 시점"을 "첫 경보 + 15 step"으로 바꾸면 늦게 반응하는 것과 미리 막는 것이 다르다는 것이 보인다.

Things to try:

  1. Mismatch spike with no intervention. The k3 panel fires first, then grad norm a few steps later; the held-out reward moves only after both, and by then it falls off a cliff (the clip fraction and zero-variance panels react later still, once the run is already broken). This ordering is the reason to alarm on system metrics rather than on reward. Tick “IS mask band / routing replay” and the run is indistinguishable from the no-failure baseline (the grey line in the reward panel).
  2. Entropy collapse. The upper-clip fraction (red) rises at once, entropy falls, and a little later the zero-variance fraction climbs: when the policy stops exploring, groups become all-right or all-wrong and stop carrying signal. Reward does not crash — it plateaus, which is why entropy collapse is easy to miss. The entropy controller holds entropy at its target.
  3. Reward hacking. Nothing in the system tier moves. Train and held-out rewards separate and the KL to the reference accelerates. Only a held-out signal (or a human reading samples) can see it.
  4. Router drift. Load CV jumps within ~20 steps (the shape MiMo-V2.6 reported), the reward erodes slowly. Freezing the router prevents it.
  5. Set interventions to “first alarm + 15 steps”. For the mismatch spike the run recovers but loses ground; for length explosion the damage stops but the lost steps stay lost. Prevention is cheaper than reaction — which is why most labs run their guards from the start (MAI’s controller, V3.2’s Keep Routing, DAPO’s clip-higher are always on).

Failure modes, signatures, interventions

The table condenses what the reports describe. “First signal” is the metric that moves earliest in the cited accounts; the interventions are the ones each lab disclosed.

FailureMechanismFirst signalWhat labs did
entropy collapsetight upper clip removes rare-good-token updates; positive Cov(log π, A) dominatesupper-positive clip fraction, then entropy, then zero-variance groupsDAPO clip-higher εhigh=0.28\varepsilon_{\text{high}}=0.28; MAI integral controller on the upper bound; MiMo-V2.6 entropy-adaptive asymmetric bounds; GLM-4.5 raises temperature on plateaus; Qwen3 keeps entropy “rising steadily or stable”
entropy blow-up / gibberishtoo-wide bounds, negative-sample-heavy updates, mismatched tokensentropy up with language mixing; mismatch k3narrow the positive / widen the negative bound (MiMo-V2.6); language-consistency rewards (DeepSeek-R1, MAI, V3.2); temperature decay (K2)
length runaway, loopswrong answers lengthen faster; negative gradient piles up at the ends; loops have large gradientstruncation rate, repetition rate, grad normearly-stop repetition, sample+token normalisation, lower grad-clip and εhighIS\varepsilon^{IS}_{\text{high}} (MiniMax-M1); length reward after warm-up (k1.5); pass-rate-scaled length penalty (MAI); soft overlong punishment (DAPO); single-stage 64K instead of staged growth (GLM-4.5)
multi-turn gradient explosiontool output pushes the context off-distribution; low-probability tokens compound over turnsgrad norm per turn, malformed or empty turnsdrop trajectories containing a “void” turn with neither a tool call nor an answer (SimpleTIR); mask tool output; see long-horizon RL
train–inference mismatchkernels, precision, routing, sampling masks differ between enginesk3 and max ∣δ∣\lvert\delta\rvert, then grad normFP32 LM head (MiniMax-M1); Keep Routing / Keep Sampling Mask (V3.2); rollout routing replay R3 and vanilla routing replay R2; routing + top-p mask replay (MAI); batch-invariant or bit-exact rollout kernels; IcePop band (GLM-5); score centering; see mismatch engineering
stalenessasync samples from old weights; ρ\rho in the tensratio max, opposite clip cells, ESSstaleness bound (GLM-5 τ\tau, MAI 8 versions, AReaL η\eta); outer clip rmax⁡=50r_{\max}=50 (MAI); resync below ESS 1/2 (DLC); token-level freshness filters that keep a trajectory only if enough of its tokens are fresh; see async and staleness
MoE router driftrouter parameters move faster than experts can followper-layer load CV, cold-expert sharerouter freezing (MiMo-V2.6); a small load-balancing coefficient kept on (MAI 10−510^{-5})
signal starvationgroups all-correct or all-wrongzero-variance fractionzero-variance filtering: dynamic / active sampling (DAPO, OLMo 3, Skywork-OR1); adaptive group size (MAI); difficulty re-filtering (rewards and environments)
reward hackingproxy reward pays for an exploittrain–held-out gap, KL acceleration, behaviour auditshardened environments and graders, hack audits (rewards and environments, over-optimisation)
forgetting / interferencesingle-domain stages erode other skillsper-domain held-outPTX loss (K2); mixed-domain RL (V3.2 single stage, OLMo 3); 10% easy pool (MiMo-7B); cross-stage distillation (GLM-5)

A few entries deserve their numbers.

Entropy collapse

DAPO’s arithmetic is the cleanest statement: with ε=0.2\varepsilon=0.2, a token at πold=0.01\pi_{\text{old}}=0.01 can rise only to 0.0120.012 in one update, while a token at 0.90.9 never reaches the bound. MAI-Thinking-1 closes the loop: k←clip⁡(k+δ sign⁡(H⋆−H^), 0, kmax⁡)k\leftarrow\operatorname{clip}\big(k+\delta\,\operatorname{sign}(H^\star-\hat H),\,0,\,k_{\max}\big) with upper bound (1−ε)−1+k(1-\varepsilon)^{-1}+k, ε=0.6\varepsilon=0.6, δ=0.25\delta=0.25, H⋆=0.3H^\star=0.3, kmax⁡=2.5k_{\max}=2.5, and reports that an entropy bonus in the loss worked worse. MiMo-V2.6 runs separate bounds for positive and negative advantages, both initialised at [0.2,5.0][0.2, 5.0] and adapted from the entropy. GLM-4.5 attacks the same plateau from the sampler side: when the mean reward stalls, raise the rollout temperature to the largest value whose validation score stays within 1% of the best.

Length runaway and pattern collapse

MiniMax-M1 extended its output budget in stages from 40K to 80K and, late in each stage, saw the ends of responses turn into garbage. Their diagnosis: wrong responses grow longer faster than correct ones, so with token-level aggregation the negative gradient accumulates on the last tokens of long generations. Their fixes were operational — stop generation once 3,000 consecutive tokens all have probability above 0.99 (a loop), combine sample-level loss with token-level normalisation, and lower both the gradient-clip threshold and εhighIS\varepsilon^{IS}_{\text{high}}. The metric that would have caught it first is the truncation rate, not the mean length: means move slowly; the fraction hitting the cap is a threshold phenomenon. GLM-4.5 adds a counter-intuitive lesson: growing the maximum length in stages (16K → 32K → 48K → 64K) made a model that SFT had taught to write 64K answers “unlearn” long outputs, so it trained at 64K from the start. Length penalties as objectives are covered in regularisation.

Mismatch and staleness

What makes mismatch dangerous is that it hides. In VeXact’s runs the K1/K3 mismatch KL with recomputation stayed almost identical to the bit-exact reference for the first 700 steps — the monitor did not catch the early degradation that a validation curve did. Liu, Li et al. report vllm-kl magnitudes of 5e-4–1e-3 on H20, 1e-3–1e-2 on L20 and 1e-2–1 on A100 for the same recipe, and a collapsed L20 run that recovered when resumed on H20 from its step-200 checkpoint. MAI-Thinking-1 saw foreign-language tokens creep into long CoTs, correlated with spikes in the train–inference log-prob gap, and added a language-consistency reward. DLC’s rule for stale samplers is the simplest alarm with an action attached: when ESS=1/Eq[ρt2]\text{ESS}=1/\mathbb{E}_q[\rho_t^2] falls below 1/2, resynchronise; without it, their Qwen3-1.7B stale run dropped below 1/2 at step 11 and was at 0.5% accuracy by step 30.

MoE router drift

MiMo-V2.6, Pro model, trainable router: in decoder layer 9 (384 experts) the load CV rose from 0.78 to 2.0 within the first 20 steps, max/mean load from 6× to 16×, and the share of cold experts (below 0.1× the mean) from 0.5% to 22%. Restoring only the router parameters of the step-20 checkpoint to their pre-RL values brought the load back with unchanged benchmark scores, so the drift was in the router, not the experts. A frozen-router run stayed at CV ≈ 0.7, max ≈ 5.5×, cold ≈ 1%. This is a different failure from routing mismatch (same weights, different experts in two engines), which Keep Routing and R3 address.

해 볼 것:

  1. 개입 없이 mismatch spike. k3 패널이 먼저 울리고 몇 step 뒤 grad norm이 울린다. held-out 보상은 그 둘 다 울린 뒤에야 움직이고, 그때는 절벽처럼 떨어진다(clip 비율과 zero-variance 패널은 실행이 이미 망가진 뒤에 더 늦게 반응한다). 보상이 아니라 시스템 지표에 경보를 거는 이유가 이 순서다. “IS mask·routing replay”를 켜면 실행은 고장 없는 기준선(보상 패널의 회색 선)과 구별되지 않는다.
  2. entropy 붕괴. 위쪽 clip 비율(빨강)이 곧바로 오르고 entropy가 떨어지며, 조금 뒤 zero-variance 비율이 오른다. 정책이 탐색을 멈추면 그룹이 모두 맞히거나 모두 틀려 신호를 잃는다. 보상은 무너지지 않고 정체한다. entropy 붕괴를 놓치기 쉬운 이유다. entropy 제어기는 entropy를 목표값에 붙잡는다.
  3. reward hacking. 시스템 층은 아무것도 움직이지 않는다. 학습 보상과 held-out 보상이 갈라지고 참조 모델과의 KL이 가속한다. held-out 신호(또는 샘플을 읽는 사람)만 볼 수 있다.
  4. router 표류. load CV가 20 step 남짓에 뛴다(MiMo-V2.6이 보고한 모양). 보상은 천천히 깎인다. router를 고정하면 막힌다.
  5. 개입 시점을 “첫 경보 + 15 step”으로 바꾼다. mismatch spike에서는 회복하지만 손해를 본다. 길이 폭주에서는 손상이 멈추지만 잃은 step은 그대로다. 예방이 반응보다 싸다. 그래서 대부분의 lab은 방어 장치를 처음부터 켠다(MAI의 제어기, V3.2의 Keep Routing, DAPO의 clip-higher는 항상 켜져 있다).

고장 유형, 징후, 처방

표는 보고서들이 서술한 것을 압축한 것이다. “첫 신호”는 인용한 서술에서 가장 먼저 움직인 지표이고, 처방은 각 lab이 공개한 것이다.

고장메커니즘첫 신호lab들이 한 일
entropy 붕괴좁은 위 clip이 드문 좋은 토큰의 업데이트를 지움; 양의 Cov(log π, A)가 지배위쪽-양수 clip 비율, 그다음 entropy, 그다음 zero-variance 그룹DAPO clip-higher εhigh=0.28\varepsilon_{\text{high}}=0.28; MAI 위 경계의 적분 제어기; MiMo-V2.6 entropy 적응형 비대칭 경계; GLM-4.5 정체 시 온도 상승; Qwen3 entropy를 “꾸준히 오르거나 안정”하게 유지
entropy 폭주·횡설수설너무 넓은 경계, 음수 샘플 위주 업데이트, 불일치 토큰언어 섞임과 함께 entropy 상승; mismatch k3양수 쪽 좁히고 음수 쪽 넓힘(MiMo-V2.6); 언어 일관성 보상(DeepSeek-R1, MAI, V3.2); 온도 감쇠(K2)
길이 폭주·루프틀린 답이 더 빨리 길어짐; 음의 gradient가 끝에 쌓임; 루프는 gradient가 큼잘림 비율, 반복 비율, grad norm반복 조기 중단, sample+token 정규화, grad-clip과 εhighIS\varepsilon^{IS}_{\text{high}} 낮춤(MiniMax-M1); warm-up 뒤 길이 보상(k1.5); pass rate 비례 길이 패널티(MAI); soft overlong punishment(DAPO); 단계적 증가 대신 처음부터 64K(GLM-4.5)
멀티턴 gradient 폭발tool 출력이 문맥을 분포 밖으로 밀고, 낮은 확률 토큰이 턴마다 누적턴별 grad norm, 잘못되거나 빈 턴tool 호출도 답도 없는 “void” 턴을 가진 trajectory를 업데이트에서 제외(SimpleTIR); tool 출력 masking; long-horizon RL 참고
학습–추론 불일치엔진 간 kernel·정밀도·routing·sampling mask 차이k3와 max ∣δ∣\lvert\delta\rvert, 그다음 grad normFP32 LM head(MiniMax-M1); Keep Routing / Keep Sampling Mask(V3.2); rollout routing replay R3와 vanilla routing replay R2; routing + top-p mask replay(MAI); batch-invariant·bit-exact rollout kernel; IcePop 띠(GLM-5); score centering; mismatch 엔지니어링 참고
staleness옛 가중치에서 나온 비동기 샘플; ρ\rho가 수십ratio 최대, 반대 clip 칸, ESSstaleness 상한(GLM-5 τ\tau, MAI 8 버전, AReaL η\eta); 외곽 clip rmax⁡=50r_{\max}=50(MAI); ESS 1/2 미만이면 재동기화(DLC); 신선한 토큰 비율이 충분한 trajectory만 받는 토큰 단위 freshness 필터; async와 staleness 참고
MoE router 표류router 매개변수가 expert가 따라올 수 없을 만큼 빨리 움직임층별 load CV, cold expert 비율router 고정(MiMo-V2.6); 작은 load-balancing 계수 유지(MAI 10−510^{-5})
신호 고갈그룹이 모두 맞히거나 모두 틀림zero-variance 비율zero-variance 필터: dynamic·active sampling(DAPO, OLMo 3, Skywork-OR1); 적응형 그룹 크기(MAI); 난이도 재선별(보상과 환경)
reward hackingproxy 보상이 exploit에 값을 치름학습–held-out 격차, KL 가속, 행동 감사환경·채점기 강화, hack 감사(보상과 환경, 과최적화)
망각·간섭단일 도메인 단계가 다른 능력을 깎음도메인별 held-outPTX loss(K2); 도메인 혼합 RL(V3.2 단일 단계, OLMo 3); 10% easy pool(MiMo-7B); cross-stage 증류(GLM-5)

몇 항목은 숫자를 볼 만하다.

entropy 붕괴

DAPO의 산수가 가장 깔끔하다. ε=0.2\varepsilon=0.2이면 πold=0.01\pi_{\text{old}}=0.01인 토큰은 한 번의 업데이트로 0.0120.012까지만 오를 수 있고, 0.90.9인 토큰은 경계에 영영 닿지 않는다. MAI-Thinking-1은 고리를 닫는다. 위 경계 (1−ε)−1+k(1-\varepsilon)^{-1}+k에 대해 k←clip⁡(k+δ sign⁡(H⋆−H^), 0, kmax⁡)k\leftarrow\operatorname{clip}\big(k+\delta\,\operatorname{sign}(H^\star-\hat H),\,0,\,k_{\max}\big), ε=0.6\varepsilon=0.6, δ=0.25\delta=0.25, H⋆=0.3H^\star=0.3, kmax⁡=2.5k_{\max}=2.5이고, loss에 entropy bonus를 넣는 것은 더 나빴다고 보고한다. MiMo-V2.6은 양·음 advantage에 별도의 경계를 두고, 둘 다 [0.2,5.0][0.2, 5.0]에서 시작해 entropy에 따라 조정한다. GLM-4.5는 같은 정체를 sampler 쪽에서 공격한다. 평균 보상이 멈추면 rollout 온도를, 검증 점수가 최고치의 1% 안에 머무는 가장 큰 값까지 올린다.

길이 폭주와 pattern collapse

MiniMax-M1은 출력 예산을 40K에서 80K까지 단계적으로 늘렸고, 각 단계 후반에 응답 끝부분이 망가지는 것을 보았다. 진단은 이렇다. 틀린 응답이 맞는 응답보다 더 빨리 길어지므로, 토큰 단위로 모으면 음의 gradient가 긴 생성의 마지막 토큰들에 쌓인다. 처방은 운영적이었다. 3,000개 연속 토큰이 모두 확률 0.99를 넘으면(루프) 생성을 멈추고, sample 단위 loss와 token 단위 정규화를 섞고, gradient-clip 임계값과 εhighIS\varepsilon^{IS}_{\text{high}}를 낮췄다. 이것을 가장 먼저 잡았을 지표는 평균 길이가 아니라 잘림 비율이다. 평균은 천천히 움직이지만, 한도에 닿는 비율은 문턱 현상이다. GLM-4.5는 직관에 반하는 교훈을 더한다. 최대 길이를 단계적으로(16K → 32K → 48K → 64K) 늘리자, SFT가 64K 답을 쓰도록 가르친 모델이 긴 출력을 “잊었다”. 그래서 처음부터 64K로 학습했다. 목적함수로서의 길이 패널티는 정규화에서 다룬다.

mismatch와 staleness

mismatch가 위험한 것은 숨기 때문이다. VeXact의 실행에서 재계산 방식의 K1/K3 mismatch KL은 첫 700 step 동안 bit-exact 기준선과 거의 같았다. 검증 곡선이 잡은 초기 열화를 모니터는 잡지 못했다. Liu, Li 등은 같은 레시피에서 vllm-kl 크기가 H20 5e-4–1e-3, L20 1e-3–1e-2, A100 1e-2–1이었고, 붕괴한 L20 실행을 step 200 체크포인트에서 H20으로 이어 돌리자 회복했다고 보고한다. MAI-Thinking-1은 긴 CoT에 외국어 토큰이 스며드는 것을 보았고, 그것이 학습–추론 log-prob 격차의 spike와 상관되어 언어 일관성 보상을 넣었다. 낡은 sampler에 대한 DLC의 규칙은 행동이 붙은 가장 단순한 경보다. ESS=1/Eq[ρt2]\text{ESS}=1/\mathbb{E}_q[\rho_t^2]가 1/2 아래로 떨어지면 재동기화한다. 그 규칙이 없으면 Qwen3-1.7B stale 실행은 step 11에서 1/2 아래로 떨어졌고 step 30에는 정확도 0.5%였다.

MoE router 표류

MiMo-V2.6, Pro 모델, 학습 가능한 router: decoder 9층(expert 384개)에서 load CV가 첫 20 step 안에 0.78에서 2.0으로, max/mean load가 6배에서 16배로, cold expert(평균의 0.1배 미만) 비율이 0.5%에서 22%로 올랐다. step 20 체크포인트의 router 매개변수만 RL 이전 값으로 되돌리자 load가 돌아왔고 벤치마크 점수는 그대로였다. 표류는 expert가 아니라 router에 있었다. router를 고정한 실행은 CV ≈ 0.7, max ≈ 5.5배, cold ≈ 1%에 머물렀다. 이것은 routing 불일치(같은 가중치인데 두 엔진에서 다른 expert)와 다른 고장이고, 그쪽은 Keep Routing과 R3가 다룬다.

Click a symptom to cycle it through unknown → seen → ruled out. The bars are a naive-Bayes score over a likelihood table we wrote by hand from the failure reports cited in this lesson (a heuristic, not a fitted model). Below the bars: the next check with the largest expected information gain over the causes, and what labs did about the leading one. Notice how few symptoms are specific: grad-norm spikes are compatible with almost everything, while "held-out flat while train rises" points almost only at reward hacking. 증상을 클릭하면 모름 → 관측 → 배제 순으로 바뀐다. 막대는 이 레슨에 인용한 실패 보고들로부터 손으로 쓴 likelihood 표 위의 naive-Bayes 점수다(학습된 모델이 아니라 휴리스틱). 막대 아래에는 원인들에 대한 기대 정보량이 가장 큰 다음 확인 항목과, 1위 원인에 대해 각 lab이 한 일이 나온다. 특이적인 증상이 얼마나 적은지 보라. grad-norm spike는 거의 모든 원인과 양립하지만, "학습 보상만 오르고 held-out은 제자리"는 거의 reward hacking만 가리킨다.

Try the two examples. “Collapse on long runs” marks grad-norm spikes and “problems concentrated on long, stale samples” and rules out router imbalance: staleness and mismatch lead, and the next check the figure suggests is the one that separates them (the mismatch k3 at the same weights). “Only train reward rises” with mismatch ruled out puts reward hacking far ahead. The likelihoods are our own reading of the reports, not measurements; the point of the figure is the structure — few symptoms are specific, so pick the next measurement by how much it separates the leading hypotheses.

Optimiser and learning-rate hygiene

Most frontier RL recipes use a constant learning rate around 10−610^{-6}: OLMo 3 1×10−61\times10^{-6} (7B) and 2×10−62\times10^{-6} (32B), MAI-Thinking-1 10−610^{-6} lowered to 9×10−79\times10^{-7} at long lengths (longer rollouts are staler), MiMo-7B 10−610^{-6}, MiMo-V2.6 3×10−63\times10^{-6} with no warm-up or weight decay. Two less obvious settings recur.

Adam’s ϵ\epsilon. Adam’s per-coordinate step is η m^/(v^+ϵ)\eta\,\hat m/(\sqrt{\hat v}+\epsilon). On the first step m^=g\hat m=g, v^=g2\hat v=g^2, so the step is η g/(∣g∣+ϵ)\eta\,g/(\lvert g\rvert+\epsilon). If ∣g∣≫ϵ\lvert g\rvert\gg\epsilon it is ηsign⁡(g)\eta\operatorname{sign}(g), as intended; if ∣g∣≪ϵ\lvert g\rvert\ll\epsilon it is η g/ϵ\eta\,g/\epsilon — Adam silently degrades into SGD with learning rate η/ϵ\eta/\epsilon, which for ∣g∣∼10−14\lvert g\rvert\sim10^{-14} and ϵ=10−8\epsilon=10^{-8} is a step about 10−610^{-6} of the intended one. MiniMax-M1 measured gradient magnitudes from 10−1810^{-18} to 10−510^{-5}, mostly below 10−1410^{-14}; verl’s defaults (β=(0.9,0.999)\beta=(0.9,0.999), ϵ=10−8\epsilon=10^{-8}) failed to converge and they used β2=0.95\beta_2=0.95, ϵ=10−15\epsilon=10^{-15}. MAI-Thinking-1 uses β1=β2=0.95\beta_1=\beta_2=0.95, ϵ=10−15\epsilon=10^{-15}. A shorter β2\beta_2 also lets v^\hat v track the non-stationary gradient scale of RL.

Optimiser resets. k1.5 resets optimiser state at the start of every iteration because the mirror-descent anchor changes, so each iteration is a new problem; GLM-5 resets after every weight push to the inference engines in its asynchronous loop. The moments accumulated against an old behaviour policy point at an objective that no longer exists.

After a collapse

Rolling back is the first instinct and often not enough. MAI-Thinking-1 found that checkpoints from before a collapse frequently already carried the instability, so rolling back did not help; instead it restarted from a model SFT-ed on rollouts collected during RL (self-distillation), which also moved progress onto a fresh base. Liu, Li et al. recovered by changing the hardware (and hence the kernels) under the same checkpoint — a reminder that a collapse caused by the system is fixed in the system. DPPO’s analysis suggests where to look in the logs: the instability came from updates that cut a token’s probability by more than 0.5 on negative samples, which made up 0.5% or less of all updates — invisible in averages, obvious in a histogram of per-token log-prob change split by the sign of A^\hat A.

두 예시를 눌러 보라. “긴 응답에서 붕괴”는 grad-norm spike와 “문제가 길고 낡은 샘플에 집중”을 표시하고 router 불균형을 배제한다. staleness와 mismatch가 앞서고, 그림이 제안하는 다음 확인은 그 둘을 가르는 항목(같은 가중치에서의 mismatch k3)이다. mismatch를 배제한 “학습 보상만 상승”은 reward hacking을 크게 앞세운다. likelihood는 보고서들을 우리가 읽은 결과이지 측정값이 아니다. 그림의 요점은 구조다. 특이적인 증상은 드물다. 그러니 다음 측정은 선두 가설들을 얼마나 가르는지로 고른다.

optimizer와 학습률 위생

대부분의 프론티어 RL 레시피는 10−610^{-6} 근처의 고정 학습률을 쓴다. OLMo 3 1×10−61\times10^{-6}(7B)와 2×10−62\times10^{-6}(32B), MAI-Thinking-1 10−610^{-6}에서 긴 길이에서는 9×10−79\times10^{-7}(긴 rollout일수록 더 낡으므로), MiMo-7B 10−610^{-6}, MiMo-V2.6은 warm-up과 weight decay 없이 3×10−63\times10^{-6}. 덜 뻔한 설정 두 가지가 반복해서 나온다.

Adam의 ϵ\epsilon. Adam의 좌표별 step은 η m^/(v^+ϵ)\eta\,\hat m/(\sqrt{\hat v}+\epsilon)이다. 첫 step에서 m^=g\hat m=g, v^=g2\hat v=g^2이므로 step은 η g/(∣g∣+ϵ)\eta\,g/(\lvert g\rvert+\epsilon)다. ∣g∣≫ϵ\lvert g\rvert\gg\epsilon이면 의도대로 ηsign⁡(g)\eta\operatorname{sign}(g)이고, ∣g∣≪ϵ\lvert g\rvert\ll\epsilon이면 η g/ϵ\eta\,g/\epsilon이 된다. Adam이 조용히 학습률 η/ϵ\eta/\epsilon의 SGD로 퇴화한다. ∣g∣∼10−14\lvert g\rvert\sim10^{-14}, ϵ=10−8\epsilon=10^{-8}이면 의도한 step의 약 10−610^{-6}배다. MiniMax-M1은 gradient 크기가 10−1810^{-18}에서 10−510^{-5}에 걸쳐 있고 대부분 10−1410^{-14} 미만임을 측정했다. verl 기본값(β=(0.9,0.999)\beta=(0.9,0.999), ϵ=10−8\epsilon=10^{-8})은 수렴하지 않았고 β2=0.95\beta_2=0.95, ϵ=10−15\epsilon=10^{-15}를 썼다. MAI-Thinking-1도 β1=β2=0.95\beta_1=\beta_2=0.95, ϵ=10−15\epsilon=10^{-15}다. 짧은 β2\beta_2는 v^\hat v가 RL의 비정상적인 gradient 크기를 따라가게도 해 준다.

optimizer 초기화. k1.5는 mirror-descent의 기준점이 바뀌어 매 iteration이 새 문제가 되므로 iteration마다 optimizer 상태를 초기화한다. GLM-5는 비동기 루프에서 추론 엔진에 가중치를 밀어 넣을 때마다 초기화한다. 옛 behaviour 정책에 대해 쌓인 moment는 이제 존재하지 않는 목적함수를 가리킨다.

붕괴한 뒤

되돌리기가 첫 본능이지만 충분하지 않은 경우가 많다. MAI-Thinking-1은 붕괴 이전 체크포인트가 이미 불안정성을 품고 있는 경우가 많아 되돌려도 소용이 없었다고 한다. 대신 RL 중 모은 rollout으로 SFT한 모델(self-distillation)에서 다시 시작했고, 이것으로 진척을 새 base로 옮기기도 했다. Liu, Li 등은 같은 체크포인트 아래의 하드웨어(따라서 kernel)를 바꿔 회복했다. 시스템이 일으킨 붕괴는 시스템에서 고친다는 것을 상기시킨다. DPPO의 분석은 로그의 어디를 볼지 알려 준다. 불안정성은 음수 샘플에서 토큰 확률을 0.5 넘게 깎는 업데이트에서 왔고, 그것은 전체 업데이트의 0.5% 이하였다. 평균에서는 보이지 않고, A^\hat A의 부호로 나눈 토큰별 log-prob 변화 히스토그램에서는 뚜렷하다.

Computing the dashboard

The NumPy block builds a fake batch with known ground truth — per-position logits for a sampler and a slightly perturbed trainer, with rare large gaps — and checks each estimator against the exact value: sampled-NLL entropy vs true entropy, k1/k3 vs exact KL(μ∥πold)\mathrm{KL}(\mu\|\pi_{\text{old}}), clip fractions by side (including the “opposite” cells produced by drift), zero-variance groups, then the covariance rule and Adam’s ϵ\epsilon.

NumPy Dashboard metrics with ground truth, the covariance rule, Adam's eps
import numpy as np

rng = np.random.default_rng(0)
P, G, T, V = 64, 8, 48, 40                  # prompts, group size, tokens per response, vocab
N = P * G * T
logsm = lambda z: z - z.max(-1, keepdims=True) - np.log(np.exp(z - z.max(-1, keepdims=True)).sum(-1, keepdims=True))

# --- a fake rollout: per-position logits for the sampler (μ) and the trainer (π_old)
z_mu = rng.normal(0, 2.0, (N, V))
noise = rng.normal(0, 0.02, (N, V))                       # small kernel noise on every logit
spike = (rng.random(N) < 0.003)[:, None] * rng.normal(0, 1.5, (N, V))   # rare large gaps (e.g. routing flip)
z_old = z_mu + noise + spike
lmu, lold = logsm(z_mu), logsm(z_old)
y = (np.exp(lmu).cumsum(-1) > rng.random((N, 1))).argmax(-1).astype(np.intp)   # sample from μ
ar = np.arange(N)
lp_mu, lp_old = lmu[ar, y], lold[ar, y]

# 1) entropy: the sampled-token NLL is an unbiased estimate of the sampler's entropy
H_true = -(np.exp(lmu) * lmu).sum(-1).mean()
H_hat = (-lp_mu).mean()
print(f"entropy  true {H_true:.4f}   estimate mean(-log μ(y)) {H_hat:.4f}")

# 2) mismatch: k1, k3 estimators of KL(μ‖π_old) vs the exact value
d = lp_old - lp_mu                                          # δ = log π_old − log μ
kl_exact = (np.exp(lmu) * (lmu - lold)).sum(-1).mean()
k1, k3 = (-d).mean(), (np.exp(d) - 1 - d).mean()
r = np.exp(d)
print(f"KL(μ‖π_old) exact {kl_exact:.2e}  k1 {k1:.2e}  k3 {k3:.2e}  max|δ| {np.abs(d).max():.2f}"
      f"  out of [0.5,2] {np.mean((r < 0.5) | (r > 2)):.2%}  token ESS {r.sum()**2 / (r**2).sum() / N:.4f}")

# 3) rewards, zero-variance groups, advantages, clip fractions by side after one update
p_solve = rng.beta(0.6, 0.6, P)                            # per-prompt pass rate (many near 0 or 1)
R = (rng.random((P, G)) < p_solve[:, None]).astype(float)
zv = np.mean(R.std(1) == 0)
A = np.repeat((R - R.mean(1, keepdims=True)).ravel(), T)    # GRPO without std, broadcast to tokens
lp_new = lp_old + 0.15 * np.sign(A) * rng.exponential(1.0, N)   # the update pushes each token along sign(A)
lp_new += rng.normal(0, 0.1, N)                               # plus drift unrelated to A (stale weights)
rho = np.exp(lp_new - lp_old)
el, eh = 0.2, 0.28
up = np.mean((A > 0) & (rho > 1 + eh)); lo = np.mean((A < 0) & (rho < 1 - el))
print(f"zero-variance groups {zv:.2%}   clip frac: A>0 & ρ>1+ε_h {up:.2%}   A<0 & ρ<1−ε_l {lo:.2%}"
      f"   ρ max {rho.max():.2f}  p99 {np.quantile(rho, 0.99):.2f}")
opp = np.mean((A > 0) & (rho < 1 - el)) + np.mean((A < 0) & (rho > 1 + eh))
print(f"opposite cells (A>0 & ρ<1−ε_l, A<0 & ρ>1+ε_h): {opp:.2%}  ← the ratio moved against the update: drift, not learning")

# 4) entropy dynamics: for a natural-gradient step Δz = η·A on softmax logits,
#    ΔH ≈ −η Cov_{a~π}(log π(a), A(a))
z = rng.normal(0, 1.5, V); Aa = rng.normal(0, 1, V); eta = 1e-3
H = lambda z: -(np.exp(logsm(z)) * logsm(z)).sum()
pi, lpi = np.exp(logsm(z)), logsm(z)
cov = (pi * (lpi - pi @ lpi) * (Aa - pi @ Aa)).sum()
print(f"ΔH actual {H(z + eta * Aa) - H(z):+.3e}   −η·Cov(log π, A) {-eta * cov:+.3e}")
Aa2 = Aa.copy(); Aa2[np.argmax(pi)] += 2.0                  # reward the already-likely token more
cov2 = (pi * (lpi - pi @ lpi) * (Aa2 - pi @ Aa2)).sum()
print(f"boost the top token's advantage: Cov {cov:+.3f} → {cov2:+.3f}  (positive Cov ⇒ entropy falls)")

# 5) Adam's eps when gradients are tiny (MiniMax-M1: |g| mostly < 1e-14)
g = 1e-14 * rng.standard_normal(1000)
m, v = g, g**2                                              # first step, bias-corrected moments
for eps in [1e-8, 1e-15]:
    step = np.abs(m / (np.sqrt(v) + eps)).mean()
    print(f"eps={eps:.0e}: mean |Adam step| / lr = {step:.2e}")
 

What to read off: the sampled-NLL entropy matches the exact entropy to two or three decimals; k1 and k3 both land near the exact KL, with k3 slightly above (it is non-negative per token, k1 is not); the rare logit spikes (0.3% of positions) dominate max⁡∣δ∣\max\lvert\delta\rvert while barely moving the mean — the reason to log the tail. The opposite clip cells are small but non-zero only because we injected drift unrelated to A^\hat A. The covariance prediction matches the actual entropy change to three digits, and making the most likely token’s advantage larger flips the covariance positive. With ϵ=10−8\epsilon=10^{-8} the Adam step is about 10−610^{-6} of the intended size.

For a real trainer, the same metrics as one function — call it once per optimiser step on the tensors you already have.

PyTorch PyTorch: a metrics logger for an RL trainer 로컬에서 실행run locally (pip install torch)
import torch

@torch.no_grad()
def token_entropy(logits):
    """Full-vocabulary entropy per position (call in chunks for long sequences)."""
    lp = torch.log_softmax(logits.float(), dim=-1)
    return -(lp.exp() * lp).sum(-1)

@torch.no_grad()
def rl_dashboard(logp_new, logp_old, logp_rollout, adv, mask, rewards, group_ids,
                 resp_len, max_len, ent_full=None, expert_counts=None,
                 eps_low=0.2, eps_high=0.28, band=(0.5, 2.0)):
    """logp_*/adv/mask/ent_full: (B, T) for sampled tokens; rewards/group_ids/resp_len: (B,).
    expert_counts: (layers, experts) tokens routed to each expert in this batch."""
    m = mask.bool()
    lp_new, lp_old, lp_mu, A = logp_new[m], logp_old[m], logp_rollout[m], adv[m]
    rho = torch.exp(lp_new - lp_old)
    d = lp_old - lp_mu                                   # δ = log π_old − log μ (samples from μ)
    r = torch.exp(d)
    out = {
        "entropy/sampled_nll": (-lp_mu).mean(),
        "clip/high_pos": ((A > 0) & (rho > 1 + eps_high)).float().mean(),
        "clip/low_neg": ((A < 0) & (rho < 1 - eps_low)).float().mean(),
        "clip/opposite": (((A > 0) & (rho < 1 - eps_low)) | ((A < 0) & (rho > 1 + eps_high))).float().mean(),
        "ratio/max": rho.max(),
        "ratio/mean": rho.mean(),
        "kl_old_new_k3": (rho - 1 - torch.log(rho)).mean(),
        "mismatch/k1": (-d).mean(),
        "mismatch/k3": (r - 1 - d).mean(),
        "mismatch/max_abs_delta": d.abs().max(),
        "mismatch/frac_out_band": ((r < band[0]) | (r > band[1])).float().mean(),
        "mismatch/token_ess": r.sum() ** 2 / (r ** 2).sum() / r.numel(),
        "length/mean": resp_len.float().mean(),
        "length/trunc_rate": (resp_len >= max_len).float().mean(),
        "reward/mean": rewards.float().mean(),
    }
    # zero-variance groups: per-group variance of the reward
    _, inv = torch.unique(group_ids, return_inverse=True)
    k = int(inv.max()) + 1
    rw = rewards.float()
    n = rw.new_zeros(k).index_add_(0, inv, torch.ones_like(rw))
    s1 = rw.new_zeros(k).index_add_(0, inv, rw)
    s2 = rw.new_zeros(k).index_add_(0, inv, rw * rw)
    var = s2 / n - (s1 / n) ** 2
    out["groups/zero_var_frac"] = (var <= 1e-12).float().mean()
    if ent_full is not None:
        out["entropy/full_vocab"] = ent_full[m].float().mean()
    if expert_counts is not None:
        load = expert_counts.float()
        mean = load.mean(-1, keepdim=True)
        out["moe/load_cv_max_layer"] = (load.std(-1) / mean.squeeze(-1)).max()
        out["moe/max_over_mean"] = (load / mean).max()
        out["moe/cold_frac"] = (load < 0.1 * mean).float().mean()
    return {k_: float(v) for k_, v in out.items()}

# grad norm: log the value clip_grad_norm_ returns — it is the norm *before* clipping
# gn = torch.nn.utils.clip_grad_norm_(model.parameters(), max_norm=1.0)
 
확인 문제Check yourself

Your run's reward has been flat for 150 steps. Entropy is falling, the upper clip fraction on positive-advantage tokens has tripled, and the fraction of groups whose rewards are all identical is rising. Mismatch k3 is flat. What is the most direct intervention?

This is the entropy-collapse signature: the upper bound is removing the updates that would raise rare, good tokens (the negative-covariance terms in ΔH≈−ηCov⁡(log⁡π,A)\Delta H\approx-\eta\operatorname{Cov}(\log\pi,A)), so entropy falls, groups become all-right or all-wrong, and the reward plateaus. Widening εhigh\varepsilon_{\text{high}} (DAPO) or driving the bound with an entropy controller (MAI, MiMo-V2.6) targets the mechanism. Routing replay addresses mismatch, which is flat here; a larger KL to the reference slows learning without restoring exploration; a lower LR slows everything.

확인 문제Check yourself

Gradient magnitudes in your RL run are mostly around 1e-14 and you use AdamW with eps = 1e-8. What does Adam's update look like?

The first-step update is η g/(∣g∣+ϵ)\eta\,g/(\lvert g\rvert+\epsilon). With ∣g∣≈10−14≪ϵ=10−8\lvert g\rvert\approx10^{-14}\ll\epsilon=10^{-8} this is η g/ϵ≈10−6 ηsign⁡(g)\eta\,g/\epsilon\approx10^{-6}\,\eta\operatorname{sign}(g): Adam’s normalisation is switched off by ϵ\epsilon. MiniMax-M1 hit exactly this and moved to ϵ=10−15\epsilon=10^{-15} (and β2=0.95\beta_2=0.95); MAI-Thinking-1 uses the same ϵ\epsilon.

Summary

  • Log in three tiers — policy (entropy, KL to reference), update (clip fraction by side, ratio max, grad norm), data (truncation, held-out reward, zero-variance groups) — plus system (mismatch k3 and its tail, MoE load). Averages hide the failures; tails and splits reveal them.
  • Entropy change follows ΔH≈−ηCov⁡(log⁡π,A)\Delta H\approx-\eta\operatorname{Cov}(\log\pi,A); a tight upper clip deletes exactly the terms that raise entropy, so the upper-positive clip fraction leads entropy collapse. Controllers on that bound (DAPO, MAI, MiMo-V2.6) are the standard fix.
  • Failures announce themselves in a characteristic order: mismatch → grad norm → reward; collapse → zero-variance → plateau; hacking → train/held-out gap with quiet system metrics; router drift → load CV within tens of steps.
  • Optimiser hygiene matters: constant LR near 10−610^{-6}, Adam ϵ≈10−15\epsilon\approx10^{-15} and β2=0.95\beta_2=0.95 when gradients are tiny, resets when the behaviour policy changes.
  • Prevention beats reaction: the labs keep their guards on from step 0, and after a collapse they fix the system or restart from distilled rollouts rather than simply rolling back.

대시보드 계산하기

NumPy 블록은 정답을 아는 가짜 배치를 만든다. sampler와 약간 교란된 trainer의 위치별 logit에 드문 큰 격차를 섞고, 각 추정량을 정확한 값과 대조한다. 샘플 NLL entropy 대 진짜 entropy, k1/k3 대 정확한 KL(μ∥πold)\mathrm{KL}(\mu\|\pi_{\text{old}}), 방향별 clip 비율(표류가 만든 “반대” 칸 포함), zero-variance 그룹, 그리고 공분산 규칙과 Adam의 ϵ\epsilon이다.

NumPy 정답이 있는 대시보드 지표, 공분산 규칙, Adam의 eps
import numpy as np

rng = np.random.default_rng(0)
P, G, T, V = 64, 8, 48, 40                  # 프롬프트, 그룹 크기, 응답당 토큰, vocab
N = P * G * T
logsm = lambda z: z - z.max(-1, keepdims=True) - np.log(np.exp(z - z.max(-1, keepdims=True)).sum(-1, keepdims=True))

# --- 가짜 rollout: sampler(μ)와 trainer(π_old)의 위치별 logit
z_mu = rng.normal(0, 2.0, (N, V))
noise = rng.normal(0, 0.02, (N, V))                       # 모든 logit에 작은 kernel 잡음
spike = (rng.random(N) < 0.003)[:, None] * rng.normal(0, 1.5, (N, V))   # 드문 큰 격차(예: routing 뒤바뀜)
z_old = z_mu + noise + spike
lmu, lold = logsm(z_mu), logsm(z_old)
y = (np.exp(lmu).cumsum(-1) > rng.random((N, 1))).argmax(-1).astype(np.intp)   # μ에서 샘플
ar = np.arange(N)
lp_mu, lp_old = lmu[ar, y], lold[ar, y]

# 1) entropy: 샘플 토큰 NLL은 sampler entropy의 비편향 추정량
H_true = -(np.exp(lmu) * lmu).sum(-1).mean()
H_hat = (-lp_mu).mean()
print(f"entropy  true {H_true:.4f}   estimate mean(-log μ(y)) {H_hat:.4f}")

# 2) mismatch: KL(μ‖π_old)의 k1, k3 추정 대 정확한 값
d = lp_old - lp_mu                                          # δ = log π_old − log μ
kl_exact = (np.exp(lmu) * (lmu - lold)).sum(-1).mean()
k1, k3 = (-d).mean(), (np.exp(d) - 1 - d).mean()
r = np.exp(d)
print(f"KL(μ‖π_old) exact {kl_exact:.2e}  k1 {k1:.2e}  k3 {k3:.2e}  max|δ| {np.abs(d).max():.2f}"
      f"  out of [0.5,2] {np.mean((r < 0.5) | (r > 2)):.2%}  token ESS {r.sum()**2 / (r**2).sum() / N:.4f}")

# 3) 보상, zero-variance 그룹, advantage, 한 번 업데이트 뒤 방향별 clip 비율
p_solve = rng.beta(0.6, 0.6, P)                            # 프롬프트별 pass rate(0·1 근처가 많음)
R = (rng.random((P, G)) < p_solve[:, None]).astype(float)
zv = np.mean(R.std(1) == 0)
A = np.repeat((R - R.mean(1, keepdims=True)).ravel(), T)    # std 없는 GRPO, 토큰에 broadcast
lp_new = lp_old + 0.15 * np.sign(A) * rng.exponential(1.0, N)   # 업데이트는 각 토큰을 sign(A) 방향으로 민다
lp_new += rng.normal(0, 0.1, N)                               # 여기에 A와 무관한 표류(낡은 가중치)
rho = np.exp(lp_new - lp_old)
el, eh = 0.2, 0.28
up = np.mean((A > 0) & (rho > 1 + eh)); lo = np.mean((A < 0) & (rho < 1 - el))
print(f"zero-variance groups {zv:.2%}   clip frac: A>0 & ρ>1+ε_h {up:.2%}   A<0 & ρ<1−ε_l {lo:.2%}"
      f"   ρ max {rho.max():.2f}  p99 {np.quantile(rho, 0.99):.2f}")
opp = np.mean((A > 0) & (rho < 1 - el)) + np.mean((A < 0) & (rho > 1 + eh))
print(f"opposite cells (A>0 & ρ<1−ε_l, A<0 & ρ>1+ε_h): {opp:.2%}  ← ratio가 업데이트 반대로 움직임: 학습이 아니라 표류")

# 4) entropy 동역학: softmax logit에 대한 natural-gradient step Δz = η·A에서
#    ΔH ≈ −η Cov_{a~π}(log π(a), A(a))
z = rng.normal(0, 1.5, V); Aa = rng.normal(0, 1, V); eta = 1e-3
H = lambda z: -(np.exp(logsm(z)) * logsm(z)).sum()
pi, lpi = np.exp(logsm(z)), logsm(z)
cov = (pi * (lpi - pi @ lpi) * (Aa - pi @ Aa)).sum()
print(f"ΔH actual {H(z + eta * Aa) - H(z):+.3e}   −η·Cov(log π, A) {-eta * cov:+.3e}")
Aa2 = Aa.copy(); Aa2[np.argmax(pi)] += 2.0                  # 이미 가장 그럴듯한 토큰의 advantage를 키움
cov2 = (pi * (lpi - pi @ lpi) * (Aa2 - pi @ Aa2)).sum()
print(f"boost the top token's advantage: Cov {cov:+.3f} → {cov2:+.3f}  (양의 Cov ⇒ entropy 감소)")

# 5) gradient가 아주 작을 때 Adam의 eps (MiniMax-M1: |g| 대부분 < 1e-14)
g = 1e-14 * rng.standard_normal(1000)
m, v = g, g**2                                              # 첫 step, bias 보정된 moment
for eps in [1e-8, 1e-15]:
    step = np.abs(m / (np.sqrt(v) + eps)).mean()
    print(f"eps={eps:.0e}: mean |Adam step| / lr = {step:.2e}")
 

읽을 것: 샘플 NLL entropy는 정확한 entropy와 소수 둘째·셋째 자리까지 맞는다. k1과 k3는 모두 정확한 KL 근처에 오고 k3가 조금 크다(k3는 토큰마다 음이 아니고 k1은 아니다). 드문 logit spike(위치의 0.3%)는 평균은 거의 움직이지 않으면서 max⁡∣δ∣\max\lvert\delta\rvert를 지배한다. 꼬리를 기록하는 이유다. 반대 clip 칸은 작지만 0이 아닌데, A^\hat A와 무관한 표류를 넣었기 때문이다. 공분산 예측은 실제 entropy 변화와 세 자리까지 맞고, 가장 그럴듯한 토큰의 advantage를 키우면 공분산이 양으로 뒤집힌다. ϵ=10−8\epsilon=10^{-8}이면 Adam step은 의도한 크기의 약 10−610^{-6}배다.

실제 trainer에서는 같은 지표를 함수 하나로 — 이미 가진 텐서로 optimizer step마다 한 번 부른다.

PyTorch PyTorch: RL trainer용 지표 logger 로컬에서 실행run locally (pip install torch)
import torch

@torch.no_grad()
def token_entropy(logits):
    """위치별 전체 vocab entropy (긴 시퀀스는 chunk로 나눠 호출)."""
    lp = torch.log_softmax(logits.float(), dim=-1)
    return -(lp.exp() * lp).sum(-1)

@torch.no_grad()
def rl_dashboard(logp_new, logp_old, logp_rollout, adv, mask, rewards, group_ids,
                 resp_len, max_len, ent_full=None, expert_counts=None,
                 eps_low=0.2, eps_high=0.28, band=(0.5, 2.0)):
    """logp_*/adv/mask/ent_full: 샘플 토큰의 (B, T); rewards/group_ids/resp_len: (B,).
    expert_counts: (layers, experts) 이 배치에서 각 expert로 간 토큰 수."""
    m = mask.bool()
    lp_new, lp_old, lp_mu, A = logp_new[m], logp_old[m], logp_rollout[m], adv[m]
    rho = torch.exp(lp_new - lp_old)
    d = lp_old - lp_mu                                   # δ = log π_old − log μ (샘플은 μ에서)
    r = torch.exp(d)
    out = {
        "entropy/sampled_nll": (-lp_mu).mean(),
        "clip/high_pos": ((A > 0) & (rho > 1 + eps_high)).float().mean(),
        "clip/low_neg": ((A < 0) & (rho < 1 - eps_low)).float().mean(),
        "clip/opposite": (((A > 0) & (rho < 1 - eps_low)) | ((A < 0) & (rho > 1 + eps_high))).float().mean(),
        "ratio/max": rho.max(),
        "ratio/mean": rho.mean(),
        "kl_old_new_k3": (rho - 1 - torch.log(rho)).mean(),
        "mismatch/k1": (-d).mean(),
        "mismatch/k3": (r - 1 - d).mean(),
        "mismatch/max_abs_delta": d.abs().max(),
        "mismatch/frac_out_band": ((r < band[0]) | (r > band[1])).float().mean(),
        "mismatch/token_ess": r.sum() ** 2 / (r ** 2).sum() / r.numel(),
        "length/mean": resp_len.float().mean(),
        "length/trunc_rate": (resp_len >= max_len).float().mean(),
        "reward/mean": rewards.float().mean(),
    }
    # zero-variance 그룹: 그룹별 보상 분산
    _, inv = torch.unique(group_ids, return_inverse=True)
    k = int(inv.max()) + 1
    rw = rewards.float()
    n = rw.new_zeros(k).index_add_(0, inv, torch.ones_like(rw))
    s1 = rw.new_zeros(k).index_add_(0, inv, rw)
    s2 = rw.new_zeros(k).index_add_(0, inv, rw * rw)
    var = s2 / n - (s1 / n) ** 2
    out["groups/zero_var_frac"] = (var <= 1e-12).float().mean()
    if ent_full is not None:
        out["entropy/full_vocab"] = ent_full[m].float().mean()
    if expert_counts is not None:
        load = expert_counts.float()
        mean = load.mean(-1, keepdim=True)
        out["moe/load_cv_max_layer"] = (load.std(-1) / mean.squeeze(-1)).max()
        out["moe/max_over_mean"] = (load / mean).max()
        out["moe/cold_frac"] = (load < 0.1 * mean).float().mean()
    return {k_: float(v) for k_, v in out.items()}

# grad norm: clip_grad_norm_이 돌려주는 값을 기록한다 — clip *전의* norm이다
# gn = torch.nn.utils.clip_grad_norm_(model.parameters(), max_norm=1.0)
 
확인 문제Check yourself

실행의 보상이 150 step째 평평하다. entropy는 떨어지고, 양의 advantage 토큰의 위쪽 clip 비율은 세 배가 됐고, 보상이 모두 같은 그룹의 비율이 오른다. mismatch k3는 평평하다. 가장 직접적인 개입은?

entropy 붕괴의 징후다. 위 경계가 드문 좋은 토큰을 올리는 업데이트(ΔH≈−ηCov⁡(log⁡π,A)\Delta H\approx-\eta\operatorname{Cov}(\log\pi,A)의 음의 공분산 항)를 지우고 있어서 entropy가 떨어지고, 그룹이 모두 맞히거나 모두 틀리게 되고, 보상이 정체한다. εhigh\varepsilon_{\text{high}}를 넓히거나(DAPO) 경계를 entropy 제어기로 움직이는 것(MAI, MiMo-V2.6)이 메커니즘을 겨냥한다. routing replay는 mismatch용인데 여기서는 평평하다. 참조 모델 KL을 키우면 탐색을 되살리지 못한 채 학습만 늦어진다. 학습률을 낮추면 모든 것이 느려진다.

확인 문제Check yourself

RL 실행의 gradient 크기가 대부분 1e-14 근처이고 AdamW를 eps = 1e-8로 쓴다. Adam의 업데이트는 어떻게 되나?

첫 step의 업데이트는 η g/(∣g∣+ϵ)\eta\,g/(\lvert g\rvert+\epsilon)다. ∣g∣≈10−14≪ϵ=10−8\lvert g\rvert\approx10^{-14}\ll\epsilon=10^{-8}이면 η g/ϵ≈10−6 ηsign⁡(g)\eta\,g/\epsilon\approx10^{-6}\,\eta\operatorname{sign}(g), 즉 ϵ\epsilon이 Adam의 정규화를 꺼 버린다. MiniMax-M1이 정확히 이것을 겪고 ϵ=10−15\epsilon=10^{-15}(와 β2=0.95\beta_2=0.95)로 바꿨고, MAI-Thinking-1도 같은 ϵ\epsilon을 쓴다.

정리

  • 세 층으로 기록한다. 정책(entropy, 참조 모델 KL), 업데이트(방향별 clip 비율, ratio 최대, grad norm), 데이터(잘림, held-out 보상, zero-variance 그룹), 그리고 시스템(mismatch k3와 그 꼬리, MoE load). 평균은 고장을 감추고 꼬리와 분할이 드러낸다.
  • entropy 변화는 ΔH≈−ηCov⁡(log⁡π,A)\Delta H\approx-\eta\operatorname{Cov}(\log\pi,A)를 따른다. 좁은 위 clip은 entropy를 올리는 항만 지우므로, 위쪽-양수 clip 비율이 entropy 붕괴에 앞선다. 그 경계에 거는 제어기(DAPO, MAI, MiMo-V2.6)가 표준 처방이다.
  • 고장은 특징적인 순서로 자신을 알린다. mismatch → grad norm → 보상; 붕괴 → zero-variance → 정체; hacking → 학습/held-out 격차와 조용한 시스템 지표; router 표류 → 수십 step 안의 load CV.
  • optimizer 위생이 중요하다. 10−610^{-6} 근처의 고정 학습률, gradient가 아주 작으면 Adam ϵ≈10−15\epsilon\approx10^{-15}와 β2=0.95\beta_2=0.95, behaviour 정책이 바뀌면 초기화.
  • 예방이 반응보다 낫다. lab들은 방어 장치를 step 0부터 켜 두고, 붕괴 뒤에는 단순히 되돌리기보다 시스템을 고치거나 증류한 rollout에서 다시 시작한다.

더 읽을거리Further reading