Why don't machine learning research agents overfit?

Sep 14, 2026 11:32 PM - 2 hours ago 1

Machine learning, astatine its core, is astir generalization, not memorization. You manus your learning algorithm a heap of training examples and usage them to fresh a model. But the extremity is not to execute good connected the training examples — that's easy, you could conscionable memorize the answers. The extremity is to execute good connected new examples that you person ne'er earlier seen. If a exemplary does good connected the information it was trained connected but poorly connected caller data, it hasn’t really learned anything; you person only fooled yourself into reasoning it has. This nonaccomplishment mode has a name: overfitting.

Anyone who has taken an introductory statistic aliases instrumentality learning people knows the modular defense. You clasp retired immoderate of your information and garbage to train connected it. In practice, this held-out information plays 2 roles. A validation set is 1 you consult many times while building the exemplary — to comparison candidates, tune hyperparameters, and determine what to effort next. A last test set (or holdout) is meant to beryllium touched only once, astatine the very end: because the training process ne'er saw it, beardown capacity location is simply a correct proxy for the caller examples you will brushwood successful the wild.

Machine learning, astatine its core, is astir generalization, not memorization

The “holdout” information is crucial, though. The correct-proxy guarantee holds if the held-out group stays genuinely unseen. If you cheque your capacity connected it, tweak your training process successful response, recheck, and iterate, chasing amended and amended numbers, that group is nary longer unseen; it has go portion of your training procedure. Do this capable times, and you tin overfit it conscionable arsenic you mightiness person overfit the training set, and you person mislaid your proxy for unseen data. This is existent of immoderate held-out group you reuse this way, including a validation set, which is reused by design.

A puzzle astatine the bosom of instrumentality learning

Real instrumentality learning investigation looks exactly for illustration the iterative betterment loop we conscionable described. Everyone gauges capacity utilizing a fistful of benchmark datasets that spell unrevised for years. The investigation organization repeats an enormous, distributed loop: measure a exemplary connected the benchmark, revise the training procedure, re-evaluate, publish, and fto the adjacent group eke retired a small much improvement.

This is precisely the benignant of hill-climbing against a held-out group that, by the textbook account, ought to nutrient rampant overfitting. By now, the leaderboards should beryllium saturated pinch models that look awesome connected the benchmark and mediocre everyplace else.

And yet that is not what happens. Studies that build wholly caller trial sets for old, heavy reused benchmarks person recovered that improvements mostly transfer: connected the caller data, models show the aforesaid gains they did connected the aged benchmark. Benchmark-driven instrumentality learning, against the textbook's prediction, has produced accelerated and mostly real progress. Why?

There is nary shortage of hypotheses, but they person been difficult to trial empirically, because the "subject" of the research is the full quality investigation community. You cannot reset a field, swipe its memory, and rerun the past decade nether controlled conditions.

But we tin do thing similar. We now person capable, LLM-based investigation agents that tin autonomously tally the aforesaid machine-learning optimization loops that quality communities run. They prosecute successful the aforesaid benchmark hill-climbing — and, intriguingly, they excessively look not to overfit. The quality is that an agent, dissimilar a investigation community, is thing you can reset. You tin clear its memory, power precisely what accusation it sees, and tally the research again. In a caller paper, "What fits (into fewer tokens) doesn't overfit: Compression and generalization successful ML investigation agents", we do precisely that — and successful the process connection a actual mentation for the long-standing mystery.

Occam's razor, made precise

The mentation originates pinch a very aged idea. Occam's razor says that among hypotheses that explicate the information arsenic well, the simpler 1 is much apt to beryllium correct. It turns retired this intuition has a precise mathematical form, and it is what underlies the full story.

Suppose you tin picture your presumption — your model, your strategy — successful a mini number of bits, acold less than it would return to memorize the training data. If that compact presumption performs very good connected the training data, it must besides execute good connected caller data.

Occam's razor, formalized: among hypotheses that explicate the information arsenic well, the simpler 1 — describable successful less bits — is much apt to generalize to caller examples.

The reasoning runs done a counting argument. There simply are not very galore short descriptions, because location are not very galore short strings. The less campaigner hypotheses location are, the little apt it is that immoderate 1 of them fooled you connected the training group by luck — moreover though you utilized the training group to guideline your search.

Another measurement to get the intuition: if your compressed explanation is excessively mini to secretly grounds the training data, past erstwhile it performs good connected the training data, it cannot beryllium because it memorized the answers — it didn't person abstraction to do that. It must beryllium because it captured thing existent astir the data's structure. Short descriptions cannot cheat because location isn't room.

Here is an charismatic hypothesis: successful instrumentality learning strategies are highly compressible. A interrogator mightiness look astatine thousands of benchmark scores complete the people of a project, but the strategy that yet survives is usually a short database of acquainted choices — an architecture family, an optimizer, a learning-rate schedule, a data-handling recipe, a regularization scheme. If that last look tin beryllium communicated successful conscionable a fewer bits, past the model's existent dependence connected the benchmark is acold smaller than the long, winding transcript of experiments would suggest. The hill-climbing was extensive, but the point that came retired the different extremity was — aliases could person been — tiny.

Compression, intelligence, and the powerfulness of a knowledgeable listener

Imagine trying to explicate a circumstantial instrumentality learning pipeline to a agleam high-school student, successful capable item that they could really reproduce it. It would beryllium a long, laborious conversation. You would person to explicate what gradient descent is, what a neural web is, what PyTorch aliases JAX aliases TensorFlow does, what a learning complaint is, and connected and on. Almost nary of that is circumstantial to your problem; it is wide inheritance astir really instrumentality learning works.

Now ideate explaining the aforesaid pipeline to an master ML engineer. The speech now collapses to a fewer sentences. You skip everything that counts arsenic communal knowledge and pass only what is genuinely circumstantial to this problem: the architecture choice, the batch size, the optimizer, a mates of hyperparameters. The much your listener already knows astir the world, the shorter the connection you request to nonstop — and the much aggressively you tin compress. None of this "world knowledge" counts against you successful the Occam's-razor argument, because you could person written each of that down without having looked astatine the training set.

This is wherever ample connection models participate the picture. Modern LLMs transportation an tremendous magnitude of world knowledge. They cognize really ML tooling works; they cognize the modular optimization algorithms; they cognize the accepted hyperparameter choices and the communal defaults. If a item is near unspecified, they tin capable successful a plausible value. That makes them extraordinarily bully compression decoders: manus an LLM a terse, expert-to-expert message, and it tin unpack it into a full, moving procedure. If you deliberation astir it, this is precisely why they are truthful powerful.

The experiment: Squeezing a strategy done a bottleneck

This suggests a cleanable experiment. Have an ML investigation supplier — the explorer — effort to lick a caller instrumentality learning problem. Give it afloat entree to a validation group and fto it research and iterate freely, chasing amended validation capacity complete hundreds of rounds. Here the validation group plays the domiciled of the benchmark: a reusable holdout the supplier queries again and again. This is the hill-climbing loop that ought to overfit.

Then trial really compressible the solution is. A 2nd agent, the compressor, sounds the full transcript of the explorer's activity and tries to distill the winning strategy into a very short punctual — conscionable a fistful of tokens. That punctual is handed to a 3rd agent, the reproducer, which must instrumentality the strategy from scratch utilizing only the punctual and the training data. Critically, the reproducer has no entree to the validation set, the explorer's code, aliases its transcript. The short punctual is the only transmission done which thing learned from the validation group tin scope it. (In the study we study successful our paper, the compressor and reproducer are some Claude models.)

If the reproducer — starting cold, equipped only pinch a fewer tokens — matches the explorer's performance, past each the validation-dependent accusation needed to specify the strategy fresh done that mini channel. The strategy was compressible. We telephone this a certificate of output compression.

The setup has a very useful spot that quality investigation communities lack: the reproducer tin beryllium reset complete and over. The compressor tin effort galore different compressions and spot really good each is decoded, because each effort lands connected a caller reproducer pinch nary representation of the past one. It is simply a small for illustration the movie Memento — you are leaving a terse statement for a type of yourself whose representation will beryllium wiped earlier reference it. You study to constitute notes that a knowledgeable but amnesiac transcript of you tin enactment on; those notes tin beryllium very short because the receiver will capable successful thing you time off unsaid precisely arsenic you would have.

In the researchers' experiments, an explorer agent's strategy is squeezed done a constrictive accusation bottleneck. Whatever survives compression must bespeak existent structure, not memorized data.

What comes retired the different end

The compressions move retired to beryllium remarkably small. Across 8 datasets — spanning tabular classification, image classification, connection modeling, diffusion modeling, and reward modeling — 32-token prompts were capable for a caller reproducer to lucifer the explorer's adaptively optimized models connected the ample mostly of problems. One language-modeling strategy survived compression down to conscionable 16 tokens pinch nary nonaccomplishment successful held-out performance.

What do these prompts really look like? The astir revealing examples are correct astatine the separator of conciseness wherever the compression almost breaks. In 1 language-modeling experiment, the explorer discovered a civilization GPT-style training recipe. Under a 16-token budget, this was still capable for caller reproducers to lucifer the uncompressed explorer:

QKn 12L768 Mu .1 R² b2M 4x

To a quality scholar this looks cryptic, but to different ML supplier it says thing concrete: QKn intends “QK normalization”, 12L768 intends a 12-layer, 768-dimensional transformer, Mu .1 intends the Muon optimizer pinch learning complaint 0.1, R² intends squared-ReLU activations, b2M intends a two-million-token batch, and 4x intends a fourfold feed-forward block. Cut the fund to 8 tokens, however, and the punctual becomes

12L768 Mu .1 R²

Now the reproducer nary longer matches the explorer. The missing pieces specified existent training choices that were made arsenic a usability of the information and disagree from the astir evident defaults. This bound shows the limits of compressibility and is important. It shows that the reproducer is not succeeding from anterior knowledge alone. A fewer compressed tokens are carrying genuine accusation learned from the information itself, and erstwhile those tokens disappear, truthful does the performance.

We besides ran a group of experiments that imposed an accusation bottleneck from the different direction. Instead of compressing the explorer's output, we compressed its input: alternatively than telling the explorer each model's numerical validation score, we returned only a azygous spot — did this exemplary hit the moving best, aliases not? Even reduced to 1 spot of feedback per query, the explorer recovered strategies arsenic bully arsenic those it recovered pinch afloat numerical scores. The transmission betwixt the validation group and the last strategy is constrictive successful some directions, and the one-bit type moreover comes pinch a rigorous mathematical guarantee connected generalization.

Across 8 datasets, strategies that emerged from hundreds of iterative experiments could beryllium compressed into prompts arsenic short arsenic 16 to 32 tokens — mini capable for a caller supplier pinch nary representation to reproduce the original results.

Catching cheaters

A bully empirical mentation should beryllium falsifiable — and this 1 is. If debased overfitting is really explained by compressibility, past models that genuinely overfit should neglect to beryllium compressible via this pipeline.

To check, we deliberately pushed agents into overfitting by handing them nonstop validation-set entree and prompting them to maximize validation capacity astatine immoderate cost. The agents took the bait: successful 38 of 102 experimental runs, validation accuracy ran much than 10% up of existent held-out accuracy.

The mentation predicts that these gains should not past the compression bottleneck, because they encode idiosyncrasies of circumstantial validation examples, not transferable structure. Sure enough, erstwhile squeezed done a short punctual to a caller reproducer, the validation-specific advantages vanished. Compression separated the morganatic strategies from the overfitting ones pinch very precocious accuracy.

So compression does not simply explain why autonomous investigation agents thin not to overfit but offers a instrumentality for catching overfitting erstwhile it does occur, by flagging the cases wherever nary short explanation tin reproduce the result.

What this tells america — and what it doesn't

A fewer caveats are successful order. The full model assumes that the only way from the validation information to the last exemplary runs done the punctual we provender the reproducer. Of course, if a exemplary had memorized the validation information during pretraining, it would person a broadside transmission that bypasses the accusation bottleneck we are trying to impose. We don't deliberation that is what is happening successful our experiments: agents amended gradually done existent hunt alternatively than starting astatine their best, and capacity degrades astatine very short token budgets. But afloat resolving this mobility will apt require experimenting pinch caller datasets collected aft a model's training cutoff, which we haven’t done.

Most importantly, our results are astir LLM agents, because that is wherever the research is imaginable — wherever you tin reset the subject, power its inputs, and count their length. But the image they overgarment is powerfully suggestive astir quality investigation communities too. When a section spends years climbing a fixed benchmark, and the gains support transferring to caller data, it whitethorn beryllium for the aforesaid logic the agents' strategies past a 32-token prompt: the recipes that really activity are simple. Or successful different words, "What fits (into fewer tokens) doesn't overfit."

Acknowledgments: Steven Wu

More