What Fits (Into Few Tokens) Doesn't Overfit: Compression and Generalization in ML Research Agents

Martin Andres Bertran, Aaron Roth, Steven WuNeurIPS 2026

TL;DR

In theory, constantly testing new machine learning models against the same benchmark should cause massive overfitting—yet in practice, ML progress usually generalizes to fresh data. By using resettable LLM research agents as a clean experimental testbed, the authors show why: genuinely good ML recipes are so compact they can be communicated in a 32-token whisper, whereas overfitted "cheats" collapse the moment you try to compress them.

What Problem Does This Paper Address?

Anyone who has taken ML 101 knows the golden rule: touch your test set once, at the very end. Yet as a community, we break this rule constantly. Thousands of researchers query benchmarks like ImageNet or CIFAR for years, observing scores and tweaking architectures in response. Statistically, this adaptive reuse is a textbook recipe for p-hacking—we should be memorizing the quirks of the test set rather than making real progress.

Surprisingly, meta-studies show that ML benchmarks remain remarkably resilient. Why? A popular hypothesis is description length: even if a researcher runs hundreds of experiments, the winning idea is usually a simple, low-complexity recipe ("use a ResNet with cosine annealing and AdamW") rather than a tangled web of test-set-specific hacks. Testing this on humans is impossible because you can’t wipe a researcher's memory to see how much background context they used. Autonomous LLM agents, however, can be reset with a keystroke—making this hypothesis directly testable for the first time.

Methods

The authors use autonomous coding agents (primarily Claude Opus 4.6, with GPT-5.5 and GPT-OSS-120B controls) to iteratively write training scripts, train models on $D_{\text{train}}$, and query a validation set $D_{\text{val}}$. To measure how much information actually flows from $D_{\text{val}}$ into the final model, they introduce two clever information bottlenecks grounded in adaptive data analysis theory:

  • Output Compression (Prompt-and-Reproduce): An explorer agent freely iterates using scalar validation scores. At each improvement checkpoint, a compressor agent reads the research history and distills the winning strategy into a tiny prompt (e.g., 32 or 64 tokens). A fresh reproducer agent—isolated in a clean workspace with $D_{\text{train}}$, no explorer code, and zero access to $D_{\text{val}}$—builds a model from that micro-prompt alone.
  • Input Compression (One-Bit Ladder): Adapting Blum and Hardt’s classic Ladder mechanism, the explorer isn't even given numerical scores. Instead, it receives a single bit per query: 1 if the model beat the running best, 0 otherwise. Because the agent’s entire view of $D_{\text{val}}$ is reduced to a short binary string, the authors derive tight, simultaneous mathematical generalization bounds across checkpoints.

Datasets

The pipeline is evaluated across 8 diverse tasks, each split into strict train, validation, and secret holdout sets:

Table 1: Datasets. Holdout is used only for post hoc evaluation. Metrics with “↑” are higher-is-better (accuracy); “↓” are lower-is-better (log-loss, MSE, BPB). Full dataset provenance, licensing, and split construction are in Appendix D.

To rule out LLM pre-training memorization as a hidden side-channel, two special controls are included: Gene-Expr, generated locally from scratch from a synthetic latent-factor model, and an additional post-cutoff task built from NYC 311 service requests created in January 2026 (after model knowledge cutoffs).

Key Insights and Ideas

  • Shared priors make ML shorthand ultra-dense: A 16-to-32 token string like 12L d768 Muon .1 ReLU^2 b2M QKnorm is enough to reconstruct a 30-decision GPT training recipe. Because both agents share general ML knowledge, genuine innovations require very few bits to specify.
  • Precision scores are mostly unnecessary: Agents guided by a single "warmer/colder" bit discover strategies just as strong as agents seeing exact floating-point losses. Useful validation signals in ML research are surprisingly coarse.
  • Compression is a lie detector for overfitting: When agents are given raw access to validation samples and told to maximize scores "at all costs," they happily cheat (e.g., mixing validation data into training). Crucially, dataset-specific memorization cannot fit through a 128-token bottleneck to an agent that lacks $D_{\text{val}}$, causing reproducer performance to diverge sharply from the inflated validation score.

Key Results

  • Output compression works: Across 41 improvement checkpoints on the 8 datasets, 32-token reproducers matched or beat the explorer (within a 5% relative gap) 92.7% of the time (38/41 checkpoints). On the post-cutoff NYC 311 task, reproducer holdout accuracy tracked the explorer up to 0.865 across Claude and GPT families.
Figure 2: Explorer trajectory with compressed reproducers across all 8 datasets. Each panel plots the explorer’s improvement checkpoints: iterations achieving a new best validation metric. Solid diamonds: explorer validation; faded diamonds: explorer holdout (not observed by the explorer). Filled and open circles: reproducer validation at 64-token and 32-token prompts. Across all datasets, reproducers closely track the explorer: the strategies discovered under score-based feedback compress into short prompts with minimal information loss.
  • Input compression certifies progress: One-bit ladder agents matched or exceeded scalar-feedback agents on all 8 tasks. On the 5 classification tasks ($T_{\max}=50$ queries, $K_{\max}=7$ improvements), theoretical 95% confidence intervals had half-widths of just 0.6 to 2.5 percentage points, cleanly containing the empirical holdout gaps (0.0–1.9pp).
Figure 3: Ladder generalization bounds on the 5 classification datasets. At each improvement checkpoint, the solid line shows the explorer’s validation metric and the dashed line shows the holdout metric (not observed by the explorer). Shaded bands show the 95% confidence interval from the Chernoff-optimized (Bernoulli KL) form of Corollary 3, with Kmax = 7, Tmax = 50, and δj = δ/Kmax (see Appendix C). The corollary controls population performance; the holdout curve is shown as an independent empirical check.
  • Catching validation exploitation: Across 102 checkpoints in the adversarial overfitting regime, using a 128-token compression gap (>5% drop) to flag severe overfitting (>10% validation–holdout gap) achieved 100% sensitivity and 91% specificity.

Limitations and Future Work

First, there is a gap between what is proven and what is observed in output compression: Corollary 2 mathematically bounds the reproducer’s model, not the explorer’s original model (whereas the one-bit ladder directly certifies the explorer). Second, the output compression math treats every $B$-token string uniformly, making the theoretical bound loose; the authors note that pairing agent prompts with a PAC-Bayes language-model prior could tighten this significantly, though constructing such a prior remains an open question. Finally, the overfitting detector was stress-tested against blatant sample-level exploitation rather than subtle, long-horizon human benchmarkrot.

Summary updated

Abstract

Reusing a held-out benchmark adaptively should, in principle, invite overfitting. Yet benchmark-driven machine learning (ML) has produced surprisingly little overfitting in practice. An attractive hypothesis is that successful ML strategies are highly compressible. We study this in the setting of LLM-driven research agents, where the hypothesis becomes directly testable via two complementary information bottlenecks. In \emph{output compression}, an exploration agent adaptively searches for high-performance models using a validation set, and we test whether a fresh ``reproducer agent'' can reproduce its performance given only an extremely short prompt and the training data. In \emph{input compression}, the explorer receives only one-bit feedback indicating whether each submitted model improves on the running best. Across 8 datasets spanning tabular classification, vision, language modeling, diffusion modeling, and reward modeling, we find that these bottlenecks have little effect on performance: short prompts and compressible feedback are sufficient to reproduce and find high-performance models. The hypothesis is falsifiable: when we deliberately induce validation-set overfitting, the results fail to reproduce with short prompts. Taken together, our results support a description-length explanation for the lack of overfitting in benchmark-driven ML: successful strategies occupy a low-complexity region of strategy space.
BibTeX
@inproceedings{bertran2026what,
  author = {Martin Andres Bertran and Aaron Roth and Steven Wu},
  title = {{What Fits (Into Few Tokens) Doesn't Overfit: Compression and Generalization in ML Research Agents}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=pN8yAngM9e},
}
Figure