HyperAIHyperAI

Command Palette

Search for a command to run...

Comprendre le raisonnement du pré-entraînement au post-entraînement

Jingyan Shen Ang Li Salman Rahman Yifan Sun Micah Goldblum Matus Telgarsky Pavel Izmailov

Résumé

L'apprentissage par renforcement (RL) est devenu central pour améliorer les grands modèles de langage (LLMs) sur des tâches de raisonnement complexes, mais le post-entraînement par RL est largement étudié indépendamment du pré-entraînement qui le précède. Ainsi, deux questions fondamentales restent ouvertes : (1) comment les choix de pré-entraînement (taille du modèle, données) influencent-ils les retours du calcul RL, et (2) que fait réellement le RL au modèle ? Ces questions sont difficiles à étudier dans le cadre standard des LLMs : les corpus de pré-entraînement sont vastes et non contrôlés, rendant difficile l'attribution des comportements au pré-entraînement ou au RL, et des balayages systématiques de calcul à travers les deux étapes sont prohibitifs. Pour relever ces défis, nous utilisons les échecs comme banc d'essai contrôlé pour étudier le raisonnement tout au long du pipeline complet pré-entraînement à post-entraînement. Nous suivons le pipeline d'entraînement standard des LLMs en pré-entraînant des modèles de langage de 5M à 1B paramètres sur des parties d'échecs humaines, en effectuant un ajustement fin supervisé sur des traces de raisonnement synthétiques, et en exécutant du RL sur des puzzles d'échecs avec des récompenses vérifiables. Grâce à ce cadre, nous établissons une loi d'échelle reliant le pré-entraînement et le RL : la performance post-RL à un niveau de calcul RL donné est bien prédite par la perte de pré-entraînement, et la pente des courbes de récompense RL s'améliore approximativement linéairement avec les jetons de pré-entraînement. Au-delà de la mise à l'échelle, nous constatons que le RL ne se contente pas d'affiner la politique SFT : sur les puzzles faciles, il amplifie les coups corrects que la politique SFT préférait déjà, tandis que sur les puzzles difficiles, il fait émerger des coups corrects qui étaient presque absents sous SFT. Nous testons également nos résultats au-delà des échecs en entraînant un modèle de langage de 1B sur le domaine mathématique, où le même schéma prédictif émerge : les points de contrôle pré-entraînés plus longtemps atteignent des performances post-RL plus élevées et s'améliorent plus rapidement sous RL. En résumé, nous fournissons un compte rendu quantitatif de l'interface pré-entraînement-RL et un banc d'essai contrôlé pour étudier la science du raisonnement à travers le pipeline complet pré-entraînement à post-entraînement.

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\langle piece \ranglepiece, source\langle source \ranglesource, destination\langle destination \rangledestination, and flag\langle flag \rangleflag, where the flag token denotes special actions like castling or checkmate. This formulation yields a compact vocabulary of size V=81|V|=81V=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 s0s_0s0 and a ground-truth solution line, the model acts solely as the solver. At each step ttt, the model observes the current state sts_tst and proposes a candidate move ata_tat. The environment verifies ata_tat against the ground truth. A mismatch immediately terminates the episode, while a correct move prompts the environment to append the opponent reply oto_tot to the context, transitioning the state to st+1s_{t+1}st+1.

To elicit in-context reasoning without relying on external search algorithms, the authors construct synthetic reasoning traces. They sample KKK plausible game continuations from a pretrained proposal policy and merge them by their common prefixes into a tree structure rooted at s0s_0s0. This tree is then serialized in depth-first order to form the reasoning trace rrr: r=Tτ~1sepτ~2sepτ~m/Tr = \langle T \rangle \tilde{\tau}_1 \langle sep \rangle \tilde{\tau}_2 \langle sep \rangle \cdots \tilde{\tau}_m \langle /T \rangler=Tτ~1sepτ~2sepτ~m/T where τ~i\tilde{\tau}_iτ~i represents the root-to-leaf paths and T\langle T \rangleT, /T\langle /T \rangle/T are delimiting thinking tags. The model is subsequently trained on the concatenated sequence w=(r,τ)w = (r, \tau^\star)w=(r,τ), where τ\tau^\starτ 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]R(\zeta, s_0) = \mathbf{1}[a_1 = a_1^\star, \ldots, a_H = a_H^\star]R(ζ,s0)=1[a1=a1,,aH=aH] where ζ\zetaζ is the full trajectory comprising the reasoning trace and the executed move sequence, and (a1,,aH)(a_1^\star, \ldots, a_H^\star)(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.


Créer de l'IA avec l'IA

De l'idée au lancement — accélérez votre développement IA avec le co-codage IA gratuit, un environnement prêt à l'emploi et le meilleur prix pour les GPU.

Codage assisté par IA
GPU prêts à l’emploi
Tarifs les plus avantageux

HyperAI Newsletters

Abonnez-vous à nos dernières mises à jour
Nous vous enverrons les dernières mises à jour de la semaine dans votre boîte de réception à neuf heures chaque lundi matin
Propulsé par MailChimp