· Source: Wu, Qiang, Zhuang et al. (Google Research, Google DeepMind, UIUC), BuggyMLE: Scaling Machine Learning Engineering Difficulty with Bug Injection, arXiv:2611.25088, 18 Nov 2026. Surfaced by Elvis Saravia (DAIR.AI).
The short version
Repository-level coding benchmarks are saturating, and most ML-engineering benchmarks still confine agents to single-file edits. The paper makes two moves. First, it fits a Code Complexity Index (CCI): ten structural features of a repository and its fix (repo size, file count, directory depth, dependency count and chain depth, files changed, hunks, lines added, removed and total delta), combined with four parameters. Fitted on task medians from eight public coding benchmarks, CCI predicts their average solve rates with R² ≈ 0.95, and patch size and complexity are the strongest predictors. Second, it uses that finding as a dial: BuggyMLE has an agent inject controlled bugs into working ML repositories at a target mutation budget, so the same codebase can yield an easy task or a brutal one.
Results: about 6,600 bug-injected variants (roughly 260K injected lines) from 222 source repos; a graded, repository-level BuggyMLEBench-Lite derived from MLE-Bench Lite where the best of 14 models falls from a 95% solve rate on the easiest tier to 9% on the hardest; and a Qwen3.5-9B fine-tuned (LoRA, SFT then RL) on an easy-to-hard curriculum over 200 further repos that rivals frontier models on the benchmark and transfers outside ML (SWE-bench Lite 24% → 33%, LiveCodeBench v6 pass@1 69% → 71%).
The claim worth carrying away: difficulty is mostly a property of code structure and patch reach, not model identity, so you can manufacture harder tasks and training data from repos you already own.
How the pipeline works
A four-stage, YAML-configured pipeline, every stage running in a GPU-enabled Docker sandbox with a shared tool harness:
Curate. An auditor keeps candidate repos that run fast, produce a stable metric across runs, and have a responsive metric (one that moves when code changes). A repo whose metric doesn't move can't grade a repair.
Inject. An LLM agent explores the clean repo and introduces plausible bugs wherever they fit (data loading, preprocessing, architecture, training, evaluation). There is no fixed bug taxonomy. Difficulty comes from the mutation budget: a required number of files, hunks and lines. Deterministic scripts accept an injection only if (a) the diff meets the budget, (b) the run crashes or degrades the metric by more than three standard deviations of clean run-to-run variance (or 10% when variance is unknown), and (c) a completed run still emits a valid metric. Failures go back to the injector with diagnostics, up to five retries.
Attribute (the oracle). A multi-hunk injection can mix real bugs with harmless edits. The oracle first reverts mutations in ranked order until baseline performance returns (a minimal reverting set), then applies each mutation alone to the clean repo to measure its isolated effect. Output: a verified checklist of impactful bugs, with inert edits kept as decoys.
Solve and evaluate. A debugging agent gets only the buggy repo: no clean reference, no bug list. Its fix runs in a clean container and is graded on recovered ML performance, on an oracle-grounded LLM code review, and on anti-bypass checks for cheating.
Because difficulty is a budget on the same repository, the curriculum can be graded while holding repo distribution and data modality fixed. That isolates "harder" from "different".
What the results say
Graded difficulty works. Tiers of 1, 5, 10 and 50 bugs (the top tier roughly doubles repo size with 23 to 60 bugs) separate models cleanly, and the hardest tiers stay unsaturated.
Realism raises difficulty. An expert judged 27 of 30 sampled bugs plausible in production ML code. The bugs rated most realistic were resolved least, typically plausible-but-wrong modelling choices (misconfigured label smoothing, over-aggressive negative subsampling) that no static check would flag.
Observability is the main determinant. "Silent" bugs leave the validation metric intact and only corrupt test-time predictions. The paper's example is a label-indexing off-by-one that keeps validation at 0.953 while the test score drops to 0.017. Every model fixes these far less often than visible ones. Output-formatting and submission bugs were hardest for everything except models trained on high-complexity curricula.
Curriculum transfers to general code repair, but transfer to from-scratch ML solution generation is mixed.
Why it matters for engineering teams
Your own repos are an eval factory. Any repo with a fast, stable, responsive metric can be mutated into graded regression tasks for a coding agent. No new benchmark is required, and contamination drops because the tasks didn't exist before.
Patch reach is the lever. If you want to know how an agent will cope with your codebase, measure how many files and hunks a typical fix touches. That predicts more than which model you pick.
Validation metrics lie. The silent-bug result is a warning for any agent that self-verifies against a metric it can see: an agent optimising a visible number can "pass" while the held-out behaviour is broken. Keep a held-out check the agent can't read.
Tradeoffs and limits
CCI is structural only. It ignores semantic complexity, and the authors report it predicts poorly on standalone-program benchmarks (for example, algorithmic tasks) compared with repository-scale ones.
Fit on eight benchmarks. Leave-one-benchmark-out is stable, but BuggyMLE tasks were excluded from the fit to avoid circularity. Calling it a general law needs broader and independently generated data.
Injected bugs are not organic bugs. Realism checks are encouraging (an LLM judge plus 30 expert-reviewed samples), but the distribution of injected defects still reflects what the injector model finds plausible.
Cost. Every acceptance check and oracle pass reruns training or evaluation in a GPU container. That suits repos with fast, cheap metrics, and most production training pipelines are not like that.
Grader dependence. Part of the grade comes from an LLM judge, and anti-bypass checks are only as good as the bypasses someone thought of.
Failure modes to watch if you build this
Unresponsive or noisy metrics. Without the variance gate, harmless edits count as "bugs" and real fixes look like noise.
Decoy confusion. Skip the two-pass attribution and solvers get penalised for not "fixing" inert edits, or rewarded for reverting everything.
Reward hacking. Solvers can hard-code outputs, weaken the eval, or copy test labels. Grade in a clean container and check that the evaluation code is unchanged.
Curriculum leakage. If training and eval repos overlap, apparent gains are memorisation. The paper uses disjoint splits; check that yours are too.
Over-trusting visible validation. Agents fixing silent bugs need a test-time check they can't see during repair.
Review checklist
Does each source repo have a fast, stable and responsive metric, with its run-to-run variance measured?
Is difficulty set by an explicit mutation budget (files, hunks, lines) rather than by hand-picked "hard" bugs?
Is every accepted bug isolated and confirmed to matter on its own, with inert edits tracked as decoys?
Does the solver work without the clean reference and without a bug list?
Is grading done in a clean container, with anti-bypass checks and a held-out test signal the solver can't read?
Are training and evaluation repositories disjoint?
Do you report results per tier and split visible from silent bugs, rather than one averaged number?
Related entries
R185 Benchmark Factory: coding evals built from your own merged changes. Both mine an organisation's own code for tasks; Benchmark Factory replays real landed changes, BuggyMLE synthesises graded bugs.
R078 SatBench: how fast AI benchmarks saturate. This entry is a response to that saturation: a difficulty dial instead of a new fixed benchmark.
R086 Agents doing AI engineering: four November 2026 benchmarks. Same target domain, agents doing ML engineering work.
R126 Harness adapters: RL-tuning an open model for one coding agent. Another small open model closing the gap through task-specific training.
R103 A protected evaluator the optimising agent cannot read, which is the fix for the silent-bug problem.