컴백부터 K-뷰티까지 — K-컬쳐의 모든 것을 메일로 받아보세요메일로 받아보기

METAL MEDIA

AI가 스스로 문제를 내고 스스로 풀면서 실력을 키우는 훈련법

arXiv:2608.191972026-08-18

SPADE: Self-Play in Adaptive Synthetic Executable Environments

AI가 스스로 문제를 내고 스스로 풀면서 실력을 키우는 훈련법

SPADE는 하나의 언어모델이 '문제 출제자'와 '문제 풀이자' 두 역할을 동시에 맡아 서로를 훈련시키는 셀프플레이 방식이다. 출제자는 실행 가능한 파이썬 코드로 완전한 게임 환경을 만들고, 풀이자가 그 환경에서 훈련하면서 두 역할이 함께 발전한다. 30B 규모 모델에서 기존 고정 환경 방식보다 평균 5.3점 높은 성능을 냈고, 모델이 커질수록 격차가 더 벌어졌다.

METAL MEDIA 해설 도표

AI가 스스로 문제를 내고 스스로 풀면서 실력을 키우는 훈련법

  1. 01기존에는 사람이 미리 만든 문제 세트나 고정된 자동 생성기를 썼는데, 모델이 그 문제들을 다 풀고 나면 더 이상 성장할 방법이 없었다
  2. 02SPADE는 같은 모델이 '환경 설계자' 역할일 때는 상태, 보상, 검증 코드를 갖춘 완전한 게임(파이썬 프로그램)을 만들고, '추론 에이전트' 역할일 때는 그 게임을 플레이한다
  3. 03설계자에게는 정답 힌트를 알려줬을 때와 안 알려줬을 때 에이전트 성적 차이(힌트 기반 후회 점수)를 보상으로 주어, 너무 쉽지도 너무 어렵지도 않은 딱 배울 만한 난이도의 문제를 만들도록 유도한다
  4. 04사전학습에 쓰인 방대한 문서를 참고 자료로 주고, 과거에 만든 환경들을 기억하게 해서 문제가 계속 새롭고 다양하게 나오도록 했다
  5. 0530B 모델 기준 수학, 과학, 코드, 추론 8개 벤치마크 평균 5.3점 상승, 도구 사용 벤치마크에서도 최대 13.9점 상승을 기록했고, 모델 크기가 커질수록(4B→30B) 성능 향상 폭도 커졌다(5.2→8.1)
METAL MEDIA이 원문을 바탕으로 재구성한 해설 도표이며, 논문 저자의 원문 figure가 아닙니다.

무엇을 했나

  1. 기존에는 사람이 미리 만든 문제 세트나 고정된 자동 생성기를 썼는데, 모델이 그 문제들을 다 풀고 나면 더 이상 성장할 방법이 없었다
  2. SPADE는 같은 모델이 '환경 설계자' 역할일 때는 상태, 보상, 검증 코드를 갖춘 완전한 게임(파이썬 프로그램)을 만들고, '추론 에이전트' 역할일 때는 그 게임을 플레이한다
  3. 설계자에게는 정답 힌트를 알려줬을 때와 안 알려줬을 때 에이전트 성적 차이(힌트 기반 후회 점수)를 보상으로 주어, 너무 쉽지도 너무 어렵지도 않은 딱 배울 만한 난이도의 문제를 만들도록 유도한다
  4. 사전학습에 쓰인 방대한 문서를 참고 자료로 주고, 과거에 만든 환경들을 기억하게 해서 문제가 계속 새롭고 다양하게 나오도록 했다
  5. 30B 모델 기준 수학, 과학, 코드, 추론 8개 벤치마크 평균 5.3점 상승, 도구 사용 벤치마크에서도 최대 13.9점 상승을 기록했고, 모델 크기가 커질수록(4B→30B) 성능 향상 폭도 커졌다(5.2→8.1)
Table 1: Training the Reasoning Agent on diverse synthetic games improves held-out reasoning and code benchmarks at every backbone scale. The eight held-out benchmarks probe four capability families: competition math (AIME 2025/2026, Avg@32), science reasoning (GPQA-Diamond, accuracy), code generation (LiveCodeBench-v6, Pass@1), and procedural reasoning across four cognitive skills (Reasoning-Gym, win rate at hard). Both fixed-environment baselines are retrained per backbone from the same base model for 400 training iterations; Fixed-env RLVE follows the official RLVE sampling and curriculum settings. Avg is the unweighted mean over the eight benchmarks; green subscripts denote absolute pp gain over the same-model base. Best per column within each backbone block in bold, second best underlined.
ModelAIME’25AIME’26GPQA-DLCB-v6Reasoning-Gym (Stojanovski et al. 2026)Δ vs Base
(MAA)(MAA)(Rein et al. 2023)(Jain et al. 2024)RG-MathRG-Algo.RG-Cog.RG-LogicAvg
Qwen3 backbones: fixed-environment baselines and SPADE (game environment design)
Qwen3-4B-Instruct-250747.458.355.935.131.611.816.454.738.9
Fixed-env GRPO47.158.656.235.434.013.518.156.339.9+1.0
Fixed-env RLVE49.662.157.335.938.616.321.059.142.5+3.6
+ SPADE (Games)48.9+1.560.2+1.958.1+2.237.2+2.144.6+13.019.8+8.023.1+6.760.8+6.144.1+5.2
Qwen3-8B67.171.259.446.347.219.624.863.149.8
Fixed-env GRPO67.471.059.946.849.821.926.564.651.0+1.2
Fixed-env RLVE69.675.061.647.452.725.031.067.953.8+3.9
+ SPADE (Games)68.8+1.773.1+1.962.9+3.549.4+3.157.3+10.129.2+9.633.8+9.069.7+6.655.5+5.7
Qwen3-30B-A3B-Instruct-250761.573.570.443.245.018.023.067.050.2
Fixed-env GRPO61.273.870.943.748.120.324.668.451.4+1.2
Fixed-env RLVE56.969.869.842.555.824.730.973.753.0+2.8
+ SPADE (Games)62.8+1.374.4+0.975.8+5.447.3+4.163.3+18.332.1+14.137.7+14.772.8+5.858.3+8.1
Table 2: Synthetic tool-use environments match dedicated data-synthesis systems and surpass them where multi-step interaction matters most. Per-domain results on BFCL v4 multi-turn (Patil et al. 2025), τ2-bench (Barres et al. 2025), and ACEBench-Agent (Chen et al. 2025a). Reference rows are transcribed from the cited papers. For our rows, Avg is the unweighted mean of the shown subcolumns and the final Avg averages the three benchmarks, computed before rounding. For reference rows, Avg is likewise the unweighted mean of the shown subcolumns, or the cited paper’s own aggregate where the subcolumns are not reported; Agent-World and AWM print τ2 aggregates of 61.8/65.4 and (task-weighted) 33.5/39.0, and we print the means of the shown domains for cross-row consistency. The final Avg is omitted because each reference system skips at least one benchmark. ‘–’ = not reported by the cited paper. SPADE rows in bold.
BFCL v4 (multi-turn)τ2-benchACEBench-Agent
ModelBaseMiss FuncMiss ParamLong CtxAvgRetailAirlineTelecomAvgMulti StepMulti TurnAvgAvgΔ
Synthetic-environment agents (per-split numbers as reported by the cited papers)
AgentScaler-30B-A3B (Fang et al. 2025a)70.260.055.361.860.0
Agent-World-8B (Dong et al. 2026)44.572.840.050.954.6
Agent-World-14B (Dong et al. 2026)53.974.552.056.160.9
AWM-8B (Wang et al. 2026b)45.041.238.523.534.4
AWM-14B (Wang et al. 2026b)51.963.631.517.837.6
EnvScaler-4B (Song et al. 2026)51.034.028.039.038.080.061.170.6
EnvScaler-8B (Song et al. 2026)55.536.035.041.041.985.060.072.5
Ours: SPADE post-training on Qwen3 backbones (tool-use environment design)
Qwen3-4B-Instruct-250734.016.012.525.522.043.032.018.031.055.041.748.433.8
+ SPADE ♠ (Tool Use)46.026.522.034.732.3+10.347.235.621.534.8+3.865.049.557.3+8.941.4+7.7
Qwen3-8B52.030.024.035.635.434.026.518.026.263.356.760.040.5
+ SPADE ♠ (Tool Use)58.036.030.043.241.8+6.437.829.521.229.5+3.373.065.069.0+9.046.8+6.2
Qwen3-30B-A3B-Instruct-250766.044.038.048.049.062.050.035.049.070.054.062.053.3
+ SPADE ♠ (Tool Use)72.050.044.052.954.7+5.765.553.538.852.6+3.682.069.875.9+13.961.1+7.7
Table 3: The full adaptive configuration outperforms every partial and frozen-designer control. Games setting, Qwen3-30B-A3B-Instruct-2507. Best checkpoint per variant on suite average; Avg is the unweighted mean over the same eight benchmarks as Table 1; full trajectories in Figure 11. Best in bold, second best underlined.
ComponentsBenchmarks
SettingED designED trainedCorpus groundingEnv. memoryAIME’25AIME’26GPQA-DLCB-v6RG-MathRG-Algo.RG-Cog.RG-LogicAvg
Qwen3-30B-A3B-Instruct-250761.573.570.443.245.018.023.067.050.2
SPADE ♠Self62.874.475.847.363.332.137.772.858.3
w/o memorySelf59.375.072.345.749.122.930.770.953.2
w/o corpus groundingSelf61.174.171.846.351.622.332.468.753.5
w/o ED training and memorySelf59.473.565.839.122.510.07.646.040.5
Fixed Environment Designer (GPT-5.5)GPT-5.559.972.874.242.651.224.330.768.053.0
Table 4: Symbols used throughout the paper.
SymbolDescription
MDP and environment
𝒮State space
𝒜Action space
T⁡(s′∣s,a)Transition function
R⁡(s,a)Reward function
ρ0Initial state distribution
s,s′,aState, next state, action
Space of valid (executable Python) environments
e∈ℰA single environment instance
ebThe b-th environment in a generation batch
Policy and roles
πθShared LLM policy with parameters θ
πDPolicy in Environment Designer role, πθ(⋅∣role=D)
πAPolicy in Reasoning Agent role, πθ(⋅∣role=A)
role=DSystem-prompt switch selecting Environment Designer role
role=ASystem-prompt switch selecting Reasoning Agent role
Hints and rewards
hPrivileged hint (strategy / partial solution / key observation)
hbHint for the b-th environment
y,yiReasoning Agent response (rollout)
yi′Reasoning Agent rollout sampled with the privileged hint in context
rA​(y∣e)Per-rollout correctness reward (without hint)
rA​(y∣e,h)Per-rollout correctness reward conditioned on hint
r¯A​(e)Average Reasoning Agent return on e without hints
r¯A​(e∣h)Average Reasoning Agent return on e with hint h
rD​(e)Environment Designer reward: hint-based regret r¯A​(e∣h)−r¯A​(e)
GRPO and training
xPrompt / input sequence (generic GRPO notation)
ℒ⁡(θ)GRPO clipped-surrogate training objective
πold,πrefBehavior policy (importance ratio) and KL reference policy
Table 5: Training hyperparameters. Shared across the three games-setting SPADE backbone runs; per-model exceptions appear in parentheses.
HyperparameterValue
ModelsQwen3-4B-Instruct-2507, Qwen3-8B, Qwen3-30B-A3B-Instruct-2507
Learning rate1×10−6 (constant)
OptimizerAdam, β=(0.9,0.98), weight decay 0.1
KL penalty βKL0 (0.005 for 8B)
Clipping εlow/εhigh0.20/0.28
Truncated importance samplingyes
Reward normalizationoutcome-only, per-game z-score
Rollout batch24
Global batch192 (dynamic)
Group size G16
Total rollouts400
Environments per rollout24 (8×3 active skills of 6, round-robin)
Regeneration interval k4 rollouts
Environment Designer temperature0.6
Environment Designer max tokens16,384 (20,000 for 8B)
Reasoning Agent temperature0.6
Reasoning Agent max tokens8,192
Max turns per episode25
Max context length32,768 (49,152 later in the 4B run)
Environment Designer reward blendplateau 0.6, band [0.4,0.6] ([0.2,0.4] later for 4B)
+ floored regret 0.4
Regret scale (normalizer)0.15
Plateau ramp width0.25
Delayed Environment Designer update4 rollouts
Corpus grounding15k docs (10k math, 5k science)
Environment memoryon
Table 6: Full ablation breakdown (games setting, Qwen3-30B-A3B-Instruct-2507). Best checkpoint per variant on the suite average. AIME reports Avg@32; GPQA-D accuracy; LCB-v6 Pass@1; Reasoning-Gym (RG) win rate at hard; GEM the overall win rate across the GEM game suite (Liu et al. 2025c). Best in bold.
SettingCkptAIME’25AIME’26GPQA-DLCB-v6RG-MathRG-Algo.RG-Cog.RG-LogicGEMAvg
Qwen3-30B-A3B-Instruct-250761.573.570.443.245.018.023.067.041.050.2
SPADE ♠30362.874.475.847.363.332.137.772.850.258.3
Environment Designer w/ learning potential62.474.174.246.157.827.933.371.147.455.9
2-skill curriculum39960.671.371.744.753.626.730.570.746.053.7
w/o corpus grounding11161.174.171.846.351.622.332.468.745.153.5
w/o memory11159.375.072.345.749.122.930.770.942.453.2
w/o Environment Designer training and memory27159.473.565.839.122.510.07.646.026.440.5
Fixed Environment Designer (GPT-5.5)17559.972.874.242.651.224.330.768.045.653.0
Table 7: Environment quality over training. Learnability nearly doubles while well-posedness, verifiability, and structural richness hold constant: the quality gains come from sharper difficulty targeting rather than simpler environments. Win-rate rows use the released per-step evaluation logs.
Quality signalEarly (0–40)Mid (150–250)Late (340–396)
Learnable-band fraction (win-rate ∈[0.2,0.8])0.160.160.31
Reasoning Agent win-rate0.300.460.62
Well-posed (LLM rubric)0.980.970.97
Verifiable terminal answer (LLM rubric)0.900.910.93
Interaction depth (turns / episode)8.88.29.8
Program length (lines of code)316333321
Hidden state variables13.013.313.4
Table 8: Corpus ablations collapse environment diversity. Vendi Score per 100 environments (SBERT embeddings; mean over 20 balanced draws) on the verified-matched 30B-A3B runs: identical backbone, skill set, and Environment Designer system prompt, differing in the listed ablations. The identical analysis under TF-IDF/LSA embeddings reproduces the corpus/no-corpus separation (0.53/0.58/0.48/0.05). A fifth run with a static pre-generated environment pool (Reasoning Agent-only training, no live Environment Designer) is excluded as a different generation protocol; its fixed pool measures Vendi/n=0.12.
RunSampleVendi/n ↑Mean pairwise dist. ↑Reading
SPADE (full)3,3100.680.94diverse
w/o memory3,7460.690.94diverse
w/o Environment Designer training, w/o memory4,9290.700.94diverse
w/o corpus8660.040.34collapsed

왜 중요한가

사람이 일일이 문제를 만들거나 고정된 자동 생성기를 쓰는 방식은 언젠가 한계에 부딪히는데, SPADE는 모델이 스스로 문제 난이도를 조절하며 계속 새로운 훈련거리를 만들어내는 구조를 보여준다. 이는 AI가 인간 개입 없이 지속적으로 스스로 발전하는 방법에 한 걸음 다가간 사례다.

이 논문의 용어

  • 셀프플레이(Self-Play) · 하나의 모델이 서로 다른 두 역할을 맡아 상호작용하며 스스로를 훈련시키는 방식
  • GRPO · 여러 응답을 그룹으로 묶어 상대적으로 비교해 정책을 업데이트하는 강화학습 기법
  • MDP(마르코프 결정 과정) · 상태, 행동, 보상, 전이 확률로 이루어진 순차적 의사결정 문제의 수학적 표현
  • 힌트 기반 후회(hint-based regret) · 힌트를 줬을 때와 안 줬을 때 성적 차이로 문제의 학습 난이도를 측정하는 지표
  • Gym 스타일 인터페이스 · reset()으로 초기 상태를 받고 step()으로 행동 후 다음 상태와 보상을 받는 표준 강화학습 환경 형식

본문에 싣지 못한 그림

  • Figure 2: SPADE generates an adaptive, multi-turn curriculum. Four environments the Environment Designer produces over one 30B-A3B run, from step 0 (early) to step 384 (late); each card shows the agent’s first observation, the generated Python environment, and the designer-written hint. Every environment is a complete MDP with a reset()/step() interface, and the tasks shift toward state-gated, multi-turn interaction as the Reasoning Agent improves. Unlike a fixed human-curated pool or a frozen synthetic generator, this curriculum keeps moving with the learner.
  • Figure 4: The SPADE framework. Top: the Environment Designer conditions on the environment memory M and pretraining corpus C to emit an executable environment e and a privileged hint h. Bottom: the Reasoning Agent plays e with and without h; the return gap is the Environment Designer’s hint-based regret rD​(e) (Eq. 3) and task correctness is the Reasoning Agent reward. Both rewards update the shared policy πθ via GRPO.
  • Figure 5: How a privileged hint changes Reasoning Agent play. Two positive-regret examples from the canonical 30B games run. Left: each environment’s task prompt and privileged hint, quoted verbatim (ellipses mark elided text; the standardized answer-format sentence is omitted from the hint). Right: one logged Reasoning Agent rollout per arm, condensed while preserving action order, feedback, and values; elided turns are marked and named. The two arms are independent plays with independently seeded resets, so board layouts and probe outcomes differ across arms. The dashed box on each environment card reports the two displayed rollout returns and their single-pair gap; the Environment Designer reward in Equation 3 is instead the difference of the arm means over all logged rollouts (0.00→1.00 for the fiber task, 0.30→0.65 for the audio task). An expanded task–hint set appears in Appendix J.1.1.
  • Figure 6: Training on diverse synthetic games improves science reasoning, code generation, and procedural reasoning while competition math is preserved (games setting, Qwen3-30B-A3B-Instruct-2507). Top row: competition math (AIME 2025/2026 Avg@32), science reasoning (GPQA-Diamond accuracy), and code generation (LiveCodeBench-v6 Pass@1). Bottom row: procedural reasoning across four cognitive skills (Reasoning-Gym win rate at hard). Markers denote logged evaluation checkpoints; the dashed line marks the untrained base model.
  • Figure 7: Full SPADE raises the learnable share of its environment budget to roughly a third by the end of training; component ablations decline or collapse. Share of each rollout’s 24 environments that is learnable, defined as Reasoning Agent win rate in [0.2,0.8] and weighted by the number of valid environments generated in each 16-step window. Matched 30B-A3B settings over a common 400-step budget; unfilled rollout capacity contributes zero by construction.
  • Figure 9: Trained Environment Designer environments stop revealing the solution method in the prompt. Physics environments from one 30B-A3B run at steps 20, 192, and 384; the step-20 environment retains the scaffold’s default class name. The formula-reveal rate (percentage on each panel) falls from 25% to 5% over 473 environments. Rightmost (red): over steps 290–312 the no-corpus ablation emits the same RotatingMazeEnv task 41 consecutive times. The complete source of the step-384 environment, together with one further exemplar, appears in Appendix J.3.2.
  • Figure 10: From front-loaded derivation to evidence-first interaction. Reasoning Agent episodes from one 30B-A3B run at steps 0, 200, and 300. At step 0 the agent derives in advance and cannot recover from format errors; by step 200 it tests short hypotheses and revises on evidence; by step 300 it probes first and derives once. Benchmark gains of late checkpoints (Table 1) confirm the model keeps its long-form derivation ability. Transcripts verbatim (math glyphs transliterated to ASCII; environment feedback abridged); token counts use the backbone’s tokenizer.
  • Figure 11: Removing Environment Designer training and memory together drops self-play below base; removing either one alone has an above-base selected checkpoint but peaks early and can fall below base late. One curve per variant of Table 3 (Qwen3-30B-A3B-Instruct-2507, games setting). Top row: AIME 2025/2026 Avg@32, GPQA-Diamond accuracy, and LiveCodeBench-v6 Pass@1; bottom row: the four Reasoning-Gym categories; the dashed line marks the untrained base model.
  • Figure 12: Rewarding the Environment Designer matters more than which reward is used, but regret still leads. Averaged trajectories over GPQA-Diamond, LiveCodeBench-v6, and the four Reasoning-Gym categories (Qwen3-30B-A3B-Instruct-2507, games setting); the dashed line marks the corresponding untrained base. Eight-benchmark checkpoint results are reported in Table 6.
  • Figure 13: SPADE’s average gain over base grows with model size, from +5.2 at 4B to +8.1 at 30B-A3B, while matched-budget Fixed-env GRPO stays near +1.2. Left: average gain over each backbone’s own base across the eight benchmarks of Table 1 (large markers), the eight per-benchmark gains beside each mean, Fixed-env GRPO in gray. Right: Environment Designer hint-based regret over training (dark: EMA-smoothed; light: per-step). Only the 30B-A3B estimate stays positive; at 4B and 8B it dips below zero for long stretches, where the finite-sample estimate turns negative even though regret is non-negative at the optimum (Section 4). Both smaller backbones still gain over base (+5.2, +5.7), so the environments help even where the signal is noisy.
  • Figure 14: Curriculum breadth accounts for most of the gain. Suite average (eight benchmarks of Table 1), six-skill vs. two-skill curriculum. Per-benchmark panels: Figure 15.
  • Figure 15: The full 6-skill curriculum lifts held-out benchmarks more than the restricted 2-skill variant; curriculum breadth drives the gains. Qwen3-30B-A3B-Instruct-2507, games setting. Top row: AIME 2025/2026 Avg@32, GPQA-Diamond accuracy, and LiveCodeBench-v6 Pass@1. Bottom row: the four Reasoning-Gym categories; the dashed line marks the untrained base model. Discussed in Section 8.
  • Figure 16: SPADE improves a second backbone family: all four Reasoning-Gym categories end above the untrained Nemotron-30B-A3B-BF16 base (RG-Cognition +9.6, RG-Algorithmic +9.3, RG-Math +2.6, RG-Logic +3.2). Reasoning-Gym win rate across checkpoints; the dashed line marks the untrained base model. Gains arrive after an initial dip early in training, consistent with the Environment Designer initially generating environments too hard for the Reasoning Agent, as observed on the Qwen backbones.
  • Figure 17: Reward granularity increases over training. Left: mean distinct reward levels per environment, including strictly partial levels. Right: early-to-late change in distinct levels overall and by domain (canonical 30B games run).
  • Figure 18: Per-skill learning (canonical SPADE-30B run). (a) Per-skill Reasoning Agent win rate over training (EMA over ∼26 logged points/skill). (b) Win-rate gain (last 25% minus first 25%): Logical Deduction and Spatial Reasoning improve most; Causal Inference, which starts high, declines slightly.
  • Figure 19: Environment-diversity dynamics across the verified-matched runs. Windowed Vendi score (40-step windows, subsampled to exactly 24 environments; mean ± s.d. over 12 draws). The corpus-grounded variants hold the mixed-population reference level for their full run lengths; the no-corpus run starts near-collapsed, peaks at Vendi ∼5.2 near step 100, where its best evaluation checkpoint (111) also falls, and re-collapses as optimization continues. Environment counts differ across runs with run length and acceptance rate; the windowed score uses fixed 24-environment subsamples, so counts do not bias the curves.
  • Figure 20: Task context makes hint utility legible. Four same-record, positive-regret task–hint pairs from the canonical 30B games run. The task summaries retain the goal, hidden information, and usable interaction while removing generic runtime scaffolding. Hint excerpts omit only the standardized answer-format sentence and runtime wrapper. In each header, the two values report the mean return without hint / with hint.
원문에서 그림 보기 →

저자 · Bo Liu

arXiv에서 원문 보기

최신 논문

논문 전체 보기 →

METAL MEDIA 최신 기사