Quant Memo
Advanced

Occam's Razor and Minimum Description Length

Occam's razor says prefer the simplest explanation that fits — minimum description length turns that into a literal number: score a model by how many bits it takes to write down the model plus its remaining mistakes, and pick whichever total is shortest.

Prerequisites: Model Capacity and Complexity Control

"Prefer the simplest model that explains the data" is easy to say and hard to operationalize — simple compared to what, measured how? Two people can look at the same pair of models and disagree about which one is "simpler." Minimum description length (MDL) turns Occam's razor from a vague aesthetic preference into an exact number: measure simplicity in bits, the actual currency of information, by asking how many bits it would take to write down a description of the model plus a description of everywhere the model still gets the data wrong. The model with the shortest total description wins.

The analogy: describing a friend's route by a shortcut

To tell someone how to reach your house, you could give exact turn-by-turn directions for every single trip they might take from anywhere in the city — an enormous, over-specific message. Or you could give one compact rule ("take the highway to exit 12, then it's the third house") that works for almost every starting point, plus a short list of exceptions for the rare starting points where the compact rule fails. The second message is shorter overall, even after including the exceptions, precisely because it captured real structure rather than memorizing every case individually. MDL formalizes "the message that's shorter after you include the exceptions wins."

The formal principle

For a model MM and data DD, the total description length is:

L(M,D)=L(M)+L(DM)L(M, D) = L(M) + L(D \mid M)

In words: L(M)L(M) is the number of bits needed to specify the model itself (its parameters, its structure — a complex model with many parameters needs more bits to write down), and L(DM)L(D \mid M) is the number of bits needed to specify the data given that model, i.e., how much information is needed to describe everywhere the model's predictions miss (a model with high error needs more bits to encode its residuals, roughly log2P(DM)-\log_2 P(D \mid M) via optimal coding). MDL says: choose the model minimizing the sum, not the model minimizing either term alone. A model complex enough to fit data perfectly makes L(DM)0L(D\mid M) \to 0 but often blows up L(M)L(M); a model too simple to capture real structure keeps L(M)L(M) small but leaves L(DM)L(D\mid M) large. The minimum sits in between.

Worked example 1: comparing a memorized table to a formula

A dataset of 20 (x,y)(x, y) pairs follows y=2x+1y = 2x + 1 with small noise. Model A, a lookup table storing all 20 pairs exactly: L(MA)=320L(M_A) = 320 bits (20 pairs × 16 bits) and L(DMA)0L(D\mid M_A) \approx 0 (zero residual). Model B, the formula y=2x+1y=2x+1 plus residuals: L(MB)=32L(M_B) = 32 bits (slope and intercept) and L(DMB)=80L(D\mid M_B) = 80 bits (20 small residuals at 4 bits each). Totals: LA=320L_A = 320; LB=112L_B = 112. Model B wins decisively — the compact rule plus small exceptions beats the exhaustive table, even though the table has zero error.

Worked example 2: a model too simple to be worth it

Model C predicts a flat constant y=10y = 10 for every xx, ignoring the trend: L(MC)=16L(M_C) = 16 bits (one number), but L(DMC)=180L(D\mid M_C) = 180 bits, since every residual is now sizeable (true yy ranges roughly 1–41, so residuals up to ±30\pm30 at 9 bits each). Total LC=196L_C = 196 — worse than Model B's 112, better than Model A's 320. MDL correctly ranks all three: neither the maximally complex table nor the maximally simple constant wins; the model capturing the real structure does.

Function explorer
-2222.0
x = 1.00f(x) = 2.000

Try fitting the curve above with increasing polynomial flexibility — the point where residual error stops shrinking fast enough to be worth the extra coefficients' bit-cost is exactly the MDL-optimal complexity.

model complexity → L(M) L(D|M) L(M,D) total MDL-optimal
Model cost rises and residual cost falls with complexity; the total, summed, has a minimum at neither extreme — that minimum is the MDL-preferred model.

Minimum description length replaces the vague notion "prefer the simpler model" with a literal bit count: total description length is the model's own encoding cost plus the cost of encoding its remaining errors, and the model minimizing that sum is preferred — not the most complex model (which minimizes error but not size) and not the simplest (which minimizes size but not error).

What this means in practice

MDL gives a principled, information-theoretic justification for regularization — an L1 or L2 penalty (The Geometry of L1 vs L2 Penalties) can be read as an approximate bit-cost for the model's parameters, and choosing a penalty strength is implicitly choosing an exchange rate between model bits and residual bits. When comparing two factor models with different parameter counts, MDL-style reasoning ("does the added complexity earn back more than its own encoding cost") is a rigorous alternative to eyeballing an in-sample R².

The common mistake is treating "fewer parameters" as automatically "shorter description," without accounting for how much of the data each model actually explains. A model with fewer parameters that fits terribly still needs a very long L(DM)L(D\mid M) term to encode its large residuals — true MDL simplicity is about the total description length, not parameter count alone, and a parsimonious-looking model can lose to a moderately larger one that explains far more of the data.

Related concepts

Practice in interviews

Further reading

  • Rissanen, Modeling by Shortest Data Description (1978)
ShareTwitterLinkedIn