Skip to content

Repository files navigation

Self-Improving Agents — a synthesis of Stanford CS329A

A close reading of all nine public lectures of CS329A (Self-Improving AI Agents) and the 35 papers on its syllabus, worked into a single argument rather than nine sets of notes.

The output is three things: a narrative tracing how the field got from "ask the model twice" to systems that rewrite their own code; a typed knowledge graph (155 nodes, 628 edges) that makes the causal structure checkable; and ~34,000 words of narration scripts for an audio course.

Start here:

Exploring the knowledge graph in Obsidian

155 notes, 628 typed edges, coloured by node type — papers peach, problems rose, concepts sky, methods mint, lectures lavender. Hovering a hub lights up everything it connects to. Full 18.6s take; higher-resolution video if the GIF is slow to load.


The argument, in one picture

The verification arc

Generated from _meta/graph.json by scripts/render-subgraph.py — every edge is a real edge with its real verb; nothing is hand-drawn.

Everything converges on two nodes. Verification is the constraint the field keeps rediscovering: named in lecture 3, still binding in lecture 7 where it operates on whole agent designs rather than answers. And reward hacking is what fills the vacuum each time a human check is removed.

Which is the through-line the synthesis argues for:

Each removal of a human check buys scale and sells verification. Lecture 3 removed the annotator. Lecture 4 the preference labeller. Lecture 6 the supervisor. Lecture 7 the designer. Lecture 9 proposes removing the last one — the prompt set.


Two errors found in the published syllabus

Verified against the corpus, not assumed:

  1. Session 7 lists a reading titled "Automated design of agentic systems" but links arXiv 2505.22954 — which is the Darwin Gödel Machine paper. The actual ADAS paper is 2408.08435. They are different papers with a real lineage; both are covered here, which is why the reading list is 35, not 34.
  2. The course site states 36 readings; only 34 distinct ones are listed.

Also: AlphaEvolve is on arXiv (2506.13131) with full text and figures, rather than only the DeepMind blog PDF the syllabus links.


What the synthesis argues

A few claims the reading produced that aren't in any single lecture:

Consistency is not capability. RL training improves majority@k while pass@k stays flat — "the model actually became more consistent, not fundamentally smarter." The same phenomenon appears in the evaluation lecture as the gap between a 59-minute task horizon at 50% success and 15 minutes at 80%. Two literatures, two vocabularies, one distinction: what a model can sometimes do versus what it can be relied on to do.

Diversity is a consumable resource. Six papers describe the same failure in six vocabularies — entropy collapse under RL, uniform reward groups yielding zero gradient, a million code samples collapsing to ten variants of one idea, temperature-only sampling, keeping a champion instead of an archive, and self-training narrowing its own distribution. A self-improvement loop is a search, and a search that loses diversity stops searching.

Raw data is not training signal; generated experience over it is. Math-Shepherd's step labels come from rollouts. RLEF finds that using execution feedback is a learned skill. Cartridges finds that next-token training on a corpus loses to synthetic conversations about the corpus. Three papers, three subfields, one result.

Verification is necessary and manifestly not sufficient. KernelBench is the cleanest verification setting available — run the kernel, compare outputs, time it — and frontier models still fall short. Six lectures argue verification is the bottleneck; this is the corrective.

The honest measure of how far this generalises is the distance between AlphaEvolve, validated by proof and by production deployment (including a 4×4 complex matrix multiplication in 48 scalar multiplications — the first improvement since Strassen, 56 years), and The AI Scientist, validated by an LLM reviewing research quality.


Contents

lectures/ 12 module notes — 9 lectures, plus Memory and SWE Agents (paper-only sessions) and Open-Ended Evolution
papers/ 35 paper notes — every syllabus reading
concepts/ methods/ problems/ 108 notes for the ideas, mechanisms and constraints
timeline/ The master narrative and the per-module causal chains
audio/ 11 narration scripts, ~34k words (~3h45m), and a three-episode cut
_meta/*.tsv The manifests every source is fetched from

Claims are cited to a paper line (arx_2203.14465#L142) or a lecture timestamp (lecture-02@00:34:12), so any assertion is one hop from the sentence behind it.

Module 7 is split in two. The Part 7 video covers syllabus session 8; session 7's four open-ended-evolution papers have no public video and are written up separately.


The graph

Markdown is the source of truth. _meta/graph.json is derived and never hand-edited.

Node type lives in frontmatter; edges are inline Dataview fields with a closed vocabularyintroduces solves improves-on builds-on uses evaluated-by enables limited-by covers. A verb outside that set fails the build rather than quietly becoming a new edge type. Node types are open: an unrecognised type is carried through, not coerced.

python3 scripts/build-graph.py     # markdown -> graph.json; idempotent, stable IDs
python3 scripts/validate.py        # dangling endpoints, bad verbs, self-loops, orphans

Contract in schema/SCHEMA.md; schema/graph.schema.json is the validator. The prose explains, the schema decides.

The constraint earns its keep: validation caught an out-of-vocabulary verb and a self-loop during writing, and a pass over the corpus found six wikilinks silently broken by line wrapping — Obsidian does not resolve a link split across a newline.


Semantic search

scripts/index-qdrant.py chunks the vault on ## headings — 1,135 chunks averaging ~650 characters, so a hit lands on a section rather than a 3,000-word file — and indexes it into a local Qdrant collection compatible with mcp-server-qdrant.

$ query: "why is process supervision better than outcome supervision"
  0.806  Process Supervision            Why it beats outcome supervision
  0.741  Let's Verify Step by Step      Why process supervision wins
  0.655  Process Supervision            What it is

$ query: "what makes reasoning traces parallelisable"
  0.719  SPRINT                         (intro)
  0.603  Sequential Reasoning Latency   Why it is not simply the price of thinking

Reproducing the corpus

Source material is not redistributed. _sources/ — 111 MB of paper PDFs, 15 MB of extracted figures, 12 MB of lecture transcripts — is gitignored, because the papers and the lectures belong to their authors. Every source is addressed by a public identifier in _meta/papers.tsv and _meta/lectures.tsv, so the corpus rebuilds from scratch:

brew install yt-dlp
./scripts/fetch-pdfs.sh            # 35 PDFs from arXiv + one DeepMind report
./scripts/fetch-figures.sh         # 244 figures, via the paperclip corpus
./scripts/fetch-transcripts.sh     # 9 lecture transcripts
python3 scripts/vtt2txt.py _sources/transcripts/lecture-02.en.vtt   # -> timestamped text

All fetch scripts are idempotent and skip what already exists.


Sources

Quotations from lectures are transcribed excerpts, attributed with timestamps, used for commentary. Paper content is summarised and cited, not reproduced. The notes and synthesis are my own.

License

Dual-licensed, because there are two kinds of work here. Code (scripts/, the JSON schema, templates) is MIT. Writing (all notes, the synthesis, the narration scripts) is CC BY 4.0 — reuse it, adapt it, credit it.

Neither covers third-party material, and none is redistributed: papers and transcripts stay gitignored and rebuild from public identifiers. See LICENSE for the full terms.

Stanford University, CS329A, and the course instructors are not affiliated with this repository and have not endorsed it.

About

A synthesis of Stanford CS329A (Self-Improving AI Agents): all 9 lectures and 35 papers worked into one argument, with a validated knowledge graph and an audio course.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages