← Latest papers
💻 computer science

Every Neural Network Is a Code: A Unified Theory of Implicit Coding in Neural Networks

This paper proposes a unified theory of neural networks based on "implicit code length" as a fundamental, measurable quantity that satisfies Kraft's equality and a compression identity, thereby characterizing inductive bias as a fixed budget and providing exact, experimentally verified accounting for learning dynamics across diverse architectures, training regimes, and phenomena like double descent and in-context learning.

Original author: Luca Eliseo Pavesi

Published 2026-11-17
📖 7 min read🧠 Deep dive

Original author: Luca Eliseo Pavesi

Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). ✨ This is an AI-generated explanation of the paper below. It is not written or endorsed by the author. For technical accuracy, refer to the original paper. Read full disclaimer

Deep learning has transformed how machines see, speak, and reason, yet the theory behind it remains a patchwork of local explanations. We know that neural networks can memorize random noise, that they sometimes improve after seeing more data, and that they generalize well to new situations, but we lack a single, universal ruler to measure why. The field has struggled to find a quantity that applies to every type of network and every training method, one that can be measured on real systems and that definitively states what a machine can and cannot learn. Without such a measure, the theory is like a collection of maps for different cities, with no common language to describe the terrain itself.

A new study proposes that this universal ruler already exists, hidden in plain sight within the training process itself. The researchers argue that every neural network, regardless of its architecture or the optimizer used to train it, is fundamentally a code. When a network learns, it is essentially compressing information, assigning a specific "cost" to every possible pattern of answers it might encounter. This cost is measured in units called nats, a way of quantifying how many bits of information are needed to transmit a message. The core idea is that a network's ability to learn is limited by a fixed budget of this information. Just as a traveler cannot carry more luggage than their backpack allows, a network cannot assign high confidence to every possible outcome simultaneously; it must choose which patterns to favor and which to ignore. This choice is its "inductive bias," and the study treats this bias not as a vague property, but as a concrete, measurable distribution of probability that obeys strict mathematical laws.

The researchers developed a unified theory based on this concept of implicit coding. They proved that for any learner, the total probability assigned to all possible labelings of a dataset must sum to exactly one. This is a conservation law: the network has a fixed amount of "mass" to distribute. If it becomes better at predicting one specific pattern, it must necessarily become worse at predicting others. This turns the famous "no free lunch" theorem—which suggests that no single learning algorithm is best for every problem—into a precise accounting identity. The study shows that the exchange rate between tasks is explicit: any gain in performance on one task is paid for by a loss on another, and the cost is measured in nats.

To test these ideas, the author did not rely on large-scale simulations or approximations. Instead, they performed exact enumerations on small, controlled datasets. They took tiny sets of inputs, perhaps ten or twelve points, and calculated the network's prediction for every single possible way those points could be labeled. Because the number of possible labelings is finite, they could compute the exact "code length" for every scenario. This allowed them to measure the network's implicit prior—its hidden belief about the world—without any estimation error. They found that the theory held up perfectly: the conservation law was satisfied to the limits of computer precision, and the trade-offs between different tasks matched the predicted exchange rates.

One of the most striking findings concerns the role of symmetry. Neural networks often have built-in symmetries, such as the ability to treat different classes of objects as interchangeable until they learn otherwise. The study proved that this symmetry comes with a tax. If a network has not yet learned which class is which, it must pay a cost to distinguish them. This cost is not a penalty for being wrong, but a fundamental price for the act of naming. The researchers showed that breaking a symmetry, for example by initializing the network in a specific way, does not remove this tax; it merely moves it. The network might find one specific naming of the classes cheaper, but it must pay more for the other possible namings. The total cost remains the same, redistributed within the group of possibilities.

The paper also investigated how the size of a network affects its learning. A common intuition is that larger networks are more flexible and therefore have a flatter, more uniform prior. The researchers tested this by measuring the entropy, or randomness, of the network's implicit prior as they increased its width. Their results were surprising and depended heavily on how the network was scaled. In some standard training setups, widening the network did make the prior more concentrated, supporting the idea that larger models focus on fewer, more likely patterns. However, in other setups designed to keep the learning dynamics stable, widening the network did not concentrate the prior at all. This suggests that the "size" of a model is not the primary driver of its learning behavior; rather, it is the specific way the model moves through its learning space that matters.

The study also put a price tag on phenomena that have puzzled researchers for years, such as "double descent," where adding more data temporarily hurts performance before helping it. The researchers showed that this temporary dip is a burst of information cost. When a network hits a threshold where it can perfectly fit the data, it pays a high price in nats to resolve the uncertainty. This price is not a bug but a feature of the learning process, charged against the network's total information budget. Similarly, they measured the cost of "delayed learning," where a network sits on a plateau of poor performance before suddenly improving. They found that this delay costs thousands of nats, a massive information debt that the network must eventually repay to learn the task.

The researchers also explored how the order in which data is presented affects learning. They found that changing the sequence of examples can shift the network's entire implicit prior as much as changing the random seed used to initialize it. This means that the "bias" of a network is not just a property of its architecture, but also of the specific order in which it sees the world. This sensitivity suggests that the history of training is as important as the final result.

While the theory is exact for the small datasets tested, the author acknowledges that scaling these results to massive, real-world networks remains an open question. They proposed three specific conjectures to guide future research. One conjecture suggests that different types of networks should agree on which natural tasks are hard, up to a constant factor. Another suggests that tasks that are easy for a network should also be easy to compress with simple algorithms. A third, which they tested and partially refuted, suggested that larger networks always concentrate their prior more tightly. The results showed that this last idea is not universally true; it depends entirely on the training method used.

Ultimately, this work reframes the entire field of deep learning. Instead of viewing neural networks as mysterious black boxes that somehow generalize, the author presents them as transparent codes that obey strict conservation laws. Every prediction, every mistake, and every moment of learning is a transaction of information. The study provides a new language for the field, one where the success of a network is measured by how efficiently it writes its code, and where the limits of learning are defined by the fixed budget of information available to the system. The findings do not solve every mystery of deep learning, but they provide a solid, measurable foundation upon which to build a more complete theory.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →