How Many Random Neurons Buy a Trained One?

· 14 min read

#kernels#random-features#lazy-training#yat#mlp#jax

Part 9 of 9The Prototype Network
  1. 1Your Network Is a List of Pictures. You Can Edit It.
  2. 2How Much of a Fashion-MNIST Network Can You Build by Hand?
  3. 3How Far Down Can You Build?
  4. 4When 80% Should Mean 80%
  5. 5The White-Box Survival Model on Trial
  6. 6Your Network Is a Stack of Layers. It Could Be a Fixed Point.
  7. 7Edit One Operator, Edit Every Depth
  8. 8One Kernel Family, Fitted Two Ways
  9. 9How Many Random Neurons Buy a Trained One?you are here
Runnable JAX companionLazy Training a Yat Network in JAX/Flax NNXPrefer to read the code? This post has a hands-on JAX / Flax NNX implementation.Open the JAX companion

A Yat prototype earns its accuracy by moving: gradient descent drags it onto the data until it is a picture of something. This post forbids the movement. The prototypes are frozen at random initialization, noise they will remain, and only the linear readout is allowed to learn. The question is how much network is left, and the answer has a number in it.

Features are supposed to be where the knowledge lives. That is the reason the construction audit separates learned, random, and hand-built representations. So here is a network that treats its features with open contempt. Draw a bank of Yat prototypes from the initializer, look at them (noise), freeze them forever, and let a linear map learn to read whatever those frozen dice happen to measure. Every instinct says this network is broken before it starts.

It reaches 85 percent on Fashion-MNIST. That is above the raw-pixel prototype head built here with care, above the hand-built feature stack that took an oriented-edge dictionary and a lot of patience, within half a point of a trained convolutional network’s own head. A pile of frozen noise, read well, matches nearly everything construction achieved. And then the second surprise, the one the title asks about: sixteen trained Yat neurons beat that entire pile, at every width we could afford to freeze. Both surprises are the same fact seen from two sides, and the kernel literature has known its name for decades.

One neuron, one sample

Why should a readout be able to classify from features that are pure noise? A frozen Yat unit computes ϕw(x)=(wx+b)2/(xw2+ε)\phi_w(x) = (w \cdot x + b)^2 / (\lVert x - w \rVert^2 + \varepsilon) against a prototype ww that no gradient will ever improve. One such number tells you almost nothing about xx. But the readout never sees one such number; it sees mm of them, and mm bad detectors read together stop behaving like detectors at all. They behave like a single estimator.

The estimator only becomes visible when two inputs meet. Their feature vectors multiply into 1muϕwu(x)ϕwu(y)\frac{1}{m} \sum_{u} \phi_{w_u}(x)\, \phi_{w_u}(y), and each term of that sum depends on one random prototype: each neuron contributes exactly one draw of the random variable ϕw(x)ϕw(y)\phi_w(x)\phi_w(y), so the sum is an mm-sample Monte Carlo estimate of its expectation over the initialization distribution,

KRF(x,y)  =  Ew ⁣[ϕw(x)ϕw(y)].K_{\mathrm{RF}}(x, y) \;=\; \mathbb{E}_{w}\!\left[\phi_w(x)\,\phi_w(y)\right].

That expectation is a fixed, deterministic kernel: a similarity function on images that was decided by the distribution of the initialization, before any particular dice were rolled. A frozen random layer is not a broken network. It is a kernel machine whose Gram entries are estimated by dice, one neuron per sample, and the estimate concentrates at the only rate Monte Carlo knows, O(1/m)O(1/\sqrt{m}). This is the observation Neal made for infinite random networks in 1996 and Rahimi and Recht turned into an algorithm in 2007, the same move the kernel-machine post met as the historical escape from the Gram solve, now pointed the other way: not approximating a kernel we already had, but discovering which kernel a random Yat bank secretly is.

Watch the readout do all the work

But an estimated kernel is only worth something if a classifier can stand on it, and here the frozen bank has a structural gift waiting. With the features fixed, the network’s entire remaining freedom is the linear readout, and cross-entropy in a linear model is a convex problem: one basin, no initialization luck, plain gradient descent guaranteed to find the bottom, the same collapse-to-convexity that made the readout a solvable object when this series first took a readout apart. Everything difficult about deep learning has been quarantined inside a bank of frozen dice.

So watch it happen. Nothing below is precomputed: the bank is rolled, the features are computed, and the readout is trained, right here, on real Fashion-MNIST images.

The pattern the dial teaches is the post’s whole plot. At any fixed mm the readout climbs, plateaus, and stops: it has extracted everything the frozen features expose, and the wall it hits is not a training failure but an estimation error, the O(1/m)O(1/\sqrt{m}) noise still sitting in the kernel. Raise mm and the wall moves. Which turns the vague question this post opened with into a precise one: how fast does the wall move, and where does it stop?

The width ladder

So we paid for the full sweep: Fashion-MNIST at full 784-pixel resolution, widths from 16 to 8,192, three seeds each, every arm at its own bracketed learning rate (bundle kgl_blog-yatlazy-v1). Three frozen banks climb the ladder: random Yat prototypes, data-seeded Yat prototypes (random training images promoted to centers, the move the kernel literature calls Nystrom), and random frozen ReLU features as the classical control. Above them, one dashed line: the same Yat network with nothing frozen.

Read the frozen random curve against what came before it. At 128 units it passes the 79 percent a Yat head built straight on raw pixels earns. At 256 it passes the 83.3 percent that took a hand-built bank of oriented-edge detectors to reach. By 512 it sits at 85.3, within half a point of the trained backbone’s own head at 85.7. None of those units means anything. The bank was never shown the data, never touched by a gradient, and if you render its prototypes as images they remain the static the initialization control exposed.

The climb also has a shape, and the shape is a law. Fit excess error against width on the climbing region and you get err(m)12.4+cm0.71\mathrm{err}(m) \approx 12.4 + c\, m^{-0.71} with R2R^2 of 1.000 to three decimals; the frozen ReLU control fits 12.9+cm0.7112.9 + c\, m^{-0.71} the same way. Two different frozen kernels, one exponent. The Monte Carlo guarantee only promises the estimate improves like m1/2m^{-1/2}; the measured decay is faster, which a guarantee permits, but the structure is the one the theory names: a power-law climb toward a floor. And both floors sit at about 12.4 to 12.9 percent error, two to three points short of where the trained twin lives. That floor is the random-feature kernel itself, the best any readout can ever do on this bank’s geometry, and no number of additional dice reaches past it.

The ladder also has two wrinkles. Past 1,024 units the frozen Yat bank stops climbing and slips back a little; re-bracketing its learning rate at the top widths and tripling the training budget (bundles kgl_blog-yatlazy-bigm, -bigm2) recovers 2,048 to the peak (85.4) but leaves 4,096 and 8,192 gently below it (84.9, 84.5), so within this protocol the stall is real, and the widest bank we froze is not the best one. And the knee of the whole curve, the width where climbing turns to crawling, sits between 256 and 512 units, which is where random-feature theory says it should: the classical results promise the full kernel machine’s statistical rate at about n\sqrt{n} features, and 60,000245\sqrt{60{,}000} \approx 245.

Now put the dashed line back in the picture, because it settles the title’s question with unkind speed. The trained twin enters the plot at sixteen units already at 86.3 percent, a full point above the best frozen bank of any width at any budget, and plateaus at 88.8 by 256. Sixteen moved prototypes outrank eight thousand frozen ones; the sweep never found the exchange rate because, within our budget, there is none. Every frozen curve climbs toward a ceiling that the trained network clears before its second doubling.

But the strangest row in the run is the green curve, and it breaks the intuition this experiment was designed around.

Seeding the prototypes on real images is how this series made neurons legible, it is the Nyström construction with its own chapter of theory, and each unit becomes a genuine local detector. It loses anyway: 79.3 against the random bank’s 84.1 at 256 units, behind at every width until the random bank’s late stall. The correlation measurement explains the inversion. The random bank’s 256 units are highly correlated (mean absolute correlation 0.42) and span about five effective feature directions; the data bank’s units are nearly independent (0.01) and span about 230. Five directions beat two hundred thirty by five points. Whatever the random Yat bank’s few shared channels measure, they are worth more per direction than a whole population of local detectors. Naming those channels is this post’s open thread.

Let the features go

The frozen curves flatten into their floor; the dashed line above them does not care. Now unfreeze, and ask the question the freeze was designed to isolate: what exactly does training the features buy, and how does the price move with width?

At sixteen units the answer is enormous: 24.4 points, a broken model against a working one. Widen the frozen bank and the gap collapses, to 10.2 points at 64 units, 4.7 at 256, 3.5 at 512, where it bottoms out; past the stall it drifts back up because the frozen side gives ground, not because the trained side gains any. This shrinking gap is the central experience of the lazy-training literature, and the theory built around it says why it happens: make the model big enough and a network can fit its data while each weight barely moves, staying inside its own linearization, a kernel machine in denial. In the infinite-width limit that kernel has a name, the neural tangent kernel, and training the features buys exactly nothing.

So the natural expectation is that our network, as it widens, moves its features less and less. Measure it:

The expectation is wrong, and it is wrong along a power law. Relative feature movement grows with width, WendW0/W0m0.49\lVert W_{\text{end}} - W_0 \rVert / \lVert W_0 \rVert \propto m^{0.49} with R2R^2 0.998, from double the initialization norm at sixteen units to forty-three times at 8,192, and the median unit travels essentially as far as the average says. There is no contradiction with the theory, because the theory’s laziness is a promise about a specific regime, scaled outputs, tuned-down step sizes, the linearization deliberately preserved, and this network, trained with standard parameterization and its own bracketed learning rate, does not enter that regime. LeCun-normal prototypes are born with norm about one in a dataset whose images have norm nine and a half; to become readable prototypes, they must travel, and they do, further the more of them there are, while the learned kernel scalars drift the same way the attention heads’ scalars drifted. Width sends every prototype further from where it started while each unit’s marginal value falls.

The classical Gaussian bank plays the same experiment in a darker key. The kernel textbooks’ warning about radial-basis networks is that their hidden units make poor gradient citizens, which is why the classical recipe trained centers by clustering and only solved for the readout. Our Gaussian arm, centers on real images, bandwidth at the median heuristic, does move when trained (relative movement 0.9 to 1.7, comparable to the data-seeded Yat arm’s 1.2 to 1.4), so at this bandwidth the immobility folklore does not bite. What bites is the ceiling: frozen, the Gaussian bank plateaus at 75 percent no matter how many centers it gets; trained, it tops out at 84.4; its trained-minus-frozen gap holds near nine points at every width, never closing. The Yat arms converge toward their kernel’s floor; the Gaussian arms just run in parallel, nine points apart at every width we tried, and never converge at all.

Scope: the sweep ran on Kaggle (main bundle kgl_blog-yatlazy-v1: seven arms, widths 16 to 8,192, three seeds, twelve epochs, each arm at the learning rate bracketed by its own in-run sweep; rate audits kgl_blog-yatlazy-lrsweep, -lrsweep2; the large-width budget checks kgl_blog-yatlazy-bigm, -bigm2 at a re-bracketed rate and triple budget). The same analysis computes the correlation measurement and the movement fit. All of it sits at a single dataset and a single input scale, with one initialization family per arm; the power-law exponents and the stall are statements about this protocol, not theorems. The square-root-of-n remark is an observed coincidence with the classical random-feature guarantees, whose formal conditions (ridge regression, minimax rates) this setup does not check. The in-page panels train on a 2,000-image subset at 14x14 and report their own live numbers, which are not the run’s.

A kernel is a readout away

The lazy network runs the whole argument in reverse. Forward, it went: put a kernel where the activation was and the network becomes legible, editable, constructable. Backward, it says: refuse to train the kernel’s centers at all and there is still a working machine underneath, because a frozen random bank was a kernel before it was ever a network. One neuron, one Monte Carlo sample; the readout, a convex afterthought, does the rest. Everything training the features adds, the whole three-to-twenty-four points this run priced, is the difference between the kernel your initializer happens to define and the kernel your data deserves.

Which is why the sixteen trained neurons win. They are not sixteen lucky dice; they are sixteen centers that traveled, at the cost of a nonconvex search, to the places where Fashion-MNIST actually lives, pictures again, each worth more than five hundred frozen ones. Training features is the nonconvex part this fixed random bank cannot reproduce. That is what it is for.

Cite as

Bouhsine, T. (). How Many Random Neurons Buy a Trained One?. Records of the !mmortal Data Scientist. https://tahabouhsine.com/blog/lazy-training/

BibTeX
@misc{bouhsine2026lazytraining,
  author       = {Bouhsine, Taha},
  title        = {How Many Random Neurons Buy a Trained One?},
  year         = {2026},
  month        = {jul},
  howpublished = {\url{https://tahabouhsine.com/blog/lazy-training/}},
  note         = {Blog post, Records of the !mmortal Data Scientist}
}

References

  1. Neal, R. M. (1996). Bayesian Learning for Neural Networks. Springer Lecture Notes in Statistics 118.
  2. Rahimi, A., Recht, B. (2007). Random Features for Large-Scale Kernel Machines. NeurIPS 2007.
  3. Broomhead, D. S., Lowe, D. (1988). Multivariable Functional Interpolation and Adaptive Networks. Complex Systems 2, 321-355.
  4. Williams, C. K. I., Seeger, M. (2001). Using the Nystrom Method to Speed Up Kernel Machines. NeurIPS 2001.
  5. Chizat, L., Oyallon, E., Bach, F. (2019). On Lazy Training in Differentiable Programming. NeurIPS 2019.arXiv:1812.07956
  6. Jacot, A., Gabriel, F., Hongler, C. (2018). Neural Tangent Kernel: Convergence and Generalization in Neural Networks. NeurIPS 2018.arXiv:1806.07572
  7. Rudi, A., Rosasco, L. (2017). Generalization Properties of Learning with Random Features. NeurIPS 2017.arXiv:1602.04474
  8. Bouhsine, T. (2026). A Universal Reproducing Kernel Hilbert Space from Polynomial Alignment and IMQ Distance. arXiv:2605.03262