Cold Starts, Rejection Sampling, and Distillation › Rejection sampling with verifiers
Language AI HandbookAll chapters In a verifier-filtered training pipeline, sample responses to a prompt, keep the ones that pass and fit the surviving examples. The proposal policy can be a base model or a later checkpoint. DeepSeek-R1 applied this step after cold-start supervision and reasoning-oriented RL.
The procedure is simple.
- For each prompt in a problem set, sample traces from the current policy . Choose the budget based on generation and verification cost and the observed yield of usable examples.
- Apply a binary gate . An exact checker can return pass or fail directly, for example by comparing the boxed answer with the reference. For a real-valued outcome score, use a binary decision rule, such as accepting scores above a threshold. Step scores need an aggregation or acceptance rule, such as requiring every scored step to pass.
- Keep all accepted traces and discard the rest.
- Fine-tune the policy (or a student) on the surviving traces with standard cross-entropy.
The math is worth writing down because it clarifies what the resulting dataset is and is not. The sampling distribution over accepted traces is
The denominator is the acceptance probability for that prompt and must be positive. If judgment is stochastic, replace the indicator in both places by . A deterministic gate recovers conditioning on correctness if it accepts exactly the correct traces on the proposal support and correct traces have positive mass. A verifier error changes which targets survive and can affect the model fitted to them.
The formula has a direct visual consequence: a small false-positive rate is not harmless when the base policy is already much more likely to produce wrong traces than correct ones.
PythonIn [4]Expand
import numpy as np
epsilon_fp = np.linspace(0.001, 0.5, 101)
epsilon_fn = 0.05
base_odds = [0.1, 1.0, 10.0]
bias_curves = [
(odds, odds * epsilon_fp / (1.0 - epsilon_fn)) for odds in base_odds
]VisualizationOut [5]Expand

Suppose prompts occur with mass , each receives candidates, and each candidate has pass probability at that prompt. Under a keep-all rule, expected accepted counts are proportional to . These also give the weights in the accepted-row population after pooling across batches. With equal budgets the factor cancels. A realized finite pool uses its actual accepted counts, which can give different weights. A per-prompt cap can also change the weights. Report how many prompts are covered as well as how many rows survive.
DeepSeek-R1 collected about 600,000 reasoning examples by filtering outputs of the reasoning-RL checkpoint. A subset used DeepSeek-V3 to judge the generated answer against the reference. About 200,000 non-reasoning examples came from the DeepSeek-V3 pipeline, which reused some of its existing supervised data. The large model used the combined set for supervised fine-tuning before another RL stage. The smaller models reused that same set. DeepSeek-R1 report, §§2.3.3–2.4
The large-model supervised stage and the smaller-model distillation stage can use the same examples. Their training purposes differ: one is an intermediate stage for the large model, while the other supplies targets to the smaller models. This reuse is distinct from sampling another independent dataset.
In on-policy RL, the current policy generates rollouts, and a verifier can supply part of their reward. The optimizer uses that reward to estimate a policy-gradient update. In verifier-filtered supervised training, a proposal model generates the examples, a verifier determines which examples enter the dataset, and a model fits those fixed targets with cross-entropy. The proposal model and the model being fit can be different.
- Fixed-target cross-entropy does not estimate a policy-gradient reward on fresh rollouts for each fitting step. Generation, scoring, and fitting all contribute to cost.
- Rejection sampling is bounded by the quality of the filter, because whatever gets past it becomes a target.
- On-policy sampling can discover rare traces with positive probability that did not appear in an earlier finite batch. A trace with exactly zero proposal probability cannot appear in a draw from that policy. Access requires a proposal or exploration change that gives the trace mass, or an outside source of examples.
DeepSeek-R1 is a documented example of combining cold-start supervision, reasoning RL, verifier-filtered supervised training, and a further RL stage. The stage order reflects what its designers chose to measure and train on.
Filtering can only retain responses present in the proposal pool. Drawing more candidates may reveal a low-probability strategy. If the current sampler excludes that strategy, a different teacher or a change to the proposal distribution is needed to add it directly to the dataset.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!