Posts · Foundations

What the Middle Layer Forgot

A middle layer of description forgets detail, and to keep running it has to put something back in its place. That stand-in can change where the system ends up. A paper measures the change exactly, and shows that the usual checks on a layer cannot reliably see it.

Two rows, each with three circles, the first two enclosed together in a dashed outline. In the top row the first circle is filled and an arrow leads to two boxes, the first full and the second empty. In the bottom row the first two circles are each half filled and the arrow leads to two boxes, each half full.

Suppose you pause a game of chess, write down only how many pieces each side has, and later resume from some typical position with that material. The game you continue is not the game you paused. Nothing went wrong in the counting. What changed the game is that, to keep playing, you had to put a particular position back on the board.

That analogy is mine, but the problem is the one taken on by Part III of A Typed Calculus of Coarse-Graining, a paper in the Six Birds series behind this site. Coarse-graining means describing a system with less detail, as the piece count describes a chess game. In the paper's words: "A middle layer does not merely forget detail; to keep operating it must reconstruct a representative of what it forgot, and the reconstruction rule is part of the theory."

Two routes to the top

The setting is a system described at three levels of detail. At the bottom are its detailed states. A middle layer groups those states into classes, and a top layer reads off whatever is finally observed. The system moves at random, so its state at any time is a probability distribution over the detailed states. It runs for a while, then runs some more, and the question is what the top layer sees at the end.

There are two ways to compute it. The direct route runs the detailed system the whole time and reads the top layer once, at the end. The staged route pauses between the two stretches, reads the middle layer, and then has to continue from there. Since the middle layer only knows the class, it replaces the detailed distribution with a stand-in fixed in advance for that class, which the paper calls the prototype, and runs on from the stand-in. The stand-in can be a single state or a spread of probability over the class.

It is natural to suspect that summarizing a summary loses something. It does not: reading the middle layer and then reading the top from it gives exactly the same answer as reading the top directly, and the paper states this as a theorem. The difference comes only from putting a stand-in back and letting the system run on from it.

The smallest example

The paper's running example has three states, 0, 1 and 2. The middle layer lumps 0 and 1 together into one class and keeps 2 on its own. To keep the example minimal, the top layer reads the same two classes; what matters is that the staged route pauses at the middle layer. The stand-in for the class {0, 1} is half and half.

In the first stretch of time, every state moves to 0. In the second, 0 stays put, 1 moves to 2, and 2 moves to 0.

Run it directly. After the first stretch the system is certainly at 0, and the second stretch keeps it there, so the top layer sees the first class with certainty: (1, 0).

Run it in stages. After the first stretch the middle layer sees the class {0, 1} and forgets which state it was. It puts back the stand-in, half on 0 and half on 1. Now the second stretch sends the 0 half to 0 and the 1 half to 2, so the top layer sees (1/2, 1/2). The image at the top shows the two routes.

The paper measures the gap as the largest difference between the two routes' final readings, over all starting states, in total variation, a standard distance between probability distributions that runs from 0 to 1. Here the gap is 1/2. Small changes can make it vanish: if the second stretch does nothing, or if the top layer lumps everything into one class, the routes agree. And no example with fewer than three states has any gap at all: with two states, a class either holds both, so the top sees only one class, or holds one, so the stand-in is exact.

How big the gap can be

The paper's main bound splits the gap into two factors. The first is the misfit: how far the stand-in moves the distribution that actually arrived at the middle layer. In the example, what arrived was certainly 0, and the stand-in is half and half, so the misfit is 1/2. The second is the exposure: the largest difference the later dynamics makes, as seen from the top, between two states that the middle layer lumps together. In the example, the second stretch sends 0 to the first class and 1 to the second, as different as can be, so the exposure is 1.

The theorem says the gap is at most the misfit times the exposure, and the constant in front, 1, cannot be improved. The example attains the bound: 1/2 times 1 is 1/2. The paper gives a family of examples whose gap is exactly the product, for every pair of rational values between 0 and 1.

Two panels on states 0, 1 and 2, with 0 and 1 grouped in one class. Left: all the weight arrived at 0, and the stand-in puts half on 0 and half on 1, so half the weight is moved: misfit 1/2. Right: the second stretch sends 0 to the first top class and 1 to state 2 in the second: exposure 1. Below: gap at most misfit times exposure, 1/2, and here the gap is exactly 1/2.
The paper's smallest example, with both factors of the bound. Putting the stand-in back moves half the weight; the next stretch then sends the two lumped states to different classes at the top. Multiply the two and you get the most the routes can differ, which this example reaches.

Both factors are needed. A stand-in can be badly wrong in a direction the later dynamics never notices, and dynamics that pull lumped states apart do no harm if what arrives already matches the stand-in.

Why not just pick a better stand-in? In the example, putting all the weight on 0 would remove the gap for this arrival. But the stand-in is fixed for the class in advance, because the middle layer does not know what arrived. A stand-in on 0 would be just as wrong for a system that arrived at 1.

When the routes always agree

When do the two routes agree whatever arrives at the middle layer? The paper's answer is exact: precisely when the exposure is zero, that is, when the later dynamics treats any two lumped states identically as far as the top layer can tell. Probabilists call a grouping lumpable when states in the same class always lead to the same mix of classes, an idea that goes back to Kemeny and Snell's textbook on Markov chains (cited in the paper). The paper's condition is a relative version, weaker because it only has to hold for what the top layer reads. The ordinary version is the condition when the routes must agree for every top layer too.

The two routes can also agree for one particular arrival by luck. The paper builds a four-state example in which the misfit and the exposure are both positive and yet the gap is zero, because, for that one arrival, the errors cancel. "There are two very different ways for the two routes to agree," it notes: for every arrival, or for this one.

The checks a layer usually passes

Earlier papers in the series audit a layer with two numbers. Retention takes each class's stand-in, runs the dynamics, and asks whether the result stays in that class. Idempotence takes the layer's combined step, run and then replace with the stand-in, and asks whether doing it twice gives the same as doing it once. They sound like they should catch the problem. The paper's verdict: "Neither number is a composition audit."

It proves that no rule can compute the gap from those two numbers. In one four-state example, both audits fail completely, yet the gap is 0 under one choice of top layer and 1/2 under another. The audits look only at the middle layer, and the gap depends on what the top layer reads.

Passing the audits does not settle it either. In one small example the layer passes the idempotence check exactly and the gap is 1, as large as it can be. In another, retention is perfect and the gap is 1/4. There is one condition under which passing does work. If every stand-in puts at least some weight on every state of its class, perfect retention forces the gap to zero for every arrival, every choice of stand-in and every top layer. In the examples where the audits pass and a gap remains, the stand-ins sit on single states and leave others in their classes uncovered. And a layer can fail retention badly while its routes agree perfectly: "Exact composability coexists with arbitrarily poor retention."

Many layers

A real description may have many layers, each with its own stand-ins. The paper shows that the difference between the routes is an exact sum of one term per layer, and that each term obeys its own misfit-times-exposure bound. So the gap is at most the sum of the per-layer bounds. Errors add up across layers, but they do not multiply, as copying errors can when each copy is made from the last: in the paper's words, stacking layers "introduces no exponential amplification."

Each layer's term is a difference between two distributions, and two such differences can point in opposite directions. So the terms can also cancel. A five-state example shows it. In two versions of a tower with two middle layers, the per-layer budgets are identical and sum to 1/2. In one version the gap is 1/2, the full budget. In the other, the two layers' errors are equal and opposite, and the gap is 0. The two versions differ in the second layer's stand-in and in the final stretch of dynamics. A zero at the end, in other words, does not mean that every layer was exact.

What a zero means

A companion paper, When Audits Survive, asks what a zero gap actually tells you. "A route mismatch of zero says that coarse-graining in two stages agrees with coarse-graining at once." The three main causes are the ones above: later dynamics that respect the grouping, an arrival that already matches the stand-in, and a lucky cancellation for one arrival. The paper adds five more for related variants, such as a zero that holds only for certain starting states, and lists eight in all. "The same zero can have eight different causes, each with its own scope, and how robust the zero is depends on the cause and on the class of perturbations, not only on the number."

That last point is sharp. Allow any small change to the dynamics before or after the middle layer, and any zero that such changes can break at all is broken by an arbitrarily small one: mix a tiny amount of an arrival that does show a gap into one that does not, and the gap is no longer zero. Allow only changes that preserve the reason for the zero, and for several of the causes it survives changes of any size. In the paper's words, "A robustness verdict in this paper is always a conditioning claim": a conclusion stated together with what was changed and how the change was measured.

What it does not say

"Everything in this paper is finite and exact," the paper says: finite sets of states, exact rational probabilities. "No approximate, perturbative, spectral, continuous-time or infinite-history statement is made." It takes the grouping into classes as given and does not address how to choose it. Its general theorems are formalized in Lean, a proof assistant, though some of the Lean versions are narrower than the paper's statements and the paper's proofs carry the rest. The small worked examples are computed by Lean as programs, which means trusting its compiler as well as its logic, and the many-layer result is checked given separately supplied facts about each layer.

The paper is also candid about its novelty: "The contribution is sharpness rather than new phenomena." What it makes exact is a caution. When a coarse description keeps running, the stand-in it uses for what it forgot is part of the description, and whether two layers stack depends on the dynamics, on the stand-in and on what the top is asked to read.

Drawn from Six Birds Foundations VIII: A Typed Calculus of Coarse-Graining (Tsiokos, 2026, doi:10.5281/zenodo.23097905), Part III, with Six Birds Verified III: When Audits Survive (Tsiokos, 2026, doi:10.5281/zenodo.23097914) for the zero mechanisms. Kemeny and Snell's Finite Markov Chains is as cited in the first paper. The chess analogy is mine. No new computation is claimed by this essay.