TAI BUI
Back to curriculum
LearnPython

STaR, V-STaR, Quiet-STaR — Self-Taught Reasoning

The smallest possible self-improvement loop sits inside the rationale. A model generates a chain of thought, keeps the ones that land on correct answers, and fine-tunes on those. That is STaR. V-STaR adds a verifier so inference-time selection is better. Quiet-STaR pushes the rationale down to every token. All three improve benchmark scores, but none of them are magic: the loop preserves any shortcut that happened to reach the right answer.

TIME: ~60 minutesPREREQUISITES: Phase 13 · 01-03 (Reasoning and CoT), Phase 15 · 01 (long-horizon framing)

Learning Objectives

  • Describe the STaR loop, including rationalization, and say what it keeps and what it discards.
  • Explain how V-STaR adds a DPO verifier for best-of-N selection and how Quiet-STaR moves rationales to every token position.
  • Explain why an answer-conditioned gradient can reinforce shortcut rationales that generalize badly.
  • Run the simulator and read the in-distribution versus OOD gap and the V-STaR best-of-N results.
  • Name the process-supervised and OOD-evaluation checks you would add when auditing a self-training pipeline.

The Problem

The straightforward way to teach a model to reason is to collect human-written reasoning traces. That is expensive, slow, and bounded by how much high-quality chain-of-thought humans are willing to write.

STaR (Self-Taught Reasoner, Zelikman et al., 2022) asks: what if the model writes its own rationales and grades them against known answers? The loop is:

  1. Sample a reasoning trace plus answer.
  2. If the final answer is correct, keep the trace.
  3. Fine-tune on the kept traces.
  4. Repeat.

It works. GSM8K and CommonsenseQA both improved without new human annotation. But the loop has a built-in bias: any rationale that produced the right answer is retained, regardless of whether the reasoning itself was sound. V-STaR (Hosseini et al., 2024) patches this with a learned verifier; Quiet-STaR (Zelikman et al., 2024) generalizes the idea to per-token internal rationales.

Warm-up0/3
1. What does chain-of-thought prompting do?Warm-up
A short typed word problem about apples is fed into a language model. The model's output box is left blank with a question mark.
Illustrative prompt, typed by hand. The output is deliberately left open.
2. A model writes a reasoning chain and lands on the correct final answer. What does that tell you about the chain?Warm-up
A question feeds three unspecified reasoning steps that end in the answer 18. The label is also 18, and a box below is left blank with a question mark.
Illustrative values, typed. The content of the steps is not shown.
3. Why do practitioners evaluate a model on held-out data instead of on the data it was trained on?Warm-up
A fine-tuned model is scored twice, once on its training data and once on a held-out set it never saw. Both accuracy results are blank question marks.
Schematic, typed.
Check: The Problem0/1
1. What is STaR's basic training loop?Define
A base model, a table of training problems each with a known label, and a blank box for the training procedure.
Placeholders, typed. Only the starting ingredients are shown.

The Concept

STaR: bootstrap on what worked

Start from a base model with some weak reasoning ability. On each training problem, sample a rationale plus answer. If the answer matches the label, keep the (problem, rationale, answer) triple. Fine-tune the model on the kept set. Repeat.

One twist matters. If the model can never get a problem right, the loop cannot learn on it. STaR adds rationalization: for problems the model fails, inject the correct answer as a hint and re-prompt the model to produce a rationale that leads to it. Rationalized rationales are added to the training set.

Result in the original paper (Zelikman et al., 2022): a GPT-J base model improved on GSM8K from 5.8% to 10.7% through repeated STaR rounds with rationalization, about 5 percentage points absolute. On CommonsenseQA, STaR-trained GPT-J 6B reached 72.5%, comparable to a fine-tuned GPT-3 175B (~73%), a roughly 30x larger model trained on hand-annotated rationales.

V-STaR: train a verifier with DPO

STaR throws away incorrect rationales. Hosseini et al. (2024) observed those are also data: every pair of (rationale, "is this correct") can train a verifier. They use Direct Preference Optimization over both correct and incorrect solutions to build a ranker. At inference time, sample N rationales and pick the verifier's top choice.

Reported delta: +4 to +17 percentage points over prior self-improvement baselines on GSM8K and MATH, with most of the gain coming from using the verifier for inference-time selection rather than for additional generator fine-tuning.

Quiet-STaR: per-token internal rationales

Zelikman et al. (2024) asked: what if the model learns to generate a short internal rationale at every token position, not just between problem and answer? Quiet-STaR trains a model to emit a hidden "thought" before each predicted token, then mixes the thought-aware prediction with the baseline prediction via a learned weight.

Result: Mistral 7B gained absolute zero-shot improvements on GSM8K from 5.9% to 10.9% and CommonsenseQA from 36.3% to 47.2% without task-specific fine-tuning. The model learned "when to think": hard tokens get longer internal rationales; easy ones get almost none.

Why all three share a safety concern

All three methods use the final answer as the gradient signal. A rationale that reaches the right answer via flawed reasoning (exploiting a shortcut, guessing, or using a non-generalizing pattern) gets positively reinforced. On in-distribution problems the shortcut works. On out-of-distribution problems it breaks silently.

V-STaR's verifier mitigates by learning to rank rationales, but the verifier is trained on the same label set. It can learn to prefer well-formatted wrong reasoning over honest uncertainty. The safer design is to combine STaR-style data with (a) process-supervised reward models (rewarding intermediate steps, not just answers) and (b) held-out OOD evaluation that breaks simple shortcuts.

Comparison

MethodTraining signalInference costData wasteKnown failure mode
STaRkeep (rationale, answer) if correct1xdiscards all incorrect rationalesshortcut rationales
STaR + rationalizationabove + correct-answer hinted retries1xlessrationalized rationales may be implausible
V-STaRSTaR + DPO verifier from both classesNx (best-of-N)minimalverifier can reinforce confident wrongness
Quiet-STaRper-token rationale + mixing weight1.5-3xminimalstill answer-conditioned gradient

Where this sits in the 2026 stack

STaR is old. But the pattern reappears everywhere in 2025-2026. RL on verifiable math problems (DeepSeek-R1, Kimi-k1.5, o1) is STaR's answer-conditioned gradient signal, scaled up. Process reward models (Lightman et al., 2023; OpenAI's "Let's verify step by step") are the process-supervised alternative. AlphaEvolve (Lesson 3) is STaR for code, with a program evaluator instead of a label. Darwin Godel Machine (Lesson 4) is STaR for the agent scaffolding itself.

Understanding STaR makes all of these click. It is the minimum-viable self-improvement loop.

Check: The Concept0/24
1. In STaR, what is rationalization?Define
A card for one problem shows label 18, a sampled rationale that ends in 14, and no match. A blank box asks what rationalization does with it.
Illustrative numbers, typed.
2. What does V-STaR add to the STaR loop?Define
Problems with labels feed a box named STaR loop, which produces a trained model. A dashed box below the loop is labelled V-STaR adds and left as a question mark.
Schematic, typed.
3. What is distinctive about Quiet-STaR compared to STaR and V-STaR?Define
Top row: problem, rationale, answer in sequence for STaR and V-STaR. Bottom row: six tokens in a line, with a blank box asking where Quiet-STaR puts its rationale.
Schematic, typed.
4. What is an answer-conditioned gradient?Define
A reasoning trace of three steps ending in an answer. A dashed bracket under the whole trace links to a blank box that asks what the training signal is computed from.
Schematic, typed.
5. What is a process reward model?Define
A reasoning trace of three steps and an answer, bracketed as a whole, feeds a box named process reward model. Two blank boxes below ask what it is trained on and what it scores.
Schematic, typed.
6. What is a shortcut rationale?Define
A card showing the fields of the Trace record in the lesson's simulator: strategy (sound, shortcut or random), answer_correct and rationale_sound. A blank box asks what a shortcut rationale is.
Field names from main.py. No rates are shown.
7. Why did STaR introduce rationalization?Explain
Problems with labels feed a box named STaR loop, which produces a trained model. A dashed box below the loop asks why rationalization is added.
Schematic, typed.
8. In one round of the base STaR loop, without rationalization, what happens to a sampled rationale whose final answer is wrong?Explain
A table of six sampled rationales with their answers, the label 18, and whether they match. Rationales B, D and F do not match. A blank box asks what happens to the non-matching rows.
Illustrative answers, typed. Base STaR without rationalization.
9. Where does most of V-STaR's reported +4 to +17 point gain come from?Explain
A number line from 0 to 20 with a bar spanning +4 to +17 points, labelled as V-STaR's reported gain over prior self-improvement baselines on GSM8K and MATH. A blank box asks which part of the pipeline produces most of it.
Range as reported in the V-STaR subsection of The Concept.
10. Why does V-STaR keep the incorrect rationales that STaR throws away?Explain
A red box lists three rationales whose answers do not match the label. A dashed arrow leads to a blank box asking why V-STaR keeps them.
Schematic, typed.
11. What does Quiet-STaR's learned behavior of 'when to think' look like in practice?Explain
A row of eight tokens t1 to t8. A dashed bracket spans all of them and links to a blank box asking about thought length by position.
Schematic, typed.
12. Why do all three STaR-family methods share the same safety concern?Explain
Three cards for STaR, V-STaR and Quiet-STaR, each noting self-generated rationales, and a blank box below them asking for the safety concern they share.
Schematic, typed.
13. Why doesn't V-STaR's verifier fully solve the shortcut-rationale problem?Explain
A problem goes to a generator that writes rationales, then to a verifier, which outputs a chosen rationale. A blank box below the verifier asks where it falls short.
Schematic, typed.
14. What safer, process-supervised alternative to STaR's answer-conditioned gradient does The Concept name?Explain
A rationale leads to a final answer, which leads to a weight update. Below, a blank box asks for a safer, process-supervised alternative.
Schematic, typed.
15. How does The Concept connect STaR to 2025-2026 systems like DeepSeek-R1, AlphaEvolve, and Darwin Godel Machine?Explain
A STaR box on the left is linked by dashed lines to DeepSeek-R1, AlphaEvolve and Darwin Godel Machine. Each system has a blank box labelled link with a question mark.
Schematic, typed. Lesson numbers as given in the lesson text.
16. How do STaR, V-STaR, and Quiet-STaR differ in inference cost and data waste?Explain
A three-row comparison table for STaR, V-STaR and Quiet-STaR with columns for inference cost and data waste. Every value cell is a question mark.
Layout follows the comparison table in the lesson.
17. What did the CommonsenseQA result show about STaR-trained GPT-J 6B?Apply
Two models compared on CommonsenseQA. STaR-trained GPT-J has 6B parameters and 72.5% accuracy. Fine-tuned GPT-3 has 175B parameters and a blank accuracy bar. Accuracy tracks span a 0 to 100% scale.
Sizes and the GPT-J accuracy from the STaR subsection of The Concept.
18. GPT-J's GSM8K accuracy moved from 5.8% to 10.7% under repeated STaR rounds with rationalization. How large was that gain?Apply
A number line from 0 to 20 percent with a grey dot at 5.8% labelled before and an orange dot at 10.7% labelled after. A blank box asks for the absolute gain.
Values from the stem and the STaR subsection of The Concept.
19. Quiet-STaR took Mistral 7B from 36.3% to 47.2% on CommonsenseQA. What was the absolute gain and how was it obtained?Apply
A number line from 0 to 60 percent with a grey dot at 36.3% labelled before and an orange dot at 47.2% labelled after. Two blank boxes ask for the absolute gain and how it was obtained.
Values from the stem and the Quiet-STaR subsection of The Concept.
20. A V-STaR system samples N=8 rationales per problem at inference time. Relative to plain STaR at 1x, what cost does the comparison table imply?Apply
Top: plain STaR with one trace per problem at cost 1x. Bottom: V-STaR with eight samples s1 to s8 feeding a verifier that picks one, and a blank cost box.
Schematic, typed. The 1x baseline comes from the stem.
21. You run a STaR loop on arithmetic word problems. In-distribution accuracy reaches 93%, but on problems with a different surface format it drops to 60%. What is the most likely cause and the best next step?Analyze
Two horizontal bars from a STaR run on arithmetic word problems: 93% in-distribution and 60% on problems with a different surface format. Two blank boxes ask for the cause and the next step.
Figures from the stem.
22. A STaR run with hinted retries improves on problems the model used to fail, but spot checks find many of those rationales read like backward justifications of the given answer. Which known failure mode is this?Analyze
A flow: a problem the model fails, a prompt that includes the correct answer as a hint, a rationale that ends at the hinted answer. A blank box asks which failure mode a backward-reading rationale is.
Schematic, typed.
23. You are auditing a proposed pipeline that fine-tunes on model-written traces whose answers match the labels. Which pair of additions best targets its main risk?Design
A four-box pipeline: problems with labels, the model writes traces, a filter that keeps traces where the answer equals the label, and fine-tuning on the kept traces. Two blank boxes below a bracket over the whole pipeline ask for two additions.
Schematic, typed.
24. A deployment must answer at 1x inference cost, and the base model fails many training problems outright. Which design fits best?Design
Two constraint chips: an inference cost budget of 1x, and a base model that fails many training problems. A blank box asks which design fits both constraints.
Constraints from the stem.

Use It

code/main.py runs a simulated STaR loop on a toy arithmetic task. You can watch:

  • How accuracy climbs over bootstrap rounds.
  • How shortcuts sneak in: the simulator includes a "lazy" rationale class that gets the right answer 40% of the time but generalizes badly. Watch how large a share of the kept traces they make up from round to round.
  • How a verifier (V-STaR style) helps at inference but cannot fully prune shortcuts introduced during training.
Check: Use It0/5
1. In the Use It simulator, what is the 'lazy' rationale class designed to show?Explain
A table of three classes in the Use It simulator with their in-distribution answer accuracy. Sound is 100%, random guess 10%, and the lazy row is a question mark. A blank box asks what the lazy class shows.
Sound and random values from main.py.
2. In the simulator a sound trace is always correct in-distribution and a shortcut trace is correct 40% of the time. Given 100 of each, about what share of the kept traces are shortcuts?Apply
Two 10 by 10 grids of dots, one for 100 sound traces that are always correct in-distribution and one for 100 shortcut traces that are correct 40% of the time. A blank box asks for the shortcut share of the kept traces.
Counts and hit rates from the stem.
3. You run Scenario A (no shortcut tendency) and Scenario B (shortcut probability 0.4) side by side. Which column shows the clearest difference?Apply
Two cards for the lesson's simulator runs. Scenario A starts with prob_sound 0.20 and prob_shortcut 0.0. Scenario B starts with prob_sound 0.20 and prob_shortcut 0.40. A blank box asks which column differs most clearly.
Settings from main.py. Both runs report a table over 5 bootstrap rounds.
4. A reader runs the simulator expecting shortcut traces to take over the kept set, but their share shrinks over the rounds. What explains this?Analyze
A line chart of p(shortcut) for Scenario B over rounds 0 to 5: 0.400, 0.385, 0.304, 0.224, 0.152, 0.103. A blank box asks why it shrinks.
Values from one run of main.py (seed 42).
5. In the V-STaR block of the simulator, best-of-N reaches 100% at n=4 and n=16 on both sets. Why is that weak evidence that a real verifier would do as well?Analyze
Grouped bars for the simulator's V-STaR block: n=1 at 92.4% in-distribution and 90.2% out of distribution, and n=4 and n=16 both at 100% on both sets. A blank box asks why that is weak evidence for a real verifier.
Values from one run of main.py (seed 42).

Ship It

outputs/skill-star-loop-reviewer.md helps you audit a proposed self-taught-reasoning pipeline before you train on it.

Author's Note

I'd run main.py and read the Scenario A and Scenario B tables side by side before anything else. A starts with no shortcut tendency, B starts with a shortcut probability of 0.4, and the OOD column is where they differ.

Before you go hunting for the failure, know that in this simulator the shortcut share shrinks over the rounds instead of growing. A sound trace is always correct and a shortcut trace is correct 40% of the time in-distribution, so the keep filter favors sound traces. What the shortcut buys is a head start on in-distribution accuracy and an OOD gap (its OOD hit rate is 5%) that narrows but is still there at round 5. That is weaker than the headline the script prints at the bottom. To see a shortcut win you would have to give sound traces a hit rate below the shortcut's, which means editing Model.sample.

I'd also not read much into the V-STaR block. In my run it reaches 100% at n=4 and n=16 on both sets, but the verifier reads the ground-truth rationale_sound flag, which its docstring calls an upper bound. A real verifier has to infer soundness from the trace itself, and that is the case the body worries about.

Exercises

  1. Run the simulator. Set the shortcut frequency to zero, then to 0.4. How much does final accuracy diverge between the two runs, even though both hit >90% on the training distribution?

  2. Add a held-out OOD test to the simulator. Draw problems from a different distribution and evaluate the bootstrapped model on both in-distribution and OOD sets. Quantify the gap.

  3. Read the Quiet-STaR paper (arXiv:2403.09629) Section 3. Explain the "end-of-thought" token and the mixing-weight head in three sentences each.

  4. Compare STaR's keep-if-correct filter to a process-supervised alternative that rewards each rationale step independently. Identify the labelling cost difference and the plausible quality difference.

  5. Design one evaluation that would catch shortcut rationales in a deployed model. It does not have to be perfect, it has to break the simplest shortcuts a STaR loop would reinforce.

Key Terms

TermWhat people sayWhat it actually means
STaR"Self-Taught Reasoner"Fine-tune on model-generated rationales that land correct answers; repeat
Rationalization"Hinted retry"Inject the correct answer and re-prompt for a rationale on problems the base model fails
V-STaR"Verifier STaR"DPO-train a verifier on both correct and incorrect rationales, use it for inference-time selection
Quiet-STaR"Per-token rationales"Generate hidden thoughts at every token position; mix with baseline prediction
Answer-conditioned gradient"Outcome-based signal"The training loop rewards final answers, not reasoning steps
Process reward model"Step-level verifier"Reward model trained on per-step correctness, not outcome. Contrasts with STaR
Shortcut rationale"Right answer, wrong reasoning"A rationale that reaches the label via a non-generalizing pattern; STaR keeps these

Further Reading

Code

Ships With