\documentclass[11pt,a4paper]{article}
% ---------------------------------------------------------------------------------------------
% Every Neural Network Is a Code: A Unified Theory of Implicit Coding in Neural Networks
% Standard article class; all figures are TikZ/pgfplots code in this file; compile with
%   pdflatex, bibtex, pdflatex, pdflatex      (bibliography: references_neural.bib)
% ---------------------------------------------------------------------------------------------
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[a4paper,margin=2.5cm]{geometry}
\usepackage{amsmath,amssymb,amsthm,mathtools}
\usepackage{graphicx,float,booktabs,tabularx,array,xcolor,enumitem}
\usepackage[round,authoryear]{natbib}
\usepackage{listings}
\lstset{basicstyle=\ttfamily\scriptsize,breaklines=true,columns=fullflexible,keepspaces=true,showstringspaces=false}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\usetikzlibrary{arrows.meta,positioning,calc,patterns}
\usepgfplotslibrary{fillbetween,groupplots}
\definecolor{nnblue}{HTML}{2A78D6}
\definecolor{nnorange}{HTML}{EB6834}
\definecolor{nnaqua}{HTML}{1BAF7A}
\definecolor{nnyellow}{HTML}{EDA100}
\definecolor{nnviolet}{HTML}{6250D6}
\definecolor{nnmagenta}{HTML}{E87BA4}
\definecolor{nngray}{HTML}{52514E}
\pgfplotsset{every axis/.append style={font=\footnotesize, tick label style={font=\scriptsize},
  label style={font=\footnotesize}, title style={font=\footnotesize},
  legend style={font=\scriptsize, draw=none, fill=white, fill opacity=0.8, text opacity=1},
  grid=major, grid style={black!8}, axis line style={black!60}, tick style={black!60}}}
\newcolumntype{Z}{>{\centering\arraybackslash}X}
\theoremstyle{plain}
\newtheorem{Theorem}{Theorem}
\newtheorem{Lemma}{Lemma}
\newtheorem{Corollary}{Corollary}
\newtheorem{Proposition}{Proposition}
\newtheorem{conjecture}{Conjecture}
\theoremstyle{definition}
\newtheorem{Definition}{Definition}
\newtheorem{Example}{Example}
\theoremstyle{remark}
\newtheorem{Remark}{Remark}
\newcommand{\EE}{\mathbb{E}}
\newcommand{\PP}{\mathbb{P}}
\newcommand{\cX}{\mathcal{X}}
\newcommand{\cY}{\mathcal{Y}}
\newcommand{\KLd}[2]{\mathrm{KL}\left(#1\,\middle\|\,#2\right)}
\newcommand{\CA}{C_{A}}
\newcommand{\QA}{Q_{A}}
\newcommand{\pA}{p_{A}}
\usepackage[colorlinks,linkcolor=nnblue!70!black,citecolor=nnblue!70!black,urlcolor=nnblue!70!black]{hyperref}
\hypersetup{pdftitle={Every Neural Network Is a Code: A Unified Theory of Implicit Coding in Neural Networks},pdfauthor={Luca Eliseo Pavesi}}
\setlength{\emergencystretch}{2em}

% numbers of the validation subsection (generated)
\newcommand{\valFDmlp}{1.3\times10^{-10}}
\newcommand{\valFDsoft}{9.0\times10^{-11}}
\newcommand{\valCross}{5.1\times10^{-13}}
\newcommand{\valKraftMax}{3.3\times10^{-16}}
\newcommand{\valNCodes}{313}
\newcommand{\valCPU}{about eleven}

\title{Every Neural Network Is a Code:\\ A Unified Theory of Implicit Coding in Neural Networks}
\author{Luca Eliseo Pavesi\\[2pt]
\small Universit\`a degli Studi di Pavia\\
\small \href{mailto:lucaeliseo.pavesi01@universitadipavia.it}{lucaeliseo.pavesi01@universitadipavia.it}\quad ORCID \href{https://orcid.org/0009-0003-0532-2850}{0009-0003-0532-2850}}
\date{November 2026}

\begin{document}
\maketitle

\begin{abstract}
The theory of neural networks lacks a single quantity that is defined for every architecture and training procedure, measurable on real pipelines, and sufficient to state what a network can and cannot learn. We argue that such a quantity exists: the implicit code length, the cumulative log loss incurred when each example is predicted before it is trained on. We develop it into a self-contained theory with complete proofs: a conservation law (for every learner and every input set the code lengths of all labelings satisfy Kraft's equality, so inductive bias is a fixed budget that can be moved but not increased); a representation theorem (every learner is the Bayes predictor of its own implicit prior); a compression identity (expected code length equals the sum of test risks along the learning curve), which constrains plateaus, scaling exponents and double-descent bumps; exact accounting for single-pass training, for symmetries of architecture and initialization (including a new corollary: breaking a symmetry moves the tax inside the orbit but cannot remove it), for pretraining and for in-context learning. We state three falsifiable conjectures and a protocol to test them, and report experiments with real numbers. Earlier exact enumerations at $n=10$ and $n=16$ and MNIST code lengths are reproduced in part and extended by four new experiments. (i) Across standard, NTK, maximal-update ($\mu$P) and step-rescaled parametrizations, exact priors on all $2^{12}$ labelings show that the concentration of the prior with width reported earlier is a property of a step that grows with width: in $\mu$P the entropy is flat ($+0.005\pm0.009$ nats per doubling) and the prior converges ($\mathrm{KL}(Q_{2H}\|Q_H)\propto H^{-1.10\pm0.15}$), while the revised conjecture that entropy is a function of function-space movement alone is refuted ($0.82\pm0.11$ nats between $\mu$P and NTK at equal movement). (ii) A centred finite network approaches its neural-tangent-kernel code as $H^{-0.97\pm0.08}$ in Kullback--Leibler divergence; beyond width about one hundred the departure is the randomness of the kernel, not feature learning; and infinite-width gradient descent stays $0.37$ nats ($4.5\%$ of $n\ln2$) from the best tempered Gaussian-process Bayes code. (iii) Sample-wise double descent of a ridgeless random-features classifier is a burst of code rate at the interpolation threshold whose price is $3.9$--$176$ nats (median). (iv) On sparse parities the plateau of single-pass SGD costs $1{,}495$--$8{,}500$ nats where the Bayes mixture over the class pays at most $7.04$, and the price is not monotone in width. Kraft's equality holds to $3.3\times10^{-16}$ on all $313$ new exact codes. The six further experiments of the programme are reported as well. (v) The in-context identity holds to $10^{-15}$ on a four-task family; the unavoidable term is $0.752$ nats ($H(\pi)=1.280$), and a network pretrained on one task costs up to $15.24$ nats on the opposite one against $6.83$ from scratch. (vi) Exact priors of convolutional, residual and attention architectures on translation orbits fall into two clusters $5$--$15$ nats apart; translation-invariant learners put $0.896$--$0.982$ of their mass on invariant labelings (MLP: $0.016$), almost all of it on constant ones. (vii) On the scikit-learn digits, block-wise code lengths follow power laws in $n$ with exponents that order the pipelines as on MNIST, and code-length ratios over $30$ tasks stay within a factor $1.38$. (viii) Two presentation orders of the same ten examples give priors $0.44$--$0.77$ nats apart, as much as two seeds. (ix) An asymmetric initialization redistributes the symmetry tax inside every orbit, as the corollary predicts, and makes a naming cheaper than its tax for only $2$ of some ten million labelings. (x) On the stored $n=12$ priors, multiplicative invariance holds labeling-wise with a constant of at most $3.7$ for width-stable parametrizations and fails for a fixed-step standard one ($4.1$ at width $64$, $8.1$ at $256$); the simplicity envelope survives for a geometry-aware code as an inequality ($\tilde K\le2C_A+0.83$ for $n=6$ to $12$) that explains under $5\%$ of the variance. Results that contradict our hypotheses are reported as results.
\end{abstract}

\noindent\textbf{Keywords:} neural networks; generalization; inductive bias; minimum description length; prequential coding; no free lunch; neural tangent kernel; maximal update parametrization; double descent; deep learning theory.


\section{Introduction}

The theory of neural networks is a collection of local explanations. Uniform convergence explains small hypothesis classes but is vacuous for networks that can fit random labels \citep{Zhang2017}. Double descent \citep{Belkin2019,Nakkiran2020}, delayed generalization \citep{Power2022}, power-law scaling \citep{Kaplan2020} and in-context learning \citep{Xie2022} each have their own models, with their own assumptions and their own notions of complexity. What is missing is a common unit of account: a quantity defined for \emph{every} network and every training procedure, whatever the architecture or optimizer, that can be measured on a real pipeline, and in which the possibilities and the limits of learning can both be written.

This paper proposes that the unit already exists. Let a network predict each example before it is allowed to train on it, and add up the log losses. The total is a code length: the number of nats the network needs in order to transmit the labels to a receiver who runs the same training pipeline. This \emph{prequential} quantity goes back to \citet{Dawid1984} and to the minimum description length principle \citep{Rissanen1978,Grunwald2007}; it has been measured for deep networks by \citet{BlierOllivier2018}, and the equivalence between prediction and compression is the foundation of universal induction \citep{Solomonoff1964,Hutter2005} and is visible in large language models \citep{Deletang2024}. Our aim is to show how much of the theory of neural networks can be rebuilt on this single quantity, with short proofs and no assumptions on architecture, optimizer or width. The theorems are stated for an arbitrary learner, because nothing in the proofs needs more; Section~\ref{sec:neural} then specializes them to networks, where the code length becomes the area under a loss curve, the symmetries of the architecture become a tax in nats, and pretraining becomes a purchase with an exact price. Figure~\ref{fig:concept} shows the object on which everything below is built: the tree of label prefixes, in which a learner spends exactly one unit of probability mass.

\begin{figure}[htbp]
\centering
\begin{tikzpicture}[font=\scriptsize]
\draw[nnorange,line width=1.62pt] (0.00,1.960) -- (1.55,3.080) node[pos=0.55,fill=white,inner sep=0.6pt,text=black] {0.58};
\draw[nnblue,line width=1.28pt] (0.00,1.960) -- (1.55,0.840) node[pos=0.55,fill=white,inner sep=0.6pt,text=black] {0.42};
\draw[nnorange,line width=2.52pt] (1.55,3.080) -- (3.10,3.640) node[pos=0.55,fill=white,inner sep=0.6pt,text=black] {0.99};
\draw[nnblue,line width=0.38pt] (1.55,3.080) -- (3.10,2.520) node[pos=0.55,fill=white,inner sep=0.6pt,text=black] {0.01};
\draw[nnorange,line width=0.38pt] (1.55,0.840) -- (3.10,1.400) node[pos=0.55,fill=white,inner sep=0.6pt,text=black] {0.01};
\draw[nnblue,line width=2.52pt] (1.55,0.840) -- (3.10,0.280) node[pos=0.55,fill=white,inner sep=0.6pt,text=black] {0.99};
\draw[nnorange,line width=2.52pt] (3.10,3.640) -- (4.65,3.920) node[pos=0.55,fill=white,inner sep=0.6pt,text=black] {0.99};
\draw[nnblue,line width=0.38pt] (3.10,3.640) -- (4.65,3.360) node[pos=0.55,fill=white,inner sep=0.6pt,text=black] {0.01};
\draw[nnorange,line width=2.18pt] (3.10,2.520) -- (4.65,2.800) node[pos=0.55,fill=white,inner sep=0.6pt,text=black] {0.83};
\draw[nnblue,line width=0.72pt] (3.10,2.520) -- (4.65,2.240) node[pos=0.55,fill=white,inner sep=0.6pt,text=black] {0.17};
\draw[nnorange,line width=0.38pt] (3.10,1.400) -- (4.65,1.680) node[pos=0.55,fill=white,inner sep=0.6pt,text=black] {0.01};
\draw[nnblue,line width=2.52pt] (3.10,1.400) -- (4.65,1.120) node[pos=0.55,fill=white,inner sep=0.6pt,text=black] {0.99};
\draw[nnorange,line width=0.36pt] (3.10,0.280) -- (4.65,0.560) node[pos=0.55,fill=white,inner sep=0.6pt,text=black] {0.01};
\draw[nnblue,line width=2.54pt] (3.10,0.280) -- (4.65,0.000) node[pos=0.55,fill=white,inner sep=0.6pt,text=black] {0.99};
\fill[black!75] (0.00,1.960) circle (1.6pt);
\fill[black!75] (1.55,3.080) circle (1.6pt);
\fill[black!75] (1.55,0.840) circle (1.6pt);
\fill[black!75] (3.10,3.640) circle (1.6pt);
\fill[black!75] (3.10,2.520) circle (1.6pt);
\fill[black!75] (3.10,1.400) circle (1.6pt);
\fill[black!75] (3.10,0.280) circle (1.6pt);
\fill[black!75] (4.65,3.920) circle (1.6pt);
\node[anchor=west] at (4.73,3.920) {\texttt{000}};
\fill[nngray!70] (5.43,3.790) rectangle (6.930,4.050);
\node[anchor=west] at (6.950,3.920) {0.561};
\fill[black!75] (4.65,3.360) circle (1.6pt);
\node[anchor=west] at (4.73,3.360) {\texttt{001}};
\fill[nngray!70] (5.43,3.230) rectangle (5.450,3.490);
\node[anchor=west] at (5.470,3.360) {0.007};
\fill[black!75] (4.65,2.800) circle (1.6pt);
\node[anchor=west] at (4.73,2.800) {\texttt{010}};
\fill[nngray!70] (5.43,2.670) rectangle (5.445,2.930);
\node[anchor=west] at (5.465,2.800) {0.006};
\fill[black!75] (4.65,2.240) circle (1.6pt);
\node[anchor=west] at (4.73,2.240) {\texttt{011}};
\fill[nngray!70] (5.43,2.110) rectangle (5.433,2.370);
\node[anchor=west] at (5.453,2.240) {0.001};
\fill[black!75] (4.65,1.680) circle (1.6pt);
\node[anchor=west] at (4.73,1.680) {\texttt{100}};
\fill[nngray!70] (5.43,1.550) rectangle (5.430,1.810);
\node[anchor=west] at (5.450,1.680) {0.000};
\fill[black!75] (4.65,1.120) circle (1.6pt);
\node[anchor=west] at (4.73,1.120) {\texttt{101}};
\fill[nngray!70] (5.43,0.990) rectangle (5.444,1.250);
\node[anchor=west] at (5.464,1.120) {0.005};
\fill[black!75] (4.65,0.560) circle (1.6pt);
\node[anchor=west] at (4.73,0.560) {\texttt{110}};
\fill[nngray!70] (5.43,0.430) rectangle (5.437,0.690);
\node[anchor=west] at (5.457,0.560) {0.002};
\fill[black!75] (4.65,0.000) circle (1.6pt);
\node[anchor=west] at (4.73,0.000) {\texttt{111}};
\fill[nngray!70] (5.43,-0.130) rectangle (6.545,0.130);
\node[anchor=west] at (6.565,0.000) {0.417};
\node[anchor=south] at (0.00,2.210) {$t=1$};
\node[anchor=south,align=center] at (6.25,4.200) {labeling and mass $Q_A$};
\node[anchor=north west,align=left,text width=7.4cm] at (-0.15,-0.38) {\textcolor{nnorange}{orange} edge: next label $0$; \textcolor{nnblue}{blue} edge: next label $1$.\\ The eight masses sum to $1$ (Kraft's equality).};
\begin{axis}[at={(8.3cm,-0.55cm)},anchor=south west,width=0.47\textwidth,height=6.3cm,xmode=log,log basis x=2,xmin=1,xmax=1024,ymin=0,ymax=1.02,
  xtick={1,4,16,64,256,1024},xticklabels={1,4,16,64,256,1024},xlabel={number of labelings, cheapest first},ylabel={cumulative mass},legend pos=south east,legend cell align=left]
\addplot[nnblue,thick,mark=*,mark size=1.2pt] coordinates {(1,0.2406) (2,0.4459) (3,0.6420) (4,0.7929) (6,0.9316) (8,0.9571) (11,0.9695) (16,0.9797) (23,0.9886) (32,0.9951) (45,0.9982) (64,0.9994) (91,0.9998) (128,0.9999) (181,1.0000) (256,1.0000) (362,1.0000) (512,1.0000) (724,1.0000) (1024,1.0000)};
\addlegendentry{MLP-32}
\addplot[nnorange,thick,dashed,mark=square*,mark size=1.1pt,mark options={solid}] coordinates {(1,0.2317) (2,0.4634) (3,0.5320) (4,0.6006) (6,0.7357) (8,0.7591) (11,0.7919) (16,0.8382) (23,0.8910) (32,0.9300) (45,0.9577) (64,0.9731) (91,0.9839) (128,0.9904) (181,0.9947) (256,0.9973) (362,0.9987) (512,0.9995) (724,0.9999) (1024,1.0000)};
\addlegendentry{LogReg}
\addplot[nnaqua,thick,dashdotted,mark=triangle*,mark size=1.4pt,mark options={solid}] coordinates {(1,0.0909) (2,0.1818) (3,0.1909) (4,0.2000) (6,0.2182) (8,0.2364) (11,0.2636) (16,0.3091) (23,0.3657) (32,0.3838) (45,0.4101) (64,0.4485) (91,0.5030) (128,0.5576) (181,0.5977) (256,0.6545) (362,0.7316) (512,0.7965) (724,0.8883) (1024,1.0000)};
\addlegendentry{Laplace}
\addplot[nngray,thick,dotted] coordinates {(1,0.0010) (2,0.0020) (3,0.0029) (4,0.0039) (6,0.0059) (8,0.0078) (11,0.0107) (16,0.0156) (23,0.0225) (32,0.0312) (45,0.0439) (64,0.0625) (91,0.0889) (128,0.1250) (181,0.1768) (256,0.2500) (362,0.3535) (512,0.5000) (724,0.7070) (1024,1.0000)};
\addlegendentry{no learning}
\end{axis}
\end{tikzpicture}
\caption{A learner is a code. \textbf{Left}: the prefix tree of the width-$8$ network of Section~\ref{sec:exp} on its first three inputs. Each internal node is one training run from scratch on the labels read so far; the number on an edge is the probability the trained network gives to the next label, and the mass of a labeling is the product along its path. \textbf{Right}: the same construction at $n=10$ for three pipelines of Section~\ref{sec:exp}: cumulative mass of the implicit prior over the $1024$ labelings sorted from cheapest to most expensive. Half of the unit of mass is carried by 3 labelings for MLP-32, by 3 for logistic regression and by 90 for the Laplace learner; a learner that does not learn follows the dotted line. All numbers are computed, not schematic.\label{fig:concept}}
\end{figure}


The statements proved below are the following.
\begin{enumerate}
  \item \textbf{Conservation} (Theorems~\ref{thm:conservation} and~\ref{thm:noisy}). The implicit code lengths that a learner assigns to all labelings of a given set of inputs satisfy Kraft's equality. A learner cannot be improved on one task without paying on others, and the exchange rate is explicit. This turns the no-free-lunch theorem \citep{Wolpert1996} from a statement about averages into an accounting identity that holds for each learner separately.
  \item \textbf{Representation} (Theorem~\ref{thm:bayes}). On a given input sequence, every learner coincides with the Bayesian predictor for a prior over labelings, namely its own implicit code. Asking ``what is the inductive bias of this pipeline'' therefore has a well-defined answer.
  \item \textbf{Generalization as an identity} (Theorem~\ref{thm:identity}). Under independent sampling, the expected implicit code length equals the sum of the test risks along the learning curve. Constraints on learning curves follow (Proposition~\ref{prop:curves}): plateaus, bumps and scaling exponents are all charged to the same budget.
  \item \textbf{Aggregation} (Theorem~\ref{thm:mixture}). Any countable family of learners can be combined into one whose code length exceeds that of each member by at most the logarithm of its inverse weight.
  \item \textbf{Neural networks as codes} (Section~\ref{sec:neural}). For single-pass training the implicit code length \emph{is} the cumulative online training loss (Proposition~\ref{prop:sgd}); every symmetry of architecture and initialization costs at least the logarithm of the orbit size (Theorem~\ref{thm:symmetry}), so a $K$-class softmax network pays for the names of the classes, and a network that breaks the symmetry moves this tax without removing it (Corollary~\ref{cor:orbit}); and the value of pretraining is the subadditivity defect of the redundancy (Corollary~\ref{cor:pretrain}).
  \item \textbf{In-context learning} (Theorem~\ref{thm:icl}). The average cost of learning a task from context decomposes exactly into the mutual information between task and data, which no model can avoid, plus the divergence of the pretrained model from the Bayes mixture.
\end{enumerate}

We want to be explicit about what is new. Kraft's inequality, the prequential identity, online-to-batch conversion \citep{CesaBianchi2004}, Bayesian mixtures and the redundancy of Bayes codes \citep{ClarkeBarron1990} are classical, and the relation between no-free-lunch results and description length has been discussed recently by \citet{Goldblum2024}. The contribution here is the formulation of these facts as properties of an arbitrary learner, in one notation, with all constants; the conservation law in its exact and noisy forms as the organizing principle; the learning-curve consequences; the symmetry tax for neural architectures; a set of conjectures and refutation protocols for deep networks; and the experiments that apply the protocols.

The experiments are reported in two layers. Sections~\ref{sec:exp} and~\ref{sec:exp2} contain those of the first version of this work: the implicit prior computed exactly on all $2^{10}$ and $2^{16}$ labelings of small input sets, and prequential code lengths on MNIST. Sections~\ref{sec:mup}--\ref{sec:grok} add four experiments, each tied to one statement and to a hypothesis fixed before the run. Their outcomes are mixed, and we report them as they came out. The decrease of the entropy of the prior with width, which supported Conjecture~\ref{conj:scaling} in the standard parametrization, disappears when the step size in function space is held fixed, and the revised conjecture proposed in Section~\ref{sec:exp2} is refuted. The approach of a finite network to its infinite-width limit follows the $1/H$ law expected of a fluctuation, but only after the random function at initialization is removed; and gradient descent at infinite width is a different code from Bayesian inference under the corresponding Gaussian process. Double descent and delayed learning both receive a price in nats, the first as predicted, the second with a dependence on width opposite to the one we expected at large step sizes.

Section~\ref{sec:verdicts} adds a third layer: the six experiments that the previous version of this work listed as planned and not reported. They are smaller than the four above and each is tied to one statement: the in-context identity on a finite task family (Section~\ref{sec:icl}); the implicit priors of convolutional, residual and attention architectures on orbits of a translation group (Section~\ref{sec:arch}); block-wise scaling curves on the digits data of \citet{Pedregosa2011} (Section~\ref{sec:scal}); the dependence of the whole prior, not only of a code length, on the order of the examples (Section~\ref{sec:order}); the redistribution of the symmetry tax of Corollary~\ref{cor:orbit} (Section~\ref{sec:tax}); and exact tests of Conjectures~\ref{conj:invariance} and~\ref{conj:envelope} on the stored priors of Section~\ref{sec:mup} (Section~\ref{sec:conjx}). Their outcomes are again mixed. The theorems hold to rounding error wherever they are checked. Two of the hypotheses we wrote down are refuted (a single-seed network does not treat the translates of a task equally, and order sensitivity is not monotone in the width), the order of presentation turns out to move the prior as much as the seed does, and the two open conjectures survive only in qualified forms.

\paragraph{Organization.} Sections~\ref{sec:setting}--\ref{sec:neural} contain the theory, with complete proofs. Section~\ref{sec:conj} states the three conjectures and the protocol. Sections~\ref{sec:exp} and~\ref{sec:exp2} report the experiments of the first version of this work (exact enumeration at $n=10$ and $n=16$, and MNIST). Section~\ref{sec:protocol2} describes the common protocol and the validation of the four further experiments, which occupy Sections~\ref{sec:mup}--\ref{sec:grok}. Section~\ref{sec:verdicts} collects their verdicts and reports the six further experiments of the programme (Sections~\ref{sec:icl}--\ref{sec:conjx}), and the last two sections discuss limitations and conclude.

\section{Setting and definitions}\label{sec:setting}

Let $\cX$ be an input space and $\cY$ a finite label set with $|\cY|\ge 2$. An example is a pair $z=(x,y)$. We write $z_{<t}=(z_1,\dots,z_{t-1})$ and $x^n=(x_1,\dots,x_n)$. Logarithms are natural and code lengths are in nats.

\begin{Definition}[Learner]\label{def:learner}
  A \emph{learner} $A$ is a map that assigns to every finite sequence of examples $z_{<t}$ and every new input $x_t$ a probability distribution $\pA(\,\cdot\mid z_{<t},x_t)$ on $\cY$.
\end{Definition}

Nothing else is assumed. A neural training pipeline (architecture, initialization, optimizer, number of epochs, regularization, early stopping) is a learner: train on $z_{<t}$ from scratch or incrementally and output the predictive distribution at $x_t$. If the pipeline uses internal randomness, we fix the random seed, so that $A$ is a deterministic map; all statements below then hold for each seed, and therefore also on average over seeds. A learner that outputs hard decisions is covered after smoothing its outputs.

\begin{Definition}[Implicit code and implicit complexity]\label{def:code}
  For inputs $x^n$ and labels $y^n$, the \emph{implicit code} of $A$ is
  \begin{equation}\label{eq:code}
    \QA(y^n\mid x^n)=\prod_{t=1}^{n}\pA(y_t\mid z_{<t},x_t),
  \end{equation}
  and the \emph{implicit complexity} of the labeling $y^n$ is $\CA(y^n\mid x^n)=-\ln \QA(y^n\mid x^n)\in[0,\infty]$.
\end{Definition}

The implicit complexity is the cumulative log loss of the learner when it is trained online on the sequence, each example being predicted before it is used. It is the length of a concrete code: with arithmetic coding, a sender and a receiver who share the learner and the inputs can transmit $y^n$ in $\CA(y^n\mid x^n)$ nats, up to a constant \citep{CoverThomas2006}. It is also measurable: it requires only the ability to retrain and to evaluate log loss, and can be approximated by retraining at a geometric grid of sample sizes \citep{BlierOllivier2018}. It depends on the order of the examples; we return to this point in the discussion.

\begin{Lemma}\label{lem:normalized}
  For every learner $A$, every $n$ and every $x^n$, the function $y^n\mapsto \QA(y^n\mid x^n)$ is a probability distribution on $\cY^n$. Moreover its marginal on the first $t$ labels is $\QA(y^t\mid x^t)$.
\end{Lemma}

\begin{proof}
  The factor $\pA(y_n\mid z_{<n},x_n)$ is the only one in \eqref{eq:code} that depends on $y_n$, and it sums to one over $y_n\in\cY$. Hence $\sum_{y_n}\QA(y^n\mid x^n)=\QA(y^{n-1}\mid x^{n-1})$. Iterating gives the marginal property, and $n$ iterations give total mass one.
\end{proof}

\section{The conservation law}

\begin{Theorem}[Conservation of inductive bias]\label{thm:conservation}
  Let $A$ be any learner, $n\ge 1$ and $x^n\in\cX^n$. Then
  \begin{equation}\label{eq:kraft}
    \sum_{y^n\in\cY^n} e^{-\CA(y^n\mid x^n)}=1 .
  \end{equation}
  Consequently:
  \begin{enumerate}
    \item \emph{(Counting.)} For every $c\ge 0$, at most $e^{c}$ labelings have implicit complexity at most $c$.
    \item \emph{(No free lunch.)} If a set of $N$ distinct labelings of $x^n$ is given, their average implicit complexity is at least $\ln N$. In particular the average over all labelings is at least $n\ln|\cY|$, the cost of not learning at all.
    \item \emph{(Exchange.)} For any two learners $A$ and $B$,
    \begin{equation}\label{eq:exchange}
      \sum_{y^n}Q_B(y^n\mid x^n)\,\bigl[\CA(y^n\mid x^n)-C_B(y^n\mid x^n)\bigr]=\KLd{Q_B}{\QA}\ \ge 0 .
    \end{equation}
    \item \emph{(No hypercompression.)} If $Y^n$ is drawn from $Q_B(\,\cdot\mid x^n)$, then for every $a>0$,
    \(\PP\bigl[\CA(Y^n\mid x^n)\le C_B(Y^n\mid x^n)-a\bigr]\le e^{-a}.\)
  \end{enumerate}
\end{Theorem}

\begin{proof}
  Equation \eqref{eq:kraft} is Lemma~\ref{lem:normalized}. (1) If $m$ labelings have $\CA\le c$, each contributes at least $e^{-c}$ to the sum in \eqref{eq:kraft}, so $m e^{-c}\le 1$. (2) Let $c_1,\dots,c_N$ be the complexities. By Jensen's inequality and \eqref{eq:kraft}, $\exp(-\frac1N\sum_i c_i)\le \frac1N\sum_i e^{-c_i}\le \frac1N$. (3) The left-hand side is $\sum Q_B\ln(Q_B/\QA)$, which is the Kullback--Leibler divergence. (4) Let $S$ be the set of labelings with $\QA\ge e^{a}Q_B$. Then $Q_B(S)\le e^{-a}\QA(S)\le e^{-a}$.
\end{proof}

The theorem has a simple reading. The quantity $e^{-\CA}$ behaves like a conserved mass: a learner has exactly one unit of it to distribute over the $|\cY|^n$ possible labelings of any given inputs. Architecture design, data augmentation, pretraining and hyperparameter tuning do not create mass; they move it. Item (3) gives the exchange rate: measured with the weights of $B$, whatever $A$ gains on some labelings relative to $B$ it loses, and more, on others. Item (2) is the classical no-free-lunch statement, but \eqref{eq:kraft} is stronger, since it is an equality that holds for each learner and each input set, with no averaging over learners or targets. Item (4) says that no learner can beat the code of the true source by more than a few nats, except with exponentially small probability; a pipeline that appears to do so has seen the data.

Deterministic targets are covered directly: a function $f:\cX\to\cY$ induces the labeling $f(x^n)$, and a class $\mathcal F$ that induces $N$ distinct labelings on $x^n$ has average implicit complexity at least $\ln N$. For noisy targets the labelings are random and \eqref{eq:kraft} must be replaced by a statement about distributions.

\begin{Theorem}[Conservation for noisy tasks]\label{thm:noisy}
  Fix $x^n$. Let $\mu_1,\dots,\mu_M$ be probability distributions on $\cY^n$, and suppose there are pairwise disjoint sets $S_1,\dots,S_M\subseteq\cY^n$ and $\varepsilon\in[0,1)$ such that $\mu_i(S_i)\ge 1-\varepsilon$ for all $i$. Then for every learner $A$, writing $D_i=\KLd{\mu_i}{\QA(\,\cdot\mid x^n)}$ for its expected regret on task $i$,
  \begin{equation}\label{eq:noisykraft}
    \sum_{i=1}^{M}\exp\!\left(-\frac{D_i+\ln 2}{1-\varepsilon}\right)\le 1,
    \qquad\text{hence}\qquad \max_i D_i\ \ge\ (1-\varepsilon)\ln M-\ln 2 .
  \end{equation}
\end{Theorem}

\begin{proof}
  Fix $i$ and write $p=\mu_i(S_i)$ and $q=\QA(S_i\mid x^n)$. If $q=0$ then $D_i=\infty$ and the $i$-th term vanishes. Otherwise, by the data-processing inequality applied to the indicator of $S_i$,
  \[
  D_i\ \ge\ p\ln\frac{p}{q}+(1-p)\ln\frac{1-p}{1-q}\ \ge\ p\ln\frac1q-h(p)\ \ge\ (1-\varepsilon)\ln\frac1q-\ln 2,
  \]
  where $h(p)=-p\ln p-(1-p)\ln(1-p)\le\ln 2$ is the binary entropy, and we used $\ln\frac{1}{1-q}\ge0$, $\ln\frac1q\ge 0$ and $p\ge 1-\varepsilon$. Therefore $q\ge\exp(-(D_i+\ln 2)/(1-\varepsilon))$. Since the sets $S_i$ are disjoint, the corresponding values of $q$ sum to at most one. For the second claim, each of the $M$ terms in \eqref{eq:noisykraft} is at least $\exp(-(\max_iD_i+\ln2)/(1-\varepsilon))$, so $M\exp(-(\max_iD_i+\ln2)/(1-\varepsilon))\le 1$; taking logarithms gives the bound.
\end{proof}

Theorem~\ref{thm:noisy} is a form of Fano's inequality \citep{CoverThomas2006} written as a Kraft inequality on regrets. The separation hypothesis says that the tasks can be told apart from $n$ labels; when it holds, the regrets of any learner on distinguishable tasks are constrained exactly as code lengths are.

\section{Every learner is a Bayesian}

\begin{Theorem}[Representation]\label{thm:bayes}
  Fix an input sequence $x^n$ and a learner $A$. Let $W$ be the prior on labelings $\cY^n$ defined by $W(y^n)=\QA(y^n\mid x^n)$. Then for every $t\le n$ and every $y^{t-1}$ with $W(y^{t-1})>0$, the Bayesian predictive distribution of the $t$-th label under $W$ is the prediction of the learner:
  \[
  W(y_t\mid y^{t-1})=\pA(y_t\mid z_{<t},x_t)\qquad\text{for all } y_t\in\cY .
  \]
  Conversely, every prior $W$ on $\cY^n$ defines predictions $W(y_t\mid y^{t-1})$ whose implicit code on $x^n$ is $W$.
\end{Theorem}

\begin{proof}
  By Lemma~\ref{lem:normalized}, $W(y^{t})=\QA(y^{t}\mid x^{t})$ and $W(y^{t-1})=\QA(y^{t-1}\mid x^{t-1})$. Their ratio is the $t$-th factor of \eqref{eq:code}. The converse is the chain rule of probability.
\end{proof}

This is Dawid's prequential principle read backwards. It is elementary, but its consequence for deep learning is worth stating plainly. The inductive bias of a pipeline is often described by proxies: norms, margins, flatness, the geometry of the parameter-function map \citep{VallePerez2019}. Theorem~\ref{thm:bayes} says that, on any given inputs, there is one object that contains all of it: the distribution $\QA(\,\cdot\mid x^n)$. Stochastic gradient descent on a network is a Bayesian predictor for that prior, whether or not any posterior is ever computed. Proxies are useful exactly insofar as they predict $\CA$.

\section{Generalization is an identity}

Let $P$ be a distribution on $\cX\times\cY$. The risk of a predictor $p(\cdot\mid\cdot)$ is its expected log loss $R(p)=\EE_{(X,Y)\sim P}[-\ln p(Y\mid X)]$. The best possible risk is the conditional entropy $H^\ast=H(Y\mid X)$, attained by $p^\ast(y\mid x)=P(y\mid x)$, and $R(p)-H^\ast=\EE_X\,\KLd{P(\cdot\mid X)}{p(\cdot\mid X)}\ge 0$. Let $Z_1,Z_2,\dots$ be independent draws from $P$. Write $R_t=R\bigl(\pA(\,\cdot\mid Z_{<t},\,\cdot\,)\bigr)$ for the risk of the predictor obtained from the first $t-1$ examples; $R_t$ is a random variable. Define the \emph{learning curve} and the \emph{redundancy} of $A$ on $P$ by
\[
e_t=\EE[R_t]-H^\ast\ \ge 0,\qquad \Gamma_n=\EE\bigl[\CA(Y^n\mid X^n)\bigr]-nH^\ast .
\]

\begin{Theorem}[Compression identity]\label{thm:identity}
  For every learner $A$, every distribution $P$ and every $n$,
  \begin{equation}\label{eq:identity}
    \EE\bigl[\CA(Y^n\mid X^n)\bigr]=\sum_{t=1}^{n}\EE[R_t],
    \qquad\text{equivalently}\qquad \Gamma_n=\sum_{t=1}^{n}e_t,\quad e_{n+1}=\Gamma_{n+1}-\Gamma_n .
  \end{equation}
  Moreover, the averaged predictor $\bar p_n=\frac1n\sum_{t=1}^{n}\pA(\,\cdot\mid Z_{<t},\,\cdot\,)$ satisfies $\EE[R(\bar p_n)]-H^\ast\le \Gamma_n/n$.
\end{Theorem}

\begin{proof}
  By definition $\CA(Y^n\mid X^n)=\sum_{t}-\ln \pA(Y_t\mid Z_{<t},X_t)$. Since $Z_t$ is independent of $Z_{<t}$ and has law $P$, the conditional expectation of the $t$-th term given $Z_{<t}$ is $R_t$. Taking expectations and summing gives \eqref{eq:identity}; all terms are non-negative after subtracting $H^\ast$, so the identity holds in $[0,\infty]$. The last claim follows from the convexity of $p\mapsto-\ln p$, which gives $R(\bar p_n)\le\frac1n\sum_t R_t$.
\end{proof}

Equation \eqref{eq:identity} is an equality, valid for any learner and any distribution, with no capacity term and no confidence parameter. The expected test loss after $n$ examples is the expected number of nats the learner needs to encode the $(n+1)$-th label. A learner generalizes on $P$ if and only if it compresses the samples of $P$, and the amount of one is the amount of the other. The inequality for $\bar p_n$ is the standard online-to-batch conversion \citep{CesaBianchi2004}. For classification error one has a pointwise statement.

\begin{Corollary}[Mistakes]\label{cor:mistakes}
  Let $\hat y_t$ be a label of maximal probability under $\pA(\,\cdot\mid z_{<t},x_t)$. For every sequence, the number of mistakes satisfies $\#\{t\le n:\hat y_t\neq y_t\}\le \CA(y^n\mid x^n)/\ln 2$. In particular, if $Y=f(X)$ for a deterministic $f$, the average over $t\le n$ of the expected error rates of the learner is at most $\EE[\CA(f(X^n)\mid X^n)]/(n\ln 2)$.
\end{Corollary}

\begin{proof}
  If $\hat y_t\ne y_t$ then $\pA(y_t\mid z_{<t},x_t)\le\pA(\hat y_t\mid z_{<t},x_t)$ and the two sum to at most one, so $\pA(y_t\mid z_{<t},x_t)\le\frac12$ and the $t$-th term of $\CA$ is at least $\ln2$. The second claim follows by taking expectations as in Theorem~\ref{thm:identity}.
\end{proof}

\subsection{What the identity says about learning curves}

Because every $e_t$ is non-negative and they sum to the redundancy, the shape of a learning curve is constrained by a single number.

\begin{Proposition}[Learning-curve calculus]\label{prop:curves}
  Let $A$ be a learner and $P$ a distribution, with learning curve $(e_t)$ and redundancy $(\Gamma_n)$.
  \begin{enumerate}
    \item \emph{(Plateaus.)} If $e_t\ge\varepsilon_0$ for $T$ values of $t\le n$, then $T\le\Gamma_n/\varepsilon_0$.
    \item \emph{(Bumps.)} For any set $I\subseteq\{1,\dots,n\}$ of sample sizes, $\sum_{t\in I}e_t\le\Gamma_n$: the area of any non-monotone excursion of the learning curve is at most the redundancy.
    \item \emph{(Finite complexity.)} Suppose $\Gamma_\infty=\sup_n\Gamma_n<\infty$ and $(e_t)$ is non-increasing. Then $e_n\le\Gamma_\infty/n$ for all $n$, and $n\,e_n\to0$.
    \item \emph{(Scaling exponents.)} Suppose $(e_t)$ is non-increasing and $\Gamma_n\le c\,n^{1-\alpha}$ for all $n$, with $c>0$ and $\alpha\in[0,1)$. Then $e_n\le c\,n^{-\alpha}$. Conversely, if $e_t\ge c'\,t^{-\alpha}$ for all $t$, then $\Gamma_n\ge c'\,n^{1-\alpha}$.
  \end{enumerate}
\end{Proposition}

\begin{proof}
  (1) and (2) follow from $\Gamma_n=\sum_{t\le n}e_t$ and $e_t\ge0$. (3) By monotonicity $n\,e_n\le\sum_{t\le n}e_t\le\Gamma_\infty$. Also $\lfloor n/2\rfloor\,e_n\le\sum_{n/2<t\le n}e_t$, which is a tail segment of a convergent series and tends to zero. (4) By monotonicity $n\,e_n\le\Gamma_n\le c\,n^{1-\alpha}$. Conversely $\Gamma_n\ge c'\sum_{t\le n}t^{-\alpha}\ge c'\,n\cdot n^{-\alpha}$.
\end{proof}

These elementary statements organize several phenomena.

\emph{Scaling laws.} A power-law learning curve $e_n\asymp n^{-\alpha}$ with $\alpha<1$, as reported for language models \citep{Kaplan2020}, is equivalent (for monotone curves) to a redundancy growing like $n^{1-\alpha}$. In the vocabulary of Theorem~\ref{thm:bayes}, the source is not a point of positive mass of the learner's prior, nor a point of a finite-dimensional family, for which the redundancy is logarithmic \citep{ClarkeBarron1990} and $e_n\asymp 1/n$. The exponent $\alpha$ is thus a property of the pair (learner, source): it measures how fast the description of the source under the learner's prior keeps growing. Item (3) gives the opposite regime: a learner that assigns finite implicit complexity to the source must eventually learn faster than $1/n$.

\emph{Delayed generalization.} A learning curve that stays at a high plateau and then drops is compatible with the theory, but the plateau is paid for: its length times its height is at most the redundancy. A caveat is essential here. The index $t$ in this paper is the number of training examples, not the number of optimization steps. Grokking as originally reported \citep{Power2022} is a delay in training time at a fixed sample size, and the identity does not constrain it. The statement applies to delays in sample size, and to single-pass training, where steps and samples coincide.

\emph{Double descent.} Sample-wise non-monotonicity, where more data temporarily hurts \citep{Nakkiran2020}, is an excursion in the sense of item (2). Its area is bounded by the redundancy, so a pipeline with small redundancy on a source cannot display a large bump on that source, whatever its number of parameters.

\section{Combining learners, and learning in context}

\begin{Theorem}[Aggregation]\label{thm:mixture}
  Let $(B_k)_{k\ge1}$ be a countable family of learners and $(w_k)$ positive weights with $\sum_kw_k=1$. Define the learner $M$ by
  \[
  p_M(y\mid z_{<t},x_t)=\frac{\sum_k w_k\,Q_{B_k}(y^{t-1}\mid x^{t-1})\,p_{B_k}(y\mid z_{<t},x_t)}{\sum_k w_k\,Q_{B_k}(y^{t-1}\mid x^{t-1})}
  \]
  when the denominator is positive, and arbitrarily otherwise. Then $Q_M=\sum_kw_kQ_{B_k}$, and for all $n$, $x^n$, $y^n$ and $k$,
  \begin{equation}\label{eq:mixture}
    C_M(y^n\mid x^n)\ \le\ C_{B_k}(y^n\mid x^n)+\ln\frac{1}{w_k}.
  \end{equation}
\end{Theorem}

\begin{proof}
  The numerator of $p_M$ at step $t$ is $\sum_kw_kQ_{B_k}(y^{t}\mid x^{t})$ with $y_t=y$, which is the denominator at step $t+1$. The product \eqref{eq:code} therefore telescopes to $\sum_kw_kQ_{B_k}(y^n\mid x^n)$ whenever this is positive, and both sides vanish otherwise. Keeping one term of the sum gives $Q_M\ge w_kQ_{B_k}$.
\end{proof}

This is the Bayes mixture, the mechanism behind Solomonoff's universal predictor \citep{Solomonoff1978,LiVitanyi2008} and behind the PAC-Bayesian view of generalization \citep{McAllester1999,Lotfi2022}. Combined with Theorem~\ref{thm:identity}, it prices model selection: choosing among pipelines, architectures or hyperparameters costs $\ln(1/w_k)$ nats \emph{in total}, not per example, so the excess risk of selection decays like $\ln(1/w_k)/n$. Combined with Theorem~\ref{thm:conservation}, it shows the price is real: the weights sum to one, so every learner added to the family dilutes the others. With weights $w_k=2^{-K(k)}$, where $K$ is prefix Kolmogorov complexity, $M$ is within $K(k)\ln2$ nats of every computable learner; it is not computable, and conservation says that no computable learner can replace it for free.

\subsection{In-context learning}

A sequence model trained on many tasks learns new tasks from its context window, without any change of parameters. The same accounting applies. Let tasks be indexed by a countable set, with prior probabilities $\pi(\tau)$, and let each task $\tau$ be a distribution $P_\tau$ on sequences $s\in\mathcal S^n$ over a finite alphabet. A pretrained sequence model is a distribution $Q$ on $\mathcal S^n$, and its total in-context regret on task $\tau$ is $\KLd{P_\tau}{Q}$, the expected number of nats it loses to a model that knows the task. Let $M_\pi=\sum_\tau\pi(\tau)P_\tau$ be the Bayes mixture.

\begin{Theorem}[In-context learning identity]\label{thm:icl}
  For every sequence model $Q$,
  \begin{equation}\label{eq:icl}
    \sum_\tau\pi(\tau)\,\KLd{P_\tau}{Q}\;=\;I(\tau;S^n)\;+\;\KLd{M_\pi}{Q},
  \end{equation}
  where $I(\tau;S^n)$ is the mutual information between the task and a sequence drawn from it. Moreover:
  \begin{enumerate}
    \item the pretraining objective $\EE_{\tau\sim\pi}\EE_{S\sim P_\tau}[-\ln Q(S)]$ equals $H(M_\pi)+\KLd{M_\pi}{Q}$, so it is minimized exactly by $Q=M_\pi$;
    \item $I(\tau;S^n)\le H(\pi)$ for every $n$, and $\KLd{P_\tau}{M_\pi}\le\ln\frac{1}{\pi(\tau)}$ for every task.
  \end{enumerate}
\end{Theorem}

\begin{proof}
  Write $\ln\frac{P_\tau}{Q}=\ln\frac{P_\tau}{M_\pi}+\ln\frac{M_\pi}{Q}$ and take expectations under $\pi(\tau)P_\tau(s)$. The first term gives $\sum_\tau\pi(\tau)\KLd{P_\tau}{M_\pi}=I(\tau;S^n)$ by definition of mutual information; the second depends on $s$ only, whose marginal law is $M_\pi$, and gives $\KLd{M_\pi}{Q}$. For (1), the objective is the cross-entropy of $Q$ under $M_\pi$. For (2), mutual information is at most the entropy of either variable, and $M_\pi\ge\pi(\tau)P_\tau$ pointwise.
\end{proof}

The identity separates what pretraining can and cannot do. The first term is a property of the task distribution alone: it is the information that the data carry about which task is being solved, and every model pays it on average. It is bounded by the entropy of the task prior, independently of the context length, so an ideally pretrained model learns in context at a total cost that does not grow with $n$ when tasks are discrete; for smoothly parametrized task families it grows logarithmically \citep{ClarkeBarron1990}. The second term is the pretraining gap, and it is exactly what the training loss measures above its floor. In-context learning is therefore not a separate ability to be explained: it is the form that Theorem~\ref{thm:mixture} takes when the mixture is amortized into the weights of one network, in agreement with the Bayesian account of \citet{Xie2022}. Conservation applies as well: by Theorem~\ref{thm:noisy}, a model cannot have small in-context regret on more distinguishable tasks than its budget allows.


\section{Neural networks as codes}\label{sec:neural}

Everything above holds for an arbitrary learner. We now use the two features that distinguish a neural pipeline: it is trained by a sequential update rule, and its architecture and initialization have symmetries. Both have exact consequences in nats.

\subsection{The loss curve is the code}

\begin{Proposition}[Single-pass training]\label{prop:sgd}
  Let $p_\theta(\,\cdot\mid x)$ be a network with parameters $\theta$ and a normalized (for instance softmax) output. Let $\theta_0$ be the initialization determined by the seed and let $\theta_t=U_t(\theta_{t-1},s_{t-1},z_t)$ be any update rule with internal state $s_t$ (stochastic gradient descent, momentum, Adam, with any schedule and regularizer). Let $A$ be the learner that predicts $x_t$ with $p_{\theta_{t-1}}$. Then for every sequence,
  \begin{equation}\label{eq:sgd}
    \CA(y^n\mid x^n)=\sum_{t=1}^{n}\ell_t,\qquad \ell_t=-\ln p_{\theta_{t-1}}(y_t\mid x_t),
  \end{equation}
  where $\ell_t$ is the loss of example $t$ evaluated \emph{before} the update that uses it. Under independent sampling from $P$, $\EE[\ell_t]=\EE[R_t]$, and $\EE\bigl[\sum_{t\le n}\ell_t\bigr]-nH^\ast=\Gamma_n$.
\end{Proposition}

\begin{proof}
  The parameters $\theta_{t-1}$ are a function of $z_{<t}$ and the seed, so $A$ is a learner in the sense of Definition~\ref{def:learner} and \eqref{eq:sgd} is \eqref{eq:code} after taking logarithms. The second claim is Theorem~\ref{thm:identity}.
\end{proof}

The proposition is immediate, and it removes the distance between the theory and practice. The training-loss curve logged during one epoch of online training is not a proxy for a description length: it is one, and its area is the implicit complexity of the data under the pipeline. In this regime there is no generalization gap to bound, because the logged loss of each example is an unbiased estimate of the test risk of the current network; the theory of generalization of a single-pass network is the theory of the area under its loss curve, and Theorem~\ref{thm:conservation} says that this area, exponentiated and summed over all labelings, is exactly one. Multi-epoch training defines a learner as well (retrain on $z_{<t}$, then predict), but its code length is no longer read off one run.

\subsection{Symmetry has a price}

A pipeline with a random seed $s$ defines one learner $A_s$ per seed. Let $\bar Q(\,\cdot\mid x^n)=\EE_s\,Q_{A_s}(\,\cdot\mid x^n)$ be the seed-averaged implicit code. It is a probability distribution on $\cY^n$, hence by Theorem~\ref{thm:bayes} the implicit code of a learner, namely the mixture of Theorem~\ref{thm:mixture} over seeds.

\begin{Theorem}[Symmetry tax]\label{thm:symmetry}
  Fix $x^n$ and let a finite group $G$ act on the labelings $\cY^n$. Suppose the seed-averaged code is invariant: $\bar Q(g\cdot y^n\mid x^n)=\bar Q(y^n\mid x^n)$ for all $g\in G$ and all $y^n$. Then for every labeling $y^n$, with $G\cdot y^n$ its orbit,
  \begin{equation}\label{eq:symmetry}
    \EE_s\bigl[C_{A_s}(y^n\mid x^n)\bigr]\ \ge\ -\ln\bar Q(y^n\mid x^n)\ \ge\ \ln\bigl|G\cdot y^n\bigr| .
  \end{equation}
\end{Theorem}

\begin{proof}
  The first inequality is Jensen's inequality for $-\ln$. For the second, the $|G\cdot y^n|$ labelings of the orbit are distinct and have the same mass under $\bar Q$, and their total mass is at most one.
\end{proof}

\begin{Corollary}[The price of class names]\label{cor:names}
  Let $|\cY|=K$ and consider a network with $K$ output units and a softmax, whose initialization law is invariant under permutations of the output units and whose update rule commutes with such permutations (as do gradient descent, momentum and Adam with an identically distributed output layer). Then every labeling in which $k$ distinct classes occur satisfies
  \[
  \EE_s\bigl[C_{A_s}(y^n\mid x^n)\bigr]\ \ge\ \ln\frac{K!}{(K-k)!}.
  \]
\end{Corollary}

\begin{proof}
  Let $\sigma$ be a permutation of $\cY$ and let $\sigma s$ denote the initialization $s$ with its output units permuted by $\sigma$. Training from $\sigma s$ on the relabeled data $\sigma y^n$ produces, by equivariance of the update rule, the trajectory of $(s,y^n)$ with output units permuted, so $Q_{A_{\sigma s}}(\sigma y^n\mid x^n)=Q_{A_s}(y^n\mid x^n)$. Since $s$ and $\sigma s$ have the same law, $\bar Q$ is invariant under the symmetric group acting by relabeling. The stabilizer of a labeling that uses $k$ classes consists of the permutations fixing those classes, of which there are $(K-k)!$; the orbit has $K!/(K-k)!$ elements, and Theorem~\ref{thm:symmetry} applies.
\end{proof}

Theorem~\ref{thm:symmetry} and Corollary~\ref{cor:names} are statements about the seed-averaged code. For a single seed, or for a head that is not symmetric, the following consequence of Theorem~\ref{thm:conservation} takes their place.

\begin{Corollary}[Breaking a symmetry moves the tax]\label{cor:orbit}
  Let $A$ be any learner (a single seed; no symmetry is assumed), fix $x^n$ and let a finite group $G$ act on $\cY^n$. For every labeling $y^n$,
  \begin{equation}\label{eq:orbit}
    \frac{1}{|G\cdot y^n|}\sum_{u^n\in G\cdot y^n}\CA(u^n\mid x^n)\ \ge\ \ln|G\cdot y^n|-\ln\QA(G\cdot y^n\mid x^n)\ \ge\ \ln|G\cdot y^n| .
  \end{equation}
  In particular, if $|G\cdot y^n|\ge2$ and $\CA(y^n\mid x^n)=\ln|G\cdot y^n|-\delta$ with $\delta>0$, then the other labelings of the orbit cost on average at least $\ln|G\cdot y^n|+\delta/(|G\cdot y^n|-1)$.
\end{Corollary}

\begin{proof}
  The left-hand side is the average of $-\ln\QA$ over the orbit. By Jensen's inequality it is at least minus the logarithm of the average of $\QA$ over the orbit, which is $\QA(G\cdot y^n\mid x^n)/|G\cdot y^n|$; this is the first inequality, and the second holds because the mass of the orbit is at most one. For the last claim, write $N=|G\cdot y^n|$: the sum of the complexities over the orbit is at least $N\ln N$, so the $N-1$ other labelings share at least $N\ln N-\ln N+\delta$.
\end{proof}

A head that is initialized asymmetrically, or pretrained, can thus make one naming of the classes cheaper than the tax, but only by making the other namings more expensive: the tax is moved inside the orbit and never removed. Measuring this redistribution on trained networks is left to future work.

A thousand-class classifier with a symmetric head therefore pays at least $\ln 1000!\approx 5912$ nats, in total and not per example, before it can know which unit is which class; no optimizer, width or depth avoids it, and a pretrained head is precisely a broken symmetry. The same argument applies on the input side. A fully connected network with an isotropic Gaussian first layer, trained by gradient descent, is equivariant under orthogonal maps of the input \citep{Ng2004}: $\bar Q(y^n\mid Ux^n)=\bar Q(y^n\mid x^n)$ for every orthogonal $U$. Its unit of mass cannot distinguish a target $f$ from $f\circ U^{-1}$, so by Theorem~\ref{thm:noisy} it cannot have small regret on more distinguishable rotations of a task than its budget allows. A convolutional network breaks this symmetry, and conservation says what that means: locality and weight sharing do not add capacity, they withdraw mass from the rotated copies of natural tasks and deposit it on the originals. An architecture \emph{is} a choice of which symmetries to pay for.

\subsection{The price and the value of pretraining}

\begin{Corollary}[Pretraining gain]\label{cor:pretrain}
  Let $A$ be any learner and let $Z_1,Z_2,\dots$ be independent draws from $P$. The expected code length of $n$ fresh examples after $A$ has been trained on $m$ examples is $nH^\ast+\Gamma_{m+n}-\Gamma_m$. Relative to training from scratch, pretraining on $m$ examples of the same source saves exactly
  \begin{equation}\label{eq:pretrain}
    \Gamma_m+\Gamma_n-\Gamma_{m+n}=\sum_{t=1}^{n}\bigl(e_t-e_{m+t}\bigr)\ \le\ \Gamma_n
  \end{equation}
  nats, which is non-negative whenever the learning curve is non-increasing.
\end{Corollary}

\begin{proof}
  By Theorem~\ref{thm:identity} the examples $m+1,\dots,m+n$ cost $\sum_{t=m+1}^{m+n}\EE[R_t]=nH^\ast+\Gamma_{m+n}-\Gamma_m$ in expectation, and from scratch $n$ examples cost $nH^\ast+\Gamma_n$. Subtract.
\end{proof}

The value of pretraining is the subadditivity defect of the redundancy. It can never exceed $\Gamma_n$, the whole cost of learning the downstream sample from scratch, and it approaches that ceiling as the curve flattens: for a power law $\Gamma_n\asymp n^{1-\alpha}$ and $m\gg n$, the remaining cost is of order $n\,m^{-\alpha}$. Across different sources the same subtraction, with the code lengths of the two orders of presentation, measures transfer, and nothing forces it to be positive: negative transfer is mass deposited in the wrong place.

\subsection{The one closed form: infinite width}

Lemma~\ref{lem:normalized} and Theorem~\ref{thm:bayes} hold verbatim for real-valued labels, with densities and integrals in place of probabilities and sums (code lengths then being differential). In that setting there is one neural learner whose implicit prior is known in closed form. A Bayesian network in the infinite-width limit is a Gaussian process with a kernel $k$ determined by the architecture \citep{Neal1996,Lee2018}; with Gaussian observation noise of variance $\sigma^2$ its implicit code on $x^n$ is the density of $\mathcal N(0,K_n+\sigma^2I)$, with $K_n=[k(x_i,x_j)]_{i,j\le n}$, so that
\[
\CA(y^n\mid x^n)=\tfrac12\,y^{\top}(K_n+\sigma^2I)^{-1}y+\tfrac12\ln\det\bigl(2\pi(K_n+\sigma^2I)\bigr).
\]
The implicit complexity of a target is its squared norm in the geometry of the kernel plus a volume term that does not depend on the labels. The conjectures of Section~\ref{sec:conj} are statements about how finite, feature-learning networks depart from this formula.

Table~\ref{tab:summary} collects the correspondences established so far.

\begin{table}[htbp]
  \centering
  \caption{One accounting system for several phenomena. ``Proved'' refers to statements with complete proofs in this paper; all of them hold for arbitrary learners.}
  \begin{tabularx}{\textwidth}{p{0.24\textwidth}Z p{0.24\textwidth}}
    \toprule
    Phenomenon & Statement in terms of implicit code length & Status\\ \midrule
    No free lunch & Kraft equality over labelings; exchange rate between tasks & Proved (Thm.~\ref{thm:conservation}, \ref{thm:noisy})\\
    Inductive bias & The implicit code is a prior; the learner is its Bayes predictor & Proved (Thm.~\ref{thm:bayes})\\
    Generalization & Sum of test risks equals expected code length & Proved (Thm.~\ref{thm:identity})\\
    Scaling laws & Exponent $\alpha$ corresponds to redundancy growth $n^{1-\alpha}$ & Proved (Prop.~\ref{prop:curves})\\
    Plateaus, sample-wise double descent & Area of any excursion is at most the redundancy & Proved (Prop.~\ref{prop:curves})\\
    Model selection, ensembling & Costs $\ln(1/w_k)$ nats in total & Proved (Thm.~\ref{thm:mixture})\\
    Single-pass training & Area under the online loss curve equals the code length & Proved (Prop.~\ref{prop:sgd})\\
    Architectural symmetry & A labeling costs at least the logarithm of its orbit & Proved (Thm.~\ref{thm:symmetry}, Cor.~\ref{cor:names})\\
    Pretraining & Gain equals $\Gamma_m+\Gamma_n-\Gamma_{m+n}$ & Proved (Cor.~\ref{cor:pretrain})\\
    In-context learning & Regret equals task information plus pretraining gap & Proved (Thm.~\ref{thm:icl})\\
    Why deep networks generalize & Their implicit prior favours learnable structure & Conjectures~\ref{conj:invariance}--\ref{conj:scaling}\\ \bottomrule
  \end{tabularx}
  \label{tab:summary}
\end{table}

\section{From accounting to science: three conjectures}\label{sec:conj}

The theorems above hold for every learner, and so they cannot by themselves explain why some learners work. They say where the explanation must be found: in the shape of the implicit prior $\QA$. The success of deep learning is the empirical fact that, for the pipelines in use, $\QA$ puts large mass on the labelings that occur in nature. We now state what we believe is true about that shape, in a form that can be refuted.

\subsection{A conjecture that must fail}

The most natural hypothesis is that gradient-trained networks approximate the universal prior: that there are constants $a,b$ such that $\CA(f(x^n)\mid x^n)\le a\,K(f)+b$ for every computable target $f$, with $K$ the Kolmogorov complexity. This is false for every efficient learner, for a computational reason. Under the standard assumption that pseudorandom function families exist \citep{GGM1986}, there are functions with a short description (a key and a fixed program) whose values on new inputs no polynomial-time procedure can predict better than chance. For such targets any polynomial-time learner has implicit complexity close to $n\ln|\cY|$, while $K(f)$ is at most the length of the key plus a constant, independently of $n$. Simplicity in the sense of description length is therefore not what efficient learners can be biased towards. Whatever complexity governs deep learning must be resource-bounded and must reflect what is \emph{learnable}, not merely what is short. Conservation sharpens the point: mass spent on short-but-unlearnable targets would be wasted, so a good efficient learner should \emph{not} approximate the universal prior.

\subsection{The conjectures}

Call a pipeline \emph{mainstream} if it is a gradient-trained neural network of a standard family (multilayer perceptron, convolutional network, transformer) with standard initialization and tuning, and call a task \emph{natural} if it is a prediction problem on data produced by physical or human processes (images, text, speech, measurements), as opposed to labelings constructed with reference to the learner.

\begin{conjecture}[Multiplicative invariance]\label{conj:invariance}
  For any two mainstream pipelines $A$ and $B$ applicable to the same input modality, there are constants $a_{AB}\ge1$ and $c_{AB}\ge0$, independent of the task, such that for all natural tasks and all $n$,
  \(\EE[\CA(Y^n\mid X^n)]-nH^\ast\ \le\ a_{AB}\bigl(\EE[C_B(Y^n\mid X^n)]-nH^\ast\bigr)+c_{AB}.\)
\end{conjecture}

This is the analogue, for practical learners, of the invariance theorem of Kolmogorov complexity \citep{LiVitanyi2008}, with a multiplicative constant in place of an additive one. It asserts that mainstream pipelines agree, up to a bounded factor, on which natural tasks are hard: there is a single learner-independent notion of the learnable complexity of a natural task, and pipelines differ only in their constants. Since $H^\ast$ is unknown in practice, the testable form compares differences of code lengths between sample sizes or between tasks. The conjecture is refuted by a family of natural tasks along which the ratio of redundancies of two mainstream pipelines is unbounded.

\begin{conjecture}[Simplicity envelope]\label{conj:envelope}
  Let $\tilde K$ be a fixed computable compressor (for instance a Lempel--Ziv coder) applied to the labeling $y^n$ listed in a canonical order of the inputs. For every mainstream pipeline $A$ and input set $x^n$ there are constants $a,b$ such that, for all labelings, $\tilde K(y^n)\le a\,\CA(y^n\mid x^n)+b$.
\end{conjecture}

In words: every labeling that the network finds easy is compressible by a simple, efficient compressor. This is the converse direction of the false conjecture above, and it is the direction compatible with the cryptographic obstruction; it formalizes the simplicity bias observed by \citet{VallePerez2019}. By the counting part of Theorem~\ref{thm:conservation}, it is a non-trivial statement about where a learner's unit of mass is located. It is refuted by a labeling with small measured $\CA$ on which the compressor fails by a growing margin as $n$ increases.

\begin{conjecture}[Scale concentrates the prior]\label{conj:scaling}
  Let $A_m$ be a mainstream pipeline with $m$ parameters, all else fixed, and let $H(Q_{A_m}(\,\cdot\mid x^n))$ be the Shannon entropy of its implicit prior on a set of natural inputs $x^n$. Beyond the interpolation threshold, this entropy is non-increasing in $m$.
\end{conjecture}

The classical intuition is that a larger model is a more flexible one, with a flatter prior over labelings. Conservation shows that this cannot be reconciled with the observation that larger models have lower redundancy on natural tasks unless the mass comes from somewhere. The conjecture states where: larger models withdraw mass from noise-like labelings, so that their implicit prior becomes more concentrated, not less. Benign overparametrization is then a statement about the entropy of $\QA$, which is measurable, and not about parameter counts. The conjecture is refuted by a pipeline whose implicit-prior entropy increases with width or depth in the overparametrized regime.

\subsection{A protocol that can refute them}

All three conjectures can be tested at small scale, because on a small input set the implicit prior can be computed \emph{exactly}. Take $n=16$ inputs and binary labels. The implicit code of a pipeline on all $2^{16}$ labelings is determined by its predictions at the nodes of the binary tree of label prefixes, which has $2^{16}-1$ internal nodes; each node requires one training run on at most $15$ examples. This is about $65{,}000$ very small training runs per pipeline and per seed, which is feasible on a laptop for small networks. The procedure is as follows.
\begin{enumerate}
  \item \emph{Validation.} Check that the computed values satisfy \eqref{eq:kraft}. This is a theorem, so any deviation indicates an implementation error (for instance, information leaking between prefixes); it plays the role of a conservation check in a numerical simulation.
  \item \emph{Bias spectrum.} Report the full distribution of $\CA$ over labelings, its entropy $H(\QA)$, and the scatter of $\CA$ against $\tilde K$. Conjecture~\ref{conj:envelope} predicts an affine envelope; Conjecture~\ref{conj:scaling} predicts that the entropy decreases as width grows.
  \item \emph{Exchange rates.} For two pipelines, report $\KLd{Q_B}{\QA}$ and $\KLd{\QA}{Q_B}$, the two sides of \eqref{eq:exchange}. These are exact measures of how different two inductive biases are, in nats, on the given inputs.
  \item \emph{Invariance at scale.} On standard datasets, estimate code lengths by retraining at a geometric grid of sample sizes, as in \citet{BlierOllivier2018}, for several pipelines and many tasks, and regress redundancy differences of one pipeline on those of another. Conjecture~\ref{conj:invariance} predicts a bounded ratio across tasks.
  \item \emph{Order.} Report the spread of $\CA$ over random permutations of the same data, which measures the departure of the pipeline from an exchangeable Bayesian learner.
\end{enumerate}
Steps 1, 2, 3 and 5 are carried out at $n=10$ in Section~\ref{sec:exp}; the $n=16$ version and a first instance of step 4 are carried out in Section~\ref{sec:exp2}. Sections~\ref{sec:protocol2}--\ref{sec:grok} then extend the protocol in four directions, with exact enumeration at $n=12$ wherever the question allows it.


\section{Numerical experiments}\label{sec:exp}

\subsection{Design}
We implemented steps 1, 2, 3 and 5 of the protocol with \emph{exact} enumeration. We drew $n=10$ inputs i.i.d.\ from $\mathcal N(0,I_3)$ (seed $0$) and used binary labels, so there are $2^{10}=1024$ labelings. For each pipeline, the implicit code on all labelings was obtained from the $2^{10}-1=1023$ internal nodes of the prefix tree: at each node the learner is trained \emph{from scratch} on the prefix and queried at the next input. This is retraining at every sample size, not the single-pass learner of Proposition~\ref{prop:sgd}. The six pipelines are: the Laplace (add-one) estimator, which ignores inputs and is exchangeable; a smoothed $1$-nearest-neighbour rule (probability $0.8$ on the neighbour's label); $\ell_2$-regularized logistic regression; and one-hidden-layer $\tanh$ networks of width $2$, $8$ and $32$ (MLP-$H$) with LeCun-normal initialization (seed $1$). Both gradient learners take $60$ full-batch gradient steps with step size $0.5$. As the computable compressor $\tilde K$ of Conjecture~\ref{conj:envelope} we used the LZ78 code length of the label string in index order. The whole study is a single dependency-free Python script (Appendix~\ref{app:code}) that ran in about $21$\,s on one CPU core; all raw numbers are in the supplementary file \texttt{data/results.json}. For the present version the script was run again, and the tables of this section were compared with its output (Section~\ref{sec:protocol2}).

\subsection{Conservation check and bias spectrum}
Table~\ref{tab:spectrum} reports the results. Kraft's equality~\eqref{eq:kraft} holds for every pipeline to within $2.2\times10^{-16}$, the double-precision rounding level. This is what Theorem~\ref{thm:conservation} requires, and it shows that no information leaks between prefixes. The bias spectrum shows how the fixed unit of mass is spread. The Laplace learner spreads it over labelings according to their label counts (entropy 5.85 nats, against $10\ln 2=6.93$ for not learning at all). The gradient-trained networks put it on a few labelings: at width $32$, six labelings cost at most $3$ nats, and the most expensive labeling costs $33.5$ nats, more than four times the cost of not learning.

\begin{table}[htbp]
  \centering
  \caption{Exact bias spectrum over all $1024$ labelings of $n=10$ inputs. $\sum e^{-C}-1$: deviation from Kraft's equality; $H(Q_A)$: entropy of the implicit prior (nats); $\#\{C\le3\}$: number of labelings with code length at most $3$ nats; $\rho_S$: Spearman correlation between $C_A$ and the LZ78 code length.\label{tab:spectrum}}
  \begin{tabularx}{\textwidth}{lZZZZZZ}
    \toprule
    Pipeline & $\sum e^{-C}-1$ & $H(Q_A)$ & $\min C_A$ & $\max C_A$ & $\#\{C\le3\}$ & $\rho_S$\\
    \midrule
    Laplace & $2.2e-16$ & 5.854 & 2.40 & 7.93 & 2 & 0.315\\
    1-NN & $2.2e-16$ & 5.197 & 2.70 & 15.18 & 2 & 0.163\\
    LogReg & $-1.1e-16$ & 2.866 & 1.46 & 17.31 & 6 & 0.109\\
    MLP-2 & $0.0e+00$ & 2.559 & 1.23 & 18.44 & 5 & 0.056\\
    MLP-8 & $0.0e+00$ & 2.168 & 1.30 & 25.22 & 5 & 0.134\\
    MLP-32 & $-1.1e-16$ & 2.031 & 1.42 & 33.52 & 6 & 0.124\\
    \bottomrule
  \end{tabularx}
\end{table}

\paragraph{Conjecture~\ref{conj:scaling}.} The entropy of the implicit prior of the networks decreases monotonically with width: 2.559 (width~2), 2.168 (width~8), 2.031 (width~32) nats. Widening the network makes its prior more concentrated, not flatter. This is the direction the conjecture predicts. It is a single input set and a single seed with widths up to $32$, so it is consistent with the conjecture but does not establish it.

\paragraph{Conjecture~\ref{conj:envelope}.} The rank correlation between $C_A$ and the LZ78 length is positive for all pipelines, but it is weak ($\rho_S\le0.32$, and $\le0.13$ for the networks). At $n=10$ the LZ78 coder barely compresses at all, and the index order of the inputs has no geometric meaning, so this test has little power. We read it as uninformative, neither as a refutation nor as support. A geometry-aware compressor and larger $n$ are needed.

\subsection{Exchange rates between inductive biases}
Table~\ref{tab:kl} gives the exact divergences $\KLd{Q_B}{Q_A}$, which by~\eqref{eq:exchange} are the average excess code length of $A$ on labelings drawn from $B$. The gradient-trained pipelines form one tight cluster: logistic regression and the three networks are within $0.6$ nats of each other in both directions. The Laplace and nearest-neighbour learners are far from this cluster, and the matrix is strongly asymmetric. Labelings typical for MLP-32 cost the Laplace learner $3.85$ extra nats on average, while labelings typical for Laplace cost MLP-32 $8.04$ extra nats. Wider networks move further away from the exchangeable learner: $\KLd{Q_{\text{Lap}}}{Q_{\text{MLP-}H}}$ grows from $3.33$ to $5.50$ to $8.04$ nats. This matches the entropy decrease above. Within this small family, the gradient pipelines agree on which labelings are cheap, as Conjecture~\ref{conj:invariance} would require, but this is no test of its statement at scale.

\begin{table}[htbp]
  \centering
  \caption{Exact exchange rates $\KLd{Q_B}{Q_A}$ in nats (row $A$, column $B$).\label{tab:kl}}
  \begin{tabularx}{\textwidth}{lZZZZZZ}
    \toprule
    $A\ \backslash\ B$ & Laplace & 1-NN & LogReg & MLP-2 & MLP-8 & MLP-32\\
    \midrule
    Laplace & 0.00 & 0.87 & 2.08 & 2.16 & 3.04 & 3.85\\
    1-NN & 1.01 & 0.00 & 1.09 & 1.13 & 1.56 & 2.01\\
    LogReg & 2.88 & 2.08 & 0.00 & 0.17 & 0.22 & 0.39\\
    MLP-2 & 3.33 & 2.07 & 0.22 & 0.00 & 0.12 & 0.35\\
    MLP-8 & 5.50 & 3.48 & 0.33 & 0.17 & 0.00 & 0.15\\
    MLP-32 & 8.04 & 4.93 & 0.60 & 0.49 & 0.15 & 0.00\\
    \bottomrule
  \end{tabularx}
\end{table}

\subsection{Order dependence}
For each of $20$ random orders of the same data, we recomputed the code length of two labelings: the constant labeling, and the half-space labeling $y=\mathbb 1[x_1>0]$ (Table~\ref{tab:order}). The Laplace learner is exchangeable, and its spread is exactly zero, as it must be. The gradient learners are not exchangeable. Their code lengths vary over a range of about $2.6$--$3.2$ nats across orders, with standard deviations of $0.55$--$0.79$ nats. On $10$ examples this is a substantial fraction of the total. Order is therefore a first-order effect at this scale and should always be reported with code lengths, as advocated in the Discussion.

\begin{table}[htbp]
  \centering
  \caption{Code length (nats) over $20$ random presentation orders.\label{tab:order}}
  \begin{tabularx}{\textwidth}{llZZZZ}
    \toprule
    Pipeline & Labeling & mean & s.d. & min & max\\
    \midrule
    Laplace & all-zero & 2.40 & 0.00 & 2.40 & 2.40\\
    Laplace & sign(x1) & 7.19 & 0.00 & 7.19 & 7.19\\
    LogReg & all-zero & 2.08 & 0.55 & 1.29 & 3.66\\
    LogReg & sign(x1) & 6.62 & 0.79 & 5.67 & 8.57\\
    MLP-8 & all-zero & 2.11 & 0.69 & 1.03 & 3.87\\
    MLP-8 & sign(x1) & 8.61 & 0.79 & 6.95 & 10.12\\
    \bottomrule
  \end{tabularx}
\end{table}

\subsection{The price of class names}
Corollary~\ref{cor:names} predicts that a softmax learner with a permutation-symmetric head pays at least $\ln\bigl(K!/(K-k)!\bigr)$ nats for a labeling that uses $k$ classes. We trained a $K$-class softmax regression with zero initialization, which is exactly equivariant under permutations of the classes, on the cyclic labeling $y_t=t\bmod K$. The measured code lengths satisfy the bound in every case (Table~\ref{tab:sym}). The excess over the bound shrinks from $21\times$ at $K=2$ to $3.5\times$ at $K=10$, so as the number of classes grows, the symmetry tax becomes a dominant part of the total cost.

\begin{table}[htbp]
  \centering
  \caption{Symmetry tax for a zero-initialized $K$-class softmax learner ($n=10$).\label{tab:sym}}
  \begin{tabularx}{\textwidth}{ZZZZZ}
    \toprule
    $K$ & $k$ & measured $C_A$ & bound $\ln\frac{K!}{(K-k)!}$ & ratio\\
    \midrule
    2 & 2 & 14.86 & 0.69 & 21.4\\
    3 & 3 & 25.21 & 1.79 & 14.1\\
    5 & 5 & 41.10 & 4.79 & 8.6\\
    10 & 10 & 53.52 & 15.10 & 3.5\\
    \bottomrule
  \end{tabularx}
\end{table}

\subsection{Scope of the experiments}
These experiments are exact but small: one input set, one network seed, $n=10$, widths up to $32$ and short training. They verify the theorems numerically (Kraft's equality, exchangeability of the Laplace learner, the symmetry bound) and give first, preliminary evidence on Conjecture~\ref{conj:scaling}. They do not test Conjecture~\ref{conj:invariance} at scale, and they are uninformative about Conjecture~\ref{conj:envelope}. Section~\ref{sec:exp2} removes several of these restrictions.

\section{Exact experiments at $n=16$ and code lengths on MNIST}\label{sec:exp2}

This section carries out the $n=16$ version of the protocol of Section~\ref{sec:conj} and a first instance of its step~4 on real data. Results that go against our conjectures are reported with the same weight as those that support them. All numbers below are read from \texttt{data/results\_n16.json} and \texttt{data/results\_mnist.json}.

\subsection{Design at $n=16$}
We drew three input sets of $n=16$ points from $\mathcal N(0,I_3)$ and, for each, two initialization seeds. The networks are the one-hidden-layer $\tanh$ networks of Section~\ref{sec:exp}, with widths $H\in\{2,4,8,16,32,64\}$, $60$ full-batch gradient steps and step size $0.5$, in two parametrizations. In the \emph{standard} one (that of Section~\ref{sec:exp}) the output is $\sum_j v_j\tanh(w_j\cdot x)$ with $v_j\sim\mathcal N(0,1/H)$. In the \emph{NTK} one the output is $H^{-1/2}\sum_j v_j\tanh(w_j\cdot x)$ with $v_j\sim\mathcal N(0,1)$. The two define the same function at initialization, but at a fixed step size the movement in function space per step grows with $H$ in the first and is independent of $H$ in the second. For each of the $72$ runs the implicit code was computed on all $2^{16}=65{,}536$ labelings from the $65{,}535$ internal nodes of the prefix tree, each node being a training run from scratch: $4.7$ million training runs in total, vectorised over the nodes of equal depth ($567$\,s on three CPU cores). The Laplace, nearest-neighbour and logistic-regression learners of Section~\ref{sec:exp} were computed on the same inputs.

\subsection{Conservation}
Over all $72$ network runs and the nine baseline runs, the largest deviation from Kraft's equality~\eqref{eq:kraft} is $4.4\times10^{-16}$, with $65{,}536$ terms in each sum. Theorem~\ref{thm:conservation} is verified at $n=16$ at the rounding level.

\subsection{Width and the entropy of the prior: Conjecture~\ref{conj:scaling} depends on the parametrization}
Table~\ref{tab:n16} and Figure~\ref{fig:entropy} give the entropy of the implicit prior as a function of width. In the standard parametrization the mean entropy falls from $3.98$ to $3.18$ nats between widths $2$ and $64$, and $23$ of the $30$ width doublings (six runs, five doublings each) decrease it. The effect is real on average, but it is not monotone run by run: only $2$ of $6$ runs decrease at every doubling, and the standard deviation across runs reaches $0.66$ nats. In the NTK parametrization the sign is reversed. The mean entropy \emph{rises} from $5.07$ nats at width $2$ to $6.65$ at width $32$ ($6.49$ at width $64$), $20$ of the $30$ doublings increase it, and $0$ of $6$ runs are non-increasing.

\begin{table}[htbp]
  \centering
  \caption{Exact entropy of the implicit prior on all $65{,}536$ labelings of $n=16$ inputs (nats; mean $\pm$ s.d.\ over three input sets and two initializations), and Kullback--Leibler divergence between the priors of two initialization seeds on the same inputs (nats; mean over six ordered pairs). The value for no learning is $16\ln2=11.09$.\label{tab:n16}}
  \begin{tabularx}{\textwidth}{ZZZZZ}
    \toprule
    & \multicolumn{2}{c}{standard parametrization} & \multicolumn{2}{c}{NTK parametrization}\\
    width $H$ & $H(Q_A)$ & seed KL & $H(Q_A)$ & seed KL\\
    \midrule
    2 & $3.98\pm0.38$ & 1.61 & $5.06\pm0.39$ & 1.31\\
    4 & $3.91\pm0.30$ & 1.02 & $5.86\pm0.32$ & 0.66\\
    8 & $3.71\pm0.29$ & 0.68 & $6.01\pm0.50$ & 0.47\\
    16 & $3.66\pm0.24$ & 0.68 & $6.43\pm0.37$ & 0.34\\
    32 & $3.38\pm0.60$ & 0.63 & $6.65\pm0.56$ & 0.39\\
    64 & $3.18\pm0.65$ & 0.69 & $6.49\pm0.52$ & 0.37\\
    \bottomrule
  \end{tabularx}
\end{table}

\begin{figure}[htbp]
\centering
\begin{tikzpicture}
\begin{axis}[name=left,width=0.49\textwidth,height=6.0cm,xmode=log,log basis x=2,xtick={2,4,8,16,32,64},xticklabels={2,4,8,16,32,64},
  xlabel={width $H$},ylabel={entropy $H(Q_A)$ (nats)},ymin=2.2,ymax=7.6,legend pos=north west,legend cell align=left]
\addplot[nnblue,thick,mark=*,error bars/.cd,y dir=both,y explicit] coordinates {
  (2,3.98) +- (0,0.38) (4,3.91) +- (0,0.30) (8,3.71) +- (0,0.29) (16,3.66) +- (0,0.24) (32,3.38) +- (0,0.60) (64,3.18) +- (0,0.65)};
\addlegendentry{standard}
\addplot[nnorange,thick,dashed,mark=square*,mark options={solid},error bars/.cd,y dir=both,y explicit] coordinates {
  (2,5.06) +- (0,0.39) (4,5.86) +- (0,0.32) (8,6.01) +- (0,0.50) (16,6.43) +- (0,0.37) (32,6.65) +- (0,0.56) (64,6.49) +- (0,0.52)};
\addlegendentry{NTK}
\end{axis}
\begin{axis}[at={(left.outer east)},anchor=outer west,xshift=0.2cm,width=0.49\textwidth,height=6.0cm,xmode=log,log basis x=2,
  xtick={2,4,8,16,32,64},xticklabels={2,4,8,16,32,64},xlabel={width $H$},ylabel={seed divergence (nats)},ymin=0,ymax=1.8,legend pos=north east,legend cell align=left]
\addplot[nnblue,thick,mark=*] coordinates {(2,1.61) (4,1.02) (8,0.68) (16,0.68) (32,0.63) (64,0.69)};
\addlegendentry{standard}
\addplot[nnorange,thick,dashed,mark=square*,mark options={solid}] coordinates {(2,1.31) (4,0.66) (8,0.47) (16,0.34) (32,0.39) (64,0.37)};
\addlegendentry{NTK}
\end{axis}
\end{tikzpicture}
\caption{Exact results at $n=16$, drawn from the numbers of Table~\ref{tab:n16}. \textbf{Left}: entropy of the implicit prior against width (mean $\pm$ s.d.\ over six runs). It decreases in the standard parametrization and increases in the NTK parametrization. \textbf{Right}: divergence between the priors obtained from two initialization seeds.\label{fig:entropy}}
\end{figure}

Conjecture~\ref{conj:scaling} as stated, with ``all else fixed'', is therefore \emph{refuted at this scale} in the NTK parametrization, and supported on average in the standard one. The decrease reported in Section~\ref{sec:exp} cannot be attributed to width alone, because the same widths give the opposite trend once the step size in function space is held constant. A formulation that is compatible with both columns of Table~\ref{tab:n16} is that the prior concentrates with the amount of movement in function space during training, and that width matters only through it. We state this as a revised conjecture; these data suggest it and do not establish it. The caveats are those of the protocol: synthetic inputs in three dimensions, $60$ gradient steps, six runs per cell.

\paragraph{Seed dependence.} The divergence between the priors of two initializations decreases with width in both parametrizations, from $1.61$ to $0.69$ nats (standard) and from $1.31$ to $0.37$ nats (NTK), and it stops decreasing beyond width $8$--$16$. Wider networks have a prior that depends less on the seed, but at width $64$ the seed still moves about half a nat.

\subsection{The simplicity envelope with a geometry-aware code}
Section~\ref{sec:exp} asked for a compressor that knows the geometry of the inputs. We use the following one. Let $T$ be the Euclidean minimum spanning tree of $x^n$. A labeling is determined by the label of the root and by the set of edges of $T$ whose endpoints have different labels. The \emph{MST-cut code} sends the root label ($\ln2$ nats), the number $c$ of cut edges ($\ln n$ nats) and their identity ($\ln\binom{n-1}{c}$ nats). It is a prefix code that satisfies Kraft's equality exactly, so it is itself an implicit prior $Q_{\mathrm{MST}}$, and $\KLd{\QA}{Q_{\mathrm{MST}}}$ is the price of coding the labelings typical for $A$ with it. Its maximal length at $n=16$ is $12.2$ nats, so an envelope holds trivially at fixed $n$; the informative quantities are those of Table~\ref{tab:env}.

\begin{table}[htbp]
  \centering
  \caption{Simplicity envelope at $n=16$ (means over three input sets). $\rho_{\mathrm{MST}}$, $\rho_{\mathrm{LZ}}$: Spearman correlation of $C_A$ with the MST-cut and LZ78 code lengths over all $65{,}536$ labelings; KL: $\KLd{Q_A}{Q_{\mathrm{MST}}}$ in nats; share: $1-\KLd{Q_A}{Q_{\mathrm{MST}}}/\KLd{Q_A}{\mathrm{uniform}}$; last column: mean MST-cut length of the $1\%$ cheapest labelings of $A$ (the mean over all labelings is $11.78$).\label{tab:env}}
  \begin{tabularx}{\textwidth}{lZZZZZZ}
    \toprule
    Pipeline & $H(Q_A)$ & $\rho_{\mathrm{MST}}$ & $\rho_{\mathrm{LZ}}$ & KL & share & cheapest $1\%$\\
    \midrule
    Laplace & 9.05 & 0.08 & 0.22 & 0.97 & 52\% & 10.43\\
    1-NN & 8.20 & 0.05 & 0.13 & 1.82 & 37\% & 10.10\\
    LogReg & 6.03 & 0.06 & 0.09 & 2.56 & 49\% & 10.17\\
    MLP-2 (std) & 4.26 & 0.09 & 0.08 & 3.52 & 48\% & 10.17\\
    MLP-8 (std) & 3.80 & 0.08 & 0.09 & 3.86 & 47\% & 10.12\\
    MLP-64 (std) & 3.34 & 0.07 & 0.07 & 3.90 & 50\% & 10.13\\
    MLP-2 (NTK) & 5.22 & 0.06 & 0.04 & 2.86 & 51\% & 10.12\\
    MLP-8 (NTK) & 5.97 & 0.08 & 0.13 & 2.73 & 46\% & 10.09\\
    MLP-64 (NTK) & 6.65 & 0.07 & 0.10 & 2.44 & 45\% & 10.09\\
    \bottomrule
  \end{tabularx}
\end{table}

The rank correlations stay negligible at $n=16$ (at most $0.10$ for the MST-cut code and $0.17$ for LZ78 over the networks). In cross-entropy the picture is different: coding the labelings typical for a network with the MST-cut code costs $2.4$--$4.2$ nats above the entropy, so that this one-line code recovers $42$--$51\%$ of the distance between the network's prior and the uniform one, and the $1\%$ cheapest labelings of every network are shorter than average under it ($10.0$--$10.2$ against $11.78$ nats). But the Laplace learner, which never looks at the inputs, obtains the same share ($52\%$). What the code captures is therefore mostly label imbalance, since near-constant labelings have few cut edges, and not geometry (Table~\ref{tab:env}, Figure~\ref{fig:envelope}). Conjecture~\ref{conj:envelope} is neither refuted nor meaningfully supported at $n=16$: a simple code explains about half of the bias of every pipeline and the other half is not accounted for.

\begin{figure}[htbp]
\centering
\begin{tikzpicture}
\begin{axis}[width=0.92\textwidth,height=5.6cm,ybar,bar width=7pt,ymin=0,ymax=11,
  symbolic x coords={Laplace,1-NN,LogReg,MLP-2 std,MLP-8 std,MLP-64 std,MLP-2 NTK,MLP-8 NTK,MLP-64 NTK},xtick=data,
  x tick label style={rotate=30,anchor=east,font=\scriptsize},ylabel={nats},legend pos=north east,legend columns=2,legend cell align=left,enlarge x limits=0.07]
\addplot[fill=nnblue,draw=nnblue!70!black] coordinates {(Laplace,9.05) (1-NN,8.20) (LogReg,6.03) (MLP-2 std,4.26) (MLP-8 std,3.80) (MLP-64 std,3.34) (MLP-2 NTK,5.22) (MLP-8 NTK,5.97) (MLP-64 NTK,6.65)};
\addlegendentry{entropy $H(Q_A)$}
\addplot[fill=nnorange,draw=nnorange!70!black,postaction={pattern=north east lines,pattern color=white}] coordinates {(Laplace,0.97) (1-NN,1.82) (LogReg,2.56) (MLP-2 std,3.52) (MLP-8 std,3.86) (MLP-64 std,3.90) (MLP-2 NTK,2.86) (MLP-8 NTK,2.73) (MLP-64 NTK,2.44)};
\addlegendentry{$\KLd{Q_A}{Q_{\mathrm{MST}}}$}
\end{axis}
\end{tikzpicture}
\caption{The simplicity envelope at $n=16$, drawn from the numbers of Table~\ref{tab:env}: entropy of the implicit prior of each pipeline and the price, in nats, of coding its typical labelings with the MST-cut code. The two bars add up to the cross-entropy of the MST-cut code under $Q_A$, which lies between $9.1$ and $10.0$ nats for all nine pipelines, against $16\ln2=11.09$ for the uniform code.\label{fig:envelope}}
\end{figure}

\subsection{Exchange rates at $n=16$}
Table~\ref{tab:kl16} is the $n=16$ version of Table~\ref{tab:kl}. The cluster of gradient-trained pipelines persists: the four networks are within $0.22$--$0.80$ nats of each other, logistic regression is $0.64$--$2.42$ nats away from them, and the exchangeable learner is far, with a strong asymmetry: labelings typical for the Laplace learner cost MLP-64 $14.28$ extra nats, and labelings typical for MLP-64 cost the Laplace learner $8.15$.

\begin{table}[htbp]
  \centering
  \caption{Exact exchange rates $\KLd{Q_B}{Q_A}$ in nats at $n=16$ (row $A$, column $B$; input set $0$, standard parametrization).\label{tab:kl16}}
  \begin{tabularx}{\textwidth}{lZZZZZZZ}
    \toprule
    $A\ \backslash\ B$ & Laplace & 1-NN & LogReg & MLP-2 & MLP-8 & MLP-32 & MLP-64\\
    \midrule
    Laplace & 0.00 & 1.78 & 4.55 & 6.23 & 7.12 & 8.17 & 8.15\\
    1-NN & 1.92 & 0.00 & 2.71 & 3.55 & 3.91 & 4.69 & 4.66\\
    LogReg & 3.67 & 3.81 & 0.00 & 0.64 & 0.76 & 0.92 & 1.02\\
    MLP-2 & 5.10 & 4.91 & 0.84 & 0.00 & 0.27 & 0.53 & 0.31\\
    MLP-8 & 8.34 & 6.98 & 1.26 & 0.33 & 0.00 & 0.54 & 0.22\\
    MLP-32 & 12.42 & 10.53 & 1.98 & 0.80 & 0.55 & 0.00 & 0.34\\
    MLP-64 & 14.28 & 11.83 & 2.42 & 0.66 & 0.34 & 0.30 & 0.00\\
    \bottomrule
  \end{tabularx}
\end{table}

\subsection{The loss curve is the code: MNIST}
We ran the single-pass learner of Proposition~\ref{prop:sgd} on the $60{,}000$ MNIST training images in a random order. Each block of $10$ examples is predicted before the network takes one SGD step on it, and the log losses are summed; this is a valid learner in the sense of Definition~\ref{def:learner}, and the sum is its code length. The pipelines are softmax regression and one-hidden-layer ReLU networks of width $32$, $128$ and $512$. The output layer starts at zero, which makes every pipeline exactly equivariant under permutations of the ten class names. The step size was chosen in $\{0.003,0.01,0.03,0.1\}$ by the code length on the first $20{,}000$ examples of an independent order and then frozen; for the networks the selected value is the largest of the grid, so they may be under-tuned. Each pipeline was run on three orders. The whole study took $119$\,s on one core.

\begin{table}[htbp]
  \centering
  \caption{Prequential code lengths on MNIST ($n=60{,}000$, ten classes; the uniform code costs $n\ln10=138{,}155$ nats). $C_A$: mean $\pm$ s.d.\ over three orders; mistakes and the bound $C_A/\ln2$ of Corollary~\ref{cor:mistakes}: means over orders; random labels: excess of the code length over the uniform code when the labels are shuffled; names: smallest loss paid, over the three orders, on the first occurrences of the ten classes (bound: $\ln10!=15.10$).\label{tab:mnist}}
  \footnotesize
  \setlength{\tabcolsep}{3pt}
  \begin{tabular}{lcccccccc}
    \toprule
    Pipeline & step & $C_A$ (nats) & nats/ex. & of uniform & mistakes & $C_A/\ln2$ & random labels & names\\
    \midrule
    Softmax & 0.01 & $21{,}178\pm9$ & 0.353 & 15.3\% & 6{,}045 & 30{,}553 & $+11{,}496$ & 23.6\\
    MLP-32 & 0.1 & $18{,}354\pm256$ & 0.306 & 13.3\% & 5{,}308 & 26{,}479 & $+88$ & 23.2\\
    MLP-128 & 0.1 & $14{,}027\pm24$ & 0.234 & 10.2\% & 4{,}148 & 20{,}237 & $+207$ & 24.3\\
    MLP-512 & 0.1 & $12{,}558\pm105$ & 0.209 & 9.1\% & 3{,}705 & 18{,}118 & $+648$ & 32.9\\
    \bottomrule
  \end{tabular}
\end{table}
Table~\ref{tab:mnist} reads as follows. Every pipeline writes the $60{,}000$ labels in $9$--$15\%$ of the uniform code, and the order of presentation changes the total by less than $3\%$. On shuffled labels no pipeline compresses: the excess over the uniform code is positive in all four cases, as item~4 of Theorem~\ref{thm:conservation} requires up to a few nats, and it measures how overconfident the pipeline is. The mistake bound of Corollary~\ref{cor:mistakes} holds with a slack of about five. The loss paid on the first occurrences of the ten classes is between $23.2$ and $68.1$ nats, above the $\ln 10!=15.10$ nats of Corollary~\ref{cor:names}: on MNIST the names of the classes cost at least fifteen nats, whatever the network.

\begin{table}[htbp]
  \centering
  \caption{Theorem~\ref{thm:identity} on MNIST (means over three orders). Online loss: mean log loss on examples $50{,}001$--$60{,}000$ of the stream, each predicted before it is trained on. Test loss: mean log loss on the $10{,}000$ test images of the networks reached after $50{,}000$, $55{,}000$ and $60{,}000$ examples. $\alpha$: exponent of $e_t\propto t^{-\alpha}$ fitted on the online loss, and exponent obtained from $\Gamma_n\propto n^{1-\alpha}$, for $n\ge1000$ and taking $H^\ast=0$.\label{tab:identity}}
  \begin{tabularx}{\textwidth}{lZZZZ}
    \toprule
    Pipeline & online loss & test loss & $\alpha$ (curve) & $\alpha$ (code)\\
    \midrule
    Softmax & 0.307 & 0.299 & 0.16 & 0.25\\
    MLP-32 & 0.232 & 0.219 & 0.25 & 0.32\\
    MLP-128 & 0.167 & 0.167 & 0.31 & 0.35\\
    MLP-512 & 0.144 & 0.135 & 0.33 & 0.37\\
    \bottomrule
  \end{tabularx}
\end{table}

Table~\ref{tab:identity} is the compression identity read on real data: the slope of the code at the end of the stream and the loss on images never seen agree within $0.013$ nats per example for all four pipelines. The two estimates of the scaling exponent differ, as Proposition~\ref{prop:curves} allows for a curve that is not an exact power law, and both increase with width. Figure~\ref{fig:mnist} (left) compares the rate at which the four codes are written over the whole stream and at its end.

\begin{figure}[htbp]
\centering
\begin{tikzpicture}
\begin{axis}[name=left,width=0.49\textwidth,height=5.8cm,ybar,bar width=14pt,ymin=0,ymax=0.45,
  symbolic x coords={Softmax,MLP-32,MLP-128,MLP-512},xtick=data,ylabel={code rate (nats per example)},
  nodes near coords,nodes near coords style={font=\scriptsize},enlarge x limits=0.2,legend pos=north east,legend cell align=left]
\addplot[fill=nnblue,draw=nnblue!70!black] coordinates {(Softmax,0.353) (MLP-32,0.306) (MLP-128,0.234) (MLP-512,0.209)};
\addlegendentry{whole stream}
\addplot[fill=nnaqua,draw=nnaqua!70!black,postaction={pattern=north east lines,pattern color=white}] coordinates {(Softmax,0.307) (MLP-32,0.232) (MLP-128,0.167) (MLP-512,0.144)};
\addlegendentry{last $10{,}000$}
\end{axis}
\begin{axis}[at={(left.outer east)},anchor=outer west,xshift=0.2cm,width=0.49\textwidth,height=5.8cm,
  xlabel={ratio $C_A/C_B$ over $30$ tasks},ytick=\empty,ymin=0.4,ymax=3.8,xmin=0.25,xmax=1.05]
\addplot[nnblue,line width=3pt] coordinates {(0.864,1) (0.956,1)};
\addplot[nnorange,line width=3pt] coordinates {(0.372,2) (0.606,2)};
\addplot[nnaqua,line width=3pt] coordinates {(0.327,3) (0.565,3)};
\addplot[black!60,dotted,thick] coordinates {(1,0.4) (1,3.8)};
\node[font=\scriptsize,anchor=south east] at (axis cs:0.956,1.08) {MLP-512 / MLP-32};
\node[font=\scriptsize,anchor=south west] at (axis cs:0.372,2.08) {MLP-32 / Softmax};
\node[font=\scriptsize,anchor=south west] at (axis cs:0.327,3.08) {MLP-512 / Softmax};
\end{axis}
\end{tikzpicture}
\caption{Code lengths on MNIST, drawn from the numbers of Tables~\ref{tab:mnist}, \ref{tab:identity} and~\ref{tab:inv}. \textbf{Left}: code rate of each pipeline over the whole stream of $60{,}000$ examples and over its last $10{,}000$ examples (the uniform code costs $\ln10=2.303$ nats per example). \textbf{Right}: range of the ratio of the code lengths of two pipelines over $30$ binary tasks; the dotted line marks equal code lengths.\label{fig:mnist}}
\end{figure}

\subsection{A first test of Conjecture~\ref{conj:invariance}}
We built $30$ binary tasks on MNIST by splitting the ten digits into two groups of five (drawn at random among the $126$ balanced splits), and measured the single-pass code length of three pipelines on the first $20{,}000$ examples of one order, with the step sizes of Table~\ref{tab:mnist}. The uniform code costs $13{,}863$ nats and the measured code lengths range from $2{,}729$ to $9{,}178$ nats. Table~\ref{tab:inv} gives, for each pair of pipelines, the correlation of the code lengths across tasks and the range of their ratio.

\begin{table}[htbp]
  \centering
  \caption{Code lengths of $30$ binary MNIST tasks: pipeline $A$ against pipeline $B$. $r$: Pearson correlation across tasks; ratio: $C_A/C_B$; spread: largest ratio divided by smallest; slope: least-squares slope of $C_A$ on $C_B$.\label{tab:inv}}
  \begin{tabularx}{\textwidth}{llZZZZZ}
    \toprule
    $A$ & $B$ & $r$ & min ratio & max ratio & spread & slope\\
    \midrule
    MLP-512 & MLP-32 & 0.977 & 0.864 & 0.956 & 1.107 & 0.863\\
    MLP-32 & Softmax & 0.659 & 0.372 & 0.606 & 1.630 & 0.239\\
    MLP-512 & Softmax & 0.641 & 0.327 & 0.565 & 1.725 & 0.205\\
    \bottomrule
  \end{tabularx}
\end{table}

The two networks agree closely on which tasks are hard: $r=0.977$, and the ratio of their code lengths stays between $0.86$ and $0.96$ over the $30$ tasks. Softmax regression and the networks agree less ($r\approx0.65$), and their ratio varies by a factor of about $1.7$. In both cases the ratio is bounded on this family, which is what Conjecture~\ref{conj:invariance} requires, and the constant is closer to one for pipelines of the same family. This is a weak test: the tasks share their inputs, they come from a single dataset, and $H^\ast$ is taken to be zero. It does not refute the conjecture, and it shows how a refutation would look: a task whose ratio falls far outside the ranges of Figure~\ref{fig:mnist} (right).

\subsection{What the experiments decide}
The theorems are verified with real numbers: Kraft's equality to $4.4\times10^{-16}$ on $4.7$ million training runs, no compression of shuffled labels, the mistake bound, the price of class names, and the compression identity on MNIST. Of the three conjectures, Conjecture~\ref{conj:invariance} survives a first small test, Conjecture~\ref{conj:envelope} remains undecided, and Conjecture~\ref{conj:scaling} is refuted in the form in which we stated it: whether width concentrates the prior depends on the parametrization.



\section{Four further experiments: protocol and validation}\label{sec:protocol2}

The experiments of Sections~\ref{sec:exp} and~\ref{sec:exp2} verified the theorems and gave a first reading of the conjectures on two exact enumerations and on MNIST. The rest of the paper reports four further experiments. Each is attached to one statement of the theory and to a hypothesis that was written down before the experiment was run. The hypothesis is stated at the beginning of each section and the verdict at its end, with the same weight whether it supports the hypothesis or not. Table~\ref{tab:overview} lists the four experiments; Section~\ref{sec:verdicts} collects the verdicts and reports the six further experiments of the programme, which had been planned and were not reported in the previous version.

\begin{table}[htbp]
  \centering
  \caption{The four experiments of Sections~\ref{sec:mup}--\ref{sec:grok}. ``Exact'': the implicit prior is computed on all labelings by one training run from scratch at every node of the prefix tree. ``Streams'': averages over independent random streams, reported with their standard errors.\label{tab:overview}}
  \small
  \begin{tabularx}{\textwidth}{@{}r l X l@{}}
    \toprule
    & Section & Statement of the theory that is tested & Method\\
    \midrule
    1 & \ref{sec:mup} & Conjecture~\ref{conj:scaling} and its revision of Section~\ref{sec:exp2}: width, parametrization and the entropy of the prior & exact, $n=12$\\
    2 & \ref{sec:gp} & Section~\ref{sec:neural}, infinite width: distance of a finite network from its kernel and Bayesian limits & exact, $n=10$, $12$\\
    3 & \ref{sec:dd} & Proposition~\ref{prop:curves}, item 2: a double-descent bump is paid for in nats & streams\\
    4 & \ref{sec:grok} & Proposition~\ref{prop:curves}, item 1, and Proposition~\ref{prop:sgd}: the price of a plateau in single-pass training & streams\\
    \bottomrule
  \end{tabularx}
\end{table}

\subsection{The learners}
Unless stated otherwise, the networks have one hidden layer,
\begin{equation}\label{eq:net}
  f(x)=\alpha\sum_{j=1}^{H}v_j\,\varphi\bigl(w_j\cdot(x,1)\bigr),\qquad w_j\sim\mathcal N(0,I/d),
\end{equation}
with $\varphi=\tanh$, a first layer with bias and no output bias, and they are trained from scratch on each prefix by $60$ full-batch gradient steps on the mean logistic loss, as in Section~\ref{sec:exp}. A \emph{parametrization} is a choice of the output multiplier $\alpha$, of the scale of $v_j$ at initialization and of the step size (Table~\ref{tab:params}). The first two rows are the parametrizations of Section~\ref{sec:exp2}. The third is the mean-field or maximal-update scaling \citep{MeiMontanariNguyen2018,YangHu2021}: the function at initialization vanishes as $H\to\infty$ while the hidden units move by an amount of order one. The fourth is the standard initialization with the step divided by the width, which keeps the movement in function space bounded as $H$ grows; in the limit it trains the read-out layer only. In the first row the step is fixed, as in Sections~\ref{sec:exp} and~\ref{sec:exp2}, so the movement in function space per step grows with $H$: at large width this is a large-step regime, not a model of well-tuned training. At a given seed all four parametrizations use the same Gaussian draws, so they differ only in the three scalings of the table. A network is \emph{centred} when the function at initialization is subtracted from its output, so that the trained function starts at zero \citep{Chizat2019}.

\begin{table}[htbp]
  \centering
  \caption{The four parametrizations of the network~\eqref{eq:net}; $\eta=0.5$ throughout.\label{tab:params}}
  \begin{tabular}{llll}
    \toprule
    Name & output multiplier $\alpha$ & s.d.\ of $v_j$ at initialization & step size\\
    \midrule
    standard (std) & $1$ & $H^{-1/2}$ & $\eta$\\
    NTK & $H^{-1/2}$ & $1$ & $\eta$\\
    maximal update ($\mu$P) & $H^{-1}$ & $1$ & $\eta H$\\
    standard, step $\eta/H$ & $1$ & $H^{-1/2}$ & $\eta/H$\\
    \bottomrule
  \end{tabular}
\end{table}

The inputs of the exact experiments are drawn from $\mathcal N(0,I_3)$ with NumPy's generator. They are not the input sets of Sections~\ref{sec:exp} and~\ref{sec:exp2}, so the numbers below are not expected to coincide with the earlier tables; where the same quantity is measured again, the two are compared explicitly.

\subsection{Validation}
All exact experiments use one library (Appendix~\ref{app:lib}), which trains the $|\cY|^{t}$ prefixes of equal depth $t$ as one batch. Four checks were made before any result was read.

\emph{Conservation.} Kraft's equality~\eqref{eq:kraft} is checked for every exact code. Over the \valNCodes{} exact codes computed in Sections~\ref{sec:mup} and~\ref{sec:gp}, the largest deviation is $\valKraftMax$.

\emph{Gradient steps.} Kraft's equality holds for any update rule, so it does not show that an update is a gradient step. One update of every network of the library was therefore compared with the update obtained from central finite differences of the loss. The resulting logits agree to $\valFDmlp$ over the $24$ combinations of parametrization, activation ($\tanh$, erf, ReLU) and centring, and to $\valFDsoft$ for the softmax network.

\emph{An independent implementation.} With the inputs and the initializations of the pure-Python script of Appendix~\ref{app:code}, the library reproduces the entropy and the smallest and largest code length of MLP-2, MLP-8, MLP-32 and logistic regression to $\valCross$ nats.

\emph{Reproduction of Section~\ref{sec:exp}.} The script of Appendix~\ref{app:code} was run again for this version. All entries of Tables~\ref{tab:spectrum}--\ref{tab:sym} are reproduced to the printed digits: the six rows of the bias spectrum, the $36$ exchange rates, the $24$ order statistics and the four rows of the symmetry tax. The results of Section~\ref{sec:exp2} ($n=16$ and MNIST) were not recomputed for this version.

\subsection{Cost}
The four experiments used \valCPU{} minutes of CPU time in total on two cores, without accelerators. Their scale is that of the protocol of Section~\ref{sec:conj}: small input sets, one-hidden-layer networks, short training. What they give in exchange is exactness: every code length in the two exact experiments is a number with no estimation error, and the sums over labelings are complete.


% ==========================================================================================
% Experiment "mup"
% ==========================================================================================
\section{Parametrisation and width: exact implicit priors in the standard, NTK and maximal-update scalings}\label{sec:mup}

Section~\ref{sec:exp2} found that the entropy of the exact implicit prior falls with width in the standard parametrisation and rises in the NTK one, and it replaced Conjecture~\ref{conj:scaling} by the statement that the prior concentrates with the amount of movement in function space during training, width mattering only through it. That statement rested on two parametrisations and six widths, and the movement was not measured. This section measures it. It adds the maximal-update (mean-field) scaling \citep{MeiMontanariNguyen2018,YangHu2021}, in which every hidden unit moves by an amount that does not depend on the width, to the lazy scalings \citep{Jacot2018,Chizat2019}, it goes to width $256$, and it tests three hypotheses on the object that Theorem~\ref{thm:bayes} makes available without sampling: the prior $\QA(\cdot\mid x^n)$ on every labeling.

\subsection{Design}
All learners are the one-hidden-layer network of Section~\ref{sec:exp} with a width-dependent output multiplier $\alpha_H$, readout scale $\sigma_H$ and step $\eta_H$,
\begin{equation}\label{eq:mup-scalings}
	f(x)=\alpha_H\sum_{j=1}^{H}v_j\tanh\bigl(w_j\cdot[x,1]\bigr),\qquad v_j\sim\mathcal N(0,\sigma_H^2),\quad w_j\sim\mathcal N(0,I_4/3),
\end{equation}
trained from scratch on each prefix by $60$ full-batch gradient steps of size $\eta_H$ on the mean logistic loss, both layers, with $\eta=0.5$. Five learners are compared:
\begin{itemize}[nosep,leftmargin=1.4em]
	\item \emph{std, step $\eta$}: $(\alpha_H,\sigma_H,\eta_H)=(1,H^{-1/2},\eta)$, the protocol of Sections~\ref{sec:exp} and~\ref{sec:exp2};
	\item \emph{NTK}: $(H^{-1/2},1,\eta)$;
	\item \emph{$\mu$P}: $(H^{-1},1,\eta H)$;
	\item \emph{std, step $\eta/H$}: $(1,H^{-1/2},\eta/H)$;
	\item \emph{NTK centred}: the NTK learner predicting with $f-f_0$, where $f_0$ is its function at initialisation.
\end{itemize}
In the variables $u_j=v_j/\sigma_H\sim\mathcal N(0,1)$ these are one family, and a line of algebra gives two exact identities: std with step $\eta$ is the NTK network with the step of the readout multiplied by $H$, and std with step $\eta/H$ is the NTK network with the step of the first layer divided by $H$, a random-features learner in the limit. The original protocol is therefore not a width-independent procedure: its step in function space grows linearly with $H$, and at large width it is a large-step regime; std with step $\eta/H$ is its stable version. The same standard normal draws are used for the five learners at a given seed and width, so that they differ only by $(\alpha_H,\sigma_H,\eta_H)$ and by the centring.

We drew $n=12$ inputs from $\mathcal N(0,I_3)$, two input sets and two initialisation seeds, and used the widths $H=2,4,\dots,256$: $5\times2\times2\times8=160$ configurations. For each one the code $\CA$ was computed exactly on all $2^{12}=4096$ labelings from the $4095$ nodes of the prefix tree. An extension to $H=512$ ($\mu$P and NTK, first input set, both seeds) was subject to a limit on CPU time written in the script before the run; the limit admitted one of the four configurations ($\mu$P, first seed), which is reported and marked, and the other three were not run. In total: 161 configurations, 659{,}295 training runs, 371 CPU-seconds.

For each configuration we record Kraft's sum, the entropy $H(\QA)$, the root mean square of $f_0$ over the twelve inputs and, averaged over the $2048$ prefixes of length $11$ (the last level of the tree), the \emph{movement in function space}
\(\Delta f=\bigl(\tfrac1{11}\sum_{i\le11}(f_T(x_i)-f_0(x_i))^2\bigr)^{1/2}\) in logit units, the relative movement of the first layer $\lVert W_T-W_0\rVert/\lVert W_0\rVert$ and the final training loss. Derived quantities: (i) the \emph{seed divergence} $\tfrac12[\KLd{Q_s}{Q_{s'}}+\KLd{Q_{s'}}{Q_s}]$ between the priors of the two seeds on the same inputs, averaged over the input sets; (ii) the \emph{width-to-width divergence} $\KLd{Q_{2H}}{Q_H}$ at fixed seed and inputs, averaged over the four runs; (iii) the log--log slopes of (i) and (ii) against $H$ for $H\ge16$, by least squares with one intercept per input set (per run for (ii)), with the standard error of the slope.

The hypotheses, with the criteria fixed together with the design, are the following. \textbf{H1}: the entropy depends systematically on the parametrisation (same order of the learners in every run), and in $\mu$P the prior is stable as the width grows (no trend of the entropy, decreasing width-to-width divergence). \textbf{H2}: the residual seed dependence found in Section~\ref{sec:exp2} is due to $f_0$, which is $O(1)$ at every width in the std and NTK scalings and $O(H^{-1/2})$ in $\mu$P; the slope of the seed divergence should then be $0$ in std and NTK and $-1$ in $\mu$P, and centring the NTK network should remove the plateau. \textbf{H3}, the revised conjecture of Section~\ref{sec:exp2}: $H(\QA)$ is a function of $\Delta f$ alone, so that one line $H(\QA)=a+b\ln\Delta f$ fits the configurations of all learners as well as one line per learner does.

\subsection{Conservation}
Over the 161 codes the largest deviation from Kraft's equality~\eqref{eq:kraft} is $2.2\times10^{-16}$. The value of the entropy for a learner that does not learn is $12\ln2=8.32$ nats.

\subsection{Entropy against width: H1 and Conjecture~\ref{conj:scaling}}

\begin{figure}[htbp]\centering
\begin{tikzpicture}
\begin{axis}[name=left, width=0.5\textwidth, height=0.4\textwidth, xmode=log, log basis x=2, xtick={2,4,8,16,32,64,128,256,512}, xticklabels={2,4,8,16,32,64,128,256,512}, xmin=1.5, xmax=700, xlabel={width $H$}, ylabel={entropy $H(\QA)$ (nats)}, ymin=0, ymax=9.4,
  legend to name=mupleg, legend columns=5, legend style={/tikz/every even column/.append style={column sep=6pt}}]
\addplot[nnblue, mark=*, mark size=1.6pt, mark options={solid}, solid, line width=0.8pt, error bars/.cd, y dir=both, y explicit, error bar style={line width=0.5pt, solid}] coordinates {(1.84,2.8809) +- (0,0.1834) (3.68,2.3894) +- (0,0.1457) (7.36,2.4986) +- (0,0.2052) (14.72,2.3912) +- (0,0.1389) (29.44,2.3772) +- (0,0.103) (58.88,2.0639) +- (0,0.1114) (117.76,2.0192) +- (0,0.1693) (235.52,1.5073) +- (0,0.2721)};
\addlegendentry{std, step $\eta$}
\addplot[nnorange, mark=square*, mark size=1.6pt, mark options={solid}, dashed, line width=0.8pt, error bars/.cd, y dir=both, y explicit, error bar style={line width=0.5pt, solid}] coordinates {(1.92,3.9086) +- (0,0.1078) (3.84,4.1682) +- (0,0.1203) (7.68,4.5315) +- (0,0.3353) (15.36,4.547) +- (0,0.3032) (30.72,4.9204) +- (0,0.08847) (61.44,4.6802) +- (0,0.0921) (122.88,4.4352) +- (0,0.1405) (245.76,4.7701) +- (0,0.03274)};
\addlegendentry{NTK}
\addplot[nnaqua, mark=triangle*, mark size=1.6pt, mark options={solid}, densely dashed, line width=0.8pt, error bars/.cd, y dir=both, y explicit, error bar style={line width=0.5pt, solid}] coordinates {(2,3.5602) +- (0,0.1557) (4,3.472) +- (0,0.1514) (8,3.6006) +- (0,0.1871) (16,3.597) +- (0,0.1254) (32,3.6268) +- (0,0.07812) (64,3.5533) +- (0,0.01847) (128,3.5859) +- (0,0.1061) (256,3.6437) +- (0,0.07479) (512,3.6225) +- (0,0)};
\addlegendentry{$\mu$P}
\addplot[nnyellow, mark=diamond*, mark size=1.6pt, mark options={solid}, dashdotted, line width=0.8pt, error bars/.cd, y dir=both, y explicit, error bar style={line width=0.5pt, solid}] coordinates {(2.08,4.3487) +- (0,0.1316) (4.16,5.3724) +- (0,0.1072) (8.32,6.2754) +- (0,0.2385) (16.64,6.5182) +- (0,0.1707) (33.28,6.807) +- (0,0.2139) (66.56,6.8729) +- (0,0.1652) (133.12,6.4278) +- (0,0.1606) (266.24,6.867) +- (0,0.1141)};
\addlegendentry{std, step $\eta/H$}
\addplot[nnviolet, mark=o, mark size=1.6pt, mark options={solid}, densely dotted, line width=0.8pt, error bars/.cd, y dir=both, y explicit, error bar style={line width=0.5pt, solid}] coordinates {(2.16,3.9466) +- (0,0.1506) (4.32,4.2255) +- (0,0.1187) (8.64,4.5692) +- (0,0.3697) (17.28,4.6384) +- (0,0.2984) (34.56,5.0333) +- (0,0.08185) (69.12,4.6865) +- (0,0.1017) (138.24,4.6309) +- (0,0.2443) (276.48,4.8373) +- (0,0.0949)};
\addlegendentry{NTK centred}
\addplot[nngray, densely dotted, line width=0.7pt, forget plot] coordinates {(1.5,8.3178) (700,8.3178)};
\node[font=\scriptsize, text=nngray, anchor=south east, inner sep=1.5pt] at (axis cs:700,8.318) {no learning, $12\ln2$};
\end{axis}
\begin{axis}[at={(left.outer north east)}, anchor=outer north west, xshift=4pt, width=0.5\textwidth, height=0.4\textwidth, xmode=log, log basis x=2, xtick={2,4,8,16,32,64,128,256,512}, xticklabels={2,4,8,16,32,64,128,256,512}, xmin=1.5, xmax=700, ymode=log, xlabel={width $H$}, ylabel={seed divergence (nats)}, ymin=0.001, ymax=10]
\addplot[nnblue, mark=*, mark size=1.6pt, mark options={solid}, solid, line width=0.8pt] coordinates {(2,0.45737) (4,0.1085) (8,0.14558) (16,0.29509) (32,0.41106) (64,0.22475) (128,0.52594) (256,0.33468)};
\addplot[nnorange, mark=square*, mark size=1.6pt, mark options={solid}, dashed, line width=0.8pt] coordinates {(2,0.59083) (4,0.074058) (8,0.2221) (16,0.36944) (32,0.23872) (64,0.064863) (128,0.44093) (256,0.13256)};
\addplot[nnaqua, mark=triangle*, mark size=1.6pt, mark options={solid}, densely dashed, line width=0.8pt] coordinates {(2,0.45937) (4,0.042391) (8,0.11448) (16,0.048668) (32,0.01865) (64,0.0068373) (128,0.0087554) (256,0.002518)};
\addplot[nnyellow, mark=diamond*, mark size=1.6pt, mark options={solid}, dashdotted, line width=0.8pt] coordinates {(2,0.47893) (4,0.168) (8,0.17948) (16,0.62241) (32,0.29761) (64,0.091428) (128,0.95589) (256,0.232)};
\addplot[nnviolet, mark=o, mark size=1.6pt, mark options={solid}, densely dotted, line width=0.8pt] coordinates {(2,0.41847) (4,0.067872) (8,0.16203) (16,0.078079) (32,0.026114) (64,0.019283) (128,0.032845) (256,0.012846)};
\addplot[nngray, line width=0.6pt] coordinates {(16,0.0219) (256,0.0013688)};
\node[font=\scriptsize, text=nngray, anchor=north east, inner sep=1.5pt] at (axis cs:64,0.005475) {slope $-1$};
\end{axis}
\node[anchor=north] at ($(current bounding box.south)+(0,-2pt)$) {\pgfplotslegendfromname{mupleg}};
\end{tikzpicture}
\caption{Exact results at $n=12$. \textbf{Left}: entropy of the implicit prior against width, mean over four runs (two input sets $\times$ two initialisation seeds; one run at $H=512$); error bars: $\pm1$ standard deviation over the runs; the points of the five learners are slightly displaced horizontally. \textbf{Right}: seed divergence (symmetrised divergence between the priors of the two seeds, mean over the two input sets), on logarithmic axes; grey line: slope $-1$.\label{fig:mup-entropy}}
\end{figure}

\begin{table}[htbp]\centering
\caption{Exact implicit priors at $n=12$ (nats). $H(\QA)$: mean $\pm$ s.d.\ over four runs; seed div.: seed divergence, mean over two input sets; $\KLd{Q_{2H}}{Q_H}$: mean over four runs; $\Delta f$: movement in function space; rms $f_0$: root mean square of the initial function on the inputs (logit units); loss: mean final training loss on eleven examples. $^{\ast}$One run.\label{tab:mup-summary}}
\small
\begin{tabular}{lrcccccc}
\toprule
Learner & $H$ & $H(\QA)$ & seed div. & $\KLd{Q_{2H}}{Q_H}$ & $\Delta f$ & rms $f_0$ & loss\\
\midrule
std, step $\eta$ & 2 & $2.88\pm0.18$ & 0.457 & 0.200 & 1.29 & 0.279 & 0.477\\
 & 16 & $2.39\pm0.14$ & 0.295 & 0.319 & 2.27 & 0.607 & 0.324\\
 & 128 & $2.02\pm0.17$ & 0.526 & 0.347 & 3.59 & 0.935 & 0.189\\
 & 256 & $1.51\pm0.27$ & 0.335 & -- & 4.90 & 0.513 & 0.193\\
\addlinespace
NTK & 2 & $3.91\pm0.11$ & 0.591 & 0.239 & 0.99 & 0.279 & 0.517\\
 & 16 & $4.55\pm0.30$ & 0.369 & 0.278 & 1.24 & 0.607 & 0.469\\
 & 128 & $4.44\pm0.14$ & 0.441 & 0.210 & 1.49 & 0.935 & 0.451\\
 & 256 & $4.77\pm0.03$ & 0.133 & -- & 1.25 & 0.513 & 0.454\\
\addlinespace
$\mu$P & 2 & $3.56\pm0.16$ & 0.459 & 0.157 & 1.11 & 0.198 & 0.483\\
 & 16 & $3.60\pm0.13$ & 0.049 & 0.031 & 1.32 & 0.152 & 0.405\\
 & 128 & $3.59\pm0.11$ & 0.009 & 0.005 & 1.35 & 0.083 & 0.391\\
 & 256 & $3.64\pm0.07$ & 0.003 & 0.001$^{\ast}$ & 1.33 & 0.032 & 0.393\\
 & 512$^{\ast}$ & $3.62$ & -- & -- & 1.34 & 0.010 & 0.393\\
\addlinespace
std, step $\eta/H$ & 2 & $4.35\pm0.13$ & 0.479 & 0.342 & 0.88 & 0.279 & 0.546\\
 & 16 & $6.52\pm0.17$ & 0.622 & 0.413 & 0.76 & 0.607 & 0.567\\
 & 128 & $6.43\pm0.16$ & 0.956 & 0.467 & 0.80 & 0.935 & 0.591\\
 & 256 & $6.87\pm0.11$ & 0.232 & -- & 0.63 & 0.513 & 0.580\\
\addlinespace
NTK centred & 2 & $3.95\pm0.15$ & 0.418 & 0.173 & 0.98 & 0 & 0.510\\
 & 16 & $4.64\pm0.30$ & 0.078 & 0.081 & 1.13 & 0 & 0.465\\
 & 128 & $4.63\pm0.24$ & 0.033 & 0.014 & 1.21 & 0 & 0.448\\
 & 256 & $4.84\pm0.09$ & 0.013 & -- & 1.16 & 0 & 0.453\\
\bottomrule
\end{tabular}
\end{table}

The five learners are ordered in the same way everywhere (Figure~\ref{fig:mup-entropy}, left; Table~\ref{tab:mup-summary}). In all 32 cells (eight widths, four runs) the entropy is lowest for std with step $\eta$, then comes $\mu$P, then the two NTK learners (the centred one below the other in 6 cells), then std with step $\eta/H$. The range of the five means goes from 1.47 nats at $H=2$ to 5.36 nats at $H=256$, against a standard deviation over runs of at most 0.37 nats in any cell.

In $\mu$P the entropy does not depend on the width. Its mean stays between 3.47 and 3.64 nats from $H=2$ to $H=256$ (3.62 nats at $H=512$, one run), and its slope for $H\ge16$ is $+0.005\pm0.009$ nats per doubling. The prior itself converges, not only its entropy: $\KLd{Q_{2H}}{Q_H}$ falls from 0.157 nats at $H=2$ to 0.005 at $H=128$, with a log--log slope of $-1.10\pm0.15$ (Figure~\ref{fig:mup-limits}, left). The centred NTK prior converges as well (slope $-0.93\pm0.20$; 0.014 nats at $H=128$), although its entropy rises from 3.95 to 5.03 nats between widths $2$ and $32$ before it levels off. The three other learners do not converge in this range: at $H=128$ the divergence between consecutive widths is still 0.210 nats (NTK), 0.347 (std, step $\eta$) and 0.467 (std, step $\eta/H$), with slopes $-0.12\pm0.13$, $+0.07\pm0.17$ and $+0.08\pm0.13$.

\begin{figure}[htbp]\centering
\begin{tikzpicture}
\begin{axis}[name=left, width=0.5\textwidth, height=0.4\textwidth, xmode=log, log basis x=2, xtick={2,4,8,16,32,64,128,256,512}, xticklabels={2,4,8,16,32,64,128,256,512}, xmin=1.5, xmax=700, ymode=log, xlabel={width $H$}, ylabel={$\KLd{Q_{2H}}{Q_{H}}$ (nats)}, ymin=0.001, ymax=1,
  legend to name=mupleg2, legend columns=5, legend style={/tikz/every even column/.append style={column sep=6pt}}]
\addplot[nnblue, mark=*, mark size=1.6pt, mark options={solid}, solid, line width=0.8pt] coordinates {(2,0.1998) (4,0.31883) (8,0.25955) (16,0.31906) (32,0.1621) (64,0.23707) (128,0.34667)};
\addlegendentry{std, step $\eta$}
\addplot[nnorange, mark=square*, mark size=1.6pt, mark options={solid}, dashed, line width=0.8pt] coordinates {(2,0.23881) (4,0.39399) (8,0.37372) (16,0.27841) (32,0.17011) (64,0.23639) (128,0.21017)};
\addlegendentry{NTK}
\addplot[nnaqua, mark=triangle*, mark size=1.6pt, mark options={solid}, densely dashed, line width=0.8pt] coordinates {(2,0.157) (4,0.14943) (8,0.090563) (16,0.030545) (32,0.014158) (64,0.0082728) (128,0.0045469) (256,0.00128)};
\addlegendentry{$\mu$P}
\addplot[nnyellow, mark=diamond*, mark size=1.6pt, mark options={solid}, dashdotted, line width=0.8pt] coordinates {(2,0.342) (4,0.47261) (8,0.43372) (16,0.41337) (32,0.25622) (64,0.41491) (128,0.46688)};
\addlegendentry{std, step $\eta/H$}
\addplot[nnviolet, mark=o, mark size=1.6pt, mark options={solid}, densely dotted, line width=0.8pt] coordinates {(2,0.17344) (4,0.19307) (8,0.14273) (16,0.080937) (32,0.029803) (64,0.02187) (128,0.013947)};
\addlegendentry{NTK centred}
\end{axis}
\begin{axis}[at={(left.outer north east)}, anchor=outer north west, xshift=4pt, width=0.5\textwidth, height=0.4\textwidth, xmode=log, log basis x=2, xtick={2,4,8,16,32,64,128,256,512}, xticklabels={2,4,8,16,32,64,128,256,512}, xmin=1.5, xmax=700, ymode=log, xlabel={width $H$}, ylabel={rms of $f_0$ (logit units)}, ymin=0.01, ymax=10]
\addplot[nnblue, mark=*, mark size=1.6pt, mark options={solid}, solid, line width=0.8pt] coordinates {(2,0.27946) (4,0.26552) (8,0.40343) (16,0.6069) (32,0.45513) (64,0.32089) (128,0.93459) (256,0.51301)};
\addplot[nnaqua, mark=triangle*, mark size=1.6pt, mark options={solid}, densely dashed, line width=0.8pt] coordinates {(2,0.19761) (4,0.13276) (8,0.14263) (16,0.15173) (32,0.080456) (64,0.040111) (128,0.082607) (256,0.032063) (512,0.010335)};
\addplot[nngray, line width=0.6pt] coordinates {(16,0.075863) (512,0.013411)};
\node[font=\scriptsize, text=nngray, anchor=north east, inner sep=1.5pt] at (axis cs:64,0.03793) {slope $-\tfrac12$};
\end{axis}
\node[anchor=north] at ($(current bounding box.south)+(0,-2pt)$) {\pgfplotslegendfromname{mupleg2}};
\end{tikzpicture}
\caption{\textbf{Left}: width-to-width divergence $\KLd{Q_{2H}}{Q_H}$ against $H$, same seed and inputs (mean over four runs; one run for the last point of $\mu$P), on logarithmic axes. \textbf{Right}: root mean square of the function at initialisation on the twelve inputs (mean over four runs; one run at $H=512$); the std curve is also that of NTK, of std with step $\eta/H$ and of the function subtracted by the centred learner, which use the same draws; grey line: slope $-\tfrac12$.\label{fig:mup-limits}}
\end{figure}

\begin{table}[htbp]\centering
\caption{Trends per learner. Columns 2--4: log--log slopes against $H$ for $H\ge16$ ($\pm$ standard error) of the seed divergence, of the width-to-width divergence and of the rms of $f_0$ (for the centred learner, of the function that is subtracted). Column 5: slope of $H(\QA)$ in nats per doubling of the width, $H\ge16$. Decr.: doublings of the width that decrease the entropy, out of $28$ (four runs, $H=2,\dots,256$); mon.: runs, out of four, in which no doubling increases it. $\rho_S$: Spearman correlation between $H(\QA)$ and $\Delta f$ inside the learner ($32$ configurations, $33$ for $\mu$P). Offset: intercept minus that of NTK in the fit with a common slope (nats, $\pm$ s.e.).\label{tab:mup-trends}}
\footnotesize\setlength{\tabcolsep}{3.2pt}
\begin{tabular}{lcccccccc}
\toprule
 & \multicolumn{3}{c}{log--log slope against $H$} & nats/doubling & & & & \\
\cmidrule(lr){2-4}\cmidrule(lr){5-5}
Learner & seed div. & $Q_{2H}\,\|\,Q_H$ & rms $f_0$ & $H(\QA)$ & decr. & mon. & $\rho_S$ & offset\\
\midrule
std, step $\eta$ & $+0.04\pm0.20$ & $+0.07\pm0.17$ & $+0.06\pm0.11$ & $-0.213\pm0.033$ & 22/28 & 0/4 & $-0.84$ & $-1.49\pm0.16$\\
NTK & $-0.21\pm0.27$ & $-0.12\pm0.13$ & $+0.06\pm0.11$ & $-0.004\pm0.039$ & 10/28 & 0/4 & $+0.21$ & 0 (ref.)\\
$\mu$P & $-0.97\pm0.13$ & $-1.10\pm0.15$ & $-0.51\pm0.11$ & $+0.005\pm0.009$ & 12/28 & 0/4 & $+0.04$ & $-0.82\pm0.11$\\
std, step $\eta/H$ & $-0.11\pm0.32$ & $+0.08\pm0.13$ & $+0.06\pm0.11$ & $+0.032\pm0.040$ & 5/28 & 0/4 & $-0.85$ & $+1.19\pm0.14$\\
NTK centred & $-0.49\pm0.15$ & $-0.93\pm0.20$ & $+0.06\pm0.11$ & $0.000\pm0.040$ & 8/28 & 0/4 & $+0.12$ & $+0.01\pm0.11$\\
\bottomrule
\end{tabular}
\end{table}

\paragraph{Conjecture~\ref{conj:scaling}.} Table~\ref{tab:mup-trends} counts the doublings. In the original protocol (std, step $\eta$) 22 of the $28$ doublings decrease the entropy, with a slope of $-0.213\pm0.033$ nats per doubling for $H\ge16$, but none of the four runs is monotone. For the four other learners most doublings increase it (decreasing: 10 of $28$ for NTK, 12 for $\mu$P, 8 for NTK centred, 5 for std with step $\eta/H$), no run is monotone, and for $H\ge16$ the slopes are zero within their standard errors ($-0.004\pm0.039$, $+0.005\pm0.009$, $0.000\pm0.040$ and $+0.032\pm0.040$). The rise with width reported at $n=16$ for the NTK scaling is confined here to $H\le32$ (from 3.91 to 4.92 nats). The decrease in the original protocol comes with a growth of the movement (Figure~\ref{fig:mup-movement}, right): $\Delta f$ grows from 1.29 to 4.90 logit units, as $H^{0.27\pm0.02}$ for $H\ge16$, and at $H=256$ the most expensive labeling costs 80 nats on average, 9.7 times the price of not learning (19 nats in $\mu$P). With the same initialisation and the step $\eta/H$ the entropy \emph{rises} from 4.35 to 6.87 nats. In this experiment the concentration with width is therefore a property of a step that grows with the width, not of the width; the same protocol was used in Sections~\ref{sec:exp} and~\ref{sec:exp2}.

A caveat applies to all of this. By the criterion fixed in advance (mean final training loss on the eleven examples below $\ln2/11=0.063$ nats; a prefix below this value has no misclassified example) no configuration interpolates after $60$ steps: the mean final loss lies between 0.19 and 0.59 nats. Every network with $H\ge4$ has more parameters ($5H$) than examples, so the clause ``beyond the interpolation threshold'' of the conjecture is met in the counting sense only, and the learners studied here are early-stopped ones.

\subsection{Seed dependence: H2}
In the three learners that start from a function of order one the seed divergence has no trend for $H\ge16$ (Figure~\ref{fig:mup-entropy}, right): the slopes are $+0.04\pm0.20$ (std, step $\eta$), $-0.21\pm0.27$ (NTK) and $-0.11\pm0.32$ (std, step $\eta/H$), at 5.2, 2.9 and 2.8 standard errors from $-1$, and at $H=256$ the divergence is still 0.335, 0.133 and 0.232 nats. In $\mu$P it decreases from 0.049 nats at $H=16$ to 0.003 at $H=256$, with slope $-0.97\pm0.13$. The initial function behaves as assumed (Figure~\ref{fig:mup-limits}, right): the slope of its root mean square is $+0.06\pm0.11$ in the std and NTK scalings and $-0.51\pm0.11$ in $\mu$P, where it falls from 0.20 at $H=2$ to 0.032 at $H=256$. The centred NTK learner differs from the NTK learner only by the subtraction of $f_0$. Its seed divergence at $H=256$ is 0.013 nats, about 10 times smaller than without centring, and it decreases with slope $-0.49\pm0.15$, which is 3.3 standard errors from $0$ and 3.4 from $-1$. Centring removes the plateau, but over the widths $16$--$256$ the decay is slower than that of $\mu$P. These estimates rest on two seeds and two input sets, and the curves of the uncentred learners are irregular (for NTK, 0.065 nats at $H=64$ and 0.441 at $H=128$), as expected when one draw of $f_0$ moves the prior by tenths of a nat.

\subsection{Is the entropy a function of the movement? H3}

\begin{figure}[htbp]\centering
\begin{tikzpicture}
\begin{axis}[name=left, width=0.5\textwidth, height=0.4\textwidth, xmode=log, xmin=0.484, xmax=6.03, xtick={0.5,1,2,4}, xticklabels={0.5,1,2,4}, xlabel={movement in function space $\Delta f$ (logit units)}, ylabel={entropy $H(\QA)$ (nats)}, ymin=0, ymax=9.4,
  legend to name=mupleg3, legend columns=5, legend style={/tikz/every even column/.append style={column sep=6pt}}]
\addplot[nnblue, mark=*, mark size=1.6pt, mark options={solid}, only marks] coordinates {(1.317,2.763) (1.196,3.044) (1.359,2.686) (1.302,3.031) (1.559,2.269) (1.61,2.5) (1.607,2.258) (1.667,2.53) (1.953,2.448) (1.872,2.364) (1.955,2.381) (1.945,2.802) (2.264,2.435) (2.226,2.22) (2.241,2.359) (2.335,2.551) (2.493,2.511) (2.571,2.314) (2.494,2.281) (2.622,2.402) (2.869,1.984) (2.952,1.956) (2.916,2.133) (2.935,2.184) (3.587,2.272) (3.589,1.942) (3.583,1.945) (3.608,1.917) (4.852,1.234) (5.109,1.507) (4.756,1.879) (4.89,1.409)};
\addlegendentry{std, step $\eta$}
\addplot[nnorange, mark=square*, mark size=1.6pt, mark options={solid}, only marks] coordinates {(0.9825,3.83) (0.9607,4.004) (1.009,3.802) (1.007,3.999) (0.9785,4.058) (1.037,4.307) (1.01,4.078) (1.062,4.231) (1.214,4.203) (1.025,4.764) (1.234,4.287) (1.033,4.872) (1.191,4.794) (1.277,4.363) (1.152,4.815) (1.357,4.217) (1.062,5.053) (1.159,4.88) (1.083,4.879) (1.241,4.87) (1.171,4.792) (1.188,4.64) (1.184,4.711) (1.25,4.578) (1.692,4.265) (1.357,4.583) (1.566,4.382) (1.354,4.511) (1.212,4.769) (1.223,4.813) (1.249,4.733) (1.299,4.765)};
\addlegendentry{NTK}
\addplot[nnaqua, mark=triangle*, mark size=1.6pt, mark options={solid}, only marks] coordinates {(1.138,3.524) (1.053,3.723) (1.15,3.361) (1.111,3.633) (1.216,3.407) (1.23,3.674) (1.218,3.318) (1.236,3.489) (1.358,3.484) (1.236,3.862) (1.354,3.449) (1.247,3.608) (1.289,3.618) (1.357,3.766) (1.28,3.499) (1.358,3.505) (1.319,3.654) (1.321,3.716) (1.296,3.531) (1.304,3.606) (1.326,3.568) (1.364,3.569) (1.311,3.531) (1.353,3.545) (1.381,3.573) (1.333,3.733) (1.358,3.48) (1.32,3.558) (1.338,3.678) (1.332,3.732) (1.322,3.569) (1.317,3.596) (1.342,3.622)};
\addlegendentry{$\mu$P}
\addplot[nnyellow, mark=diamond*, mark size=1.6pt, mark options={solid}, only marks] coordinates {(0.848,4.155) (0.8862,4.433) (0.8747,4.378) (0.9171,4.429) (0.6889,5.23) (0.8184,5.431) (0.7007,5.475) (0.7902,5.354) (0.7539,6.031) (0.746,6.121) (0.7466,6.41) (0.6924,6.538) (0.7651,6.603) (0.792,6.269) (0.7006,6.647) (0.763,6.554) (0.5694,7.082) (0.6692,6.759) (0.5865,6.824) (0.73,6.564) (0.6074,7.043) (0.6101,6.897) (0.5766,6.905) (0.6226,6.646) (0.871,6.195) (0.7783,6.474) (0.7877,6.565) (0.7658,6.477) (0.5873,7.019) (0.6405,6.8) (0.6033,6.887) (0.6718,6.761)};
\addlegendentry{std, step $\eta/H$}
\addplot[nnviolet, mark=o, mark size=1.6pt, mark options={solid}, only marks] coordinates {(0.987,3.815) (0.9331,4.025) (1.019,3.826) (0.9964,4.12) (0.9715,4.11) (1.018,4.346) (1.005,4.139) (1.045,4.307) (1.172,4.186) (0.9549,4.88) (1.213,4.319) (1,4.892) (1.025,4.954) (1.184,4.433) (1.052,4.827) (1.268,4.339) (1.041,5.07) (1.058,5.099) (1.068,4.914) (1.098,5.05) (1.115,4.827) (1.178,4.637) (1.158,4.688) (1.221,4.593) (1.235,4.495) (1.125,4.912) (1.289,4.37) (1.175,4.746) (1.156,4.767) (1.133,4.963) (1.194,4.761) (1.177,4.858)};
\addlegendentry{NTK centred}
\addplot[nngray, dashed, line width=0.7pt, forget plot] coordinates {(0.484,6.7805) (6.028,-0.1239)};
\addplot[nnblue, line width=0.6pt, forget plot] coordinates {(1.196,2.8930) (5.109,1.6035)};
\addplot[nnorange, line width=0.6pt, forget plot] coordinates {(0.9607,4.3791) (1.692,4.7108)};
\addplot[nnaqua, line width=0.6pt, forget plot] coordinates {(1.053,3.5629) (1.381,3.5880)};
\addplot[nnyellow, line width=0.6pt, forget plot] coordinates {(0.5694,7.2615) (0.9171,5.0404)};
\addplot[nnviolet, line width=0.6pt, forget plot] coordinates {(0.9331,4.4457) (1.289,4.6946)};
\end{axis}
\begin{axis}[at={(left.outer north east)}, anchor=outer north west, xshift=4pt, width=0.5\textwidth, height=0.4\textwidth, xmode=log, log basis x=2, xtick={2,4,8,16,32,64,128,256,512}, xticklabels={2,4,8,16,32,64,128,256,512}, xmin=1.5, xmax=700, ymode=log, ytick={0.5,1,2,4}, yticklabels={0.5,1,2,4}, xlabel={width $H$}, ylabel={movement $\Delta f$ (logit units)}, ymin=0.453, ymax=6.37]
\addplot[nnblue, mark=*, mark size=1.6pt, mark options={solid}, solid, line width=0.8pt] coordinates {(2,1.2937) (4,1.6108) (8,1.931) (16,2.2665) (32,2.545) (64,2.9179) (128,3.592) (256,4.9017)};
\addplot[nnorange, mark=square*, mark size=1.6pt, mark options={solid}, dashed, line width=0.8pt] coordinates {(2,0.98985) (4,1.022) (8,1.1264) (16,1.244) (32,1.1363) (64,1.1982) (128,1.4923) (256,1.2458)};
\addplot[nnaqua, mark=triangle*, mark size=1.6pt, mark options={solid}, densely dashed, line width=0.8pt] coordinates {(2,1.1128) (4,1.2249) (8,1.2989) (16,1.321) (32,1.31) (64,1.3385) (128,1.3482) (256,1.3272) (512,1.3417)};
\addplot[nnyellow, mark=diamond*, mark size=1.6pt, mark options={solid}, dashdotted, line width=0.8pt] coordinates {(2,0.8815) (4,0.74953) (8,0.73475) (16,0.75515) (32,0.63878) (64,0.6042) (128,0.8007) (256,0.62576)};
\addplot[nnviolet, mark=o, mark size=1.6pt, mark options={solid}, densely dotted, line width=0.8pt] coordinates {(2,0.98395) (4,1.0097) (8,1.0851) (16,1.1319) (32,1.0663) (64,1.1682) (128,1.2061) (256,1.1648)};
\end{axis}
\node[anchor=north] at ($(current bounding box.south)+(0,-2pt)$) {\pgfplotslegendfromname{mupleg3}};
\end{tikzpicture}
\caption{\textbf{Left}: entropy of the implicit prior against the movement in function space, one point per configuration (161 points); grey dashed line: least-squares line common to all learners; coloured lines: one line per learner, drawn over its own range of movement. \textbf{Right}: movement in function space against width (mean over four runs; one run at $H=512$), on logarithmic axes.\label{fig:mup-movement}}
\end{figure}

Over the 161 configurations the Spearman correlation between $H(\QA)$ and $\Delta f$ is $-0.84$ ($-0.90$ if the movement is averaged over the eleven levels of the tree): learners that move more have more concentrated priors (Figure~\ref{fig:mup-movement}, left). But the points do not fall on one curve. A single line $H(\QA)=a+b\ln\Delta f$ ($b=-2.74\pm0.12$) has $R^2=0.78$ and a residual standard deviation of 0.65 nats; a common slope with one intercept per learner gives $R^2=0.90$, and one line per learner $R^2=0.94$ (0.36 nats). The gain of the last model over the single line is $F(8,151)=46.8$; the configurations share inputs and seeds, so this statistic is indicative only. The offsets are large (last column of Table~\ref{tab:mup-trends}): at equal movement the $\mu$P prior has $0.82\pm0.11$ nats less entropy than the NTK prior ($0.93\pm0.11$ at the median movement $\Delta f=1.19$ in the fit with separate lines), std with step $\eta$ has $1.49\pm0.16$ less, std with step $\eta/H$ has $1.19\pm0.14$ more, and only the two NTK learners coincide ($+0.01\pm0.11$). Without any fit: among the 1{,}339 pairs of configurations of two different learners whose movements agree within $10\%$, the entropies differ by 0.81 nats on average and by up to 2.18; among the 1{,}055 such pairs inside a learner, by 0.29. Inside a learner the association is strong only where the movement varies widely, $-0.84$ for std with step $\eta$ ($\Delta f$ from 1.20 to 5.11) and $-0.85$ for std with step $\eta/H$; it is $+0.21$, $+0.04$ and $+0.12$ for NTK, $\mu$P and NTK centred, in which $\Delta f$ varies by less than a factor 1.8.

One observation was made after the results were seen and is reported as a hypothesis, not as a finding. What separates $\mu$P from NTK at equal $\Delta f$ is the movement of the features: at $H=256$ the first layer moves by 149\% of its initial norm in $\mu$P, by 12\% in NTK and by 0.1\% in std with step $\eta/H$. Adding the logarithm of this relative movement as a second regressor to the single line raises $R^2$ from 0.78 to 0.91 with three parameters (coefficient $-0.30\pm0.02$ nats).

\subsection{What this shows and what it does not}
\textbf{H1 is supported.} The order of the five learners is the same in all 32 cells, with differences of 1.47--5.36 nats between learners against at most 0.37 nats between runs; in $\mu$P the entropy has no trend ($+0.005\pm0.009$ nats per doubling) and the prior converges ($\KLd{Q_{2H}}{Q_H}$ of slope $-1.10\pm0.15$, down to 0.005 nats).
\textbf{H2 is supported, with one discrepancy.} The seed divergence has no trend in the three learners with $f_0=O(1)$ and decreases as $H^{-0.97\pm0.13}$ in $\mu$P, and centring the NTK network divides it by about 10 at $H=256$; but the centred learner decays as $H^{-0.49\pm0.15}$, more slowly than the predicted $1/H$, and two seeds cannot tell a slower rate from a pre-asymptotic one.
\textbf{H3 is refuted as stated.} Movement in function space orders the configurations ($\rho_S=-0.84$) and one line explains a fraction 0.78 of the variance, but the entropy is not a function of the movement alone: at equal movement $\mu$P and NTK differ by $0.82\pm0.11$ nats, 7.5 standard errors.
\textbf{Conjecture~\ref{conj:scaling}} holds on average only in the original protocol (22 of $28$ doublings, no monotone run), where the step in function space grows with the width. In the four learners whose step in function space does not grow, the entropy is flat for $H\ge16$ (it rises at small width in three of them and is flat throughout in $\mu$P): in none of them does scale concentrate the prior, and in none of the 161 configurations was the interpolation threshold reached in the sense of the training loss.

The scope is narrow: one architecture (one hidden layer, $\tanh$), $d=3$, $n=12$, sixty steps, a single $\eta$, four runs per cell, widths up to $256$. The comparison of seeds at $H=512$ was not run, the slopes for $H\ge16$ use five widths and their standard errors assume independent residuals, $\Delta f$ is measured on the last level of the prefix tree, and training to interpolation, depth and other step sizes were not tested.


% ==========================================================================================
% Experiment "gp"
% ==========================================================================================
% GENERATED by make_tex_gp.py from sec_gp.tpl.tex and results_gp.json -- do not edit by hand.
\section{Finite width against the infinite-width limits: the kernel code and the Bayesian code}\label{sec:gp}

The only neural learner whose implicit prior was written in closed form above is the infinitely wide one, and the conjectures were described as statements about how finite networks depart from it. This section measures that departure, exactly and in nats. A wide network has two limits, and both are learners in the sense of Definition~\ref{def:learner}: trained by gradient descent it becomes kernel gradient descent with the neural tangent kernel \citep{Jacot2018,Lee2019}; treated as a Bayesian model it becomes a Gaussian process \citep{Neal1996,Lee2018}. By Theorem~\ref{thm:bayes} each of them is a code on the labelings of a given input set, and by~\eqref{eq:exchange} the distance between two codes is a number of nats. We ask three questions. How fast does the code $Q_H$ of a network of width $H$ approach the kernel code $Q_\infty$? What is the remaining distance made of: the random function at initialization, the randomness of the kernel, or the movement of the features? And how far are the two limits from each other, which is the form that the question ``is gradient descent a Bayesian sampler?'' \citep{Mingard2021} takes in the present framework?

\subsection{Design}

\paragraph{Networks.} The inputs are $n=12$ points $x_1,\dots,x_{12}$ drawn i.i.d.\ from $\mathcal N(0,I_3)$ (seed $0$) and the labels are binary. With $\tilde x=(x,1)\in\mathbb R^4$, the network is
\[
f_H(x)=H^{-1/2}\sum_{j=1}^{H}v_j\,\mathrm{erf}(w_j\cdot\tilde x),\qquad v_j\sim\mathcal N(0,1),\quad w_j\sim\mathcal N(0,I_4/3),
\]
that is, the NTK parametrization, trained on both layers by $60$ full-batch gradient steps of size $\eta=0.5$ on the mean logistic loss. The \emph{centred} network outputs $f_H(x)-f_{H,0}(x)$, where $f_{H,0}$ is the function at initialization, so that training starts from the zero function; the \emph{uncentred} network outputs $f_H(x)$. The widths are $H=2,4,\dots,1024$ and the seeds $1,2,3$, which gives $60$ networks. Their codes were computed exactly, with one training run from scratch per node of the prefix tree, on the first ten inputs ($1024$ labelings): the cost is linear in $H$, and the code of a width-$1024$ network on twelve inputs was beyond our compute budget. By Lemma~\ref{lem:normalized} the code on ten inputs is the exact marginal of the code on twelve, so the restriction changes the size of the experiment and not its nature.

\paragraph{The limit learner.} As $H\to\infty$ with the number of steps fixed, the same $60$ steps become gradient descent in function space \citep{Jacot2018,Lee2019}. For a prefix of $t$ examples with inputs $X_t$ and labels $y\in\{0,1\}^t$,
\begin{equation}\label{eq:gp-kgd}
F\ \leftarrow\ F-\frac{\eta}{t}\,\Theta(\,\cdot\,,X_t)\bigl(\sigma(F(X_t))-y\bigr),\qquad F_0=0,
\end{equation}
where $\sigma$ is the logistic function and $\Theta$ the tangent kernel. For erf units the two Gaussian expectations that enter $\Theta$ are elementary \citep{Williams1998}. Let $u=w\cdot\tilde x$, $u'=w\cdot\tilde x'$, and $a=|\tilde x|^2/3$, $b=|\tilde x'|^2/3$, $c=\tilde x\cdot\tilde x'/3$. Then
\begin{equation}\label{eq:gp-kernels}
\begin{gathered}
K_\phi=\frac{2}{\pi}\arcsin\frac{2c}{\sqrt{(1+2a)(1+2b)}},\qquad
K_{\phi'}=\frac{4}{\pi}\,\frac{1}{\sqrt{(1+2a)(1+2b)-4c^2}},\\
\Theta=K_\phi+(\tilde x\cdot\tilde x')\,K_{\phi'},
\end{gathered}
\end{equation}
where $K_\phi=\EE[\mathrm{erf}(u)\,\mathrm{erf}(u')]$ is the covariance of the function at initialization and $K_{\phi'}=\EE[\mathrm{erf}'(u)\,\mathrm{erf}'(u')]$ follows from $\EE\,e^{-u^2-u'^2}=\det(I+2S)^{-1/2}$ for a centred Gaussian pair with covariance $S$. The learner~\eqref{eq:gp-kgd} is deterministic, and its code $Q_\infty$ was computed exactly on all $4096$ labelings of the twelve inputs.

We did not take~\eqref{eq:gp-kernels} on trust. (i) A Gauss--Hermite quadrature with $120$ nodes in each of the two dimensions reproduces $K_\phi$ and $K_{\phi'}$ on the twelve inputs to $7.7\times10^{-10}$. (ii) The empirical tangent kernel, that is, the Gram matrix of the parameter gradients, of a random network with $2\times10^{6}$ hidden units differs from $\Theta$ by at most $1.2\times10^{-2}$ over the $78$ distinct entries (the largest entry is $3.62$); the largest Monte Carlo standard error is $5.5\times10^{-3}$ and the largest deviation is $2.9$ standard errors. In the same run the two expectations taken separately deviate by up to $3.9$ standard errors; the entries share their hidden units and are strongly correlated, but a deviation of that size called for a repetition, and three further seeds gave at most $2.8$. Pooled over the four runs the largest error on $\Theta$ is $4.0\times10^{-3}$, or $1.7$ standard errors. (iii) The Gram formula used in (ii) agrees with a finite-difference Jacobian of the library network to $3.3\times10^{-10}$.

\paragraph{Two auxiliary learners.} For every finite network we also ran~\eqref{eq:gp-kgd} in two modified forms. In the first, the kernel is the limit kernel $\Theta$ and the iteration starts from $F_0=f_{H,0}$, the initial function of that network; its code is denoted $Q^{\mathrm{lin}}_H$, and for a centred network it is $Q_\infty$. In the second, the kernel is the empirical tangent kernel $\Theta_H$ of that network at initialization and $F_0$ is again its own initial function; this is the linearized network of \citet{Lee2019}, with code $Q^{\mathrm{emp}}_H$. The first isolates the effect of the initial function. The second splits what is left into the randomness of the kernel, $\KLd{Q_\infty}{Q^{\mathrm{emp}}_H}$ for a centred network, and what the linearization misses, $\KLd{Q^{\mathrm{emp}}_H}{Q_H}$, which is the movement of the features during training. The second learner is a diagnostic that we added to the planned design before the sweep was run.

\paragraph{The Bayesian learner.} The Gaussian-process limit of the same architecture \citep{Neal1996,Lee2018} has $f\sim\mathcal N(0,K_\phi)$ on the twelve inputs. With the likelihood $P(y=1\mid f)=\sigma(\beta f)$, the Bayes predictive distribution defines a learner whose implicit code is, by Theorem~\ref{thm:bayes}, the marginal likelihood
\begin{equation}\label{eq:gp-bayes}
Q_{\mathrm{Bayes},\beta}(y^n)=\EE_f\prod_{t=1}^{n}\sigma\bigl(\beta\,(2y_t-1)\,f_t\bigr).
\end{equation}
We estimated it for all $4096$ labelings from $10^{6}$ draws of $f$, each used together with $-f$, in ten batches. Each draw contributes a product distribution on labelings, so every estimate sums to one exactly. All reported quantities are computed from the pooled estimate and carry a delete-one-batch jackknife standard error. The planned grid was $\beta\in\{1,2,4,8,16\}$; because the minimum fell on its edge, $\beta=32$ and $64$ were added after the first run and are marked as such. The limit $\beta\to\infty$ is the law $Q_{\mathrm{sign}}$ of the sign pattern of $f$, the prior of the parameter--function map of \citet{VallePerez2019} at infinite width, estimated by counting.

\paragraph{Fits and cost.} Power laws are fitted by least squares of the logarithm of a divergence on $\ln H$ over the six widths $H\ge32$, separately for each seed; we report the mean slope and its standard error over the three seeds. The range of the fit was fixed in advance. The experiment used $151$\,s of CPU time on one core, of which $122$\,s for the $60$ exact network codes.

\subsection{Checks}

Kraft's equality~\eqref{eq:kraft} holds for $Q_\infty$ on ten and on twelve inputs with no deviation in double precision, and for the $60$ network codes and the $90$ auxiliary codes to within $3.3\times10^{-16}$. The marginal of $Q_\infty$ on the first ten labels coincides with the code computed on ten inputs to $2.8\times10^{-17}$, and the code lengths under $Q_\infty$ are invariant under the exchange of the two labels to $5.3\times10^{-15}$, as the symmetry of~\eqref{eq:gp-kgd} requires. The kernel code is concentrated: its entropy on twelve inputs is $H(Q_\infty)=4.58$ nats, against $n\ln2=8.318$ for a learner that does not learn; the two constant labelings are the cheapest, at $2.00$ nats, and the most expensive labeling costs $16.71$ nats.

\subsection{The approach to the limit}

\begin{figure}[htbp]\centering
\begin{tikzpicture}
\begin{groupplot}[group style={group size=2 by 1, horizontal sep=1.55cm}, width=0.47\textwidth, height=6.4cm,
  xmode=log, ymode=log, log basis x=2, xtick={2,8,32,128,512}, xticklabels={2,8,32,128,512}, xlabel={width $H$},
  xmin=1.5, xmax=1400, legend cell align=left, legend style={at={(0.5,-0.25)}, anchor=north, row sep=-1pt, /tikz/every even column/.append style={column sep=6pt}}]
\nextgroupplot[title={(a) distance from the kernel code $Q_\infty$}, ylabel={divergence (nats)}, legend columns=2]
\addplot[nnblue, mark=*, mark size=1.5pt, error bars/.cd, y dir=both, y explicit, error bar style={line width=0.4pt}, error mark options={rotate=90, mark size=1.2pt}] coordinates {(1.86,0.39773) += (0,0.13053) -= (0,0.053244) (3.72,0.20136) += (0,0.11409) -= (0,0.091028) (7.44,0.13113) += (0,0.017087) -= (0,0.022773) (14.88,0.046919) += (0,0.002806) -= (0,0.0016912) (29.76,0.031709) += (0,0.021582) -= (0,0.010197) (59.52,0.012488) += (0,0.0023614) -= (0,0.0028538) (119.04,0.0096691) += (0,0.0042136) -= (0,0.0025302) (238.08,0.0078603) += (0,0.001439) -= (0,0.0012474) (476.16,0.0018377) += (0,0.0012073) -= (0,0.00085124) (952.32,0.00095018) += (0,0.00028305) -= (0,0.00019596)};
\addlegendentry{centred, $\mathrm{KL}(Q_\infty\|Q_H)$}
\addplot[nnorange, dashed, mark=square, mark size=1.5pt, mark options={solid}, error bars/.cd, y dir=both, y explicit, error bar style={line width=0.4pt}, error mark options={rotate=90, mark size=1.2pt}] coordinates {(2.14,0.31112) += (0,0.083041) -= (0,0.049475) (4.28,0.19461) += (0,0.16425) -= (0,0.093424) (8.56,0.11742) += (0,0.027665) -= (0,0.028462) (17.12,0.045631) += (0,0.00044333) -= (0,0.00034489) (34.24,0.034904) += (0,0.023197) -= (0,0.011455) (68.48,0.01236) += (0,0.0018728) -= (0,0.0026432) (136.96,0.0095421) += (0,0.0033065) -= (0,0.0023218) (273.92,0.0078848) += (0,0.0015368) -= (0,0.0014468) (547.84,0.0018439) += (0,0.0012539) -= (0,0.00087132) (1095.7,0.0009529) += (0,0.000287) -= (0,0.00020622)};
\addlegendentry{centred, $\mathrm{KL}(Q_H\|Q_\infty)$}
\addplot[nnaqua, mark=triangle*, mark size=1.9pt, error bars/.cd, y dir=both, y explicit, error bar style={line width=0.4pt}, error mark options={rotate=90, mark size=1.2pt}] coordinates {(1.86,0.61422) += (0,0.79792) -= (0,0.23111) (3.72,0.2538) += (0,0.14889) -= (0,0.10809) (7.44,0.23957) += (0,0.090521) -= (0,0.07642) (14.88,0.19015) += (0,0.0734) -= (0,0.069572) (29.76,0.17407) += (0,0.054223) -= (0,0.051914) (59.52,0.062558) += (0,0.01328) -= (0,0.015444) (119.04,0.26751) += (0,0.38228) -= (0,0.14569) (238.08,0.20417) += (0,0.082574) -= (0,0.042655) (476.16,0.11195) += (0,0.084901) -= (0,0.074495) (952.32,0.19844) += (0,0.14389) -= (0,0.12153)};
\addlegendentry{uncentred, $\mathrm{KL}(Q_\infty\|Q_H)$}
\addplot[nnyellow, dashed, mark=diamond, mark size=1.9pt, mark options={solid}, error bars/.cd, y dir=both, y explicit, error bar style={line width=0.4pt}, error mark options={rotate=90, mark size=1.2pt}] coordinates {(2.14,0.47832) += (0,0.61293) -= (0,0.16781) (4.28,0.24322) += (0,0.18381) -= (0,0.11056) (8.56,0.21114) += (0,0.077218) -= (0,0.067986) (17.12,0.18849) += (0,0.090309) -= (0,0.070842) (34.24,0.17624) += (0,0.073293) -= (0,0.053776) (68.48,0.061673) += (0,0.015559) -= (0,0.01547) (136.96,0.25063) += (0,0.36119) -= (0,0.12778) (273.92,0.20121) += (0,0.088202) -= (0,0.039831) (547.84,0.11174) += (0,0.080963) -= (0,0.07378) (1095.7,0.18625) += (0,0.15384) -= (0,0.11095)};
\addlegendentry{uncentred, $\mathrm{KL}(Q_H\|Q_\infty)$}
\addplot[nnblue, line width=0.9pt, dotted, forget plot] coordinates {(32,0.032778) (1024,0.0011427)};
\addplot[nnaqua, line width=0.9pt, dotted, forget plot] coordinates {(32,0.13205) (1024,0.17903)};
\addplot[nngray, densely dashdotted, line width=0.7pt] coordinates {(32,0.1524) (1400,0.1524)};
\addlegendentry{$H=\infty$, random $f_0$ (mean)}
\nextgroupplot[title={(b) what the departure is made of}, ylabel={divergence (nats)}, legend columns=1]
\addplot[nnviolet, mark=o, mark size=1.6pt, error bars/.cd, y dir=both, y explicit, error bar style={line width=0.4pt}, error mark options={rotate=90, mark size=1.2pt}] coordinates {(1.86,0.38442) += (0,0.20646) -= (0,0.10124) (3.72,0.18918) += (0,0.11273) -= (0,0.085694) (7.44,0.12496) += (0,0.018526) -= (0,0.019595) (14.88,0.042469) += (0,0.0056776) -= (0,0.0073193) (29.76,0.027968) += (0,0.023341) -= (0,0.010963) (59.52,0.011916) += (0,0.0017375) -= (0,0.0027005) (119.04,0.008238) += (0,0.0012716) -= (0,0.0010027) (238.08,0.0070998) += (0,0.0014664) -= (0,0.00065302) (476.16,0.0018248) += (0,0.0012214) -= (0,0.00084179) (952.32,0.00084892) += (0,0.00017715) -= (0,0.00020217)};
\addlegendentry{uncentred, $\mathrm{KL}(Q^{\mathrm{lin}}_{H}\|Q_H)$}
\addplot[nnmagenta, dashed, mark=square*, mark size=1.4pt, mark options={solid}, error bars/.cd, y dir=both, y explicit, error bar style={line width=0.4pt}, error mark options={rotate=90, mark size=1.2pt}] coordinates {(2,0.50155) += (0,0.70302) -= (0,0.23484) (4,0.24904) += (0,1.059) -= (0,0.16712) (8,0.12653) += (0,0.081223) -= (0,0.060724) (16,0.047279) += (0,0.042659) -= (0,0.029786) (32,0.047734) += (0,0.022047) -= (0,0.0096491) (64,0.010167) += (0,0.0071902) -= (0,0.0029923) (128,0.010021) += (0,0.0018452) -= (0,0.00145) (256,0.0082408) += (0,0.0019098) -= (0,0.00085181) (512,0.0018589) += (0,0.0012764) -= (0,0.00081674) (1024,0.00092203) += (0,0.00028548) -= (0,0.00021194)};
\addlegendentry{centred, $\mathrm{KL}(Q_\infty\|Q^{\mathrm{emp}}_{H})$}
\addplot[nngray, densely dotted, mark=triangle, mark size=1.9pt, mark options={solid}, error bars/.cd, y dir=both, y explicit, error bar style={line width=0.4pt}, error mark options={rotate=90, mark size=1.2pt}] coordinates {(2.14,0.41487) += (0,0.18178) -= (0,0.13211) (4.28,0.36293) += (0,0.42694) -= (0,0.20222) (8.56,0.13118) += (0,0.089976) -= (0,0.030299) (17.12,0.03794) += (0,0.0053747) -= (0,0.0087578) (34.24,0.020681) += (0,0.0088226) -= (0,0.0040001) (68.48,0.0076851) += (0,0.0042749) -= (0,0.0020086) (136.96,0.0020959) += (0,0.00048382) -= (0,0.00061044) (273.92,0.00056887) += (0,0.00037235) -= (0,0.00017024) (547.84,0.00016396) += (0,4.2192e-05) -= (0,3.8864e-05) (1095.7,4.1009e-05) += (0,1.4237e-05) -= (0,1.1643e-05)};
\addlegendentry{centred, $\mathrm{KL}(Q^{\mathrm{emp}}_{H}\|Q_H)$}
\addplot[black!55, line width=0.5pt, forget plot] coordinates {(32,0.084126) (1024,0.0026289)} node[pos=0.72, above, sloped, font=\scriptsize, text=black!70] {$H^{-1}$};
\addplot[black!55, line width=0.5pt, forget plot] coordinates {(32,0.010827) (1024,1.0573e-05)} node[pos=0.72, below, sloped, font=\scriptsize, text=black!70] {$H^{-2}$};
\end{groupplot}
\end{tikzpicture}
\caption{Width sweep on the first ten inputs ($1024$ labelings, exact codes). Symbols: geometric mean over three seeds; bars: smallest and largest seed; within each panel, curves that nearly coincide are displaced horizontally by $\pm7\%$ for legibility. (a)~Divergence between the code $Q_H$ of the network and the kernel code $Q_\infty$. Dotted lines: mean of the per-seed least-squares fits of $\mathrm{KL}(Q_\infty\|Q_H)$ for $H\ge32$ (slopes $-0.97$ and $+0.09$). Dash-dotted line: mean of $\mathrm{KL}(Q_\infty\|Q^{\mathrm{lin}})$ over $200$ draws of $f_0\sim\mathcal N(0,K_\phi)$, the value predicted for an uncentred network of infinite width. (b)~The uncentred network against kernel gradient descent started from its own initial function and, for the centred network, the divergence due to the random kernel at initialization and the divergence between the linearized and the trained network. Thin lines: slopes $-1$ and $-2$.\label{fig:gp-width}}
\end{figure}

\begin{table}[htbp]\centering
\caption{Divergences in nats on the first ten inputs, means over three seeds. A column headed $P\|Q$ gives $\mathrm{KL}(P\|Q)$; TV is the total variation between $Q_\infty$ and $Q_H$. $Q_\infty$: kernel code; $Q_H$: network of width $H$; $Q^{\mathrm{emp}}_H$: kernel gradient descent with the tangent kernel of the network at initialization; $Q^{\mathrm{lin}}_H$: kernel gradient descent with the limit kernel, started from the initial function of the network. Last two rows: slope of the log--log fit for $H\ge32$, mean and standard error over seeds.\label{tab:gp-width}}
\footnotesize\setlength{\tabcolsep}{3.5pt}
\begin{tabular}{r@{\quad}ccccc@{\quad}cccc}
\toprule
 & \multicolumn{5}{c}{centred network} & \multicolumn{4}{c}{uncentred network}\\
\cmidrule(lr){2-6}\cmidrule(lr){7-10}
$H$ & $Q_\infty\|Q_H$ & $Q_H\|Q_\infty$ & TV & $Q_\infty\|Q^{\mathrm{emp}}_H$ & $Q^{\mathrm{emp}}_H\|Q_H$ & $Q_\infty\|Q_H$ & $Q_H\|Q_\infty$ & $Q_\infty\|Q^{\mathrm{lin}}_H$ & $Q^{\mathrm{lin}}_H\|Q_H$\\
\midrule
2 & 0.41 & 0.32 & 0.31 & 0.62 & 0.43 & 0.74 & 0.57 & 0.45 & 0.40\\
4 & 0.22 & 0.22 & 0.26 & 0.51 & 0.44 & 0.28 & 0.27 & 0.029 & 0.21\\
8 & 0.13 & 0.12 & 0.20 & 0.14 & 0.14 & 0.25 & 0.22 & 0.082 & 0.13\\
16 & 0.047 & 0.046 & 0.11 & 0.058 & 0.039 & 0.20 & 0.20 & 0.14 & 0.043\\
32 & 0.034 & 0.038 & 0.099 & 0.050 & 0.021 & 0.18 & 0.18 & 0.13 & 0.031\\
64 & 0.013 & 0.013 & 0.060 & 0.011 & 0.0081 & 0.064 & 0.063 & 0.046 & 0.012\\
128 & 0.010 & 0.0098 & 0.058 & 0.010 & 0.0022 & 0.34 & 0.31 & 0.32 & 0.0083\\
256 & 0.0079 & 0.0080 & 0.053 & 0.0083 & $6.1\times10^{-4}$ & 0.21 & 0.21 & 0.20 & 0.0072\\
512 & 0.0020 & 0.0021 & 0.025 & 0.0020 & $1.7\times10^{-4}$ & 0.14 & 0.14 & 0.14 & 0.0020\\
1024 & $9.7\times10^{-4}$ & $9.7\times10^{-4}$ & 0.018 & $9.4\times10^{-4}$ & $4.2\times10^{-5}$ & 0.24 & 0.22 & 0.23 & $8.6\times10^{-4}$\\
\midrule
slope & $-0.97$ & $-0.99$ & $-0.47$ & $-1.03$ & $-1.81$ & $0.09$ & $0.08$ & $0.19$ & $-0.96$\\
s.e. & 0.08 & 0.08 & 0.04 & 0.02 & 0.06 & 0.06 & 0.05 & 0.09 & 0.09\\
\bottomrule
\end{tabular}
\end{table}

\paragraph{Centred network.} The divergence from the kernel code falls from $0.41$ nats at width~$2$ to $9.7\times10^{-4}$ nats at width~$1024$ (Figure~\ref{fig:gp-width}a, Table~\ref{tab:gp-width}). The fitted exponents are $-0.97\pm0.08$ for $\KLd{Q_\infty}{Q_H}$ and $-0.99\pm0.08$ for $\KLd{Q_H}{Q_\infty}$, and $-0.47\pm0.04$ for the total variation. These are the values $-1$, $-1$ and $-\tfrac12$ expected when the logits of the network differ from those of the limit by a fluctuation of order $H^{-1/2}$: a Kullback--Leibler divergence is quadratic in such a fluctuation and a total variation is linear. For $H\ge32$ the two directions of the divergence differ by at most $12\%$ in any single run, as they must at second order.

\paragraph{Uncentred network.} Measured against the same limit, the uncentred network does not converge. Its fitted exponents are $+0.09\pm0.06$ and $+0.08\pm0.05$, and the $12$ values of $\KLd{Q_\infty}{Q_H}$ at widths $H\ge128$ lie between $0.037$ and $0.65$ nats, with mean $0.23$. At width $1024$ the uncentred network is on average $246$ times further from $Q_\infty$ than the centred one. The reason is the function at initialization, which is a random function with covariance $K_\phi$ at every width. Two measurements show that it is the whole reason. First, the plateau is reproduced by the limit kernel alone: $\KLd{Q_\infty}{Q^{\mathrm{lin}}_H}$ agrees with $\KLd{Q_\infty}{Q_H}$ to within $15\%$ in each of the $12$ runs with $H\ge128$. Its level is predicted by the theory of the limit: over $200$ draws of $f_0\sim\mathcal N(0,K_\phi)$, kernel gradient descent started from $f_0$ is at $0.152\pm0.007$ nats from $Q_\infty$ on average, with a wide spread (standard deviation $0.10$, range $0.013$--$0.60$). The mean over our twelve networks is higher ($0.22$), and $9$ of them are above the median of that distribution ($0.130$), so after seeing this we computed the same quantity for the initial functions of $120$ further seeds, which needs no training: $0.147\pm0.010$ nats at width $128$ and $0.141\pm0.009$ at width $1024$, in agreement with the prediction. Second, once the initial function is accounted for, the power law returns: $\KLd{Q^{\mathrm{lin}}_H}{Q_H}$ decays with exponent $-0.96\pm0.09$ and reaches $8.6\times10^{-4}$ nats at width $1024$, the value of the centred network (Figure~\ref{fig:gp-width}b).

\paragraph{What the departure is made of.} For the centred network, the divergence caused by the randomness of the kernel alone, $\KLd{Q_\infty}{Q^{\mathrm{emp}}_H}$, decays with exponent $-1.03\pm0.02$, and the divergence between the linearized and the trained network, $\KLd{Q^{\mathrm{emp}}_H}{Q_H}$, with exponent $-1.81\pm0.06$. At width~$8$ the two are of the same size ($0.14$ and $0.14$ nats); at width~$32$ the second is $43\%$ of the first, and at width~$1024$ it is $4\%$ ($4.2\times10^{-5}$ against $9.4\times10^{-4}$ nats). Beyond a width of about one hundred, therefore, a finite network of this kind departs from its limit because its kernel is a random draw, and not because its features move. This is the lazy regime of \citet{Chizat2019}, with its two error terms measured separately in nats.

\paragraph{Entropy of the prior.} The difference $H(Q_H)-H(Q_\infty)$ is of first order in the fluctuation and has no definite sign: for the centred network it is positive in $14$ of the $30$ runs. It is negative for all three seeds at width~$2$ (mean $-0.73$ nats, that is, $H(Q_H)=3.22$ against $H(Q_\infty)=3.95$ on ten inputs) and at most $0.056$ nats in absolute value at width~$1024$. In this parametrization the entropy of the prior thus has a finite limit, the entropy of the kernel code. The rise of the entropy with width that was reported for the NTK parametrization in Table~\ref{tab:n16} has the same direction as the one seen here at the smallest widths, and the present data add that it must saturate; they say nothing about Conjecture~\ref{conj:scaling} in parametrizations where the limit is not a kernel method. For the uncentred network the limit is itself random and lower on average: over the $200$ draws of $f_0$ the entropy of $Q^{\mathrm{lin}}$ differs from $H(Q_\infty)$ by $-0.098\pm0.009$ nats, and $26$ of the $30$ uncentred networks have an entropy below $H(Q_\infty)$.

\subsection{Gradient descent against Bayes at infinite width}

\begin{figure}[htbp]\centering
\begin{tikzpicture}
\begin{groupplot}[group style={group size=2 by 1, horizontal sep=1.55cm}, width=0.47\textwidth, height=6.2cm, legend cell align=left]
\nextgroupplot[title={(a) kernel code against Bayesian code}, xmode=log, log basis x=2, xtick={1,2,4,8,16,32,64}, xticklabels={1,2,4,8,16,32,64},
  xlabel={inverse temperature $\beta$ of the likelihood}, ylabel={divergence (nats)}, ymin=0, xmin=0.8, xmax=80, legend pos=north east]
\addplot[nnblue, mark=*, mark size=1.6pt, error bars/.cd, y dir=both, y explicit] coordinates {(1,2.6618) +- (0,0.0019118) (2,1.5725) +- (0,0.0022191) (4,0.71203) +- (0,0.001403) (8,0.37068) +- (0,0.0010805) (16,0.37019) +- (0,0.001237)};
\addlegendentry{$\mathrm{KL}(Q_\infty\|Q_{\mathrm{Bayes},\beta})$}
\addplot[nnorange, dashed, mark=square*, mark size=1.5pt, mark options={solid}, error bars/.cd, y dir=both, y explicit] coordinates {(1,3.1628) +- (0,0.0010815) (2,2.152) +- (0,0.001856) (4,1.0401) +- (0,0.0018546) (8,0.51234) +- (0,0.0016824) (16,0.44521) +- (0,0.0017385)};
\addlegendentry{$\mathrm{KL}(Q_{\mathrm{Bayes},\beta}\|Q_\infty)$}
\addplot[nnblue, mark=o, mark size=1.6pt, forget plot, error bars/.cd, y dir=both, y explicit] coordinates {(16,0.37019) +- (0,0.001237) (32,0.46431) +- (0,0.0015964) (64,0.53118) +- (0,0.0021824)};
\addplot[nnorange, dashed, mark=square, mark size=1.5pt, mark options={solid}, forget plot, error bars/.cd, y dir=both, y explicit] coordinates {(16,0.44521) +- (0,0.0017385) (32,0.47815) +- (0,0.0018228) (64,0.49793) +- (0,0.0018346)};
\addplot[nnblue, mark=*, mark size=1.6pt, only marks, forget plot] coordinates {(16,0.37019)};
\addplot[nnorange, mark=square*, mark size=1.5pt, only marks, forget plot] coordinates {(16,0.44521)};
\addplot[nnorange, densely dotted, line width=0.8pt] coordinates {(0.8,0.507) (80,0.507)};
\addlegendentry{$\mathrm{KL}(Q_{\mathrm{sign}}\|Q_\infty)$, $\beta=\infty$}
\nextgroupplot[title={(b) code lengths at $\beta=16$}, xlabel={kernel code length $C_\infty$ (nats)},
  ylabel={Bayesian code length $C_{\mathrm{Bayes}}$ (nats)}, xmin=4, xmax=17, ymin=4, ymax=17, legend pos=south east]
\addplot[nnblue, only marks, mark=*, mark size=0.8pt, opacity=0.6] coordinates {(7.921,11.333) (5.187,6.695) (8.159,10.697) (9.194,11.283) (10.627,12.936) (10.879,12.792) (11.815,13.121) (5.971,7.351) (9.960,13.177) (9.809,13.091) (7.720,8.105) (10.993,13.420) (10.813,12.288) (12.562,13.722) (12.528,13.928) (9.308,11.872) (9.755,11.168) (10.603,10.708) (12.461,13.928) (8.424,8.638) (8.230,8.556) (10.732,12.290) (12.466,13.431) (13.020,13.673) (13.282,14.385) (6.758,6.774) (9.692,12.208) (8.717,7.788) (8.810,9.267) (10.700,11.888) (10.612,10.909) (8.940,8.950) (10.146,10.382) (12.304,12.529) (12.029,11.728) (13.328,12.110) (11.270,12.213) (12.112,12.787) (11.096,11.352) (12.219,13.222) (10.930,11.592) (13.106,12.969) (12.789,13.070) (5.868,6.172) (7.502,6.827) (9.415,10.323) (5.822,4.950) (5.358,5.488) (8.221,8.896) (4.097,4.457) (6.291,6.171) (9.930,11.884) (11.235,12.528) (10.672,12.988) (11.092,12.324) (11.748,13.687) (10.943,11.520) (10.290,10.064) (10.710,12.085) (9.952,11.295) (6.692,6.135) (11.750,11.896) (13.461,14.415) (13.154,13.670) (9.656,8.931) (9.162,7.886) (12.818,14.896) (10.903,9.518) (12.467,12.619) (10.636,11.479) (11.598,12.708) (7.810,6.716) (7.835,5.995) (12.392,12.549) (9.464,7.582) (10.795,10.874) (13.155,10.893) (15.164,13.712) (15.877,13.917) (14.734,12.488) (11.851,9.740) (13.684,11.075) (12.193,10.389) (15.231,12.357) (14.269,13.195) (12.940,10.184) (14.447,12.117) (14.827,12.439) (14.201,12.076) (12.650,10.715) (13.568,10.923) (12.397,9.688) (14.399,14.011) (12.710,11.944) (13.200,12.790) (14.083,13.581) (12.916,12.434) (9.854,10.054) (13.366,13.244) (11.642,10.861) (11.632,10.974) (8.998,7.173) (10.264,9.879) (12.545,13.262) (11.358,10.904) (8.030,5.710) (12.050,11.690) (13.121,12.811) (13.557,13.045) (12.828,11.955) (13.544,14.005) (13.320,11.662) (12.165,12.527) (12.260,11.875) (14.714,13.995) (14.335,13.615) (13.976,13.377) (14.167,12.426) (14.860,13.160) (14.679,12.505) (15.670,14.026) (16.206,14.986) (13.314,9.999) (14.831,13.074) (15.515,14.383) (14.650,12.205) (15.855,14.658) (14.466,12.748) (15.769,13.738) (15.088,13.524) (14.827,12.791) (14.565,12.531) (15.694,14.108) (14.683,13.216) (14.867,13.308) (13.635,11.098) (14.207,13.301) (11.490,8.284) (12.779,12.434) (10.776,7.332) (11.624,10.364) (15.252,13.668) (15.269,14.103) (13.546,11.947) (15.084,13.403) (13.836,14.640) (12.297,12.417) (14.034,14.325) (14.284,14.226) (14.162,13.975) (13.083,12.736) (14.542,14.382) (13.168,13.213) (11.673,10.874) (10.178,8.305) (12.003,12.265) (13.833,14.010) (12.110,11.792) (13.673,13.516) (14.599,14.832) (12.373,11.846) (12.836,12.301) (9.575,8.844) (13.132,13.252) (15.176,15.419) (14.981,15.154) (13.826,13.419) (11.849,9.698) (11.717,10.737) (14.162,13.907) (12.084,10.729) (12.986,11.874) (8.967,6.797) (10.213,9.304) (14.348,12.983) (13.841,12.328) (14.204,12.987) (14.373,13.170) (12.633,11.356) (13.601,12.906) (15.124,14.528) (14.937,14.236) (11.808,8.921) (11.761,10.143) (12.120,9.916) (16.108,14.187) (14.482,12.853) (14.263,12.000) (14.899,12.750) (13.728,11.919) (13.052,11.165) (14.887,11.814) (15.032,13.342) (15.845,14.492) (15.277,13.617) (15.087,13.871) (12.097,9.503) (10.866,8.390) (13.454,13.117) (14.787,15.048) (12.725,12.788) (12.920,12.978) (11.412,10.909) (14.289,13.941) (14.391,14.042) (13.410,13.199) (12.421,12.108) (12.442,12.250) (11.180,9.383) (9.226,6.766) (12.160,12.229) (10.677,8.786) (11.429,10.779) (11.433,10.962) (13.319,13.211) (12.160,12.229) (9.944,9.015) (12.421,12.108) (11.863,11.258) (14.289,13.941) (12.341,11.720) (13.129,13.061) (13.801,13.759) (13.864,13.051) (15.560,13.643) (15.087,13.871) (15.543,13.657) (14.887,11.814) (16.381,15.131) (13.728,11.919) (15.731,14.184) (14.775,12.635) (14.098,13.232) (13.033,11.887) (13.705,12.318) (13.924,12.339) (12.258,7.859) (14.937,14.236) (14.198,11.882) (11.485,9.674) (14.373,13.170) (13.760,12.634) (13.397,12.398) (12.195,10.346) (12.114,9.382) (14.822,13.797) (11.971,11.171) (12.190,11.083) (12.569,11.948) (11.849,9.698) (13.943,14.181) (12.310,11.080) (13.800,12.260) (13.555,11.989) (15.176,15.419) (14.164,13.947) (10.751,10.980) (13.132,13.252) (13.071,12.703) (10.784,10.147) (14.599,14.832) (12.933,13.317) (12.880,12.905) (9.191,8.608) (10.389,8.677) (11.514,12.255) (13.702,13.672) (14.316,14.259) (11.086,10.566) (13.010,12.931) (15.084,13.403) (15.252,13.668) (14.977,14.073) (10.104,7.466) (13.651,11.791) (13.429,13.257) (15.663,13.984) (16.141,15.144) (14.885,13.204) (13.087,10.157) (13.030,11.062) (12.628,9.590) (15.764,15.550) (15.303,13.735) (16.094,14.669) (14.926,12.712) (16.091,15.053) (15.063,13.541) (15.087,13.644) (13.152,11.581) (14.517,12.967) (13.949,11.817) (13.035,10.841) (15.671,15.066) (12.200,10.952) (14.726,14.056) (12.260,11.875) (11.869,11.010) (14.568,14.301) (13.662,12.974) (12.565,12.564) (13.180,12.755) (13.396,13.244) (11.197,10.563) (14.526,14.306) (11.074,10.354) (13.207,13.039) (12.791,13.190) (12.545,13.262) (10.296,8.115) (11.588,10.337) (12.389,11.490) (11.596,12.386) (10.118,11.050) (14.083,13.581) (13.908,13.473) (13.257,11.207) (15.406,13.691) (13.218,11.345) (14.188,13.032) (13.681,11.539) (15.868,14.640) (13.630,11.040) (13.467,11.753) (12.861,10.863) (15.099,12.414) (13.051,9.769) (13.134,10.510) (15.855,14.328) (13.694,11.689) (9.845,7.806) (13.647,14.507) (8.850,7.885) (8.559,7.846) (9.086,8.967) (12.113,13.549) (9.141,7.213) (8.733,6.844) (9.213,8.780) (9.025,9.063) (11.152,11.863) (13.111,15.010) (12.533,14.471) (11.748,13.687) (8.797,9.884) (4.508,4.798) (8.139,9.598) (9.754,12.033) (11.201,13.817) (10.423,10.664) (10.239,9.991) (8.803,8.602) (8.358,7.499) (10.976,11.677) (9.002,8.720) (8.930,8.779) (8.391,8.988) (5.116,5.332) (11.131,12.340) (11.759,14.117) (5.969,6.033) (13.751,12.683) (13.722,12.543) (13.059,12.255) (13.509,13.083) (8.082,6.912) (14.388,12.462) (12.707,11.316) (13.328,12.110) (11.295,9.829) (10.257,10.650) (13.602,14.532) (9.978,11.225) (11.025,10.806) (9.921,7.955) (9.129,9.454) (11.026,12.342) (6.910,7.889) (13.441,14.079) (11.161,10.921) (11.832,13.521) (10.732,12.290) (8.230,8.556) (11.231,11.888) (12.118,13.644) (11.572,13.102) (9.308,11.872) (12.698,14.125) (12.218,13.611) (11.428,12.718) (10.870,12.053) (11.175,13.204) (10.997,12.514) (10.212,10.821) (11.058,13.054) (10.292,11.951) (10.879,12.792) (7.833,9.677) (7.785,8.815) (7.863,10.204)};
\addlegendentry{400 of the 4096 labelings}
\addplot[nngray, dashed, line width=0.7pt] coordinates {(4,4) (17,17)};
\addlegendentry{diagonal}
\end{groupplot}
\end{tikzpicture}
\caption{(a)~Divergence between the kernel code $Q_\infty$ and the Bayesian code $Q_{\mathrm{Bayes},\beta}$ of the Gaussian-process prior on the twelve inputs ($4096$ labelings), against the inverse temperature $\beta$. Monte Carlo estimates from $10^{6}$ draws; the error bars ($\pm2$ jackknife standard errors) are smaller than the symbols. Filled symbols: planned grid; open symbols: values added after the first run. Dotted line: hard-threshold limit of the second divergence; in that limit the first one is infinite for the estimate. (b)~Code lengths of a fixed random subsample of $400$ labelings under the two codes at $\beta=16$.\label{fig:gp-bayes}}
\end{figure}

\begin{table}[htbp]\centering
\caption{Kernel code against Bayesian code on the twelve inputs, in nats ($\pm$: jackknife standard error over ten batches). $\rho_S$: Spearman correlation of the two code lengths over the $4096$ labelings. Share: $1-\KLd{Q_\infty}{Q_{\mathrm{Bayes},\beta}}/\KLd{Q_\infty}{\mathrm{uniform}}$, with $\KLd{Q_\infty}{\mathrm{uniform}}=3.74$ nats. $^{\ast}$:~added after the first run. Last row: sign patterns of $f$, plug-in estimates; $1414$ labelings were never sampled, so the first divergence is only bounded from below. $^{\dagger}$:~over the $2682$ sampled labelings.\label{tab:gp-bayes}}
\small
\begin{tabular}{lcccccc}
\toprule
$\beta$ & $H(Q_{\mathrm{Bayes},\beta})$ & $\mathrm{KL}(Q_\infty\|Q_{\mathrm{Bayes},\beta})$ & $\mathrm{KL}(Q_{\mathrm{Bayes},\beta}\|Q_\infty)$ & TV & $\rho_S$ & share\\
\midrule
1 & 8.26 & $2.662\pm0.001$ & $3.163\pm0.001$ & 0.80 & 0.80 & 29\%\\
2 & 7.92 & $1.573\pm0.001$ & $2.152\pm0.001$ & 0.69 & 0.83 & 58\%\\
4 & 7.03 & $0.712\pm0.001$ & $1.040\pm0.001$ & 0.49 & 0.84 & 81\%\\
8 & 5.98 & $0.371\pm0.001$ & $0.512\pm0.001$ & 0.34 & 0.82 & 90\%\\
16 & 5.31 & $0.370\pm0.001$ & $0.445\pm0.001$ & 0.32 & 0.78 & 90\%\\
32$^{\ast}$ & 5.04 & $0.464\pm0.001$ & $0.478\pm0.001$ & 0.33 & 0.73 & 88\%\\
64$^{\ast}$ & 4.95 & $0.531\pm0.001$ & $0.498\pm0.001$ & 0.34 & 0.68 & 86\%\\
\midrule
$\infty$ (sign) & 4.92 & $\ge 0.59$ & $0.507\pm0.001$ & 0.34 & 0.61$^{\dagger}$ & --\\
\bottomrule
\end{tabular}
\end{table}

Table~\ref{tab:gp-bayes} and Figure~\ref{fig:gp-bayes} compare the two limits on the twelve inputs. With the likelihood of the network itself, $\beta=1$, the Bayesian code is almost uniform ($8.26$ of $8.318$ nats) and lies $2.662$ nats from the kernel code, $32\%$ of $n\ln2$: sixty gradient steps produce far more confident predictions than Bayesian conditioning under a logistic likelihood. Sharpening the likelihood brings the two codes together. $\KLd{Q_\infty}{Q_{\mathrm{Bayes},\beta}}$ falls to $0.371$ nats at $\beta=8$ and $0.370\pm0.001$ at $\beta=16$, two values that differ by $0.0005\pm0.0002$ only, and rises again to $0.464$ and $0.531$ at $\beta=32$ and $64$. The other direction is smallest, $0.445$ nats, at $\beta=16$ as well. At the optimum the Bayesian code accounts for $90\%$ of the divergence of the kernel code from the uniform one, and what remains is $4.5\%$ of $n\ln2$, or $0.031$ nats per label. The rank correlation of the two code lengths is $0.78$ there and never exceeds $0.84$ (at $\beta=4$): the two learners largely agree on which labelings are cheap, but single labelings differ by up to $+3.41$ and $-4.44$ nats, and by $0.66$ nats on average under $Q_\infty$ (Figure~\ref{fig:gp-bayes}b). The constant labelings, the cheapest for both, cost $2.00$ nats under the kernel code and $2.80$ under the Bayesian one.

The hard-threshold limit, which is the prior over functions on which the comparison of \citet{Mingard2021} is based, is not closer. In $10^{6}$ draws, $1414$ of the $4096$ sign patterns never occurred. The kernel code gives them $0.75\%$ of its mass, which makes $\KLd{Q_\infty}{Q_{\mathrm{sign}}}$ infinite for the estimate; for the true distribution the terms of the sampled labelings ($0.53$ nats) and the log-sum inequality on the others, whose total probability under $Q_{\mathrm{sign}}$ is below $3\times10^{-6}$ at the $95\%$ level, give a lower bound of about $0.59$ nats. In the other direction $\KLd{Q_{\mathrm{sign}}}{Q_\infty}=0.507$ nats.

Two yardsticks from the width sweep put these numbers in proportion. On the first ten inputs the divergence at $\beta=16$ is $0.301$ nats. This lies between the divergences of the centred networks of width~$2$ ($0.41$) and width~$4$ ($0.22$) from the same kernel code; it is $2.0$ times the mean effect of a random initial function ($0.152$), and $311$ times the distance of the centred network of width $1024$ from its limit. Infinite-width gradient descent is as far from the best tempered Bayesian learner as it is from a network with two to four hidden units. The Monte Carlo errors do not affect this reading: the standard errors of the divergences in Table~\ref{tab:gp-bayes} are at most $0.001$ nats and the jackknife estimate of their bias is at most $1.7\times10^{-3}$.

\subsection{What this shows and what it does not}

Three statements are supported by these data. First, the hypothesis that the departure of a finite network from its infinite-width limit decays as a power of the width holds for the centred network, with the exponent of a divergence that is quadratic in a fluctuation of order $H^{-1/2}$: $-0.97\pm0.08$ and $-0.99\pm0.08$ in the two directions, over a factor $32$ in width. It fails for the uncentred network measured against the same limit, where the divergence does not decay at all (exponent $+0.09\pm0.06$), and it is recovered with the same exponent ($-0.96\pm0.09$) when each uncentred network is compared with kernel gradient descent started from its own initial function. Second, beyond a width of about one hundred the distance from the limit is the randomness of the kernel at initialization and not feature learning: the part that the linearization misses decays as $H^{-1.81}$ and is $4\%$ of the kernel term at width $1024$. In the vocabulary of the conservation law, at these widths it is the seed that moves mass between labelings, and the training of the features does not. Third, gradient descent and Bayesian inference at infinite width are two different codes. The smallest divergence over seven temperatures is $0.370$ nats, $4.5\%$ of $n\ln2$; the tempered Bayesian code reproduces $90\%$ of the bias of the kernel code; and the untempered one, $\beta=1$, is $2.662$ nats away. ``Almost a Bayesian sampler'' is a fair summary at this size, on the condition that the temperature is fitted, and the residual is not removed by width.

The evidence has the following limits. There is one input set in three dimensions, with $n=10$ for the width sweep and $n=12$ for the comparison of the limits. There is one architecture, with one hidden layer and erf units, chosen because~\eqref{eq:gp-kernels} is in closed form. There is one training length: both the kernel code and the best $\beta$ are those of a learner stopped after $60$ steps, and we did not measure how they move with the number of steps. There are three seeds, so each standard error of a slope has two degrees of freedom, and the widths stop at $1024$. Below width $32$ the curves are not straight, and below width $16$ the feature term is as large as the kernel term. The grid in $\beta$ is coarse (factors of two), and two of its seven values were chosen after looking at the results. The NTK parametrization is the one in which the limit is a kernel method; where the features keep moving at infinite width \citep{MeiMontanariNguyen2018,YangHu2021} the limit is a different object and nothing here applies to it. Finally, the distance between the two limits is measured at a single $n$: whether it grows in proportion to $n$, as $0.031$ nats per label would suggest, or saturates, cannot be decided from these data. The conjectures concern networks that learn features; what this experiment provides is the baseline against which their departure has to be measured, together with the observation that in the kernel regime the departure is noise.


% ==========================================================================================
% Experiment "dd"
% ==========================================================================================
% sec_dd.tex -- GENERATED by make_tex_dd.py from sec_dd.tpl.tex and results_dd.json; do not edit the numbers by hand.
\section{Double descent, read as a code}\label{sec:dd}

Sample-wise double descent, where more data temporarily hurt \citep{Nakkiran2020}, was described after Proposition~\ref{prop:curves} as an excursion of the learning curve whose area is charged to the redundancy. One point must be made before measuring anything. The code length $\CA(y^n\mid x^n)$ is a sum of non-negative terms and never decreases with $n$, for any learner and any data; there is no double descent \emph{of the code length}. What can be non-monotone is its increment $e_t$, the rate at which the code is written. A double descent is a stretch of the stream in which the learner writes more nats per example than it did earlier, and item~2 of Proposition~\ref{prop:curves} says that the nats written in any such stretch are part of $\Gamma_n$. The measurable quantity is therefore a price: how many nats does the interpolation peak cost? We measure it for a learner that is known to have such a peak, and we also ask whether the total code length is non-monotone in the number of parameters.

\subsection{Design}
All choices below were fixed before the runs. \emph{Source.} Inputs $x\sim\mathcal N(0,I_d)$ with $d=10$; a teacher $w^\ast$ uniform on the sphere; labels $y=\mathrm{sign}(w^\ast\!\cdot x)$, flipped independently with probability $0.1$, so that $H^\ast=0.325$ nats per example. The noiseless source (no flips, $H^\ast=0$) is run on the same streams and features. \emph{Learner.} Random features $\phi(x)=\tanh(W[x,1])\in\mathbb R^{p}$ with $W\sim\mathcal N(0,1/d)$ fixed by the seed \citep{MeiMontanari2022}. After $m$ examples the learner computes the minimum-norm least-squares fit $\beta_m=\Phi_m^{+}y_{\le m}$ of the labels coded as $\pm1$, where $\Phi_m$ is the $m\times p$ feature matrix (``ridgeless'' regression; \citealp{Belkin2019,Hastie2022}), and predicts example $m+1$ with the logit $z=g\,\phi(x_{m+1})\cdot\beta_m$, with $g=2$ ($z=0$ for $m=0$). For $m\le p$ this fit interpolates the labels. It is a learner in the sense of Definition~\ref{def:learner}, so all the theorems apply to it. \emph{Control.} Ridge regression on the same features, $\beta_m=(\Phi_m^{\top}\Phi_m+\lambda mI)^{-1}\Phi_m^{\top}y_{\le m}$ with $\lambda=0.1$, which never interpolates. \emph{Sizes.} Stream length $n=200$; $p\in\{5, 10, 20, 40, 80, 160, 320\}$; $R=200$ independent streams (teacher, inputs and flips are those of the stream for every $p$; the features are drawn afresh for every pair of $p$ and stream). The uniform code costs $n\ln2=138.6$ nats and $nH^\ast=65.0$, so a learner that does not learn has $\Gamma_{200}=73.6$ nats.

\emph{Measured quantities.} We index the learning curve by the number $m$ of examples already seen: $e_{m+1}$ is the excess loss of the predictor trained on $m$ examples. Each stream gives its realised code length $\CA$, and $\Gamma_n$ is estimated by the mean of $\CA-nH^\ast$ over streams. For the learning curve of the noisy source we average the label of the query out exactly, that is, we record $\KLd{P(\cdot\mid x_{m+1})}{\pA(\cdot\mid z_{\le m},x_{m+1})}$ at the realised query; its mean over streams is an unbiased estimate of $e_{m+1}$, it is non-negative, and it has a smaller variance than the realised loss minus $H^\ast$ (the two estimates of $\Gamma_{200}$ differ by at most $0.5$ standard errors over the $14$ cells). The \emph{peak} is the maximum of the mean learning curve over $m\ge5$; the first steps are excluded because every learner starts at $e_1=\ln2-H^\ast=0.368$. The \emph{price of the peak} is defined as $\Gamma_{200}(\text{min-norm})-\Gamma_{200}(\text{ridge})$ for the same $p$ and the same streams. The \emph{window} of a threshold is $p/2\le m\le 2p$. The values $g=1$ and $g=4$ are reported as a sensitivity check. All prefixes are computed from Householder QR factorisations (one factorisation of $\Phi^{\top}$ serves all $m\le p$); on the first 2 streams of every $p$ the predictions agree with those of a direct pseudo-inverse to a relative error of $1.1\times10^{-12}$. The experiment took $48$\,s of CPU time.

\subsection{The code is written fastest at the interpolation threshold}
Figure~\ref{fig:dd-curves} shows the learning curves. For each of the 6 values of $p$ below $n$, the mean learning curve of the min-norm learner has its maximum exactly at $m=p$, the sample size at which the feature matrix is square; the same holds for the curve of medians over streams, and for the mean curves of the noiseless source and of $g=1$ and $g=4$. For $p=320$ the stream ends before the threshold, and the curve is still rising when it ends (its maximum over $m\ge5$ is at $m=198$, with height $0.77$). The ridge control has no peak: its maximum over $m\ge5$ lies between $m=5$ and $m=10$ for every $p$, with height $0.46$--$0.49$ nats.

\begin{figure}[htbp]\centering
\begin{tikzpicture}
\begin{axis}[width=\textwidth, height=7.4cm, xmode=log, ymode=log, xmin=1, xmax=199,
  ymin=0.1, ymax=100, xlabel={number of examples seen, $m$},
  ylabel={excess loss $e_{m+1}$ (nats per example)},
  xtick={1,2,5,10,20,40,80,160}, xticklabels={1,2,5,10,20,40,80,160},
  legend pos=north west, legend columns=3, legend cell align=left]
\draw[nnblue, densely dotted, line width=0.6pt] (axis cs:10,0.1) -- (axis cs:10,100);
\draw[nnorange, densely dotted, line width=0.6pt] (axis cs:40,0.1) -- (axis cs:40,100);
\draw[nnaqua, densely dotted, line width=0.6pt] (axis cs:160,0.1) -- (axis cs:160,100);
\addplot[nnblue, thick, mark=*, mark size=1.3pt, mark repeat=14, mark phase=7] coordinates {
(1,0.3991) (2,0.4753) (3,0.6067) (4,0.6046) (5,0.6562) (6,0.8646) (7,1.176) (8,1.304)
(9,1.692) (10,7.402) (11,1.888) (12,1.288) (13,0.687) (14,0.7209) (15,0.5545) (16,0.6206)
(17,0.4977) (18,0.5193) (19,0.4368) (20,0.3552) (21,0.3857) (22,0.4597) (23,0.2969) (24,0.3864)
(25,0.3229) (26,0.404) (27,0.322) (28,0.3276) (29,0.3059) (30,0.2891) (31,0.308) (32,0.2688)
(33,0.324) (34,0.3198) (35,0.2899) (36,0.3056) (37,0.2763) (38,0.2441) (39,0.268) (40,0.295)
(41,0.2574) (42,0.3205) (43,0.306) (44,0.2909) (45,0.2769) (46,0.2806) (47,0.2429) (48,0.2475)
(49,0.2294) (50,0.2239) (51,0.2669) (52,0.2677) (53,0.2991) (54,0.2534) (55,0.2293) (56,0.2652)
(57,0.2508) (58,0.2712) (59,0.2438) (60,0.243) (62,0.2254) (64,0.2816) (66,0.2029) (68,0.2042)
(70,0.2614) (72,0.2327) (74,0.292) (76,0.2171) (78,0.2282) (80,0.2745) (82,0.2522) (84,0.2178)
(86,0.2261) (88,0.2821) (90,0.232) (92,0.261) (94,0.2433) (96,0.2306) (98,0.247) (100,0.2177)
(102,0.2015) (104,0.2513) (106,0.2146) (108,0.2474) (110,0.2282) (112,0.2191) (114,0.2348) (116,0.2389)
(118,0.2165) (120,0.2224) (123,0.2145) (126,0.2277) (129,0.229) (132,0.2097) (135,0.2378) (138,0.2051)
(141,0.1906) (144,0.1997) (147,0.2104) (150,0.1826) (153,0.1895) (156,0.2215) (159,0.222) (162,0.2195)
(165,0.2161) (168,0.2373) (171,0.2197) (174,0.2287) (177,0.2066) (180,0.2186) (183,0.1806) (186,0.2064)
(189,0.1897) (192,0.2229) (195,0.2145) (198,0.2132)
};
\addlegendentry{$p=10$}
\addplot[nnblue, thick, densely dashed, forget plot] coordinates {
(1,0.3954) (2,0.4559) (3,0.5465) (4,0.4698) (5,0.4677) (6,0.4475) (7,0.4802) (8,0.3983)
(9,0.3666) (10,0.4521) (11,0.3549) (12,0.322) (13,0.3481) (14,0.3437) (15,0.2887) (16,0.3204)
(17,0.2996) (18,0.3529) (19,0.3225) (20,0.2769) (21,0.311) (22,0.3062) (23,0.2787) (24,0.3126)
(25,0.2888) (26,0.3146) (27,0.2777) (28,0.2905) (29,0.2613) (30,0.2592) (31,0.2683) (32,0.2562)
(33,0.2813) (34,0.2802) (35,0.2662) (36,0.271) (37,0.272) (38,0.2425) (39,0.2475) (40,0.2943)
(41,0.2517) (42,0.3051) (43,0.293) (44,0.2635) (45,0.2638) (46,0.2636) (47,0.2569) (48,0.2501)
(49,0.2484) (50,0.2494) (51,0.2655) (52,0.2713) (53,0.2818) (54,0.2436) (55,0.232) (56,0.2527)
(57,0.2582) (58,0.2634) (59,0.2436) (60,0.2584) (62,0.2492) (64,0.2682) (66,0.2146) (68,0.2248)
(70,0.2718) (72,0.2381) (74,0.2931) (76,0.236) (78,0.2401) (80,0.267) (82,0.2619) (84,0.2214)
(86,0.2393) (88,0.2831) (90,0.2464) (92,0.2695) (94,0.2671) (96,0.2456) (98,0.2452) (100,0.2428)
(102,0.2272) (104,0.2559) (106,0.229) (108,0.2528) (110,0.2494) (112,0.2458) (114,0.2551) (116,0.2535)
(118,0.2389) (120,0.2427) (123,0.2429) (126,0.2537) (129,0.2482) (132,0.235) (135,0.2581) (138,0.2212)
(141,0.2264) (144,0.2228) (147,0.2322) (150,0.2038) (153,0.218) (156,0.2387) (159,0.2393) (162,0.2456)
(165,0.2406) (168,0.2569) (171,0.2419) (174,0.2583) (177,0.2368) (180,0.2377) (183,0.2182) (186,0.2365)
(189,0.2151) (192,0.2494) (195,0.2314) (198,0.244)
};
\addplot[nnorange, thick, mark=square*, mark size=1.3pt, mark repeat=14, mark phase=7] coordinates {
(1,0.3712) (2,0.4181) (3,0.4593) (4,0.4227) (5,0.3924) (6,0.4991) (7,0.5428) (8,0.5466)
(9,0.5134) (10,0.6221) (11,0.4765) (12,0.445) (13,0.5193) (14,0.5429) (15,0.4992) (16,0.5557)
(17,0.4701) (18,0.6377) (19,0.6286) (20,0.4918) (21,0.561) (22,0.639) (23,0.6736) (24,0.6805)
(25,0.6214) (26,0.791) (27,0.8605) (28,0.7571) (29,0.832) (30,0.8893) (31,0.8777) (32,0.9051)
(33,1.026) (34,1.237) (35,1.511) (36,1.74) (37,2.179) (38,2.397) (39,3.439) (40,42.3)
(41,4.527) (42,4.256) (43,2.445) (44,1.93) (45,1.228) (46,1.35) (47,0.9385) (48,0.9359)
(49,0.8753) (50,0.5599) (51,0.7022) (52,0.7448) (53,0.7674) (54,0.6569) (55,0.7199) (56,0.7207)
(57,0.609) (58,0.4867) (59,0.4565) (60,0.5943) (62,0.5039) (64,0.5035) (66,0.4852) (68,0.3707)
(70,0.4014) (72,0.4066) (74,0.3443) (76,0.3061) (78,0.3703) (80,0.3086) (82,0.3685) (84,0.3033)
(86,0.2789) (88,0.319) (90,0.2813) (92,0.2795) (94,0.3452) (96,0.2883) (98,0.3297) (100,0.2401)
(102,0.2292) (104,0.3033) (106,0.2145) (108,0.252) (110,0.2474) (112,0.2238) (114,0.1987) (116,0.2738)
(118,0.2161) (120,0.2281) (123,0.1911) (126,0.2334) (129,0.2573) (132,0.1975) (135,0.2307) (138,0.2109)
(141,0.1697) (144,0.2347) (147,0.197) (150,0.1509) (153,0.2069) (156,0.2431) (159,0.2169) (162,0.1936)
(165,0.1895) (168,0.1964) (171,0.1888) (174,0.2045) (177,0.182) (180,0.1911) (183,0.1871) (186,0.1666)
(189,0.1817) (192,0.1908) (195,0.1982) (198,0.1937)
};
\addlegendentry{$p=40$}
\addplot[nnorange, thick, densely dashed, forget plot] coordinates {
(1,0.3709) (2,0.4159) (3,0.4528) (4,0.4099) (5,0.3776) (6,0.4514) (7,0.4731) (8,0.4489)
(9,0.3918) (10,0.4475) (11,0.3471) (12,0.3058) (13,0.3433) (14,0.3526) (15,0.3084) (16,0.3338)
(17,0.3031) (18,0.3694) (19,0.312) (20,0.2842) (21,0.28) (22,0.2896) (23,0.2583) (24,0.2973)
(25,0.2275) (26,0.3007) (27,0.2554) (28,0.2388) (29,0.2622) (30,0.2234) (31,0.2094) (32,0.1993)
(33,0.243) (34,0.2365) (35,0.2121) (36,0.2201) (37,0.217) (38,0.1986) (39,0.2116) (40,0.2272)
(41,0.189) (42,0.2543) (43,0.2542) (44,0.2188) (45,0.2088) (46,0.2059) (47,0.2018) (48,0.1859)
(49,0.1817) (50,0.1898) (51,0.1935) (52,0.206) (53,0.2017) (54,0.1956) (55,0.1842) (56,0.1872)
(57,0.1964) (58,0.2077) (59,0.1684) (60,0.2106) (62,0.1756) (64,0.1986) (66,0.1671) (68,0.1663)
(70,0.1844) (72,0.1623) (74,0.1961) (76,0.1392) (78,0.1668) (80,0.2031) (82,0.1838) (84,0.1657)
(86,0.171) (88,0.2075) (90,0.162) (92,0.1719) (94,0.1856) (96,0.158) (98,0.1609) (100,0.157)
(102,0.1473) (104,0.1875) (106,0.151) (108,0.1759) (110,0.1788) (112,0.1533) (114,0.1636) (116,0.1896)
(118,0.151) (120,0.1527) (123,0.1588) (126,0.1682) (129,0.183) (132,0.1511) (135,0.1766) (138,0.1669)
(141,0.1305) (144,0.1547) (147,0.1597) (150,0.136) (153,0.1571) (156,0.1624) (159,0.1595) (162,0.1508)
(165,0.1605) (168,0.1701) (171,0.1661) (174,0.1638) (177,0.153) (180,0.1627) (183,0.1524) (186,0.1517)
(189,0.1497) (192,0.169) (195,0.1475) (198,0.1614)
};
\addplot[nnaqua, thick, mark=triangle*, mark size=1.3pt, mark repeat=14, mark phase=7] coordinates {
(1,0.3526) (2,0.3946) (3,0.4398) (4,0.4013) (5,0.4045) (6,0.4573) (7,0.4753) (8,0.4686)
(9,0.5034) (10,0.5303) (11,0.475) (12,0.4192) (13,0.4735) (14,0.4804) (15,0.4332) (16,0.4702)
(17,0.4008) (18,0.4753) (19,0.3652) (20,0.3547) (21,0.3651) (22,0.3841) (23,0.3721) (24,0.3556)
(25,0.3019) (26,0.4072) (27,0.3658) (28,0.3685) (29,0.3195) (30,0.294) (31,0.3792) (32,0.2983)
(33,0.3089) (34,0.3497) (35,0.2627) (36,0.3134) (37,0.3148) (38,0.3122) (39,0.3246) (40,0.3921)
(41,0.3267) (42,0.3889) (43,0.3677) (44,0.3494) (45,0.3022) (46,0.3314) (47,0.322) (48,0.2913)
(49,0.276) (50,0.3044) (51,0.3192) (52,0.3593) (53,0.3691) (54,0.3112) (55,0.4509) (56,0.3094)
(57,0.3356) (58,0.3317) (59,0.3348) (60,0.3735) (62,0.4084) (64,0.4108) (66,0.3826) (68,0.3502)
(70,0.4541) (72,0.4345) (74,0.4707) (76,0.4213) (78,0.4096) (80,0.5334) (82,0.5798) (84,0.4825)
(86,0.5144) (88,0.5281) (90,0.464) (92,0.5396) (94,0.6248) (96,0.6332) (98,0.4883) (100,0.6698)
(102,0.631) (104,0.5782) (106,0.7001) (108,0.7043) (110,0.6989) (112,0.6995) (114,0.6791) (116,0.7981)
(118,0.7895) (120,0.8884) (123,0.6927) (126,0.9773) (129,1.086) (132,0.8757) (135,1.18) (138,1.426)
(141,1.537) (144,1.823) (147,1.642) (150,2.537) (153,3.183) (154,3.447) (155,3.154) (156,3.642)
(157,5.347) (158,7.124) (159,12.93) (160,58.2) (161,8.185) (162,6.02) (163,4.673) (164,3.646)
(165,3.073) (166,2.943) (168,2.395) (171,1.903) (174,1.446) (177,1.532) (180,1.376) (183,1.401)
(186,1.231) (189,0.9873) (192,1.05) (195,0.8696) (198,0.962)
};
\addlegendentry{$p=160$}
\addplot[nnaqua, thick, densely dashed, forget plot] coordinates {
(1,0.3526) (2,0.3942) (3,0.4383) (4,0.3988) (5,0.4002) (6,0.447) (7,0.4605) (8,0.4421)
(9,0.4682) (10,0.4777) (11,0.4277) (12,0.3573) (13,0.4139) (14,0.4081) (15,0.3591) (16,0.3888)
(17,0.349) (18,0.4222) (19,0.3093) (20,0.3083) (21,0.3119) (22,0.3144) (23,0.2805) (24,0.3118)
(25,0.2513) (26,0.3229) (27,0.2815) (28,0.2552) (29,0.267) (30,0.2303) (31,0.2482) (32,0.2021)
(33,0.2455) (34,0.2516) (35,0.1939) (36,0.2217) (37,0.2278) (38,0.2042) (39,0.2187) (40,0.255)
(41,0.2064) (42,0.2492) (43,0.2321) (44,0.2204) (45,0.1924) (46,0.2015) (47,0.2015) (48,0.1821)
(49,0.1801) (50,0.1929) (51,0.1974) (52,0.2016) (53,0.199) (54,0.1791) (55,0.203) (56,0.1759)
(57,0.1872) (58,0.1808) (59,0.164) (60,0.2002) (62,0.175) (64,0.217) (66,0.144) (68,0.1671)
(70,0.1826) (72,0.1606) (74,0.1912) (76,0.1423) (78,0.1584) (80,0.1971) (82,0.1741) (84,0.1703)
(86,0.1726) (88,0.197) (90,0.1605) (92,0.1743) (94,0.1797) (96,0.1461) (98,0.1477) (100,0.1431)
(102,0.1502) (104,0.1755) (106,0.1414) (108,0.1685) (110,0.1734) (112,0.1534) (114,0.1597) (116,0.175)
(118,0.1267) (120,0.1477) (123,0.146) (126,0.1655) (129,0.1798) (132,0.143) (135,0.1663) (138,0.1541)
(141,0.1246) (144,0.1471) (147,0.1461) (150,0.1394) (153,0.1445) (154,0.161) (155,0.1497) (156,0.1438)
(157,0.1471) (158,0.1538) (159,0.1574) (160,0.1533) (161,0.1704) (162,0.1434) (163,0.1396) (164,0.1651)
(165,0.1489) (166,0.1438) (168,0.1538) (171,0.1415) (174,0.1603) (177,0.1423) (180,0.1459) (183,0.1353)
(186,0.1425) (189,0.1349) (192,0.1592) (195,0.1322) (198,0.1428)
};
\addplot[nnyellow, thick, mark=diamond*, mark size=1.3pt, mark repeat=14, mark phase=7] coordinates {
(1,0.3521) (2,0.3983) (3,0.4297) (4,0.3935) (5,0.3964) (6,0.4442) (7,0.4771) (8,0.4586)
(9,0.5119) (10,0.5101) (11,0.4509) (12,0.3993) (13,0.411) (14,0.4563) (15,0.4366) (16,0.4371)
(17,0.3838) (18,0.4433) (19,0.3697) (20,0.322) (21,0.3715) (22,0.3667) (23,0.3189) (24,0.3325)
(25,0.2954) (26,0.3817) (27,0.34) (28,0.3135) (29,0.2954) (30,0.2743) (31,0.2803) (32,0.255)
(33,0.258) (34,0.2922) (35,0.2304) (36,0.2906) (37,0.2967) (38,0.2356) (39,0.2813) (40,0.2986)
(41,0.2946) (42,0.2611) (43,0.3172) (44,0.3351) (45,0.2649) (46,0.2863) (47,0.2745) (48,0.2566)
(49,0.2128) (50,0.276) (51,0.2701) (52,0.2959) (53,0.3086) (54,0.2064) (55,0.2815) (56,0.2342)
(57,0.25) (58,0.2989) (59,0.2456) (60,0.3165) (62,0.2936) (64,0.2924) (66,0.2487) (68,0.267)
(70,0.2894) (72,0.3216) (74,0.3328) (76,0.2487) (78,0.2863) (80,0.3082) (82,0.3443) (84,0.2962)
(86,0.3075) (88,0.398) (90,0.2751) (92,0.2664) (94,0.3693) (96,0.2933) (98,0.3657) (100,0.3889)
(102,0.3427) (104,0.3266) (106,0.3292) (108,0.3616) (110,0.3558) (112,0.4122) (114,0.3781) (116,0.3866)
(118,0.4236) (120,0.3227) (123,0.3092) (126,0.4629) (129,0.4125) (132,0.4354) (135,0.4478) (138,0.412)
(141,0.4587) (144,0.4837) (147,0.3321) (150,0.4306) (153,0.4348) (156,0.5025) (159,0.4537) (162,0.4784)
(165,0.5432) (168,0.5806) (171,0.4861) (174,0.6173) (177,0.4698) (180,0.6502) (183,0.5931) (186,0.6279)
(189,0.6287) (192,0.7361) (195,0.5663) (198,0.7651)
};
\addlegendentry{$p=320$}
\addplot[nnyellow, thick, densely dashed, forget plot] coordinates {
(1,0.352) (2,0.3981) (3,0.4291) (4,0.3923) (5,0.3944) (6,0.4392) (7,0.4704) (8,0.4468)
(9,0.4932) (10,0.4827) (11,0.4284) (12,0.3725) (13,0.3871) (14,0.4211) (15,0.3942) (16,0.3957)
(17,0.3541) (18,0.4212) (19,0.3348) (20,0.2989) (21,0.3422) (22,0.3248) (23,0.2829) (24,0.3075)
(25,0.2541) (26,0.3307) (27,0.2934) (28,0.2577) (29,0.2673) (30,0.237) (31,0.2274) (32,0.21)
(33,0.2325) (34,0.2441) (35,0.2038) (36,0.2381) (37,0.2408) (38,0.1879) (39,0.2203) (40,0.247)
(41,0.2157) (42,0.229) (43,0.2543) (44,0.2465) (45,0.2059) (46,0.214) (47,0.2112) (48,0.2002)
(49,0.1722) (50,0.2004) (51,0.1959) (52,0.2022) (53,0.2188) (54,0.1622) (55,0.1917) (56,0.1766)
(57,0.1876) (58,0.1973) (59,0.1706) (60,0.209) (62,0.193) (64,0.2116) (66,0.16) (68,0.1611)
(70,0.1873) (72,0.1726) (74,0.2082) (76,0.1346) (78,0.1714) (80,0.1953) (82,0.1721) (84,0.1685)
(86,0.1724) (88,0.2044) (90,0.1684) (92,0.1654) (94,0.1772) (96,0.1444) (98,0.1685) (100,0.1506)
(102,0.1567) (104,0.1692) (106,0.1361) (108,0.1707) (110,0.1667) (112,0.1551) (114,0.168) (116,0.1776)
(118,0.1468) (120,0.1486) (123,0.1376) (126,0.1621) (129,0.1828) (132,0.1498) (135,0.1807) (138,0.1646)
(141,0.1298) (144,0.1457) (147,0.1477) (150,0.1201) (153,0.132) (156,0.156) (159,0.1586) (162,0.1459)
(165,0.1514) (168,0.1588) (171,0.1428) (174,0.1674) (177,0.131) (180,0.1566) (183,0.1349) (186,0.1426)
(189,0.1353) (192,0.1618) (195,0.1369) (198,0.1473)
};
\addlegendimage{black, thick}\addlegendentry{min-norm}
\addlegendimage{black, thick, densely dashed}\addlegendentry{ridge}
\end{axis}
\end{tikzpicture}
\caption{Learning curves $e_{m+1}$ (excess log loss of the predictor trained on $m$ examples, nats per example, label of the query averaged out) of the minimum-norm random-features learner (solid, with marks) and of the ridge control (dashed, same colour) for $p\in\{10, 40, 160, 320\}$, noisy source, $g=2$. Means over $200$ streams; no error bars are drawn because the mean at the peak is dominated by a few streams (see Table~\ref{tab:dd-main} for standard errors and medians). Vertical dotted lines: $m=p$ (for $p=320$ the threshold lies beyond the end of the stream). All $m\le60$ are plotted, then every second and, beyond $m=120$, every third value, and all $m$ within $6$ of $p$.\label{fig:dd-curves}}
\end{figure}

The height of the peak is where the reading in nats becomes informative (Table~\ref{tab:dd-main}). The median over streams of the excess loss at $m=p$ is between $0.54$ and $6.15$ nats, to be compared with the $0.69$ nats of a coin flip. The mean is between $4.0$ and $58.2$ nats, $6$ to $24$ times the median, with standard errors of a fifth to a half of the mean. At the threshold a typical stream pays about one nat or a few nats for one label; depending on $p$, one stream in ten pays more than $9.1$ to $68.0$ nats, and the worst stream pays between $170$ and $4165$ nats (label-averaged excess loss). The largest realised loss on a single example in the whole experiment is $4628$ nats ($p=40$, $m=40$), which is $33$ times the uniform code of the entire stream; the largest single loss of the ridge control is $6.32$ nats.

\begin{table}[htbp]\centering
\caption{Double descent in nats: noisy source, $g=2$, $n=200$, $R=200$ streams. Peak: position $m^\ast$ and height of the maximum of the mean learning curve of the min-norm learner over $m\ge5$ (nats per example; mean $\pm$ standard error, and median over streams, at $m^\ast$). $\Gamma_{200}$: redundancy (nats; the value for no learning is $73.6$). Price: $\Gamma_{200}(\text{min-norm})-\Gamma_{200}(\text{ridge})$ on the same streams. Last column: share of the redundancy spent in the window $p/2\le m\le2p$ by the min-norm learner (in brackets: by the ridge control). $^{\dagger}$Threshold beyond the end of the stream.\label{tab:dd-main}}
\small\setlength{\tabcolsep}{2.9pt}
\begin{tabular}{rrrrrrrrrr}
\toprule
 & \multicolumn{3}{c}{peak of the learning curve} & \multicolumn{2}{c}{$\Gamma_{200}$, min-norm} & $\Gamma_{200}$, ridge & \multicolumn{2}{c}{price of the peak} & window\\
\cmidrule(lr){2-4}\cmidrule(lr){5-6}\cmidrule(lr){7-7}\cmidrule(lr){8-9}\cmidrule(lr){10-10}
$p$ & $m^\ast$ & mean $\pm$ s.e. & median & mean $\pm$ s.e. & median & mean $\pm$ s.e. & mean $\pm$ s.e. & median & share\\
\midrule
5 & 5 & $4.04\pm0.98$ & 0.54 & $70.7\pm1.6$ & 68.2 & $62.0\pm0.6$ & $8.6\pm1.5$ & 3.9 & 16\% (6\%)\\
10 & 10 & $7.40\pm1.56$ & 1.24 & $66.7\pm2.2$ & 60.3 & $52.2\pm0.7$ & $14.5\pm2.0$ & 6.4 & 32\% (11\%)\\
20 & 20 & $21.29\pm6.51$ & 2.13 & $91.6\pm7.6$ & 68.1 & $43.3\pm0.6$ & $48.2\pm7.6$ & 24.6 & 59\% (20\%)\\
40 & 40 & $42.30\pm21.17$ & 1.75 & $139.5\pm23.7$ & 92.1 & $40.0\pm0.6$ & $99.5\pm23.7$ & 51.1 & 73\% (32\%)\\
80 & 80 & $23.40\pm4.81$ & 3.63 & $175.8\pm8.8$ & 156.4 & $39.2\pm0.6$ & $136.6\pm8.7$ & 113.3 & 83\% (52\%)\\
160 & 160 & $58.20\pm21.30$ & 6.15 & $269.5\pm24.1$ & 212.5 & $39.8\pm0.7$ & $229.7\pm24.0$ & 176.2 & 89\% (47\%)\\
320 & 198$^{\dagger}$ & $0.77\pm0.08$ & 0.23 & $81.7\pm1.5$ & 79.3 & $40.4\pm0.7$ & $41.3\pm1.1$ & 39.0 & 29\% (15\%)\\
\bottomrule
\end{tabular}
\end{table}

\subsection{The price of the peak, and the model-wise curve}
Figure~\ref{fig:dd-code} (left) shows the same runs as cumulative codes. The curves are non-decreasing, as they must be; the double descent appears as a step at $t=p+1$. Item~2 of Proposition~\ref{prop:curves} holds by construction, since the nats written in the window are part of the total. What the experiment adds is the size of the part: the window $p/2\le m\le2p$ contains $16\%$ to $89\%$ of the redundancy of the min-norm learner as $p$ goes from $5$ to $160$, against $6\%$ to $52\%$ for the ridge control on the same windows.

The price of the peak is positive for every $p$. Its median over streams grows monotonically from $3.9$ nats at $p=5$ to $176$ nats at $p=160$, and its mean from $8.6$ to $230$ nats; for $20\le p\le160$ between $90\%$ and $96\%$ of the mean price is paid inside the window. Divided by $p$, the median price is between $0.64$ and $1.42$ nats per feature (mean: $1.4$ to $2.5$), so on this source and at $g=2$ the interpolation threshold costs of the order of one nat per feature; six values of $p$ do not establish a proportionality, and the window of $p=160$ is cut by the end of the stream. The min-norm learner pays more than the ridge control in at least $83\%$ of the streams for every $p$, and in all $200$ streams for $p\in\{40, 80, 160, 320\}$. For $p=320$, where no threshold is crossed, the difference is $41.3$ nats, of which $23.7$ are paid before the window: an interpolating fit with $g=2$ is overconfident also away from the threshold, and the ``price of the peak'' as we defined it includes this.

\begin{figure}[htbp]\centering
\begin{tikzpicture}
\begin{axis}[name=left, width=0.48\textwidth, height=6.4cm, xmin=0, xmax=200, ymin=0, ymax=275,
  xlabel={number of examples coded, $t$}, ylabel={cumulative redundancy $\Gamma_t$ (nats)},
  legend pos=north west, legend cell align=left]
\addplot[nnblue, thick, mark=*, mark size=1.3pt, mark repeat=20, mark phase=10] coordinates {
(1,0.3681) (3,1.278) (5,2.528) (7,4.086) (8,5.319) (9,6.724) (10,8.574) (11,16.78)
(12,18.64) (13,19.92) (14,20.63) (15,21.33) (17,22.49) (19,23.47) (21,24.26) (23,25.15)
(25,25.75) (27,26.52) (29,27.11) (31,27.64) (33,28.19) (35,28.83) (37,29.43) (39,30.06)
(41,30.64) (43,31.25) (45,31.87) (47,32.39) (49,32.85) (51,33.27) (53,33.78) (55,34.3)
(57,34.76) (59,35.28) (61,35.77) (63,36.29) (65,36.81) (67,37.31) (69,37.78) (71,38.25)
(73,38.76) (75,39.31) (77,39.7) (79,40.15) (81,40.7) (83,41.25) (85,41.73) (87,42.18)
(89,42.71) (91,43.08) (93,43.56) (95,44.02) (97,44.45) (99,44.93) (101,45.33) (103,45.66)
(105,46.03) (107,46.47) (109,46.91) (111,47.43) (113,47.82) (115,48.32) (117,48.79) (119,49.21)
(121,49.65) (123,50.05) (125,50.42) (127,50.87) (129,51.32) (131,51.73) (133,52.13) (135,52.55)
(137,52.99) (139,53.47) (141,53.94) (143,54.42) (145,54.86) (147,55.3) (149,55.75) (151,56.06)
(153,56.59) (155,57.05) (157,57.47) (159,57.9) (161,58.34) (163,58.88) (165,59.21) (167,59.6)
(169,60.03) (171,60.47) (173,60.89) (175,61.32) (177,61.84) (179,62.29) (181,62.68) (183,63.09)
(185,63.53) (187,64) (189,64.39) (191,64.78) (193,65.2) (195,65.56) (197,66.02) (199,66.43)
(200,66.71)
};
\addlegendentry{$p=10$}
\addplot[nnblue, thick, densely dashed, forget plot] coordinates {
(1,0.3681) (3,1.25) (5,2.297) (7,3.249) (8,3.718) (9,4.093) (10,4.472) (11,4.935)
(12,5.247) (13,5.559) (14,5.899) (15,6.258) (17,6.816) (19,7.44) (21,8.031) (23,8.664)
(25,9.192) (27,9.84) (29,10.37) (31,10.86) (33,11.36) (35,11.93) (37,12.45) (39,13.04)
(41,13.61) (43,14.17) (45,14.73) (47,15.24) (49,15.71) (51,16.19) (53,16.71) (55,17.22)
(57,17.68) (59,18.21) (61,18.71) (63,19.22) (65,19.74) (67,20.25) (69,20.75) (71,21.25)
(73,21.77) (75,22.32) (77,22.77) (79,23.24) (81,23.76) (83,24.28) (85,24.79) (87,25.27)
(89,25.81) (91,26.23) (93,26.73) (95,27.25) (97,27.7) (99,28.2) (101,28.68) (103,29.07)
(105,29.51) (107,29.99) (109,30.47) (111,31.02) (113,31.46) (115,32) (117,32.51) (119,32.99)
(121,33.44) (123,33.89) (125,34.33) (127,34.8) (129,35.29) (131,35.75) (133,36.19) (135,36.67)
(137,37.15) (139,37.65) (141,38.17) (143,38.69) (145,39.17) (147,39.65) (149,40.13) (151,40.5)
(153,41.04) (155,41.52) (157,41.98) (159,42.44) (161,42.92) (163,43.48) (165,43.89) (167,44.33)
(169,44.81) (171,45.28) (173,45.75) (175,46.24) (177,46.78) (179,47.29) (181,47.72) (183,48.17)
(185,48.65) (187,49.17) (189,49.64) (191,50.07) (193,50.56) (195,50.99) (197,51.48) (199,51.93)
(200,52.23)
};
\addplot[nnorange, thick, mark=square*, mark size=1.3pt, mark repeat=20, mark phase=10] coordinates {
(1,0.3681) (3,1.194) (5,2.059) (7,2.991) (9,4.116) (11,5.274) (13,6.092) (15,7.143)
(17,8.206) (19,9.285) (21,10.33) (23,11.56) (25,12.71) (27,14.3) (29,16.01) (31,17.6)
(33,19.22) (35,21.44) (37,24.76) (38,26.86) (39,29.13) (40,32.98) (41,77.45) (42,81.94)
(43,86.87) (44,89.41) (45,91.16) (47,93.73) (49,95.82) (51,97.21) (53,98.7) (55,100.2)
(57,101.5) (59,102.5) (61,103.5) (63,104.5) (65,105.6) (67,106.5) (69,107.3) (71,108.1)
(73,109) (75,109.8) (77,110.4) (79,111.2) (81,111.9) (83,112.7) (85,113.3) (87,113.9)
(89,114.5) (91,114.9) (93,115.4) (95,116) (97,116.5) (99,117.1) (101,117.6) (103,118)
(105,118.6) (107,119) (109,119.4) (111,120.1) (113,120.5) (115,121) (117,121.5) (119,121.9)
(121,122.5) (123,122.9) (125,123.3) (127,123.7) (129,124.2) (131,124.7) (133,125.1) (135,125.5)
(137,125.9) (139,126.4) (141,126.9) (143,127.3) (145,127.8) (147,128.2) (149,128.7) (151,129.1)
(153,129.6) (155,130.1) (157,130.5) (159,131.1) (161,131.4) (163,131.9) (165,132.3) (167,132.6)
(169,133) (171,133.5) (173,133.8) (175,134.3) (177,134.8) (179,135.2) (181,135.6) (183,136.1)
(185,136.5) (187,137) (189,137.4) (191,137.7) (193,138.1) (195,138.4) (197,138.8) (199,139.2)
(200,139.5)
};
\addlegendentry{$p=40$}
\addplot[nnorange, thick, densely dashed, forget plot] coordinates {
(1,0.3681) (3,1.191) (5,2.038) (7,2.909) (9,3.855) (11,4.705) (13,5.313) (15,5.974)
(17,6.618) (19,7.267) (21,7.862) (23,8.48) (25,8.937) (27,9.524) (29,9.994) (31,10.43)
(33,10.78) (35,11.24) (37,11.67) (38,11.95) (39,12.17) (40,12.43) (41,12.65) (42,12.85)
(43,13.1) (44,13.38) (45,13.63) (47,14.01) (49,14.42) (51,14.78) (53,15.14) (55,15.53)
(57,15.88) (59,16.28) (61,16.66) (63,17.03) (65,17.42) (67,17.77) (69,18.17) (71,18.49)
(73,18.84) (75,19.23) (77,19.5) (79,19.8) (81,20.22) (83,20.6) (85,20.99) (87,21.3)
(89,21.71) (91,21.95) (93,22.23) (95,22.57) (97,22.89) (99,23.25) (101,23.52) (103,23.76)
(105,24.05) (107,24.41) (109,24.71) (111,25.16) (113,25.42) (115,25.79) (117,26.16) (119,26.49)
(121,26.85) (123,27.16) (125,27.41) (127,27.74) (129,28.06) (131,28.43) (133,28.67) (135,29.02)
(137,29.33) (139,29.71) (141,30.03) (143,30.39) (145,30.75) (147,31.12) (149,31.49) (151,31.78)
(153,32.16) (155,32.55) (157,32.85) (159,33.22) (161,33.52) (163,33.88) (165,34.15) (167,34.43)
(169,34.79) (171,35.14) (173,35.46) (175,35.78) (177,36.17) (179,36.5) (181,36.84) (183,37.19)
(185,37.56) (187,37.92) (189,38.25) (191,38.55) (193,38.88) (195,39.12) (197,39.45) (199,39.76)
(200,40.01)
};
\addplot[nnaqua, thick, mark=triangle*, mark size=1.3pt, mark repeat=20, mark phase=10] coordinates {
(1,0.3681) (3,1.126) (5,1.972) (7,2.864) (9,3.862) (11,4.905) (13,5.764) (15,6.717)
(17,7.6) (19,8.481) (21,9.185) (23,9.997) (25,10.6) (27,11.36) (29,12.02) (31,12.57)
(33,13.15) (35,13.78) (37,14.3) (39,15.02) (41,15.75) (43,16.46) (45,17.23) (47,17.84)
(49,18.48) (51,19.01) (53,19.6) (55,20.24) (57,20.99) (59,21.69) (61,22.27) (63,23.13)
(65,23.92) (67,24.8) (69,25.77) (71,26.55) (73,27.42) (75,28.24) (77,29.07) (79,29.88)
(81,31.04) (83,32.22) (85,33.25) (87,34.13) (89,35.38) (91,36.16) (93,37.23) (95,38.3)
(97,39.51) (99,40.54) (101,41.57) (103,42.69) (105,43.92) (107,45.32) (109,46.68) (111,48.1)
(113,49.53) (115,50.91) (117,52.36) (119,54.2) (121,55.67) (123,57.23) (125,58.59) (127,60.51)
(129,62.36) (131,64.61) (133,66.31) (135,68.48) (137,70.99) (139,73.74) (141,76.62) (143,80.02)
(145,83.75) (147,86.98) (149,90.72) (151,95.52) (153,100.3) (155,107.1) (157,114.7) (158,119.8)
(159,126.8) (160,140.3) (161,196.8) (162,204.6) (163,210.5) (164,214.8) (165,218.2) (167,224.1)
(169,228.6) (171,233.1) (173,236.6) (175,239.9) (177,243.1) (179,246.5) (181,249.2) (183,251.9)
(185,254.3) (187,256.5) (189,258.9) (191,261.1) (193,263) (195,264.7) (197,266.7) (199,268.5)
(200,269.5)
};
\addlegendentry{$p=160$}
\addplot[nnaqua, thick, densely dashed, forget plot] coordinates {
(1,0.3681) (3,1.126) (5,1.967) (7,2.847) (9,3.797) (11,4.749) (13,5.517) (15,6.331)
(17,7.05) (19,7.813) (21,8.422) (23,9.117) (25,9.598) (27,10.22) (29,10.71) (31,11.15)
(33,11.53) (35,12) (37,12.4) (39,12.94) (41,13.45) (43,13.91) (45,14.43) (47,14.8)
(49,15.2) (51,15.55) (53,15.92) (55,16.3) (57,16.67) (59,17.04) (61,17.37) (63,17.75)
(65,18.15) (67,18.49) (69,18.93) (71,19.25) (73,19.61) (75,19.99) (77,20.27) (79,20.56)
(81,20.97) (83,21.34) (85,21.73) (87,22.06) (89,22.46) (91,22.67) (93,22.96) (95,23.28)
(97,23.57) (99,23.92) (101,24.17) (103,24.4) (105,24.68) (107,25.03) (109,25.29) (111,25.74)
(113,26.02) (115,26.37) (117,26.74) (119,27.04) (121,27.38) (123,27.68) (125,27.88) (127,28.22)
(129,28.52) (131,28.86) (133,29.07) (135,29.38) (137,29.66) (139,30.02) (141,30.35) (143,30.69)
(145,31.02) (147,31.38) (149,31.7) (151,31.97) (153,32.35) (155,32.74) (157,33.03) (158,33.21)
(159,33.39) (160,33.53) (161,33.68) (162,33.92) (163,34.03) (164,34.12) (165,34.27) (167,34.54)
(169,34.87) (171,35.2) (173,35.47) (175,35.78) (177,36.15) (179,36.49) (181,36.8) (183,37.09)
(185,37.42) (187,37.78) (189,38.09) (191,38.38) (193,38.69) (195,38.92) (197,39.21) (199,39.5)
(200,39.76)
};
\addplot[nnyellow, thick, mark=diamond*, mark size=1.3pt, mark repeat=20, mark phase=10] coordinates {
(1,0.3681) (3,1.134) (5,1.972) (7,2.833) (9,3.823) (11,4.836) (13,5.661) (15,6.527)
(17,7.383) (19,8.192) (21,8.891) (23,9.718) (25,10.26) (27,11.01) (29,11.65) (31,12.12)
(33,12.61) (35,13.13) (37,13.61) (39,14.26) (41,14.89) (43,15.42) (45,16.21) (47,16.74)
(49,17.28) (51,17.74) (53,18.24) (55,18.78) (57,19.25) (59,19.88) (61,20.35) (63,21.01)
(65,21.62) (67,22.21) (69,22.89) (71,23.48) (73,24.18) (75,24.81) (77,25.32) (79,25.91)
(81,26.55) (83,27.34) (85,28.01) (87,28.69) (89,29.43) (91,29.92) (93,30.58) (95,31.24)
(97,31.79) (99,32.51) (101,33.08) (103,33.68) (105,34.29) (107,35.12) (109,35.79) (111,36.5)
(113,37.33) (115,38.15) (117,38.83) (119,39.7) (121,40.43) (123,41.15) (125,41.83) (127,42.7)
(129,43.53) (131,44.33) (133,44.98) (135,45.92) (137,46.72) (139,47.74) (141,48.65) (143,49.58)
(145,50.68) (147,51.63) (149,52.43) (151,53.32) (153,54.63) (155,55.64) (157,56.36) (159,57.39)
(161,58.34) (163,59.33) (165,60.27) (167,61.48) (169,62.73) (171,63.8) (173,64.79) (175,65.97)
(177,67.32) (179,68.39) (181,69.69) (183,70.9) (185,71.94) (187,73.25) (189,74.46) (191,75.71)
(193,77.13) (195,78.22) (197,79.47) (199,80.94) (200,81.71)
};
\addlegendentry{$p=320$}
\addplot[nnyellow, thick, densely dashed, forget plot] coordinates {
(1,0.3681) (3,1.134) (5,1.97) (7,2.826) (9,3.795) (11,4.76) (13,5.539) (15,6.343)
(17,7.113) (19,7.868) (21,8.504) (23,9.261) (25,9.737) (27,10.38) (29,10.92) (31,11.34)
(33,11.73) (35,12.18) (37,12.59) (39,13.14) (41,13.65) (43,14.08) (45,14.68) (47,15.07)
(49,15.5) (51,15.86) (53,16.21) (55,16.59) (57,16.93) (59,17.35) (61,17.68) (63,18.09)
(65,18.48) (67,18.84) (69,19.27) (71,19.61) (73,20.01) (75,20.41) (77,20.66) (79,20.99)
(81,21.43) (83,21.81) (85,22.2) (87,22.55) (89,22.95) (91,23.19) (93,23.48) (95,23.78)
(97,24.06) (99,24.43) (101,24.68) (103,24.91) (105,25.15) (107,25.53) (109,25.81) (111,26.25)
(113,26.53) (115,26.9) (117,27.23) (119,27.54) (121,27.89) (123,28.18) (125,28.39) (127,28.71)
(129,29.02) (131,29.39) (133,29.6) (135,29.92) (137,30.23) (139,30.65) (141,30.95) (143,31.27)
(145,31.62) (147,31.96) (149,32.27) (151,32.54) (153,32.95) (155,33.31) (157,33.59) (159,33.96)
(161,34.24) (163,34.59) (165,34.84) (167,35.1) (169,35.47) (171,35.79) (173,36.07) (175,36.39)
(177,36.78) (179,37.09) (181,37.4) (183,37.73) (185,38.06) (187,38.42) (189,38.73) (191,38.99)
(193,39.31) (195,39.53) (197,39.83) (199,40.12) (200,40.37)
};
\addplot[nngray, dotted, thick, domain=0:200, samples=2] {0.36806*x};
\addlegendentry{no learning}
\end{axis}
\begin{axis}[at={(left.outer north east)}, anchor=outer north west, xshift=0.02\textwidth,
  width=0.48\textwidth, height=6.4cm, xmode=log, xmin=4, xmax=400, ymin=0, ymax=350,
  xtick={5,10,20,40,80,160,320}, xticklabels={5,10,20,40,80,160,320},
  xlabel={number of features, $p$}, ylabel={redundancy $\Gamma_{200}$ (nats)},
  legend pos=north west, legend cell align=left]
\addplot[nnblue, thick, mark=*, mark size=1.5pt, error bars/.cd, y dir=both, y explicit] coordinates {
(5,70.66) +- (0,1.643) (10,66.71) +- (0,2.243) (20,91.56) +- (0,7.602) (40,139.5) +- (0,23.65) (80,175.8) +- (0,8.797) (160,269.5) +- (0,24.08) (320,81.71) +- (0,1.532)
};
\addlegendentry{min-norm, mean}
\addplot[nnorange, thick, densely dashed, mark=square*, mark size=1.4pt, mark options={solid}, error bars/.cd, y dir=both, y explicit] coordinates {
(5,62.04) +- (0,0.5897) (10,52.23) +- (0,0.7269) (20,43.35) +- (0,0.6189) (40,40.01) +- (0,0.6289) (80,39.23) +- (0,0.6439) (160,39.76) +- (0,0.6847) (320,40.37) +- (0,0.7184)
};
\addlegendentry{ridge, mean}
\addplot[nnaqua, thick, dotted, mark=triangle*, mark size=1.7pt, mark options={solid}] coordinates {
(5,68.23) (10,60.32) (20,68.08) (40,92.15) (80,156.4) (160,212.5) (320,79.31)
};
\addlegendentry{min-norm, median}
\addplot[nngray, dotted, thick, domain=4:400, samples=2] {73.6128};
\addlegendentry{no learning}
\end{axis}
\end{tikzpicture}
\caption{\textbf{Left}: cumulative redundancy $\Gamma_t$ (mean over $200$ streams of the realised code length minus $tH^\ast$, nats) against the number $t$ of examples coded, for the learners of Figure~\ref{fig:dd-curves} (solid with marks: min-norm; dashed, same colour: ridge). \textbf{Right}: redundancy $\Gamma_{200}$ against the number of features $p$; error bars are standard errors over streams; the dotted curve with triangles is the median over streams for the min-norm learner. In both panels the dotted grey line is the learner that does not learn.\label{fig:dd-code}}
\end{figure}

\emph{Model-wise.} The total code length of the min-norm learner is not monotone in the number of features (Figure~\ref{fig:dd-code}, right). Its mean redundancy is lowest at $p=10$ ($66.7$ nats; the difference from $p=5$, $3.9\pm2.8$ nats on the same streams, is not significant), rises to $269.5$ at $p=160$, and falls to $81.7$ at $p=320$, a factor $3.3$ below the maximum; the medians ($60.3$, $212.5$, $79.3$ at $p=10$, $160$, $320$) have the same shape. The maximum is at the largest $p$ below $n$ on our grid, not at $p=n$: the code length integrates the learning curve over all sample sizes up to $n$, so it is largest for the $p$ whose bump has the largest area inside the stream. The classical model-wise curve is its last increment: the mean excess loss over the last ten sample sizes is $0.17$, $0.19$, $0.27$, $0.95$ and $0.66$ nats per example for $p=20$, $40$, $80$, $160$ and $320$, with its maximum also at $p=160$ (ridge: $0.15$--$0.18$ for $p\ge20$). The redundancy of the ridge control decreases from $62.0$ nats at $p=5$ to $40.0$ at $p=40$ and is nearly flat beyond: it is lowest at $p=80$ ($39.2$ nats) and $1.1\pm0.2$ nats higher at $p=320$ (paired difference over streams), a small increase that the control shows as well.

A second reading of the right panel is less expected. The mean redundancy of the min-norm learner exceeds that of the learner that does not learn ($73.6$ nats) for $p\in\{20, 40, 80, 160, 320\}$, and its median does for $p\in\{40, 80, 160, 320\}$. At $p=160$ the mean code length is $334.5$ nats, $2.4$ times the uniform code. These learners classify better than chance (error rates of $28$--$37\%$ on the noisy labels over the whole stream, against $23$--$36\%$ for the ridge control), and yet as codes they are worse than no code. The ridge control compresses for every $p$.

\subsection{A heavy tail: the mean price is not a stable number}
The gap between means and medians in Table~\ref{tab:dd-main} has a simple origin. At $m=p$ the matrix $\Phi_p$ is square and $\beta_p=\Phi_p^{-1}y$. If the smallest singular value $\sigma$ of $\Phi_p$ has a density that does not vanish at zero, as is the case for square Gaussian matrices, then $\PP[1/\sigma>u]$ decays like $1/u$; the logit inherits a tail of index one, and since the log loss of a confident wrong prediction is $|z|$, the expected loss at $t=p+1$ is infinite. For $|m-p|=k\ge1$ the same reasoning gives a tail of index $k+1$ and a finite mean. We state this as an argument, not as a theorem, and we checked it on the data: the Hill estimate of the tail index of $|\phi\cdot\beta_m|$, from the largest $120$ of $1200$ values pooled over $p\le160$, is $0.97\pm0.09$ at $m=p$ and $1.77\pm0.16$ and $1.85\pm0.17$ at $m=p\mp1$, in agreement with the indices $1$ and $2$. At $m=p\mp2$ the estimates are $2.47\pm0.23$ and $2.13\pm0.19$, below the index $3$ of the argument; we did not investigate this discrepancy.

If the argument is right, $e_{p+1}=\infty$ and therefore $\Gamma_n=\infty$ for every $n>p$: in expectation, an exactly ridgeless learner with an unbounded logit pays an infinite price for its peak, although every realised code length is finite. The means and standard errors of Table~\ref{tab:dd-main} must then be read as descriptions of $200$ streams and not as estimates of a finite expectation (they would grow slowly with $R$); the medians are the stable numbers. This is the contrapositive of the remark that follows Proposition~\ref{prop:curves}: a pipeline with small redundancy cannot display a large bump, and a pipeline with an unbounded bump has an unbounded redundancy.

\subsection{Noiseless source and the scale of the logit}
Table~\ref{tab:dd-sens} repeats the measurement without label noise and for other values of $g$. Without noise the peak of the mean curve is still at $m=p$ for all 6 thresholds, with mean heights of $3.9$ to $56.6$ nats, but the median excess loss at $m=p$ is only $0.06$--$0.76$ nats: the curve of medians has its maximum at $m=p$ only for $p\in\{10, 20\}$, and the peak of the mean is made by rare streams (largest single loss: $8215$ nats). The median price is $-1.8$ nats at $p=10$, where the min-norm learner is slightly cheaper than the control in the median, and positive elsewhere, up to $106$ nats at $p=160$. The redundancy remains non-monotone in $p$, with its maximum at $p=160$, and exceeds the uniform code ($138.6$ nats, since $H^\ast=0$) for $p\in\{40, 80, 160\}$. The position of the peak and of the model-wise maximum do not depend on $g$. The price does: at $p=160$ its median is $71$, $176$ and $386$ nats for $g=1$, $2$ and $4$, a factor $2.5$ and then $2.2$ for each doubling of $g$, as expected when the cost is dominated by confident errors; at $g=1$ the median price is negative for $p\in\{5, 10\}$, and the min-norm learner with $p=320$ then compresses ($\Gamma_{200}=59.7$ nats).

\begin{table}[htbp]\centering
\caption{Sensitivity. Left block: noiseless source ($H^\ast=0$, no learning: $138.6$ nats), $g=2$: position $m^\ast$ of the peak of the mean learning curve, redundancies and price of the peak (nats; mean $\pm$ standard error and median over $200$ streams). Right block: median price of the peak on the noisy source for three values of the logit scale $g$. $^{\dagger}$Threshold beyond the end of the stream.\label{tab:dd-sens}}
\small\setlength{\tabcolsep}{4.5pt}
\begin{tabular}{rrrrrrrrrr}
\toprule
 & \multicolumn{6}{c}{noiseless source, $g=2$} & \multicolumn{3}{c}{noisy, median price}\\
\cmidrule(lr){2-7}\cmidrule(lr){8-10}
 & & \multicolumn{2}{c}{$\Gamma_{200}$, min-norm} & $\Gamma_{200}$, ridge & \multicolumn{2}{c}{price} & & & \\
$p$ & $m^\ast$ & mean $\pm$ s.e. & median & mean $\pm$ s.e. & mean $\pm$ s.e. & median & $g=1$ & $g=2$ & $g=4$\\
\midrule
5 & 5 & $121.3\pm1.7$ & 120.3 & $116.8\pm0.9$ & $4.5\pm1.3$ & 1.3 & $-0.5$ & 3.9 & 18.9\\
10 & 10 & $104.9\pm2.4$ & 98.1 & $100.0\pm0.9$ & $4.9\pm2.1$ & $-1.8$ & $-1.1$ & 6.4 & 27.4\\
20 & 20 & $112.1\pm6.9$ & 92.2 & $82.8\pm0.5$ & $29.3\pm6.9$ & 9.3 & 6.6 & 24.6 & 66.5\\
40 & 40 & $156.1\pm41.0$ & 104.6 & $74.6\pm0.3$ & $81.4\pm41.0$ & 28.5 & 18.1 & 51.1 & 121.9\\
80 & 80 & $158.6\pm5.6$ & 141.7 & $71.8\pm0.3$ & $86.8\pm5.6$ & 69.8 & 43.5 & 113.3 & 257.4\\
160 & 160 & $233.5\pm20.6$ & 175.8 & $70.7\pm0.3$ & $162.8\pm20.6$ & 105.6 & 71.4 & 176.2 & 385.7\\
320 & 192$^{\dagger}$ & $88.1\pm0.7$ & 88.0 & $69.9\pm0.3$ & $18.2\pm0.6$ & 17.8 & 12.4 & 39.0 & 95.3\\
\bottomrule
\end{tabular}
\end{table}

\subsection{What this shows and what it does not}
\emph{It shows} that the statement of the theory can be given numbers. For a ridgeless random-features classifier, sample-wise double descent is a burst in the rate of the code located exactly at the interpolation threshold; the cumulative code is monotone; the burst is charged to the redundancy, of which the window holds more than half for $20\le p\le160$; and its price, relative to a ridge control on the same streams, has a median of $3.9$ to $176$ nats for $p$ between $5$ and $160$ at $n=200$. The total code length is non-monotone in the number of features, and at $g=2$ the interpolating learner, read as a code, is worse than not learning for 5 of the 7 values of $p$ (for $p\in\{40, 80, 160\}$ at $g=1$). The hypothesis that double descent is visible in the code length is thus supported in the corrected form: it is visible in the increments and in the dependence on $p$, not as a decrease of the code length in $n$.

\emph{It does not show} any of this for gradient-trained networks: the learner is a linear fit on random features, chosen because its peak is known and its code can be computed exactly for many streams. There is one source (a noisy half-space in dimension $10$), one stream length, one value of $\lambda$ and seven values of $p$, none of which equals $n$. The scale $g$ was fixed in advance and not tuned; the price grows with it, and with a bounded or calibrated output the tail, and with it the divergence of the expectation, would disappear. The price is defined relative to one particular control and includes overconfidence away from the threshold. The windows of $p=160$ and $p=320$ are cut by the end of the stream. The argument for the infinite expectation is not a proof, and the tail estimates agree with it at $|m-p|\le1$ only. Finally, epoch-wise double descent is outside the scope of the identity, because the index of this paper is the number of examples and not the training time.


% ==========================================================================================
% Experiment "grok"
% ==========================================================================================
\section{The price of a plateau: delayed learning as code length}\label{sec:grok}

Proposition~\ref{prop:curves} says that a plateau of the learning curve is paid for out of the redundancy, and Proposition~\ref{prop:sgd} says that in single-pass training the redundancy is the area under the logged loss curve. A smooth low-dimensional task has no plateau to price. We therefore measure the area on a task that is statistically easy and computationally hard, where a delay is expected, and compare it with the code length of a learner that knows the class (Theorem~\ref{thm:mixture}). The questions are how many nats gradient descent pays for the delay, and whether, as an earlier draft of this paper asserted, the plateau sits at $\ln 2$ nats per example and its price decreases with the width of the network.

\subsection{Design}

\emph{Task.} Inputs are uniform on $\{-1,+1\}^d$ and the label is $y=1$ if $\prod_{i\in S}x_i=+1$ and $y=0$ otherwise, for a hidden set $S$ of $k$ coordinates. There is no label noise, so $H^\ast=0$ and the redundancy is the expected code length itself. The class has only $\binom dk$ members, but for statistical-query algorithms the cost of finding $S$ grows like $d^{\Omega(k)}$ \citep{Kearns1998}, and \citet{Barak2022} showed that stochastic gradient descent on standard networks learns sparse parities at a cost close to this limit, after a plateau during which the loss shows no progress. The primary setting is $(d,k)=(20,3)$; the secondary ones are $(30,3)$ and $(20,2)$.

\emph{Learner.} A one-hidden-layer ReLU network $f(x)=\sum_{j\le H}v_j\max(0,w_j\cdot[x,1])+c$ of width $H\in\{16,64,256,1024\}$ in the standard parametrisation of Section~\ref{sec:exp} ($w_j\sim N(0,I/d)$ including the bias column, $v_j\sim N(0,1/H)$, $c=0$), with logistic loss and plain stochastic gradient descent with one step $\eta$ for all parameters, on mini-batches of $32$ fresh examples (the update agrees with finite differences to $8\times10^{-11}$). The $32$ examples of a batch are predicted with the parameters that precede the step, so every prediction depends on earlier examples only and, by Proposition~\ref{prop:sgd}, the summed log loss $C(t)$ of the first $t$ examples is exactly their code length. A stream has $2\times10^5$ examples ($6250$ steps). There are five seeds per width; a seed fixes the initialisation, the hidden set and the stream, and all of them are independent across widths.

\emph{Measurements.} The windowed loss is $w(t)=(C(t)-C(t-1000))/1000$. The plateau length $T_p$ is the first $t\ge1000$ with $w(t)<(\ln2)/2$, the price of the plateau is $C(T_p)$, and its height is $C(T_p)/(T_p\ln 2)$. A run in which $w$ never falls below the threshold is censored; it is kept and enters the medians as a lower bound. A run stops at $n_{\mathrm{stop}}$, the first end of a batch at which $w$ has stayed below $0.01$ for $2000$ consecutive examples; the $20$ runs of the primary setting continue to $2\times10^5$ examples.

\emph{Ideal code.} The Bayes mixture of Theorem~\ref{thm:mixture} over the $\binom dk$ parities with uniform weights is a learner: it keeps the set of parities consistent with the stream and predicts $1$ with probability equal to the fraction of them that predict $1$. Its code after $t$ examples telescopes to $\ln\bigl(\binom dk/N_t\bigr)$, where $N_t$ is the number of consistent parities, hence it is at most $\ln\binom dk$: $7.04$ nats for $(20,3)$, $8.31$ for $(30,3)$ and $5.25$ for $(20,2)$. We run it example by example on the same streams. The difference between the code of the network and this code is the regret of gradient descent against a learner that knows the class, a computational price measured in nats.

\emph{Step size, and a change of plan.} The step was chosen on an independent stream (one seed per width, full length) as the value of a half-decade grid with the smallest code $C(2\times10^5)$, at the widest network, and then frozen for all widths; the widest network was used because in the standard parametrisation the readout kernel grows like $H$, so the largest stable step decreases with width. The grid fixed in advance was $\{0.01,0.03,0.1,0.3,1,3\}$. The choice fell on its upper edge $\eta=3$ at every width, so we extended the grid by $10$ and $30$ and reran everything. At $\eta=10$ the code of the tuning stream exceeds $2.1\times10^{8}$ nats at every width, and at $\eta=30$ the loss overflows within the first $7\,168$ examples, so $\eta=3$ is the code-optimal step of the extended grid at every width, and the frozen step and the step chosen per width coincide. At $H=1024$ the codes of the tuning stream are, in thousands of nats, 135.4 ($\eta=0.01$), 59.9 ($\eta=0.03$), 37.2 ($\eta=0.1$), 23.2 ($\eta=0.3$), 10.7 ($\eta=1$), 9.5 ($\eta=3$). Because the code-optimal step turned out to lie outside the regime that the hypothesis describes, we also ran the complete grid with the same five seeds per width ($160$ runs, Table~\ref{tab:grok-sweep}); this sweep was added after the first pass, and all of it is reported. In total the experiment has $272$ runs on $64$ distinct streams, $22.5$ million examples and $77$ seconds of CPU time.

\subsection{The plateau and its price at the code-optimal step}

\emph{The ideal code.} In all $272$ runs the code of the mixture never exceeded $\ln\binom dk$ (largest excess $1.8\times10^{-15}$ nats, rounding) and reached it: the hidden parity was the only consistent one after between $7$ and $19$ examples (median $11.5$), with at most $9$ mistakes. A learner that knows the class pays about seven nats, once (grey curve in Figure~\ref{fig:grok-code}a).

\emph{The network.} Every run of the primary setting left the plateau (Table~\ref{tab:grok-main}, no censored run). At the code-optimal step the delay is short, between $1.6$ and $4.7$ thousand examples, and it costs between $1.3$ and $11.0$ thousand nats; the median prices are $2\,059$, $1\,495$, $2\,643$ and $8\,500$ nats for $H=16,64,256,1024$, that is $293$, $212$, $375$ and $1\,208$ times the ideal code. After the drop no run makes a mistake, either in the $2000$ examples before $n_{\mathrm{stop}}$ or in the last $2000$ examples of the stream, and the examples between $n_{\mathrm{stop}}$ and $2\times10^5$ add only $14$--$48$ nats: the plateau carries $96.9$, $96.4$, $98.7$ and $99.7$ per cent of the code of the whole stream (medians: $2\,124$, $1\,541$, $2\,675$ and $8\,523$ nats). The regret against the mixture is therefore, to within $3.6$ per cent (medians), the price of the plateau.

The plateau is not at $\ln 2$ for the wide networks. Its height is $0.85$ and $0.98$ for $H=16$ and $64$, but $1.98$ and $6.62$ for $H=256$ and $1024$ (Figure~\ref{fig:grok-loss}b): with a step that is optimal for the total code, the outputs of a wide network fluctuate strongly while the first layer searches, and the network pays several times the $\ln2$ of a learner that predicts $1/2$. The error rate before $T_p$ is between $0.30$ and $0.35$, below $1/2$, because the window of $1000$ examples that defines $T_p$ includes the descent.

\begin{figure}[htbp]\centering
\begin{tikzpicture}
\begin{groupplot}[group style={group size=2 by 1, horizontal sep=1.1cm, ylabels at=edge left}, width=0.5\textwidth, height=6cm,
  xmode=log, ymode=log, xmin=1000, xmax=220000, ymin=1e-5, ymax=30, xlabel={examples seen $t$},
  ylabel={windowed loss $w(t)$ (nats per example)}, legend pos=south west, legend cell align=left]
\nextgroupplot[title={(a) step $\eta=0.1$}]
\addplot[nnblue, thick, mark=*, mark size=1.1pt, mark repeat=9] coordinates {(1000,0.7434) (1054,0.7319) (1110,0.7293) (1169,0.7244) (1232,0.7249) (1298,0.7204) (1367,0.7163) (1440,0.7175) (1517,0.7146) (1599,0.7158) (1684,0.7137) (1774,0.7093) (1869,0.7085) (1969,0.7117) (2075,0.7134) (2186,0.7132) (2303,0.7147) (2426,0.7116) (2556,0.7125) (2693,0.7129) (2837,0.712) (2989,0.7071) (3148,0.7079) (3317,0.7042) (3494,0.7052) (3681,0.702) (3878,0.6996) (4086,0.7053) (4305,0.7028) (4535,0.7008) (4778,0.7027) (5033,0.7032) (5303,0.7034) (5587,0.7024) (5886,0.7017) (6200,0.6937) (6532,0.6914) (6882,0.6909) (7250,0.6975) (7638,0.6977) (8047,0.6968) (8478,0.6929) (8931,0.6908) (9409,0.697) (9913,0.698) (10443,0.6975) (11002,0.6959) (11591,0.6939) (12211,0.6981) (12865,0.6952) (13553,0.698) (14278,0.6983) (15042,0.6976) (15847,0.6967) (16695,0.6955) (17589,0.6923) (18530,0.6951) (19522,0.6925) (20567,0.6947) (21667,0.6961) (22827,0.6971) (24048,0.6934) (25335,0.6938) (26691,0.6926) (28119,0.6927) (29624,0.6874) (31210,0.6772) (32880,0.6603) (34639,0.6354) (36493,0.6228) (38446,0.619) (40503,0.6053) (42671,0.5982) (44954,0.5652) (47360,0.5162) (49895,0.4454) (52565,0.3435) (55378,0.3109) (58341,0.2723) (61463,0.2261) (64753,0.183) (68218,0.1072) (71869,0.06958) (75715,0.04451) (79767,0.03228) (84035,0.024) (88532,0.0179) (93270,0.01391) (98262,0.01156) (103520,0.009218)};
\addlegendentry{$H=16$}
\addplot[nnorange, thick, dashed, mark=square*, mark size=1.1pt, mark options={solid}, mark repeat=9] coordinates {(1000,0.7162) (1053,0.7201) (1109,0.7182) (1168,0.7215) (1230,0.7118) (1296,0.7118) (1365,0.7099) (1437,0.7072) (1513,0.7063) (1594,0.7044) (1679,0.7078) (1768,0.7063) (1862,0.7082) (1961,0.7047) (2065,0.701) (2175,0.7004) (2291,0.7036) (2412,0.706) (2541,0.7066) (2676,0.7067) (2818,0.708) (2968,0.7083) (3126,0.7058) (3292,0.7088) (3467,0.7114) (3651,0.7108) (3845,0.7097) (4050,0.7125) (4265,0.7123) (4492,0.7057) (4730,0.708) (4982,0.7062) (5247,0.701) (5526,0.7044) (5820,0.7019) (6129,0.6982) (6455,0.7024) (6798,0.7006) (7159,0.7032) (7540,0.7024) (7941,0.7041) (8363,0.7045) (8808,0.7001) (9276,0.7003) (9769,0.7047) (10289,0.7037) (10836,0.6987) (11412,0.7045) (12018,0.7046) (12657,0.7011) (13330,0.6996) (14039,0.6991) (14785,0.7079) (15572,0.6991) (16399,0.7009) (17271,0.6981) (18190,0.7023) (19157,0.7021) (20175,0.6994) (21248,0.6972) (22377,0.7027) (23567,0.6986) (24820,0.6936) (26140,0.6998) (27529,0.697) (28993,0.6977) (30535,0.6963) (32158,0.6973) (33868,0.69) (35668,0.6894) (37565,0.6646) (39562,0.6207) (41665,0.5779) (43880,0.5528) (46213,0.5224) (48670,0.4707) (51258,0.4359) (53983,0.3837) (56853,0.2725) (59876,0.1782) (63059,0.1145) (66411,0.07135) (69942,0.04821) (73661,0.03425) (77577,0.02583) (81702,0.02001) (86045,0.01603) (90620,0.01316) (95438,0.01105) (100512,0.00935)};
\addlegendentry{$H=64$}
\addplot[nnaqua, thick, dashdotted, mark=triangle*, mark size=1.4pt, mark options={solid}, mark repeat=9] coordinates {(1000,0.7525) (1051,0.7516) (1104,0.7509) (1160,0.7508) (1219,0.749) (1281,0.7496) (1346,0.7423) (1414,0.7403) (1486,0.7375) (1561,0.7334) (1641,0.7333) (1724,0.7342) (1811,0.7372) (1903,0.7303) (2000,0.729) (2101,0.7293) (2208,0.7318) (2320,0.7244) (2438,0.7257) (2561,0.7281) (2691,0.7426) (2828,0.7377) (2971,0.7412) (3122,0.7382) (3281,0.7438) (3447,0.7453) (3622,0.7344) (3806,0.7379) (3999,0.7355) (4202,0.7394) (4415,0.7478) (4639,0.7401) (4875,0.7357) (5122,0.7335) (5382,0.7205) (5655,0.7261) (5942,0.7213) (6244,0.7225) (6561,0.7261) (6894,0.7306) (7244,0.7427) (7611,0.7416) (7997,0.7596) (8403,0.7398) (8830,0.7482) (9278,0.7258) (9749,0.7351) (10243,0.7542) (10763,0.7609) (11309,0.7248) (11883,0.7359) (12486,0.753) (13120,0.7256) (13786,0.7281) (14485,0.7286) (15221,0.7201) (15993,0.7066) (16805,0.7352) (17657,0.7228) (18554,0.7194) (19495,0.6841) (20484,0.6793) (21524,0.6744) (22616,0.6443) (23764,0.6137) (24970,0.6105) (26237,0.5682) (27569,0.5466) (28968,0.5009) (30438,0.4369) (31983,0.3638) (33606,0.2916) (35311,0.224) (37103,0.1656) (38986,0.1223) (40964,0.09378) (43043,0.07337) (45228,0.0591) (47523,0.04636) (49935,0.03894) (52469,0.03289) (55132,0.02693) (57929,0.02407) (60869,0.01982) (63958,0.01798) (67204,0.01523) (70614,0.01345) (74198,0.0119) (77963,0.01076) (81920,0.00943)};
\addlegendentry{$H=256$}
\addplot[nnyellow, thick, densely dashed, mark=diamond*, mark size=1.4pt, mark options={solid}, mark repeat=9] coordinates {(1000,2.384) (1047,2.456) (1097,2.484) (1149,2.426) (1203,2.346) (1260,2.295) (1320,2.247) (1383,2.138) (1448,2.044) (1517,2.111) (1589,2.108) (1664,2.013) (1743,1.895) (1825,1.888) (1912,1.845) (2003,1.743) (2097,1.683) (2197,1.678) (2301,1.686) (2410,1.844) (2524,1.797) (2644,1.816) (2769,1.836) (2900,1.826) (3038,1.825) (3181,1.846) (3332,1.971) (3490,1.846) (3655,1.82) (3829,1.768) (4010,1.697) (4200,1.746) (4399,1.63) (4608,1.651) (4826,1.737) (5055,1.815) (5294,1.822) (5545,1.856) (5808,1.842) (6083,1.733) (6371,1.709) (6673,1.811) (6989,1.745) (7320,1.719) (7667,1.633) (8030,1.604) (8411,1.565) (8809,1.551) (9227,1.411) (9664,1.38) (10122,1.533) (10601,1.695) (11104,1.582) (11630,1.248) (12181,1.327) (12758,1.138) (13362,1.158) (13996,1.244) (14659,1.211) (15353,1.233) (16081,1.276) (16843,1.201) (17641,1.153) (18477,1.132) (19352,1.093) (20269,1.144) (21229,0.8979) (22235,0.6692) (23289,0.4636) (24392,0.2469) (25548,0.1714) (26759,0.1355) (28026,0.09912) (29354,0.07938) (30745,0.06466) (32202,0.05488) (33728,0.04499) (35326,0.0386) (37000,0.03264) (38753,0.0286) (40589,0.02511) (42512,0.02174) (44527,0.01924) (46636,0.0174) (48846,0.01538) (51160,0.01365) (53585,0.01222) (56124,0.01127) (58783,0.01032) (61568,0.009338)};
\addlegendentry{$H=1024$}
\addplot[black, dotted, thick, domain=1000:220000, samples=2] {0.693147};
\addlegendentry{$\ln 2$}
\nextgroupplot[title={(b) step $\eta=3$ (code-optimal)}]
\addplot[nnblue, thick, mark=*, mark size=1.1pt, mark repeat=9] coordinates {(1000,0.7707) (1061,0.7665) (1126,0.7477) (1196,0.7273) (1269,0.7274) (1347,0.7074) (1429,0.7019) (1517,0.693) (1610,0.6767) (1709,0.658) (1814,0.6394) (1925,0.6261) (2043,0.6045) (2168,0.572) (2301,0.5454) (2442,0.5038) (2592,0.533) (2751,0.5333) (2920,0.5231) (3099,0.4989) (3289,0.4767) (3491,0.4492) (3705,0.3098) (3932,0.212) (4174,0.1297) (4430,0.06305) (4701,0.02567) (4990,0.0129) (5296,0.009101) (5620,0.007188) (5965,0.005352) (6331,0.003975) (6719,0.003155) (7132,0.002473) (7569,0.002054) (8033,0.001781) (8526,0.001595) (9049,0.001407) (9604,0.001243) (10193,0.001032) (10819,0.0009112) (11482,0.0007865) (12187,0.0006996) (12934,0.0006101) (13727,0.0005748) (14569,0.0005276) (15463,0.0004666) (16412,0.0004238) (17418,0.0003742) (18487,0.0003522) (19621,0.0003227) (20824,0.0003031) (22102,0.0002856) (23457,0.0002453) (24896,0.0002388) (26423,0.0002219) (28044,0.0001955) (29764,0.0001784) (31590,0.0001709) (33528,0.0001587) (35584,0.0001458) (37767,0.0001369) (40083,0.0001277) (42542,0.0001203) (45152,0.00011) (47921,9.804e-05) (50861,9.173e-05) (53980,8.768e-05) (57292,8.158e-05) (60806,7.704e-05) (64536,7.037e-05) (68494,6.705e-05) (72695,6.573e-05) (77155,5.636e-05) (81887,5.307e-05) (86910,5.165e-05) (92241,4.803e-05) (97899,4.499e-05) (103904,4.319e-05) (110278,3.852e-05) (117042,3.627e-05) (124221,3.394e-05) (131841,3.313e-05) (139928,3.174e-05) (148511,2.843e-05) (157621,2.747e-05) (167289,2.52e-05) (177550,2.411e-05) (188441,2.27e-05) (200000,2.075e-05)};
\addplot[nnorange, thick, dashed, mark=square*, mark size=1.1pt, mark options={solid}, mark repeat=9] coordinates {(1000,1.022) (1061,0.9699) (1126,0.7674) (1196,0.7466) (1269,0.7275) (1347,0.7084) (1429,0.6954) (1517,0.6774) (1610,0.6455) (1709,0.604) (1814,0.5508) (1925,0.4929) (2043,0.4318) (2168,0.3607) (2301,0.283) (2442,0.2116) (2592,0.139) (2751,0.09066) (2920,0.05416) (3099,0.02884) (3289,0.01532) (3491,0.009449) (3705,0.007001) (3932,0.005363) (4174,0.004245) (4430,0.00353) (4701,0.003016) (4990,0.002597) (5296,0.002256) (5620,0.001954) (5965,0.001756) (6331,0.001561) (6719,0.00141) (7132,0.001245) (7569,0.001096) (8033,0.001016) (8526,0.0009366) (9049,0.000864) (9604,0.0007795) (10193,0.0007076) (10819,0.0006752) (11482,0.0006039) (12187,0.0005616) (12934,0.0005159) (13727,0.0004637) (14569,0.000447) (15463,0.0004045) (16412,0.0003714) (17418,0.0003473) (18487,0.0003248) (19621,0.000294) (20824,0.000278) (22102,0.0002615) (23457,0.0002364) (24896,0.0002261) (26423,0.0002112) (28044,0.0001955) (29764,0.0001788) (31590,0.0001663) (33528,0.0001577) (35584,0.0001468) (37767,0.0001351) (40083,0.0001268) (42542,0.0001185) (45152,0.0001086) (47921,0.0001029) (50861,9.517e-05) (53980,9.087e-05) (57292,8.432e-05) (60806,7.769e-05) (64536,7.294e-05) (68494,6.95e-05) (72695,6.266e-05) (77155,5.967e-05) (81887,5.582e-05) (86910,5.117e-05) (92241,4.936e-05) (97899,4.602e-05) (103904,4.288e-05) (110278,3.95e-05) (117042,3.758e-05) (124221,3.471e-05) (131841,3.232e-05) (139928,3.05e-05) (148511,2.838e-05) (157621,2.701e-05) (167289,2.486e-05) (177550,2.313e-05) (188441,2.162e-05) (200000,2.106e-05)};
\addplot[nnaqua, thick, dashdotted, mark=triangle*, mark size=1.4pt, mark options={solid}, mark repeat=9] coordinates {(1000,2.151) (1061,1.972) (1126,1.393) (1196,1.283) (1269,0.8701) (1347,0.7872) (1429,0.707) (1517,0.6616) (1610,0.5995) (1709,0.5447) (1814,0.4512) (1925,0.357) (2043,0.2726) (2168,0.1986) (2301,0.1328) (2442,0.07628) (2592,0.03369) (2751,0.017) (2920,0.009449) (3099,0.006816) (3289,0.005455) (3491,0.00441) (3705,0.003677) (3932,0.003145) (4174,0.00273) (4430,0.002375) (4701,0.002084) (4990,0.001823) (5296,0.00162) (5620,0.001474) (5965,0.001307) (6331,0.001185) (6719,0.001072) (7132,0.0009941) (7569,0.0009123) (8033,0.000843) (8526,0.0007952) (9049,0.000713) (9604,0.0006442) (10193,0.0006104) (10819,0.0005596) (11482,0.0005136) (12187,0.0004738) (12934,0.0004405) (13727,0.0004179) (14569,0.0003792) (15463,0.0003632) (16412,0.0003289) (17418,0.000307) (18487,0.0002816) (19621,0.0002737) (20824,0.0002514) (22102,0.0002349) (23457,0.0002154) (24896,0.0002087) (26423,0.0001891) (28044,0.0001769) (29764,0.0001668) (31590,0.0001546) (33528,0.000145) (35584,0.0001338) (37767,0.0001263) (40083,0.0001175) (42542,0.0001079) (45152,0.0001022) (47921,9.576e-05) (50861,8.822e-05) (53980,8.308e-05) (57292,7.965e-05) (60806,7.228e-05) (64536,6.971e-05) (68494,6.496e-05) (72695,6.027e-05) (77155,5.64e-05) (81887,5.309e-05) (86910,4.974e-05) (92241,4.609e-05) (97899,4.302e-05) (103904,4.098e-05) (110278,3.759e-05) (117042,3.634e-05) (124221,3.319e-05) (131841,3.094e-05) (139928,2.9e-05) (148511,2.711e-05) (157621,2.628e-05) (167289,2.35e-05) (177550,2.244e-05) (188441,2.075e-05) (200000,1.966e-05)};
\addplot[nnyellow, thick, densely dashed, mark=diamond*, mark size=1.4pt, mark options={solid}, mark repeat=9] coordinates {(1000,7.39) (1061,6.301) (1126,2.606) (1196,1.913) (1269,1.441) (1347,1.286) (1429,0.9562) (1517,0.7581) (1610,0.5801) (1709,0.4583) (1814,0.3562) (1925,0.2804) (2043,0.1754) (2168,0.1077) (2301,0.05004) (2442,0.02706) (2592,0.01171) (2751,0.00753) (2920,0.005912) (3099,0.00471) (3289,0.00402) (3491,0.003548) (3705,0.003031) (3932,0.002683) (4174,0.002341) (4430,0.002013) (4701,0.001798) (4990,0.001624) (5296,0.001449) (5620,0.001314) (5965,0.001159) (6331,0.00105) (6719,0.0009863) (7132,0.0009074) (7569,0.000829) (8033,0.0007431) (8526,0.0006809) (9049,0.0006169) (9604,0.0005577) (10193,0.0005508) (10819,0.000502) (11482,0.0004539) (12187,0.0003975) (12934,0.0003873) (13727,0.0003532) (14569,0.0003393) (15463,0.0003166) (16412,0.0002885) (17418,0.0002564) (18487,0.0002421) (19621,0.0002308) (20824,0.0002154) (22102,0.0002019) (23457,0.0001868) (24896,0.0001719) (26423,0.0001563) (28044,0.0001539) (29764,0.0001347) (31590,0.0001324) (33528,0.000122) (35584,0.0001144) (37767,0.0001034) (40083,9.582e-05) (42542,9.267e-05) (45152,8.442e-05) (47921,7.946e-05) (50861,7.458e-05) (53980,7.077e-05) (57292,6.583e-05) (60806,6.072e-05) (64536,5.368e-05) (68494,5.233e-05) (72695,5.021e-05) (77155,4.674e-05) (81887,4.255e-05) (86910,4.237e-05) (92241,3.707e-05) (97899,3.593e-05) (103904,3.321e-05) (110278,3.094e-05) (117042,2.842e-05) (124221,2.725e-05) (131841,2.561e-05) (139928,2.44e-05) (148511,2.189e-05) (157621,2.211e-05) (167289,2.023e-05) (177550,1.813e-05) (188441,1.709e-05) (200000,1.604e-05)};
\addplot[black, dotted, thick, domain=1000:220000, samples=2] {0.693147};
\end{groupplot}
\end{tikzpicture}
\caption{Windowed loss $w(t)$ (mean log loss of the last $1000$ examples, each predicted before the step that uses it) against the number of examples seen, for the $(20,3)$ parity; one run per width, the seed with the median $T_p$ among five; no error bars. (a) Step $\eta=0.1$, the smallest step of the grid without censored runs; these runs end at $n_{\mathrm{stop}}$. (b) The code-optimal step $\eta=3$, full streams. Dotted line: $\ln 2$, the loss of a learner that has learned nothing.}\label{fig:grok-loss}
\end{figure}

\begin{table}[htbp]\centering
\caption{Single-pass training on $k$-sparse parities at the frozen step $\eta=3$: medians over five seeds. $T_p$: plateau length in examples (median and range); price: $C(T_p)$ in nats; height: $C(T_p)/(T_p\ln2)$; total code: $C(n_{\mathrm{stop}})$ in nats; regret: total code minus the code of the Bayes mixture over the class ($7.04$, $8.31$ and $5.25$ nats); error: fraction of mistakes among the first $T_p$ examples; cens.: censored runs out of five.}\label{tab:grok-main}
\small
\begin{tabular}{llrcrrrrrrr}
\toprule
$(d,k)$ & $H$ & $T_p$ & range of $T_p$ & price & height & $n_{\mathrm{stop}}$ & total code & regret & error & cens.\\
\midrule
$(20,3)$ & 16 & 3\,624 & 2\,483--4\,663 & 2\,059 & 0.85 & 7\,392 & 2\,104 & 2\,097 & 0.35 & 0 \\
 & 64 & 2\,196 & 1\,961--2\,433 & 1\,495 & 0.98 & 5\,440 & 1\,521 & 1\,514 & 0.34 & 0 \\
 & 256 & 1\,944 & 1\,636--2\,066 & 2\,643 & 1.98 & 4\,896 & 2\,657 & 2\,650 & 0.32 & 0 \\
 & 1024 & 1\,832 & 1\,704--1\,970 & 8\,500 & 6.62 & 4\,640 & 8\,509 & 8\,502 & 0.30 & 0 \\
\midrule
$(30,3)$ & 16 & 5\,768 & 4\,562--8\,370 & 3\,447 & 0.92 & 10\,112 & 3\,938 & 3\,929 & 0.40 & 0 \\
 & 64 & 3\,593 & 3\,163--4\,258 & 2\,535 & 1.04 & 7\,168 & 2\,573 & 2\,565 & 0.37 & 0 \\
 & 256 & 2\,865 & 2\,744--2\,938 & 3\,630 & 1.87 & 6\,080 & 3\,653 & 3\,645 & 0.36 & 0 \\
 & 1024 & 2\,993 & 2\,898--3\,011 & 13\,757 & 6.63 & 6\,144 & 13\,774 & 13\,765 & 0.36 & 0 \\
\midrule
$(20,2)$ & 16 & 1\,073 & 1\,000--1\,082 & 405 & 0.54 & 3\,808 & 410 & 404 & 0.18 & 0 \\
 & 64 & 1\,081 & 1\,072--1\,087 & 579 & 0.78 & 3\,456 & 582 & 576 & 0.15 & 0 \\
 & 256 & 1\,168 & 1\,142--1\,349 & 1\,863 & 2.33 & 3\,520 & 1\,864 & 1\,859 & 0.15 & 0 \\
 & 1024 & 1\,317 & 1\,274--1\,355 & 7\,350 & 7.85 & 3\,552 & 7\,352 & 7\,346 & 0.15 & 0 \\
\bottomrule
\end{tabular}
\end{table}

\begin{figure}[htbp]\centering
\begin{tikzpicture}
\begin{groupplot}[group style={group size=2 by 1, horizontal sep=1.7cm}, width=0.5\textwidth, height=6.4cm, legend cell align=left]
\nextgroupplot[title={(a) cumulative code, $\eta=3$}, xmode=log, ymode=log, xmin=1, xmax=200000, ymin=0.3, ymax=3e5,
  xlabel={examples seen $t$}, ylabel={code length $C(t)$ (nats)}, legend pos=north west, legend columns=2,
  legend style={font=\tiny}]
\addplot[nnblue, thick, mark=*, mark size=1.1pt, mark repeat=9] coordinates {(1,0.4166) (2,0.9477) (3,1.807) (4,2.087) (5,2.684) (6,3.484) (7,4.507) (8,5.193) (10,7.072) (12,9.653) (14,11.38) (17,13.56) (20,16.17) (24,17.93) (29,22.09) (34,26.05) (41,31.57) (49,37.71) (58,44.23) (70,54.83) (83,66.7) (99,80.81) (119,106.2) (142,132.7) (169,151.2) (202,177.3) (241,205.8) (287,251.5) (343,294.8) (409,344.4) (489,401) (583,472.1) (696,551.3) (831,651.4) (991,765.1) (1183,892.8) (1412,1050) (1685,1206) (2012,1391) (2401,1562) (2865,1845) (3420,2025) (4082,2085) (4872,2095) (5814,2101) (6939,2104) (8282,2106) (9885,2108) (11798,2110) (14081,2111) (16806,2112) (20058,2113) (23939,2115) (28572,2116) (34101,2116) (40700,2117) (48576,2118) (57975,2119) (69194,2120) (82584,2121) (98565,2121) (117639,2122) (140403,2123) (167573,2124) (200000,2124)};
\addlegendentry{$H=16$}
\addplot[nnorange, thick, dashed, mark=square*, mark size=1.1pt, mark options={solid}, mark repeat=9] coordinates {(1,1.594) (2,2.439) (3,3.959) (4,5.119) (5,6.304) (6,7.503) (7,7.958) (8,8.786) (10,10.17) (12,11.23) (14,12.99) (17,14.86) (20,17.12) (24,20.29) (29,24.76) (34,28.13) (41,50.13) (49,68.17) (58,83.75) (70,171.8) (83,226.2) (99,316.9) (119,331.1) (142,346.2) (169,371.3) (202,409.1) (241,443.8) (287,478.9) (343,529.4) (409,577.7) (489,637.5) (583,709.6) (696,795.2) (831,899.7) (991,1016) (1183,1141) (1412,1282) (1685,1402) (2012,1475) (2401,1504) (2865,1512) (3420,1516) (4082,1518) (4872,1520) (5814,1522) (6939,1524) (8282,1525) (9885,1526) (11798,1527) (14081,1528) (16806,1530) (20058,1531) (23939,1531) (28572,1532) (34101,1533) (40700,1534) (48576,1535) (57975,1536) (69194,1537) (82584,1538) (98565,1538) (117639,1539) (140403,1540) (167573,1541) (200000,1541)};
\addlegendentry{$H=64$}
\addplot[nnaqua, thick, dashdotted, mark=triangle*, mark size=1.4pt, mark options={solid}, mark repeat=9] coordinates {(1,0.8835) (2,1.618) (3,1.958) (4,2.747) (5,3.166) (6,3.444) (7,4.152) (8,5.272) (10,7.123) (12,7.958) (14,9.124) (17,11.05) (20,12.78) (24,16.07) (29,20.27) (34,32.91) (41,80.59) (49,147.7) (58,221.8) (70,382.2) (83,587.2) (99,797.4) (119,837.3) (142,864.5) (169,934.2) (202,999) (241,1245) (287,1490) (343,1555) (409,1651) (489,1721) (583,1805) (696,1886) (831,2010) (991,2143) (1183,2268) (1412,2372) (1685,2441) (2012,2455) (2401,2460) (2865,2462) (3420,2464) (4082,2466) (4872,2468) (5814,2469) (6939,2470) (8282,2471) (9885,2472) (11798,2473) (14081,2474) (16806,2475) (20058,2476) (23939,2477) (28572,2478) (34101,2479) (40700,2480) (48576,2480) (57975,2481) (69194,2482) (82584,2483) (98565,2483) (117639,2484) (140403,2485) (167573,2486) (200000,2486)};
\addlegendentry{$H=256$}
\addplot[nnyellow, thick, densely dashed, mark=diamond*, mark size=1.4pt, mark options={solid}, mark repeat=9] coordinates {(1,0.6895) (2,1.173) (3,1.904) (4,2.511) (5,3.272) (6,3.846) (7,5.078) (8,5.519) (10,6.852) (12,9.112) (14,10.39) (17,11.6) (20,14.17) (24,16.5) (29,20.55) (34,23.02) (41,256.8) (49,598.9) (58,935.8) (70,1592) (83,2370) (99,3224) (119,4130) (142,4953) (169,5186) (202,5674) (241,5975) (287,6138) (343,6273) (409,6494) (489,6765) (583,6960) (696,7122) (831,7246) (991,7384) (1183,7493) (1412,7569) (1685,7591) (2012,7596) (2401,7598) (2865,7600) (3420,7602) (4082,7604) (4872,7605) (5814,7606) (6939,7607) (8282,7608) (9885,7609) (11798,7610) (14081,7611) (16806,7612) (20058,7612) (23939,7613) (28572,7614) (34101,7615) (40700,7615) (48576,7616) (57975,7617) (69194,7617) (82584,7618) (98565,7618) (117639,7619) (140403,7620) (167573,7620) (200000,7621)};
\addlegendentry{$H=1024$}
\addplot[nngray, very thick, const plot] coordinates {(1,0.7091) (2,1.411) (3,2.148) (4,2.79) (5,3.401) (6,3.861) (7,4.474) (8,4.959) (9,5.652) (10,6.346) (11,6.346) (12,6.346) (13,6.346) (14,6.346) (15,7.039) (200000,7.039)};
\addlegendentry{mixture}
\addplot[black, dotted, thick, domain=1:200000, samples=2] {0.693147*x};
\addlegendentry{$t\ln 2$}
\addplot[black, dashed, domain=1:200000, samples=2] {7.03878};
\addlegendentry{$\ln\binom{20}{3}$}
\nextgroupplot[title={(b) price of the plateau}, xmode=log, ymode=log, xmin=11, xmax=1500, ymin=900, ymax=4e6,
  xtick={16,64,256,1024}, xticklabels={16,64,256,1024}, xlabel={width $H$}, ylabel={price $C(T_p)$ (nats)},
  legend pos=north west, legend columns=3, legend style={font=\tiny}]
\addplot[nnblue, thick, mark=*, mark size=1.3pt] coordinates {(16,1.051e+05) (64,96705) (256,65308) (1024,52529)};
\addlegendentry{$\eta=0.03$}
\addplot[nnorange, thick, dashed, mark=square*, mark size=1.3pt, mark options={solid}] coordinates {(16,33586) (64,35020) (256,21284) (1024,32310)};
\addlegendentry{$\eta=0.1$}
\addplot[nnaqua, thick, dashdotted, mark=triangle*, mark size=1.6pt, mark options={solid}] coordinates {(16,14300) (64,12462) (256,9775.5) (1024,21688)};
\addlegendentry{$\eta=0.3$}
\addplot[nnyellow, thick, densely dashed, mark=diamond*, mark size=1.6pt, mark options={solid}] coordinates {(16,4770.3) (64,3434.8) (256,3891.9) (1024,10468)};
\addlegendentry{$\eta=1$}
\addplot[nnviolet, very thick, mark=pentagon*, mark size=1.6pt] coordinates {(16,2059.4) (64,1495.4) (256,2643) (1024,8499.7)};
\addlegendentry{$\eta=3$}
\addplot[nnviolet, only marks, mark=o, mark size=1.6pt] coordinates {(16,2514.8) (16,2910.9) (16,1438.6) (16,2059.4) (16,1763.4) (64,1495.4) (64,1355.3) (64,1555.5) (64,1620.4) (64,1311.3) (256,2643) (256,2411.8) (256,2771) (256,2453.7) (256,2684.2) (1024,10961) (1024,8096.5) (1024,7593.7) (1024,9033.8) (1024,8499.7)};
\addlegendentry{seeds, $\eta=3$}
\end{groupplot}
\end{tikzpicture}
\caption{(a) Cumulative code $C(t)$ of the $(20,3)$ parity stream at $\eta=3$, one run per width (median $T_p$ among five seeds), with the code $t\ln2$ of a learner that never learns (dotted), the exact code of the Bayes mixture over the $1\,140$ parities on the stream of the $H=16$ run (grey) and its ceiling $\ln\binom{20}{3}=7.04$ nats (dashed). (b) Price of the plateau $C(T_p)$ against width for five steps of the grid: lines join the medians over five seeds; circles are the five seeds at $\eta=3$. At $\eta=0.03$ and $H=16$ two runs of five are censored; the median is not affected.}\label{fig:grok-code}
\end{figure}

\subsection{Width, step size and the price}

Table~\ref{tab:grok-sweep} and Figure~\ref{fig:grok-code}b give the plateau length and its price for every step of the grid. Three facts stand out.

First, wider networks leave the plateau earlier at every step, but weakly. The log--log slope of the median $T_p$ against $H$ lies between $-0.23$ and $-0.16$ for the five steps from $0.03$ to $3$, with bootstrap intervals that exclude zero: a $64$-fold increase in width shortens the plateau by a factor of $2.0$--$2.4$. The decrease is not strictly monotone (at $\eta=0.1$ the medians at $H=16$ and $64$ are $52.4$ and $54.9$ thousand examples). The step matters far more: from $\eta=0.03$ to $\eta=3$ the plateau shortens by a factor of $43$--$69$.

Second, the price does not follow the length, because the price is length times height and the height depends on width. At $\eta=0.03$ every width sits at $0.90$--$0.98$ times $\ln2$, as the hypothesis assumes, and the price decreases with width (slope $-$0.18 [$-$0.27, $-$0.07]). For $H=1024$ the height then grows with the step: $0.98, 1.90, 3.44, 4.78, 6.62$ times $\ln2$ at $\eta=0.03,0.1,0.3,1,3$, while for $H=16$ it stays between $0.85$ and $0.93$. The slope of the price against width is accordingly indistinguishable from zero at $\eta=0.1$ ($-$0.04 [$-$0.23, 0.08]) and $\eta=0.3$ ($+$0.07 [$-$0.03, 0.25]), and positive at $\eta=1$ ($+$0.18 [0.13, 0.33]) and $\eta=3$ ($+$0.35 [0.28, 0.43]). The cheapest width is $1024$ at $\eta=0.03$, $256$ at $\eta=0.1$ and $0.3$, and $64$ at $\eta=1$ and $3$.

Third, the long plateau at $\ln 2$ is the expensive way to learn. The smallest price in the table is $1\,495$ nats ($H=64$, $\eta=3$, $212$ times the ideal code); at $\eta=0.03$, where all networks sit quietly at $\ln2$, the price is $52.5$--$105.1$ thousand nats, $35$--$70$ times more.

\begin{table}[htbp]\centering
\caption{The $(20,3)$ parity for every step of the grid: median over five seeds of the plateau length $T_p$ (thousands of examples) and of its price $C(T_p)$ (thousands of nats) for each width, and log--log slopes against width (least squares on the four medians; in brackets the $2.5$--$97.5$ percentiles of $500$ bootstrap resamples of the seeds). A superscript $(m)$ counts censored runs out of five; $>$ marks a median that is only a lower bound.}\label{tab:grok-sweep}
\footnotesize\setlength{\tabcolsep}{3pt}
\resizebox{\textwidth}{!}{%
\begin{tabular}{l rrrr l rrrr l}
\toprule
 & \multicolumn{5}{c}{$T_p$ (thousands of examples)} & \multicolumn{5}{c}{price (thousands of nats)}\\
\cmidrule(lr){2-6}\cmidrule(lr){7-11}
$\eta$ & 16 & 64 & 256 & 1024 & slope & 16 & 64 & 256 & 1024 & slope\\
\midrule
0.01 & $>$200$^{(5)}$ & $>$200$^{(5)}$ & $>$200$^{(5)}$ & $>$200$^{(4)}$ & -- & $>$139$^{(5)}$ & $>$139$^{(5)}$ & $>$138$^{(5)}$ & $>$135$^{(4)}$ & -- \\
0.03 & 167.2$^{(2)}$ & 152.5 & 103.4 & 77.9 & $-0.19$ {\tiny[$-0.26$,\,$-0.11$]} & 105.1$^{(2)}$ & 96.7 & 65.3 & 52.5 & $-0.18$ {\tiny[$-0.27$,\,$-0.07$]} \\
0.1 & 52.4 & 54.9 & 32.3 & 23.4 & $-0.21$ {\tiny[$-0.38$,\,$-0.11$]} & 33.6 & 35.0 & 21.3 & 32.3 & $-0.04$ {\tiny[$-0.23$,\,$0.08$]} \\
0.3 & 22.2 & 18.9 & 12.0 & 9.1 & $-0.23$ {\tiny[$-0.31$,\,$-0.11$]} & 14.3 & 12.5 & 9.8 & 21.7 & $+0.07$ {\tiny[$-0.03$,\,$0.25$]} \\
1 & 7.5 & 5.3 & 3.9 & 3.2 & $-0.21$ {\tiny[$-0.26$,\,$-0.09$]} & 4.8 & 3.4 & 3.9 & 10.5 & $+0.18$ {\tiny[$0.13$,\,$0.33$]} \\
3 & 3.6 & 2.2 & 1.9 & 1.8 & $-0.16$ {\tiny[$-0.22$,\,$-0.08$]} & 2.1 & 1.5 & 2.6 & 8.5 & $+0.35$ {\tiny[$0.28$,\,$0.43$]} \\
10 & \multicolumn{10}{c}{unstable: median code of the stream above $10^{8}$ nats at every width} \\
30 & \multicolumn{10}{c}{diverges: the loss overflows within the first $7\,168$ examples in every run} \\
\bottomrule
\end{tabular}}
\end{table}

\emph{Other dimensions.} For $(30,3)$ at the same frozen step the plateau is $1.47$--$1.64$ times longer than for $(20,3)$, which corresponds to exponents in $d$ between $0.96$ and $1.21$; with two values of $d$ and bootstrap intervals that run from $0.29$ to $2.25$ this is not an estimate of an exponent. The dependence on width is the same as for $d=20$: slope $-0.16$ [$-0.24$, $-0.11$] for $T_p$ and $+0.33$ [$0.22$, $0.37$] for the price. For $(20,2)$ there is no resolvable plateau: $T_p$ lies between $1\,000$ and $1\,355$ examples in all $20$ runs, at the floor of $1000$ set by the window, and the error before $T_p$ is $0.15$--$0.18$. The median price is still $405$--$7\,350$ nats, $77$ to $1\,401$ times $\ln\binom{20}{2}$.

\emph{Learning-curve calculus.} Item~1 of Proposition~\ref{prop:curves} can be read off the primary runs. With expectations replaced by means over the five seeds and disjoint blocks of $1000$ examples, the number of examples in blocks whose mean loss is at least $\varepsilon_0=(\ln2)/2$ is $3\,000$, $2\,000$, $1\,000$ and $1\,000$ for the four widths, against the bounds $\Gamma_n/\varepsilon_0=6\,409$, $4\,387$, $7\,586$ and $25\,574$ ($n=2\times10^5$). The inequality is arithmetic and cannot fail; the informative number is how much of the bound is used: $47$, $46$, $13$ and $4$ per cent. For the narrow networks this is close to the $50$ per cent that a plateau of height $2\varepsilon_0$ allows; for the wide ones the bound is loose because their plateau is several times higher than the threshold. The pointwise analogue holds in all $272$ runs, and so does Corollary~\ref{cor:mistakes} (the number of mistakes is at most $0.50$ of $C/\ln2$).

\subsection{What this shows and what it does not}

\emph{What it shows.} In single-pass training a delay in sample size has a price that is read off the loss curve in nats and can be set against the ideal code of the class: about seven nats for a learner that knows the class, between $1\,495$ nats and more than $10^5$ nats for gradient descent, depending on width and step. The draft hypothesis is supported in part. A plateau followed by a sudden drop is what Figure~\ref{fig:grok-loss} shows for $k=3$ at both steps; it is tens of thousands of examples long at $\eta=0.1$ and a few thousand at the code-optimal step. The plateau sits at $\ln 2$ only when the step is small for the width; at the code-optimal step the widest network pays $6.62\ln2$ per example. The claim that the price decreases with width is not supported as stated: the plateau length decreases with width at every step (slope about $-0.2$), but the price decreases only at the smallest step, is flat at intermediate steps and increases at the largest ones. As for Conjecture~\ref{conj:scaling}, the effect of width cannot be stated without the parametrisation and the step.

\emph{What it does not show.} This is delayed learning in \emph{sample size} in single-pass training, which the theory covers. Grokking at a fixed sample size over training time \citep{Power2022} is not tested; the fixed-sample variant with weight decay and many epochs, in which the learner is ``train for $\tau$ epochs'', was not run. The scope is one architecture (one hidden layer, ReLU), one parametrisation, plain stochastic gradient descent with a constant step and batches of $32$, $d\le30$, $k\le3$, four widths and five seeds per cell, on a half-decade grid of steps; slopes are fitted to four medians. Steps that scale with width and the mean-field parametrisation were not tried, so whether the price decreases with width when the height is held at $\ln 2$ by construction remains open. $T_p$ has a floor and a resolution of $1000$ examples. Finally, the mixture is ideal for a learner that has been told the class; by Theorem~\ref{thm:conservation} a network that keeps mass on other tasks must pay more, so the regret measured here mixes the cost of search with the cost of not having been told.


\section{What the experiments decide}\label{sec:verdicts}

Table~\ref{tab:verdicts} collects the verdicts of Sections~\ref{sec:mup}--\ref{sec:grok} together with those of Sections~\ref{sec:exp} and~\ref{sec:exp2}. Each verdict refers to the hypothesis stated before the corresponding experiment, at the scale at which it was tested.

\begin{table}[htbp]
  \centering
  \caption{Verdicts. ``Theorem'': a numerical check of a proved statement, which can only fail through an implementation error. ``Supported'', ``refuted'', ``partly'': the status of a hypothesis at the scale of the experiment, with the number that decides it.\label{tab:verdicts}}
  \small
  \begin{tabularx}{\textwidth}{@{}p{0.30\textwidth}lX@{}}
    \toprule
    Statement & Status & Deciding number\\
    \midrule
    Kraft's equality (Thm.~\ref{thm:conservation}) & theorem & largest deviation $3.3\times10^{-16}$ over $313$ new exact codes; $4.4\times10^{-16}$ at $n=16$\\
    Price of class names (Cor.~\ref{cor:names}) & theorem & all measured costs above $\ln(K!/(K-k)!)$ (Table~\ref{tab:sym}, MNIST)\\
    Compression identity (Thm.~\ref{thm:identity}) & theorem & online and test loss within $0.013$ nats on MNIST\\
    Mixture bound (Thm.~\ref{thm:mixture}) & theorem & parity mixture never above $\ln\binom{20}{3}=7.04$ nats (Section~\ref{sec:grok})\\
    \addlinespace
    Conj.~\ref{conj:invariance} (invariance) & survives a first test & MNIST code ratios within $0.86$--$0.96$ (two networks)\\
    Conj.~\ref{conj:envelope} (envelope) & undecided & a simple code explains about half of every bias, Laplace included\\
    Conj.~\ref{conj:scaling} (scale concentrates) & refuted as stated & entropy flat in $\mu$P ($+0.005\pm0.009$ nats/doubling), rising with step $\eta/H$; falls only when the step grows with $H$\\
    Revised conj.\ (movement alone) & refuted & $\mu$P vs NTK at equal movement: $0.82\pm0.11$ nats\\
    \addlinespace
    H1: parametrization fixes the prior; $\mu$P stable & supported & same order in $32/32$ cells; $\mathrm{KL}(Q_{2H}\|Q_H)\propto H^{-1.10\pm0.15}$ in $\mu$P\\
    H2: seed dependence comes from $f_0$ & supported, one discrepancy & $\mu$P slope $-0.97\pm0.13$; centred NTK $-0.49\pm0.15$, not $-1$\\
    Power-law approach to the infinite-width limit & supported for centred, refuted for uncentred & $-0.97\pm0.08$ against $+0.09\pm0.06$; recovered ($-0.96$) given $f_0$\\
    Gradient descent $\approx$ Bayes at infinite width & partly & best tempered gap $0.370$ nats ($4.5\%$ of $n\ln2$); $2.66$ nats untempered\\
    Double descent visible in code length & supported in corrected form & peak at $m=p$ in the increments; median price $3.9$--$176$ nats\\
    Plateau has a price & supported & $1{,}495$--$8{,}500$ nats against $\le7.04$ for the mixture\\
    Price decreases with width & refuted at large step & at $\eta=3$, $(20,3)$: $1{,}495$ nats at $H=64$, $8{,}500$ at $H=1024$\\
    \bottomrule
  \end{tabularx}
\end{table}

\begin{table}[htbp]
  \centering
  \addtocounter{table}{-1}
  \renewcommand{\theHtable}{\thetable.continued}
  \caption{Verdicts (continued): the six experiments of Sections~\ref{sec:icl}--\ref{sec:conjx}. Statuses as in the first part of the table.\label{tab:verdicts2}}
  \small
  \begin{tabularx}{\textwidth}{@{}p{0.31\textwidth}p{0.17\textwidth}X@{}}
    \toprule
    Statement & Status & Deciding number\\
    \midrule
    Kraft's equality (Thm.~\ref{thm:conservation}) & theorem & largest deviation $6.7\times10^{-16}$ over $270$ further exact codes\\
    In-context identity (Thm.~\ref{thm:icl}) & theorem & largest deviation $8.9\times10^{-16}$ nats over $12$ sequence models; $I(\tau;S^{12})=0.752\le H(\pi)=1.280$\\
    Mixture bound (Thm.~\ref{thm:mixture}), pretrained networks & theorem & smallest slack $3.2\times10^{-4}$ nats over $4096$ sequences and four members\\
    \addlinespace
    Tax redistribution (Cor.~\ref{cor:orbit}) & theorem & all orbits of $18$ codes with $K\le5$ and of $48$ codes under $\mathbb Z_6$; Jensen gap $1.4\times10^{-13}$ for equivariant learners\\
    B3: invariant architectures hold more mass on invariant labelings & supported, qualified & $0.896$--$0.982$ against $0.016$ (MLP); orbit-separating labelings only $0.003$--$0.004$\\
    B4: a network treats the translates of a task equally & refuted & Jensen gap $2.61$ nats for the MLP, above $\ln6=1.79$\\
    S1: power-law code length on digits, exponents ordered as on MNIST & observed, not predicted & slopes $0.55$, $0.61$ (networks, std) against $0.80$ (softmax)\\
    S2: $\mu$P code length independent of width & observed, not predicted & widths $64$ and $256$ within $1.5\%$ at every $n$; both under-trained\\
    O2: order moves the whole prior as much as the learner & supported & KL between two orders $0.44$--$0.77$ nats; two seeds $0.57$; widths $8$ and $32$: $0.29$\\
    O3: order sensitivity grows with width & not supported & $0.64$, $0.48$, $0.77$ nats at widths $2$, $8$, $32$\\
    Conj.~\ref{conj:invariance}, $30$ digits tasks & survives a second weak test & ratio spread $1.02$--$1.38$, $r\ge0.972$\\
    Conj.~\ref{conj:invariance}, labeling-wise at $n=12$ & survives, qualified & width-stable learners: $a_0\le3.7$; fixed-step std: $4.1$, $5.1$, $8.1$ at $H=64,128,256$\\
    Conj.~\ref{conj:envelope}, MST-cut code & survives as inequality & $\tilde K\le2C_A+0.83$ for $n=6$--$12$, but $R^2\le0.049$: no explanatory content\\
    Conj.~\ref{conj:envelope}, LZ78 & test invalid at these lengths & LZ78 length $\ge11.51$ nats on every labeling, above the uniform $8.32$\\
    \bottomrule
  \end{tabularx}
\end{table}


\begin{figure}[htbp]
\centering
\begin{tikzpicture}
\begin{axis}[width=0.86\textwidth,height=5.8cm,xbar,bar width=9pt,xmin=0,xmax=9.2,
  symbolic y coords={std step $\eta$,$\mu$P,NTK,NTK centred,std step $\eta/H$},ytick=data,y dir=reverse,
  xlabel={entropy of the implicit prior at $H=256$, $n=12$ (nats)},nodes near coords,nodes near coords style={font=\scriptsize},
  enlarge y limits=0.15,legend pos=south east,legend cell align=left]
\addplot[fill=nnblue,draw=nnblue!70!black] coordinates {(1.51,std step $\eta$) (3.64,$\mu$P) (4.77,NTK) (4.84,NTK centred) (6.87,std step $\eta/H$)};
\addplot[nngray,thick,dotted,sharp plot,nodes near coords={}] coordinates {(8.318,std step $\eta$) (8.318,std step $\eta/H$)};
\end{axis}
\end{tikzpicture}
\caption{One network, five parametrizations, five priors: entropy of the exact implicit prior on all $4096$ labelings at width $256$ (mean over four runs; Table~\ref{tab:mup-summary}). The dotted line is $12\ln2=8.32$ nats, the entropy of a learner that does not learn. The same architecture and the same Gaussian draws spend their unit of mass very differently depending only on the output multiplier, the readout scale and the step.\label{fig:verdicts-param}}
\end{figure}

Three points stand out. First, every theorem that was checked holds to rounding error, on every learner, as it must; this is what makes the code length usable as a unit of account. Second, the one conjecture that the exact protocol can decide at small scale, Conjecture~\ref{conj:scaling}, does not survive. Its apparent support in the standard parametrization came from a protocol in which the step in function space grows with the width; when the step is held fixed the entropy of the prior does not decrease, and in the maximal-update scaling the whole prior converges to a width-independent limit (Figure~\ref{fig:verdicts-param} shows how far apart the five priors end up at width $256$). Width, in these experiments, does not concentrate the prior; what concentrates it is how far training moves the function, but not in a way that is captured by the movement alone, since learners with equal movement differ by most of a nat. Third, the departures of finite networks from simple limits are measurable to $10^{-3}$ nats, which turns statements such as ``wide networks behave like kernels'' or ``gradient descent is almost Bayesian'' into numbers with error bars.

\paragraph{The six further experiments.} The programme in which the experiments above were designed included six more, which the previous version of this paper listed as planned and not reported. They have now been run and checked, and they occupy the rest of this section (Table~\ref{tab:overview2}); their verdicts are in the continuation of Table~\ref{tab:verdicts}. Each follows the format of Sections~\ref{sec:mup}--\ref{sec:grok}: the design and the hypotheses, which were written in the header of the script before it was run (Section~\ref{sec:scal} is the exception and says so), then the results, then what they show and what they do not. The compute available was two CPU cores, and the designs are scaled to it; every reduction with respect to the plan is stated where it occurs. The exact experiments at $n=10$ use the inputs and the initializations of Section~\ref{sec:exp}, those at $n=12$ the inputs of Section~\ref{sec:mup}, and all use the library of Appendix~\ref{app:lib} with the utilities of Appendix~\ref{app:six}. Over the $270$ exact codes computed for these six experiments the largest deviation from Kraft's equality is $6.7\times10^{-16}$.

\begin{table}[htbp]
  \centering
  \caption{The six experiments of Sections~\ref{sec:icl}--\ref{sec:conjx}, in the format of Table~\ref{tab:overview}.\label{tab:overview2}}
  \small
  \begin{tabularx}{\textwidth}{@{}r l X l@{}}
    \toprule
    & Section & Statement of the theory that is tested & Method\\
    \midrule
    5 & \ref{sec:icl} & Theorems~\ref{thm:icl} and~\ref{thm:mixture}: the in-context identity and the mixture bound on a finite task family with a transfer matrix & exact, $n=12$\\
    6 & \ref{sec:arch} & Corollary~\ref{cor:orbit} and Section~\ref{sec:neural}: priors of convolutional, residual and attention architectures on translation orbits & exact, $n=12$\\
    7 & \ref{sec:scal} & Proposition~\ref{prop:curves}, item 4, and Conjecture~\ref{conj:invariance}: scaling curves and task ratios on the digits data & block-wise, $n\le1797$\\
    8 & \ref{sec:order} & Order dependence of the whole prior (protocol, step 5) & exact, $n=10$\\
    9 & \ref{sec:tax} & Corollary~\ref{cor:orbit}: redistribution of the symmetry tax & exact, $n=8$, $10$\\
    10 & \ref{sec:conjx} & Conjectures~\ref{conj:invariance} and~\ref{conj:envelope} on the priors of Section~\ref{sec:mup} & exact, $n=6$--$12$\\
    \bottomrule
  \end{tabularx}
\end{table}

% ==========================================================================================
% Experiment "icl"
% ==========================================================================================
\subsection{The in-context identity on a finite task family}\label{sec:icl}

\paragraph{Design.} Theorem~\ref{thm:icl} is an identity between quantities that can all be computed exactly when the sequences are the labelings of a small input set. We took the first input set of Section~\ref{sec:mup} ($n=12$, $\mathcal N(0,I_3)$) and four tasks, each a noisy half-space: under task $\tau$ the labels are independent with $\PP[y_i=1]=\sigma(3\,w_\tau\cdot x_i)$, where $w_1=e_1$, $w_2=(e_1+e_2)/\sqrt2$, $w_3=e_2$ and $w_4=-e_1$. Tasks $1$ and $2$ are close ($\KLd{P_1}{P_2}=0.59$ nats), tasks $1$ and $4$ are opposite ($29.52$ nats). The task prior is $\pi=(0.4,0.3,0.2,0.1)$, with entropy $H(\pi)=1.280$ nats. Every $P_\tau$ and every sequence model below is a distribution on the $4096$ label sequences, so both sides of~\eqref{eq:icl} are finite sums with no sampling. The sequence models are: the Bayes mixture $M_\pi$; the mixture with uniform task weights; the uniform code; the Laplace and logistic-regression learners of Section~\ref{sec:exp}; the network~\eqref{eq:net} of width $16$ in the standard parametrization, trained from scratch on each prefix; four \emph{pretrained} networks $B_1,\dots,B_4$, where $B_k$ is the same network after $200$ full-batch steps on $64$ fresh examples of task $k$, used as the initialization from which the learner takes its $60$ steps on every prefix; the mixture of $B_1,\dots,B_4$ with weights $\pi$ (Theorem~\ref{thm:mixture}); and one network pretrained in the same way on $64$ examples whose tasks are drawn from $\pi$. The \emph{transfer matrix} is $T_{\tau k}=\KLd{P_\tau}{Q_{B_k}}$: the regret on task $\tau$ of the network pretrained on task $k$. Nothing here is a hypothesis: the experiment is a check of two theorems, and what is measured, not predicted, is the size of the terms.

\paragraph{Results.} Kraft's equality holds for the twelve models to $6.7\times10^{-16}$. The identity~\eqref{eq:icl} holds for every model with a largest deviation of $8.9\times10^{-16}$ nats (Table~\ref{tab:icl}). The first term is $I(\tau;S^{12})=0.752$ nats, $59\%$ of $H(\pi)$, and item~2 of the theorem holds task by task: $\KLd{P_\tau}{M_\pi}=0.43$, $0.35$, $1.22$, $2.30$ nats against $\ln(1/\pi(\tau))=0.92$, $1.20$, $1.61$, $2.30$; the bound is almost attained by task~$4$, which the other three do not resemble. The second term, the pretraining gap $\KLd{M_\pi}{Q}$, is what separates the models: $0.10$ nats for the mixture with the wrong task weights, $2.33$ for logistic regression, $3.52$ for the uniform code, $4.35$ for Laplace and $6.08$ for the network trained from scratch.

\begin{table}[htbp]
  \centering
  \caption{Theorem~\ref{thm:icl}, exactly, on four tasks and all $4096$ label sequences ($n=12$). Columns $1$--$4$: regret $\KLd{P_\tau}{Q}$ on each task (nats); avg.: $\sum_\tau\pi(\tau)\KLd{P_\tau}{Q}$; gap: $\KLd{M_\pi}{Q}$; dev.: avg.\ $-\,I(\tau;S^n)-$ gap, with $I(\tau;S^n)=0.752$.\label{tab:icl}}
  \small
  \begin{tabularx}{\textwidth}{@{}l*{4}{Z}ZZZ@{}}
    \toprule
    Sequence model $Q$ & task 1 & task 2 & task 3 & task 4 & avg. & gap & dev.\\
    \midrule
    Bayes mixture $M_\pi$ & 0.43 & 0.35 & 1.22 & 2.30 & 0.752 & 0.000 & $1.1\times10^{-16}$\\
    mixture, uniform weights & 0.79 & 0.60 & 1.08 & 1.38 & 0.848 & 0.096 & $2.1\times10^{-16}$\\
    uniform code & 4.72 & 4.72 & 2.48 & 4.72 & 4.270 & 3.519 & $-4.4\times10^{-16}$\\
    Laplace & 5.62 & 5.58 & 3.10 & 5.62 & 5.104 & 4.353 & 0\\
    LogReg & 2.80 & 2.78 & 4.22 & 2.80 & 3.080 & 2.328 & 0\\
    MLP-16, from scratch & 6.83 & 5.95 & 8.96 & 5.27 & 6.834 & 6.083 & $8.9\times10^{-16}$\\
    MLP-16 pretrained on task 1 & 4.30 & 5.17 & 12.27 & 14.94 & 7.220 & 6.468 & $8.9\times10^{-16}$\\
    MLP-16 pretrained on task 2 & 4.66 & 4.01 & 8.84 & 12.73 & 6.111 & 5.360 & 0\\
    MLP-16 pretrained on task 3 & 7.05 & 5.74 & 6.79 & 9.13 & 6.815 & 6.063 & $8.9\times10^{-16}$\\
    MLP-16 pretrained on task 4 & 15.24 & 13.51 & 13.41 & 4.21 & 13.250 & 12.499 & 0\\
    mixture of the four pretrained & 4.16 & 3.96 & 7.39 & 6.18 & 4.947 & 4.196 & $-8.9\times10^{-16}$\\
    MLP-16 pretrained on pooled tasks & 5.50 & 4.96 & 6.91 & 6.44 & 5.714 & 4.962 & 0\\
    \bottomrule
  \end{tabularx}
\end{table}

The networks are poor sequence models of these tasks: the network trained from scratch has an average regret of $6.83$ nats, above the $4.27$ nats of the uniform code. The tasks are noisy, and a network that fits each prefix for $60$ steps is overconfident on the next label; the log loss charges this in full. Pretraining moves the regret in the way Corollary~\ref{cor:pretrain} and Theorem~\ref{thm:conservation} describe (Table~\ref{tab:transfer}). On its own task a pretrained network costs $4.01$--$6.79$ nats, less than the network from scratch on every task (task~1: $4.30$ against $6.83$). On a neighbouring task it still helps ($T_{12}=4.66$, $T_{21}=5.17$). On the opposite task it costs $T_{14}=15.24$ and $T_{41}=14.94$ nats, more than twice the cost from scratch: the mass that pretraining deposits on one half-space is withdrawn from its complement. The mixture of the four pretrained networks satisfies~\eqref{eq:mixture} on every sequence and for every $k$, with a smallest slack of $3.2\times10^{-4}$ nats, so the bound is attained to that precision on some sequences; the sequential form of the mixture predictor in Theorem~\ref{thm:mixture} reproduces $\sum_kw_kQ_{B_k}$ to $3.6\times10^{-15}$. Its average regret, $4.95$ nats, is below that of each of its members ($6.11$--$13.25$) and below that of the single network pretrained on pooled tasks ($5.71$), which has no means of telling the tasks apart other than retraining.

\begin{table}[htbp]
  \centering
  \caption{Transfer matrix $T_{\tau k}=\KLd{P_\tau}{Q_{B_k}}$ in nats: regret on task $\tau$ (row) of the network pretrained on task $k$ (column); the diagonal is in bold. Mixture: regret of $\sum_k\pi(k)Q_{B_k}$; bound: $\min_k\bigl[T_{\tau k}+\ln(1/\pi(k))\bigr]$, which Theorem~\ref{thm:mixture} places above it; scratch: the same network without pretraining.\label{tab:transfer}}
  \begin{tabularx}{\textwidth}{@{}lZZZZZZZ@{}}
    \toprule
    & $B_1$ & $B_2$ & $B_3$ & $B_4$ & mixture & bound & scratch\\
    \midrule
    task 1 ($\pi=0.4$) & \textbf{4.30} & 4.66 & 7.05 & 15.24 & 4.16 & 5.22 & 6.83\\
    task 2 ($\pi=0.3$) & 5.17 & \textbf{4.01} & 5.74 & 13.51 & 3.96 & 5.22 & 5.95\\
    task 3 ($\pi=0.2$) & 12.27 & 8.84 & \textbf{6.79} & 13.41 & 7.39 & 8.40 & 8.96\\
    task 4 ($\pi=0.1$) & 14.94 & 12.73 & 9.13 & \textbf{4.21} & 6.18 & 6.51 & 5.27\\
    \bottomrule
  \end{tabularx}
\end{table}

\begin{figure}[htbp]
\centering
\begin{tikzpicture}
\begin{axis}[width=0.8\textwidth,height=6.2cm,xmin=1,xmax=12,ymin=0,ymax=7.2,xlabel={context length $t$},ylabel={average regret $\sum_\tau\pi(\tau)\,\mathrm{KL}(P_\tau\|Q)$ on $S^t$ (nats)},
  legend pos=north west,legend cell align=left,xtick={1,2,...,12}]
\addplot[nnorange,thick,mark=square*,mark size=1.1pt] coordinates {(1,0.014353) (2,1.689) (3,3.1989) (4,4.5144) (5,4.9235) (6,5.1859) (7,5.5131) (8,6.0015)
(9,6.2232) (10,6.3841) (11,6.5524) (12,6.8345)};
\addlegendentry{MLP-16 from scratch}
\addplot[nnviolet,thick,dashed,mark=diamond*,mark size=1.3pt,mark options={solid}] coordinates {(1,0.055205) (2,1.829) (3,2.7437) (4,3.1315) (5,3.5049) (6,3.7915) (7,4.1214) (8,4.6751)
(9,4.9027) (10,5.1215) (11,5.3421) (12,5.7137)};
\addlegendentry{pretrained on pooled tasks}
\addplot[nnaqua,thick,dashdotted,mark=triangle*,mark size=1.4pt,mark options={solid}] coordinates {(1,0.015429) (2,1.6993) (3,2.0351) (4,2.3029) (5,2.6485) (6,2.99) (7,3.3826) (8,3.881)
(9,4.1431) (10,4.3578) (11,4.5761) (12,4.9471)};
\addlegendentry{mixture of four pretrained}
\addplot[nnblue,thick,mark=*,mark size=1.2pt] coordinates {(1,0.012485) (2,0.07107) (3,0.32917) (4,0.39187) (5,0.4944) (6,0.50355) (7,0.53484) (8,0.70745)
(9,0.72677) (10,0.7335) (11,0.74772) (12,0.75152)};
\addlegendentry{Bayes mixture: $I(\tau;S^t)$}
\addplot[nngray,thick,dotted] coordinates {(1,1.280) (12,1.280)};
\addlegendentry{$H(\pi)$}
\end{axis}
\end{tikzpicture}
\caption{In-context regret against context length, from the exact marginals of the twelve-point codes. The Bayes mixture pays the mutual information $I(\tau;S^t)$, which stays below $H(\pi)=1.280$ nats (dotted) for every $t$; by~\eqref{eq:icl} the vertical distance of any other curve from it is the pretraining gap $\mathrm{KL}(M_\pi\|Q)$ at that length.\label{fig:icl}}
\end{figure}

\paragraph{What this shows and what it does not.} The identity of Theorem~\ref{thm:icl} and the bound of Theorem~\ref{thm:mixture} hold to rounding error on every model, including gradient-trained networks, as they must. The decomposition is informative at this scale: the unavoidable term is under one nat and bounded by $H(\pi)$ (Figure~\ref{fig:icl}), while the gap of the networks grows with the context length. The experiment says nothing about transformers that learn in context: the ``pretrained models'' here are small networks that are retrained on each prefix, and the task family has four members. What it establishes is the accounting, and one measured fact about it, that transfer between tasks is signed and can cost more than it saves.

% ==========================================================================================
% Experiment "arch"
% ==========================================================================================
\subsection{Convolutional, residual and attention architectures on translation orbits}\label{sec:arch}

\paragraph{Design.} Section~\ref{sec:neural} argued that an architecture is a choice of which symmetries to pay for. Here the symmetry is the cyclic group $\mathbb Z_6$ of translations of a vector of length six. An input set consists of two vectors $b_1,b_2\sim\mathcal N(0,I_6)$ and all their cyclic shifts: $n=12$ points forming two orbits, presented in a random order drawn once. The group permutes the inputs, hence it acts on the $4096$ labelings of the input set, $(g\cdot y)(x)=y(g^{-1}x)$; there are $700$ orbits of labelings, of which $670$ have six elements and four have one (the labelings that are constant on each input orbit). Six learners are compared, all with a scalar logit and all trained from scratch on each prefix by $60$ full-batch gradient steps of size $0.5$, as in Section~\ref{sec:exp}: the network~\eqref{eq:net} of width $16$ (MLP-16); the same with one skip connection \citep{He2016}, $v\cdot(h+\tanh(W_2h))$, $h=\tanh(W_1[x,1])$ (ResNet-16); a circular convolution \citep{LeCun1998} with kernel $3$ and $8$ $\tanh$ channels followed by a linear read-out of all $48$ features (CNN, flat read-out); the same convolution followed by global average pooling and a linear read-out (CNN, pooled); and one head of dot-product self-attention \citep{Vaswani2017} over the six coordinates, each embedded as $\tanh(a\,x_i+c)\in\mathbb R^8$, followed by mean pooling and a linear read-out, with and without a learned positional embedding. The pooled CNN and the attention network without positions compute functions that are invariant under translations for every value of their parameters; the other four do not. We used two input sets and four seeds, $48$ exact codes, and six more on shifted inputs for the check below. This experiment is written in PyTorch \citep{Paszke2019}: the prefixes of equal length are trained as one batch and the gradient of each is obtained by automatic differentiation.

Four statements were fixed with the design. \textbf{B1} (a check): for the two invariant learners the whole code is unchanged when every input is shifted, $Q(\cdot\mid g\,x^n)=Q(\cdot\mid x^n)$. \textbf{B2} (a theorem): Corollary~\ref{cor:orbit} holds on every orbit of labelings for every learner. \textbf{B3}: the invariant learners put more mass than the MLP on the four invariant labelings. \textbf{B4}: the learners that are not invariant treat the six translates of a task almost equally, in the sense that the Jensen gap of~\eqref{eq:orbit}, the mean cost of an orbit minus $\ln|G\cdot y|-\ln Q(G\cdot y)$, is small against $\ln6=1.79$ nats.

\paragraph{Results.} Kraft's equality holds for the $54$ codes to $2.2\times10^{-16}$. As a check of the new implementation, the PyTorch MLP with a given initialization reproduces the code of the NumPy library of Appendix~\ref{app:lib} on all $4096$ labelings to $2.1\times10^{-14}$ nats. Table~\ref{tab:arch} gives the summary and Table~\ref{tab:arch-kl} the exchange rates.

\begin{table}[htbp]
  \centering
  \caption{Exact implicit priors of six architectures on two $\mathbb Z_6$-orbits ($n=12$; means over two input sets and four seeds). $H(Q_A)$: entropy, mean $\pm$ s.d.\ (no learning: $8.32$); inv.: mass on the four translation-invariant labelings; orbit task: cost of the labeling that names the orbit of each input; sign task: mean [cheapest, dearest] cost of the six translates of $y=\mathbb 1[x_1>0]$; min: smallest orbit-mean cost over all six-element orbits and all runs (Corollary~\ref{cor:orbit}: at least $\ln6=1.79$); gap: mean Jensen gap of the six-element orbits; shift: largest change of a code length when all inputs are shifted (nats).\label{tab:arch}}
  \small
  \begin{tabularx}{\textwidth}{@{}lZZZ>{\centering\arraybackslash}p{2.9cm}ZZZ@{}}
    \toprule
    Learner & $H(Q_A)$ & inv. & orbit task & sign task & min & gap & shift\\
    \midrule
    MLP-16 & $4.10\pm0.41$ & 0.016 & 23.2 & 10.2 [7.9, 12.9] & 3.39 & 2.61 & 8.5\\
    ResNet-16 & $3.27\pm0.35$ & 0.006 & 28.3 & 12.5 [9.1, 15.8] & 3.78 & 4.28 & 19.5\\
    CNN, flat read-out & $2.46\pm1.32$ & 0.642 & 22.4 & 11.6 [9.4, 14.2] & 4.28 & 2.65 & 7.9\\
    CNN, pooled & $1.52\pm0.11$ & 0.896 & 6.9 & 12.9 [12.0, 14.0] & 5.67 & 0.28 & $<10^{-12}$\\
    Attention + pos. & $0.83\pm0.08$ & 0.978 & 25.7 & 20.1 [11.4, 31.4] & 6.82 & 6.12 & 30.0\\
    Attention & $0.88\pm0.03$ & 0.982 & 8.3 & 15.8 [14.0, 18.5] & 7.63 & 0.82 & $7.3\times10^{-6}$\\
    \bottomrule
  \end{tabularx}
\end{table}

\begin{table}[htbp]
  \centering
  \caption{Exact exchange rates $\KLd{Q_B}{Q_A}$ in nats between the six architectures (row $A$, column $B$; means over the eight runs).\label{tab:arch-kl}}
  \small
  \begin{tabularx}{\textwidth}{@{}lZZZZZZ@{}}
    \toprule
    $A\ \backslash\ B$ & MLP & ResNet & CNN flat & CNN pooled & Attn + pos. & Attn\\
    \midrule
    MLP-16 & 0.00 & 0.89 & 3.57 & 4.94 & 4.89 & 4.94\\
    ResNet-16 & 1.05 & 0.00 & 5.19 & 6.81 & 6.60 & 6.63\\
    CNN, flat read-out & 3.32 & 4.04 & 0.00 & 1.00 & 0.86 & 0.80\\
    CNN, pooled & 7.94 & 8.92 & 2.20 & 0.00 & 0.21 & 0.09\\
    Attention + pos. & 13.40 & 14.92 & 4.00 & 0.71 & 0.00 & 0.15\\
    Attention & 10.55 & 11.70 & 3.06 & 0.15 & 0.11 & 0.00\\
    \bottomrule
  \end{tabularx}
\end{table}

\emph{B1.} For the pooled CNN the code on the shifted inputs agrees with the original to $5.3\times10^{-15}$ nats. For the attention network the agreement is $7.3\times10^{-6}$ nats, far from rounding level. We traced this to the training and not to the architecture: at initialization the functions on the two input sets agree to $1.4\times10^{-17}$, the trained logits still agree to $8.9\times10^{-16}$ after $40$ steps and differ by $2.9\times10^{-8}$ after $60$, so the last steps of some prefixes amplify rounding errors by many orders of magnitude. The invariance holds, and the check shows that the attention learner is in an unstable large-step regime at step size $0.5$. For the four other learners shifting the inputs changes code lengths by up to $8$--$30$ nats.

\emph{B2.} Both inequalities of~\eqref{eq:orbit} hold on all orbits of all $48$ codes; the first has a smallest slack of $1.1\times10^{-16}$ (rounding) and the second of $0.34$ nats. The smallest orbit-mean cost of a six-element orbit is $3.39$ nats for the MLP and $7.63$ for the attention network, against the tax of $1.79$.

\emph{B3} is supported, with a qualification that changes its meaning. The invariant labelings carry $0.016$ of the mass of the MLP and $0.006$ of the ResNet, against $0.896$ for the pooled CNN and $0.982$ for the attention network. But almost all of that mass is on the two \emph{constant} labelings: the two labelings that separate the orbits carry $0.003$ and $0.004$. The task that an invariant architecture is built for, naming the orbit, costs the pooled CNN $6.9$ nats, less than a third of what it costs the MLP ($23.2$) but only $8.32$ nats would be paid without learning. Invariance removed the penalty; within $60$ steps it did not buy the task. The flat-readout CNN and the attention network with positions, which are not invariant, also concentrate on the constant labelings ($0.642$ and $0.978$), so the concentration is a property of these learners at this training length more than of invariance. The exchange rates show two clusters, \{MLP, ResNet\} within about one nat of each other and \{pooled CNN, attention with and without positions\} within $0.1$--$0.7$ nats, the flat-readout CNN between them, and a distance of $5$--$15$ nats across (Figure~\ref{fig:arch}).

\emph{B4} is refuted. A single-seed MLP is not symmetric under translations: the mean Jensen gap of its six-element orbits is $2.61$ nats, larger than the tax itself, and the six translates of $\mathbb 1[x_1>0]$ cost it between $7.9$ and $12.9$ nats on average. The gap is small only for the two invariant learners ($0.28$ and $0.82$ nats), where it is not zero because the translates of a labeling present their labels in different orders.

\begin{figure}[htbp]
\centering
\begin{tikzpicture}
\begin{axis}[width=0.8\textwidth,height=6.4cm,xmode=log,log basis x=2,xmin=1,xmax=4096,ymin=0,ymax=1.02,
  xtick={1,4,16,64,256,1024,4096},xticklabels={1,4,16,64,256,1024,4096},xlabel={number of labelings, cheapest first},ylabel={cumulative mass},legend pos=south east,legend cell align=left,legend columns=2]
\addplot[nnblue,thick,mark=*,mark size=1.1pt] coordinates {(1,0.19422) (2,0.2898) (3,0.36855) (4,0.41822) (6,0.49459) (8,0.54252) (11,0.5998) (16,0.67385)
(23,0.7426) (32,0.79896) (45,0.851) (64,0.89767) (91,0.93528) (128,0.96222) (181,0.9816) (256,0.99276)
(362,0.99765) (512,0.9993) (724,0.99983) (1024,0.99997) (2048,1) (4096,1)};
\addlegendentry{MLP-16}
\addplot[nnviolet,thick,dashed,mark=diamond*,mark size=1.2pt,mark options={solid}] coordinates {(1,0.25402) (2,0.37838) (3,0.45035) (4,0.51278) (6,0.60364) (8,0.66303) (11,0.72349) (16,0.79743)
(23,0.85707) (32,0.90075) (45,0.93255) (64,0.95878) (91,0.97798) (128,0.98996) (181,0.99621) (256,0.99889)
(362,0.99974) (512,0.99995) (724,0.99999) (1024,1) (2048,1) (4096,1)};
\addlegendentry{ResNet-16}
\addplot[nnyellow,thick,mark=square*,mark size=1.0pt] coordinates {(1,0.3885) (2,0.63231) (3,0.66379) (4,0.68699) (6,0.72292) (8,0.74968) (11,0.78363) (16,0.82162)
(23,0.85484) (32,0.88537) (45,0.91442) (64,0.93893) (91,0.96076) (128,0.97815) (181,0.98937) (256,0.99603)
(362,0.99889) (512,0.99978) (724,0.99997) (1024,1) (2048,1) (4096,1)};
\addlegendentry{CNN, flat read-out}
\addplot[nnorange,thick,dashed,mark=square*,mark size=1.0pt,mark options={solid}] coordinates {(1,0.54225) (2,0.89632) (3,0.90151) (4,0.90607) (6,0.91431) (8,0.92127) (11,0.93016) (16,0.94163)
(23,0.94963) (32,0.95382) (45,0.95828) (64,0.96291) (91,0.96758) (128,0.97175) (181,0.97565) (256,0.97924)
(362,0.98266) (512,0.98576) (724,0.98843) (1024,0.99108) (2048,0.99608) (4096,1)};
\addlegendentry{CNN, pooled}
\addplot[nnmagenta,thick,mark=triangle*,mark size=1.3pt] coordinates {(1,0.56456) (2,0.97739) (3,0.98171) (4,0.9849) (6,0.98814) (8,0.98991) (11,0.99165) (16,0.99376)
(23,0.99585) (32,0.99734) (45,0.9985) (64,0.99923) (91,0.99963) (128,0.99983) (181,0.99993) (256,0.99997)
(362,0.99999) (512,1) (724,1) (1024,1) (2048,1) (4096,1)};
\addlegendentry{Attention + pos.}
\addplot[nnaqua,thick,dashdotted,mark=triangle*,mark size=1.3pt,mark options={solid}] coordinates {(1,0.49888) (2,0.98302) (3,0.98393) (4,0.9847) (6,0.98608) (8,0.98729) (11,0.98887) (16,0.99087)
(23,0.99231) (32,0.99294) (45,0.99367) (64,0.99445) (91,0.99524) (128,0.99589) (181,0.99643) (256,0.99698)
(362,0.9975) (512,0.99795) (724,0.99835) (1024,0.99874) (2048,0.99946) (4096,1)};
\addlegendentry{Attention}
\end{axis}
\end{tikzpicture}
\caption{Where six architectures put their unit of mass on the same twelve inputs: cumulative mass of the exact implicit prior over the $4096$ labelings sorted from cheapest to most expensive (first input set, mean over four seeds). The format is that of Figure~\ref{fig:concept}, right.\label{fig:arch}}
\end{figure}

\paragraph{What this shows and what it does not.} The exact protocol extends to architectures with weight sharing, skip connections and attention at no extra cost, and Corollary~\ref{cor:orbit} holds on each of them. The priors of the six architectures are far apart, by up to $15$ nats. The experiment does not show that equivariant architectures learn translation-invariant tasks cheaply: on two orbits and with $60$ steps, the invariant learners mostly predict a constant. It does not test Theorem~\ref{thm:symmetry} for the MLP either, whose invariance under orthogonal maps of the input holds for the seed-averaged code only; four seeds are far from that average, and the single-seed gap measured here is the size of what the average would have to remove.

% ==========================================================================================
% Experiment "scal"
% ==========================================================================================
\subsection{Block-wise prequential scaling curves on the digits data}\label{sec:scal}

\paragraph{Design.} The data are the $1797$ images of handwritten digits ($8\times8$ pixels, ten classes) distributed with scikit-learn \citep{Pedregosa2011}. The examples are presented in a random order in blocks of $16$. Before each block the learner is trained \emph{from scratch} on all the examples seen so far, by $60$ full-batch gradient steps on the mean cross-entropy, and then predicts the $16$ labels of the block; the first block is predicted by the untrained network. The sum of the log losses is the code length of a learner in the sense of Definition~\ref{def:learner}, the block-wise retraining code of \citet{BlierOllivier2018} with $113$ retrainings; it is the learner of the exact experiments, not the single-pass learner of the MNIST study of Section~\ref{sec:exp2}, and the two are compared with that difference in mind. Inputs are the pixel values divided by $16$, minus the mean image. Five pipelines are run: zero-initialized softmax regression with step $0.5$, and the network~\eqref{eq:net} with ten softmax outputs at widths $64$ and $256$, in the standard and in the maximal-update scaling of Table~\ref{tab:params} with $\eta=0.5$ (steps $\eta$ and $\eta H$). Each pipeline is run on five orders, with the seed of the network tied to the order, and the code length is read at $n=16,32,\dots,1024$ and $1797$. As a control each pipeline is run once on shuffled labels. For Conjecture~\ref{conj:invariance} we built $30$ binary tasks by splitting the ten digits into two groups of five, as in Section~\ref{sec:exp2}, and ran the five pipelines on each, on one order and all $1797$ examples: $180$ runs in total, written in PyTorch, about $50$ minutes on two CPU cores. No step size was tuned: the steps are those of Section~\ref{sec:mup}, which is the point of the comparison and its main limitation.

Unlike in the other experiments of this section, only the design was fixed before the run. The three statements below were formulated when the results were read, so they are readings of the results and not tests of predictions: \textbf{S1}, the code length grows as a power of $n$ with an exponent below one for every pipeline, and the exponent $1-\alpha$ is smaller for the networks than for softmax regression, as on MNIST (Table~\ref{tab:identity}); \textbf{S2}, in $\mu$P the code length does not depend on the width, as H1 of Section~\ref{sec:mup} suggests; \textbf{S3}, the ratios of code lengths between pipelines stay within a bounded range over the $30$ tasks, with a spread no larger than on MNIST (Table~\ref{tab:inv}).

\paragraph{Results.} Tables~\ref{tab:scal} and~\ref{tab:scal2} and Figure~\ref{fig:scal} give the scaling curves.

\begin{table}[htbp]
  \centering
  \caption{Block-wise prequential code lengths on the digits data, in nats, at a geometric grid of sample sizes (means over five orders; at $n=1797$ mean $\pm$ s.d.). The uniform code costs $n\ln10$, that is $4{,}138$ nats at $n=1797$.\label{tab:scal}}
  \small
  \begin{tabularx}{\textwidth}{@{}l*{7}{Z}c@{}}
    \toprule
    Pipeline & 16 & 32 & 64 & 128 & 256 & 512 & 1024 & 1797\\
    \midrule
    Softmax & 37 & 61 & 92 & 138 & 220 & 376 & 675 & $1{,}124\pm7$\\
    MLP-64, std & 37 & 62 & 87 & 119 & 162 & 242 & 384 & $597\pm15$\\
    MLP-256, std & 37 & 63 & 88 & 117 & 153 & 220 & 332 & $500\pm24$\\
    MLP-64, $\mu$P & 37 & 63 & 106 & 181 & 329 & 619 & 1{,}188 & $2{,}049\pm23$\\
    MLP-256, $\mu$P & 37 & 63 & 106 & 181 & 326 & 612 & 1{,}173 & $2{,}019\pm17$\\
    \bottomrule
  \end{tabularx}
\end{table}

\begin{table}[htbp]
  \centering
  \caption{Summary at $n=1797$. Rate: nats per example over the whole stream and over the examples after the $1024$-th (last); mistakes and the bound $C_A/\ln2$ of Corollary~\ref{cor:mistakes}; slope: least-squares slope of $\ln C_A$ on $\ln n$ for $n\ge128$, mean $\pm$ s.d.\ over orders (it estimates $1-\alpha$ when $H^\ast$ is taken to be zero); shuffled: excess over the uniform code on shuffled labels; names: smallest loss paid, over the five orders, on the first occurrences of the ten classes ($\ln10!=15.10$).\label{tab:scal2}}
  \footnotesize
  \setlength{\tabcolsep}{4pt}
  \begin{tabular}{@{}lcccccccc@{}}
    \toprule
    Pipeline & rate & of uniform & last & mistakes & $C_A/\ln2$ & slope & shuffled & names\\
    \midrule
    Softmax & 0.625 & 27.2\% & 0.580 & 191 & 1{,}621 & $0.80\pm0.04$ & $+106$ & 23.0\\
    MLP-64, std & 0.332 & 14.4\% & 0.275 & 145 & 861 & $0.61\pm0.06$ & $+241$ & 22.9\\
    MLP-256, std & 0.278 & 12.1\% & 0.217 & 134 & 721 & $0.55\pm0.06$ & $+373$ & 22.7\\
    MLP-64, $\mu$P & 1.140 & 49.5\% & 1.114 & 183 & 2{,}957 & $0.92\pm0.02$ & $+42$ & 23.0\\
    MLP-256, $\mu$P & 1.124 & 48.8\% & 1.095 & 169 & 2{,}913 & $0.92\pm0.02$ & $+41$ & 23.0\\
    \bottomrule
  \end{tabular}
\end{table}

\begin{figure}[htbp]
\centering
\begin{tikzpicture}
\begin{axis}[width=0.8\textwidth,height=6.6cm,xmode=log,ymode=log,log basis x=2,xmin=16,xmax=1797,ymin=30,ymax=5000,
  xtick={16,32,64,128,256,512,1024,1797},xticklabels={16,32,64,128,256,512,1024,1797},xlabel={number of examples $n$},ylabel={code length $C_A$ (nats)},legend pos=north west,legend cell align=left]
\addplot[nngray,thick,dotted] coordinates {(16,36.841) (32,73.683) (64,147.37) (128,294.73) (256,589.46) (512,1178.9) (1024,2357.8) (1797,4137.7)};
\addlegendentry{uniform code, $n\ln10$}
\addplot[nnviolet,thick,dashed,mark=diamond*,mark size=1.3pt,mark options={solid}] coordinates {(16,36.751) (32,63.402) (64,105.79) (128,181.47) (256,328.92) (512,618.53) (1024,1188.4) (1797,2049.4)};
\addlegendentry{MLP-64, $\mu$P}
\addplot[nnmagenta,thick,dashdotted,mark=triangle*,mark size=1.3pt,mark options={solid}] coordinates {(16,36.85) (32,63.463) (64,105.51) (128,180.81) (256,326.13) (512,611.57) (1024,1173.2) (1797,2019.4)};
\addlegendentry{MLP-256, $\mu$P}
\addplot[nnaqua,thick,mark=triangle*,mark size=1.3pt] coordinates {(16,36.841) (32,61.3) (64,91.668) (128,137.99) (256,219.7) (512,375.91) (1024,675.21) (1797,1123.7)};
\addlegendentry{Softmax}
\addplot[nnblue,thick,mark=*,mark size=1.1pt] coordinates {(16,36.597) (32,61.515) (64,87.041) (128,118.72) (256,161.84) (512,241.73) (1024,384.35) (1797,596.89)};
\addlegendentry{MLP-64, std}
\addplot[nnorange,thick,mark=square*,mark size=1.1pt] coordinates {(16,37.447) (32,63.354) (64,87.884) (128,117.42) (256,153.16) (512,219.98) (1024,331.62) (1797,499.57)};
\addlegendentry{MLP-256, std}
\end{axis}
\end{tikzpicture}
\caption{Scaling curves on the digits data: block-wise prequential code length against the number of examples, on logarithmic axes (means over five orders, from Table~\ref{tab:scal}). A straight line of slope $1-\alpha$ corresponds to a learning curve $e_n\propto n^{-\alpha}$ (Proposition~\ref{prop:curves}, item~4); the dotted line, of slope one, is a learner that does not learn.\label{fig:scal}}
\end{figure}

The first $16$ labels cost every pipeline about $16\ln10=36.8$ nats, as they must. After that the pipelines separate. With the standard scaling the networks write the $1797$ labels in $597$ and $500$ nats ($14.4\%$ and $12.1\%$ of the uniform code), softmax regression in $1{,}124$ ($27.2\%$). In $\mu$P the same networks need $2{,}049$ and $2{,}019$ nats, about half of the uniform code, and their rate over the last $773$ examples is still $1.114$ and $1.095$ nats per example: with $60$ steps of the step of Table~\ref{tab:params} the $\mu$P network is far from trained on ten classes. The controls behave as the theorems require: no pipeline compresses shuffled labels (excess $+41$ to $+373$ nats), the mistake bound holds with a slack of $5$ to $17$, and the first occurrences of the ten classes cost $22.7$--$23.0$ nats against $\ln10!=15.10$.

\emph{S1} is what the data show. The slope of $\ln C_A$ on $\ln n$ for $n\ge128$ is below one for every pipeline, and smaller for the standard networks ($0.61$ and $0.55$) than for softmax regression ($0.80$), that is $\alpha=0.39$, $0.45$ and $0.20$. On MNIST, with a single-pass learner and $n\ge1000$, the exponents obtained from the code were $0.25$ for softmax regression and $0.32$--$0.37$ for networks of width $32$ to $512$ (Table~\ref{tab:identity}): the order of the pipelines and the increase of $\alpha$ with the width are the same on the two datasets, and the values are close although the learners, the sample sizes and the data differ. The $\mu$P networks are the exception, with a slope of $0.92$ and $0.92$: an under-trained learner is close to the line of slope one. \emph{S2} is observed as well: the two $\mu$P curves differ by at most $1.5\%$ at every $n$ of the grid (Table~\ref{tab:scal}), whereas in the standard scaling the width-$256$ network is $16\%$ cheaper than the width-$64$ one at $n=1797$. The width-independence of the $\mu$P prior found exactly at $n=12$ is thus visible on real data, here in the unflattering form of two networks that are equally slow.

\begin{table}[htbp]
  \centering
  \caption{Code lengths of $30$ binary tasks on the digits data ($n=1797$, one order): pipeline $A$ against pipeline $B$, in the format of Table~\ref{tab:inv}. The uniform code costs $1{,}246$ nats and the measured code lengths range from $276$ to $781$ nats.\label{tab:scal-inv}}
  \small
  \begin{tabularx}{\textwidth}{@{}llZZZZZ@{}}
    \toprule
    $A$ & $B$ & $r$ & min ratio & max ratio & spread & slope\\
    \midrule
    MLP-64, std & Softmax & 0.979 & 0.731 & 0.963 & 1.317 & 1.101\\
    MLP-256, std & Softmax & 0.972 & 0.695 & 0.959 & 1.380 & 1.057\\
    MLP-256, std & MLP-64, std & 0.996 & 0.950 & 1.022 & 1.076 & 0.963\\
    MLP-64, $\mu$P & Softmax & 0.976 & 0.777 & 0.943 & 1.214 & 0.962\\
    MLP-64, $\mu$P & MLP-64, std & 0.992 & 0.895 & 1.066 & 1.191 & 0.870\\
    MLP-64, $\mu$P & MLP-256, std & 0.990 & 0.927 & 1.117 & 1.206 & 0.898\\
    MLP-256, $\mu$P & Softmax & 0.977 & 0.778 & 0.948 & 1.219 & 0.971\\
    MLP-256, $\mu$P & MLP-64, std & 0.993 & 0.906 & 1.069 & 1.179 & 0.877\\
    MLP-256, $\mu$P & MLP-256, std & 0.992 & 0.938 & 1.118 & 1.192 & 0.906\\
    MLP-256, $\mu$P & MLP-64, $\mu$P & 1.000 & 0.993 & 1.012 & 1.019 & 1.007\\
    \bottomrule
  \end{tabularx}
\end{table}

\emph{S3} holds on these tasks (Table~\ref{tab:scal-inv}). Over the $30$ tasks the ratio of the code lengths of any two pipelines varies by a factor between $1.02$ and $1.38$, and every correlation is at least $0.972$. Between softmax regression and a network the spread is $1.21$--$1.38$, against $1.63$--$1.73$ on MNIST, and the correlation is $0.97$ or more, against $0.64$--$0.66$. On the binary tasks $\mu$P is not handicapped as it is on ten classes: its code lengths are within $0.90$--$1.12$ of those of the standard networks.

\paragraph{What this shows and what it does not.} On a second real dataset, with a different learner, the redundancy follows a power law in $n$ whose exponent orders the pipelines as on MNIST, and Conjecture~\ref{conj:invariance} passes the same weak test with tighter ratios. The test remains weak for the reasons given in Section~\ref{sec:exp2}: the $30$ tasks share their inputs, they come from one small dataset, $H^\ast$ is taken to be zero, and no pipeline was tuned. The poor code of the $\mu$P networks on ten classes is a statement about $60$ steps at one step size, not about the parametrization. With $1797$ examples the power law is read over less than four doublings of $n$.

% ==========================================================================================
% Experiment "order"
% ==========================================================================================
\subsection{The whole prior depends on the order of the examples}\label{sec:order}

\paragraph{Design.} Table~\ref{tab:order} measured the spread over orders of the code length of two labelings. Here the object is the whole prior. For a permutation $\rho$ of the ten inputs of Section~\ref{sec:exp}, the code computed on the permuted sequence is a distribution $Q^{\rho}$ on the labelings of the same unordered input set, and two orders can be compared by the divergence between $Q^{\rho}$ and $Q^{\rho'}$, exactly as two learners are compared in Table~\ref{tab:kl}. We computed $Q^{\rho}$ on all $1024$ labelings for the identity and $30$ random orders (the first $20$ are those of Table~\ref{tab:order}), for five learners of Section~\ref{sec:exp} with their original initializations: Laplace, logistic regression and the networks of width $2$, $8$ and $32$; a second seed of MLP-8 gives the scale of the seed effect. This is $186$ exact codes and, for each learner, $930$ ordered pairs of orders. The hypotheses were: \textbf{O1} (a check), the Laplace learner, being exchangeable, has divergence zero between any two orders; \textbf{O2}, for the gradient learners the divergence between two orders is of the size of the divergence between two neighbouring learners in Table~\ref{tab:kl} ($0.1$--$0.6$ nats); \textbf{O3}, it grows with the width.

\paragraph{Results.} Kraft's equality holds for all codes to $2.2\times10^{-16}$, and the identity order reproduces Table~\ref{tab:kl}; on the first $20$ orders the code lengths of the two labelings of Table~\ref{tab:order} are reproduced as well. Table~\ref{tab:order-prior} and Figure~\ref{fig:order} give the result.

\begin{table}[htbp]
  \centering
  \caption{Dependence of the exact implicit prior on the order of presentation ($n=10$, $31$ orders). $H(Q^\rho)$: entropy, mean $\pm$ s.d.\ over orders; $H(\bar Q)$: entropy of the order-averaged prior; KL and TV: Kullback--Leibler divergence (nats) and total variation distance between the priors of two orders, mean and maximum over the $930$ ordered pairs; to $\bar Q$: mean of $\KLd{Q^\rho}{\bar Q}$; s.d.\ of $C$: standard deviation of the code length of a labeling over orders, averaged over labelings with weights $\bar Q$; top: range over orders of the mass of the cheapest labeling.\label{tab:order-prior}}
  \footnotesize
  \setlength{\tabcolsep}{5pt}
  \begin{tabular}{@{}lccccccccc@{}}
    \toprule
    Learner & $H(Q^\rho)$ & $H(\bar Q)$ & KL mean & KL max & TV mean & TV max & to $\bar Q$ & s.d.\ of $C$ & top\\
    \midrule
    Laplace & $5.85\pm0.00$ & 5.85 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.09--0.09\\
    LogReg & $3.29\pm0.25$ & 3.47 & 0.44 & 1.48 & 0.32 & 0.64 & 0.18 & 0.78 & 0.10--0.28\\
    MLP-2 & $2.93\pm0.25$ & 3.20 & 0.64 & 2.50 & 0.36 & 0.77 & 0.27 & 0.85 & 0.13--0.33\\
    MLP-8 & $2.38\pm0.18$ & 2.59 & 0.48 & 2.22 & 0.33 & 0.66 & 0.20 & 0.77 & 0.19--0.36\\
    MLP-32 & $2.19\pm0.21$ & 2.50 & 0.77 & 2.79 & 0.43 & 0.84 & 0.32 & 1.05 & 0.18--0.47\\
    \bottomrule
  \end{tabular}
\end{table}

\begin{figure}[htbp]
\centering
\begin{tikzpicture}
\begin{axis}[width=0.8\textwidth,height=6.0cm,symbolic x coords={Laplace,LogReg,MLP-2,MLP-8,MLP-32},xtick=data,ymin=-0.1,ymax=3.0,
  ylabel={$\mathrm{KL}(Q^{\rho}\,\|\,Q^{\rho'})$ between two orders (nats)},enlarge x limits=0.12,legend pos=north west,legend cell align=left]
\addplot[nngray,only marks,mark=-,mark size=3pt,error bars/.cd,y dir=both,y explicit,error bar style={nngray,line width=0.6pt}] coordinates {(Laplace,0.0000) += (0,0.0000) -= (0,0.0000) (LogReg,0.3686) += (0,1.1066) -= (0,0.3030) (MLP-2,0.5368) += (0,1.9657) -= (0,0.4671) (MLP-8,0.4032) += (0,1.8127) -= (0,0.3550) (MLP-32,0.6391) += (0,2.1477) -= (0,0.6106)};
\addlegendentry{range}
\addplot[nnblue,only marks,mark=*,mark size=1.8pt,error bars/.cd,y dir=both,y explicit,error bar style={nnblue,line width=3.2pt},error mark=none] coordinates {(Laplace,0.0000) += (0,0.0000) -= (0,0.0000) (LogReg,0.3686) += (0,0.1982) -= (0,0.1176) (MLP-2,0.5368) += (0,0.2336) -= (0,0.1690) (MLP-8,0.4032) += (0,0.2398) -= (0,0.1604) (MLP-32,0.6391) += (0,0.4631) -= (0,0.2577)};
\addlegendentry{median and quartiles}
\addplot[nnorange,only marks,mark=diamond*,mark size=2.2pt] coordinates {(Laplace,0.0000) (LogReg,0.4373) (MLP-2,0.6388) (MLP-8,0.4829) (MLP-32,0.7741)};
\addlegendentry{mean}
\addplot[nnaqua,thick,dashed,sharp plot] coordinates {(Laplace,0.29) (MLP-32,0.29)};
\addlegendentry{MLP-8 against MLP-32, same order}
\addplot[nnmagenta,thick,dotted,sharp plot] coordinates {(Laplace,0.57) (MLP-32,0.57)};
\addlegendentry{two seeds of MLP-8, same order}
\end{axis}
\end{tikzpicture}
\caption{Divergence between the exact priors that one learner induces on the same ten inputs presented in two different orders: distribution over the $930$ ordered pairs of $31$ orders. The two horizontal lines give the scale: the symmetrised divergence between two widths, and between two seeds, at a fixed order (means over the orders).\label{fig:order}}
\end{figure}

\emph{O1} holds exactly: the Laplace learner has divergence $0$ and total variation $0$ between all pairs of orders. \emph{O2} is supported, and the order effect is at the upper end of what was expected. Two orders of the same gradient learner are on average $0.44$ (logistic regression) to $0.77$ (MLP-32) nats apart, with a total variation distance of $0.32$--$0.43$: on average about a third or more of the unit of mass is in a different place. The largest divergences are $1.48$--$2.79$ nats. For comparison, at a fixed order MLP-8 is $0.22$ nats from MLP-2, $0.29$ from MLP-32 and $0.44$ from logistic regression (symmetrised), and $0.57$ from itself with another seed. Changing the order of ten examples therefore moves the prior of a network as much as changing its seed, and more than multiplying its width by four. The entropy is not an order-free number either: for MLP-8 it ranges from $2.02$ to $2.98$ nats over the orders, a range wider than the difference between the widths $2$ and $32$ in Table~\ref{tab:spectrum}. \emph{O3} is not supported: the mean divergence is $0.64$, $0.48$ and $0.77$ nats at widths $2$, $8$ and $32$, not monotone, although the widest network is the most sensitive on every measure.

The spread of single code lengths agrees with Table~\ref{tab:order}: weighted by the order-averaged prior, the standard deviation of a code length over orders is $0.78$--$1.05$ nats, against the $0.55$--$0.79$ nats found there for two labelings. The order-averaged prior $\bar Q=\frac1{31}\sum_\rho Q^\rho$ is, by Theorem~\ref{thm:mixture}, the code of a learner; it is flatter than its members (for MLP-8, $H(\bar Q)=2.59$ against a mean of $2.38$ nats), and a single order is $0.18$--$0.32$ nats away from it on average.

\paragraph{What this shows and what it does not.} At $n=10$, the implicit prior of a gradient-trained learner is a property of the learner \emph{and} of the order: the fourth limitation stated in the Discussion is not a technicality at this scale, and an entropy or an exchange rate computed on one order carries an uncertainty of a few tenths of a nat from the order alone. This qualifies the single-order entropies of Sections~\ref{sec:exp}--\ref{sec:mup}; it does not overturn their conclusions where the effects are of several nats, and it has not been checked for the differences of a few tenths of a nat on which the verdict on the revised conjecture rests. The experiment uses ten inputs; Table~\ref{tab:mnist} suggests that the relative effect of order on a total code length shrinks with $n$ (below $3\%$ on MNIST), and whether the divergence between whole priors does so cannot be read from one value of $n$.

% ==========================================================================================
% Experiment "tax"
% ==========================================================================================
\subsection{Where the symmetry tax goes when the symmetry is broken}\label{sec:tax}

\paragraph{Design.} Corollary~\ref{cor:orbit} was left unmeasured: ``measuring this redistribution on trained networks is left to future work'' (Section~\ref{sec:neural}). We measure it exactly. The inputs are the ten inputs of Section~\ref{sec:exp}, the labels take $K\in\{2,3,5\}$ values, and the group is the symmetric group $S_K$ acting on the $K^{n}$ labelings by renaming the classes; a labeling that uses $k$ classes has an orbit of $N=K!/(K-k)!$ namings. Four learners are enumerated on \emph{all} labelings: the zero-initialized softmax regression of Table~\ref{tab:sym} and the same with $W_0\sim\mathcal N(0,1/d)$, and a width-$8$ network with $K$ softmax outputs (the network~\eqref{eq:net} with a matrix read-out) with a zero and with a random read-out. The two zero-initialized learners are exactly equivariant under $S_K$; the two others are single seeds of a symmetric law, the situation of Corollary~\ref{cor:orbit}. For $K=5$ the softmax learners are enumerated at $n=10$ ($9{,}765{,}625$ labelings, $2{,}441{,}406$ training runs each) and the networks at $n=8$ ($390{,}625$ labelings); this reduction was decided from the timing of the $K=3$ runs, before any $K=5$ result existed.

Every code length is decomposed as
\[
\CA(y^n\mid x^n)=\underbrace{\ln N-\ln\QA(G\cdot y^n\mid x^n)}_{\text{symmetric part}}+\;r(y^n),
\]
where the symmetric part is the code length under the symmetrised learner, the mixture of Theorem~\ref{thm:mixture} over the $K!$ namings of the output units, and is constant on the orbit. The residual $r$ satisfies $\frac1N\sum_{u\in G\cdot y}e^{-r(u)}=1$, so its mean over the orbit is non-negative: this mean is the Jensen gap in the first inequality of~\eqref{eq:orbit}. The predictions are those of the corollary: (i) for an equivariant learner $r\equiv0$; (ii) for every learner and every orbit, the mean cost is at least the symmetric part, which is at least $\ln N$; (iii) every naming that is cheaper than the tax by $\delta$ is paid for by the other namings of its orbit, which cost at least $\ln N+\delta/(N-1)$ on average.

\paragraph{Results.} Kraft's equality holds for all codes to $5.6\times10^{-16}$, and the zero-initialized softmax learner reproduces the cyclic-labeling costs of Table~\ref{tab:sym} ($14.86$, $25.21$ and $41.10$ nats for $K=2,3,5$). The step of the proof of Corollary~\ref{cor:names} was checked directly at $K=3$: training the network from the six permuted read-outs gives $Q_{A_{\sigma s}}(\sigma y^n)=Q_{A_s}(y^n)$ to $1.1\times10^{-7}$ nats on all $59{,}049$ labelings, and the average of the six codes equals the symmetric part above to $4.4\times10^{-8}$. These two numbers are amplified rounding, as in Section~\ref{sec:arch}: with $5$, $20$ and $40$ gradient steps instead of $60$ the same check gives $5.3\times10^{-15}$, $1.1\times10^{-14}$ and $8.2\times10^{-14}$.

\begin{table}[htbp]
  \centering
  \caption{Corollary~\ref{cor:orbit} on all labelings and all orbits of $S_K$. Slack: smallest value over the orbits of the symmetric part minus $\ln N$ (second inequality of~\eqref{eq:orbit}); gap: Jensen gap of the first inequality, averaged over orbits with their mass (nats); $\max r$: largest residual; below: number of labelings cheaper than their tax $\ln N$, and their total mass; $\delta$: largest saving below the tax; last column: smallest slack of prediction (iii) over those labelings.\label{tab:tax}}
  \footnotesize
  \setlength{\tabcolsep}{4pt}
  \begin{tabular}{@{}clcrcccrccc@{}}
    \toprule
    $K$ & Learner & $n$ & orbits & slack & gap & $\max r$ & below & mass & $\max\delta$ & slack (iii)\\
    \midrule
    2 & Softmax, zero init & 10 & 512 & 0.495 & $<10^{-12}$ & 0.0 & 0 & 0.000 & 0.00 & --\\
    2 & Softmax, random init & 10 & 512 & 0.330 & 0.568 & 2.3 & 1 & 0.671 & 0.29 & 2.056\\
    2 & MLP-8, zero head & 10 & 512 & 0.101 & $<10^{-12}$ & 0.0 & 0 & 0.000 & 0.00 & --\\
    2 & MLP-8, random head & 10 & 512 & 0.195 & 0.071 & 4.1 & 0 & 0.000 & 0.00 & --\\
    \addlinespace
    3 & Softmax, zero init & 10 & 9{,}842 & 0.793 & $<10^{-12}$ & 0.0 & 0 & 0.000 & 0.00 & --\\
    3 & Softmax, random init & 10 & 9{,}842 & 0.672 & 0.381 & 2.8 & 0 & 0.000 & 0.00 & --\\
    3 & MLP-8, zero head & 10 & 9{,}842 & 0.149 & $<10^{-12}$ & 0.0 & 0 & 0.000 & 0.00 & --\\
    3 & MLP-8, random head & 10 & 9{,}842 & 0.224 & 0.050 & 8.1 & 0 & 0.000 & 0.00 & --\\
    \addlinespace
    5 & Softmax, zero init & 10 & 86{,}472 & 1.182 & $<10^{-12}$ & 0.0 & 0 & 0.000 & 0.00 & --\\
    5 & Softmax, random init & 10 & 86{,}472 & 1.124 & 0.291 & 4.5 & 0 & 0.000 & 0.00 & --\\
    5 & MLP-8, zero head & 8 & 3{,}845 & 0.202 & $<10^{-12}$ & 0.0 & 0 & 0.000 & 0.00 & --\\
    5 & MLP-8, random head & 8 & 3{,}845 & 0.287 & 0.081 & 12.7 & 1 & 0.214 & 0.07 & 0.423\\
    \bottomrule
  \end{tabular}
\end{table}

\emph{Prediction (i)} holds to rounding: for the two equivariant learners the largest Jensen gap over all orbits and all $K$ is $1.4\times10^{-13}$ nats. Their tax is paid uniformly inside every orbit. \emph{Prediction (ii)} holds on every orbit of every learner (Table~\ref{tab:tax}): the second inequality has a smallest slack of $0.101$ nats, and for the two asymmetric learners the first is strict on every orbit. \emph{Prediction (iii)} is the one that describes the redistribution. A random initialization does make some namings cheaper than the symmetrised learner would: the residual is negative for the favoured namings and reaches $-2.9$ nats for the softmax learner and $-4.5$ for the network at $K=5$, while the disfavoured namings of the same orbits pay up to $4.5$ and $12.7$ nats more (Figure~\ref{fig:tax}). But a naming cheaper than the tax itself is rare: it occurs for $1$, $0$ and $0$ labelings of the asymmetric softmax learner at $K=2,3,5$ and for $0$, $0$ and $1$ labelings of the asymmetric network. Where it occurs, it is a constant labeling that the initialization happens to favour, with a saving of at most $0.29$ nats (softmax, $K=2$, a labeling that carries $0.671$ of the mass), and the other namings of its orbit pay it back with a slack of at least $0.423$ nats over the bound of the corollary. The bound is therefore correct and, at this scale, far from tight.

\begin{table}[htbp]
  \centering
  \caption{Softmax regression at $K=5$, $n=10$: the $9{,}765{,}625$ labelings by number $k$ of classes used. $N$: orbit size; tax: $\ln N$; mass: total mass of the labelings with $k$ classes; min mean: smallest orbit-mean cost; mean: orbit-mean cost averaged with the orbit masses; cheapest: cheapest single naming; gap and spread: Jensen gap and difference between the dearest and the cheapest naming of an orbit, averaged with the orbit masses (nats).\label{tab:tax-k}}
  \footnotesize
  \setlength{\tabcolsep}{4pt}
  \begin{tabular}{@{}lccccccccccc@{}}
    \toprule
    Learner & $k$ & $N$ & tax & orbits & mass & min mean & mean & cheapest & gap & spread\\
    \midrule
    Softmax, zero init & 1 & 5 & 1.61 & 1 & 0.307 & 2.79 & 2.79 & 2.79 & 0.00 & 0.00\\
    Softmax, zero init & 2 & 20 & 3.00 & 511 & 0.599 & 4.34 & 5.11 & 4.34 & 0.00 & 0.00\\
    Softmax, zero init & 3 & 60 & 4.09 & 9{,}330 & 0.091 & 7.22 & 9.13 & 7.22 & 0.00 & 0.00\\
    Softmax, zero init & 4 & 120 & 4.79 & 34{,}105 & 0.003 & 12.18 & 14.44 & 12.18 & 0.00 & 0.00\\
    Softmax, zero init & 5 & 120 & 4.79 & 42{,}525 & 0.000 & 17.58 & 20.13 & 17.58 & 0.00 & 0.00\\
    \addlinespace
    Softmax, random init & 1 & 5 & 1.61 & 1 & 0.325 & 3.04 & 3.04 & 2.03 & 0.31 & 2.76\\
    Softmax, random init & 2 & 20 & 3.00 & 511 & 0.582 & 4.66 & 5.47 & 3.60 & 0.28 & 2.90\\
    Softmax, random init & 3 & 60 & 4.09 & 9{,}330 & 0.090 & 7.55 & 9.52 & 5.90 & 0.33 & 3.55\\
    Softmax, random init & 4 & 120 & 4.79 & 34{,}105 & 0.003 & 12.53 & 14.86 & 10.36 & 0.36 & 4.10\\
    Softmax, random init & 5 & 120 & 4.79 & 42{,}525 & 0.000 & 17.96 & 20.57 & 16.21 & 0.38 & 4.17\\
    \bottomrule
  \end{tabular}
\end{table}

\begin{figure}[htbp]
\centering
\begin{tikzpicture}
\begin{axis}[width=0.8\textwidth,height=6.2cm,xmin=0,xmax=1,xlabel={namings of the cyclic labeling $y_t=t\bmod K$, cheapest first (fraction of the orbit)},
  ylabel={residual $r$ (nats)},legend pos=north west,legend cell align=left]
\addplot[nngray,thick,dotted] coordinates {(0,0) (1,0)};
\addlegendentry{equivariant learners: $r=0$}
\addplot[nnblue,thick,mark=*,mark size=1.3pt] coordinates {(0.08333,-0.9185) (0.25,-0.502) (0.4167,0.1271) (0.5833,0.526) (0.75,1.676) (0.9167,1.695)};
\addlegendentry{softmax, random init, $K=3$}
\addplot[nnorange,thick,mark=square*,mark size=1.2pt] coordinates {(0.08333,-1.264) (0.25,-0.1603) (0.4167,0.288) (0.5833,0.7424) (0.75,3.211) (0.9167,3.898)};
\addlegendentry{MLP-8, random head, $K=3$}
\addplot[nnblue,thick,dashed] coordinates {(0.004167,-1.438) (0.0125,-1.39) (0.02083,-1.242) (0.02917,-1.027) (0.0375,-1.012) (0.04583,-0.9323) (0.05417,-0.9032) (0.0625,-0.8405)
(0.07083,-0.8335) (0.07917,-0.7929) (0.0875,-0.7204) (0.09583,-0.7138) (0.1042,-0.7039) (0.1125,-0.6438) (0.1208,-0.6249) (0.1292,-0.6208)
(0.1375,-0.5663) (0.1458,-0.5486) (0.1542,-0.5431) (0.1625,-0.5383) (0.1708,-0.5028) (0.1792,-0.4802) (0.1875,-0.4417) (0.1958,-0.44)
(0.2042,-0.4246) (0.2125,-0.3963) (0.2208,-0.379) (0.2292,-0.3689) (0.2375,-0.3377) (0.2458,-0.3317) (0.2542,-0.2959) (0.2625,-0.2934)
(0.2708,-0.2708) (0.2792,-0.2577) (0.2875,-0.2545) (0.2958,-0.2444) (0.3042,-0.1853) (0.3125,-0.1649) (0.3208,-0.1642) (0.3292,-0.1577)
(0.3375,-0.1466) (0.3458,-0.1353) (0.3542,-0.1281) (0.3625,-0.1149) (0.3708,-0.1111) (0.3792,-0.007257) (0.3875,0.03868) (0.3958,0.05037)
(0.4042,0.09788) (0.4125,0.1122) (0.4208,0.1148) (0.4292,0.1198) (0.4375,0.1214) (0.4458,0.1278) (0.4542,0.1466) (0.4625,0.168)
(0.4708,0.1711) (0.4792,0.1758) (0.4875,0.2305) (0.4958,0.2707) (0.5042,0.2743) (0.5125,0.2839) (0.5208,0.3154) (0.5292,0.3193)
(0.5375,0.3633) (0.5458,0.3964) (0.5542,0.4021) (0.5625,0.414) (0.5708,0.4291) (0.5792,0.4303) (0.5875,0.4813) (0.5958,0.4913)
(0.6042,0.4987) (0.6125,0.5048) (0.6208,0.5152) (0.6292,0.5187) (0.6375,0.5879) (0.6458,0.6112) (0.6542,0.6122) (0.6625,0.64)
(0.6708,0.6416) (0.6792,0.6543) (0.6875,0.6775) (0.6958,0.7127) (0.7042,0.7163) (0.7125,0.7198) (0.7208,0.7231) (0.7292,0.7299)
(0.7375,0.7572) (0.7458,0.7642) (0.7542,0.7945) (0.7625,0.8035) (0.7708,0.9101) (0.7792,0.941) (0.7875,0.9871) (0.7958,0.989)
(0.8042,1.043) (0.8125,1.051) (0.8208,1.142) (0.8292,1.168) (0.8375,1.184) (0.8458,1.209) (0.8542,1.222) (0.8625,1.261)
(0.8708,1.361) (0.8792,1.378) (0.8875,1.453) (0.8958,1.462) (0.9042,1.532) (0.9125,1.534) (0.9208,1.582) (0.9292,1.622)
(0.9375,1.675) (0.9458,1.68) (0.9542,1.695) (0.9625,1.716) (0.9708,1.808) (0.9792,2.04) (0.9875,2.324) (0.9958,2.334)};
\addlegendentry{softmax, random init, $K=5$}
\addplot[nnorange,thick,dashed] coordinates {(0.004167,-3.159) (0.0125,-2.724) (0.02083,-2.263) (0.02917,-2.168) (0.0375,-1.737) (0.04583,-1.711) (0.05417,-1.669) (0.0625,-1.264)
(0.07083,-1.104) (0.07917,-1.065) (0.0875,-1.055) (0.09583,-0.9726) (0.1042,-0.833) (0.1125,-0.7849) (0.1208,-0.6136) (0.1292,-0.513)
(0.1375,-0.3613) (0.1458,-0.1827) (0.1542,-0.1595) (0.1625,-0.004425) (0.1708,0.07077) (0.1792,0.2911) (0.1875,0.2911) (0.1958,0.3859)
(0.2042,0.3985) (0.2125,0.4199) (0.2208,0.437) (0.2292,0.6112) (0.2375,0.6112) (0.2458,0.619) (0.2542,0.6406) (0.2625,0.6565)
(0.2708,0.7325) (0.2792,0.7332) (0.2875,0.8579) (0.2958,0.8919) (0.3042,0.933) (0.3125,0.9913) (0.3208,0.9937) (0.3292,1.021)
(0.3375,1.07) (0.3458,1.154) (0.3542,1.179) (0.3625,1.193) (0.3708,1.341) (0.3792,1.355) (0.3875,1.419) (0.3958,1.462)
(0.4042,1.463) (0.4125,1.499) (0.4208,1.53) (0.4292,1.564) (0.4375,1.569) (0.4458,1.583) (0.4542,1.663) (0.4625,1.708)
(0.4708,1.794) (0.4792,1.839) (0.4875,1.891) (0.4958,1.93) (0.5042,1.969) (0.5125,2.011) (0.5208,2.03) (0.5292,2.04)
(0.5375,2.066) (0.5458,2.15) (0.5542,2.166) (0.5625,2.185) (0.5708,2.22) (0.5792,2.228) (0.5875,2.371) (0.5958,2.397)
(0.6042,2.404) (0.6125,2.404) (0.6208,2.482) (0.6292,2.498) (0.6375,2.515) (0.6458,2.681) (0.6542,2.696) (0.6625,2.809)
(0.6708,2.842) (0.6792,2.872) (0.6875,2.892) (0.6958,2.936) (0.7042,2.961) (0.7125,2.966) (0.7208,2.991) (0.7292,3.053)
(0.7375,3.201) (0.7458,3.278) (0.7542,3.327) (0.7625,3.424) (0.7708,3.464) (0.7792,3.527) (0.7875,3.644) (0.7958,3.683)
(0.8042,3.718) (0.8125,3.788) (0.8208,3.953) (0.8292,4.096) (0.8375,4.163) (0.8458,4.309) (0.8542,4.406) (0.8625,4.434)
(0.8708,4.47) (0.8792,4.502) (0.8875,4.543) (0.8958,4.585) (0.9042,4.812) (0.9125,4.84) (0.9208,4.898) (0.9292,4.992)
(0.9375,5.088) (0.9458,5.486) (0.9542,5.711) (0.9625,5.78) (0.9708,5.978) (0.9792,6.201) (0.9875,7.219) (0.9958,7.385)};
\addlegendentry{MLP-8, random head, $K=5$ ($n=8$)}
\end{axis}
\end{tikzpicture}
\caption{The redistribution of Corollary~\ref{cor:orbit} inside one orbit. The cyclic labeling of Table~\ref{tab:sym} has $6$ namings at $K=3$ and $120$ at $K=5$; for each naming the residual $r$ is its code length minus the code length under the symmetrised learner. The exponential average of $-r$ over the orbit is exactly zero, so what the favoured namings save, the others pay with interest.\label{fig:tax}}
\end{figure}

For the cyclic labeling of Table~\ref{tab:sym}, the asymmetric softmax learner charges between $39.79$ and $43.57$ nats for the $120$ namings at $K=5$ (mean $41.54$), where the zero-initialized one charges $41.10$ for each: the names of the classes are worth a range of several nats to a random head, around a mean that is not lower. Table~\ref{tab:tax-k} shows the same on all orbits: with a random initialization the cheapest naming of an orbit falls below the uniform price of the equivariant learner and the orbit mean rises above it, for every number of classes used.

\paragraph{What this shows and what it does not.} Corollary~\ref{cor:orbit} is verified on every orbit of $18$ exact codes, and its picture is confirmed: an asymmetric initialization redistributes cost inside each orbit and does not lower the orbit mean. Compared with Table~\ref{tab:sym}, which measured one labeling per $K$, the tax is now seen on all of them, and it remains a small part of the total at $n=10$: the cost of a labeling that uses all classes is dominated by learning, not by naming. The experiment does not show a pretrained head buying a naming below its tax in a way that matters; that would need a head that carries information about the task, and a random head does not.

% ==========================================================================================
% Experiment "conj"
% ==========================================================================================
\subsection{Conjectures~\ref{conj:invariance} and~\ref{conj:envelope} on the exact priors of Section~\ref{sec:mup}}\label{sec:conjx}

\paragraph{Design.} The $161$ exact codes of Section~\ref{sec:mup} (five learners, widths $2$ to $256$, two input sets, two seeds, $n=12$) were stored with that experiment; nothing was recomputed. They allow a labeling-wise form of the two open conjectures to be tested without estimation error.

\emph{Conjecture~\ref{conj:invariance}.} For two learners $A$ and $B$ on the same inputs and seed we compute, over a family of labelings, the range of the ratio $C_A/C_B$, its spread (largest over smallest), the correlation of the two code lengths and the constants of the two envelopes $C_A\le a_0C_B$ and $C_A\le C_B+c_1$, each taken in the worse of the two directions. The families are all $4096$ labelings and the linearly separable ones ($464/464$ labelings on the two input sets), a family defined without reference to any learner. At a fixed $n$ every ratio is finite, so the conjecture cannot fail outright; what can be read is whether the constant is moderate and whether it is stable when the width grows. The reading fixed with the design is therefore whether the constants stay moderate and stable as the width grows up to $H=256$.

\emph{Conjecture~\ref{conj:envelope}.} The compressors are the LZ78 code of Section~\ref{sec:exp} in index order and the MST-cut code of Section~\ref{sec:exp2} on the twelve inputs. For each prior we report the statistics of Table~\ref{tab:env} and the least-squares fit $\tilde K=a\,C_A+b$ with its $R^2$. Since the conjecture is trivially true at one value of $n$, and its refutation criterion speaks of a margin that grows with $n$, we use Lemma~\ref{lem:normalized}: the marginal of a twelve-point code on its first $t$ labels is the exact code on the first $t$ inputs. This gives every code at $n=6,\dots,12$ for free, and for a slope $a$ the smallest admissible intercept $b_a(n)=\max_{y^n}\bigl[\tilde K(y^n)-a\,C_A(y^n)\bigr]$ can be followed in $n$. The slope $a=1$ was fixed with the design; $a=2$ and $a=4$ were added after a first look at the results.

\paragraph{Results for Conjecture~\ref{conj:invariance}.} Table~\ref{tab:conj1} and Figure~\ref{fig:conj1} separate the ten pairs of learners into two groups. Among the four learners whose step in function space does not grow with the width (NTK, $\mu$P, standard with step $\eta/H$, centred NTK), the multiplicative constant is moderate and stable: at $H=256$ it lies between $1.3$ and $3.3$, its largest value over all widths, pairs and runs is $3.7$, and the spread of the ratio is $1.6$--$5.7$. One of these six pairs drifts: between $\mu$P and the standard scaling with step $\eta/H$ the constant is $2.4$ at width $8$, $3.7$ at $128$ and $3.3$ at $256$, which may or may not be saturation; the other five show no trend. Within $\mu$P the code lengths at width $64$ and at width $256$ have correlation $0.998$ and a ratio spread of $1.15$: the labeling-wise statement behind H1 of Section~\ref{sec:mup}. Every pair that contains the standard parametrization with the fixed step $\eta$ behaves differently: the constant is $1.8$--$3.0$ at width $8$, $2.8$--$4.1$ at $64$, up to $5.1$ at $128$ and $7.1$--$8.1$ at $256$, with ratio spreads of $19$ to $52$ and an additive constant of up to $74$ nats. The restriction to linearly separable labelings lowers the constants slightly and changes neither group (Table~\ref{tab:conj1}). On MNIST the ratio spread was $1.1$ between two networks and $1.6$--$1.7$ between a network and softmax regression (Table~\ref{tab:inv}); the spreads here are larger because they are taken over single labelings, noise-like ones included, and not over tasks of $20{,}000$ examples.

\begin{table}[htbp]
  \centering
  \caption{Conjecture~\ref{conj:invariance}, labeling-wise, on the exact $n=12$ priors of Section~\ref{sec:mup} (two input sets, two seeds). $a_0$: smallest constant with $C_A\le a_0C_B$ and $C_B\le a_0C_A$ on all $4096$ labelings, largest over the four runs; spr.: spread of $C_A/C_B$, mean over runs; $r$: Pearson correlation of $C_A$ and $C_B$ at $H=256$; $a_0^{\mathrm{hs}}$: $a_0$ on the linearly separable labelings at $H=256$; $c_1$: smallest additive constant (nats) at $H=256$.\label{tab:conj1}}
  \footnotesize
  \setlength{\tabcolsep}{4pt}
  \begin{tabular}{@{}llccccccccc@{}}
    \toprule
    & & \multicolumn{2}{c}{$H=8$} & \multicolumn{2}{c}{$H=64$} & \multicolumn{2}{c}{$H=256$} & & & \\
    \cmidrule(lr){3-4}\cmidrule(lr){5-6}\cmidrule(lr){7-8}
    $A$ & $B$ & $a_0$ & spr. & $a_0$ & spr. & $a_0$ & spr. & $r$ & $a_0^{\mathrm{hs}}$ & $c_1$\\
    \midrule
    std, step $\eta$ & NTK & 2.1 & 3.5 & 2.9 & 5.9 & 7.3 & 19.5 & 0.83 & 5.7 & 69.2\\
    std, step $\eta$ & $\mu$P & 1.8 & 2.7 & 2.8 & 4.8 & 7.4 & 20.7 & 0.74 & 6.2 & 68.4\\
    std, step $\eta$ & std, step $\eta/H$ & 3.0 & 6.7 & 4.1 & 13.6 & 8.1 & 38.2 & 0.76 & 6.6 & 73.6\\
    std, step $\eta$ & NTK centred & 2.2 & 3.5 & 3.0 & 6.0 & 7.1 & 20.8 & 0.81 & 5.5 & 69.5\\
    \addlinespace
    NTK & $\mu$P & 1.5 & 2.1 & 1.7 & 2.5 & 1.9 & 2.8 & 0.88 & 1.9 & 5.4\\
    NTK & std, step $\eta/H$ & 1.7 & 2.4 & 1.9 & 2.6 & 1.9 & 2.6 & 0.92 & 1.9 & 5.6\\
    NTK & NTK centred & 1.2 & 1.4 & 1.2 & 1.3 & 1.3 & 1.6 & 0.97 & 1.3 & 1.7\\
    $\mu$P & std, step $\eta/H$ & 2.4 & 4.1 & 2.9 & 5.5 & 3.3 & 5.7 & 0.76 & 3.3 & 9.2\\
    $\mu$P & NTK centred & 1.5 & 2.0 & 1.6 & 2.2 & 1.6 & 2.3 & 0.90 & 1.6 & 4.7\\
    std, step $\eta/H$ & NTK centred & 1.9 & 2.5 & 2.0 & 2.9 & 2.3 & 3.1 & 0.84 & 2.3 & 5.3\\
    \bottomrule
  \end{tabular}
\end{table}

\begin{figure}[htbp]
\centering
\begin{tikzpicture}
\begin{groupplot}[group style={group size=2 by 1,horizontal sep=1.7cm},width=0.47\textwidth,height=6.2cm]
\nextgroupplot[xlabel={$C_B$: $\mu$P, $H=256$ (nats)},ylabel={$C_A$: std, step $\eta$, $H=256$ (nats)},xmin=0,xmax=22,ymin=0,ymax=95,legend pos=north west,legend cell align=left]
\addplot[nngray,only marks,mark=*,mark size=0.7pt,opacity=0.6] coordinates {(14.2,34.5) (15.1,55.7) (14.2,36) (14.4,52.4) (14.5,38.1) (10.8,32.9) (11,38.1) (11.2,31.2)
(7.69,20.5) (12.3,41) (12.7,48) (15.8,50.8) (9.86,25) (15.5,44.2) (9.04,21.8) (14.9,45.9)
(14.1,43.9) (16.5,48.1) (14.8,40.6) (10.4,28.4) (10.6,26.7) (13.1,38.9) (12.8,37.7) (8.75,29.1)
(11.3,33.8) (15.2,47.5) (14.4,46.9) (12.7,46.1) (15.8,47.7) (14,52.4) (15.2,46.2) (16.8,47)
(14.6,43.2) (16.4,55.1) (13,37) (13.4,39) (7.83,26.3) (12.1,31.8) (16,49.7) (14.7,36.6)
(15.9,45.9) (11.1,33.5) (12.4,23) (16.6,50.9) (15.6,40.3) (14.6,51.5) (14,44.9) (11.3,28.9)
(16.7,58.1) (13.3,36.6) (7.46,21.1) (11.6,33) (15.2,45.6) (18.9,54.6) (12.5,34.1) (16.6,75.8)
(16.8,50.4) (12,45.4) (12.3,34.1) (14.5,45.8) (13.7,45.3) (8.36,21) (14.6,40.2) (10.9,36.2)
(12.2,45.2) (15.1,41.6) (13.4,50.8) (15.5,55.2) (7.84,17.9) (15.9,62.9) (13.5,34.7) (15.3,53.3)
(15.6,52.5) (10.7,22) (18.2,51) (14.5,47.3) (16.4,48) (14.5,47.7) (14.4,47) (17.9,56.1)
(13.8,46.2) (12.9,47.7) (10.6,26.3) (12.1,36.2) (14.2,48.1) (13.4,38) (14.8,52.8) (14.6,52.3)
(10.7,30.1) (13.6,44) (10.8,29.8) (16.1,56.6) (6.32,14.1) (11.3,26.4) (14.2,43) (13.3,31.7)
(14.6,38.9) (14.2,47) (10.9,29) (10.7,32.2) (14.9,53.2) (9.09,25) (13.7,48) (12.5,46)
(12,50.6) (14,60.6) (15.5,50.5) (10.6,27.8) (14.7,39.3) (11.9,21.4) (15.4,48.1) (14.8,58.9)
(12.4,42.9) (13.4,39.5) (12.9,42) (11.4,36.7) (14,45.2) (9.62,21.9) (16.7,60.1) (14.8,43.5)
(14.8,48.5) (15.8,55.4) (15.9,52.6) (15.2,40.1) (9.35,30.5) (17.9,46.8) (15.5,47.9) (12.6,23.6)
(11.4,30.2) (15.5,56.1) (15.6,55.9) (15.8,54.7) (14.4,51.3) (13.1,51.3) (14.1,39.7) (15.1,53)
(16.1,57.2) (14.9,34.8) (15.6,50.6) (15.9,64) (14.6,42.8) (10.7,40.7) (15.9,51.5) (12.4,38.7)
(15.2,53.5) (13.3,37.2) (14.6,53.2) (11.3,27.3) (11.1,38.3) (10.7,31.4) (15,35.4) (12.5,40.8)
(15.6,58.3) (12.9,34.1) (11.6,26.8) (15.3,46) (14.9,47.9) (14.3,42.7) (16.4,47.5) (13.1,54.5)
(11.5,32.6) (7.58,19.8) (11.2,30.9) (15,47) (14.6,47.9) (14.5,58.3) (12.2,41.3) (18.5,57.5)
(15.2,56.4) (13.9,55.9) (9.59,23.3) (11.6,27.3) (15.2,50.4) (13,43.1) (13.3,33.3) (10.7,28.5)
(14.6,52.9) (15.2,45.3) (13.7,43.4) (16,48.5) (13.9,32.1) (14.6,57.3) (9.56,20) (13.7,27.7)
(10.3,20.3) (15.9,53.1) (12.6,35) (15.8,54.9) (12.1,39.5) (11.2,31.4) (13.7,39.3) (14.1,49.4)};
\addlegendentry{random labelings}
\addplot[nnorange,only marks,mark=*,mark size=0.9pt] coordinates {(1.52,0.751) (4.47,5.88) (4.52,7.97) (7.88,14.8) (7.16,16.3) (7.45,14.7) (7.59,21) (8.54,13.5)
(11.8,19.8) (9.27,14) (7.62,13.8) (11,23.1) (9.38,16.1) (12.4,26) (6.24,6.03) (11.2,22.3)
(3.52,2.42) (9.72,17.1) (8.9,16.3) (9.16,16.2) (8.93,16.3) (6.92,8.8) (4.12,4.51) (8.4,11.6)
(7.67,16.9) (8.72,17.8) (10.2,23) (11.1,18.8) (7.98,14) (9.42,21.7) (10.5,20.9) (11,24.5)
(9.1,14.2) (12,19.3) (11.9,26.8) (12.4,26.9) (10.8,20.2) (11.5,22.1) (9.97,18.8) (7.76,14.3)
(10.2,23.2) (9.69,30) (9.59,26) (11.1,38.2) (9.7,32.9) (11.1,33.1) (7.74,22.7) (9.63,20.2)
(9.47,21.1) (11.9,34.8) (9.74,24.1) (13.4,32.3) (13,31.9) (12.4,34.8) (12.7,33.6) (10,22.7)
(8.14,19.7) (10.9,24.4) (8.34,26.6) (8.67,29) (11.6,35) (11.8,33.5) (12.9,45.1) (11.4,33.9)
(15.1,41) (9.93,31.3) (9.25,34.3) (8.5,28.7) (9.76,25.8) (10.5,27.3) (8.62,34.2) (9.45,31.3)
(10.7,36.5) (10.4,36.8) (11.4,33.7) (7.97,27.9) (10.3,30.3) (6.4,19) (8.44,23.1) (12.4,31.4)
(11.1,31.4) (11.2,30.3) (10.1,26.9) (11.1,23.7) (8.34,20.6) (13.4,30) (13.4,35) (10.3,24.7)
(6.24,17.3) (9.27,21.2) (10.8,27.2) (7.39,22) (4.76,8.14) (4.7,9.23) (6.68,12.6) (5.69,11.7)
(11.7,29.9) (8.34,21.2) (7.64,22.4) (6.77,15.7) (6.55,14.1) (9.05,23.5) (7.37,13.5) (10.8,28.3)
(9.98,23.6) (10.4,28.6) (10.6,24.5) (8.24,13.9) (10,19.6) (9.99,22) (9.77,24) (6.78,12.9)
(5.46,15.6) (8.71,17.9) (8.98,17.9) (4.67,10.6) (5.99,10.7) (10.9,27.7) (8.92,15.4) (10,19.6)
(8.17,11.4) (7.64,22.4) (9.22,21.3) (11.7,27.2) (11.9,34.8) (9.32,16.4) (5.01,6.38) (12.1,34.9)
(9.63,20.2) (8.34,26.6) (9.53,21.8) (5.42,15.4) (9.91,29.9) (10.8,25.9) (11.2,22.3) (7.76,14.3)
(7.77,12.3) (11.1,23.7) (9.88,19) (4.52,7.97) (11.2,22.9) (6.55,14.1) (10.7,19.8) (11.6,31.4)};
\addlegendentry{half-spaces}
\addplot[nnblue,thick,dashed,domain=0:22,samples=2] {x};
\addlegendentry{$C_A=C_B$}
\nextgroupplot[xmode=log,log basis x=2,xtick={2,8,32,128},xticklabels={2,8,32,128},xmin=2,xmax=256,ymin=1,ymax=8.5,xlabel={width $H$},ylabel={multiplicative constant $a_0$},legend pos=north west,legend cell align=left]
\addplot[nnorange,thick,mark=square*,mark size=1.1pt] coordinates {(2,1.3509) (4,1.5674) (8,1.7901) (16,2.1244) (32,2.3567) (64,2.8048) (128,4.4199) (256,7.397)};
\addlegendentry{std, step $\eta$ / $\mu$P}
\addplot[nnyellow,thick,mark=square*,mark size=1.1pt] coordinates {(2,1.5517) (4,1.7658) (8,2.1443) (16,2.2885) (32,2.6552) (64,2.9459) (128,4.3256) (256,7.3052)};
\addlegendentry{std, step $\eta$ / NTK}
\addplot[nnviolet,thick,dashed,mark=diamond*,mark size=1.3pt,mark options={solid}] coordinates {(2,1.6807) (4,1.904) (8,2.3627) (16,2.9123) (32,3.2323) (64,2.9381) (128,3.7499) (256,3.304)};
\addlegendentry{$\mu$P / std, step $\eta/H$}
\addplot[nnblue,thick,mark=*,mark size=1.1pt] coordinates {(2,1.3484) (4,1.4295) (8,1.5353) (16,1.7711) (32,1.9388) (64,1.691) (128,2.0879) (256,1.9252)};
\addlegendentry{NTK / $\mu$P}
\addplot[nnaqua,thick,dashdotted,mark=triangle*,mark size=1.3pt,mark options={solid}] coordinates {(2,1.2373) (4,1.1537) (8,1.2463) (16,1.2511) (32,1.333) (64,1.1876) (128,1.6387) (256,1.2802)};
\addlegendentry{NTK / NTK centred}
\end{groupplot}
\end{tikzpicture}
\caption{Conjecture~\ref{conj:invariance} on exact priors. \textbf{Left}: code lengths of the same labelings under two parametrizations of the same width-$256$ network (first input set and seed; a sample of the $4096$ labelings, with one separable labeling in four). \textbf{Right}: the constant $a_0$ of Table~\ref{tab:conj1} against the width, largest over the four runs. It is stable for the pairs of learners whose step in function space is independent of the width and grows for the pairs that contain the standard parametrization with a fixed step.\label{fig:conj1}}
\end{figure}

\paragraph{Results for Conjecture~\ref{conj:envelope}.} At $n=12$ the LZ78 length lies between $11.51$ and $18.47$ nats, so it exceeds the $8.32$ nats of the uniform code on every labeling, and its Kraft sum is $0.0015$: it is not a competitive code at this length. The MST-cut code satisfies Kraft's equality and ranges from $3.18$ to $9.31$ nats (mean $8.88$). Table~\ref{tab:conj2} repeats the analysis of Table~\ref{tab:env}. The picture found at $n=16$ is unchanged: the rank correlation of $C_A$ with either compressor is positive and weak ($0.17$--$0.25$ for LZ78, $0.04$--$0.07$ for the MST-cut code, over the $40$ cells of learner and width), a linear fit explains at most $0.092$ of the variance of the compressor length, and the MST-cut code accounts for $18$--$67\%$ of the divergence of a prior from the uniform code ($37$--$52\%$ at $n=16$). The $1\%$ cheapest labelings of a network have a mean MST-cut length of $6.63$--$7.23$ nats against $8.88$ for all labelings.

\begin{table}[htbp]
  \centering
  \caption{Conjecture~\ref{conj:envelope} on the exact $n=12$ priors (means over two input sets and two seeds). $\rho$: Spearman correlation of $C_A$ with the compressor length over all $4096$ labelings; $R^2$: of the least-squares fit $\tilde K=a\,C_A+b$; $a$, $b$: its constants for the MST-cut code; KL: $\KLd{Q_A}{Q_{\mathrm{MST}}}$ in nats; share: $1-\KLd{Q_A}{Q_{\mathrm{MST}}}/\KLd{Q_A}{\mathrm{uniform}}$; last column: mean MST-cut length of the $1\%$ cheapest labelings (all labelings: $8.88$).\label{tab:conj2}}
  \footnotesize
  \setlength{\tabcolsep}{4pt}
  \begin{tabular}{@{}lccccccccccc@{}}
    \toprule
    & & & \multicolumn{2}{c}{LZ78} & \multicolumn{4}{c}{MST-cut} & & & \\
    \cmidrule(lr){4-5}\cmidrule(lr){6-9}
    Learner & $H$ & $H(Q_A)$ & $\rho$ & $R^2$ & $\rho$ & $a$ & $b$ & $R^2$ & KL & share & cheapest $1\%$\\
    \midrule
    std, step $\eta$ & 8 & 2.50 & 0.20 & 0.061 & 0.07 & 0.034 & 8.29 & 0.039 & 2.00 & 66\% & 6.70\\
    NTK & 8 & 4.53 & 0.21 & 0.074 & 0.05 & 0.069 & 8.08 & 0.043 & 1.62 & 57\% & 6.73\\
    $\mu$P & 8 & 3.60 & 0.22 & 0.068 & 0.06 & 0.056 & 8.16 & 0.042 & 1.72 & 64\% & 6.72\\
    std, step $\eta/H$ & 8 & 6.28 & 0.20 & 0.078 & 0.05 & 0.100 & 7.89 & 0.043 & 1.18 & 42\% & 6.84\\
    NTK centred & 8 & 4.57 & 0.22 & 0.076 & 0.05 & 0.070 & 8.07 & 0.044 & 1.53 & 59\% & 6.63\\
    \addlinespace
    std, step $\eta$ & 256 & 1.51 & 0.17 & 0.042 & 0.06 & 0.007 & 8.58 & 0.018 & 3.24 & 52\% & 6.91\\
    NTK & 256 & 4.77 & 0.22 & 0.072 & 0.05 & 0.061 & 8.16 & 0.038 & 1.71 & 52\% & 6.68\\
    $\mu$P & 256 & 3.64 & 0.24 & 0.076 & 0.05 & 0.055 & 8.17 & 0.040 & 1.68 & 64\% & 6.68\\
    std, step $\eta/H$ & 256 & 6.87 & 0.21 & 0.071 & 0.05 & 0.087 & 8.05 & 0.030 & 1.18 & 18\% & 7.09\\
    NTK centred & 256 & 4.84 & 0.23 & 0.077 & 0.04 & 0.065 & 8.12 & 0.041 & 1.57 & 55\% & 6.68\\
    \bottomrule
  \end{tabular}
\end{table}

The dependence on $n$ is in Table~\ref{tab:conj2n} and Figure~\ref{fig:conj2}. For LZ78 the intercept grows with $n$ at every slope tried: by $1.11$--$1.31$ nats per example at $a=1$ and still by up to $0.88$ at $a=4$. The labeling responsible is the simplest one: the cheapest labeling of the $\mu$P network costs it $1.09$ nats at $n=6$ and $1.51$ at $n=12$, while its LZ78 length goes from $5.38$ to $11.51$ nats. This meets the refutation criterion of Conjecture~\ref{conj:envelope} to the letter, a labeling with small $C_A$ on which the compressor fails by a growing margin, but what fails is the coder, whose overhead on short strings exceeds the whole uniform code; we count it against LZ78 at these lengths, as Section~\ref{sec:exp} did, not against the conjecture. For the MST-cut code the intercept at $a=1$ grows by $0.23$--$0.42$ nats per example, between a third and a little over half of the growth of the largest code length ($0.75$). At $a=2$ it does not grow: for the four learners with a width-independent step its slope in $n$ is between $-0.09$ and $0.01$ nats per example and its largest value over $n=6,\dots,12$ is $0.83$ nats. The exception is again the standard parametrization with fixed step at $H=256$, whose intercept at $a=2$ grows by $0.31$ nats per example.

\begin{table}[htbp]
  \centering
  \caption{The envelope $\tilde K\le a\,C_A+b_a(n)$ against $n$, from the exact marginals at $n=6,\dots,12$ (means over four runs). $\min C_A$: cost of the cheapest labeling; slopes: least-squares slope of $b_a(n)$ in $n$, in nats per example. A slope near zero means that one intercept serves all $n$ in the range.\label{tab:conj2n}}
  \footnotesize
  \setlength{\tabcolsep}{4pt}
  \begin{tabular}{@{}lcccccccccc@{}}
    \toprule
    & & \multicolumn{2}{c}{$\min C_A$} & \multicolumn{2}{c}{LZ78, slope of} & \multicolumn{5}{c}{MST-cut}\\
    \cmidrule(lr){3-4}\cmidrule(lr){5-6}\cmidrule(lr){7-11}
    Learner & $H$ & $n=6$ & $n=12$ & $b_1$ & $b_4$ & slope $b_1$ & slope $b_2$ & $b_2(6)$ & $b_2(12)$ & slope $b_4$\\
    \midrule
    std, step $\eta$ & 8 & 0.89 & 1.05 & 1.18 & 0.78 & 0.23 & 0.06 & 0.79 & 1.10 & 0.01\\
    std, step $\eta$ & 256 & 0.56 & 0.91 & 1.11 & 0.88 & 0.42 & 0.31 & 1.36 & 3.35 & 0.22\\
    NTK & 8 & 1.17 & 1.73 & 1.28 & 0.46 & 0.35 & -0.02 & 0.72 & 0.65 & -0.31\\
    NTK & 256 & 1.23 & 2.12 & 1.26 & 0.31 & 0.37 & 0.00 & 0.70 & 0.83 & -0.40\\
    $\mu$P & 8 & 1.02 & 1.39 & 1.31 & 0.62 & 0.38 & -0.02 & 0.65 & 0.48 & -0.13\\
    $\mu$P & 256 & 1.09 & 1.51 & 1.31 & 0.59 & 0.37 & -0.01 & 0.31 & 0.17 & -0.18\\
    std, step $\eta/H$ & 8 & 1.68 & 2.78 & 1.24 & 0.15 & 0.36 & -0.05 & -0.23 & -0.43 & -0.58\\
    std, step $\eta/H$ & 256 & 1.85 & 3.74 & 1.21 & -0.09 & 0.33 & -0.09 & -0.40 & -1.03 & -0.84\\
    NTK centred & 8 & 1.20 & 1.75 & 1.27 & 0.49 & 0.39 & 0.01 & 0.34 & 0.45 & -0.23\\
    NTK centred & 256 & 1.44 & 2.29 & 1.25 & 0.33 & 0.37 & 0.00 & 0.01 & 0.02 & -0.33\\
    \bottomrule
  \end{tabular}
\end{table}

\begin{figure}[htbp]
\centering
\begin{tikzpicture}
\begin{groupplot}[group style={group size=2 by 1,horizontal sep=1.7cm},width=0.47\textwidth,height=6.2cm]
\nextgroupplot[xlabel={$C_A$: $\mu$P, $H=256$, $n=12$ (nats)},ylabel={MST-cut length $\tilde K$ (nats)},xmin=0,xmax=17,ymin=2.5,ymax=9.9,legend pos=south east,legend cell align=left]
\addplot[nngray,only marks,mark=*,mark size=0.8pt] coordinates {(1.49,3.18) (1.52,3.18) (3.52,5.58) (3.54,5.58) (3.61,5.58) (3.75,5.58) (4.12,7.19) (4.16,5.58)
(4.28,5.58) (4.36,7.19) (4.43,5.58) (4.47,5.58) (4.47,7.19) (4.52,7.19) (4.53,7.19) (4.58,8.28)
(4.6,8.28) (4.63,5.58) (4.64,5.58) (4.66,5.58) (4.67,5.58) (4.69,8.28) (4.7,7.19) (4.7,8.28)
(4.71,5.58) (4.76,5.58) (4.8,8.28) (4.84,8.28) (4.94,7.19) (5.01,7.19) (5.42,5.58) (5.46,5.58)
(5.47,7.19) (5.55,5.58) (5.62,7.19) (5.69,5.58) (5.83,8.28) (5.89,7.19) (5.9,7.19) (5.99,7.19)
(6.65,7.19) (7.12,8.28) (7.46,8.98) (7.82,8.28) (7.83,8.98) (7.94,8.28) (7.99,8.98) (8.14,8.28)
(8.26,8.28) (8.31,9.31) (8.47,9.31) (8.48,8.28) (8.5,8.98) (8.91,9.31) (8.95,8.98) (8.95,9.31)
(9.01,8.98) (9.02,9.31) (9.18,8.98) (9.35,8.98) (9.39,8.28) (9.47,9.31) (9.51,8.98) (9.58,8.98)
(9.67,9.31) (9.7,8.28) (9.71,8.28) (9.85,7.19) (10.02,8.98) (10.04,9.31) (10.18,7.19) (10.25,8.28)
(10.26,9.31) (10.45,9.31) (10.48,8.98) (10.51,8.98) (10.53,9.31) (10.62,9.31) (10.65,8.98) (10.66,8.28)
(10.73,9.31) (10.74,8.28) (10.75,8.98) (10.79,9.31) (10.8,8.98) (10.81,9.31) (10.84,8.98) (10.84,9.31)
(10.88,9.31) (10.93,8.28) (10.97,8.28) (11.04,9.31) (11.05,8.98) (11.09,8.28) (11.11,9.31) (11.13,8.28)
(11.14,8.98) (11.17,8.98) (11.2,8.28) (11.22,8.98) (11.25,9.31) (11.31,9.31) (11.32,8.28) (11.37,8.98)
(11.38,9.31) (11.39,9.31) (11.42,9.31) (11.45,9.31) (11.5,8.98) (11.5,9.31) (11.52,9.31) (11.55,8.98)
(11.56,9.31) (11.58,8.98) (11.6,9.31) (11.61,9.31) (11.64,9.31) (11.65,8.98) (11.67,8.98) (11.74,8.98)
(11.75,8.28) (11.83,9.31) (11.86,8.98) (11.87,9.31) (11.9,9.31) (11.91,8.98) (11.91,9.31) (11.94,9.31)
(12,8.98) (12.01,8.98) (12.02,9.31) (12.03,8.28) (12.03,9.31) (12.05,9.31) (12.09,9.31) (12.16,9.31)
(12.17,9.31) (12.25,9.31) (12.26,8.28) (12.26,9.31) (12.32,8.98) (12.38,9.31) (12.39,8.98) (12.42,9.31)
(12.45,8.28) (12.46,9.31) (12.49,8.98) (12.51,9.31) (12.53,8.28) (12.56,8.28) (12.58,8.28) (12.6,8.98)
(12.61,8.28) (12.61,9.31) (12.66,8.98) (12.67,8.98) (12.68,9.31) (12.71,9.31) (12.74,9.31) (12.78,8.98)
(12.79,9.31) (12.81,9.31) (12.85,9.31) (12.87,8.98) (12.88,8.28) (13.01,8.28) (13.01,9.31) (13.04,8.98)
(13.09,8.98) (13.15,9.31) (13.19,9.31) (13.21,9.31) (13.26,8.28) (13.31,8.28) (13.33,8.98) (13.37,9.31)
(13.42,8.98) (13.43,8.98) (13.43,9.31) (13.45,9.31) (13.46,9.31) (13.53,9.31) (13.55,8.28) (13.55,9.31)
(13.56,8.98) (13.57,9.31) (13.59,9.31) (13.6,8.98) (13.61,9.31) (13.63,9.31) (13.64,9.31) (13.67,9.31)
(13.68,9.31) (13.69,9.31) (13.7,8.98) (13.71,9.31) (13.72,9.31) (13.73,8.98) (13.73,9.31) (13.78,9.31)
(13.82,9.31) (13.83,8.98) (13.85,8.98) (13.87,8.98) (13.88,8.98) (13.91,9.31) (13.93,9.31) (13.94,9.31)
(13.95,9.31) (13.97,9.31) (13.99,8.98) (14,9.31) (14.01,7.19) (14.01,9.31) (14.05,8.28) (14.05,8.98)
(14.07,9.31) (14.09,9.31) (14.14,9.31) (14.17,9.31) (14.18,8.98) (14.2,9.31) (14.21,9.31) (14.22,8.28)
(14.22,9.31) (14.23,9.31) (14.26,8.98) (14.29,7.19) (14.3,9.31) (14.31,8.98) (14.38,9.31) (14.39,9.31)
(14.4,8.98) (14.4,9.31) (14.41,9.31) (14.43,8.98) (14.46,9.31) (14.47,8.98) (14.47,9.31) (14.5,8.98)
(14.52,9.31) (14.54,9.31) (14.57,8.98) (14.58,9.31) (14.6,8.98) (14.64,7.19) (14.66,8.98) (14.67,8.98)
(14.67,9.31) (14.71,8.98) (14.73,9.31) (14.76,9.31) (14.79,9.31) (14.81,8.98) (14.81,9.31) (14.82,8.98)
(14.82,9.31) (14.84,8.28) (14.86,9.31) (14.87,9.31) (14.88,8.98) (14.88,9.31) (14.89,9.31) (14.92,8.28)
(14.94,9.31) (14.95,9.31) (14.97,8.28) (14.99,9.31) (15,9.31) (15.01,9.31) (15.03,9.31) (15.05,8.98)
(15.07,9.31) (15.1,8.98) (15.18,8.98) (15.18,9.31) (15.2,9.31) (15.22,9.31) (15.25,8.28) (15.25,8.98)
(15.26,8.98) (15.3,9.31) (15.32,9.31) (15.4,8.98) (15.42,7.19) (15.42,8.98) (15.44,9.31) (15.47,9.31)
(15.49,9.31) (15.56,9.31) (15.58,8.98) (15.59,8.28) (15.59,8.98) (15.62,8.28) (15.64,8.98) (15.65,8.28)
(15.67,8.98) (15.71,9.31) (15.72,8.98) (15.73,9.31) (15.77,9.31) (15.78,5.58) (15.78,7.19) (15.79,9.31)
(15.8,8.28) (15.8,8.98) (15.81,9.31) (15.9,8.98) (15.91,9.31) (15.93,7.19) (15.93,8.98) (15.95,9.31)
(15.96,8.98) (16.02,9.31) (16.04,8.28) (16.07,9.31) (16.12,8.98) (16.13,9.31) (16.14,8.98) (16.16,9.31)
(16.18,8.28) (16.18,8.98) (16.21,8.28) (16.23,8.28) (16.3,8.28) (16.35,8.98) (16.38,8.98) (16.4,8.98)
(16.41,8.98) (16.44,8.98) (16.48,7.19) (16.54,8.98) (16.59,8.98) (16.67,8.98) (16.72,8.28) (16.76,8.98)
(16.79,8.28) (16.91,7.19) (16.98,9.31) (17.04,5.58) (17.13,9.31) (17.2,9.31) (17.54,8.98) (17.56,8.28)
(17.86,9.31) (18.24,7.19)};
\addlegendentry{labelings}
\addplot[nnorange,thick] coordinates {(0,0.201) (4.699,9.6)};
\addlegendentry{$2\,C_A+b_2$}
\addplot[nnblue,thick,dashed] coordinates {(0,3.704) (5.896,9.6)};
\addlegendentry{$C_A+b_1$}
\nextgroupplot[xlabel={$n$},ylabel={nats},xmin=6,xmax=12,ymin=-0.5,ymax=10,legend pos=north west,legend cell align=left,legend columns=1]
\addplot[nngray,thick,dotted] coordinates {(6,4.7875) (7,5.6348) (8,6.3279) (9,7.1389) (10,7.832) (11,8.6205) (12,9.3136)};
\addlegendentry{$\max\tilde K$}
\addplot[nnblue,thick,dashed,mark=*,mark size=1.1pt,mark options={solid}] coordinates {(6,1.6746) (7,1.7853) (8,1.8769) (9,2.1155) (10,2.989) (11,3.2467) (12,3.7597)};
\addlegendentry{$b_1(n)$, $\mu$P}
\addplot[nnorange,thick,mark=square*,mark size=1.1pt] coordinates {(6,0.31358) (7,0.36981) (8,0.40861) (9,0.41002) (10,0.43182) (11,0.41995) (12,0.17061)};
\addlegendentry{$b_2(n)$, $\mu$P}
\addplot[nnmagenta,thick,dashdotted,mark=triangle*,mark size=1.3pt,mark options={solid}] coordinates {(6,1.3579) (7,1.5116) (8,1.6396) (9,1.7396) (10,1.8448) (11,2.8332) (12,3.3456)};
\addlegendentry{$b_2(n)$, std step $\eta$}
\end{groupplot}
\end{tikzpicture}
\caption{The simplicity envelope with the MST-cut code. \textbf{Left}: MST-cut length against exact code length for a sample of the labelings (the $40$ cheapest are all shown) of the $\mu$P network of width $256$, first run, with the two envelopes of smallest intercept. \textbf{Right}: the smallest intercept $b_a(n)$ against $n$ at width $256$ (means over four runs). At slope $2$ one intercept serves $n=6,\dots,12$ in $\mu$P, and not in the standard parametrization with fixed step.\label{fig:conj2}}
\end{figure}

\paragraph{What this shows and what it does not.} \emph{Conjecture~\ref{conj:invariance}} survives, in its labeling-wise form, for the learners whose training is stable in the width, with a constant of at most $3.7$; it fails that reading for the original protocol of Section~\ref{sec:exp}, whose constant against every other learner grows by a factor of $2.0$ to $2.6$ between widths $64$ and $256$. Section~\ref{sec:mup} had already identified that protocol as a large-step regime and not a model of tuned training, so this is not a refutation of the conjecture as stated, which is about tuned pipelines and natural tasks; it is evidence that the words ``standard tuning'' in its statement carry weight, and that an untuned step can make the constant as large as one likes. \emph{Conjecture~\ref{conj:envelope}} fails for LZ78 at these lengths for a reason that belongs to the coder. For the geometry-aware code it survives in the range tested: $\tilde K\le 2\,C_A+b$ with one $b\le0.83$ nats for $n=6$ to $12$, for the four stable learners. It survives as an inequality and not as an explanation: the same code explains at most $0.049$ of the variance of its own length through $C_A$. Seven values of $n$ below $13$ do not decide an asymptotic statement, and both tests are confined to one-hidden-layer networks on Gaussian inputs in three dimensions.

\subsection{What the six experiments add}\label{sec:six-summary}
Four things. First, the list of theorems verified with real numbers now includes the in-context identity, the mixture bound on trained networks and the redistribution corollary, the last on every orbit of every code; the two places where a check returned $10^{-7}$ and not $10^{-15}$ were both traced to rounding errors amplified by the last gradient steps, which is itself information about the step size $0.5$ used throughout. Second, the exact protocol is not restricted to one-hidden-layer networks: convolution, a skip connection and attention were enumerated at the same cost, and their priors differ by up to $15$ nats. Third, the order of presentation is a larger effect than this paper had allowed for: at $n=10$ it moves the whole prior by as much as a change of seed, so the prior of a gradient-trained learner on an unordered input set is defined only up to a few tenths of a nat. Fourth, the two conjectures that were open remain open, but with sharper edges. Conjecture~\ref{conj:invariance} now has two supporting weak tests on real data and one exact test that it passes for width-stable learners and fails for a learner whose step grows with the width. Conjecture~\ref{conj:envelope} holds as an inequality for a geometry-aware code with slope two, and that inequality carries almost no information about which labelings a network finds cheap.

\section{Discussion}

\subsection{Limitations}

The theory is exact, but it is exact about a specific quantity, and its scope should be stated without embellishment. First, everything is in terms of log loss; statements about classification error are obtained only through Corollary~\ref{cor:mistakes}, which can be loose, and learners that output overconfident probabilities are penalized heavily. Second, the compression identity assumes independent, identically distributed examples; under distribution shift, \eqref{eq:identity} becomes a statement about the sequence of shifted risks and loses its simple reading. Third, the sample index is not training time: the theory constrains how loss depends on the amount of data, and says nothing about optimization dynamics at fixed data, which is where grokking and epoch-wise double descent occur. Fourth, the implicit code depends on the order of the examples, and Theorem~\ref{thm:bayes} is a statement for one input sequence; a learner whose code lengths vary strongly across permutations is not well described by a single prior over functions, and the last item of the protocol is designed to measure this. Fifth, the theorems are tautologically satisfied by every learner, including bad ones; all explanatory content about deep networks is in the conjectures, which may be false. Finally, measuring $\CA$ at scale requires repeated retraining and is only approximated by coarse grids.

\subsection{What changes if the programme succeeds}

If the conjectures survive, the practical consequence is a change of units. Architectures, optimizers and pretraining corpora would be compared by code lengths, which are additive, comparable across tasks, and subject to a conservation law, where today they are compared by accuracy on benchmarks, which is none of these. The design question ``is this architecture better'' would be replaced by ``from which labelings deposit this architecture take its mass, and are they labelings we care about'', which Theorem~\ref{thm:conservation} shows to be the only question there is. Pretraining would be understood as the purchase of prior mass on natural tasks at a price given by Theorems~\ref{thm:mixture} and~\ref{thm:icl}. And a negative result would be informative too: a mainstream pipeline that violates multiplicative invariance on natural tasks would be evidence that there is no single notion of learnable structure, and that the field's implicit belief in general-purpose learners is mistaken.



\subsection{Limitations of the new experiments}
The four new experiments share the scale of the protocol: input sets of ten or twelve points in three dimensions, one-hidden-layer networks, sixty full-batch steps in the exact experiments, a few seeds per cell. They decide statements about these learners on these inputs, and every extrapolation to large networks and natural data is a conjecture. The exact priors were computed with a retrained learner at every node of the prefix tree, which is the learner of Definition~\ref{def:learner} but not the single-pass learner used in practice; the experiment of Section~\ref{sec:grok} uses the single-pass one, on a synthetic task. In Section~\ref{sec:dd} the learner is a linear fit on random features, not a gradient-trained network. Several design choices (the extended $\beta$ grid of Section~\ref{sec:gp}, an auxiliary diagnostic learner, a regressor of Section~\ref{sec:mup}) were made after a first look at the results; each is marked in its section. Most references added for this version were written from memory and should be checked against the original publications.

The six experiments of Sections~\ref{sec:icl}--\ref{sec:conjx} share these limitations and add their own. They were run on two CPU cores; for that reason the five-class networks of Section~\ref{sec:tax} were enumerated at $n=8$ and not at $n=10$. The tasks of Section~\ref{sec:icl} are four synthetic half-spaces, and its ``pretrained models'' are small networks retrained on each prefix, not sequence models that learn in context. The architectures of Section~\ref{sec:arch} are minimal (one convolution, one skip connection, one attention head), on two orbits, with four seeds, and at step size $0.5$ the attention learner is numerically unstable in its last steps. In Section~\ref{sec:scal} no step size was tuned, the $\mu$P networks are under-trained, and the learner is retrained at every block, so its numbers are not directly comparable with the single-pass numbers of Section~\ref{sec:exp2}. Section~\ref{sec:order} uses $31$ orders at one value of $n$. In Section~\ref{sec:conjx} the conjectures are tested in a labeling-wise form that is not the form in which they are stated, the slopes $a=2$ and $a=4$ were added after a first look at the results, and seven values of $n\le12$ say little about an asymptotic statement. The hypotheses of the exact experiments were written in the headers of the scripts before the runs, in one session and without external registration; the statements S1--S3 of Section~\ref{sec:scal} were formulated after its results were seen.

\section{Conclusion}

A neural network, together with its training procedure, is a code. Its inductive bias is the code's implicit prior; its generalization is the code's length; its limits are Kraft's equality; its loss curve is the code being written, and its symmetries are paid for in nats. These statements are theorems, with short proofs, valid for every learning procedure. They turn the question of why deep learning works into a question about one measurable distribution, and we have proposed three falsifiable conjectures about that distribution together with a protocol to test them. The ambition of the paper lies in this reduction, and its validity will be decided by the experiments it specifies.

The experiments of this version add a second lesson, which is about method rather than about networks. Because every learner spends exactly one unit of mass, the bias of a pipeline can be computed exactly on small inputs and compared with that of any other pipeline in nats. Applied to the parametrizations of one network, this comparison refuted the conjecture that scale concentrates the prior, located the source of seed dependence in the function at initialization, measured the distance of a network from its kernel and Bayesian limits, and priced double descent and delayed learning. The conjectures that remain open, invariance and the simplicity envelope, can be decided in the same way at larger scale. The six further experiments of Section~\ref{sec:verdicts} have begun to do so at small scale: both conjectures survive there in qualified forms, invariance for learners whose training is stable in the width and the envelope as an inequality with little content, and the same experiments show that the order of the examples must be treated as part of the learner.



\section*{Author contributions}
Conceptualization, formal analysis, methodology, software, investigation, writing (original draft, review and editing): L.E.P. The author has read and agreed to this version of the manuscript.

\section*{Funding}
This research received no external funding.

\section*{Data and code availability}
The numerical results of Section~\ref{sec:exp} are in \texttt{data/results.json}; they are produced by the script of Appendix~\ref{app:code} (Python~3, no dependencies), which was run again for this version (\texttt{data/results\_n10\_rerun.json}). The results of Section~\ref{sec:exp2} are in \texttt{data/results\_n16.json} and \texttt{data/results\_mnist.json} of the first version of this work, produced by \texttt{code/exact\_n16.py} and \texttt{code/mnist\_prequential.py} (Python~3 with NumPy; the latter downloads MNIST). Each of the four experiments of Sections~\ref{sec:mup}--\ref{sec:grok} has its own script \texttt{code/exp\_<key>.py}, its results file \texttt{data/results\_<key>.json} and a script \texttt{code/make\_tex\_<key>.py} that writes the tables and the figure coordinates of the corresponding section from that file; they use the library of Appendix~\ref{app:lib} (\texttt{code/nnc.py}, Python~3 with NumPy and SciPy). All seeds are fixed in the scripts. The six experiments of Section~\ref{sec:verdicts} follow the same convention, with the keys \texttt{icl}, \texttt{arch}, \texttt{scal}, \texttt{order}, \texttt{tax} and \texttt{conj}: scripts \texttt{code/exp\_<key>.py}, results \texttt{data/results\_<key>.json}, and the exact codes \texttt{data/priors\_order.npz} and \texttt{data/priors\_arch.npz}. They use \texttt{code/nnx.py} (Appendix~\ref{app:six}); \texttt{exp\_arch.py} and \texttt{exp\_scal.py} also use PyTorch \citep{Paszke2019}, and \texttt{exp\_scal.py} loads the digits data from scikit-learn. One script, \texttt{code/make\_tex\_six.py}, writes every number, table and figure coordinate of Sections~\ref{sec:icl}--\ref{sec:conjx} from the result files, and \texttt{code/integrate\_six.py} inserts them into the manuscript. \texttt{exp\_conj.py} reads the stored priors \texttt{data/priors\_mup.npz} and recomputes none.

\section*{Acknowledgments}
During the preparation of this manuscript, the author used AI language models (Claude Fable 5.2, model \texttt{claude-fable-5-2}, and Claude Opus 5.5, model \texttt{claude-opus-5-5}, Anthropic) to assist in drafting the text and in writing and running the experiment code. The author has reviewed and edited the output and takes full responsibility for the content of this publication.

\section*{Conflicts of interest}
The author declares no conflicts of interest.

\appendix
\section{The script of Section~\ref{sec:exp}}\label{app:code}
The listing below is the script of Section~\ref{sec:exp}. The scripts of Section~\ref{sec:exp2} (\texttt{code/exact\_n16.py}, \texttt{code/mnist\_prequential.py}) are in the supplementary archive.
\begin{lstlisting}[language=Python]
"""Exact implicit-prior experiments (pure Python, no dependencies).
Computes Q_A(y^n|x^n) for all 2^n binary labelings by evaluating each learner at
every node of the prefix tree (one fresh training run per node)."""
import math, random, json, itertools, sys
N = 10; D = 3; STEPS = 60; LR = 0.5
rng = random.Random(0)
X = [[rng.gauss(0, 1) for _ in range(D)] for _ in range(N)]
sig = lambda z: 1/(1+math.exp(-max(-30, min(30, z))))

def laplace(xs, ys, x):            # exchangeable Bayes learner (KT-like)
    return (sum(ys) + 1) / (len(ys) + 2)
def knn(xs, ys, x):                # smoothed 1-nearest-neighbour
    if not ys: return 0.5
    d = [sum((a-b)**2 for a, b in zip(u, x)) for u in xs]
    return 0.8 if ys[d.index(min(d))] else 0.2
def logreg(xs, ys, x, steps=STEPS):
    w = [0.0]*(D+1)
    for _ in range(steps):
        g = [0.0]*(D+1)
        for u, y in zip(xs, ys):
            e = sig(sum(wi*ui for wi, ui in zip(w, u+[1]))) - y
            for i, ui in enumerate(u+[1]): g[i] += e*ui
        w = [wi - LR*gi/max(1, len(xs)) - 1e-2*LR*wi for wi, gi in zip(w, g)]
    return sig(sum(wi*ui for wi, ui in zip(w, x+[1])))
def make_mlp(H, seed):
    r = random.Random(seed)
    W0 = [[r.gauss(0, 1/math.sqrt(D)) for _ in range(D+1)] for _ in range(H)]
    v0 = [r.gauss(0, 1/math.sqrt(H)) for _ in range(H)]
    def f(xs, ys, x):
        W = [row[:] for row in W0]; v = v0[:]
        for _ in range(STEPS):
            gW = [[0.0]*(D+1) for _ in range(H)]; gv = [0.0]*H
            for u, y in zip(xs, ys):
                u1 = u+[1]; h = [math.tanh(sum(a*b for a, b in zip(W[j], u1))) for j in range(H)]
                e = sig(sum(a*b for a, b in zip(v, h))) - y
                for j in range(H):
                    gv[j] += e*h[j]; c = e*v[j]*(1-h[j]**2)
                    for i in range(D+1): gW[j][i] += c*u1[i]
            m = max(1, len(xs))
            v = [a - LR*b/m for a, b in zip(v, gv)]
            W = [[a - LR*b/m for a, b in zip(W[j], gW[j])] for j in range(H)]
        x1 = x+[1]; h = [math.tanh(sum(a*b for a, b in zip(W[j], x1))) for j in range(H)]
        return sig(sum(a*b for a, b in zip(v, h)))
    return f

def implicit_code(learner, order=None):
    xs = [X[i] for i in (order or range(N))]
    C = {(): 0.0}; frontier = [()]
    for t in range(N):
        nxt = []
        for pre in frontier:
            p = min(1-1e-12, max(1e-12, learner(xs[:t], list(pre), xs[t])))
            C[pre+(1,)] = C[pre] - math.log(p); C[pre+(0,)] = C[pre] - math.log(1-p)
            nxt += [pre+(0,), pre+(1,)]
        frontier = nxt
    return {k: C[k] for k in frontier}

def lz78_bits(s):                  # LZ78 code length in nats (canonical order)
    d, w, c = {''}, '', 0
    for ch in s:
        if w+ch in d: w += ch
        else: d.add(w+ch); c += 1; w = ''
    if w: c += 1
    return c*(math.log(max(c, 1)) + math.log(2))

def spearman(a, b):
    def rk(v):
        o = sorted(range(len(v)), key=lambda i: v[i]); r = [0]*len(v)
        for k, i in enumerate(o): r[i] = k
        return r
    ra, rb = rk(a), rk(b); n = len(a); ma = (n-1)/2
    num = sum((x-ma)*(y-ma) for x, y in zip(ra, rb)); den = sum((x-ma)**2 for x in ra)
    return num/den

pipes = {"Laplace": laplace, "1-NN": knn, "LogReg": logreg,
    "MLP-2": make_mlp(2, 1), "MLP-8": make_mlp(8, 1), "MLP-32": make_mlp(32, 1)}
codes, rows = {}, []
labs = list(itertools.product([0, 1], repeat=N))
lz = [lz78_bits(''.join(map(str, y))) for y in labs]
for name, L in pipes.items():
    C = implicit_code(L); codes[name] = C
    c = [C[y] for y in labs]
    kraft = sum(math.exp(-v) for v in c)
    H = sum(math.exp(-v)*v for v in c)
    rows.append(dict(pipeline=name, kraft_minus_1=kraft-1, entropy=H,
        min_C=min(c), max_C=max(c), n_le_3=sum(v <= 3 for v in c),
        spearman_C_LZ=spearman(c, lz)))
    print(rows[-1], flush=True)
# exchange rates
kl = {}
names = list(pipes)
for a in names:
    for b in names:
        kl[f"{b}||{a}"] = sum(math.exp(-codes[b][y])*(codes[a][y]-codes[b][y]) for y in labs)
# order dependence: spread of C over 20 random permutations for 3 labelings
targets = {"all-zero": tuple([0]*N), "sign(x1)": tuple(int(x[0] > 0) for x in X),
    "random": tuple(random.Random(7).randint(0, 1) for _ in range(N))}
order = {}
for name in ["Laplace", "LogReg", "MLP-8"]:
    for tn, y in targets.items():
        vals = []
        for s in range(20):
            perm = list(range(N)); random.Random(100+s).shuffle(perm)
            yy = [y[i] for i in perm]; xs = [X[i] for i in perm]
            Cv = 0.0
            for t in range(N):
                p = min(1-1e-12, max(1e-12, pipes[name](xs[:t], yy[:t], xs[t])))
                Cv -= math.log(p if yy[t] else 1-p)
            vals.append(Cv)
        m = sum(vals)/len(vals); sd = math.sqrt(sum((v-m)**2 for v in vals)/(len(vals)-1))
        order[f"{name}/{tn}"] = dict(mean=m, sd=sd, min=min(vals), max=max(vals))
# symmetry tax: K-class softmax with zero (permutation-symmetric) init
def softmax_learner(K):
    def f(xs, ys, x):
        W = [[0.0]*(D+1) for _ in range(K)]
        for _ in range(STEPS):
            G = [[0.0]*(D+1) for _ in range(K)]
            for u, y in zip(xs, ys):
                u1 = u+[1]; z = [sum(a*b for a, b in zip(W[k], u1)) for k in range(K)]
                mz = max(z); e = [math.exp(v-mz) for v in z]; s = sum(e)
                for k in range(K):
                    g = e[k]/s - (k == y)
                    for i in range(D+1): G[k][i] += g*u1[i]
            m = max(1, len(xs))
            W = [[a - LR*b/m for a, b in zip(W[k], G[k])] for k in range(K)]
        z = [sum(a*b for a, b in zip(W[k], x+[1])) for k in range(K)]
        mz = max(z); e = [math.exp(v-mz) for v in z]; s = sum(e)
        return [v/s for v in e]
    return f
sym = []
for K in [2, 3, 5, 10]:
    L = softmax_learner(K); y = [t % K for t in range(N)]; k = len(set(y))
    Cv = sum(-math.log(L(X[:t], y[:t], X[t])[y[t]]) for t in range(N))
    sym.append(dict(K=K, k=k, C=Cv, bound=math.lgamma(K+1)-math.lgamma(K-k+1)))
    print(sym[-1], flush=True)
json.dump(dict(n=N, d=D, steps=STEPS, lr=LR, X=X, bias_spectrum=rows, kl=kl,
    order=order, symmetry=sym), open(sys.argv[1], "w"), indent=1)
\end{lstlisting}

\section{The library of Sections~\ref{sec:mup}--\ref{sec:grok}}\label{app:lib}
The listing below is the library \texttt{nnc.py} used by the exact experiments: the exact enumeration of the implicit code on the prefix tree, the summaries of a code, the baseline learners and the one-hidden-layer networks in the four scalings of Table~\ref{tab:params}. Its gradient steps and its agreement with the script of Appendix~\ref{app:code} are checked in Section~\ref{sec:protocol2}.
\begin{lstlisting}[language=Python]
"""nnc.py -- exact implicit codes of small learners (shared library, NumPy only).

Conventions (those of the paper):
  * a learner maps a prefix (x_1..x_{t-1}, y_1..y_{t-1}) and a new input x_t to a distribution on the labels;
  * the implicit code is Q_A(y^n|x^n) = prod_t p_A(y_t | z_<t, x_t) and C_A = -ln Q_A (nats);
  * the exact code on ALL K^n labelings is obtained from the (K^n-1)/(K-1) internal nodes of the prefix tree,
    one training run FROM SCRATCH per node (same initialisation at every node: the seed is part of the learner);
  * labelings are indexed by integers: index k has base-K digits (y_1, ..., y_n), y_1 most significant.
Everything is float64.  Kraft's equality sum_y exp(-C(y)) = 1 must hold to ~1e-12; check it with kraft().
"""
import math
import numpy as np

LN2 = math.log(2.0)


def logsig(z):
    """log(sigmoid(z)), numerically stable."""
    return -np.logaddexp(0.0, -z)


def sigmoid(z):
    return np.exp(logsig(z))


def prefixes(t, K=2):
    """(K^t, t) integer array; row k holds the base-K digits of k, most significant first."""
    if t == 0:
        return np.zeros((1, 0), dtype=np.int64)
    k = np.arange(K ** t, dtype=np.int64)[:, None]
    pw = (K ** np.arange(t - 1, -1, -1, dtype=np.int64))[None, :]
    return (k // pw) % K


def labelings(n, K=2):
    """All K^n labelings, row k = digits of k (same indexing as the codes)."""
    return prefixes(n, K)


def enumerate_code(predict_logp, X, K=2, n=None):
    """Exact implicit code of a learner on all K^n labelings of the inputs X[:n].

    predict_logp(Xtr, Y, xq) -> array (B, K) of log-probabilities of the K labels at the query xq,
    for each of the B = K^t prefixes Y (B, t) on the training inputs Xtr (t, ...).  Rows must be normalised.
    Returns C, shape (K^n,), code lengths in nats."""
    n = len(X) if n is None else n
    C = np.zeros(1)
    for t in range(n):
        Y = prefixes(t, K)
        logp = np.asarray(predict_logp(X[:t], Y, X[t]), dtype=float)
        assert logp.shape == (K ** t, K), logp.shape
        C = (C[:, None] - logp).reshape(-1)
    return C


def binary(predict_logit):
    """Wrap a binary learner returning logits z (B,) of label 1 into a predict_logp for enumerate_code."""
    def f(Xtr, Y, xq):
        z = np.asarray(predict_logit(Xtr, Y, xq), dtype=float)
        return np.stack([logsig(-z), logsig(z)], axis=1)
    return f


def code_of_sequence(predict_logp, X, y):
    """Code length of ONE labeling y (ints) on inputs X in the given order (n training runs)."""
    C = 0.0
    y = np.asarray(y, dtype=np.int64)
    for t in range(len(y)):
        logp = np.asarray(predict_logp(X[:t], y[None, :t], X[t]), dtype=float)
        C -= float(logp[0, y[t]])
    return C


# ---------------------------------------------------------------- summaries of a code
def kraft(C):
    """sum_y exp(-C(y)); equals 1 for a valid implicit code."""
    return math.fsum(np.exp(-np.asarray(C, dtype=float)).tolist())


def entropy(C):
    """Entropy (nats) of the implicit prior Q = exp(-C)."""
    C = np.asarray(C, dtype=float)
    return float(np.sum(np.exp(-C) * C))


def kl(Cp, Cq):
    """KL(P||Q) in nats for P = exp(-Cp), Q = exp(-Cq): average excess code length of Q on labelings drawn from P."""
    Cp = np.asarray(Cp, dtype=float); Cq = np.asarray(Cq, dtype=float)
    return float(np.sum(np.exp(-Cp) * (Cq - Cp)))


def tv(Cp, Cq):
    """Total variation distance between the two implicit priors."""
    return 0.5 * float(np.sum(np.abs(np.exp(-np.asarray(Cp)) - np.exp(-np.asarray(Cq)))))


def spearman(a, b):
    ra = np.argsort(np.argsort(a)).astype(float); rb = np.argsort(np.argsort(b)).astype(float)
    ra -= ra.mean(); rb -= rb.mean()
    return float((ra * rb).sum() / math.sqrt((ra * ra).sum() * (rb * rb).sum()))


# ---------------------------------------------------------------- inputs
def gauss_inputs(n, d=3, seed=0):
    """n inputs i.i.d. N(0, I_d), as in the paper (NumPy generator, seed fixed)."""
    return np.random.default_rng(seed).standard_normal((n, d))


# ---------------------------------------------------------------- baseline learners (binary)
def laplace_logit(Xtr, Y, xq):
    """Laplace (add-one) estimator: ignores the inputs, exchangeable."""
    t = Y.shape[1]
    p = (Y.sum(1) + 1.0) / (t + 2.0)
    return np.log(p) - np.log1p(-p)


def logreg_logit(steps=60, lr=0.5, l2=1e-2):
    """l2-regularised logistic regression trained by full-batch gradient descent from zero (paper, Section 9)."""
    def f(Xtr, Y, xq):
        B, t = Y.shape
        X1 = np.concatenate([Xtr, np.ones((t, 1))], axis=1)
        q1 = np.concatenate([xq, [1.0]])
        w = np.zeros((B, X1.shape[1]))
        for _ in range(steps):
            e = sigmoid(w @ X1.T) - Y
            w = w - lr * (e @ X1) / max(1, t) - l2 * lr * w
        return w @ q1
    return f


# ---------------------------------------------------------------- one-hidden-layer networks
PARAMS = {
    #  name : (output multiplier alpha(H), readout init std s(H), learning-rate multiplier c(H))
    "std":      (lambda H: 1.0,            lambda H: H ** -0.5, lambda H: 1.0),      # paper: sum_j v_j h_j, v~N(0,1/H), fixed step
    "ntk":      (lambda H: H ** -0.5,      lambda H: 1.0,       lambda H: 1.0),      # paper: H^-1/2 sum_j v_j h_j, v~N(0,1)
    "mup":      (lambda H: 1.0 / H,        lambda H: 1.0,       lambda H: float(H)), # mean-field / maximal update: H^-1 sum, step lr*H
    "std_lr/H": (lambda H: 1.0,            lambda H: H ** -0.5, lambda H: 1.0 / H),  # standard init, step lr/H (stable at large H)
}


class MLP:
    """f(x) = alpha * sum_j v_j act(w_j . [x,1])   (first-layer bias as an extra input, no output bias).

    Initialisation: W ~ N(0, 1/d) on the d+1 columns, v = s * u with u ~ N(0,1); the SAME standard normals (W, u)
    are used for every parametrisation at a given seed, so parametrisations differ only by (alpha, s, c).
    Training: `steps` full-batch gradient steps on the MEAN logistic loss, step lr*c on both layers.
    center=True subtracts the function at initialisation (so that the trained function starts at zero)."""

    def __init__(self, H, d, seed, param="std", steps=60, lr=0.5, act="tanh", center=False, chunk_elems=3_000_000):
        rng = np.random.default_rng(seed)
        self.H, self.d, self.param, self.steps, self.lr, self.center = H, d, param, steps, lr, center
        a, s, c = PARAMS[param]
        self.alpha, self.eta = a(H), lr * c(H)
        self.W0 = rng.standard_normal((H, d + 1)) / math.sqrt(d)
        self.v0 = rng.standard_normal(H) * s(H)
        self.act = act
        self.chunk_elems = chunk_elems
        self.stats = []          # one dict per call of logit() with t >= 1 (appended in call order)
        self.keep_stats = False

    def _phi(self, Z):
        if self.act == "tanh":
            return np.tanh(Z)
        if self.act == "erf":
            from scipy.special import erf
            return erf(Z)
        return np.maximum(Z, 0.0)                                   # "relu"

    def _dphi(self, A, Z):
        if self.act == "tanh":
            return 1.0 - A * A
        if self.act == "erf":
            return (2.0 / math.sqrt(math.pi)) * np.exp(-Z * Z)
        return (Z > 0).astype(float)

    def f0(self, X):
        X1 = np.concatenate([X, np.ones((len(X), 1))], axis=1)
        return self.alpha * (self._phi(X1 @ self.W0.T) @ self.v0)

    def logit(self, Xtr, Y, xq):
        """Logits of label 1 at xq after training from scratch on each of the B prefixes (rows of Y)."""
        Y = np.asarray(Y, dtype=float)
        B, t = Y.shape
        q1 = np.concatenate([xq, [1.0]])
        f0q = float(self.alpha * (self._phi(self.W0 @ q1) @ self.v0))
        if t == 0:
            return np.full(B, 0.0 if self.center else f0q)
        X1 = np.concatenate([Xtr, np.ones((t, 1))], axis=1)       # (t, d+1)
        f0tr = self.alpha * (self._phi(X1 @ self.W0.T) @ self.v0)   # (t,)
        out = np.empty(B)
        cb = max(1, int(self.chunk_elems // (self.H * t)))
        acc = dict(t=t, move_f=0.0, move_W=0.0, loss=0.0, nb=0)
        for lo in range(0, B, cb):
            Yc = Y[lo:lo + cb]; b = len(Yc)
            Wt = np.broadcast_to(self.W0, (b,) + self.W0.shape).copy()   # (b,H,d+1)
            v = np.broadcast_to(self.v0, (b, self.H)).copy()             # (b,H)
            for _ in range(self.steps):
                Z = Wt @ X1.T                                            # (b,H,t)
                A = self._phi(Z)
                f = self.alpha * np.einsum("bht,bh->bt", A, v)
                if self.center:
                    f = f - f0tr
                e = (sigmoid(f) - Yc) / t                                # (b,t)
                gv = self.alpha * np.einsum("bht,bt->bh", A, e)
                G = self._dphi(A, Z) * e[:, None, :] * v[:, :, None]     # (b,H,t)
                gW = self.alpha * (G @ X1)                               # (b,H,d+1)
                v -= self.eta * gv
                Wt -= self.eta * gW
            zq = self.alpha * np.einsum("bh,bh->b", self._phi(Wt @ q1), v)
            out[lo:lo + b] = zq - f0q if self.center else zq
            if self.keep_stats:
                f = self.alpha * np.einsum("bht,bh->bt", self._phi(Wt @ X1.T), v)
                fc = f - f0tr if self.center else f
                acc["move_f"] += float(np.sqrt(np.mean((f - f0tr) ** 2, axis=1)).sum())
                acc["move_W"] += float((np.linalg.norm((Wt - self.W0).reshape(b, -1), axis=1) / np.linalg.norm(self.W0)).sum())
                acc["loss"] += float((-(Yc * logsig(fc) + (1 - Yc) * logsig(-fc))).mean(axis=1).sum())
                acc["nb"] += b
        if self.keep_stats:
            nb = acc.pop("nb")
            self.stats.append({k: (v / nb if k != "t" else v) for k, v in acc.items()})
        return out


class SoftmaxMLP:
    """K-class network F_k(x) = sum_j V_kj tanh(w_j . [x,1]) with a softmax output (no output bias).

    W ~ N(0, 1/d); V = out_scale * U / sqrt(H) with U ~ N(0,1) i.i.d. (out_scale = 0: zero-initialised head, which makes
    the learner exactly equivariant under permutations of the class names).  `steps` full-batch gradient steps on the
    mean cross-entropy, step lr.  perm (a permutation of range(K)) permutes the output units of the initialisation:
    V0 <- V0[perm].  Use predict_logp with nnc.enumerate_code(..., K=K)."""

    def __init__(self, H, d, K, seed, out_scale=1.0, steps=60, lr=0.5, perm=None, chunk_elems=3_000_000):
        rng = np.random.default_rng(seed)
        self.H, self.d, self.K, self.steps, self.lr = H, d, K, steps, lr
        self.W0 = rng.standard_normal((H, d + 1)) / math.sqrt(d)
        self.V0 = out_scale * rng.standard_normal((K, H)) / math.sqrt(H)
        if perm is not None:
            self.V0 = self.V0[np.asarray(perm)]
        self.chunk_elems = chunk_elems

    @staticmethod
    def _logsoftmax(F):
        F = F - F.max(axis=-1, keepdims=True)
        return F - np.log(np.exp(F).sum(axis=-1, keepdims=True))

    def predict_logp(self, Xtr, Y, xq):
        Y = np.asarray(Y, dtype=np.int64)
        B, t = Y.shape
        q1 = np.concatenate([xq, [1.0]])
        if t == 0:
            return np.broadcast_to(self._logsoftmax(self.V0 @ np.tanh(self.W0 @ q1)), (B, self.K)).copy()
        X1 = np.concatenate([Xtr, np.ones((t, 1))], axis=1)
        out = np.empty((B, self.K))
        cb = max(1, int(self.chunk_elems // (self.H * t * max(1, self.K // 2))))
        eye = np.eye(self.K)
        for lo in range(0, B, cb):
            Yc = Y[lo:lo + cb]; b = len(Yc)
            T1 = eye[Yc]                                                  # (b,t,K) one-hot
            Wt = np.broadcast_to(self.W0, (b,) + self.W0.shape).copy()
            V = np.broadcast_to(self.V0, (b,) + self.V0.shape).copy()     # (b,K,H)
            for _ in range(self.steps):
                A = np.tanh(Wt @ X1.T)                                    # (b,H,t)
                F = np.einsum("bkh,bht->btk", V, A)
                E = (np.exp(self._logsoftmax(F)) - T1) / t                # (b,t,K)
                gV = np.einsum("bht,btk->bkh", A, E)
                G = (1.0 - A * A) * np.einsum("btk,bkh->bht", E, V)
                gW = G @ X1
                V -= self.lr * gV
                Wt -= self.lr * gW
            out[lo:lo + b] = self._logsoftmax(np.einsum("bkh,bh->bk", V, np.tanh(Wt @ q1)))
        return out


def mlp_code(X, H, seed, param="std", K=2, n=None, **kw):
    """Exact implicit code of the network on all 2^n labelings of X; returns (C, net)."""
    net = MLP(H, X.shape[1], seed, param=param, **kw)
    return enumerate_code(binary(net.logit), X, n=n), net


if __name__ == "__main__":
    import time, sys
    n = int(sys.argv[1]) if len(sys.argv) > 1 else 10
    X = gauss_inputs(n, 3, 0)
    for name, f in [("Laplace", laplace_logit), ("LogReg", logreg_logit())]:
        C = enumerate_code(binary(f), X)
        print(f"{name:10s} kraft-1={kraft(C)-1:+.1e} H={entropy(C):.3f} min={C.min():.2f} max={C.max():.2f}")
    for param in PARAMS:
        for H in (2, 8, 32):
            t0 = time.time(); C, net = mlp_code(X, H, 1, param)
            print(f"{param:9s} H={H:4d} kraft-1={kraft(C)-1:+.1e} H(Q)={entropy(C):.3f} min={C.min():.2f} max={C.max():.2f} {time.time()-t0:.2f}s")
\end{lstlisting}

\section{The utilities of Sections~\ref{sec:icl}--\ref{sec:conjx}}\label{app:six}
The listing below is \texttt{nnx.py}, the extension of the library of Appendix~\ref{app:lib} used by the six experiments of Section~\ref{sec:verdicts}: the inputs and initializations of the script of Appendix~\ref{app:code}, the marginal of a code on a prefix, the re-indexing of a code computed on permuted inputs, the mixture of codes, the LZ78 and MST-cut compressors, and $K$-class softmax regression.
\begin{lstlisting}[language=Python]
"""nnx.py -- utilities shared by the six experiments of Section 16 (exp_order, exp_tax, exp_conj, exp_icl, exp_arch,
exp_scal).  Extends nnc.py; NumPy only.  Labelings are indexed as in nnc (y_1 most significant digit)."""
import math, os, random, sys
import numpy as np

sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
import nnc

DATA = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "data")
WORK = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "work")
os.makedirs(WORK, exist_ok=True)


# ---------------------------------------------------------------- the inputs and networks of the Section 9 script
def script_inputs(n=10, d=3):
    """The inputs of experiments_n10.py (Python's random, seed 0)."""
    r = random.Random(0)
    return np.array([[r.gauss(0, 1) for _ in range(d)] for _ in range(n)])


def script_mlp(H, seed=1, d=3, **kw):
    """nnc.MLP (standard parametrisation) carrying the initialisation of make_mlp(H, seed) of experiments_n10.py."""
    r = random.Random(seed)
    net = nnc.MLP(H, d, 0, param="std", **kw)
    net.W0 = np.array([[r.gauss(0, 1 / math.sqrt(d)) for _ in range(d + 1)] for _ in range(H)])
    net.v0 = np.array([r.gauss(0, 1 / math.sqrt(H)) for _ in range(H)])
    return net


# ---------------------------------------------------------------- operations on codes
def marginal(C, t, K=2):
    """Code of the first t labels (Lemma 1: the marginal of Q on y^t is Q(y^t|x^t))."""
    A = -np.asarray(C).reshape(K ** t, -1)
    m = A.max(axis=1)
    return -(m + np.log(np.exp(A - m[:, None]).sum(axis=1)))


def to_canonical(C_perm, perm, K=2):
    """C_perm: code computed on the inputs X[perm]; returns the code indexed by the labelings of X in canonical order,
    i.e. out[index(y)] = C_perm[index(y[perm])]."""
    n = len(perm)
    L = nnc.labelings(n, K)
    pw = K ** np.arange(n - 1, -1, -1, dtype=np.int64)
    return np.asarray(C_perm)[(L[:, list(perm)] * pw).sum(axis=1)]


def mixture(codes, w):
    """Code of the mixture sum_k w_k Q_k (Theorem 4)."""
    A = -np.stack(codes) + np.log(np.asarray(w))[:, None]
    m = A.max(axis=0)
    return -(m + np.log(np.exp(A - m).sum(axis=0)))


# ---------------------------------------------------------------- compressors
def lz78(s):
    """LZ78 code length (nats) of a 0/1 sequence, as in experiments_n10.py."""
    d, w, c = {""}, "", 0
    for ch in s:
        ch = str(int(ch))
        if w + ch in d:
            w += ch
        else:
            d.add(w + ch); c += 1; w = ""
    if w:
        c += 1
    return c * (math.log(max(c, 1)) + math.log(2))


def lz78_all(n):
    return np.array([lz78(y) for y in nnc.labelings(n)])


def mst_edges(X):
    """Euclidean minimum spanning tree (Prim, root = point 0); list of (parent, child)."""
    n = len(X)
    D = np.linalg.norm(X[:, None] - X[None], axis=2)
    intree = [0]; best = D[0].copy(); par = np.zeros(n, dtype=int); edges = []
    best[0] = np.inf
    for _ in range(n - 1):
        j = int(np.argmin(best))
        edges.append((int(par[j]), j)); intree.append(j)
        upd = D[j] < best
        upd[intree] = False
        par[upd] = j; best[upd] = D[j][upd]; best[j] = np.inf
    return edges


def mst_cut_all(X):
    """MST-cut code (Section 10.4) of all 2^n labelings: ln 2 + ln n + ln binom(n-1, c), c = number of cut edges."""
    n = len(X)
    L = nnc.labelings(n)
    c = np.zeros(len(L), dtype=int)
    for a, b in mst_edges(X):
        c += (L[:, a] != L[:, b])
    lb = np.array([math.lgamma(n) - math.lgamma(k + 1) - math.lgamma(n - k) for k in range(n)])
    return math.log(2) + math.log(n) + lb[c], c


# ---------------------------------------------------------------- K-class softmax regression
class SoftmaxReg:
    """K-class softmax regression F(x) = W [x,1], `steps` full-batch gradient steps on the mean cross-entropy.
    W0 = 0 is the learner of Section 9.5 (exactly equivariant under permutations of the class names);
    init_scale > 0 draws W0 ~ N(0, init_scale^2/d), which breaks the symmetry."""

    def __init__(self, d, K, init_scale=0.0, seed=1, steps=60, lr=0.5, chunk=400_000):
        self.K, self.steps, self.lr, self.chunk = K, steps, lr, chunk
        self.W0 = init_scale * np.random.default_rng(seed).standard_normal((K, d + 1)) / math.sqrt(d)

    def predict_logp(self, Xtr, Y, xq):
        Y = np.asarray(Y, dtype=np.int64)
        B, t = Y.shape
        q1 = np.concatenate([xq, [1.0]])
        ls = nnc.SoftmaxMLP._logsoftmax
        if t == 0:
            return np.broadcast_to(ls(self.W0 @ q1), (B, self.K)).copy()
        X1 = np.concatenate([Xtr, np.ones((t, 1))], axis=1)
        out = np.empty((B, self.K))
        eye = np.eye(self.K)
        for lo in range(0, B, self.chunk):
            T1 = eye[Y[lo:lo + self.chunk]]                          # (b,t,K)
            W = np.broadcast_to(self.W0, (len(T1),) + self.W0.shape).copy()
            for _ in range(self.steps):
                E = (np.exp(ls(np.einsum("bkd,td->btk", W, X1))) - T1) / t
                W -= self.lr * np.einsum("btk,td->bkd", E, X1)
            out[lo:lo + self.chunk] = ls(W @ q1)
        return out


def stats(v):
    v = np.asarray(v, dtype=float)
    return dict(mean=float(v.mean()), sd=float(v.std(ddof=1)) if v.size > 1 else 0.0, min=float(v.min()),
                max=float(v.max()), median=float(np.median(v)), q25=float(np.quantile(v, .25)),
                q75=float(np.quantile(v, .75)))
\end{lstlisting}

\bibliographystyle{plainnat}
\bibliography{references_neural}

\end{document}
