An AI system that dreams up an idea, codes it, runs the tests, writes the paper and reviews it. Give it 32 experiment nodes, not 4, and its paper score rises from about 3.3 to 3.95.
Learn how one pipeline runs the whole research loop, why a tree of failed and fixed experiments beats a single try, and how far an AI-written paper got in real peer review.
Pick a node budget, then press Grow the tree. Each dot is one experiment the system tried. Red dots crashed, the green dot is the best one. Then we build, piece by piece, the idea archive, the search, the write-up and the reviewer.
You need a rough idea of what a machine learning experiment is (train a model, measure a number) and a little Python for the code. We build the rest from zero.
Based on Towards End-to-End Automation of AI Research by Yutaro Yamada, Robert Tjarko Lange, Cong Lu, Chris Lu, Shengran Hu, Jakob Foerster, David Ha and Jeff Clune (Sakana AI, with Oxford, UBC and the Vector Institute). It is a reading for Lecture 3, LLMs as Optimizers of MIT MAS.S62 How to AI an AI for (Almost) Anything. Every idea is re-taught here in our own words and devices.
The four scores are read off the points of Figure 2C (Claude Sonnet 4, 6 papers per budget, 5 reviews each, so 30 samples per point) and are approximate: about 3.3, 3.35, 3.4 and 3.95 on the Automated Reviewer's 1 to 5 scale. The tree is a made-up picture seeded so it is the same on every visit; the paper's real tree is Figure 2B.
Chapter 0
See what it means for a machine to run the whole research loop, and test how far you think it got
Picture a student with a hunch. She thinks a small change to a neural network (the learning program inside most modern AI) should help it cope with new situations. She has a Monday to start and a conference deadline in six weeks.
What happens next is a long chain of chores. She reads papers to check that nobody had the hunch first. She writes code. The code crashes, so she fixes it. She trains the model, plots the results and sees something odd. She tweaks and runs again. Then she writes eight pages, adds citations, formats the figures and submits. Weeks later, strangers read the paper and judge it.
Every link in that chain has been automated before, one at a time. Programs help with literature search. Language models help to write code and to draft text. But nobody had shown one system that does the whole chain, from the first hunch to the final judgement, without a person touching the result.
This paper claims that step. The authors build The AI Scientist: one pipeline that creates a research idea, writes code, runs experiments, plots and studies the results, writes the full paper, and reviews it. It works on machine learning research, where an experiment is just a program that runs on a computer.
The pipeline runs on foundation models: very large language models (LLMs, programs that predict the next word of text), and some that also read images, trained on huge amounts of text and code. A foundation model is the engine. The pipeline is the car around it. It decides which engine call comes next, feeds in the right notes, and checks what comes out.
That wrapper is what the paper calls an agentic system: a program that calls a model many times in a loop, runs tools (here a Python interpreter, a LaTeX compiler and a paper search engine), and carries its own notes forward. Lecture 3 of the course teaches the underlying trick, a model that reads its past attempts and scores and proposes a better one. This paper applies it to science itself.
How do you judge a paper written by a machine? The authors use two judges. The first is another program, the Automated Reviewer, which scores a paper the way a conference reviewer would. It is cheap, so they can score thousands of papers. But a program grading a program is a closed loop, so they add a second judge.
The second judge is the real thing. A peer review is the process in which experts judge a paper without knowing who wrote it. The team submitted three AI-written papers to a workshop, a smaller meeting that sits beside a big conference, with the full approval of its organizers and an ethics board. The workshop was "I Can't Believe It's Not Better" (ICBINB), held at ICLR 2025, a major machine learning conference. It accepts about 70% of what it receives. Forty-three papers were reviewed. Humans did not know which three came from the machine.
Before we read on, make a guess. Of the three papers, how many do you think scored above the workshop's average acceptance bar? There is no wrong answer. The point is to see what your gut expects, then let the paper's number land.
The 43 dots are the papers the workshop reviewed. Three of them came from The AI Scientist, drawn in warm orange. Choose your guess, then see which of the three cleared the bar.
Pick a guess to see the result.
The counts are the paper's: 43 papers reviewed, 3 submitted by the authors, one scoring 6.33 (individual scores 6, 7 and 6) above the workshop's average acceptance threshold. The positions of the dots are only a picture. The paper reports that the two others fell short of the bar (its Table 10) and that all three were withdrawn after review, as promised in advance.
The answer is one. A single paper, about a negative result for a method called compositional regularization, scored an average of 6.33 from three reviewers. The workshop organizers said it would very likely have been accepted. The authors withdrew it on purpose, as their ethics plan required, so that no fully automated paper entered the record before the community had agreed how to disclose such work.
Read the result with care. One paper in three is not a robot genius. It is a workshop with a 70% acceptance rate, and the team picked its three submissions from a larger pool. The authors say so themselves. What the result does show is that the whole chain, run with no human edits to the final paper, can produce something an expert reader judges as acceptable at a low-pressure venue.
The rest of this lesson takes the machine apart, one mechanism per chapter, so that you could rebuild the main parts yourself.
Chapter 1
Follow one research idea from a sentence to a PDF and see what each phase passes to the next
Think of a relay race. Four runners each carry a baton for one stretch, then hand it on. If a hand-off is dropped, the next runner has nothing to carry. The AI Scientist is a relay of four phases, and the interesting engineering sits in the hand-offs: what exactly is the baton?
The four phases are ideation, experimentation, write-up and review. In the paper's Figure 1A they run left to right. Here is what each one takes in and puts out.
The system starts with a research area chosen by a person, for example "problems where deep learning fails in practice". It must produce an idea: a short, structured plan for one experiment. In the template-free version the idea reads like the abstract of a paper. It names a problem, proposes a method and predicts what will happen.
The baton is a small text object in JSON form (JSON is a plain-text format of named fields). Here is the real shape, from the accepted paper's idea file in the supplement. The field names are the paper's; we cut the long values.
json{ "Name": "compositional_regularization_nn", "Title": "Enhancing Compositional Generalization in Neural Networks via Compositional Regularization", "Short Hypothesis": "Introducing a compositional regularization term during training can encourage ...", "Related Work": "... limited research focuses on directly incorporating explicit regularization terms ...", "Abstract": "Neural networks excel in many tasks but often struggle with compositional generalization ..." }
Before an idea moves on, a filter compares it with published work. We open that filter in Chapter 2. The idea that passes becomes the "finalized idea JSON": the hypothesis, the task set-up and the evaluation metrics.
This phase turns the idea into code, runs it and records what happened. Every run writes a note into an experimental journal: the system's lab notebook, holding the plan, the code, the metrics, the error traces and the plots. The journal is its memory. Without it, each step would start blind.
The paper tests two ways to run this phase. The template-based way starts from a human-written code folder that already trains a small model, and edits it. The template-free way writes the first script itself and searches over many versions with a tree. Chapters 3 and 4 take them one at a time.
The journal is condensed into a short summary by a language model, and that summary, not the whole journal, goes to the writer. Why? The paper says that passing each stage's best output forward "grounds each later stage in the outputs of earlier ones, mitigating divergence between the initial proposal, results, and final write-up". In plain words: the paper should describe what was done, not what was planned.
The writer fills a blank LaTeX conference template section by section, using the notes and the plots. (LaTeX is the typesetting language most science papers use.) The last step compiles the source into a PDF.
The PDF goes to the Automated Reviewer, which extracts its text and returns a structured review: scores for soundness, presentation, contribution and overall quality, a list of strengths and weaknesses, and an accept or reject decision.
One driver process, a plain Python program, runs all four phases. It calls the models, launches experiments, watches exit codes (the number a finished program returns, where 0 means it worked) and timeouts, and moves the work from one phase to the next by fixed rules. The language model does not run the pipeline. Ordinary code does.
Generated code runs through Python's non-interactive subprocess module. The paper says all contact between that code and the operating system is limited to controlled file reads and writes inside a working folder made for that run. After each run, the driver packs metrics, plots, logs and critique into a typed object, one tree node, and hands it to a judge.
Different jobs use different models, chosen by small pilot runs. In the template-free system, o3 proposes ideas and critiques code, Claude Sonnet 4 writes code, GPT-4o handles pictures, and o4-mini does the reviewing. The architecture lets you swap any of them. A full paper takes anywhere from several hours to the 15 hour limit the authors set.
Click through the four phases below. For each one, read the input, the output and the tools it calls.
The boxes are the four phases; the small text under each is the baton it hands on. Choose a phase to see its input, output and tools.
The batons and tools are the paper's (Methods and Supplementary A.2.1 to A.2.4). The idea fields are from its accepted-paper idea file.
Notice the pattern. Each hand-off is a small, plain, inspectable object: JSON, a journal, a PDF, a review. Because they are plain, a human can open any of them and see what the system thought. The authors call this structured record "reproducible and auditable".
Chapter 2
Learn how the system grows a pool of research ideas by mutation, and how it throws away the ones the world already has
You ask a friend for a startup idea. She gives you one. It sounds great. You search for ten minutes and find three companies already doing it. The idea was fine. It just was not new.
A research system has the same trouble, only worse. A language model has read a huge part of the literature, so it tends to suggest things that look familiar, because they are. The first job of The AI Scientist is therefore two jobs: produce many ideas, and remove the ones that already exist.
Suppose you want to breed better tomatoes. You do not plant one seed and hope. You keep many plants, pick a few good ones, cross or tweak them, and keep the new plants beside the old. Over time you hold a varied collection, and each plant is a starting point for the next.
The system treats ideas the same way. It keeps an archive, a growing list of research ideas. In each round, it reads some ideas from the archive and asks a language model to propose new ones that are variations or extensions. The model acts as a mutation operator, the part of an evolutionary method that makes a changed copy. The paper links this to open-endedness research, which values a wide and growing collection over a single best answer.
In the template-based version, each idea is a structured object with a title, a summary of the core hypothesis, a detailed experiment plan, and three scores the system gives itself from 1 to 10: interestingness, novelty and feasibility. The system plays a role set by its prompt: an "ambitious AI PhD student who is looking to publish a paper that will contribute significantly to the field". In the supplement, a run starts from one or two seed ideas (for example, change the learning rate or the batch size) and is asked for 50 new ones. Each idea is also refined for three rounds of self-reflection.
The template-free version works at a higher level. It writes a proposal that reads like a paper abstract: a research problem, a new method and the expected result. It is not tied to any starting code. It is joined to a literature module that searches academic databases for gaps, and it uses reflection rounds to revise a proposal in the light of what the search found.
Every idea goes through a novelty check. The system connects its language model to the Semantic Scholar search service and to web access, as tools. It writes a query, reads the matching papers, and may refine the query. The template-based version allows up to 10 such rounds per idea. The system discards any idea that is too close to existing work.
We can write the rule as a threshold. Let idea i have a similarity s to each known paper j. Keep the idea only if its closest neighbour is not too close:
idea A: closest paper s = 0.82, τ = 0.60 → 0.82 < 0.60 is false → discard idea B: closest s = 0.31 → true → keep (illustrative numbers)
Why use the largest similarity, not the average? An idea can be far from most of the literature and still be a copy of one paper. The average hides that paper. The maximum finds it.
Now try it on a toy map. Each blue dot is a published paper. Each orange dot is an idea. Close dots mean similar content. The real system does this with text and a language model, not with a flat map, but the geometry of the choice is the same.
Blue dots are published papers. Orange dots are ideas that pass the filter. A red cross is an idea thrown out for being too close to a paper. Drag the dial, then press Mutate the archive to add children of surviving ideas.
A toy. Positions are made up and seeded. Similarity is 1 minus the distance divided by 0.3 (so papers more than 0.3 apart count as unrelated). A child is placed near its parent with a small random shift. The real check is a language model reading Semantic Scholar results, up to 10 rounds per idea in the template-based version; the paper gives no similarity formula.
Drag the dial toward 0.2. The filter turns strict, and many ideas die. Push it toward 0.95 and almost everything passes, copies included. Now press Mutate. Children of a surviving idea often land in the same area, so children of an idea that sits near the literature tend to be rejected. That is why the archive needs breadth: a single good corner of the map is not enough.
The authors name two problems with this stage in their limits section. First, the idea step "often produces very similar ideas across different runs". The archive is wide inside one run, but separate runs from the same model can land in the same spot. Second, ideas can be creative but too hard for the system to build. In the template-based runs, a large share of proposed ideas fail to execute.
A third caution is ours. A filter that only checks the papers it can search finds only what it can search. Absence from Semantic Scholar is not proof of novelty. The paper also notes that the AI Scientist once proposed an idea that a human team later published to wide praise, which shows both the promise and the overlap risk.
Chapter 3
Build the simple version of the system: edit a working code folder, run up to five experiments, and fix crashes automatically
You want to test a new cooking idea. You do not build a kitchen first. You start in a kitchen that already works, with a recipe that already tastes fine, and change one thing. If the cake comes out flat, you read the oven display, fix the setting and try again.
The first version of The AI Scientist works this way. It starts from a template: a human-written code folder that already trains a small model on a standard task and writes out its results. The system's job is to change that code in ways that test its idea.
A template is a working baseline. The paper uses three, and the supplement describes each. One trains a small transformer language model (the nanoGPT code) on text such as the works of Shakespeare, enwik8 and text8. One trains small diffusion models, the kind that make images by removing noise, on four low-dimensional datasets. One studies grokking, a surprise in which a model first memorizes its training data and only much later learns the general rule. Each template runs end to end and logs its numbers, so the system has a known good starting point and a baseline, the starting score the new idea must beat.
After the novelty filter keeps an idea, the system writes a multi-step plan of up to 5 experiments. It then runs them one after another, in linear order. For each experiment, a coding assistant called Aider edits the template code. Aider is an open-source tool that applies a model's requested changes to files in a code folder, so the model can work on real code and not just describe it.
Code written by a model often crashes. So the loop has a repair step. It runs the program, and if the exit code shows a failure, it captures the error log. Then it calls Aider again with two things: the failing code and the error message. Aider returns a patch. The system re-runs. This can happen up to 4 times per experiment. Each run has a timeout of 7,200 seconds (two hours), and plotting has a separate timeout of 600 seconds.
After each run, the metrics, plots and observations are appended to the journal. The next step reads that journal. This is the system's memory: experiment 3 knows what experiments 1 and 2 found.
pythondef run_plan(plan, folder, journal, max_experiments=5, max_retries=4, timeout=7200): for step in plan[:max_experiments]: aider.edit(folder, step, context=journal) # model edits the template for attempt in range(1 + max_retries): ok, log = run(folder, timeout) # subprocess, exit code, stdout if ok: break aider.edit(folder, "fix this error:\n" + log) # patch from the error text journal.append(summarize(step, ok, folder)) # metrics, plots, notes
Our sketch of the loop the paper describes in Methods, with its parameters (5 experiments, 4 re-attempts, 7,200 seconds). It is not the authors' code.
Suppose each attempt to run the code has the same chance p of working, whatever happened before. The chance that all attempts fail is (1 − p) multiplied by itself once per attempt. With one first try and R repair attempts, that is (1 − p)R+1. So the chance that the experiment gets through is its complement.
p = 0.5: A(4) = 1 − 0.55 = 96.9% → W = 0.9695 = 85.3% p = 0.2: A(4) = 67.2% → W = 13.7% (illustrative p)
Look at the second case. Even when a single attempt works only one time in five, four repairs lift one experiment to 67.2%. But five experiments in a row must all pass, and that pulls the plan back down to 13.7%. The retry loop helps a lot. It does not remove the need for a model that writes mostly working code. Try it yourself.
Each pair of bars is one repair budget. The left bar is one experiment working. The right bar is all five working. The pair outlined in teal is the budget you chose.
A toy that assumes each attempt is independent with the same chance p. In reality a repair sees the error message, which can raise the chance, and a stubborn bug can lower it. The settings 5 experiments, 4 repairs and 7,200 seconds are the paper's (Supplementary Table 2).
When the plan is done, the same tool fills a standard LaTeX conference template. It writes the introduction, methods, results and conclusion, and reads the journal for the results. It builds the related-work section by searching Semantic Scholar for up to 20 rounds and writing a note on each cited paper. Then it compiles the PDF, fixing compiler errors for up to 5 rounds.
The supplement reports the practical numbers: about $10 to $15 for each paper, and about 12 hours for a whole run on eight H100 graphics chips. Claude Sonnet 3.5 made the best papers. GPT-4o came second but struggled to write LaTeX, so it finished fewer papers. DeepSeek Coder was cheaper but often failed to give Aider code it could parse. Llama 3.1 405B did worst. The lesson for a builder: the tool contract matters as much as the model's quality.
The cost of the loop's worst case is also worth a number. Five experiments, five attempts each, two hours per attempt is 5 × 5 × 7,200 seconds, which is 180,000 seconds, or 50 hours. That is our own arithmetic, an upper bound, and real runs finish much sooner.
Chapter 4
See why a tree of experiments that can branch, fail and be repaired beats a straight line of steps
A hiker follows a path. Halfway along, a fallen tree blocks it. If the hiker has only one path, the walk ends. If the hiker has a map of every junction passed so far, she walks back to the last good junction and tries the next trail.
The template run in Chapter 3 is the one path. It is also tied to a human's starting code. The second version, called template-free, writes its own first script and searches for good experiments the way the hiker uses the map. The paper calls the method parallelized agentic tree search. We take the words one at a time. A tree is a set of nodes joined by parent and child links. Search means choosing which node to grow next. Agentic means a language model writes and runs the code at each node. Parallelized means several nodes grow at once.
A node is one attempt at an experiment. The paper lists what it holds: the experiment script, a plain-text description of the plan, the error trace if it crashed, the run time, the metrics, a code critique from o3, a plotting script, the paths of the figures, feedback on those figures from a vision-language model (VLM), and a final status: buggy or non-buggy. The driver stores it as one typed Python object.
Step 5 is a clever move. A program can run with no error and still show nonsense. Putting a picture model in front of the plots catches a class of mistakes that exit codes cannot see.
At each round, the system picks several nodes to expand in parallel. It follows one rule with one dial. With a set probability, the debug probability, it picks a buggy node, so that errors get fixed. Otherwise it picks a non-buggy node by best-first search: always grow the most promising node you hold. GPT-4o judges "most promising" from the metrics, the training curves and the quality of the plots.
Each chosen node gets a child. If the parent was buggy, the child is a debug attempt. If the parent worked, the child is a refinement that tries to improve it. All new children then run at the same time, which is what speeds up the search.
pythondef tree_search_round(tree, k, debug_prob, max_debug_depth): parents = [] for _ in range(k): buggy = [n for n in tree if n.buggy and n.debug_depth < max_debug_depth] if buggy and random() < debug_prob: parents.append(choice(buggy)) # fix an error else: parents.append(llm_judge_best(tree.non_buggy)) # best-first (GPT-4o) children = [new_child(p) for p in parents] # Sonnet 4: plan + code run_in_parallel(children) # run, plot, VLM-critique, label tree.extend(children)
Our sketch of the selection rule in the paper's Methods. The parameter names and the form of the judge call are ours; the rule, the probability and the depth limits (3 and 4 in Table 4) are the paper's.
Besides debug and refine nodes, four types serve the later stages. Hyperparameter nodes try other settings, such as the learning rate, and keep a record so they never repeat a test. Ablation nodes remove one component to see whether it mattered, again with a record. Replication nodes re-run a result with different random seeds so that a mean and a spread can be computed. Aggregation nodes run no new experiment: they only write a script that combines the replications into figures with means and standard deviations.
What should the debug probability be? Too low, and promising ideas stay broken. Too high, and the search spends its whole budget on repairs. The paper uses 1.0 for its ICLR workshop run and 0.2 for its model-comparison figure, but it does not publish a sweep. So here is our own toy, with simple made-up rules, to show why a middle value can win.
The curve shows the average best score of a toy 16-node search at each debug probability. Dots below it are one run at your setting: red is buggy, orange is working, green is the best. Drag the dial, then press Run once.
A toy, not a result of the paper. Rules: the root works with score 0. A new node from a working parent crashes with chance 0.35; a crashing node hides a bigger possible gain. A debug child fixes it with chance 0.55, up to 3 tries deep. Each average is over 1,500 searches on one sequential 16-node budget. The real system grows several nodes at once and judges quality with GPT-4o. The paper's own settings were 1.0 (ICLR run) and 0.2 (Figure 1B).
In the toy, the best score peaks at a low-to-middle dial value and falls steeply when every round is spent on repairs. At zero the search never fixes a crash, so it throws away the risky ideas that held the biggest gains. This is a general lesson of search: spend some effort on repair and the rest on pushing forward.
Chapter 5
Follow the search through its four stages, see how the best node is handed down, and learn why more nodes buy a better paper
A lab project has seasons. First you make the thing work at all. Then you tune it. Then you run the study you cared about. Last you take parts away to prove each part matters. Skip a season and the paper has a hole in it.
The template-free system copies this order. A part of the driver called the experiment progress manager splits the experiment phase into four stages. Each stage runs its own tree search, with its own goal and its own rule for when to stop. This is the "looser structure" the authors prefer to a rigid workflow graph: the stages give order, and the models inside them keep their freedom.
A gate is the test a stage must pass before the next one starts. Here are the four stages and their gates, as the paper describes them.
At the end of each stage, an LLM-based evaluator looks at all the leaf nodes, the ends of branches, and picks the most promising one. That node becomes the root of the next stage's tree. All other branches are dropped. So each stage prunes: one winner moves on, and the rest of the work is forgotten except in the journal. Each node may run for at most one hour.
Table 4 of the supplement lists the budgets. The ICLR workshop run used 21, 12, 12 and 12 nodes across the four stages, 57 in all. The runs for the model-comparison figure used 16 or 20 nodes in each of stages 1 and 2, and 16 in each of stages 3 and 4. A full paper stays under the 15 hour limit, so nodes must run in parallel. Run the stages below and watch the best node pass down.
Each dot is one node. When a stage fills up, its best node turns green and starts the next stage. Choose a budget, then press Run the stages.
The budgets are the paper's (Supplementary Table 4; Figure 1B used 16 or 20 nodes for stages 1 and 2, and we show 16). The Figure 2C budgets save a checkpoint after stage 3 and re-run stage 4. Which dot is best is drawn by a fixed seed, only as a picture. The node-hour figure is our upper bound, the number of nodes times the one-hour limit.
The hero at the top of this page shows the paper's scaling test, Figure 2C. The authors set up four total budgets: 4, 8, 16 and 32 nodes, split evenly between stages 3 and 4. To compare budgets fairly, they reused a saved checkpoint after stage 3. They re-ran stage 4 from the best of only the first k nodes of stage 3, with a stage 4 budget of k.
For each budget they made 6 papers (2 papers for each of 3 ideas) with Claude Sonnet 4. The Automated Reviewer scored each paper 5 times, giving 30 samples per point. The mean score climbs from about 3.3 at 4 nodes to about 3.95 at 32 nodes. We read these values off the plot, so treat them as close, not exact. The first three points sit near one another. The big step comes at 32.
Why should extra nodes help at all? Think of each node as a draw of luck and skill, and the stage as keeping the best. For draws from a bell curve with spread σ, the average best of n draws grows as n grows, but more slowly each time.
4 → 8 nodes adds 0.395σ; 8 → 16 adds 0.342σ; 16 → 32 adds 0.304σ (textbook values for the maximum of normal draws)
Each doubling adds a little less than the one before. The paper's curve is not that smooth, and the paper does not claim this model. We offer it as intuition for why test-time compute, extra work spent while answering, can lift quality without a bigger model. The best of many tries beats a single try. The same idea drives repeated sampling in Lecture 3.
Figure 1B adds the other axis. Across 11 models, from gpt-3.5-turbo to o3 and Gemini 2.5 Pro, the Automated Reviewer's paper score rises with the release date of the model. The paper reports a statistically significant link (p below 0.00001). So two knobs help: a better model, and more search.
Chapter 6
Follow the journal into a LaTeX manuscript, then learn the four slips that a human still had to catch
You come home with a shoebox of receipts. Your task is to write the year's tax form. The numbers are all there, in scraps, in no order. A good clerk does not invent numbers. She finds each one in the box, writes it in the right slot and checks that the totals match.
Writing the paper is the same job. The shoebox is the experiment journal and the plots. The form is a conference paper. The risk is that a fluent writer, a language model, fills a slot with a number that is not in the box.
The template-free system moves away from step-by-step editing with Aider. It writes the LaTeX directly with a reasoning model, then reflects on its own output. First a dedicated step gathers results from all stages into compound figures, single figures with several panels. Then the model writes each section. The prompts give guidelines per section (title, abstract, introduction, methods, experiments, conclusion) and per venue. For the workshop, the prompt told the model that the venue values negative results.
Then come several reflection cycles. In each, the draft gets feedback from two checkers. A LaTeX linter, a program that spots errors in typesetting code, flags broken commands. The VLM reads the figures and the captions, and judges whether each caption says what its plot shows and states the main takeaway. The model edits the draft to fix what they report.
The citations come from search, not from memory. The system queries Semantic Scholar for related work, up to 20 rounds. For each paper it might cite, it writes a short justification for why the paper belongs. That justification then tells the writer how to use the reference. This design aims to stop the writer from citing a paper it half remembers.
It does not stop everything. The limits section says the system still sometimes fails to find the most relevant papers, hallucinates references, or mis-references figures in LaTeX.
The authors show four kinds of write-up failure. We list them with the tell-tale sign of each.
The authors checked for these by hand when they chose which three papers to submit. They also report subtler slips: describing a negative result as an "improvement", comparing two numbers wrongly, and stating details such as the hardware used for an experiment that appear nowhere in the logs. Early versions even invented ablation tables when given no data. Explicit prompting reduced this but did not end it.
See how many you can spot. Below is a toy draft of eight lines. Four lines hide one of the slips above. Four are fine.
Press a line to flag it. Then press Check my flags. Green means you caught a real slip. Red means a clean line you flagged, or a slip you missed.
Flag the lines you think are slips.
The draft is a toy we wrote. The four kinds of slip (citation, figure display, length, duplicated figures) are the failure modes of the paper's Figure 4 and Supplementary A.4; the sentences about the compositional regularization study echo the accepted paper's own topic.
Three of the four slips can be found by a short program that reads the compiled paper and its source. The paper's authors did their checks by hand, so this sketch is our idea of how to automate them. A page count and a search for "[?]" cost almost nothing and run before any review is requested.
pythondef lint_draft(tex, pdf_text, n_pages, page_limit=4): problems = [] if "[?]" in pdf_text: problems.append("unresolved citation") if re.search(r"(/tmp|runs/|node_\d+)\S*\.png", pdf_text): problems.append("raw figure path") if n_pages != page_limit: problems.append("wrong length") if has_duplicate_figures(tex): problems.append("same figure twice") return problems
Our sketch, not the authors' code. It cannot catch an invented number or a wrong claim; those need the results files and a reader.
No such linter can judge truth. A number in the text must match a number in the results. The paper says the system "occasionally hallucinates entire results or experimental details", and its authors recommend treating generated papers as "hints of promising ideas for practitioners to follow up on", not as settled findings.
Chapter 7
Learn how five model reviews and a chair make one judgement, and how that judge was tested against real human decisions
A teacher has a stack of 3,000 essays and one weekend. She cannot grade them all. She hires five helpers who each grade every essay, and she asks a head marker to settle each case from their five notes. Before she trusts the helpers, she gives them essays whose true grades she already knows and checks how often they agree.
The paper has the same problem. Judging whether the AI Scientist's papers are good, across many models and settings, needs thousands of reviews. Human peer review cannot supply that. So the authors build an Automated Reviewer, and they test it first.
The reviewer runs on o4-mini. A tool called PyMuPDF pulls the text out of a PDF. The model gets a role ("You are an AI researcher who is reviewing a paper that was submitted to a prestigious ML venue"), the paper, and the official NeurIPS reviewer guidelines. It must answer in a fixed JSON form: a summary, strengths, weaknesses, questions, limitations, ethical concerns, scores for soundness, presentation and contribution, an overall score from 1 to 10, a confidence level, and an accept or reject decision.
One review is noisy, so the system makes five independent reviews with the same model and the same prompt, sampled five times. Then the model is asked to act as an Area Chair, the editor who weighs several reviews, and to find a consensus. The result is a meta-review. That is the head marker in the teacher's story.
The test needs papers with known outcomes. The authors use public ICLR decisions from the OpenReview site. They take 1,000 papers from 2017 to 2024, which the model might have seen in training, and a clean set from 2025, which it cannot have seen. If the score drops on the clean set, data contamination (the model remembering old verdicts) may have helped.
What counts as good? The authors compare with people. In the NeurIPS 2021 consistency experiment, about 10% of submissions were sent to two fully separate human committees. One committee's decision was treated as the truth, and the other was scored against it. That measures how much human reviewers agree with each other. The counts from that study, as reported in the supplement, are shown below. Choose a score to see how it is computed.
Rows: what committee 2 decided. Columns: the "truth" from committee 1. Each cell is a count of papers. Choose a score to light the cells it uses.
The four counts (99, 107, 96, 462; 764 papers) are the paper's, from Supplementary A.3.2. Accept means any of Oral, Spotlight or Poster. We computed the scores from the counts and they match its Table 1 (accuracy 0.73, balanced accuracy 0.66, F1 0.49).
Here are the definitions. Accuracy is the share of papers where the two decisions agree. But most papers are rejected, so a system that always says reject scores 0.65 on accuracy and is useless. Balanced accuracy fixes that. It averages two rates, so each class counts equally.
BA = ½ (99/206 + 462/558) = ½ (0.481 + 0.828) = 0.66 F1: P = 99/195 = 0.508, R = 0.481, F1 = 0.49
On the 2017 to 2024 papers, the Automated Reviewer reaches a balanced accuracy of 0.69 and an F1 of 0.62. On the clean 2025 papers, it gets 0.66 and 0.67. The human committees get 0.66 and 0.49. Balanced accuracy falls from 0.69 to 0.66 on the clean set, so some contamination may exist. But 0.66 still matches the human figure.
Read the other columns before you cheer. The reviewer's plain accuracy is 0.65 and 0.63, below the humans' 0.73. Its false positive rate is 0.45 and 0.52, so it accepts about half of the papers that were really rejected. The humans' rate is 0.17. Its false negative rate is 0.17, so it misses few real accepts, where the humans miss 0.52. In short, this reviewer is more generous than a committee. The authors also warn that the ICLR and NeurIPS paper pools differ, so the comparison is not exact.
Table 5 of the supplement tests design choices. o4-mini beat Claude 3.5 Sonnet, GPT-4o and GPT-4.1. Telling the model to accept when unsure pushed its false positive rate up to 0.88. Adding picture review, self-reflection or one or two example reviews gave no clear gain. Only the ensemble of five improved all six metrics: balanced accuracy rose from 0.72 to 0.77. A three-review ensemble was not enough, at 0.66. (These ablations use a different paper subset, so the base value differs from Table 1.)
Why might voting help? If each review is right with probability a, and they err independently, the majority is right more often. But all five come from one model with one prompt, so their mistakes are linked. Try both.
Bars show how often a majority of n reviews is right. Raise the shared-mistake slider and watch the voting gain shrink.
A toy. Model: with chance ρ (the shared-mistake slider) every review copies one common verdict, which is right with chance a; otherwise the reviews are independent and a majority vote decides. The paper's real numbers for the ensemble are balanced accuracy 0.72 (one review), 0.66 (three) and 0.77 (five) in its Table 5, a different measure from this toy.
The reviewer was tuned for a top conference. The authors report that with its default conference prompt it rated all three workshop submissions below the acceptance bar. After they re-calibrated the prompt for a workshop, one of the three, the paper that was accepted, was judged above the bar. A judge needs its bar set for the room it works in.
Chapter 8
Weigh the one paper that passed review, see how many drafts stood behind it, and list what still breaks
A chef enters a cooking contest and wins a ribbon. Good news. But how many dishes did she cook that week? Who chose the plate that went to the judges? How hard was the contest? A ribbon tells you less than the whole kitchen does.
The workshop result needs the same questions. Chapter 0 gave the headline. Now we look at the kitchen.
For the workshop, the team used the template-free system and gave it only the workshop's broad theme: limits of deep learning, including cases where earlier ideas to improve it did not work. The system produced ideas, experiments and papers. People then filtered the results at each stage. They did not edit the papers. Selection used three checks.
The authors note that without this filter the same papers would still have been produced, only together with many more, at a greater total cost. Table 6 of the supplement gives the counts. Pick a paper below and read its funnel.
The bars use a log scale, because 136 and 1 would not fit on one ruler. Each bar is one step of the funnel. The last row is the verdict from reviewers.
The counts are the paper's Table 6 (generated to selected). The first two papers drew on one shared pool of 25 ideas. The accepted paper scored 6, 7 and 6 (mean 6.33); the other two fell below the bar (Table 10). The bar lengths are our log-scale drawing.
Take care here, because the setting matters. The workshop accepts about 70% of submissions. If the three papers were typical of that workshop, we would expect about 3 × 0.70 = 2.1 of them to be accepted. The system got one. So the claim is not "better than the average workshop paper". The claim is narrower: for the first time, one paper made fully by a machine, from idea to PDF, with no human edits, scored above the bar in blind review.
The authors add three more cautions. The main ICLR conference accepted 32% of papers, against the workshop's 70%. The accepted paper reports a negative result, which fits a workshop for negative results. And the team's own review, by human AI researchers, found that one paper met the bar for a workshop and none met the bar for the main conference. There is also a procedural point. The Automated Reviewer, with its default conference prompt, rated all three papers below the bar. Only after it was re-calibrated for a workshop did it place the accepted one above.
Two concurrent efforts also sent machine-written work to human review. The authors say that in one case people wrote the related-work section and edited several sections, and in the other the process was a human and AI collaboration with people steering experiments and making figures. They argue the AI Scientist's run is more fully automated. Neither of the other systems was open, so the authors cannot tell how much hidden help they had.
The supplement lists failure modes, in four groups.
The authors judge that "taking the scientific content ... at face value is not recommended". They also name two deeper limits that more scale may not fix. One is paradigm-shifting creativity: the system works inside the existing playbook. The other is strategic judgment, or "taste": the sense of which odd result is a bug and which is a discovery. On the trend, they cite a METR finding that the length of tasks AI can reliably complete doubles about every seven months, and expect many debugging limits to ease. That is a forecast, not a result of this paper.
The study had approval from the ICLR leaders, the workshop organizers and the University of British Columbia's ethics board. Reviewers knew some submissions were AI-written but not which, and could opt out of reviewing them. All three papers were withdrawn after review whatever the outcome, to avoid setting a precedent before the community has norms for disclosure. The authors list real risks: a flood of papers that overwhelms peer review, inflated credentials, borrowed ideas without credit, and unsafe experiments.
Chapter 9
Keep the numbers, the terms, a build checklist and the core loop as code, and find where to read next
The AI Scientist is a relay of four phases, joined by plain files and run by an ordinary driver program. Ideas pass a novelty filter. Experiments run as a tree that branches, crashes, gets repaired and prunes by stage. A writer turns a condensed journal into a LaTeX paper. A reviewer, five model reviews plus a chair, scores it. The best evidence is one paper above the bar at a workshop, and the best caution is that a human chose three papers from many.
| What | Value | Where in the paper |
|---|---|---|
| Template run: experiments, repairs, timeouts | up to 5 experiments, 4 re-attempts each, 7,200 s per run, 600 s plotting | Methods; Table 2 |
| Template run: search rounds | 3 idea reflections, 10 novelty rounds, 20 citation rounds, 5 LaTeX fix rounds | Methods; Table 2 |
| Tree search: debug probability and depth | 1.0 and depth 3 (ICLR run); 0.2 and depth 4 (Figure 1B) | Table 4 |
| Tree search: nodes per stage | 21, 12, 12, 12 (ICLR run); 16 or 20, 16 or 20, 16, 16 (Figure 1B); at most 1 hour per node | Table 4; Methods |
| Time for one paper | several hours up to the 15 hour limit | Methods; A.2.9 |
| More nodes, better score | about 3.3 (4 nodes), 3.35 (8), 3.4 (16), 3.95 (32), read from the plot | Figure 2C |
| Automated Reviewer, balanced accuracy | 0.69 (2017 to 2024), 0.66 (2025), against 0.66 for human committees | Table 1 |
| Reviewer false positive and negative rates | FPR 0.45 and 0.52; FNR 0.17 (humans: FPR 0.17, FNR 0.52) | Table 1 |
| Reviewer design | o4-mini, 5 reviews plus one Area Chair meta-review; 5-ensemble balanced accuracy 0.77 against 0.72 for one review | Methods; Table 5 |
| Workshop test | 43 papers reviewed, 3 submitted, 1 scored 6.33 (6, 7, 6); workshop accepts 70%, main ICLR 32% | Sections 4 and 5; Table 10 |
| Funnel of the accepted paper | 25 ideas, 8 experiments, 24 write-ups, 1 submitted | Table 6 |
| Cost, template version | about $10 to $15 per paper; about 12 hours on 8 H100 chips for a run | Supplement B.1 |
| Term | Plain meaning |
|---|---|
| Idea archive | A growing list of research ideas; new ideas are mutations of old ones. |
| Novelty check | A search of the literature that drops ideas too close to published work. |
| Template-based / template-free | Start from a human code folder, or write the first script itself and search a tree. |
| Node (buggy / non-buggy) | One experiment attempt; buggy if it crashed or its plots failed the picture critique. |
| Debug probability | The chance that a round expands a buggy node, not the best working one. |
| Experimental journal | The system's lab notebook: plans, code, metrics, errors, plots, critique. |
| Experiment progress manager | The part that runs four stages with gates and passes the best node on. |
| Automated Reviewer | Five model reviews of a PDF and one chair meta-review, using NeurIPS rules. |
| Balanced accuracy | Average of the rate on accepts and the rate on rejects. |
pythondef ai_scientist(area, budget, models): # Phase 1: ideas (archive + novelty filter) archive = [] while len(archive) < budget.n_ideas: idea = models.ideate(area, parents=archive) # mutation by LLM if max_similarity(idea, search_papers(idea)) < budget.tau: archive.append(idea) idea = pick_best(archive) # the "finalized idea JSON" # Phase 2: four stages of tree search root, journal = baseline_node(idea), [] for stage, n_nodes in enumerate(budget.nodes_per_stage, start=1): tree = [root] while len(tree) < n_nodes: tree_search_round(tree, k=budget.parallel, debug_prob=budget.debug_prob, max_debug_depth=budget.depth) root = models.judge_best_leaf(tree) # winner seeds the next stage journal.append(summarize(tree)) # Phase 3: write-up pdf = compile_loop(models.write_latex(idea, condense(journal), plots(root)), max_fixes=5) # Phase 4: review reviews = [models.review(pdf) for _ in range(5)] return pdf, models.area_chair(reviews)
Our compact sketch of the pipeline in the paper's Methods, with its numbers (5 reviews, up to 5 LaTeX fixes, four stages). It is not the authors' code; theirs is open at the two repositories linked below.
Lecture 3 teaches models as optimizers: show the model past tries with their scores and it proposes a better one. The AI Scientist stretches that loop to a whole research project. The "score" of a node is a mix of metrics, plots and a judge's opinion. The "history" is the journal. The FunSearch lesson shows the same loop on cleaner scores. The authors also say it differs from Deep Research tools, which retrieve and summarize known knowledge but do not run new experiments.
Credit. This lesson re-teaches Towards End-to-End Automation of AI Research by Yutaro Yamada, Robert Tjarko Lange, Cong Lu, Chris Lu, Shengran Hu, Jakob Foerster, David Ha and Jeff Clune (Sakana AI, University of Oxford, University of British Columbia, Vector Institute), in our own words and devices. It belongs to Lecture 3 of MIT MAS.S62 How to AI an AI for (Almost) Anything. Errors are ours.
Now press Present or Teach and explain one phase out loud, from memory: what it takes in, what it hands on, and how it fails. Then go back to the tree at the top, pick 4 nodes and then 32, and say why the score moves.