Playbook · auto-research
Auto-Research Harness
A working note on how to build a harness for automated research: the stage × layer framework, the four-layer architecture (pipeline, tree search, decision layer, world model), the minimal closed loop, and how we intend to evaluate it. Drawn from the literature on AI scientists and research agents, with a small offline reference implementation to test the mechanics.
自动科研 harness 手册 · 内容整理自相关论文 · 引用的数字我们未独立复核。
1. Overview
Automated research is no longer one prompt. The through-line of this literature: judgment, selection and evaluability — not generation — are the bottlenecks. A good harness therefore spends its design effort on four things: a frozen way to score results, a search structure that turns failures into information, a cheap preference layer that decides what is worth executing, and human gates at the few irreversible points.
2. Framework: 6 stages × 4 abstraction layers
The framework builds on A Survey of AI Scientists (Tie et al., 2025), which splits end-to-end research into six stages and four abstraction layers, a 4 × 6 matrix.
| Abstraction layer | What the survey figure lists |
|---|---|
| Models & capabilities | RAG, LLMs, logic, planning, reinforcement learning, agents, VLMs, end-to-end synthesis |
| System stages & methods | Retrieval & re-ranking · hypothesis refinement · protocol & plan reasoning · adaptive feedback · review automation · publication & dissemination |
| Scientific tasks & products | Gap analysis · novel ideas · code generation · data collection · figure & table generation · verifiable research artifacts |
| Applications | Meta-science, data science, biology, chemistry, physics, materials, general autonomous science |
The middle two rows list six items each; their alignment to the six stages above is by column order in the figure and is our reading, not stated in prose.
Tool phases
| Phase | Systems |
|---|---|
| I Foundational modules | DS-1000, BioPlanner, Coscientist, MLAgentBench |
| II Closed-loop integration | AI-Scientist (Aug 2024), SciAgents, IdeaBench, Quantum-Agent-SDL, HyPER, AI-Scientist-v2 & Curie (Feb 2025), ResearchBench |
| III Frontier (scalability, impact, collaboration) | DeepResearcher, PiFlow, AI-Researcher, EXP-Bench, DeepScientist, AutoLabs, Agentic AutoSurvey, SR-Scientist, Freephdlabor |
3. Four-layer harness architecture
An auto-research harness can be organised into four layers. Each answers a different failure mode.
4. Stage by stage: what the literature says, what our harness does
| Stage | Literature says | Our harness does |
|---|---|---|
| Literature review | Bottleneck is judgment, not retrieval. Deep Research Survey (Zhang et al., 2025) breaks it into Planning, Questioning, Web Exploration, Report generation. | Out of scope for the offline demo; the same “select, don’t just retrieve” rule applies to what enters the lessons pool. |
| Idea generation | Shift from generating more to selecting what is worth verifying. AI co-scientist (Gottweis et al., 2025): Generation, Reflection, Ranking (tournament self-play debate), Proximity, Evolution and Meta-review agents; a human scientist sets goals and reviews; tools (search) and memory; self-improving loop. The AI Scientist (Lu et al., 2024): idea → experiment → plots → writing → auto-review in one loop, reported under $15 per paper. 2026 bottleneck: evaluability. | Candidate selection by pairwise tournament (see RPM); a direction change needs a human gate. Ideas must come with a frozen, checkable metric or they do not enter the loop. |
| Experiment preparation | Least automated stage; depends on implicit domain knowledge. Agent Laboratory (Schmidgall et al., 2025): PhD / Postdoc / ML Engineer / Professor roles, 3-stage pipeline, autonomous or human-assisted. MARS (Chen et al., 2026): budget-aware MCTS, Idea / Modular / Coding agents (Design-Decompose-Implement), lesson pool as reflective memory, efficiency-guided reward. Implicit knowledge means humans still participate. | Human-owned: the goal (program.md) and the frozen evaluator are written and reviewed by a person, then checksum-pinned. |
| Experiment execution | Tree search: AI Scientist-v2 (Yamada et al., 2025); decision layer AIRA (Toledo et al., 2025); preference layer RPM (Foster et al., 2026). See tree search and RPM. | Search tree with node states, operators, staged handoff, commit-if-better / reset-if-worse. |
| Scientific writing | Part of the closed loop in AI Scientist-style systems. | Only a run report is generated, from ledger facts; it is refused without a passing leakage gate and held as a draft until a human approves. |
| Paper generation | End-to-end synthesis; AI Scientist-v2 had papers submitted to a workshop (see below). | Not built. Anything public goes through the final-report human gate. |
5. The harness loop
The minimal closed loop is karpathy/autoresearch (an open-source project, no paper): three files. prepare.py is the frozen evaluation and the trust boundary; train.py is the only file the agent edits; program.md is the human-written goal. The agent modifies code, runs for about five minutes, evaluates, commits if the metric improved, otherwise resets. On one H100 that is roughly 100 experiments per night; a reduction of “Time-to-GPT-2” is reported from 2.02 h to 1.80 h.
The observed trend in structure: 2023 linear pipeline (a failed stage ends the run) → 2024–25 loop (failure becomes information; the system can go back upstream) → 2026 recursive (cross-round learning: earlier experience shapes later search). The lessons pool is our recursion hook.
6. Operators & tree search
AI Scientist-v2: agentic tree search in four stages
AI Scientist-v2 (Yamada et al., 2025) organises experiments as a tree. Stages: preliminary investigation → hyperparameter tuning → research-agenda execution → ablation, with the best node of each stage seeding the next. Node types: non-buggy, buggy, hyperparameter, ablation, replication, aggregation, and “best”. Non-buggy nodes go to a refine branch, buggy nodes to a debug branch.
Reported outcome: 3 papers submitted to an ICLR 2025 workshop; one accepted (average 6.33). A self-check then found roughly 57% train/test overlap (data leakage), and none of the three met main-conference standards. This is the reason our leakage gate is mandatory.
AIRA: the decision-layer view
AIRA (Toledo et al., 2025) formalises a research agent as (search policy, operator set, fitness function). Each round: select a node, select an operator (draft / debug / improve), score the result. The counter-intuitive finding: the bottleneck is the operator set, not the search strategy — with AIDE’s operators restricted, better search strategies produced no gain.
| Medal rate (read from the reported chart) | Value |
|---|---|
| AIDE variants (o1-preview / no-memory R1 / R1) | 35.23% · 38.18% · 39.77% |
| MCTS, exploration constant c = 0.0 / 0.25 / 0.50 / 0.75 | 36.36% · 35.45% · 35.00% · 34.55% |
| AIDE_EVO (R1) | 39.61% |
Our harness: the operator set is a per-task plug-in (draft, debug, improve, hyperparameter, ablate; replicate and aggregate are pipeline steps). Search policy is simple on purpose — priority = normalised fitness − a cost penalty + an exploration bonus (the MARS-style efficiency-guided idea) — so improvement effort goes into operators.
7. RPM-style candidate selection
RPM (Foster et al., 2026) inserts a preference layer before the executor. Per round: (1) select a parent node; (2) generate N unexecuted child candidates in parallel; (3) pick one of N by a head-to-head pairwise tournament that sees the context of previously executed solutions; (4) execute only the champion.
Problem downgrading. Instead of asking a model to predict an absolute score (which needs calibration), ask which of two candidates is better (which needs only consistency) — easier for frozen pre-trained models.
| Variant | Mechanism | Trade-off |
|---|---|---|
| Inference-only | LLM-as-judge over plan, code and history | Fast, no extra GPU; prompts tuned with DSPy MIPROv2 |
| Agentic | Run a small pilot experiment in a sandbox before deciding | Slower, more accurate |
Reported curve: inference-only RPM starts higher; agentic RPM starts slowly, then overtakes (around hour 15 on the reported chart); both finish above the no-RPM baseline.
Time-inflation trick. RPM reportedly used a real pilot budget of 300 s while the prompt claimed 2700 s (9×), because a model told time is very tight becomes unwilling to explore. We treat this as an optional, off-by-default prompt nudge: the real cap is still enforced and the ledger records whether the note was used.
Our harness: a round-robin tournament where every pair is played in both orders (cancels position bias), with pluggable judges: a heuristic stub for the demo, a random control, an inference-only LLM-judge interface, and an agentic pilot judge that scores a small train-only validation slice.
8. Budget as a first-class variable
- Compute budget is increasingly treated as a decision variable: RPM (budget as preference ranking), MARS (budget-aware MCTS with efficiency terms), and Karpathy’s fixed 5-minute budget that constrains the search space.
- Counter-evidence from RE-Bench (Wijk et al., 2024) as cited: at 2 h the AI scores about 4× the human median; humans overtake at 8 h and are about 2× better at 32 h — humans get higher marginal returns from extra time.
- Our harness: wall-clock and cost caps per run and per node; evaluator timeouts derived from them; exhausting a run cap ends the run gracefully with no report. Comparisons between methods must be budget-matched.
9. Leakage gate & frozen evaluation
- Frozen evaluator. Data, split and metric live in one file whose checksum is pinned by a human. The harness verifies it before and after every run and refuses any change outside the one editable file.
- Leakage gate (mandatory). After each evaluation, training keys are compared with evaluation keys reported by the frozen evaluator; any overlap, or a candidate that references the evaluator, marks the node leaky. A leaky node can never become “best”, and the report builder refuses to run without a passing gate on the best node and on every replicate.
- Append-only ledger. Every node, tournament, evaluation, gate decision, commit/reset and lesson is a hash-chained JSONL record (tamper-evident, not tamper-proof).
10. Human gates
Human-in-the-loop is best framed as an interface design problem: not whether, but where. Intervene at high-leverage points and do not ask at every step.
| Gate | Triggers |
|---|---|
direction_change | A proposal that moves the search into a new family of solutions |
public_interface_change | The candidate’s exposed interface differs from the starting one |
irreversible_or_high_risk | Code touching processes, network, deletion, writes or dynamic execution |
final_report | Before any report counts as final; otherwise it stays a draft |
Policy is a small config per task; each request and decision (who, why) is written to the ledger. Unattended demo runs use a scripted approver and say so in the ledger. This matches the fleet rule that merges, payments, sends and production stay with Tongli (GREEN / YELLOW / RED).
11. World model & synthesis caution
Kosmos (Mitchener et al., 2025) pairs a data-analysis agent and a literature-search agent that share a structured world model. Per the Kosmos paper, one run involves about 200 rollouts, about 42,000 lines of code and about 1,500 papers.
| Accuracy (as reported) | Value |
|---|---|
| Data analysis | ~85.5% |
| Literature review | ~82.1% |
| Interpretation / synthesis | ~57.9% — the bottleneck |
| Overall | ~79% |
Caution for us: reading and coding are the strong parts; combining data results with literature is the weak one. Treat any synthesis claim from an agent as a hypothesis for a human, never as a finding. Our harness only has a thin stand-in for this layer (lessons pool plus ledger); a real structured world model is future work.
12. Benchmarks & our evaluation plan
Benchmarks move from completion toward distance from human — and ultimately toward whether science can be rediscovered.
| Benchmark | Date | What it asks | Key figure (reported) |
|---|---|---|---|
| MLE-bench | 2024-10 | Can it win a medal in a real Kaggle competition? | o1-preview: 16.9% bronze |
| ScienceAgentBench | 2024-10 | Correct, executable scientific code? | Best agent 32.4% |
| RE-Bench | 2024-11 | Same-conditions comparison with human experts | 2 h: AI ≈ 4× human median; 8 h: humans overtake; 32 h: humans ≈ 2× |
| PaperBench | 2025-04 | How far from human experts? | Best agent 21.0% vs PhD 41.4% |
| AIRS-Bench | 2026-02 | Full lifecycle, no baseline code given | 20 tasks, 4 reached superhuman SOTA |
| RCBench | 2026-05 | Can it rediscover a target paper? | 50 = reproduces the target; best agent 21.5; above 50 needed to count as new |
How we evaluate our own harness
- Frozen evaluation. One human-reviewed evaluator per task, checksum-pinned; the candidate never sees held-out data.
- Hold-out and replication. Report the best node and the starting candidate on the same extra data seeds (mean and spread), never a single lucky run.
- Leakage first. A result with no passing leakage gate is not a result.
- Ablations. Every claimed gain comes with component ablations (informational nodes that cannot be promoted).
- Budget-matched comparisons. Compare selection strategies (no preference layer vs. tournament judges) at equal executed-node and wall-clock budgets; remember the RE-Bench lesson that rankings can flip as the time budget grows.
- RCBench-style rediscovery (planned). Pick a known, published result with a computable ground truth, withhold the answer, and score whether the loop reproduces it (our own rubric: reproduce = parity, beat = candidate new finding needing human review). Not yet run.
- Distance from human. Where possible, record a human baseline for the same task and budget and report the gap, not just a pass/fail.
13. How to run
The reference harness is a dependency-light Python package (standard library only) that lives on the box and is not published here yet. In outline:
- Write the task: a human-written goal file, a frozen evaluator, and a starting candidate file; pin the evaluator’s checksum.
- Choose operators and a judge: stub operators and a heuristic judge for the offline demo; later, model-backed operators and an LLM or pilot judge supplied as plain callables (no keys are needed or stored by the harness).
- Set budgets and gate policy: run and node caps for time and cost; which gates need a human.
- Run: the runner executes baseline → preliminary → tuning → execution → ablation/replication, commits improvements in a throw-away git sandbox, and writes the ledger, lessons and a draft report.
- Review: verify the ledger chain, read the report and gate log, approve or reject. Nothing is published without Tongli.
Model-written code must run in a container or VM for real use: the evaluator subprocess only has a timeout and a clean environment, not security isolation.
14. Reference implementation status
Everything below ran offline on the box with deterministic stub operators on a toy regression task; it shows that the mechanics work and says nothing about LLM-driven research quality.
- Components built: frozen-eval checksum boundary, search tree with node states, draft / debug / improve / hyperparameter / ablate operators, staged pipeline with best-node handoff, replication and aggregation, pairwise-tournament selection with four judge types, budget tracker, leakage gate, human gates, git commit/reset sandbox, hash-chained ledger, lessons pool.
- Tests: 25 pytest tests pass (ledger tamper detection, frozen-boundary violation, commit/reset, leaky candidate blocked, only the champion executed, gate denials, budget exhaustion, determinism, full run).
- Demo run (seed 0): held-out error falls from about 0.78 to about 0.011 (the toy’s noise floor is about 0.01) over roughly 38 executed nodes in about 2 s, with a buggy draft repaired by the debug operator and one direction-change gate approved.
- Selection comparison (5 seeds, equal node budget): the three tournament variants reached similar best error (≈ 0.0112); the no-preference control was close at the median but had a clearly worse mean because some seeds got stuck. The toy is too easy to separate the judges — treat this as a smoke test, not evidence for or against RPM.
15. References
Names and years are as cited; citations were not checked against the originals. No links are provided for that reason.
- A Survey of AI Scientists — Tie et al., 2025
- Deep Research Survey — Zhang et al., 2025
- AI co-scientist — Gottweis et al., 2025
- The AI Scientist — Lu et al., 2024
- Agent Laboratory — Schmidgall et al., 2025
- MARS — Chen et al., 2026
- AI Scientist-v2 — Yamada et al., 2025
- AIRA — Toledo et al., 2025
- RPM — Foster et al., 2026
- Kosmos — Mitchener et al., 2025
- RE-Bench — Wijk et al., 2024
- karpathy/autoresearch — open-source project, no paper
- Also named: DS-1000, BioPlanner, Coscientist, MLAgentBench, SciAgents, IdeaBench, Quantum-Agent-SDL, HyPER, Curie, ResearchBench, DeepResearcher, PiFlow, AI-Researcher, EXP-Bench, DeepScientist, AutoLabs, Agentic AutoSurvey, SR-Scientist, Freephdlabor, MLE-bench, ScienceAgentBench, PaperBench, AIRS-Bench, RCBench
16. Honest caveats
- This page summarises cited literature. Figures cited from the referenced papers are approximate and not independently re-verified; citations were not checked against the originals, so numbers, dates and attributions may contain errors.
- Chart values (AIRA medal rates, RPM curve) were read from published figures; treat them as approximate.
- The reference harness is a toy. A passing demo does not show that an LLM-driven loop will do good science.
- The gates reduce risk but do not replace running untrusted code in a real sandbox.
- Related: harness playbook · Harness Lab · Field Brief (lives under CR-Harness).