Key Moments

Stanford CS329A Self-Improving AI Agents | Part 3 | Robust Verification

Stanford OnlineStanford Online
Education5 min read73 min video
Aug 3, 2026|107 views|5
Save to Pod

Want to know something specific about what's covered?

We've already dissected every moment. Ask and we will deliver (with timestamps).

TL;DR

New AI verification methods can outperform human-annotated labels, but scaling these methods up requires massive compute and careful attention to data efficiency.

Key Insights

1

The GSM8K benchmark, introduced by OpenAI in 2021, contains 8,500 grade-school math problems requiring multi-step reasoning.

2

Training a verifier model to predict the probability of a solution's correctness, as done in the first paper, can outperform direct supervised fine-tuning, especially with larger verifier training datasets.

3

Process-based reward modeling (PRM) assigns rewards per step of a solution, proving more data-efficient and less prone to false positives than outcome-based reward modeling (ORM).

4

The 'Matt Shepard' paper demonstrates that self-supervised verification, using a language model's own rollouts to estimate step quality, can achieve high accuracy without human annotation.

5

The 'Beaver' paper shows that ensembling multiple weak verifiers, even when imperfect, and using weak-to-strong supervision techniques, can significantly boost performance on hard reasoning benchmarks.

6

Distilling a large ensemble of verifiers into a much smaller model can retain 97% of the accuracy while using over 99% less compute.

The generation verification gap and the need for automated checking

The lecture begins by addressing the 'generation verification gap,' a phenomenon where large language models (LLMs) can generate plausible answers to complex questions, but it's challenging to automatically determine the correctness of these answers. This gap highlights the critical need for robust verification mechanisms. Traditional methods like repeated sampling can improve the quality of generated answers, but selecting the best among them requires reliable verification. The focus shifts to how AI systems can be trained to verify their own outputs, a process crucial for building trustworthy and self-improving AI agents. This leads into an exploration of four papers that illustrate the progression of verification techniques over the years.

Training verifiers to solve math problems with GSM8K

The first paper, 'Training Verifiers to Solve Math Problems' (OpenAI, 2021), motivated by LLM hallucinations and confident incorrect solutions, introduced the GSM8K benchmark. This dataset comprises 8,500 grade-school math problems designed to require multi-step reasoning, even if the individual steps are simple. A key contribution was the training of a verifier model that outputs the probability of a solution being correct. This verifier was trained using a binary loss for correctness and a language modeling objective. At test time, multiple solutions are generated for a problem, and the verifier scores them to select the most likely correct one. Ablation studies explored sentence-level and token-level labeling, finding that the final token's score was used for overall solution correctness. The paper demonstrated that this verification approach, particularly with a growing training set for the verifier, outperformed simple supervised fine-tuning.

Step-by-step verification using process-based rewards

The second paper, 'Verify Step-by-Step,' introduced process-based reward modeling (PRM) as an advancement over outcome-based reward modeling (ORM). While ORM only evaluates the final answer, PRM assigns rewards to each step of a solution's reasoning process. This is achieved by having human annotators label each step as correct or incorrect. The PRM then calculates a final reward by multiplying the probabilities of each step, encouraging more interpretable reasoning. A significant advantage of PRM is its ability to better manage false positives, as it's less likely for a solution to reach a correct final answer through incorrect intermediate steps. The paper also introduced the PRM800K dataset and demonstrated that PRM outperforms ORM and majority voting, especially in detecting correct solutions for rare occurrences. It also showed PRM to be more data-efficient, meaning it requires fewer labels to achieve comparable performance.

Automated step-by-step verification without human labels

The third paper, 'Matt Shepard: Verify and Reinforce LLM Step by Step Without Human Annotation,' addresses the challenge of data collection for PRMs. It proposes automated annotation methods for steps, defining step quality by its potential to lead to a correct final answer. This involves sampling multiple completions from a given step and observing the frequency or occurrence of correct final answers. The paper introduced 'hard estimate' (any correct final answer) and 'soft estimate' (frequency of correct final answers). While initially, hard estimates were simpler, soft estimates showed better performance with increased sampling (n=4). Importantly, this approach eliminates the need for human annotation, enabling LLMs to generate their own training data. The results showed that this method outperformed baselines like self-consistency (majority voting) and ORM, even on harder benchmarks like MATH500, and could be further improved through reinforcement learning (RL) with the generated PRMs.

Ensembling weak verifiers for robust verification

The fourth paper, 'Shrinking the Generation Verification Gap with Weak Verifiers' (Stanford, 2025), takes a different approach by focusing on inference compute and test-time scaling using an ensemble of 'weak' verifiers. These verifiers, which could include PRMs, ORMs, or even LLM judges prompted to score outputs, are not perfect individually but, when combined, form a more capable system. The research highlights that ensembling verifiers, especially when trained with weak-to-strong supervision (like logistic regression or naive Bayes to combine scores), significantly improves performance over naive averaging or individual verifiers. This method, dubbed 'Beaver,' demonstrated substantial gains on hard reasoning benchmarks, drastically reducing the gap between smaller and larger model classes. For instance, an 8B parameter generator with verifiers under 8B parameters achieved performance comparable to larger models.

Distilling verification capabilities for efficiency

A key challenge with ensembling many verifiers is the computational cost. The 'Beaver' paper also proposes distilling the knowledge from a large ensemble of verifiers into a much smaller, single model. This distilled model, which can be as small as 400 million parameters compared to the original 70B+ range, can retain approximately 97% of the accuracy of the ensemble. This significantly reduces test-time compute costs

Common Questions

The primary challenge is the 'generation verification gap,' where LLMs can confidently produce incorrect or hallucinated answers. Verification methods aim to automatically assess the correctness of these generated outputs.

Topics

Mentioned in this video

More from Stanford Online

View all 116 summaries

Ask anything from this episode.

Save it, chat with it, and connect it to Claude or ChatGPT. Get cited answers from the actual content — and build your own knowledge base of every podcast and video you care about.

Get Started Free