In machine learning, overfitting is the number one pitfall: a model learns the training data (including its flaws and noise) so well that it becomes unable to adapt to new data. In theory, when testing and tweaking a model hundreds of times on the same validation benchmarks, it should eventually ‘cheat’ by artificially adapting to those data.

However, a study conducted by the researchers at Amazon Science (Martin Bertran Lopez and Aaron Roth) shows that autonomous research agents based on language model (LLM) architectures avoid this trap. The reason? Information compression.

Applying Ockham’s Razor to Artificial Intelligence

To explain this phenomenon, the researchers rely on a well-known philosophical and mathematical principle: the Ockham’s razor, according to which the simplest explanation is generally the best.

  • Not enough space to cheat: If a learning method can be summarized in a few words or bytes, it simply does not have enough storage space to memorize the exact responses of the test data.
  • Capture the essence rather than the details: Since the strategy is ultra-compact but still works on the data, this proves that it has grasped the deep and general structure of the problem.

The role of LLMs as ‘decoders’ intelligent agents

The more expert your interlocutor is, the shorter your message can be. If you explain a cooking recipe to a beginner, you’ll need three pages. But to a starred chef, three words suffice: they will fill in the gaps with their general knowledge.

Large language models (LLMs) work just like that Michelin-starred chef: they possess a vast general knowledge in computing and mathematics. They can therefore decipher a tiny encoded message to reconstruct a complete training pipeline.

Amazon’s experience: the bottleneck (the Memento test)

To prove this theory, the researchers set up an original experiment involving three distinct AI agents:

  1. The Explorer: He attempts to solve a complex problem by conducting hundreds of trials and errors on a validation dataset (the ideal field for overfitting).
  2. The Compressor: It reads through the Explorer’s entire research history and must summarize the winning strategy in a concise prompt (only 16 to 32 tokens, i.e., just a few words or abbreviations).
  3. The Reproducer: This agent starts from scratch, with no memory or access to validation data (like the amnesic hero from the film Memento). It receives only the ultra-short message from the Compressor and must recreate the model.

A concrete example of compressed strategy

During a language modeling experiment, the Explorer spent hours finding an optimal configuration. The Compressor summarized it in just 16 tokens.

QKn 12L768 Mu .1 R² b2M 4x

For a novice human, it’s gibberish. For an expert AI agent, each symbol is a precise instruction (QK normalization, 12 layers of dimension 768, Muon optimizer with a learning rate of 0.1, squared ReLU activation, etc.). Result: the Amnesic Reproducer achieved exactly the same performance as the Explorer. However, reducing the message to 8 tokens resulted in a drop in performance, proving that these 16 tokens contained the true ‘recipe’ learned from the data.

A tool to uncover the patterns that ‘cheat’

This discovery serves not only to explain why AI generalises well: it also offers a daunting diagnostic test for detecting overfitting.

The researchers deliberately encouraged some agents to cheat by giving them direct access to the validation responses. As expected, these agents achieved artificially high scores. But when their strategies were passed through the ’necklace constraint’ of 32 tokens, their performances collapsed. Because their strategies relied on raw memorization rather than simple rules, it was impossible to compress them.

Cet article est rédigé par Blaise Grenier, Journaliste reporter d'images et auteur. Découvrir le parcours de l'auteur et la charte éditoriale »