TL;DR

PREVIEW BUILD · IMAGES + INTERACTIVE FIGURES EMBEDDED · NOT THE LW SOURCE

Your Network Is Already (Mostly) a Unit-Net

Post 3 of the Legible Networks series (post 1, post 2). Sources: the unit-net Day 3 report and the paper-length writeup The Transplant Law: Trained Networks Are One Exact Reparameterization Away From Budgeted Weights, with further folds from the explainable_ai repo (Leela, KataGo). Interactive figures continue the series numbering; static fallbacks inline.

Epistemic status: the strongest results in the series. The transplants are exact function-preserving reparameterizations — verified by output agreement 1.0000 and KL divergences at float-noise level (≈2×10⁻¹⁰ for Qwen in float32, ≈2×10⁻¹⁴ for KataGo in float64) — so the central claims are checkable arithmetic, not statistics. The interpretive framing ("scale debt," "the transplant law") is ours.


The puzzle

Post 2 ended on an objection we agreed with: a 33%-agreement distilled toy proves the instruments work, but nobody's safety case rests on TinyStories. The question that opened the next session:

Is legibility something you must train into a network from scratch — paying, apparently, ~67 points of teacher agreement for it — or is the unit-net a coordinate system that trained networks already almost occupy, so that a pretrained, full-strength model can be moved into it exactly, in place, without a single gradient step?

The naive test says no, emphatically. Take one Qwen transformer block and just force its rows legal — renormalize every positive row to sum 1, clip inhibition into bounds: teacher agreement collapses to 0.4%. Constrain all 24 blocks: 0.0%. Trained positive row sums in a transformer run 10–100; rescale them in place and nothing downstream expects it.

The rest of this post is why that test misleads. Done right, the answer is yes: 97.7% of Qwen's foldable mass, 95.5% of ResNet18, 99.97% of KataGo — and, with one final trick, 100.0000% of everything we tried, at float-noise error, with zero clipped weights.

The idea: scale symmetry and scale debt

Look again at the two unit-net constraints (post 1): every positive row sums to 1; every inhibitory entry lies in [0, 1]. Both are constraints on scale — and modern architectures are riddled with structures that are invariant to per-neuron rescaling. That suggests a procedure:

For each illegal neuron, compute the scale s that would make it legal. Divide its incoming weights by s. The neuron's output is now 1/s times what it was — so you owe a multiplication by s to everything that consumes that output. Call that obligation the scale debt. Push the debt forward into the consuming structure; if that structure is itself scale-covariant, the debt passes through or gets absorbed exactly, and at every intermediate step the network computes the identical function — you're just choosing a different representative from the orbit of a symmetry the architecture already had.

The whole game is then a bookkeeping question: where does scale debt go to die?

Where debt goes to die

The absorbers, in increasing order of novelty. (Terms glossed as we go; none of this needs more than "multiplication distributes over the pieces.")

BatchNorm statistics. Batch normalization is the standard conv-net component that standardizes each channel using recorded running statistics — subtract the running mean μ, divide by the running standard deviation √(σ²+ε), multiply by a learned gain γ. It exists precisely to make upstream scale a free parameter — so it is a perfect debt sink: scaling a conv's output by 1/s just means the recorded (μ, σ², γ) recalibrate by the same factor, with one subtlety that bit us: the numerical-stability constant ε sits inside the square root un-scaled, so it must be corrected too (ε → ε/s²). With that, absorption is exact. This alone legalizes entire convolutional trunks.

Positive homogeneity. ReLU(s·x) = s·ReLU(x) for any s > 0 — and likewise max-pooling. So debt passes through ReLU and pooling untouched and folds into the next linear layer's columns (which may then re-emit debt of its own; the process iterates forward).

The residual-stream fold (new, we believe). First, the term. In a plain feedforward net, each layer replaces its input: x → f(x), and the original is gone. A residual network (every ResNet, every transformer) instead has each block add its output to its input: x_{l+1} = x_l + f(x_l). Unroll that across depth and you see what it implies: one vector rides the entire network from bottom to top, accumulating additive contributions from every block along the way. That running vector is the residual stream — think of it as a shared whiteboard: every block is a writer (it adds its contribution onto the board) and a reader (its input is the board's current state). That's a problem for per-neuron debt: many writers share each stream channel, and their individual debts collide — writer A wants the channel scaled by 12, writer B by 40, and the channel can only have one scale. The fix: assign one per-channel stream scale — the maximum any writer demands — apply it to all writers of that channel, and compensate at every reader. This is exact precisely when every reader renormalizes (in KataGo, every stream reader is a BatchNorm — see below). One fold, 1.47M weights, half the network.

RMSNorm, uniform edition. Transformers like Qwen use RMSNorm — divide the vector by its root-mean-square, then apply per-channel gains — which is invariant to scaling the whole vector uniformly (a uniform scale passes through the RMS and cancels). So one global scalar stream scale (s = 817.5 for Qwen-0.5B) legalizes the entire transformer residual stream at once.

Configuration constants — the q/k fold (also new, we believe). Attention compares query and key vectors (q, k — the "what am I looking for" / "what do I contain" projections) via dot products, after RoPE — rotary position embedding, which encodes token position by rotating the q and k vectors. Rotations commute with scalar multiplication, so scale debt on the q and k projections slides straight through RoPE, out of the dot product, and folds into the attention scaling constant that already lives in the model's config file. Exact, and free.

One rule governs everything, learned the hard way: never inflate. A row whose positive sum is below 1 is already legal; scaling it up to hit exactly 1 propagates amplification debt, and ten blocks of compounding amplification through calibrated BatchNorm statistics is exponential divergence — our first renormalize-up convention produced KL ≈ 10²³ on a 10-block trunk before we understood this.1 The fold rule is s = max(positive_sum, 1): shrink what's over budget, leave sub-unit rows alone. Readers of post 2 will recognize this as the carving world's version of the same lesson — the row-sum constraint wants to be "at most 1," with slack parked harmlessly, not "exactly 1" enforced by rescaling.

🕹️ Interactive Figure 5 — Where scale debt goes to die. Pick an architecture chain (a KataGo-style conv block, a transformer MLP, a bare MLP) and a debt size, then press propagate: a ×s chip walks the chain, and each block rules on it — BatchNorm absorbs it, ReLU waves it through, a linear folds it into its columns and re-emits, a SiLU gate stops it cold (it parks as a recorded temperature — next section), softmax likewise. Then flip on "inflate sub-unit rows" to watch the one forbidden move compound block-over-block into the KL ≈ 10²³ disaster. The chain you build is the legality fraction you get — which is the transplant law in miniature.

INTERACTIVE FIGURE 5Where scale debt goes to die
chain row sum s 40
press Propagate ▸ — the ×s chip will walk the chain and each block will rule on it.
The fold in one animation. A trained row's positive weights sum to s ≫ 1; dividing the row by s makes it legal but leaves a ×s debt owed to whatever consumes the output. Homogeneous blocks pass it (ReLU), linear blocks fold it into their columns and re-emit it, normalizers kill it exactly (BatchNorm, RMSNorm — recorded statistics recalibrate), and non-homogeneous gates stop it, where it parks as a recorded temperature — still exact, just named. The forbidden move is the mirror image: "inflating" a row whose sum is below 1 emits amplification debt that normalizer statistics were never calibrated for, and it compounds — flip the toggle and watch ten blocks turn ×2.5 into the KL ≈ 10²³ disaster from the footnote. Chain choice = legality fraction: that is the transplant law in miniature.

From naive collapse to exact fold

With the absorbers in hand, the empirical arc ran in one direction all day:

Qwen2.5, 0.5B → 7B. The two foldable families in every transformer block: attention's value projection folds into its output projection (v_proj → o_proj — attention mixes value vectors linearly, so a scale on values slides into the output matrix), and the MLP's up projection folds into its down projection (up_proj → down_proj — the SwiGLU nonlinearity is linear in the up branch). Result: 97.7% of the foldable families' teacher agreement survives, zero clipped negatives, across 107M legalized weights — and the legality fraction, 70.8% of all parameters, is constant across a 14× scale range. Legality is set by architecture, not size.

The transplant series

ResNet18. A ResNet is built from exactly the two mechanisms that make folding total — BatchNorm exists to absorb scale, ReLU is positively homogeneous. Folding it: 99.95% output agreement, 95.5% of weights legal, top-1 accuracy on Imagenette2 identical to the fourth decimal (65.32% vs 65.30%). And a fact we did not expect: not one filter in the entire pretrained network has negative weight exceeding its positive budget. A pretrained ResNet is a unit-net that doesn't know it yet.

Transplant summary

Pause on what this did to the research program. Distillation (post 2) bought legibility at 33% fidelity after five hard-won runs. Transplant delivers 97.7–99.95% exactly, in minutes, with no training. The migration strategy flipped permanently: transplant what folds; finetune only the remainder.

KataGo (the superhuman Go program) was the culmination, because its architecture is maximally foldable: no sigmoid gates anywhere, pre-activation residual blocks whose every stream reader is a BatchNorm. Folding it: 99.97% of weights legal, zero clipped, KL ≈ 2×10⁻¹⁴ in float64 — exactness at machine precision. The resistant 720 weights are precisely the five output-writing matrices (policy and value heads). Everything except the words it speaks lives inside the unit budget.3

The last 0.03%: scale debt becomes temperature

What blocks folding is always the same thing: a non-homogeneous function — a SiLU gate, a softmax output — with no normalizer behind it to absorb the debt. Such a function genuinely changes shape under input scaling; no weight rearrangement fixes that.

The final move is to stop fighting: let the debt halt inside the function, recorded as an explicit per-unit temperature — gate(z) → gate(τ·z) with τ the parked debt. Crucially, τ has the same epistemic status as BatchNorm's running statistics: not a weight, a recorded calibration constant, sitting outside the budget the same way μ and σ² always have. With temperatures, all four architectures reach 100.0000% weight legality at float-noise error, and the residue compresses by exactly the row width: KataGo's 720 resistant weights become ten legible per-head gains; Qwen's gates and heads shrink to 0.009–0.043% of parameters.

Scale debt as temperature

The bookkeeping closes: every unit of scale debt in every network we tried is now either dead (absorbed exactly) or named (a recorded temperature). Nothing is hidden and nothing is approximate.

What legality buys, immediately

Integer simplex quantization. A legal row is a point on the probability simplex — nonnegative entries summing to 1. Store it instead as integer numerators over a shared power-of-two denominator: entries (n₁, …, n_L) with Σnᵢ = 2^b exactly. The row is now exact fixed-point arithmetic — integer adds and one shift, no float error, ever — and whole superhuman trunks tolerate it: 12-bit integer rows at zero playing-strength cost.

And there's a law hiding in the denominator, visible by pigeonhole: a budget of 2^b integer units spread over a row of length L forces zeros whenever the mass is spread thin — you cannot give 4,096 units to 4,097 synapses without zeroing one. So the bit budget is simultaneously a sparsity budget: 10-bit quantization of the LM student was lossless and 5× sparsifying. Tolerance to this native compression becomes a redundancy meter — the fat shallow student shrugged off a denominator that killed the lean deep CNN.

🕹️ Interactive Figure 6 — The denominator law. One budget bar, two sliders: row length L and bit budget b. The row's mass is re-expressed as integer numerators summing to exactly 2^b — watch the segment boundaries snap to the integer grid, the readout confirm Σ = 2^b with zero float error, and rust ticks mark the synapses that the pigeonhole forces to zero as b drops below log₂ L. Quantization and sparsification are one knob, not two.

INTERACTIVE FIGURE 6The denominator law — one knob is both precision and sparsity
row length L 24 bit budget b 8
A legal row is a point on the probability simplex; storing it as integer numerators over a shared denominator 2b makes it exact fixed-point arithmetic — the numerators sum to 2b by construction, so there is no float error to accumulate, ever. But integers can't be split: by pigeonhole, once 2b < L (or merely once the mass is spread thin) some synapses must round to zero — the rust ticks. Drag b down and watch precision and sparsification move together: they are the same knob. This is why 10-bit quantization of the LM student was simultaneously lossless and 5× sparsifying, and why tolerance to the denominator is a redundancy meter for the underlying network.

The denominator law

Certified channel replacement. With all path products bounded, "what does deleting this channel cost, at most?" is arithmetic before it's an experiment. A verified replace-loop swapped 11.9% of a superhuman chess trunk's channels for constants at bounded, measured cost.

The replacement ladder

Syntax rides the highways. Task-agnostic flow pruning of the LM student — delete edges in order of increasing conserved path mass, no task in mind — produced the series' most quotable finding: across every destructive condition tested (2-bit quantization, 99% edge pruning, models whose general teacher agreement is statistically zero), the part-of-speech probe task held exactly 1.00. The verb/noun circuit lives on the highest-flow edges, which every mass-respecting destruction spares last; the semantic capillaries die first. Syntax rides the trunk roads; meaning lives in the side streets — measured, not metaphor.4

Degradation under flow pruning

The transplant law

Legality fraction is set entirely by architectural choices — how many nonlinearities are non-homogeneous, and whether residual readers renormalize. Gateless + pre-activation + BatchNorm ⟹ transplant approaches completeness. And what cannot fold is not lost: it compresses into named temperatures.

The point of all this is not compression aesthetics. After transplant, a superhuman network — not a distilled toy — sits on an exactly row-stochastic skeleton where path mass is conserved, comparable across the entire network, and certifiable. Every instrument built in posts 1–2 — the exact lens, path-mass attribution, certified carving — can now be pointed at networks whose capabilities actually matter, at full strength, with function-preservation guaranteed by arithmetic rather than hoped for by training. (The first cash-out already exists: post 2's addendum reports j-carve rerun on this transplanted Qwen — and it leans on exactly this geometry, because the fold's bounded rows and RMSNorm's architectural output bound are what make an end-to-end certificate constructible on a real transformer at all.)

Which is where the series turns from tooling to science. The next five posts are what the instruments found: a superhuman Go program with a certified hole in its world-model, behind a famous real-world exploit (post 4); a language model carrying a pristine data structure its own behavior ignores (post 5); and an attribution method run to its logical end that reported, for deep layers, exactly zero — a negative result so total it became a theory (post 8).



  1. Ex post, obvious: amplifying a sub-unit row multiplies every downstream activation, and ten blocks of compounding amplification through statistics calibrated for the original scale is exponential divergence. Ex ante, we spent a debugging session on it. The s = max(positive_sum, 1) rule is now load-bearing in every fold — and post 2's carving experiments arrived at the mirror-image lesson (relax "sums to exactly 1" to "at most 1") from the opposite direction, which is part of why we trust it. ↩

  2. Imagenette: a 10-class subset of ImageNet, standard for quick vision evaluations. ↩

  3. Getting there required reconstructing KataGo g170e-b10c128 in PyTorch from the C++ source — no Python port existed. The .bin.gz weight format was decoded from desc.cpp, forward semantics from eigenbackend.cpp, and inputs are generated by KataGo's own vendored feature code (its input features include ladder computations that require actual search — you cannot fake them). Verification against katago evalsgf: every policy entry matches to all printed decimals, winrate exact. We belabor this because "function-preserving" claims are only as good as the reconstruction they're preserved against. ↩

  4. Combined with post 2's j-carve: task-targeted carving keeps the syntax circuit alive at 10% of units on purpose; indiscriminate flow pruning keeps it at ~1% of edges by accident; nothing kills it short of aiming at its specific edges. Two independent destruction protocols, same survivor — this is what "the circuit is real" looks like from two angles. ↩