TL;DR
Can AI coding agents do genuine machine learning research on their own, rather than just tweaking hyperparameters? In this paper, researchers gave two coding agents—Codex-5.4 and Claude Code (Opus 4.6)—a world model, a six-hour GPU budget, and an open-ended goal: make long-horizon predictions better. Across 64 independent sessions, the agents improved held-out performance in 63 cases, mostly by inventing structural changes to the model's architecture, loss function, or rollout logic rather than just tuning knobs.
What Problem Does This Paper Address?
World models—neural networks that predict how an environment changes in response to actions—are notoriously fragile over long time horizons. A model might nail the next frame ($h=1$), only to watch its predictions spiral into nonsense twenty steps later ($h=20$) as small errors compound.
Fixing this usually requires human researchers to form hypotheses, redesign architectures, or invent new training objectives. While automated machine learning (AutoML) can tune scalar hyperparameters like learning rates, it can't rewrite code. The authors ask: if you give a modern coding agent full permission to edit a model's code and run its own experiments, can it carry out an end-to-end research loop and discover interventions that actually generalize?
Methods
To isolate dynamics modeling from visual perception, the authors built a benchmark where models operate directly on structured entity states (JSON-like records of object positions, types, and alive/dead flags) rather than raw pixels.
They paired eight classic arcade games (from Asteroids and Breakout to Snake and Frogger) with four base model families: a recurrent state-space model (Dreamer-style), an autoregressive Transformer, a discrete diffusion model (D3PM), and MaskGIT.
For each of the 64 game–model combinations, either Codex-5.4 or Claude Code (Opus 4.6) was dropped into a containerized sandbox with one H100 GPU and a six-hour clock. Inside, the agent could read and rewrite the model and training script (train.py) and configuration (config.json), but the runner (run.py), validation scorer (score.py), and data were locked as read-only.
The agent's objective was a weighted composite score heavily biased toward long-horizon accuracy: $0.1 c_1 + 0.2 c_{10} + 0.7 c_{20}$, where $c_h$ combines entity position error and alive-status accuracy. After each 10-minute training run, the agent inspected the validation score, diagnosed a failure mode, edited the code, and tried again—conducting 1,335 candidate experiments in total.
Datasets
The benchmark dataset spans 152,000 episodes (over 158 million frames) across the eight games, with each session's training cache capped at 10,000 episodes. Crucially, to ensure the agents weren't just overfitting to the validation signal, the authors withheld two completely separate evaluations outside the container:
- A standard held-out test split for each game.
- A human-designed scenario suite comprising 60 scenario groups (1,860 episodes) engineered to isolate specific game mechanics, such as ball–paddle collisions, food consumption, or terminal events.
Key Insights and Ideas
- Agents go beyond hyperparameter tuning: Using an automated judge (Gemini 3.1 Pro) to classify code diffs, the authors found that 58 of the 64 winning interventions (91%) were "non-trivial"—meaning the agents modified the architecture, loss function, state representation, or rollout procedure rather than just nudging scalar hyperparameters.
- Rediscovering known ML principles from local failures: Without being told about concepts like exposure bias or objective mismatch, agents repeatedly converged on solutions to them—such as weighting later rollout steps more heavily in the loss, training on model-generated states, or reconstructing velocity from consecutive positions.
- Verification is the real bottleneck: Because autonomous agents can generate experiments faster than humans can read them, strict safeguards were essential. The authors audited all 64 sessions by hand for scorer tampering (finding none) and recomputed every headline number directly from saved checkpoints.
Key Results
- Consistent held-out gains: Agents improved the base model on the held-out test split in 63 of 64 sessions, with a mean lift of +0.196 (median +0.115) and only a single tiny regression (-0.001). On the unseen human-designed scenarios, 56 of 64 sessions improved (mean lift +0.170), correlating strongly with test gains ($r = 0.89$).
- Long-horizon dominance: Because the base models were already decent at one-step prediction ($0.808$ at $h=1$), the agents' gains concentrated where errors compound: +0.205 at $h=10$ and +0.215 at $h=20$, compared to just +0.056 at $h=1$.
- Beating standard AutoML: Both agents independently outperformed compute-matched random search and Optuna/TPE baselines. Combined, the agent envelope won 27/32 cells against random search and 25/32 against TPE.
Limitations and Future Work
The authors are candid about the boundaries of this autonomy. First, the setup is heavily scaffolded: humans chose the metric, the base models, and a prompt that explicitly hinted at promising directions like velocity handling and rollout-aware losses. Second, using exact structured states strips away perception and noise, leaving open how well these findings transfer to pixel-based world models.
Finally, a higher score is not the same as understanding. In one Racer session, an agent boosted its score simply by suppressing predicted motion—a clever calibration trick that worked because per-step motion in Racer is nearly zero, not because the model learned better physics. Future work will need to test whether agents can propose falsifiable mechanisms and design experiments to distinguish competing hypotheses, rather than just climbing a validation metric.
Summary updated