Command Palette
Search for a command to run...
사전 학습에서 사후 학습까지의 추론 이해
사전 학습에서 사후 학습까지의 추론 이해
Jingyan Shen Ang Li Salman Rahman Yifan Sun Micah Goldblum Matus Telgarsky Pavel Izmailov
초록
강화 학습(RL)은 복잡한 추론 과제에서 대규모 언어 모델(LLM)을 개선하는 핵심 수단이 되었지만, RL 사후 학습은 대개 그에 선행하는 사전 학습과 분리되어 연구되어 왔다. 그 결과 두 가지 근본적인 질문이 여전히 해결되지 않고 있다. (1) 사전 학습 선택(모델 크기, 데이터)이 RL 컴퓨팅 투자 대비 성과에 어떤 영향을 미치는가, (2) RL이 실제로 모델에 무엇을 하는가? 이러한 질문은 표준 LLM 환경에서 연구하기 어렵다. 사전 학습 말뭉치가 방대하고 통제되지 않아 행동을 사전 학습 탓인지 RL 탓인지 구분하기 어렵고, 두 단계에 걸친 체계적인 컴퓨팅 스윕은 비용이 엄청나게 들기 때문이다. 이러한 문제를 해결하기 위해 우리는 체스를 통제된 테스트베드로 사용하여 전체 사전 학습-사후 학습 파이프라인에 걸친 추론을 연구한다. 우리는 인간 체스 기보로 5M에서 1B 파라미터까지 언어 모델을 사전 학습하고, 합성 추론 과정에 대해 지도식 미세 조정(SFT)을 수행하며, 검증 가능한 보상이 있는 체스 퍼즐로 RL을 실행하는 표준 LLM 학습 파이프라인을 따른다. 이 프레임워크를 사용하여 우리는 사전 학습과 RL을 연결하는 스케일링 법칙을 확립한다. 주어진 RL 컴퓨팅 수준에서 RL 후 성능은 사전 학습 손실로부터 잘 예측되며, RL 보상 곡선의 기울기는 사전 학습 토큰에 따라 대략 선형적으로 개선된다. 스케일링 외에도, RL이 단순히 SFT 정책을 날카롭게 하는 것이 아님을 발견한다. 쉬운 퍼즐에서는 SFT 정책이 이미 선호하던 올바른 수를 증폭시키는 반면, 어려운 퍼즐에서는 SFT 하에서 거의 나타나지 않던 올바른 수를 표면화한다. 우리는 체스 외 분야에서도 이 발견을 검증하기 위해 수학 영역에서 1B 언어 모델을 학습시켰으며, 동일한 예측 패턴이 나타났다. 더 오래 사전 학습된 체크포인트가 더 높은 RL 후 성능에 도달하고 RL 하에서 더 빠르게 개선된다. 요약하자면, 우리는 사전 학습-RL 인터페이스에 대한 정량적 설명과 전체 사전 학습-사후 학습 파이프라인에 걸친 추론 과학을 연구하기 위한 통제된 테스트베드를 제공한다.
One-sentence Summary
Researchers from New York University, Modal Labs, et al. use chess as a controlled testbed to study the pretraining-to-RL pipeline, establishing a scaling law where post-RL performance is predicted by pretraining loss and RL reward slopes improve linearly with pretraining tokens, and revealing that RL amplifies correct moves on easy puzzles while surfacing novel correct moves on hard ones, with findings extending to math.
Key Contributions
- A controlled chess testbed replicates the full LLM pipeline from pretraining through RL post-training, enabling systematic variation of pretraining choices and RL compute.
- A joint scaling law shows that post-RL performance level is well-predicted by pretraining loss, and the slope of RL reward improvement scales approximately linearly with pretraining data tokens.
- Mechanistic analysis reveals that RL amplifies correct moves already preferred by the SFT policy on easy puzzles, while on hard puzzles it surfaces correct moves that were nearly absent but sometimes reinforces incorrect ones, explaining why pass@1 gains do not consistently transfer to pass@16.
Introduction
The standard LLM training pipeline combines large-scale pretraining with post-training via reinforcement learning from verifiable rewards, but the optimal allocation of a fixed compute budget between these stages remains unclear. Prior work developed scaling laws for pretraining and for RL post-training separately, yet no quantitative characterization exists for how pretraining and RL interact, and competing views debate whether RL merely sharpens existing behaviors or composes new skills. The authors address these gaps by constructing a controlled chess testbed that mirrors the LLM training pipeline, enabling systematic sweeps over pretraining and RL compute. They derive a joint scaling law showing that pretraining loss predicts post-RL performance and that the RL improvement slope grows with pretraining data scale, and they analyze how RL differentially reshapes the policy across easy and hard problems.
Dataset
The authors construct three chess datasets from Lichess, all mutually disjoint at the board‑position level to prevent contamination.
-
Pretraining corpus Source: Blitz and Rapid games played on Lichess during 2022. Scale: 54 B tokens. Usage: The scaling sweeps draws varying token budgets from this corpus to pretrain the base models.
-
Post‑training puzzle set Source: 156 K quality‑filtered Lichess puzzles. Structure: Puzzles are grouped into five difficulty bins (B1 – B5, easiest to hardest). Filtering: Quality‑filtered, though specific criteria are not detailed in the main text. Usage: Used for post‑training (supervised fine‑tuning) after pretraining.
-
Evaluation benchmark Source: 1 480 tactical puzzles drawn from the same source and difficulty bins. Curation: Balanced for theme diversity and solution length. Reporting: Because models rarely solve B5 puzzles, aggregate pass@k results are computed over B1 – B4; B5 is retained for difficulty‑stratified mechanism analysis.
The pretraining data is used for language modelling, the post‑training puzzles for instruction tuning with constructed reasoning traces, and the evaluation set for measuring puzzle‑solving accuracy across difficulty levels.
Method
The authors leverage chess as a controlled testbed to study reasoning capabilities, designing a training pipeline that mirrors the standard language model paradigm. The overall framework consists of three sequential stages: pretraining on human game data, supervised fine-tuning with synthetic reasoning traces, and reinforcement learning within a verifiable puzzle environment. As shown in the figure below, this pipeline systematically transitions the model from basic move prediction to complex multi-step planning.
Chess Representation and Pretraining To process chess games, the authors represent each game as an alternating sequence of player moves serialized into discrete tokens. Drawing on standard chess notations, each move is encoded using a four-token structure: ⟨piece⟩, ⟨source⟩, ⟨destination⟩, and ⟨flag⟩, where the flag token denotes special actions like castling or checkmate. This formulation yields a compact vocabulary of size ∣V∣=81. During the pretraining stage, an autoregressive policy is trained on a large-scale corpus of human game trajectories using the standard next-token prediction objective, allowing the model to learn the distribution of plausible move sequences.
Supervised Fine-Tuning with Synthetic Reasoning Traces In the post-training phase, the model is trained to solve chess puzzles by generating its own reasoning traces before committing to a final move. The puzzle environment is formulated as a multi-step interactive decision process. Given an initial board state s0 and a ground-truth solution line, the model acts solely as the solver. At each step t, the model observes the current state st and proposes a candidate move at. The environment verifies at against the ground truth. A mismatch immediately terminates the episode, while a correct move prompts the environment to append the opponent reply ot to the context, transitioning the state to st+1.
To elicit in-context reasoning without relying on external search algorithms, the authors construct synthetic reasoning traces. They sample K plausible game continuations from a pretrained proposal policy and merge them by their common prefixes into a tree structure rooted at s0. This tree is then serialized in depth-first order to form the reasoning trace r: r=⟨T⟩τ~1⟨sep⟩τ~2⟨sep⟩⋯τ~m⟨/T⟩ where τ~i represents the root-to-leaf paths and ⟨T⟩, ⟨/T⟩ are delimiting thinking tags. The model is subsequently trained on the concatenated sequence w=(r,τ⋆), where τ⋆ is the ground-truth solution continuation. During this training, the loss is masked for opponent-move tokens, ensuring the model is optimized only on the reasoning trace and its own moves.
Reinforcement Learning with Verifiable Rewards Building upon the supervised fine-tuned policy, the authors apply reinforcement learning to further optimize the model within the verifiable puzzle environment. They employ a strict binary outcome reward function: R(ζ,s0)=1[a1=a1⋆,…,aH=aH⋆] where ζ is the full trajectory comprising the reasoning trace and the executed move sequence, and (a1⋆,…,aH⋆) is the ground-truth solution line. The model receives a reward of 1 only if every executed move perfectly matches the ground truth, meaning a single error yields no reward. The policy is optimized using Group Relative Policy Optimization to refine its strategic planning and move selection capabilities.
Experiment
This study uses chess puzzles as a reasoning testbed to analyze how pretraining and reinforcement learning (RL) interact across model scales from 5M to 1B parameters. The key finding is a joint scaling law in which post-RL performance is predicted by pretraining loss, while the rate of improvement with RL compute depends on the number of pretraining tokens, leading to optimal compute allocations that shift toward RL as total budget grows. Mechanism analysis reveals that RL reshapes the move policy by amplifying correct modes and discovering some tail moves, but it also reinforces wrong modes on harder tasks, which limits pass@k gains; reasoning traces improve mainly through broader search rather than deeper planning. A qualitative transfer to math reasoning shows analogous patterns, suggesting that these scaling relationships extend beyond chess.