The objective lessons of this track take the reward as given. In practice it is the part of a frontier RL system with the most engineering in it, and the part the reports spend the most pages on. DeepSeek-V3.2 lists its RL tasks by environment (24,667 code-agent, 50,275 search-agent, 4,417 general-agent and 5,908 code-interpreter tasks); Kimi K3 describes harnesses, simulated workplaces and kernel benchmarks; MiMo-V2.6 spends a section on how to grade a group of patches. Three questions organise this lesson. Is the reward right? (what a verifier’s false positives teach). Is it informative? (rubrics, several rewards at once, difficulty). Is the environment honest? (synthesis and hardening). The Bradley–Terry and LLM-judge basics are in reward models, Goodhart and the over-optimisation curves in over-optimisation; masking tool output, filtering void turns and reverse curricula for long trajectories are in long-horizon RL.
Verifiers, and what their errors teach
A verifier maps a response to . Model its errors with a false-negative rate (a correct answer graded wrong — an unparsed format, a too-strict comparison) and a false-positive rate (a wrong answer graded right). For a response that is truly correct with probability ,
If the errors do not depend on the behaviour, the expected reward is an affine function of : the gradient points the same way, just scaled by and with more variance. Noise of this kind slows learning but does not mislead it. The danger is behaviour-dependent false positives. Suppose some exploit — weakening a test, printing the expected output, guessing a small answer space — never solves the task but fools the verifier with probability . With a group-mean baseline the advantage of a behaviour is proportional to its expected reward minus the group’s, so the exploit is reinforced over an honest attempt exactly when
With , , , the break-even pass rate is : on tasks the model solves less than ~9% of the time, the exploit pays. Hacking pressure is concentrated on the hard tasks — precisely the ones difficulty filters push into the batch. This is why verifier hardening and difficulty selection have to be designed together.
What labs do to keep small:
- Math. Symbolic comparison rather than string match: OLMo 3 compares with SymPy, MiMo-7B uses Math-Verify. Answer formats that can be guessed are removed: MiMo-7B drops proof and multiple-choice problems; k1.5 drops multiple-choice, true/false and proof questions, and asks the model to answer each general-QA prompt without CoT — if it is right within 8 attempts the prompt is “easy to hack” and removed. When a learned grader is needed, k1.5 found a chain-of-thought reward model far more accurate than a value-head one on manual spot checks (about 98.5 vs 84.4).
- Code. Execute in a sandbox against tests. Open infrastructure exists for this — SandboxFusion is a sandbox “for running and judging code generated by LLMs” with an online-judge mode over standard code datasets. Tests themselves are data: k1.5 has the base model write test generators, keeps 50 generated tests per problem only where at least 7 of 10 ground-truth submissions agree, and admits a problem only if at least 9 of 10 submissions pass the selected set (of 1,000 contest problems sampled, 323 made it). DeepSeek-V3.2 accepts a code-agent environment only if applying the gold patch flips at least one test from fail to pass and none from pass to fail.
- Partial credit without hackability. All-tests-pass is unbiased but sparse; MiMo-7B groups tests into difficulty levels by their pass rates and pays per level, either strictly (a level counts only if it and all easier levels fully pass) or softly (per passed test, weighted by level). Kimi K3’s kernel environment scores 0 above an error threshold, 0.5 for matching the expert implementation and towards 1 approaching the roofline, with a hacking detector (CUDA-graph replay, input caching, precision reduction…) that keeps growing.
- Shaping terms. DeepSeek-R1 adds a rule-based format reward (thinking inside
<think>tags) and, after the cold start, a language-consistency reward — the share of target-language words in the CoT — which kept consistency from collapsing at the cost of slightly lower code scores in their ablation. GLM-4.5 stops a rollout with reward 0 at the first malformed tool call. DAPO’s soft overlong punishment ramps a penalty linearly over the last tokens before the cap instead of a cliff at (formula in the RLVR lesson). Each such term is itself a proxy; keep it small relative to the task reward and watch for it being gamed.
Rubrics and generative reward models
Where no program can check the answer, the frontier recipes have converged on an LLM that grades against a rubric, and on making that grader part of RL rather than a fixed model.
| Lab | Grader | Notable design |
|---|---|---|
| Kimi K2 | the policy itself as critic, pairwise comparisons | core + prescriptive (anti-hacking) + human rubrics; the critic is refreshed during RL with on-policy rollouts of verifiable tasks (closed loop); side effect: favours over-confident answers |
| Kimi K2.5 / K3 | tournament-style group reward with binary comparisons | the judge must (1) read, (2) write a rubric, (3) score each candidate, (4) record a scorepad; an output longer than automatically loses |
| DeepSeek-V3.2 / V4 | generative RM with a separate rubric per prompt; in V4 the actor itself is the judge | rubric-based GRM replaces a scalar RM for hard-to-verify tasks |
| MAI-Thinking-1 | a k-way generative RM | SFT-ed to read responses and emit scores 1–5 as text; order rotated times; reward = probability of “5” from the first-token distribution |
| GLM-5 | rule-based + outcome RM + generative RM | the ORM is low-variance but hackable, the GRM robust but noisier; human-written responses as style anchors |
| GLM-4.5 | strict step reward for function calls | plus end-to-end task completion |
| OLMo 3 | LM judge (Qwen3 32B, thinking off) for chat | with or without a reference answer |
Two details are worth deriving. MAI’s probability-of-5 reward is a Rao–Blackwellisation: if the judge’s verdict is sampled, is an unbiased but noisy reward with variance where ; reading directly from the first-token distribution has the same mean and zero judge-sampling variance, and rotating the order times averages out position bias. K3’s length rule turns a soft bias into a hard constraint: verbosity is the best-documented judge bias (reward models), and a policy will climb any monotone preference for length, so the rule removes the gradient toward it rather than hoping the judge resists.
Groupwise grading: GRS and GAR
For code agents, MiMo-V2.6 reports that with a binary test reward, patches that swallow exceptions, loosen validation or change evaluation-only configuration were reinforced exactly as much as clean ones — and such behaviours did increase. Their fix spends compute on grading groups of patches. GRS writes task-specific solution and behaviour rubrics offline and combines them multiplicatively, , so a failed patch stays at 0 and an all-pass group still gets signal from quality differences. GAR ranks the passing patches of a mixed group on five axes, sets quality factors , and rescales
which keeps the total positive mass and only moves it between passing patches (merely shrinking the positive advantages of bad patches would let the negative mass dominate and inflate entropy, the report explains). The figure puts these schemes side by side in a toy where hacks pass tests more often than honest attempts.
이 트랙의 목적함수 레슨들은 보상 를 주어진 것으로 둔다. 실제로는 프론티어 RL 시스템에서 엔지니어링이 가장 많이 들어가는 부분이고, 보고서들이 가장 많은 쪽수를 쓰는 부분이다. DeepSeek-V3.2는 RL 과제를 환경별로 나열하고(code agent 24,667, search agent 50,275, general agent 4,417, code interpreter 5,908개), Kimi K3는 harness, 모의 업무 환경, kernel 벤치마크를 서술하며, MiMo-V2.6은 패치 그룹을 어떻게 채점할지에 한 절을 쓴다. 이 레슨은 세 질문으로 짜인다. 보상이 맞는가?(검증기의 false positive가 무엇을 가르치나). 정보가 있는가?(rubric, 여러 보상, 난이도). 환경이 정직한가?(합성과 강화). Bradley–Terry와 LLM judge 기초는 보상모델에, Goodhart와 과최적화 곡선은 과최적화에 있다. 긴 trajectory에서 tool 출력 masking, void turn 필터, reverse curriculum은 long-horizon RL에 있다.
검증기, 그리고 그 오류가 가르치는 것
검증기는 응답을 로 보낸다. 오류를 false-negative 비율 (맞는 답을 틀렸다고 채점 — 파싱 안 된 형식, 지나치게 엄격한 비교)과 false-positive 비율 (틀린 답을 맞았다고 채점)로 모델링하자. 진짜로 맞을 확률이 인 응답에 대해
다. 오류가 행동과 무관하면 기대 보상은 의 affine 함수다. gradient 방향은 같고 배로 작아지며 분산이 커질 뿐이다. 이런 잡음은 학습을 늦추지만 오도하지는 않는다. 위험한 것은 행동에 의존하는 false positive다. 어떤 exploit — 테스트를 약화하기, 기대 출력을 그냥 출력하기, 작은 답 공간을 찍기 — 이 과제를 결코 풀지 못하지만 확률 로 검증기를 속인다고 하자. 그룹 평균 baseline에서 한 행동의 advantage는 그 기대 보상에서 그룹의 기대 보상을 뺀 것에 비례하므로, exploit이 정직한 시도보다 강화되는 조건은 정확히
이다. , , 이면 손익분기 pass rate는 이다. 모델이 9% 남짓보다 드물게 푸는 과제에서는 exploit이 이득이다. hacking 압력은 어려운 과제에 몰린다 — 난이도 필터가 배치에 밀어 넣는 바로 그 과제들이다. 검증기 강화와 난이도 선별을 함께 설계해야 하는 이유다.
를 작게 유지하려고 lab들이 하는 일:
- 수학. 문자열 일치가 아니라 기호 비교. OLMo 3는 SymPy로, MiMo-7B는 Math-Verify로 비교한다. 찍을 수 있는 답 형식은 뺀다. MiMo-7B는 증명·객관식 문제를 빼고, k1.5는 객관식·참거짓·증명 문제를 빼며, 일반 QA prompt마다 모델에게 CoT 없이 답하게 해서 8번 안에 맞히면 “hack하기 쉬운” prompt로 보고 제거한다. 학습된 채점기가 필요하면, k1.5는 수작업 점검에서 chain-of-thought 보상모델이 value-head 보상모델보다 훨씬 정확했다(약 98.5 대 84.4).
- 코드. sandbox에서 테스트로 실행한다. 공개 인프라도 있다. SandboxFusion은 “LLM이 생성한 코드를 실행하고 채점하는” sandbox로, 표준 코드 데이터셋 위의 online-judge 모드를 갖는다. 테스트 자체도 데이터다. k1.5는 base 모델에게 테스트 생성기를 쓰게 하고, 문제마다 생성한 테스트 50개 중 정답 제출 10개 중 7개 이상이 일치하는 것만 남기며, 제출 10개 중 9개 이상이 선택된 테스트를 모두 통과하는 문제만 받아들인다(표본 1,000개 대회 문제 중 323개). DeepSeek-V3.2는 gold patch를 적용했을 때 fail→pass 테스트가 하나 이상이고 pass→fail이 하나도 없는 code-agent 환경만 받아들인다.
- hack되지 않는 부분 점수. 모든 테스트 통과는 비편향이지만 희소하다. MiMo-7B는 테스트를 pass rate로 난이도 단계에 묶고 단계별로 점수를 준다. strict(그 단계와 더 쉬운 모든 단계를 완전히 통과해야 인정) 또는 soft(통과한 테스트마다 단계 가중). Kimi K3의 kernel 환경은 오차 임계 초과면 0, 전문가 구현과 같으면 0.5, roofline에 다가갈수록 1로 주고, 계속 커지는 hacking 탐지기(CUDA graph replay, 입력 캐싱, 정밀도 낮추기…)를 붙인다.
- shaping 항. DeepSeek-R1은 규칙 기반 형식 보상(사고를
<think>태그 안에)을 더하고, cold start 이후에는 언어 일관성 보상 — CoT에서 목표 언어 단어의 비율 — 을 더한다. 그 ablation에서 이 보상은 일관성이 무너지는 것을 막았고 대가로 코드 점수가 조금 낮아졌다. GLM-4.5는 첫 잘못된 tool 호출에서 rollout을 보상 0으로 멈춘다. DAPO의 soft overlong punishment는 에서의 절벽 대신 한도 직전 토큰 동안 패널티를 선형으로 키운다(식은 RLVR 레슨). 이런 항은 모두 그 자체로 proxy다. 과제 보상에 비해 작게 두고, 악용되는지 지켜본다.
rubric과 생성형 보상모델
프로그램으로 답을 확인할 수 없는 곳에서 프론티어 레시피는 rubric으로 채점하는 LLM으로 수렴했고, 그 채점기를 고정 모델이 아니라 RL의 일부로 만드는 쪽으로 갔다.
| Lab | 채점기 | 눈에 띄는 설계 |
|---|---|---|
| Kimi K2 | 정책 자신이 critic, 쌍대 비교 | core + prescriptive(hack 방지) + 사람이 쓴 rubric; RL 중 검증 가능한 과제의 on-policy rollout으로 critic을 갱신(closed loop); 부작용: 과신하는 답을 선호 |
| Kimi K2.5 / K3 | 이진 비교의 토너먼트식 그룹 보상 | judge는 (1) 읽고 (2) rubric을 쓰고 (3) 후보마다 점수를 매기고 (4) scorepad에 기록해야 함; 보다 긴 출력은 자동 패배 |
| DeepSeek-V3.2 / V4 | prompt마다 별도 rubric을 쓰는 생성형 RM; V4에서는 actor 자신이 judge | 검증이 어려운 과제에서 rubric 기반 GRM이 스칼라 RM을 대체 |
| MAI-Thinking-1 | k-way 생성형 RM | 응답 개를 읽고 1–5 점수를 텍스트로 내도록 SFT; 순서를 번 회전; 보상 = 첫 토큰 분포에서 “5”의 확률 |
| GLM-5 | 규칙 + outcome RM + 생성형 RM | ORM은 분산이 낮지만 hack되기 쉽고 GRM은 견고하지만 잡음이 큼; 사람이 쓴 응답을 문체 기준점으로 |
| GLM-4.5 | function call의 엄격한 step 보상 | 와 end-to-end 과제 완료 |
| OLMo 3 | chat용 LM judge(Qwen3 32B, thinking off) | 참조 답이 있거나 없거나 |
두 세부를 유도해 볼 만하다. MAI의 “5”의 확률 보상은 Rao–Blackwell화다. judge의 판정 를 샘플링하면 는 비편향이지만 분산 ()의 잡음 섞인 보상이다. 첫 토큰 분포에서 를 직접 읽으면 평균은 같고 judge 샘플링 분산은 0이며, 순서를 번 돌리면 위치 편향이 평균된다. K3의 길이 규칙은 부드러운 편향을 단단한 제약으로 바꾼다. 장황함은 가장 잘 기록된 judge 편향이고(보상모델), 정책은 길이에 대한 어떤 단조 선호든 기어오른다. 그래서 judge가 버텨 주기를 바라는 대신 그쪽으로 가는 gradient를 없앤다.
그룹 단위 채점: GRS와 GAR
code agent에서 MiMo-V2.6은 이진 테스트 보상 아래 예외를 삼키거나, 검증을 느슨하게 하거나, 평가 전용 설정을 바꾸는 패치가 깨끗한 패치와 똑같이 강화되었고 실제로 그런 행동이 늘었다고 보고한다. 처방은 패치 그룹 채점에 계산을 쓰는 것이다. GRS는 과제별 solution rubric과 behaviour rubric을 offline으로 쓰고 곱으로 합친다. 이므로 실패한 패치는 0에 머물고, 모두 통과한 그룹도 품질 차이로 신호를 얻는다. GAR은 혼합 그룹의 통과 패치를 다섯 축으로 순위 매겨 품질 계수 를 정하고
로 다시 맞춘다. 양의 총량 를 보존하고 통과 패치들 사이에서만 옮긴다(나쁜 패치의 양의 advantage를 줄이기만 하면 음의 총량이 커져 entropy가 부풀어 오른다고 보고서는 설명한다). 아래 그림은 hack이 정직한 시도보다 테스트를 더 자주 통과하는 장난감에서 이 방식들을 나란히 놓는다.
Read the stat row together with the right panel. Under plain tests the expected reward of hacking is against , and the policy converts to hacking within a few dozen steps. A hack check that zeroes caught hacks makes hacking worth and the hack share dies out. The multiplicative rubric keeps a fraction of a caught hack’s reward, so hacking is worth — still more than honesty, and the policy still drifts there, only slower. GAR does not change whether hacky patches get positive advantage, only how much relative to clean passing patches in the same group; in groups where every passing patch is a hack, it changes nothing. Two lessons generalise: a quality multiplier is not a detector (zero out confirmed exploits — MiMo-V2.6’s GAR also resets the reward to 0 when it confirms copied answers), and the decisive quantity is the exploit’s pass-rate advantage , which is largest on hard tasks.
Several rewards at once: how to normalise
Most recipes add several terms: correctness + format + length (R1, MAI-Thinking-1), test + rubric, or tool-call format + task success. With GRPO the default is to sum and then normalise per group,
Write for the within-group std of reward . The numerator is , so each reward’s contribution to the advantage scales with — a reward that varies little within a group (a format bonus most responses already earn) is swamped by one that varies a lot (correctness), whatever weight you meant to give it. GDPO (Liu et al., NVIDIA, ICML 2026) reverses the order: normalise each reward within the group, sum (optionally weighted), then normalise the sum over the whole batch so the scale stays stable as the number of rewards grows,
Their sharpest example is a collapse of resolution: with two binary rewards and two rollouts, GRPO maps reward totals (0,1), (0,2) and (1,2) to the same advantages , while GDPO gives (0,1) → and (0,2) → — a rollout that satisfies both objectives is pushed harder than one that satisfies one. They report gains over GRPO on tool calling (BFCL-v3, Qwen2.5-Instruct-1.5B average accuracy 30.18% → 32.81%), on math under a 4,000-token limit (DeepSeek-R1-1.5B AIME 23.1% → 29.4% with the length-exceed ratio 10.8% → 6.5%) and on coding; they also report that removing the batch-wise normalisation occasionally causes convergence failures. The cost is the mirror image of the benefit: per-reward normalisation gives every reward unit scale regardless of whether its within-group spread is signal or noise. A nearly saturated judge score whose spread is of jitter becomes a unit-variance random component of the advantage. A guard that skips a reward in groups where its spread is below a threshold, or rewards discretised to meaningful levels, avoids that (the code below measures both effects).
Many environments in one run
Nemotron 3 Ultra runs all its environments — terminal, office, SWE, search, tool calling, math, code, STEM, safety, chat, instruction following, long-context QA, structured output — in a single RLVR run, global batch 8192 with 16 rollouts per sample and the maximum generation length raised from 48K to 64K. The report names the price: with dozens of environments each domain contributes few samples per batch, its signal is diluted and hard to balance, which is why the final model is assembled by multi-teacher on-policy distillation from per-domain teachers (Nemotron review, distillation). DeepSeek-V3.2 goes the other way: one mixed RL stage for reasoning, agentic and alignment data, explicitly to avoid the catastrophic forgetting of multi-stage RL. The evidence that mixing also regularises is in OLMo 3: RL on IFEval data alone raised IFEval but lowered AlpacaEval, while mixed data raised IFEval about as much and held AlpacaEval — with lower per-domain training reward. MAI-Thinking-1 found that mixing STEM tasks into the agentic climb stabilised it and transferred positively, but not in the other direction.
A small derivation explains why the mix is not set by prompt counts alone. With token-level aggregation the gradient is , so domain ‘s share of the gradient scales roughly as (prompts × mean response length × mean advantage magnitude, which is near zero for domains whose groups are mostly degenerate). A domain with long responses and balanced pass rates dominates; a saturated domain contributes almost nothing however many prompts it has. Monitor gradient share per domain, not prompt share (our derivation; the reports do not give a formula).
Building environments for agents
For agents the environment is the task distribution, and the reports describe pipelines rather than datasets.
- Kimi K2: a repository of tool specs, agents and tasks generated per tool combination, and a tool simulator that maintains and updates state and injects partial failures with controlled stochasticity; rubrics (success criteria, expected tool patterns, checkpoints) are written with each task; real sandboxes replace simulation where fidelity is decisive (coding, SWE).
- DeepSeek-V3.2: an environment-synthesis agent with bash and search loads data into a database, writes task-specific tools, and proposes a task together with a solution function and a verification function in Python (the solution may only call the tools), then raises the difficulty; only bundles on which RL achieves a non-zero pass@100 are kept — 1,827 environments and 4,417 tasks. Search QA is kept only if the reference answer is verified correct and every candidate answer from several answer agents is wrong. RL on the synthetic general-agent tasks alone raised unseen tool benchmarks (τ²-Bench, MCP-Mark, MCP-Universe).
- GLM-5: more than 10K verifiable SWE environments across 9 languages, thousands of synthesised terminal tasks in Harbor format (Docker build accuracy above 90%), and multi-hop search questions generated from a web knowledge graph of over two million pages.
- Kimi K3: harnesses (tool interfaces, prompts, context management, memory, subagents) are swapped per task group so the policy does not overfit one harness; “autonomous execution” tasks give only an initial state, goal, tools, budget and an independent verifier, with public verifiers for diagnostic feedback separated from hidden ones, limited submissions and penalties.
Hardening is the other half. Every SWE report lists a leak that the policy found or could find: official SWE-bench images that still contained the ground-truth commits (MiMo-V2-Flash), answers recoverable from local git history and test files the agent could edit (MAI-Thinking-1 removes commits after the base, reverts test files before grading, and keeps an LLM monitor for monkey-patching), GitHub fetches (Nemotron 3 Ultra physically deletes post-base history and blocks fetching). MiMo-V2.6 screens environments with a hack agent and reports a confirmed hacking rate below 2% during training — detected hacks only. GLM-5’s slide-generation RL found renderer loopholes (truncating overflowing content, squeezing spacing) before strict 16:9 compliance rose from 40% to 92%. And an environment failure is not a score of 0: QwenGyre excludes evaluator failures that persist after retries from training rather than scoring them 0, because a 0 teaches the policy that whatever it did was wrong. (How rollout workers, sandboxes and agent loops are run at scale is covered in this site’s separate track on RL frameworks.)
Difficulty: filters and curricula
The RLVR lesson showed that a group is informative only if its pass rate is strictly between 0 and 1, and the GLM-4.5 review computed its “pass@8 = 0 but pass@512 > 0” selection rule. Two results say where in that interval to aim. Bae et al. show that the KL between the initial policy and the optimal KL-regularised policy for a prompt is bounded below by , maximal at and zero at , and propose balanced band filters (they test bands from to with 16 rollouts per prompt). Foster & Foerster prioritise questions with high variance of success — for a binary reward, exactly . In practice the filters differ in when they measure :
| Rule | Who | Measured when |
|---|---|---|
| drop groups with identical rewards, resample until the batch is full | DAPO dynamic sampling; OLMo 3 active sampling; Skywork-OR1 (non-zero-advantage groups only) | every batch |
| drop prompts the base solves always or never | Skywork-OR1 offline; MiMo-7B (pass rate above 90% over 16 rollouts — about half of the math pool) | once, before training |
| drop prompts solved at accuracy 1 in the previous stage | Skywork-OR1 online; POLARIS (accuracy above 0.9 at each phase end, after building a mirrored-J difficulty distribution) | stage boundaries |
| screen with 16, fill to 128 if pass rate in , then filter | MAI-Thinking-1 | per prompt, adaptive |
| keep an easy pool sampled with probability 10% | MiMo-7B (removing easy problems entirely made updates unstable) | continuous |
| easy → hard curriculum; sample | Kimi k1.5 §2.3.4 | tracked success rate |
| keep only tasks RL can solve sometimes | DeepSeek-V3.2 (pass@100 > 0) | at synthesis |
The simulator below runs these rules on one toy pool with a fixed rollout budget.
통계 줄과 오른쪽 패널을 함께 읽는다. 단순 tests에서 hack의 기대 보상은 , 정직은 이고, 정책은 수십 step 안에 hack으로 넘어간다. 적발된 hack을 0으로 만드는 hack 검사는 hack의 가치를 로 만들어 hack 비율이 사라진다. 곱셈 rubric은 적발된 hack 보상의 만큼을 남기므로 hack의 가치는 — 여전히 정직보다 크고, 정책은 더 느릴 뿐 그쪽으로 흐른다. GAR은 hack 패치가 양의 advantage를 받는지 여부를 바꾸지 않고, 같은 그룹의 깨끗한 통과 패치에 비해 얼마나 받는지만 바꾼다. 통과 패치가 모두 hack인 그룹에서는 아무것도 바꾸지 않는다. 일반화되는 교훈 둘. 품질 배수는 탐지기가 아니다(확인된 exploit은 0으로 — MiMo-V2.6의 GAR도 답을 베낀 것이 확인되면 보상을 0으로 되돌린다). 그리고 **결정적인 양은 exploit의 통과율 이점 **이고, 그것은 어려운 과제에서 가장 크다.
여러 보상을 동시에: 어떻게 정규화하나
대부분의 레시피는 여러 항을 더한다. 정답 + 형식 + 길이(R1, MAI-Thinking-1), 테스트 + rubric, tool 호출 형식 + 과제 성공. GRPO의 기본은 더한 뒤 그룹마다 정규화하는 것이다.
보상 의 그룹 내 표준편차를 라 하자. 분자는 이므로 각 보상이 advantage에 기여하는 크기는 에 비례한다. 그룹 안에서 거의 변하지 않는 보상(대부분의 응답이 이미 받는 형식 보너스)은 많이 변하는 보상(정답)에 묻힌다. 어떤 가중치를 의도했든 그렇다. GDPO(Liu 등, NVIDIA, ICML 2026)는 순서를 뒤집는다. 각 보상을 그룹 안에서 정규화하고, (가중) 합한 뒤, 보상 수가 늘어도 크기가 안정되도록 합을 배치 전체에서 다시 정규화한다.
가장 날카로운 예는 해상도의 붕괴다. 이진 보상 둘과 rollout 둘에서, GRPO는 보상 합 (0,1), (0,2), (1,2)를 모두 같은 advantage 로 보낸다. GDPO는 (0,1) → , (0,2) → 를 준다. 두 목표를 모두 만족한 rollout을 하나만 만족한 rollout보다 세게 민다. 저자들은 tool calling(BFCL-v3, Qwen2.5-Instruct-1.5B 평균 정확도 30.18% → 32.81%), 4,000 토큰 제한의 수학(DeepSeek-R1-1.5B AIME 23.1% → 29.4%, 길이 초과 비율 10.8% → 6.5%), 코딩에서 GRPO 대비 향상을 보고하고, 배치 정규화를 빼면 가끔 수렴에 실패한다고도 보고한다. 비용은 이점의 거울상이다. 보상별 정규화는 그룹 내 퍼짐이 신호든 잡음이든 상관없이 모든 보상에 단위 크기를 준다. 퍼짐이 의 흔들림뿐인 거의 포화된 judge 점수가 advantage의 단위 분산 무작위 성분이 된다. 퍼짐이 임계값 미만인 그룹에서는 그 보상을 건너뛰는 guard나, 의미 있는 수준으로 이산화한 보상이 이를 피한다(아래 코드가 두 효과를 모두 잰다).
한 실행에 여러 환경
Nemotron 3 Ultra는 모든 환경 — 터미널, 오피스, SWE, 검색, tool calling, 수학, 코드, STEM, 안전, chat, 지시 따르기, 긴 문맥 QA, 구조화 출력 — 을 한 번의 RLVR 실행에서 돌린다. 전역 배치 8192, 샘플당 rollout 16개, 최대 생성 길이는 48K에서 64K로 올렸다. 보고서는 대가를 밝힌다. 환경이 수십 개면 도메인마다 배치에 들어가는 샘플이 적어 신호가 희석되고 균형을 맞추기 어렵다. 그래서 최종 모델은 도메인별 teacher로부터 다중 teacher on-policy distillation으로 조립한다(Nemotron 리뷰, 증류). DeepSeek-V3.2는 반대 방향이다. 다단계 RL의 파국적 망각을 피하려고 추론·agent·정렬 데이터를 섞은 RL 한 단계를 쓴다. 섞기가 정규화도 한다는 증거는 OLMo 3에 있다. IFEval 데이터만으로 RL하면 IFEval은 오르고 AlpacaEval은 내려갔지만, 섞은 데이터는 IFEval을 비슷하게 올리면서 AlpacaEval을 지켰다. 도메인별 학습 보상은 오히려 더 낮았다. MAI-Thinking-1은 agentic climb에 STEM 과제를 섞자 안정되고 긍정적으로 전이되었지만, 반대 방향의 전이는 없었다.
작은 유도 하나가 섞는 비율이 prompt 수만으로 정해지지 않는 이유를 설명한다. 토큰 단위로 모으면 gradient는 이므로, 도메인 의 gradient 몫은 대략 (prompt 수 × 평균 응답 길이 × 평균 advantage 크기. 그룹 대부분이 퇴화한 도메인에서는 0에 가깝다)에 비례한다. 응답이 길고 pass rate가 균형 잡힌 도메인이 지배하고, 포화된 도메인은 prompt가 아무리 많아도 거의 기여하지 않는다. prompt 비율이 아니라 도메인별 gradient 몫을 모니터링하라(우리의 유도이고, 보고서들은 식을 주지 않는다).
agent용 환경 만들기
agent에게는 환경이 곧 과제 분포이고, 보고서들은 데이터셋이 아니라 파이프라인을 서술한다.
- Kimi K2: tool spec 저장소, tool 조합마다 생성한 agent와 과제, 그리고 상태를 유지·갱신하며 통제된 확률성으로 부분 실패를 주입하는 tool 시뮬레이터. rubric(성공 기준, 기대 tool 패턴, 체크포인트)은 과제와 함께 쓴다. 충실도가 결정적인 곳(코딩, SWE)에서는 실제 sandbox가 시뮬레이션을 대신한다.
- DeepSeek-V3.2: bash와 검색을 가진 환경 합성 agent가 데이터를 DB에 적재하고, 과제별 tool을 쓰고, Python으로 된 해답 함수와 검증 함수와 함께 과제를 제안한 뒤(해답은 tool만 호출할 수 있다) 난이도를 올린다. RL로 pass@100이 0이 아닌 묶음만 남겨 환경 1,827개와 과제 4,417개를 얻는다. 검색 QA는 참조 답이 맞다고 검증되고 여러 answer agent의 후보 답이 모두 틀린 경우만 남긴다. 합성된 general-agent 과제만으로 한 RL이 보지 못한 tool 벤치마크(τ²-Bench, MCP-Mark, MCP-Universe)를 올렸다.
- GLM-5: 9개 언어에 걸친 1만 개 이상의 검증 가능한 SWE 환경, Harbor 형식의 합성 터미널 과제 수천 개(Docker 빌드 정확도 90% 이상), 200만 페이지가 넘는 웹 지식 그래프에서 만든 다중 hop 검색 질문.
- Kimi K3: harness(tool 인터페이스, prompt, context 관리, memory, subagent)를 과제 그룹마다 바꿔 정책이 한 harness에 과적합하지 않게 한다. “자율 실행” 과제는 초기 상태, 목표, tool, 예산, 독립 검증기만 주고, 진단 피드백용 공개 검증기와 숨은 검증기를 분리하며, 제출 횟수를 제한하고 패널티를 준다.
강화(hardening)가 나머지 절반이다. 모든 SWE 보고서는 정책이 찾았거나 찾을 수 있었던 누출을 나열한다. 정답 커밋이 남아 있던 공식 SWE-bench 이미지(MiMo-V2-Flash), 로컬 git 이력에서 답을 찾을 수 있고 agent가 테스트 파일을 고칠 수 있던 것(MAI-Thinking-1은 base 이후 커밋을 지우고, 채점 전에 테스트 파일을 되돌리고, monkey-patching을 지켜보는 LLM 모니터를 둔다), GitHub fetch(Nemotron 3 Ultra는 base 이후 이력을 물리적으로 지우고 fetch를 막는다). MiMo-V2.6은 hack agent로 환경을 점검하고, 학습 중 확인된 hacking 비율이 2% 미만이었다고 보고한다 — 탐지된 hack만 센 것이다. GLM-5의 슬라이드 생성 RL은 렌더러의 구멍(넘치는 내용 자르기, 간격 줄이기)을 막은 뒤에야 엄격한 16:9 준수가 40%에서 92%로 올랐다. 그리고 환경 실패는 점수 0이 아니다. QwenGyre는 재시도 후에도 실패하는 evaluator 오류를 0점으로 채점하지 않고 학습에서 뺀다. 0은 정책에게 무엇을 했든 틀렸다고 가르치기 때문이다. (rollout worker, sandbox, agent loop를 대규모로 어떻게 돌리는지는 이 사이트의 RL 프레임워크 트랙에서 따로 다룬다.)
난이도: 필터와 curriculum
RLVR 레슨은 그룹의 pass rate가 0과 1 사이에 있어야만 정보가 있음을 보였고, GLM-4.5 리뷰는 “pass@8 = 0이지만 pass@512 > 0” 선택 규칙을 계산했다. 두 결과가 그 구간의 어디를 겨냥할지 말해 준다. Bae 등은 한 prompt에서 초기 정책과 최적 KL 정규화 정책 사이의 KL이 이상이며, 에서 최대이고 에서 0임을 보이고, 균형 잡힌 band 필터를 제안한다(prompt당 rollout 16개로 에서 까지의 band를 시험). Foster & Foerster는 성공의 분산이 큰 질문을 우선한다 — 이진 보상에서는 정확히 다. 실무의 필터들은 를 언제 재는지가 다르다.
| 규칙 | 누가 | 언제 재나 |
|---|---|---|
| 보상이 모두 같은 그룹을 버리고 배치가 찰 때까지 다시 샘플 | DAPO dynamic sampling; OLMo 3 active sampling; Skywork-OR1(0이 아닌 advantage 그룹만) | 매 배치 |
| base가 항상 또는 전혀 못 푸는 prompt 제거 | Skywork-OR1 offline; MiMo-7B(16 rollout에서 pass rate 90% 초과 — 수학 풀의 약 절반) | 학습 전 한 번 |
| 이전 단계에서 정확도 1로 푼 prompt 제거 | Skywork-OR1 online; POLARIS(거울상 J 모양 난이도 분포를 만든 뒤 각 단계 끝에 정확도 0.9 초과 제거) | 단계 경계 |
| 16개로 선별, pass rate가 이면 128개로 채우고 다시 필터 | MAI-Thinking-1 | prompt마다 적응형 |
| 10% 확률로 샘플하는 easy pool 유지 | MiMo-7B(쉬운 문제를 완전히 빼자 업데이트가 불안정해짐) | 상시 |
| 쉬움 → 어려움 curriculum; 로 샘플 | Kimi k1.5 §2.3.4 | 추적한 성공률 |
| RL이 가끔이라도 푸는 과제만 유지 | DeepSeek-V3.2(pass@100 > 0) | 합성할 때 |
아래 시뮬레이터는 이 규칙들을 같은 장난감 풀에서 고정된 rollout 예산으로 돌린다.
What to look for (the toy’s numbers are illustrative only):
- Uniform spends most rollouts on groups with no signal as the policy improves (amber falls), because the pool is full of tasks that are always or never solved.
- Offline filter starts with nearly all rollouts informative, then goes stale: tasks it kept get solved, tasks it dropped as impossible become learnable but are never sampled. Raise λ and its easy-cluster pass rate (green) erodes — nothing in the filtered set touches those skills any more.
- Online filter (drop prompts last solved , re-probe the pool at each stage boundary, as Skywork-OR1 and POLARIS do) keeps the signal share above uniform and reaches the frontier faster. But with λ around 2 its easy-cluster pass dips: once mastered tasks leave the batch, nothing notices them slipping until the next re-probe. + easy pool spends 10% of the budget where the policy is already good and catches the regression early — MiMo-7B’s reason for keeping one.
- Prioritised and learnability both chase the frontier; also samples never-solved tasks, which costs signal early but pays when transfer makes them learnable.
- Two-stage spends rollouts per prompt on pass@8 = 0 tasks in the second half. In this toy the probing cost and the small pool make it no better than the simpler rules; its value in GLM-4.5 came from 512 samples per prompt on a large verified pool of very hard problems, which a 320-task toy does not represent.
- Move G from 8 to 32: every rule gets more informative groups per prompt, but fewer prompts per step. Adaptive screening (MAI) is the compromise: cheap screening for everyone, large groups only where they pay.
Implementing it
The NumPy block checks the verifier break-even rate, the test-difficulty reward, the GDPO collapse example and the swamping and noise effects of the two normalisation orders, GAR’s mass preservation, and what MAI-style adaptive group sizing buys.
import numpy as np
from math import comb
# 1) A noisy verifier: when does an exploit beat an honest attempt?
# honest attempt: solves with prob p, verifier has false-negative rate fn and false-positive rate fp
# exploit: never solves, but fools the verifier with prob fp_h
def expected_reward(p, fn, fp):
return p * (1 - fn) + (1 - p) * fp
fn, fp, fp_h = 0.05, 0.02, 0.10
print("p_solve E[R|honest] E[R|exploit] exploit pays?")
for p in [0.02, 0.05, 0.1, 0.2, 0.5]:
eh = expected_reward(p, fn, fp)
print(f"{p:7.2f} {eh:11.3f} {fp_h:12.3f} {'YES' if fp_h > eh else 'no'}")
p_star = (fp_h - fp) / (1 - fn - fp)
print(f"break-even pass rate p* = (fp_h − fp)/(1 − fn − fp) = {p_star:.3f} → hacking pressure is strongest on hard tasks\n")
# 2) Test-difficulty reward (MiMo-7B style): tests grouped by difficulty level, weights w_L
levels = [np.array([1, 1, 1, 1]), np.array([1, 1, 0]), np.array([0, 1])] # pass(1)/fail(0) per test, easy → hard
w = np.array([1, 1, 1]) / 3
strict = sum(w[L] * all(np.concatenate(levels[:L + 1]) == 1) for L in range(3))
soft = sum(w[L] * levels[L].mean() for L in range(3))
allpass = float(all(np.concatenate(levels) == 1))
print(f"all-tests reward {allpass:.2f} strict {strict:.3f} soft {soft:.3f}")
# 3) Two rewards: sum-then-normalise (GRPO) vs normalise-each-then-sum (GDPO)
def z(x, ddof=1):
s = x.std(ddof=ddof)
return (x - x.mean()) / (s + 1e-6)
# the paper's collapse example: two binary rewards, two rollouts
for name, r in [("totals (0,1)", np.array([[0., 0.], [1., 0.]])), ("totals (0,2)", np.array([[0., 0.], [1., 1.]]))]:
grpo = z(r.sum(1))
gdpo = z(r[:, 0]) + z(r[:, 1]) # a constant reward contributes 0
print(f"{name}: GRPO {np.round(grpo, 4)} GDPO (before batch norm) {np.round(gdpo, 4)}")
rng = np.random.default_rng(0)
G, P = 8, 4000
corr = lambda a, b: np.corrcoef(a.ravel(), b.ravel())[0, 1]
r_acc = (rng.random((P, G)) < 0.5).astype(float) # high-variance: correct / wrong
r_fmt = rng.choice([0.0, 0.2], size=(P, G), p=[0.3, 0.7]) # low-variance: a small format bonus
A_sum = np.apply_along_axis(z, 1, r_acc + r_fmt)
A_dec = np.apply_along_axis(z, 1, r_acc) + np.apply_along_axis(z, 1, r_fmt)
print(f"\ncorr(advantage, format reward): sum→norm {corr(A_sum, r_fmt):.3f} norm-each→sum {corr(A_dec, r_fmt):.3f}")
print(f"corr(advantage, accuracy): sum→norm {corr(A_sum, r_acc):.3f} norm-each→sum {corr(A_dec, r_acc):.3f}")
# the cost: a reward whose within-group spread is pure noise gets blown up to unit scale
r_noise = 0.7 + 1e-3 * rng.standard_normal((P, G)) # e.g. a nearly saturated judge score
A_sum2 = np.apply_along_axis(z, 1, r_acc + r_noise)
A_dec2 = np.apply_along_axis(z, 1, r_acc) + np.apply_along_axis(z, 1, r_noise)
print(f"add a saturated judge score (std 1e-3, pure noise):")
print(f" corr(adv, noise) sum→norm {corr(A_sum2, r_noise):.3f} norm-each→sum {corr(A_dec2, r_noise):.3f}")
guard = lambda x: z(x) if x.std(ddof=1) > 0.05 else 0 * x # skip rewards with no real spread in this group
A_grd = np.apply_along_axis(z, 1, r_acc) + np.apply_along_axis(guard, 1, r_noise)
print(f" with a spread guard (std > 0.05): corr(adv, noise) {corr(A_grd, r_noise):.3f} corr(adv, accuracy) {corr(A_grd, r_acc):.3f}")
# 4) GAR-style redistribution keeps the positive mass of passing trajectories
R = np.array([1, 1, 1, 0, 0, 1, 0, 0], float)
f = np.array([1.0, 0.3, 0.8, 1, 1, 1.0, 1, 1]) # quality factors (only matter for passing ones)
A = R - R.mean(); Pm = R > 0
lam = A[Pm].sum() / (f[Pm] * A[Pm]).sum()
A2 = np.where(Pm, lam * f * A, A)
print(f"\nGAR: λ={lam:.3f} positive mass before {A[Pm].sum():.3f} after {A2[Pm].sum():.3f} per-passing A' {np.round(A2[Pm], 3)}")
# 5) Adaptive group size: screen with 16, fill to 128 only if the pass rate is in [0.05, 0.8]
def binom_pmf(n, k, p): return comb(n, k) * p**k * (1 - p)**(n - k)
def p_signal(p, n): return 1 - p**n - (1 - p)**n
pp = rng.beta(0.4, 0.6, 4000) # a pool with many near-0 and near-1 prompts
p_in = np.array([sum(binom_pmf(16, k, p) for k in range(1, 13)) for p in pp]) # 1 ≤ k ≤ 12 ⇔ k/16 ∈ [0.05, 0.8]
in_band = (pp >= 0.05) & (pp <= 0.8) # the prompts a 128-sample group is worth spending on
print(f"share of the pool truly in [0.05, 0.8]: {in_band.mean():.3f}")
print(f"fixed G=128 on everything : {128 / in_band.mean():6.1f} rollouts per in-band 128-group")
cost = 16 + 112 * p_in.mean()
hit = (p_in * in_band).mean() / p_in.mean()
print(f"screen 16, fill to 128 : {cost / p_in.mean():6.1f} rollouts per filled group ({hit:.0%} of filled groups truly in band)")
print(f"fixed G=16 on everything : {(1 - p_signal(pp, 16)).mean():.1%} of groups have zero variance")How to read it. (1) With these error rates the exploit pays below a pass rate of about 0.086. (2) A patch that fails one hard test scores 0 under all-tests, 1/3 under strict levels, about 0.72 under soft levels — partial credit without rewarding a skipped easy level. (3) The collapse example reproduces the paper’s numbers. With a binary accuracy reward and a small format bonus, the sum-then-normalise advantage barely correlates with the format reward (≈ 0.15); per-reward normalisation raises it to ≈ 0.65 — at the price of a weaker correlation with accuracy, because both rewards now have equal scale. Add a saturated noisy judge score and per-reward normalisation turns its jitter into a large component of the advantage (correlation ≈ 0.6 with pure noise); the spread guard removes it. (4) GAR moves positive mass from the low-quality patch (0.19) to clean ones (0.65) while keeping the total at 2. (5) In a pool skewed to the extremes, screening with 16 before filling to 128 spends about 140 rollouts per filled group instead of about 230, and about nine in ten filled groups really are in band.
The PyTorch version: per-group multi-reward advantages in both orders, with the spread guard, and GAR on a batch.
import torch
def _group_mean_std(x, inv, n_groups):
"""Per-group mean and unbiased std of x (B, ...) broadcast back to (B, ...)."""
shape = (n_groups,) + x.shape[1:]
ones = torch.ones(x.shape[0], dtype=x.dtype, device=x.device)
cnt = x.new_zeros(n_groups).index_add_(0, inv, ones).view(-1, *([1] * (x.dim() - 1)))
s1 = x.new_zeros(shape).index_add_(0, inv, x)
s2 = x.new_zeros(shape).index_add_(0, inv, x * x)
mean = s1 / cnt
var = (s2 - cnt * mean ** 2) / (cnt - 1).clamp(min=1)
return mean[inv], var.clamp(min=0).sqrt()[inv]
def multi_reward_advantage(rewards, group_ids, weights=None, mode="decoupled", min_std=0.0, eps=1e-6):
"""rewards: (B, K) reward components per response; group_ids: (B,) prompt index.
mode="sum": normalise the weighted sum within each group (GRPO default).
mode="decoupled": normalise each component within its group, weighted sum, then batch-normalise (GDPO).
min_std: a component whose within-group std is below this contributes 0 in that group."""
_, inv = torch.unique(group_ids, return_inverse=True)
n_groups = int(inv.max()) + 1
w = rewards.new_ones(rewards.shape[1]) if weights is None else weights.to(rewards)
if mode == "sum":
tot = rewards @ w
m, s = _group_mean_std(tot, inv, n_groups)
return (tot - m) / (s + eps)
m, s = _group_mean_std(rewards, inv, n_groups)
z = torch.where(s > min_std, (rewards - m) / (s + eps), torch.zeros_like(rewards))
a = z @ w
return (a - a.mean()) / (a.std() + eps)
def gar_redistribute(R, quality, group_ids, lam_max=3.0):
"""R: (B,) hack-corrected binary rewards; quality: (B,) factors in (0, 1] for passing responses.
Returns zero-mean per-group advantages with the passing responses' positive mass preserved."""
A = torch.zeros_like(R)
for g in torch.unique(group_ids):
idx = (group_ids == g).nonzero(as_tuple=True)[0]
r = R[idx]
a = r - r.mean()
p = r > 0
denom = (quality[idx][p] * a[p]).sum()
if p.any() and denom > 0:
lam = torch.clamp(a[p].sum() / denom, max=lam_max)
a = torch.where(p, lam * quality[idx] * a, a)
A[idx] = a - a.mean()
return AA verifier has false-positive rate 2% on honest wrong answers and false-negative rate 5%. A known exploit fools it 10% of the time but never solves the task. On which tasks does group-relative RL reinforce the exploit over honest attempts?
The honest attempt’s expected reward is ; the exploit’s is . With a group-mean baseline the advantage of a behaviour is proportional to its expected reward minus the group’s, so the exploit wins when , i.e. . Hard tasks — the ones difficulty filters favour — are where hacking pays, which is why verifier hardening and difficulty selection must be designed together.
You add a format reward (values 0 or 0.2, most responses earn it) to a binary correctness reward and normalise the sum within each group. What happens to the format signal, and what does per-reward normalisation (GDPO) change?
The summed advantage’s numerator is , so reward enters with magnitude . A reward that barely varies within a group barely moves the advantage. GDPO normalises each reward within the group first, then sums and batch-normalises, restoring its signal (and the resolution between “satisfied one objective” and “satisfied both”). The flip side: a nearly saturated reward whose spread is jitter becomes a unit-variance noise term, so guard against rewards without real spread.
Summary
- Behaviour-independent verifier noise only scales the gradient; behaviour-dependent false positives redirect it. An exploit beats honesty when , so hacking pressure concentrates on hard tasks.
- Verifiers are engineered data: symbolic math checks, removal of guessable formats, generated and cross-validated tests, F2P/P2F acceptance, level-based partial credit, small shaping terms (format, language consistency, soft overlong).
- Rubric-based generative judges are the default for non-verifiable tasks; the designs that work add protocols, closed-loop calibration on verifiable tasks, probability readouts instead of sampled verdicts, and hard rules against length bias. Multiplicative rubrics and advantage redistribution (GRS, GAR) separate clean from hacky passes but do not replace zeroing confirmed exploits.
- With several rewards, sum-then-normalise lets the highest-variance reward swamp the rest; per-reward normalisation (GDPO) restores them but amplifies rewards whose spread is noise.
- Mixing environments regularises but dilutes; domain gradient share goes as prompts × length × mean |advantage|. Agent environments are synthesised with solutions and verifiers, filtered by solvability, and hardened against leaks; infrastructure failures are excluded, not scored 0.
- Difficulty selection aims at ; filters differ in when they measure (every batch, once, per stage, adaptively), and an easy pool guards against silent regressions.
볼 것(장난감의 숫자는 예시일 뿐이다):
- uniform은 정책이 나아질수록 rollout 대부분을 신호 없는 그룹에 쓴다(주황이 떨어짐). 풀이 항상 풀리거나 전혀 안 풀리는 과제로 가득하기 때문이다.
- offline filter는 거의 모든 rollout이 정보를 가진 채 시작했다가 낡는다. 남긴 과제는 풀려 버리고, 불가능하다고 뺀 과제는 배울 만해져도 다시 뽑히지 않는다. λ를 올리면 쉬운 묶음의 pass rate(초록)가 깎인다. 걸러진 집합에는 그 능력을 건드리는 것이 더 이상 없다.
- online filter(마지막에 로 푼 prompt를 빼고, 단계 경계마다 풀을 다시 잰다. Skywork-OR1과 POLARIS가 하는 방식)는 uniform보다 신호 비율이 높고 경계에 더 빨리 닿는다. 하지만 λ가 2 근처면 쉬운 묶음의 pass가 움푹 꺼진다. 익힌 과제가 배치에서 빠지면 다음 재측정까지 아무도 그것이 미끄러지는 것을 알아채지 못한다. + easy pool은 예산의 10%를 정책이 이미 잘하는 곳에 써서 퇴행을 일찍 잡는다 — MiMo-7B가 easy pool을 둔 이유다.
- **우선순위 **와 **learnability **는 둘 다 경계를 쫓는다. 는 한 번도 안 풀린 과제도 뽑아서 초반에는 신호를 잃지만, 전이로 그것들이 배울 만해지면 보상받는다.
- 두 단계는 후반에 pass@8 = 0 과제에 prompt당 rollout을 쓴다. 이 장난감에서는 측정 비용과 작은 풀 때문에 더 단순한 규칙보다 낫지 않다. GLM-4.5에서의 가치는 매우 어려운 문제의 큰 검증된 풀에 prompt당 512개를 쓴 데서 나왔고, 과제 320개짜리 장난감은 그것을 표현하지 못한다.
- G를 8에서 32로 옮겨 보라. 모든 규칙에서 prompt당 정보 있는 그룹은 늘지만 step당 prompt는 줄어든다. 적응형 선별(MAI)이 절충안이다. 모두에게 싼 선별을, 큰 그룹은 값을 하는 곳에만.
구현하기
NumPy 블록은 검증기 손익분기 비율, 테스트 난이도 보상, GDPO의 붕괴 예와 두 정규화 순서의 묻힘·잡음 효과, GAR의 총량 보존, MAI식 적응형 그룹 크기가 무엇을 사는지 확인한다.
import numpy as np
from math import comb
# 1) 잡음 섞인 검증기: exploit이 정직한 시도를 이기는 때는?
# 정직한 시도: 확률 p로 풂, 검증기의 false-negative 비율 fn, false-positive 비율 fp
# exploit: 결코 풀지 못하지만 확률 fp_h로 검증기를 속임
def expected_reward(p, fn, fp):
return p * (1 - fn) + (1 - p) * fp
fn, fp, fp_h = 0.05, 0.02, 0.10
print("p_solve E[R|honest] E[R|exploit] exploit pays?")
for p in [0.02, 0.05, 0.1, 0.2, 0.5]:
eh = expected_reward(p, fn, fp)
print(f"{p:7.2f} {eh:11.3f} {fp_h:12.3f} {'YES' if fp_h > eh else 'no'}")
p_star = (fp_h - fp) / (1 - fn - fp)
print(f"break-even pass rate p* = (fp_h − fp)/(1 − fn − fp) = {p_star:.3f} → hacking 압력은 어려운 과제에서 가장 크다\n")
# 2) 테스트 난이도 보상(MiMo-7B 방식): 테스트를 난이도 단계로 묶고 가중치 w_L
levels = [np.array([1, 1, 1, 1]), np.array([1, 1, 0]), np.array([0, 1])] # 테스트별 통과(1)/실패(0), 쉬움 → 어려움
w = np.array([1, 1, 1]) / 3
strict = sum(w[L] * all(np.concatenate(levels[:L + 1]) == 1) for L in range(3))
soft = sum(w[L] * levels[L].mean() for L in range(3))
allpass = float(all(np.concatenate(levels) == 1))
print(f"all-tests reward {allpass:.2f} strict {strict:.3f} soft {soft:.3f}")
# 3) 보상 둘: 합한 뒤 정규화(GRPO) 대 각각 정규화한 뒤 합(GDPO)
def z(x, ddof=1):
s = x.std(ddof=ddof)
return (x - x.mean()) / (s + 1e-6)
# 논문의 붕괴 예: 이진 보상 둘, rollout 둘
for name, r in [("totals (0,1)", np.array([[0., 0.], [1., 0.]])), ("totals (0,2)", np.array([[0., 0.], [1., 1.]]))]:
grpo = z(r.sum(1))
gdpo = z(r[:, 0]) + z(r[:, 1]) # 상수 보상은 0을 더함
print(f"{name}: GRPO {np.round(grpo, 4)} GDPO (before batch norm) {np.round(gdpo, 4)}")
rng = np.random.default_rng(0)
G, P = 8, 4000
corr = lambda a, b: np.corrcoef(a.ravel(), b.ravel())[0, 1]
r_acc = (rng.random((P, G)) < 0.5).astype(float) # 분산 큼: 맞음 / 틀림
r_fmt = rng.choice([0.0, 0.2], size=(P, G), p=[0.3, 0.7]) # 분산 작음: 작은 형식 보너스
A_sum = np.apply_along_axis(z, 1, r_acc + r_fmt)
A_dec = np.apply_along_axis(z, 1, r_acc) + np.apply_along_axis(z, 1, r_fmt)
print(f"\ncorr(advantage, format reward): sum→norm {corr(A_sum, r_fmt):.3f} norm-each→sum {corr(A_dec, r_fmt):.3f}")
print(f"corr(advantage, accuracy): sum→norm {corr(A_sum, r_acc):.3f} norm-each→sum {corr(A_dec, r_acc):.3f}")
# 비용: 그룹 내 퍼짐이 순수 잡음인 보상이 단위 크기로 부풀려진다
r_noise = 0.7 + 1e-3 * rng.standard_normal((P, G)) # 예: 거의 포화된 judge 점수
A_sum2 = np.apply_along_axis(z, 1, r_acc + r_noise)
A_dec2 = np.apply_along_axis(z, 1, r_acc) + np.apply_along_axis(z, 1, r_noise)
print(f"add a saturated judge score (std 1e-3, pure noise):")
print(f" corr(adv, noise) sum→norm {corr(A_sum2, r_noise):.3f} norm-each→sum {corr(A_dec2, r_noise):.3f}")
guard = lambda x: z(x) if x.std(ddof=1) > 0.05 else 0 * x # 이 그룹에서 실제 퍼짐이 없는 보상은 건너뜀
A_grd = np.apply_along_axis(z, 1, r_acc) + np.apply_along_axis(guard, 1, r_noise)
print(f" with a spread guard (std > 0.05): corr(adv, noise) {corr(A_grd, r_noise):.3f} corr(adv, accuracy) {corr(A_grd, r_acc):.3f}")
# 4) GAR식 재분배는 통과 trajectory의 양의 총량을 보존한다
R = np.array([1, 1, 1, 0, 0, 1, 0, 0], float)
f = np.array([1.0, 0.3, 0.8, 1, 1, 1.0, 1, 1]) # 품질 계수(통과한 것에만 의미)
A = R - R.mean(); Pm = R > 0
lam = A[Pm].sum() / (f[Pm] * A[Pm]).sum()
A2 = np.where(Pm, lam * f * A, A)
print(f"\nGAR: λ={lam:.3f} positive mass before {A[Pm].sum():.3f} after {A2[Pm].sum():.3f} per-passing A' {np.round(A2[Pm], 3)}")
# 5) 적응형 그룹 크기: 16개로 선별, pass rate가 [0.05, 0.8]일 때만 128개로 채움
def binom_pmf(n, k, p): return comb(n, k) * p**k * (1 - p)**(n - k)
def p_signal(p, n): return 1 - p**n - (1 - p)**n
pp = rng.beta(0.4, 0.6, 4000) # 0·1 근처 prompt가 많은 풀
p_in = np.array([sum(binom_pmf(16, k, p) for k in range(1, 13)) for p in pp]) # 1 ≤ k ≤ 12 ⇔ k/16 ∈ [0.05, 0.8]
in_band = (pp >= 0.05) & (pp <= 0.8) # 128개 그룹을 쓸 가치가 있는 prompt
print(f"share of the pool truly in [0.05, 0.8]: {in_band.mean():.3f}")
print(f"fixed G=128 on everything : {128 / in_band.mean():6.1f} rollouts per in-band 128-group")
cost = 16 + 112 * p_in.mean()
hit = (p_in * in_band).mean() / p_in.mean()
print(f"screen 16, fill to 128 : {cost / p_in.mean():6.1f} rollouts per filled group ({hit:.0%} of filled groups truly in band)")
print(f"fixed G=16 on everything : {(1 - p_signal(pp, 16)).mean():.1%} of groups have zero variance")읽는 법. (1) 이 오류율에서 exploit은 pass rate 약 0.086 아래에서 이득이다. (2) 어려운 테스트 하나를 실패한 패치는 all-tests에서 0, strict 단계에서 1/3, soft 단계에서 약 0.72를 받는다. 쉬운 단계를 건너뛰는 것에 보상하지 않으면서 주는 부분 점수다. (3) 붕괴 예는 논문의 숫자를 재현한다. 이진 정답 보상과 작은 형식 보너스에서, 합한 뒤 정규화한 advantage는 형식 보상과 거의 상관이 없고(≈ 0.15), 보상별 정규화는 이를 ≈ 0.65로 올린다. 대가로 정답과의 상관은 약해지는데, 이제 두 보상의 크기가 같아졌기 때문이다. 포화된 잡음 judge 점수를 더하면 보상별 정규화가 그 흔들림을 advantage의 큰 성분으로 만든다(순수 잡음과의 상관 ≈ 0.6). 퍼짐 guard가 그것을 없앤다. (4) GAR은 낮은 품질 패치(0.19)에서 깨끗한 패치(0.65)로 양의 총량을 옮기면서 합을 2로 유지한다. (5) 양 극단에 치우친 풀에서, 128로 채우기 전에 16으로 선별하면 채운 그룹당 rollout이 약 230개 대신 약 140개이고, 채운 그룹의 열에 아홉은 실제로 band 안에 있다.
PyTorch 판: 두 순서의 그룹별 다중 보상 advantage(퍼짐 guard 포함)와 배치 위의 GAR.
import torch
def _group_mean_std(x, inv, n_groups):
"""x (B, ...)의 그룹별 평균과 비편향 std를 (B, ...)로 되돌려 준다."""
shape = (n_groups,) + x.shape[1:]
ones = torch.ones(x.shape[0], dtype=x.dtype, device=x.device)
cnt = x.new_zeros(n_groups).index_add_(0, inv, ones).view(-1, *([1] * (x.dim() - 1)))
s1 = x.new_zeros(shape).index_add_(0, inv, x)
s2 = x.new_zeros(shape).index_add_(0, inv, x * x)
mean = s1 / cnt
var = (s2 - cnt * mean ** 2) / (cnt - 1).clamp(min=1)
return mean[inv], var.clamp(min=0).sqrt()[inv]
def multi_reward_advantage(rewards, group_ids, weights=None, mode="decoupled", min_std=0.0, eps=1e-6):
"""rewards: 응답별 보상 성분 (B, K); group_ids: prompt 번호 (B,).
mode="sum": 가중합을 그룹 안에서 정규화(GRPO 기본).
mode="decoupled": 성분마다 그룹 안에서 정규화, 가중합, 그다음 배치 정규화(GDPO).
min_std: 그룹 내 std가 이보다 작은 성분은 그 그룹에서 0을 더한다."""
_, inv = torch.unique(group_ids, return_inverse=True)
n_groups = int(inv.max()) + 1
w = rewards.new_ones(rewards.shape[1]) if weights is None else weights.to(rewards)
if mode == "sum":
tot = rewards @ w
m, s = _group_mean_std(tot, inv, n_groups)
return (tot - m) / (s + eps)
m, s = _group_mean_std(rewards, inv, n_groups)
z = torch.where(s > min_std, (rewards - m) / (s + eps), torch.zeros_like(rewards))
a = z @ w
return (a - a.mean()) / (a.std() + eps)
def gar_redistribute(R, quality, group_ids, lam_max=3.0):
"""R: hack 보정된 이진 보상 (B,); quality: 통과 응답의 (0, 1] 계수 (B,).
통과 응답의 양의 총량을 보존한, 그룹별 평균 0 advantage를 돌려 준다."""
A = torch.zeros_like(R)
for g in torch.unique(group_ids):
idx = (group_ids == g).nonzero(as_tuple=True)[0]
r = R[idx]
a = r - r.mean()
p = r > 0
denom = (quality[idx][p] * a[p]).sum()
if p.any() and denom > 0:
lam = torch.clamp(a[p].sum() / denom, max=lam_max)
a = torch.where(p, lam * quality[idx] * a, a)
A[idx] = a - a.mean()
return A검증기는 정직한 오답에 대해 false-positive 비율 2%, false-negative 비율 5%다. 알려진 exploit은 10%의 확률로 검증기를 속이지만 과제를 결코 풀지 못한다. 그룹 상대 RL은 어떤 과제에서 정직한 시도보다 exploit을 강화하나?
정직한 시도의 기대 보상은 이고 exploit은 이다. 그룹 평균 baseline에서 행동의 advantage는 그 기대 보상에서 그룹의 기대 보상을 뺀 것에 비례하므로, exploit은 , 즉 일 때 이긴다. hacking이 이득인 곳은 어려운 과제 — 난이도 필터가 선호하는 바로 그 과제 — 이고, 그래서 검증기 강화와 난이도 선별은 함께 설계해야 한다.
이진 정답 보상에 형식 보상(값 0 또는 0.2, 대부분의 응답이 받음)을 더하고 그 합을 그룹 안에서 정규화한다. 형식 신호는 어떻게 되고, 보상별 정규화(GDPO)는 무엇을 바꾸나?
합한 advantage의 분자는 이므로 보상 는 의 크기로 들어간다. 그룹 안에서 거의 변하지 않는 보상은 advantage를 거의 움직이지 못한다. GDPO는 각 보상을 먼저 그룹 안에서 정규화한 뒤 합하고 배치 정규화해서 그 신호(그리고 “목표 하나 만족”과 “둘 다 만족” 사이의 해상도)를 되살린다. 뒷면: 퍼짐이 흔들림뿐인 거의 포화된 보상이 단위 분산의 잡음 항이 되므로, 실제 퍼짐이 없는 보상은 막아야 한다.
정리
- 행동과 무관한 검증기 잡음은 gradient의 크기만 줄이고, 행동에 의존하는 false positive는 방향을 바꾼다. exploit은 일 때 정직을 이기므로 hacking 압력은 어려운 과제에 몰린다.
- 검증기는 설계된 데이터다. 기호 수학 비교, 찍을 수 있는 형식 제거, 생성하고 교차 검증한 테스트, F2P/P2F 수락, 단계별 부분 점수, 작은 shaping 항(형식, 언어 일관성, soft overlong).
- 검증할 수 없는 과제의 기본은 rubric 기반 생성형 judge다. 잘 되는 설계는 프로토콜, 검증 가능한 과제로 하는 closed-loop 보정, 샘플 판정 대신 확률 읽기, 길이 편향에 대한 단단한 규칙을 더한다. 곱셈 rubric과 advantage 재분배(GRS, GAR)는 깨끗한 통과와 hack 통과를 가르지만 확인된 exploit을 0으로 만드는 것을 대신하지 못한다.
- 보상이 여럿이면 합한 뒤 정규화는 분산이 가장 큰 보상이 나머지를 묻게 하고, 보상별 정규화(GDPO)는 그것들을 되살리지만 퍼짐이 잡음인 보상을 키운다.
- 환경을 섞으면 정규화되지만 희석된다. 도메인의 gradient 몫은 prompt 수 × 길이 × 평균 |advantage|를 따른다. agent 환경은 해답·검증기와 함께 합성하고, 풀 수 있는지로 거르고, 누출에 맞서 강화한다. 인프라 실패는 0점이 아니라 제외한다.
- 난이도 선별은 를 겨냥한다. 필터들은 를 언제 재는지(매 배치, 한 번, 단계마다, 적응형)가 다르고, easy pool은 조용한 퇴행을 막는다.
더 읽을거리Further reading
- DeepSeek-AI, DeepSeek-V3.2: Pushing the Frontier of Open Large Language Models (2025) — 해답 함수와 검증 함수를 함께 만드는 환경 합성 agent, pass@100 > 0 필터, 1,827개 환경과 4,417개 과제, prompt별 rubric GRM.An environment-synthesis agent that writes solution and verification functions, a pass@100 > 0 filter, 1,827 environments and 4,417 tasks, per-prompt rubric GRMs.
- Kimi Team, Kimi K2: Open Agentic Intelligence (2025) — tool spec 저장소와 상태를 가진 tool 시뮬레이터로 만든 agent 데이터, self-critique rubric 보상과 closed-loop critic 갱신.Agent data from a tool-spec repository and a stateful tool simulator; self-critique rubric rewards with closed-loop critic refinement.
- Kimi Team, Kimi k1.5: Scaling Reinforcement Learning with LLMs (2025) — 추측 필터, 테스트 생성기 파이프라인, CoT 보상모델, curriculum과 1 − s_i 우선 샘플링(§2.3.4).The guessing filter, the test-generator pipeline, a CoT reward model, curriculum and 1 − s_i prioritised sampling (§2.3.4).
- Liu et al., GDPO: Group reward-Decoupled Normalization Policy Optimization for Multi-reward RL Optimization (NVIDIA, ICML 2026) — 여러 보상을 합한 뒤 정규화하면 서로 다른 보상 조합이 같은 advantage로 뭉개진다. 보상별로 그룹 정규화한 뒤 합하고 배치 정규화한다.Summing rewards before group normalisation collapses distinct reward combinations into the same advantage; normalise each reward per group, sum, then batch-normalise.
- Bae et al., Online Difficulty Filtering for Reasoning Oriented Reinforcement Learning (2025) — 기대 정책 개선의 하한이 과제 성공 확률의 분산 p(1−p)로 주어진다는 분석과 균형 잡힌 band 필터.Shows expected policy improvement is lower-bounded by the variance p(1−p) of task success, and proposes balanced band filtering.
- He, Liu et al., Skywork Open Reasoner 1 Technical Report (2025) — §3.1의 offline·online 필터(정답률 0·1 제거, 단계 경계마다 다 맞힌 prompt 제거)와 0이 아닌 advantage 그룹만 쓰는 rejection sampling.§3.1 offline and online filtering (drop accuracy 0 or 1; drop prompts solved at accuracy 1 at each stage boundary) and batches of non-zero-advantage groups only.
- Xiaomi LLM-Core, MiMo-V2.6: Scaling Reinforcement Learning Towards Self-Improvement (technical report PDF, 2026) — groupwise agentic grading — 곱셈 rubric 보상(GRS)과 통과 궤적 사이의 advantage 재분배(GAR), hack agent로 환경 점검. 사이트 리뷰는 /study/reports/mimo-v2/.Groupwise agentic grading — multiplicative rubric rewards (GRS) and advantage redistribution among passing trajectories (GAR); environment screening with a hack agent. Reviewed at /study/reports/mimo-v2/.
- NVIDIA, Nemotron 3 Ultra: Open, Efficient Mixture-of-Experts Hybrid Mamba-Transformer Model for Agentic Reasoning (2026) — 터미널·SWE·검색·수학·코드·안전 등 여러 환경을 한 번의 RLVR 실행에 섞고, 도메인 희석을 MOPD로 보완. 사이트 리뷰는 /study/reports/nemotron-3-ultra/.Terminal, SWE, search, math, code, safety and more mixed into one RLVR run, with domain dilution addressed by MOPD. Reviewed at /study/reports/nemotron-3-ultra/.