AutoResearch at Production Scale: Failure Modes and a Multi-Agent Framework
Organizations: Books Core Recs Science Amazon Seattle, WA, USA
Abstract
Optimizing embedding systems for production recommendation pipelines demands systematic exploration that consumes disproportionate engineering effort at scale. We apply Andrej Karpathy's AutoResearch paradigm -- a large language model that iteratively edits a training script and retains modifications that improve a held-out scalar metric -- to automate this exploration. We report on twelve weeks of running this paradigm at production scale, where iterations consume hours of multi-GPU compute, evaluation involves competing criteria, and campaigns span weeks across many training jobs. Across two independently developed representation-learning systems for a book recommendation pipeline, we ran 220+ experiments and observed five recurring failure modes absent from the original setting: infrastructure fragility, agent memory decay, search-direction stagnation, iteration-cost asymmetry, and metric fixation. We contribute a three-principle scaffolding design -- prevent, persist, redirect -- that maps each failure mode to a structural remedy and whose instantiation scales with iteration cost. The framework produced a 1.82x Recall@6 lift and a 2.1x coherence lift over hand-tuned baselines, and the agent autonomously designed a text-only fallback that expanded catalog coverage by 5.8x. The two systems span nearly three orders of magnitude in per-iteration cost yet exhibit the same failure modes, suggesting these are structural properties of production-scale autonomous research rather than artifacts of either application.
Figures & tables
| Dimension | System A | System B |
|---|---|---|
| Search level | Code-level ( train.py ) | Config + arch. |
| Iteration wall-clock | 9–19 hours | 6–52 min, 1 GPU |
| Cost per iteration | 760 System B | baseline |
| # iterations | 60+ across 6 runs | 150+ across 15 runs |
| Metric | Single scalar (R@6) | Multi-criteria |
| Steering | Criticizer (automated) | program.md (human) |
| Failure mode | System A (60+ iter) | System B (150+ iter) |
|---|---|---|
| Infra. fragility | 18% iter | 37% (worst run) |
| Memory decay | 5 inc. | inc. |
| Stagnation | 5+ iter | 5+ iter |
| Cost asymmetry | Cost wasted per crash | 10 iter wasted |
| Metric fixation | N/A | 0/15 runs met |
| Principle | System A (high cost) | System B (low cost) |
|---|---|---|
| Prevent | Code Fixer agent (pre-execution) | Automatic revert (post-execution) |
| Redirect | Criticizer agent (automated) | Human cross-run pivot |
| Persist | S3 cross-job storage | Human-maintained program.md |
| Bug category | Count |
|---|---|
| DDP / multi-GPU misconfiguration | 3 |
| GPU memory mismanagement (OOM precursors) | 4 |
| Unnecessary recomputation / no-op layers | 3 |
| Distributed dataloader / sampler bugs | 2 |
| Eval-loop / metric-aggregation errors | 2 |
| Total | 14 |
| Configuration | Best R@6 | Lift |
|---|---|---|
| Hand-tuned baseline (no agents) | 3.79% | 1.00 |
| Researcher only (config-level AR) | 3.73% | 0.98 |
| Researcher only (code-level AR) | 4.17% | 1.10 |
| Researcher + Code Fixer (no Critic) | 5.48% ∗ | 1.45 |
| Researcher + Fixer + Criticizer (full) | 6.90% | 1.82 |
| Phase | Trigger / Focus | Best WC | Lift |
|---|---|---|---|
| Baseline | Hand-tuned (2–3 days) | 0.348 | 1.00 |
| Phase 1 | Agent: architecture discovery | 0.691 | 1.98 |
| Phase 2 | Human: scale to 10M + genre purity | 0.692 | 1.99 |
| Phase 3 | Human: content-only embedding pivot | 0.633 | 1.82 |
| Phase 4 | Human: behavioral+content pivot | 0.735 | 2.11 |
Autonomous Experimentation
Autonomous experimentation uses AI, active learning, and robotics to design, run, and interpret experiments with less human intervention.
See all 153 papers