AI Infra
0%
Part 0 · Chapter 3

Borrowed Ideas: What AI Took From Other Sciences

AuthorChangkun Ou
Reading time~12 min

The field rarely invents from nothing. Many of its central algorithms were borrowed from older sciences: information theory, physics, neuroscience, psychology, biology. The useful distinction is between two kinds of borrowing. Some borrowings became shared mathematics: the AI object and the original are provably the same equation. Others never got past shared vocabulary, a word taken without the mechanism behind it. Each of the stronger ones moves through the same three steps, from inspiration to formalization to the departure where engineering keeps what computes and drops the rest. That distinction will matter throughout the book, because some cross-disciplinary intuitions carry weight as mechanism and others are only pictures that help organize thought.

2026-06-21T23:50:08.669766 image/svg+xml Matplotlib v3.11.0, https://matplotlib.org/
Figure 3.1. Schematic of four borrowed ideas and how much of each behaves like a formal tool versus a risky metaphor in AI systems. Idealized relative scores, not measured data.

Compression is prediction

The deepest borrowing is also the most exact, and it is the one running under every model in this book. Shannon gave the field entropy, the average information in a source, the bit as its unit, and a result with a sharp consequence: the shortest possible code for a symbol drawn with probability pp has length log2p-\log_2 p bits (Shannon 1948). Read that identity backwards and it stops being about codes. A model that assigns probability pp to the next token (the next chunk of text it predicts) pays log2p-\log_2 p bits to encode it. A model's loss is a single number measuring how wrong its predictions are, a quantity training drives down; the cross-entropy loss the model is trained to minimize, summed over a corpus, is then exactly the size in bits of that corpus compressed under the model. Lowering the loss and compressing the text harder are the same act. The correspondence is precise rather than poetic: for any distribution there is a prefix code of length logP\lceil -\log P\rceil, and any prefix code defines a distribution, an identity Grünwald calls the most important observation behind the whole theory (Grünwald 2004), and arithmetic coding, which emits fractional-probability symbols as one near-optimal bit stream, realizes it to within a couple of bits of the entropy.

The runnable makes the equivalence concrete: a model that has learned the symbol frequencies compresses to the entropy floor, while an ignorant uniform model wastes bits, and the per-symbol cost of each is just its cross-entropy.

import numpy as np
from collections import Counter

msg = "abracadabra"
freq = Counter(msg); n = len(msg)
p_emp  = {c: freq[c] / n for c in freq}              # a model that learned the frequencies
p_unif = {c: 1 / len(freq) for c in freq}           # an ignorant uniform model

def bits(model):                                     # optimal code length under the model
    return sum(-np.log2(model[c]) for c in msg)

print(f"uniform model:   {bits(p_unif):5.1f} bits  ({bits(p_unif)/n:.2f} bits/symbol)")
print(f"frequency model: {bits(p_emp):5.1f} bits  ({bits(p_emp)/n:.2f} bits/symbol)")
H = -sum(p_emp[c] * np.log2(p_emp[c]) for c in freq)
print(f"entropy (the floor):              {H:.2f} bits/symbol")
print("a better predictor is a smaller file: cross-entropy in bits IS the code length")

This is not a metaphor that AI later adopted; it is the training objective. Delétang et al. drove the point home by running a trained language model as a literal compressor: Chinchilla 70B, trained on text, compresses ImageNet image patches to 43.4% of their raw size, beating PNG at 58.5%, and LibriSpeech audio to 16.4%, beating FLAC at 30.3%, on modalities it was never built for (Delétang et al. 2024). The catch sits in the depth of the claim, and it gets dropped more often than not: those are raw rates that ignore the compressor's own size. Counted in full, with a two-part code, an accounting that charges for the model description and then the data under that model, the LLM is a hopeless net compressor of any small file. So the rigorous statement is narrow and true, training minimizes description length, and the marketing statement, the LLM is a great compressor, holds only if the weights are free.

That two-part accounting is itself a borrowed principle. Rissanen's minimum description length (MDL) principle picks the model HH that minimizes L(H)+L(DH)L(H) + L(D \mid H), the bits to describe the model plus the bits to describe the data given it (Rissanen 1978), which turns Occam's razor into a computable criterion: the hypothesis that compresses most has learned most. The departure from the source is exact and locatable. The ideal version, measuring description length by Kolmogorov complexity, is provably uncomputable, so practical MDL deliberately scales down to a less expressive but computable model class, accepting that some genuinely regular sequences then become incompressible to it (Grünwald 2004). The engineering kept the principle and gave up the ideal.

Deep dive: where "compression = intelligence" stops being rigorous

The log-loss-equals-code-length equivalence is exact. Two louder claims built on top of it are not. First, that compressing well on a corpus implies predicting well on unseen data: this is a conditional inductive bet, not an identity, since a short code for what you have seen does not by itself bound error on what you have not. Second, that compression is intelligence, the thesis behind the Hutter Prize: this extends a precise statement about coding into a contested claim about cognition, and the extension is philosophical, not proven. The correlation itself has since been measured: across 31 public models, Huang et al. found benchmark scores tracking compression efficiency almost linearly, with Pearson correlations of about 0.95-0.95 (Huang et al. 2024). Where the equivalence is tight, at the training objective, rely on it; where the larger claims reach past it, treat them as still open.

A reward error the brain also computes

The next borrowing runs in the rare direction, from algorithm to biology. Sutton formalized temporal-difference learning in 1988 with a single move: assign credit by the difference between two successive predictions rather than between a prediction and the final outcome (Sutton 1988). Structurally the update is the ordinary supervised rule with one substitution, the actual outcome replaced by the model's own next prediction,

Δwt=α(Pt+1Pt)wPt,\Delta w_t = \alpha \, (P_{t+1} - P_t)\, \nabla_w P_t,

Here α\alpha is the learning rate, PtP_t and Pt+1P_{t+1} are the old and next predictions, and wPt\nabla_w P_t is the direction in weight space that would raise the old prediction. The important term is the difference Pt+1PtP_{t+1}-P_t: learning is driven by surprise between two predictions, not by waiting for the final reward. In the reward setting of Chapter 28 this becomes the reward-prediction error δt=rt+γV(st+1)V(st)\delta_t = r_t + \gamma V(s_{t+1}) - V(s_t) that drives the value update. Those symbols belong to that later chapter and are unpacked there; for a first read only the same difference shape matters here. This formalization came first. Nine years later Schultz, Dayan, and Montague, building directly on it, reported that midbrain dopamine neurons fire in proportion to exactly that quantity: they respond to an unexpected reward, fall silent once a cue reliably predicts the reward, and dip below baseline when a predicted reward is withheld, the signature of a prediction error rather than a reward signal (Schultz et al. 1997). An equation written to make a machine learn turned out to describe a circuit in the brain, which is why this borrowing is worth holding apart from the decorative ones.

It is also where the shared math is still being revised, which is the mark of a live connection rather than a closed analogy. Dabney et al. found that dopamine neurons do not all track the same scalar error: different neurons carry optimistic and pessimistic predictions, so the population encodes a whole distribution of future reward, the biological echo of distributional reinforcement learning (Dabney et al. 2020). The scalar prediction-error story was accurate enough to predict the cells. It was also incomplete, and those same cells keep revising it.

The physics inside diffusion

Physics lent the field a generative algorithm outright. The diffusion models of Chapter 12 were derived, not merely inspired, from non-equilibrium thermodynamics: Sohl-Dickstein et al. take a known forward process that slowly destroys the structure in a data distribution, step by step, into noise, then train a reverse process that restores it, and they build the construction on the physics machinery of Markov diffusion kernels and the Jarzynski equality from statistical mechanics (Sohl-Dickstein et al. 2015). The borrowing reached its departure quickly. The modern recipe keeps the forward-and-reverse mathematics and the training objective and sheds nearly all of the physics: practitioners rarely mention thermodynamics, the reverse pass is a long sequence of learned denoising steps rather than a physical relaxation toward equilibrium, and later work recast the whole thing in the language of scores and differential equations. The thermodynamics was the scaffold that got the building up, not part of the building.

What's contested

Whether the borrowing of physics extends to "emergence" is unsettled, and it is the sharpest open dispute in this chapter. Statistical mechanics supplied the framing decades ago, treating a learner's many parameters like a physical system and casting sudden improvements in a learning curve as phase transitions (Seung et al. 1992). Wei et al. reported the modern version, abilities that appear abruptly once a model passes a scale threshold, read as a phase-transition-like jump (Wei et al. 2022). Schaeffer et al. answer that the jump is mostly an artifact of measurement: discontinuous metrics such as exact-match accuracy manufacture sharp thresholds, while continuous metrics such as token edit distance or Brier score over the same models show smooth, predictable improvement, more than 90% of the reported emergent abilities sit under such discontinuous metrics, and one can conjure emergence in vision models by choosing the metric alone (Schaeffer et al. 2023). There is no consensus on whether emergence is a real transition or an artifact of the measurement.

Borrowings that stayed metaphor

The borrowings above became mathematics. Others took a word and left the mechanism behind, and reading them as more than a picture is a common way to overrate the brain analogy. Dual-process psychology is the clean case: the System 1 and System 2 labels, coined by Stanovich and West (Stanovich and West 2000) and popularized by Kahneman (Kahneman 2011), map loosely onto a single fast forward pass versus the deliberate chains of Chapter 30, and the picture organizes the design space well, but a model spending more tokens is not running a second cognitive system, and nothing in the architecture corresponds to the distinction. Evolution is similar from the other side: evolution strategies optimize a model by perturbing its parameters and keeping what scores well, and Salimans et al. are explicit that this is a class of black-box optimization, an alternative to gradient-based reinforcement learning, with nothing depending on living systems (Salimans et al. 2017). Biologically it borrows almost nothing, though as an optimization method it does real work.

Even the neuron is mostly a name. McCulloch and Pitts modeled a nerve cell as a threshold logic unit (McCulloch and Pitts 1943), Rosenblatt made it trainable in the perceptron (Rosenblatt 1958), and Hebb gave the rule that co-active cells strengthen their link (Hebb 1949), but the unit inside a transformer is a cartoon of a biological neuron, and the mechanism the field calls attention shares little with cognitive attention beyond the word. The deeper brain theories the field still watches, predictive coding, where the cortex sends predictions down and only the error up (Rao and Ballard 1999), and Friston's free-energy principle, where a system acts to minimize its own surprise (Friston 2010), remain genuine but unsettled as accounts of artificial systems. The pattern is the same each time: borrow, formalize, diverge. Trust the borrowings that became shared equations, the coding view of training, the dopamine match, the thermodynamic derivation of diffusion, as mechanism. Treat the ones that stayed shared words, neuron, attention, memory, the second system, as pictures that guided design without constraining it.

Further reading

  • Shannon, “A Mathematical Theory of Communication” (entropy, the bit, and the link between compression and prediction), 1948.
    Shannon founds information theory, defining entropy as the measure of information and establishing the limits of compression and reliable communication over noisy channels.
  • Rissanen, “Modeling by Shortest Data Description” (Minimum Description Length; model selection as compression), 1978.
    Rissanen introduces the Minimum Description Length principle, framing model selection as choosing the model that most compresses the data.
  • McCulloch & Pitts, “A Logical Calculus of the Ideas Immanent in Nervous Activity” (the artificial neuron as a threshold logic unit), 1943.
    McCulloch and Pitts give the first mathematical model of a neuron, showing networks of threshold logic units can compute any logical function.
  • Rosenblatt, “The Perceptron: A Probabilistic Model for Information Storage and Organization in the Brain” (the trainable single-layer perceptron), 1958.
    Rosenblatt introduces the perceptron, a trainable linear classifier with a weight-update learning rule, an early foundation of neural networks.
  • Hebb, Donald O.. The Organization of Behavior: A Neuropsychological Theory (Hebbian learning; co-active neurons strengthen their connection). John Wiley & Sons, 1949.
    Hebb proposes that learning strengthens synapses between co-active neurons (cells that fire together wire together), the basis of Hebbian learning.
  • Seung et al., “Statistical Mechanics of Learning from Examples” (statistical mechanics of generalization and learning curves), 1992.
    Seung, Sompolinsky, and Tishby apply statistical mechanics to learning, deriving generalization error and learning curves as a function of training-set size.
  • Schultz et al., “A Neural Substrate of Prediction and Reward” (dopamine encodes a temporal-difference reward-prediction error), 1997.
    Schultz, Dayan, and Montague show that midbrain dopamine neurons encode a reward prediction error, linking neuroscience to temporal-difference reinforcement learning.
  • Sutton, “Learning to Predict by the Methods of Temporal Differences” (temporal-difference learning), 1988.
    Sutton introduces temporal-difference learning, which updates predictions from the difference between successive estimates rather than waiting for the final outcome.
  • Rao & Ballard, “Predictive Coding in the Visual Cortex: A Functional Interpretation of Some Extra-Classical Receptive-Field Effects” (predictive coding; only residual prediction error propagates forward), 1999.
    Rao and Ballard propose predictive coding, where higher cortical areas predict lower-level activity and only the prediction errors propagate forward.
  • Friston, “The Free-Energy Principle: A Unified Brain Theory?” (adaptive systems minimize variational free energy (surprise)), 2010.
    Friston proposes the free-energy principle, arguing the brain minimizes a variational free-energy bound on surprise to perceive, learn, and act.
  • Kahneman, Daniel. Thinking, Fast and Slow (dual-process cognition: System 1 (fast) and System 2 (deliberate)). Farrar, Straus,Giroux, 2011.
    Kahneman contrasts fast intuitive System 1 thinking with slow deliberate System 2 reasoning, and the cognitive biases each produces.
  • Stanovich & West, “Individual Differences in Reasoning: Implications for the Rationality Debate?” (coined the System 1 / System 2 labels Kahneman later popularized), 2000.
    Stanovich and West introduce the System 1 / System 2 terminology for dual-process reasoning and analyze individual differences in human rationality.
  • Dabney et al., “A Distributional Code for Value in Dopamine-Based Reinforcement Learning” (distributional RL refines the scalar dopamine-RPE hypothesis: dopamine neurons report a distribution), 2020.
    Dabney et al. find that dopamine neurons represent a distribution over future rewards, giving biological evidence for distributional reinforcement learning.

Comments

Log in to comment