Finding better settings
We know how a gradient tells weights which way to move. But when a network has many weights, the surface of possible losses can twist, flatten and contain several valleys.
This chapter asks why training often makes progress anyway, and why adding many neurons can sometimes make the search easier to analyze.
5.1 The shape of training loss
Loss landscape analysis · paper pp. 39–41
Training changes the network settings to reduce loss, a number that measures mistakes. For one weight w, draw its value across a page and its loss L(w) upward. The slope tells us how loss changes when w changes a little: a positive slope means increasing w raises loss. With many weights, the gradient collects these slopes; backpropagation calculates them by working backward through the network.
A hidden neuron multiplies inputs by weights, adds a bias, then applies a rule called an activation. ReLU is an activation that replaces negative numbers with zero. The output adds the neurons’ results after multiplying each by an output weight.
From the paper
function networkOutput(x) {
return { output: 3 * Math.max(0, x - 1) + 2 * Math.max(0, -x + 1) };
}
const result = networkOutput(2);Choose a change. Predict, then run.
A flower-counting dial
Made-up exampleExplore
Find the lowest loss among the six marked integer settings.
Tap the illustration or use the buttons
Compare settings 0 through 5.
Current: 4; Error: 1.2
In the formula x is the input, θ holds weights and biases, n counts hidden neurons, and ρ is the activation. The notation [x; 1] appends 1 to the inputs. Multiplying that 1 by the bias and adding it includes the bias in the same weighted sum. Changing θ changes the loss and traces a landscape of possible losses.
In a flat place, nearby changes barely affect loss. A valley bottom is a local minimum: nearby settings do not have lower loss. A saddle can be a bottom in one direction but a top in another. The paper asks why training often finds useful settings despite these shapes. Some results connect wide networks by paths where loss rises very little.
Other arguments compare simplified loss landscapes with models from statistical physics, which studies how many interacting parts behave together. Those comparisons need assumptions about the landscape that practical networks may not satisfy. A local minimum need not be the lowest loss among all possible settings.
5.2 When parameters move only a little
Lazy training and provable convergence of stochastic gradient descent · paper pp. 41–44
It sounds as though a network must move its weights far to learn something new. Surprisingly, for certain very wide networks, the many weights can each move only a little and still change the output enough.
Try the simpler rule f(w) = w² near w = 2. At 2 the result is 2² = 4; at 2.1 it is 2.1² = 4.41. We can estimate the change using the slope at 2.
From the paper
function linearApproximation(weight, change) {
const linear = weight ** 2 + 2 * weight * change;
const exact = (weight + change) ** 2;
return { linear, exact };
}
const result = linearApproximation(2, 0.1);Choose a change. Predict, then run.
Small prediction changes
Made-up exampleExplore
Predict how many 0.1 corrections take a guess from 2 to 3.
Tap the illustration or use the buttons
Find the difference between the goal and the starting guess, then divide by the correction size.
Input: 2; Corrections: 0.1
Start with 2² = 4. The slope at 2 is 4, so for a change of 0.1 the estimated change is 4×0.1 = 0.4. Adding it gives 4.4, close to the exact 2.1² = 4.41. Why? For a small change Δ, (2 + Δ)² = 4 + 4Δ + Δ²; the estimate leaves out the small Δ². In the network formula Θ₀ is the starting setting, θ is the new setting, and the gradient lists the starting rate of change for each parameter.
The paper uses this local straight-line approximation for a network near its starting weights. For sufficiently wide networks with suitable initialization and other stated assumptions, researchers can show that this approximation remains useful during training.
In these special regimes, gradients can be strong enough to reduce training loss reliably without weights traveling far. That helps explain some convergence results; it does not prove all networks train successfully or that tiny weight changes always generalize.
For some networks with many neurons and carefully chosen starting weights, small changes help explain steady training progress. Other networks can behave differently. Next we ask how the arrangement of connections can help the calculation.
Try the chapter quiz
An independent educational explanation of The Modern Mathematics of Deep Learning — Julius Berner, Philipp Grohs, Gitta Kutyniok, Philipp Petersen. Examples use invented numbers unless a measured dataset is credited.