Preprint
Machine Learning

Self-Taught Reasoner (STaR)

May 1, 2022

0

Citations

0

Influential Citations

Venue

2022

Year

Abstract

A bootstrapping method that iteratively improves a language model's reasoning abilities by generating rationales for a dataset, filtering for rationales that lead to correct answers, fine-tuning the model on these successful rationales, and repeating this process, optionally augmented by "rationalization" where the model generates rationales given the correct answer as a hint.

Analysis

Why This Paper Matters

Large language models (LLMs) excel at generating fluent text but often struggle with multi-step reasoning tasks like math or commonsense inference. Traditional approaches require expensive human-annotated rationales or rely on few-shot prompting, which can be brittle. The Self-Taught Reasoner (STaR) introduces a bootstrapping loop that lets a model teach itself to reason better by generating its own rationales, filtering for correctness, and fine-tuning on those successes. This matters because it reduces the need for labeled data and opens a path toward autonomous improvement in reasoning capabilities.

How It Works

Figure 1

STaR operates on a pretrained LLM (e.g., GPT-J) and a dataset of problems with answers but no rationales. It begins with a small set of few-shot examples that include intermediate reasoning steps (rationales). For each problem, the model generates a rationale and an answer. Only those rationales that lead to the correct answer are kept—these are assumed to be high-quality. The model is then fine-tuned on this filtered set of (problem, rationale, answer) triples. The process repeats: the fine-tuned model generates new rationales for the same dataset, and the cycle continues until performance plateaus. To avoid overfitting, each fine-tuning round starts from the original pretrained weights.

An overview of STaR and a STaR-generated rationale.

A key limitation is that the model only learns from examples it already solves correctly. If it cannot generate a correct rationale for a new problem, it gets no training signal. To address this, the authors introduce rationalization: the model is given the correct answer as a hint and asked to generate a rationale that leads to it. This backward reasoning often succeeds where forward generation fails, producing rationales for previously unsolvable problems. These are then added to the training set, expanding the model's learning opportunities.

Figure 3

Results

Experiments span arithmetic, commonsense reasoning (CommonsenseQA), and grade-school math (GSM8K). On arithmetic (n-digit addition), STaR achieved 89.5% accuracy after 16 iterations, far exceeding a baseline trained without rationales (76.3%). Rationalization dramatically accelerated learning, allowing the model to master multiple digit lengths simultaneously and generalize to unseen lengths, though it introduced some instability.

A visualization of the accuracy of n-digit summation with each iteration of STaR with and without rationalization for arithmetic.

On CommonsenseQA, STaR with rationalization reached 72.5% accuracy on the dev set, outperforming a fine-tuned GPT-J baseline (68.8%) and even a fine-tuned GPT-3 baseline (73.0%). Qualitative analysis showed that STaR-generated rationales were more coherent and logically structured than few-shot ones, though failures often involved logical fallacies like making topic-related statements without real arguments.

Figure 5

On GSM8K, STaR achieved 10.7% accuracy, beating the fine-tuned baseline (5.8%) and few-shot approaches. Interestingly, rationalization did not help here, likely because the problems are more complex and the backward reasoning hint was insufficient. The model often produced shorter solutions than ground truth, sometimes skipping steps or finding alternative valid paths.

Figure 6

Significance

STaR demonstrates that a language model can bootstrap its own reasoning ability from a tiny seed of examples and a large unlabeled dataset. This self-training paradigm reduces reliance on human annotation and could be applied to any domain where correctness can be automatically verified (e.g., code generation, theorem proving). The rationalization trick is particularly clever—it turns failures into learning opportunities by leveraging the answer as a scaffold. However, the method's success depends on the model's ability to generate at least some correct rationales initially; if the task is too hard, the bootstrapping may stall. Future work could explore combining STaR with stronger base models or incorporating external verification to handle more complex reasoning chains. Overall, STaR is a step toward autonomous reasoning improvement in AI systems.