Kempner Institute reports AI workers wrote over 100,000 formally verified programs
In short
- A research team describes Formal Disco, in a write-up on the Kempner Institute (Harvard) site, a system in which AI workers write, repair and extend programs that come with machine-checked proofs. It is a preprint (arXiv 2607.04631, posted 6 July 2026, not yet peer reviewed); the Institute's blog post is dated 19 November 2026.
- The authors say it produced datasets of over 100,000 verified programs in three languages: Dafny, Verus (for Rust) and Frama-C (for C).
- An open model, Qwen 2.5-Coder 32B, was fine-tuned on this data. On one test its single-attempt success rose from 8.7% to 43.0%, level with Claude Opus 4.5.
- Code is on GitHub under the MIT licence. The datasets are on Hugging Face, but no licence is stated there.
100,000+ verified programs across three languages; 268 lines average program, three-worker setup; 8.7% → 43.0% Qwen on VerusBench, one attempt; 29.8% vs 23.0% yield per model call, three workers vs one agent (Claude Opus 4.5, Dafny)
Why verified code is hard to get
In a verification-aware language such as Dafny, Verus or Frama-C, a program can come with a precise statement of what it must do and a mathematical proof that it does it, which a tool called a verifier checks mechanically. If an AI writes such a program, a person would only need to read the statement, and could trust the verifier for the rest. That is the authors' pitch.
The catch is training data. The authors note that the largest public dataset of self-contained Dafny programs, DafnyBench, has fewer than 800 files after deduplication, against tens of millions of public Python repositories. Open models are weak at these languages for that reason. Formal Disco tries to manufacture the missing examples, using the verifier as a cheap, trustworthy judge of which ones are correct.
How the system works
(This section is our plain-English summary of the authors' description.)
Everything runs around an "agenda", a shared store of tasks (such as "repair program X") and programs with their verifier feedback. Any number of workers, each backed by a language model, can claim tasks from it. There are three kinds:
The seeds come from two places. One is a random README from a set of 100,000 GitHub repositories, almost none about verification: a cookbook repository, for example, became a verified recipe manager. The other is up to two snippets from the language's reference documentation.
The authors tested whether three workers beat one. With Claude Opus 4.5 on Dafny, a single agent with verifier feedback and 3 repair attempts wrote programs averaging 85 lines, never above 128. The three-worker setup, with the same number of model calls, averaged 268 lines, with the top 10% above 598 lines and the largest above 3,000. Its yield per call was 29.8% against 23.0%.
Diversity as a number
A pile of 100,000 near-copies would be useless, so the authors define a good dataset as one with high entropy over program features, meaning a wide spread of values for things like loop structure, proof length or whether bitvectors are used. A trillion copies of one program would score zero.
They report that the seeds matter. Without READMEs, the most frequent themes in generated Dafny programs were stack, reverse, insert, pop, push, peek and bst: the model kept falling back on textbook data structures. Of 30 Dafny language features they track, corpora built with documentation snippets covered all 30, against 26 without.
Self-improvement without collapse
When a model is trained repeatedly on its own output, it tends to lose variety, a problem often called model collapse. The authors' loop:
- Run Formal Disco with frontier models (Claude Sonnet 4.5 and Opus 4.5). Even these fail often: the Initiator produced a verified program only 11% (Verus) to 23% (Dafny) of the time. About 10,000 attempts were enough to fine-tune Qwen 2.5-Coder 32B into a usable worker.
- Run it with the fine-tuned Qwen, then fine-tune again on everything that verified so far, and repeat.
The risk is that the model learns to succeed by writing simpler programs. So the authors rank the successful programs by how unusual their feature values are and train only on the top third. In Verus, the Initiator's success rate went from about 11% with Claude to 43% with Qwen at iteration 5, and loop-structure entropy roughly doubled against the Claude corpus in all three languages. By the last iteration the Qwen corpus beat the Claude one on all four targeted features in every language, except lemma proof size in Verus.
Do the programs help on human-written code?
The authors fine-tuned Qwen 2.5-Coder 32B with plain supervised fine-tuning and tested it on benchmarks of human-written programs. All numbers below are theirs.
The last row matters: on proving lemmas, Claude Opus 4.5 remains far ahead. The authors suggest proofs benefit from step-by-step reasoning their fine-tuned model was never trained to produce.
What to keep in mind
- A preprint with the authors' own numbers. The blog post and paper have not been independently reproduced, and we did not read the paper's full text.
- Mixed comparisons with other datasets. Human-written DafnyBench still has the most varied annotation shapes in Dafny, and in Verus the VeruSyn dataset eventually overtakes Formal Disco on that feature. On features the method does not target, the self-improved Qwen corpus was somewhat less diverse than the Claude one.
- Frontier models did the first step. The pipeline starts from Claude-written data; Qwen takes over afterwards.
- Licence is unclear. The GitHub repository is MIT. The Hugging Face collection page we read states no dataset licence, so we do not describe the data as openly licensed. Check before using it commercially.
- Not everything is released yet. The README says the 100,000-README seed file, run checkpoints and evaluation results are to be shared "soon".
Terms in plain English
- Formal verification: proving by machine that a program meets its specification, rather than testing sample inputs.
- Verifier: the tool that checks the proof. If it passes, the program does what the specification says.
- Pass@k: the share of problems solved if the model gets k independent attempts.
- Model collapse: a model that learns from its own output gradually producing narrower, more repetitive output.
Where things stand
The code and three datasets (dafny-disco, verus-disco, framac-disco) are public; the Hugging Face collection was last updated on 5 July. The authors say next steps include training on reasoning traces or with reinforcement learning against the verifier, learning which program features to maximise instead of choosing them by hand, and applying the method to interactive theorem provers and formal mathematics.
Sources
- Formal Disco: Growing Large, Diverse Datasets of Certified Programs from Scratch, Kempner Institute, 19 Nov 2026
- Formal Disco: Scalable Open-Ended Generation of Formally Verified Programs, arXiv preprint, 6 Jul 2026
- metareflection/formal-disco, GitHub (MIT)
- formal-disco datasets, Hugging Face
Sources
- Formal Disco: Growing Large, Diverse Datasets of Certified Programs from Scratch
- Formal Disco: Scalable Open-Ended Generation of Formally Verified Programs
- metareflection/formal-disco
- formal-disco datasets
More from AI Research Labs
- NVIDIA announces Nemotron 4 open models, Super due early 2027
- NVIDIA introduces cuPlasma, a GPU library for fusion plasma simulation
- NVIDIA releases CodonFM 5B, an open 5-billion-parameter mRNA model
- Cursor is now Grok Build, the AI coding app of SpaceX's Grok team
- Belfort Labs releases Bel-0, an AI chatbot that works on encrypted prompts