TL;DR
Ask a single AI agent to write a scientific paper from your code repository, and you will get a draft that reads beautifully—right up until you realize the abstract’s accuracy doesn't match Table 1, a citation credits the wrong authors, and a plot legend sits squarely on top of the data. Scriptorium solves this by replacing the lone AI writer with a dependency graph of 30 specialist agents whose every hand-off is verified by deterministic Python code before the next agent can touch it. It shows that making AI-generated science trustworthy isn't about building a smarter writer; it's about enforcing ruthless, code-level checks at every step.
What Problem Does This Paper Address?
End-to-end AI research agents can already turn a folder of experimental results into a formatted LaTeX manuscript in an hour. The catch? Fluency masks fragility. Numbers drift from raw logs, real values get pulled from the wrong experimental run, citations get distorted or hallucinated, and modest findings quietly inflate into sweeping generalizations.
Simply slapping an "LLM reviewer" at the end of a single-writer loop doesn't fix this—AI reviewers routinely note integrity flaws and accept the paper anyway, and iterative self-critique often just games the critic's score without improving factual accuracy. Human research labs avoid this chaos through division of labor: the person who ran the code writes the results, a co-author checks the stats, a literature expert vets the citations, and every hand-off acts as an audit. This paper asks what happens if we build an agentic writing pipeline that takes that exact lab structure literally.
Methods
Scriptorium takes a research repository and a short author brief, orchestrating 30 specialist agents across nine teams (Discovery, Literature, Venue Study, Story, Visuals, Writing, Checking, Review, and Finish) arranged in a parallel dependency graph rather than a single sequential line.
The core architectural rule is simple: agents never pass free text to one another, and plain Python decides whatever code can decide. Every hand-off is a strictly typed file:
- Recomputed Numbers: Building on PaperAnchor, an analyst agent writes short Python "recipes" that pull raw, unrounded values directly from result files. Every number in the prose carries a recipe key and is recomputed on every edit.
- The Claim Ledger & Limit Terms: A statistician runs paired tests (rejecting any "significant" label if $p \ge 0.05$ in code), and a cartographer builds a claim ledger. Crucially, the ledger explicitly lists limits of scope—broader terms a writer might reach for that were not tested (e.g., saying "linear classifiers" when only "logistic regression" was run). Python automatically rejects prose containing these limit terms unless framed as future work or a limitation.
- Verified Citations & Visuals: References are fetched strictly from bibliographic databases (OpenAlex, arXiv, Semantic Scholar), and quotes must match the fetched abstract character-for-character. Figures are plotted from data recipes, checked at print size by a deterministic linter (for text size, contrast, color-vision deficiency, and overlaps), and only then shown to a vision critic.
- Venue Study: Before drafting, agents read the last two years of proceedings from the target venue (e.g., CVPR, NeurIPS, ACL) to distill a structural "playbook"—learning how strong papers frame contributions and Figure 1 without copying wording.
If any Python check fails, the file is bounced right back to the agent that created it—with the exact reason—for up to two fix rounds before downstream agents ever see it.
Datasets
Because Scriptorium is a zero-shot, inference-time pipeline rather than a trained model, datasets are used strictly as experimental repositories to evaluate its paper-writing and auditing capabilities:
- Tabular Demo Study: A controlled noisy-label experiment using two
scikit-learndatasets (Digits and Breast Cancer) across three noise rates. - Two GPU Computer Vision Studies: Few-shot segmentation on Oxford-IIIT Pet (comparing heads on frozen DINOv2 features vs. fine-tuned U-Net/FPN) and blind-spot image denoising on COCO crops under synthetic Gaussian noise.
- Human Audit & Defect Benchmarks: Five finished papers (comparing Scriptorium against a single Claude Code agent) across the demo study, a class-imbalance study, and a rebuilt CVPR 2025 paper from raw notes, alongside a planted-defect suite (swapped citations and widened claims) and an audit of an older Scriptorium 0.1 draft.
Key Insights and Ideas
- Agents can't talk their way past Python: In conversational multi-agent frameworks, agents can persuade critics to overlook flaws. By relegating deterministic checks (math, exact quotes, $p$-values, bounding-box overlaps) to plain code, hallucinated numbers and invented references become structurally impossible.
- The hardest error to kill is subtle overreach: When humans audited finished AI papers, the numbers were almost always right. The error that survived both single-agent and early Scriptorium drafts was overclaiming—sentences tied to valid data that subtly named a wider class of methods than tested. Adding negative scope ("what was not tested") to the claim ledger closed most of this gap.
- Honesty doesn't invent good science: When given a vision study with weak, statistically insignificant gains, Scriptorium didn't hype or hide the failure—it stated the null result plainly in the abstract and headings, earning a fair 3.25/10 from LLM reviewers. Checks guarantee integrity, not a breakthrough experiment.
Key Results
- End-to-End Verification: On the tabular demo study, Scriptorium generated an anonymous 4-page CVPR workshop paper in 130 minutes (running 2.3 parallel agent sessions on average, totaling 93 sessions and 2.6M output tokens). All 107 tagged numbers recomputed from raw files, and all 17 citations matched fetched bibliographic records.
- Scaling to Vision: On the two GPU vision studies (~3.9M–4.5M output tokens each), Scriptorium produced an 8-page CVPR paper (926 recomputed numbers) and a 4-page workshop paper complete with teasers, architecture diagrams, and percentile-selected qualitative grids.
- Stopping Real & Planted Errors: Across 5 real runs, code checks caught and forced agents to self-correct 85 errors in-stage (ranging from broken citation keys to column-overflowing tables). In planted-defect tests, the auditors flagged every planted miscitation and overclaim with minimal false alarms. Adding explicit scope limits boosted human-audited overreach detection from 3/5 to 4/5 sentences.
Limitations and Future Work
Note: Pages 11+ of the manuscript were cut off in the provided excerpt, so formal closing discussions are partially truncated; however, the authors explicitly highlight several operational limitations in the text:
- Checks keep a paper honest, not necessarily compelling: On the Oxford-IIIT Pet segmentation study, the checks prevented overclaiming, but the writers buried the clearest finding (that frozen features beat fine-tuning at low label budgets) and spent the abstract explaining testing procedures.
- Thin experiments stay thin: No amount of careful writing or venue-style formatting can rescue a study missing baselines or statistical power (as reflected in the 3.25–5.0/10 LLM review scores on small/weak studies).
- Rule violations can remain open: Occasionally an agent does not fully resolve a soft storytelling constraint within its fix rounds (e.g., one results paragraph printed six numbers where the storyline rules allowed two, which the final HTML report explicitly flags for the human author).
Summary updated