Skip to content
The Daily Triptych222 / 365
Real network against its linearisation

Schematic. As width grows, the trained network's prediction trajectory tracks the closed-form linear model; a narrow network drifts away because its kernel keeps changing during training.

II · THE IDEA · ARTIFICIAL INTELLIGENCE

The Neural Tangent Kernel

theory of deep learning · arXiv 1806.07572, 2018 · arXiv 1902.06720, 2019 · large width, small learning rate

▶ Listen · narrated

Two papers, a year apart, showed that when a neural network is made wide enough, the result of training it can be written down as a formula — no training run required.

At a glance

What it is
A dot product of the network's parameter gradients at two inputs
The limit
As width grows the kernel becomes deterministic and stops drifting
Consequence
Training behaves like a model linear in its parameters
Squared loss
Gradient-flow dynamics admit a closed-form solution
Scope shown
Fully connected nets of any depth, and convolutional ones
Breaks down when
Width is modest, or the learning rate is too large

A piano has a great many strings. Strike one key and, because the strings share a frame, other strings hum faintly too. If you knew, for every pair of keys, exactly how much striking the first shakes the second, you could predict the whole instrument's behaviour without touching it.

A neural network's training examples are connected in a similar way. When the network adjusts its internal numbers to fix its answer on one example, its answers on other examples shift as a side effect. The neural tangent kernel is the table of those connections: for any two inputs, one number saying how strongly a fix to the first drags the answer on the second.

In a small network the connections themselves shift as training goes on, so the table keeps being rewritten. The 2018 result says that as you make the network's layers wider, the table settles. It becomes the same table every time, whatever random numbers you started with, and it stops changing while you train.

Once the table is fixed, predicting the outcome of training is a problem statistics solved long ago. The 2019 paper wrote the answer down as a formula, then trained real networks and checked. The real results and the formula's results matched, for networks of many depths and for convolutional networks too — as long as the network was wide and the training steps were small. Make the steps too big and the match falls apart.

Look closer

  1. The kernel is a dot product of gradients

    Take one input and write down a long list of numbers, one per parameter, each saying how much the network's output on that input would move if you nudged that parameter slightly. Do it again for a second input and you have two lists. The neural tangent kernel is their dot product: multiply the lists entry by entry, add everything up, and one number comes out. That number answers a concrete question. When gradient descent adjusts the parameters to fix the network's answer on the first input, how much does its answer on the second input move as a side effect? A large kernel value means a large knock-on effect. Near zero, and the two inputs are treated almost independently.

  2. At large width the kernel stops moving

    In a small network that list of gradients changes as training proceeds, so the knock-on effects change too, and the dynamics are hard to pin down. The central claim of the 2018 paper is that as the layers are made wider, the kernel converges to a fixed, deterministic function which no longer depends on the random initialisation and no longer drifts during training. The moving target holds still. Once it holds still, ordinary kernel methods — a well-understood corner of statistics that predates deep learning — apply to the network's training.

  3. Linearity is the visible signature

    The 2019 paper makes the consequence checkable rather than abstract. If the parameters travel only a short distance from where they started, the network is well approximated by its first-order Taylor expansion about that starting point: output equals initial output plus gradient times parameter change. That approximation is linear in the parameters, though still nonlinear in the input. So you can train a wide network, separately evaluate the linearised formula, and compare the two prediction curves. The paper reports agreement for fully connected networks of any depth and for convolutional networks, provided the learning rate stays below a critical value.

The story

A neural network learns by adjusting its parameters — the millions of internal numbers that determine what answer it gives — a little at a time, until its answers on the training examples come out right. Gradient descent, the standard method, works by repeated small corrections: measure how wrong the current answer is, work out which direction each parameter should move to shrink the error, and take a small step that way. What all those steps add up to is usually hard to say in advance. It depends on the data, on the random numbers the parameters started from, and on the order in which the examples arrive. The 2018 paper that introduced the neural tangent kernel found one circumstance in which the whole process becomes predictable.

Start with the object itself. Pick an input and ask, for each parameter in turn: if this parameter were nudged slightly, how much would the network's output on this input shift? Each answer is a single number, called a gradient. Collect one for every parameter and you have a long list attached to that input — one entry per parameter, millions of entries in a large network.

Now take two inputs and their two lists. Multiply the lists entry by entry and add up all the products. The single number that comes out is the neural tangent kernel for that pair of inputs, and it answers a concrete question about side effects. When gradient descent adjusts the parameters to fix the network's answer on the first input, the same parameters serve every other input too, so the answer on the second input moves as well. The kernel value says how far. A large value means fixing one answer drags the other a long way. A value near zero means the two inputs are handled almost independently.

That number exists for any network of any size. The trouble is that it normally will not sit still. The gradients depend on where the parameters currently are; the parameters move at every step of training; so the kernel keeps turning into something different as training proceeds. The side effects that governed the early steps are not the side effects that govern the later ones, and the whole process resists analysis.

The 2018 result identifies the escape. Make every layer wider — more units side by side, more parameters — and let the width grow without limit. In that limit the kernel converges to one fixed, deterministic function. It no longer depends on which random values the parameters happened to start from. And it stops drifting during training: the same table of side effects holds from the first step to the last.

Once the kernel is fixed, training lands in territory statisticians had already mapped. Kernel methods are a family of techniques, older than deep learning, in which you never work with the inputs directly — only with a similarity score between pairs of them — and a prediction on a new input is a weighted combination of the training labels, weighted by how similar the new input is to each training example. Gradient descent on a very wide network, in this account, performs something very close to that kind of regression, with the neural tangent kernel supplying the similarity score. Questions about convergence, meaning whether training reaches a good fit, and generalisation, meaning what the network does on inputs it never saw, can then be asked in a language that already had answers.

The 2019 paper turned the limit into something checkable at real, finite width. Its route is linearisation. Suppose the parameters end up travelling only a short distance from their random starting point. Then the network's output is well approximated by a simple rule: take the output at the start, and for each parameter add its displacement multiplied by its gradient at the start. That rule is linear in the parameters — double every displacement and the correction doubles — though still nonlinear in the input. And a linear model trained by gradient descent under squared loss, where the error is the squared gap between prediction and target, is a solved problem. Taking gradient flow, which is gradient descent with infinitesimally small steps, the paper writes down a closed-form expression for the model's predictions at every moment of training, including the end.

The striking part is the check. Train a real wide network. Separately, evaluate the formula, which requires no training at all. Plot both prediction curves against training time. The paper reports that the two curves track each other closely — for fully connected networks of any depth, and for convolutional networks — provided two conditions hold. The network must be wide enough. And the learning rate, the size of each training step, must stay below a critical threshold the paper identifies. Push past that threshold and the match breaks, for a reason the framework itself explains: large steps carry the parameters far from their starting point, and the linear approximation was built around that starting point.

The honest reading is therefore narrow. The neural tangent kernel does not explain deep learning as practised. It explains one regime — wide layers, small steps, parameters staying near their random initial values — in which deep learning becomes mathematically transparent, and it states exactly what that transparency costs. In this regime there is almost no feature learning. A deep network is usually valued for discovering new internal representations of its data; here, a fixed kernel means a fixed set of features, chosen by chance at initialisation, and training merely reweights them. Whether the successes of practical networks — trained with large learning rates, for a long time, with parameters wandering far from where they began — are mostly kernel-like or mostly not, neither paper settles.

Why it mattered then

Before 2018 there was a gap between what deep networks did and what anyone could prove about them. The successes were experimental; the theorems mostly covered shallow networks or problems with a single best answer. The neural tangent kernel offered a bridge of a particular kind. Rather than inventing new mathematics for nonlinear training, it identified conditions under which old mathematics already applies: kernel methods, a well-understood corner of statistics that predates deep learning. Questions about convergence and generalisation could then be asked in a language that already had answers. The 2019 follow-up mattered because a limit theorem alone invites an obvious objection: nobody trains an infinitely wide network. By deriving the linear model's exact training trajectory and comparing it against real runs of fully connected and convolutional networks, the paper converted a statement about infinity into a claim about finite systems with a stated boundary — the critical learning rate above which the match stops holding. A theory that says where it fails is more useful than one that does not.

Why it matters now

The kernel gives a baseline. When someone claims a network has learned a representation — an internal way of describing the data that it worked out for itself — the neural tangent kernel supplies the sceptical alternative: perhaps the network is only behaving like a linear model over features fixed at random at the start, in which case nothing was learned in the interesting sense. Testing which of the two is happening has become a standard way to frame the question. The closed-form solution under squared loss also makes wide networks a laboratory. You can compute what training would produce without running it, which turns claims about optimisation and generalisation into arithmetic rather than experiments. And the failure conditions matter directly for practice. The 2019 paper ties agreement with the linear model to two things: enough width, and a learning rate below a critical value. Read the other way round, that says the settings practitioners actually favour — aggressive learning rates, long training, parameters wandering far from their starting values — are precisely the settings this theory does not describe. That is worth knowing about your own training runs.

The surprising detail

The two conditions of the theory pull against each other. The whole account rests on the parameters barely moving from their random starting values; that is why the linear approximation built around those values stays accurate. But the reason people build deep networks rather than kernel machines is the belief that the parameters should move a long way and discover useful features in the data. So the regime in which a network becomes mathematically transparent is arguably the regime in which it has stopped doing the thing it was built for. The 2019 paper's critical learning rate makes the tension measurable: below it, the network agrees with its linear model; above it, the agreement breaks. Whether real, useful networks live above or below that line, the sources do not resolve.

What is disputed

The results here are stated for a regime, not for deep learning generally. The 2018 paper works in the infinite-width limit; the 2019 paper reports close agreement between real networks and their linearisations for fully connected networks of any depth and for convolutional networks, conditional on sufficient width and a learning rate below a critical value. Nothing in these sources establishes how much of a practical network's performance is captured by its neural tangent kernel, and the extent to which feature learning outside this regime accounts for real-world results remains open.

Remember this

Widen a network enough and its gradients stop changing during training. What remains is a fixed similarity score between inputs, and gradient descent becomes linear regression through it.

Test yourself

The neural tangent kernel account depends on the parameters staying near their initial values. Why does that assumption sit awkwardly with the usual justification for using deep networks at all?

Go deeper

Image: Original diagram, The Daily Triptych. Licence: Original work. Source.

← Back to day 222