Skip to content

STaR: Bootstrapping Reasoning With Reasoning

optionalcorefundamentalpaperrubric 11/122022 · ~35 min

Eric Zelikman, Yuhuai Wu, Jesse Mu, Noah D. Goodman

Status

TL;DR. STaR (Self-Taught Reasoner) bootstraps reasoning from a large question–answer dataset plus a small set of few-shot rationale demonstrations. The model writes a rationale and answer for every question, and the ones that reach the correct answer are kept. For failures, it writes a rationale with the correct answer given as a hint (rationalization). The original model is fine-tuned on everything kept, and the loop repeats. On CommonsenseQA a 6B model trained this way matched a GPT-3 model 30× larger that was fine-tuned to output answers only.

Why it matters now. STaR is the bridge from supervised fine-tuning to RL for reasoning. The same “sample, check, keep the good ones, train” loop appears as rejection-sampling fine-tuning, expert iteration, and the SFT-data step in DeepSeek-R1. It is also how many reasoning rerankers and query generators in IR are bootstrapped from qrels alone. Understanding what STaR does not do (it never pushes wrong answers down) explains why later methods moved to policy gradients with negative advantages.

The outer loop is Algorithm 1 in the paper:

  1. Prompt the current model with about 10 worked examples (question, rationale, answer).
  2. Generate a rationale r^\hat r and answer y^\hat y for every training question xx.
  3. Keep (x,r^,y)(x,\hat r,y) if y^=y\hat y=y.
  4. For the rest, show the correct answer as a hint and generate again. If the new rationale reaches yy, keep it, but store it without the hint.
  5. Fine-tune the original pretrained model MM on everything kept. Training starts at 40 steps and grows 20% per outer loop. Repeat from step 2 with the new model.
The STaR loop: generate rationales, keep the correct ones, rationalize failures with a hint, fine-tune, repeat A few-shot prompt of about ten worked rationales goes to the current model, which generates a rationale and an answer for every training question. If the answer matches the label, the example is kept. If not, the model is shown the correct answer as a hint and asked for a rationale; if that rationale reaches the answer it is kept, with the hint removed. The original pretrained model is then fine-tuned on all kept examples to give the next model, and the loop repeats with 20 percent more training steps each time. A side panel gives the RL reading: the objective is the expected number of correct answers, and its gradient weights each sample's log-likelihood by an indicator of correctness, so wrong samples get weight zero rather than a negative weight, and rationalization acts as an off-policy proposal. STaR: an outer loop of filtered self-training few-shot prompt~10 rationales generate r̂, ŷwith model Mₙ₋₁ ŷ = y ? keep (x, r̂, y)78.2% of CQA yes no rationalizehint: answer is ycorrect? keep keep (x, r, y)hint removed+8.5% on CQA fine-tune the original M on all keptgives Mₙ; not trained from Mₙ₋₁ repeat; +20% steps per loop RL view (§3.1) J = Σᵢ E[1(ŷᵢ = yᵢ)] ∇J = Σᵢ E[1(ŷᵢ = yᵢ) · ∇log p(ŷᵢ, r̂ᵢ | xᵢ)] the filter is a 0/1 reward: wrong samples get weight 0, never negative rationalization samples from p(r | x, y): an off-policy proposal, not the policy
Original sketch. STaR keeps only rationales that reach the labelled answer, adds rationalized ones for failures, and retrains the original model each round. The side panel gives the paper's RL reading.

The RL reading (§3.1). Treat the model as a policy that outputs a rationale and an answer, with reward 1 if the answer is right and 0 otherwise. The objective and its policy gradient are

J(M)=∑iEr^i,y^i∼pM(⋅∣xi)[1(y^i=yi)],∇J=∑iE[1(y^i=yi) ∇log⁡pM(y^i,r^i∣xi)].J(M)=\sum_i \mathbb E_{\hat r_i,\hat y_i\sim p_M(\cdot\mid x_i)}\big[\mathbb 1(\hat y_i=y_i)\big],\qquad \nabla J=\sum_i \mathbb E\big[\mathbb 1(\hat y_i=y_i)\,\nabla\log p_M(\hat y_i,\hat r_i\mid x_i)\big].

The indicator is the filter: fine-tuning with ordinary log-likelihood on only the correct samples is a Monte Carlo estimate of this gradient. Two practical choices move it away from a clean policy gradient. STaR decodes greedily instead of sampling, which lowers variance but only reinforces the model’s most likely answer. It also takes many gradient steps on one batch with no ratio correction. Rationalized samples come from p(r∣x,y)p(r\mid x,y), a different distribution from the policy, so the paper frames them as off-policy proposals.

Running example. Take one question sampled G=4G=4 times with rewards [1,0,0,0][1,0,0,0]. STaR gives the four samples gradient weights [1,0,0,0][1,0,0,0]: the correct rationale is imitated and the three wrong ones are ignored. GRPO gives about [+1.73,−0.58,−0.58,−0.58][+1.73,-0.58,-0.58,-0.58], so the wrong ones are actively made less likely. That difference, imitating successes versus also pushing down failures, is the main step from STaR-style self-training to online RL.

  • Arithmetic (§4.3, GPT-J 6B). After 16 iterations STaR reached 89.5% on n-digit addition. A model trained on 10K examples without rationales reached 76.3%. With rationalization, one iteration took 2-digit addition from under 1% to 32%.
  • CommonsenseQA dev (Table 1). Few-shot direct GPT-J 20.9; few-shot chain-of-thought 36.6; GPT-J fine-tuned on answers 60.0. STaR without rationalization reached 68.8 using 69.7% of the training set. STaR with rationalization reached 72.5, using 78.2% from generation plus 8.5% from rationalization. GPT-3 fine-tuned on answers scored 73.0.
  • GSM8K (Table 2). STaR reached 10.7 versus 5.8 for direct fine-tuning and 3.1 for few-shot chain-of-thought. Rationalization added little here (10.1 without it).
  • Rationale quality (§4.4). In a small crowdworker study, raters were 30% more likely to rank STaR rationales above few-shot ones (p = .039).
  • Higher temperature is not a substitute (§5). Sampling at higher temperature to get more correct answers mostly produced correct answers reached by wrong reasoning.
  • The first iteration needs above-chance few-shot accuracy. The paper reports that GPT-2 could not bootstrap even on arithmetic.
  • On tasks with high chance accuracy (5-way multiple choice, binary decisions), many kept rationales are flawed but happen to land on the right answer. The paper leaves filtering bad reasoning as an open problem.
  • Hinted rationales can be post-hoc justifications. Whether they are faithful to the model’s actual decision is not tested (see CoT faithfulness).
  • Without negative weights, the model is never told which reasoning patterns fail. GRPO-style methods address this.

Questions to think through

These questions have no single right answer. Write or say your answer before you open the hints. Mark a question once you could defend your answer in a reading group.

  1. Derive / compute

    Write the STaR filter as a policy gradient with reward 1(ŷ = y). For the running example (G = 4 samples of one question, rewards [1, 0, 0, 0]), give the weight each sample's ∇log p receives under STaR and under GRPO. Is STaR's update an unbiased estimate of ∇J, and which of the paper's two approximations break that?

    What a strong answer covers
    • J = Σᵢ E[1(ŷᵢ = yᵢ)], so ∇J = Σᵢ E[1(ŷᵢ = yᵢ)·∇log p(ŷᵢ, r̂ᵢ | xᵢ)]. Fine-tuning on only the correct samples estimates exactly this sum.
    • STaR weights: [1, 0, 0, 0]. GRPO weights: about [+1.73, −0.58, −0.58, −0.58]. STaR never pushes wrong samples down.
    • With no baseline the estimator is unbiased but has higher variance; an action-independent baseline preserves unbiasedness and lowers variance; an inclusive sample mean (GRPO's group mean) requires the G/(G−1) correction before any std normalization.
    • Approximations: greedy decoding instead of sampling (biased: it only reinforces the mode), and several gradient steps on the same batch (off-policy after the first step, with no ratio correction).
    • Rationalized examples come from p(r | x, y), not the policy, so they are off-policy as well.
  2. Mechanism

    Explain why rationalization, generating a rationale with the correct answer as a hint and then training on it without the hint, adds learning signal that plain filtering cannot. What could go wrong with rationales produced this way?

    What a strong answer covers
    • Plain filtering only trains on questions the model already solves, so the hardest questions never enter the data and accuracy plateaus.
    • With the hint, the model can often write a valid path to an answer it could not find unaided. Removing the hint at training time teaches it to produce that path from the question alone.
    • On CQA, rationalization added 8.5% of the training data and raised dev accuracy from 68.8 to 72.5; on arithmetic it lets many more problems be solved in early iterations.
    • Risk: a hinted rationale can work backward from the answer, giving post-hoc or unfaithful reasoning that only looks valid, especially on multiple-choice tasks.
    • In RL terms it is an off-policy proposal distribution with no importance weight, so the training distribution no longer matches what the model would generate.
  3. What if…

    Using Table 1 (CommonsenseQA dev, GPT-J 6B), say what each comparison isolates: few-shot direct (20.9) vs few-shot CoT (36.6); direct fine-tuning (60.0) vs STaR without rationalization (68.8); STaR with rationalization (72.5) vs GPT-3 direct fine-tuned (73.0). What is the main confound in the second comparison?

    What a strong answer covers
    • Few-shot direct vs CoT: the value of rationales at inference with no training, about +16 points.
    • Direct fine-tuning vs STaR: training on self-generated rationales instead of answers alone, +8.8. STaR also uses only 69.7% of the training set.
    • Confound: STaR's data and outer-loop schedule differ from direct fine-tuning, and including the few-shot prompts during training matters (60.9 → 68.8 without rationalization).
    • STaR with rationalization (6B) comes close to a 30× larger GPT-3 fine-tuned on answers, which suggests rationales are worth a lot of scale on this task.
  4. Critique

    The paper notes that settings with high chance accuracy yield many poor rationales. On 5-way multiple choice, estimate how often a rationale with flawed reasoning still passes the filter, and design an experiment that measures how many kept rationales are wrong for the right answer.

    What a strong answer covers
    • If the reasoning is uninformative and the model then guesses, it is right about 20% of the time on 5-way CQA (50% on binary tasks), so a meaningful share of kept rationales can be flawed.
    • The filter checks only the final answer, so it rewards "right for the wrong reason". The paper also found higher-temperature sampling made this worse.
    • Experiment: sample kept rationales per iteration, have experts (or a strong judge validated against experts) label reasoning validity, and track the flawed-but-correct rate over iterations.
    • Controls: compare against a counterfactual check (does the answer change if a key reasoning step is altered?) to test whether the rationale is actually used.
  5. Design

    You want a 7B reasoning reranker that writes a short justification before giving a relevance label, with only qrels as supervision. Design a STaR-style loop: what is the filter, what plays the role of the hint, and how do you guard against false negatives in the qrels?

    What a strong answer covers
    • Generate: for each (query, passage) pair, sample a justification and a label. Filter: keep it if the label matches the qrel.
    • Rationalization: give the qrel label as a hint for failed pairs, generate a justification, keep it without the hint if it reaches that label.
    • Binary relevance labels have 50% chance accuracy, so many justifications pass by luck; use graded labels, require agreement across several samples, or audit with a judge.
    • Unjudged or false-negative passages get label 0 and would teach the model to argue that relevant passages are irrelevant; restrict training to judged pairs or add a second-opinion filter.
    • Evaluate with nDCG@10 on held-out queries plus a human check of justification quality, and restart fine-tuning from the base model each iteration as STaR does.
  6. Connect

    Place STaR in the DeepSeekMath unified view (data source, reward, gradient coefficient). How does it differ from Online RFT and from GRPO, and why does STaR fine-tune the original model each round instead of continuing from the last one?

    What a strong answer covers
    • Data source: samples from the current model (plus hinted rationalizations). Reward: answer correctness. Gradient coefficient: 1 for correct, 0 for wrong.
    • Online RFT has the same coefficient, so STaR is close to Online RFT with outer loops. GRPO's coefficient is the normalized advantage, which is negative for wrong answers.
    • DeepSeekMath reports GRPO beating Online RFT, which it attributes to also penalizing wrong samples.
    • STaR retrains from the original pretrained model each round to avoid overfitting to its own outputs; online RL methods instead continue from the current policy and use a KL or clip to limit drift.

Done with this page?

Status