Reproducing AI Papers: How a 27B Control Agent Orchestrates Massive LLM Tools
This article explores a systematic approach to automating AI paper reproduction by using a small-parameter control agent to orchestrate large language model tools. It details the design of an executable reproduction task space, the "Coding Agents as Tools" (CAT) architecture, a rubric-based judge system for converting weakly verifiable tasks into trainable signals, and stable Group Relative Policy Optimization (GRPO) with per-turn credit assignment. Finally, it provides engineering implementation guidelines and risk management strategies for long-term scientific tasks.
I. Why Paper Reproduction is the Infrastructure for Long-term Scientific Innovation
The accumulation of scientific research relies on reproduction. A paper is not a complete record of the research process, but rather a lossy compression of hypotheses, experiments, failed attempts, and decision chains. Readers often see the final effective configurations, cleaned data, and idealized charts, while critical details remain hidden in experiment logs, environmental differences, and implicit experience. Therefore, paper reproduction is essentially not just “running the code,” but rebuilding a verifiable experimental decision chain from limited information. This process inherently involves open-ended exploration: proposing hypotheses, designing controls, locating biases, adjusting configurations, and gradually approaching the goal after multiple rounds of failure.
For large language model (LLM) agents, paper reproduction poses three structural challenges. First, incomplete information. Papers lack full dependencies, random seeds, data preprocessing boundary conditions, and intermediate failure records, forcing agents to make judgments under partial observability. Second, training distribution mismatch. Existing agents are heavily optimized for well-defined, closed-ended problems, whereas reproduction tasks have no single correct answer and require open-ended search and scientific methodology. Third, missing reward functions. General reproduction tasks lack explicit rewards for direct optimization, making it difficult to continuously improve through simple “hill-climbing” iterations. If the similarity of the final chart is directly used as a reward, the agent is prone to reward hacking behaviors, such as overfitting the plotting style while ignoring experimental configurations.
Therefore, a more reasonable approach is to treat reproduction as a long-term, partially observable, and weakly verifiable task. Through task space, judges, and post-training mechanisms, unverifiable results can be transformed into relatively stable training signals. The research discussed here moves exactly in this direction: constructing an automatically generated chart reproduction task space, training a control agent with approximately 27 billion (27B) parameters to call general intelligent coding tools, and orchestrating underlying general models with much larger parameter scales to complete code generation and experimental execution.
II. From Paper to Executable Task: Design of the Reproduction Task Space
Reproduction tasks cannot rely solely on manual selection. A more scalable approach is to build an automatically generated task space that converts charts, tables, and experimental conclusions from papers into executable and scorable reproduction goals. The task space constructed in this study covers 100 machine learning and scientific AI papers, generating 310 chart reproduction tasks, with papers spanning from 1990 to 2026. This span is meaningful: engineering habits, dependency environments, and reporting standards vary significantly across different eras, allowing for the testing of an agent’s adaptability to long-term methodological changes.
The task space construction involves the following steps:
- Structured Paper Parsing: Extract research questions, method modules, dataset descriptions, training configurations, evaluation metrics, and chart descriptions. The focus is not on summarizing the full text, but on establishing the correspondence between “chart—experiment configuration—conclusion.”
- Reproduction Goal Definition: Convert each chart into a verifiable goal, including numerical ranges, trend relationships, statistical quantities, visual structures, or conclusion consistency. The goal must specify observable artifacts, such as result files, logs, metric records, and charts.
- Environment and Dependency Reconstruction: Generate an executable environment based on the paper’s description, recording dependency versions, data entry points, execution commands, and resource constraints. For missing information, explicitly mark uncertainties, allowing the agent to propose hypotheses and record evidence.
- Rubric Generation: Establish task-specific scoring criteria around data preparation, method configuration, metric calculation, result presentation, and conclusion consistency. The rubric should be auditable to avoid rewarding only the final appearance.
- Difficulty Stratification and Holdout Set Split: Stratify tasks by length, environment complexity, and degree of missing information. Split the tasks into in-distribution tasks and holdout scientific AI tasks to test generalization rather than memorization.
- Automated Validation and Regression: Perform executability checks on the task space itself to prevent training signal distortion caused by environment drift or rubric ambiguity.
The task space is not a static dataset but a scalable generator. As the number of papers increases, the task space can continuously expand. Versioned records of task definitions, environment snapshots, and rubrics are also necessary to ensure reproducible training and evaluation.
III. Small Parameter Control Agent Orchestrating Large Model Tools
The key architecture of this solution is “Coding Agents as Tools” (CAT). The 27B control agent does not directly handle all code generation. Instead, much like a human researcher using intelligent coding tools, it treats general intelligent coding tools as callable tools, which can be backed by general models with around 5 trillion (5T) parameters. The control agent is responsible for the scientific workflow, while the tools handle intensive code generation and execution assistance.
The value of this division of labor lies in the fact that the main bottleneck of paper reproduction is not just coding ability, but scientific process control. The control agent needs to perform hypothesis generation, experimental design, variable control, failure attribution, record review, and iterative planning; general intelligent coding tools provide code editing, command execution, error diagnosis, and artifact inspection capabilities. Letting a large model generate a complete experiment at once easily leads to “plausible but non-executable” hallucinations. Conversely, using a small model for multi-turn control allows breaking down long tasks into observable steps and revising the plan in each turn based on the tool’s returned results.
The CAT architecture can be abstracted into a “Plan—Edit—Run—Observe—Diagnose—Re-plan” cycle:
- Plan: Determine the hypothesis to verify in the next round based on the task rubric and current artifacts.
- Edit: Modify configurations, data processing, or metric calculation code via general intelligent coding tools.
- Run: Execute experiments in a controlled environment, collecting logs, metrics, and charts.
- Observe: Check numerical values, trends, and anomalies against the rubric.
- Diagnose: Differentiate between data issues, configuration issues, implementation issues, and environment issues.
- Re-plan: Decide whether to roll back, add controls, or narrow the search space.
The research reveals that the 27B control agent can guide a 5T-parameter model to carry out tasks and achieve practically meaningful performance improvements compared to using the larger model alone. This indicates that parameter scale is not the only variable; tool orchestration, context focus, and scientific process constraints are equally important. Advantages of a small model controlling large tools include controllable costs, more focused context, and clearer behavioral boundaries, while the large model serves as a capability backend without bearing all long-term decisions.
IV. Rubric Judge: Converting Unverifiable Tasks into Trainable Signals
Long-term reproduction tasks lack explicit reward functions. The role of the rubric judge is to break down task goals into multiple judgeable dimensions, forming a structured score. Typical dimensions include: whether data preparation matches the paper description, whether method configuration is complete, whether metric calculation is correct, whether chart values and trends match, whether conclusion explanations are consistent, and whether experimental records are auditable. The judge can be a hybrid of rule checks and model evaluations: rules handle deterministic items, while the model handles semantic consistency and chart interpretation.
To reduce single-evaluation noise, multi-sample evaluation result aggregation is necessary. For the same trajectory, multiple evaluations or multiple sets of rubrics can be used. During aggregation, methods like outlier removal, weighted averaging, and consistency thresholds can be applied. The goal of aggregation is not to create false precision, but to estimate the stability of the score. When evaluations diverge significantly, the sample should be flagged as low confidence to avoid injecting noise into the training signal.
The rubric also requires calibration and anti-reward-hacking design:
- Scoring items should cover both process and results to avoid rewarding only the final chart appearance.
- Set hard constraints on critical configurations, deducting points directly upon violation.
- Retain manual spot checks and rubric regression tests.
- Monitor scoring distribution drift and abnormally high-scoring samples.
- Calibrate the model judge for positional bias and length bias.
V. Stable GRPO and Per-turn Credit Assignment
Applying reinforcement learning directly to long-term, unverifiable tasks often results in reward sparsity, high variance, and training collapse. This research proposes a stable Group Relative Policy Optimization (GRPO) method suitable for long-term tasks, featuring per-task rubric judges, multi-sample evaluation aggregation, and per-turn credit assignment. The core of GRPO is sampling multiple trajectories for the same task and comparing relative advantages within the group, reducing dependence on absolute reward scales. Its stabilization focuses on: rewards deriving from structured judgments rather than a single scalar; multi-sample aggregation reducing evaluation noise; and per-turn credit assignment backpropagating trajectory-level scores to key decision turns.
The necessity of per-turn credit assignment lies in the fact that reproduction success often depends on a few critical turns, such as data split corrections, hyperparameter rollbacks, or metric implementation fixes. If only the final result is rewarded, correct intermediate decisions cannot be reinforced. Trajectories can be split by turn, assigning credit based on artifact changes, rubric improvements, and failure recovery per turn, forming turn-level advantage estimates. Engineering-wise, this can be paired with reference policy constraints, clipped updates, difficulty curricula, failed sample retries, and low-confidence sample filtering.
The illustrative training loop is as follows:
for task in task_space:trajectories = policy.rollout(task, n_samples)scores = [rubric_judge.score(task, traj) for traj in trajectories]rewards = aggregate(scores) # Outlier removal, weighting, consistency calibrationadvantages = group_relative(rewards) # In-group relative advantagefor traj, adv in zip(trajectories, advantages):credit = assign_credit(traj, adv) # Backpropagate to key turnspolicy.update(traj, credit)
Training stability should be continuously monitored via scoring variance, turn success rate, tool call failure rate, low-confidence ratio, and abnormal high-score ratio. If scoring variance suddenly increases, inspect the judge and task environment first, rather than continuing to increase training steps.
VI. Result Interpretation: Process Intelligence Outperforms Mere Parameter Scaling
Under the research’s rubric judge, the control agent outperformed two general large model baselines on 73% of in-distribution machine learning tasks and 60% of holdout scientific AI tasks. Performance on holdout tasks better demonstrates the transferability of scientific methods rather than memorization of a fixed task space. Qualitative analysis also shows that the agent adheres more closely to scientific principles: proposing hypotheses first, then designing controls, recording failure reasons, and retaining auditable evidence across multiple iterations.
These results should not be over-interpreted as the agent possessing independent scientific innovation capabilities. A more accurate conclusion is: in reproduction, a long-term and weakly verifiable task, the task space, judges, and stable post-training can organize general model capabilities into behaviors closer to scientific workflows. Reproduction is the foundation of innovation; long-term scientific innovation still requires humans to pose questions, set value judgments, and bear scientific responsibility.
VII. Engineering Implementation Suggestions and Risk Boundaries
In engineering implementation, the task space, judge service, training orchestration, and tool execution should be decoupled. The task space defines goals and rubrics; the judge service handles multi-sample scoring and aggregation; training orchestration manages trajectory sampling, credit assignment, and policy updates; tool execution runs in a controlled sandbox, logging commands, artifacts, and logs. At the deployment level, general cloud platforms (such as Baidu AI Cloud) can provide infrastructure capabilities like container orchestration, object storage, logging services, and monitoring alerts, but scientific judgment should not be left to a single scorer.
The practical checklist includes: versioning task definitions and environment snapshots; performing regression tests on rubrics; setting resource and permission boundaries for tool calls; retaining manual spot checks; monitoring reward hacking and scoring drift; down-weighting low-confidence samples; and incorporating reproduction artifacts and experiment logs into the audit chain. Key risks include judge bias, environment drift, intellectual property and data compliance, computing costs, and “high-score but incorrect” pseudo-reproduction. The mitigation approach is not to pursue full automation, but to establish a human-machine collaborative review mechanism: the agent handles large-scale exploration and evidence collation, while humans handle critical scientific judgments and final confirmations.
Overall, the key insight from this solution is that automating paper reproduction is not a single-model capability issue, but a systems engineering challenge involving task space, rubrics, long-term training, and tool orchestration. Using a small-parameter control agent to orchestrate large model tools provides a cost-controllable and auditable implementation path for long-term scientific tasks.
