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 手册 · 内容整理自相关论文 · 引用的数字我们未独立复核。

Owner Tongli Zhou (TonyZhou05) Status draft · pending Tongli’s publish approval Updated 2026-10-03 Back to harness playbook · lab
Read this first — sourcing. The framework, paper names, venues, years and figures below are cited from the referenced literature (see References). We have not independently re-verified them against the original papers. The reference implementation is a toy that shows mechanics, not research capability.

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.

Minimal closed loopOne human-written goal, one frozen evaluator, one editable file. Modify → run a fixed short budget → evaluate → keep if better, reset if not.
Four cross-stage insightsStructure moves linear → loop → recursive; compute budget is a first-class variable; human-in-the-loop is an interface-design problem; benchmarks move toward “distance from human”.

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.

Literature review → Idea generation → Experiment preparation → Experiment execution → Scientific writing → Paper generation
Abstraction layerWhat the survey figure lists
Models & capabilitiesRAG, LLMs, logic, planning, reinforcement learning, agents, VLMs, end-to-end synthesis
System stages & methodsRetrieval & re-ranking · hypothesis refinement · protocol & plan reasoning · adaptive feedback · review automation · publication & dissemination
Scientific tasks & productsGap analysis · novel ideas · code generation · data collection · figure & table generation · verifiable research artifacts
ApplicationsMeta-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

PhaseSystems
I Foundational modulesDS-1000, BioPlanner, Coscientist, MLAgentBench
II Closed-loop integrationAI-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.

Four-layer architecture Pipeline at the bottom, then tree search, then decision layer, then world model on top, each with its role and our module. 4 · World model Aligns data-side and literature-side state into one structure. Bottleneck: interpretation / synthesis, not reading or coding. 3 · Decision layer Filters candidates before execution to save compute (RPM, AIRA fitness). Relative comparison beats absolute score prediction. 2 · Tree search Branch, backtrack, debug: failure becomes information. Operators (draft / debug / improve) are the real bottleneck. 1 · Pipeline The skeleton: stages with best-node handoff. preliminary → tuning → execution → ablation Our harness lessons pool + ledger (partial) Our harness pairwise tournament, pluggable judge Our harness node states, operator set, debug loop Our harness staged runner, frozen eval, git sandbox
Fig. 1 — Four layers and the part of our reference harness that stands in for each. The world-model layer is only partially covered.

4. Stage by stage: what the literature says, what our harness does

StageLiterature saysOur harness does
Literature reviewBottleneck 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 generationShift 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 preparationLeast 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 executionTree 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 writingPart 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 generationEnd-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.

Harness loop Goal, select parent and operator, N proposals, pairwise tournament, human gates, frozen eval, leakage gate, commit or reset, ledger and lessons, then back to select. program.mdhuman goal Select parent+ operator N proposalsnot executed Pairwise tournament1 champion Human gatesrisk / interface / direction Frozen evalchecksum before + after Leakage gatemandatory Commit / resetgit sandbox Ledger + lessonsappend-only next round (lessons feed operators) stage handoff: best node → next stage
Fig. 2 — One round of the loop. Only the tournament champion is executed; a failure is recorded as a lesson rather than discarded.

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.7536.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.

VariantMechanismTrade-off
Inference-onlyLLM-as-judge over plan, code and historyFast, no extra GPU; prompts tuned with DSPy MIPROv2
AgenticRun a small pilot experiment in a sandbox before decidingSlower, 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

9. Leakage gate & frozen evaluation

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.

GateTriggers
direction_changeA proposal that moves the search into a new family of solutions
public_interface_changeThe candidate’s exposed interface differs from the starting one
irreversible_or_high_riskCode touching processes, network, deletion, writes or dynamic execution
final_reportBefore 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.

BenchmarkDateWhat it asksKey figure (reported)
MLE-bench2024-10Can it win a medal in a real Kaggle competition?o1-preview: 16.9% bronze
ScienceAgentBench2024-10Correct, executable scientific code?Best agent 32.4%
RE-Bench2024-11Same-conditions comparison with human experts2 h: AI ≈ 4× human median; 8 h: humans overtake; 32 h: humans ≈ 2×
PaperBench2025-04How far from human experts?Best agent 21.0% vs PhD 41.4%
AIRS-Bench2026-02Full lifecycle, no baseline code given20 tasks, 4 reached superhuman SOTA
RCBench2026-05Can 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

  1. Frozen evaluation. One human-reviewed evaluator per task, checksum-pinned; the candidate never sees held-out data.
  2. 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.
  3. Leakage first. A result with no passing leakage gate is not a result.
  4. Ablations. Every claimed gain comes with component ablations (informational nodes that cannot be promoted).
  5. 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.
  6. 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.
  7. 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:

  1. Write the task: a human-written goal file, a frozen evaluator, and a starting candidate file; pin the evaluator’s checksum.
  2. 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).
  3. Set budgets and gate policy: run and node caps for time and cost; which gates need a human.
  4. 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.
  5. 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.

15. References

Names and years are as cited; citations were not checked against the originals. No links are provided for that reason.

16. Honest caveats