10 / 10 Regularisation and generalisation
  1. ← Neural networks: foundations and mathematics
  2. 00 Foreword
  3. 01 The artificial neuron
  4. 02 Essential linear algebra
  5. 03 Activation functions
  6. 04 The perceptron
  7. 05 From the neuron to the multilayer network
  8. 06 Forward pass and loss functions
  9. 07 Derivatives and the chain rule
  10. 08 Backpropagation
  11. 09 Gradient descent
  12. 10 Regularisation and generalisation
Neural networks: foundations and mathematics · 10 / 10

Regularisation and generalisation

How to stop a network from memorising and force it to generalise.

In chapter 9, we proved that gradient descent drives the score down, step after step, as long as the step stays reasonable. That is a real guarantee. But it concerns the training score, the one computed on the examples the network has in front of it. And a polynomial of degree nine can pass exactly through ten measurement points, with a score of zero, while oscillating wildly between them.

The question of this chapter is therefore: how can we tell whether a network has learned the trend or only the points? And above all, how do we stop it from memorising without stopping it from learning? We will see that the classical answers can be proven, and that they are closer to one another than they look.

Act 1: memorising is not learning

Picture a student preparing for an exam with the past papers of the last ten years. They have a prodigious memory: they retain every model answer, word for word. On past papers, they score full marks. On exam day, the paper is new. They are stuck. They learned the answers, not the method.

A neural network runs exactly the same risk. What we ask of it is to answer well on examples it has never seen: that is generalisation. What we make it minimise is the score on the training examples. The two do not coincide. When the training score is excellent but the performance on new examples is poor, we speak of overfitting Overfitting A situation where a model fits its training examples so closely that it also learns their noise: its training loss is excellent, but its performance on new examples is poor. It has memorised the points instead of the trend. Source: Goodfellow, Bengio and Courville, 2016 .

The polynomial that goes everywhere. Take ten measurement points (x1,y1),…,(x10,y10)(x_1, y_1), \ldots, (x_{10}, y_{10}) whose abscissas are all different. There always exists a polynomial of degree at most nine that passes through all of them. We can write it explicitly:

P(x)=∑i=110yi∏j≠ix−xjxi−xj.P(x) = \sum_{i=1}^{10} y_i \prod_{j \ne i} \frac{x - x_j}{x_i - x_j}.

This is the Lagrange interpolation polynomial. It reads: for each point ii, we build a product that equals 11 at xix_i and 00 at every other xjx_j, then multiply it by yiy_i. At x=xkx = x_k, every term vanishes except the one for kk, which equals yky_k. So P(xk)=ykP(x_k) = y_k for every point: the training score is exactly zero.

If the measurements are noisy, this polynomial also hugs the noise. Between the points, it makes loops that have nothing to do with the real trend, especially near the edges. Runge (1901) showed that, even without noise, interpolation through equally spaced points can oscillate more and more strongly as the degree increases.

A network does the same. The universal approximation theorem of chapter 5 says that a wide enough network can represent almost any function. The flip side is brutal: it can also represent any memorisation. Zhang and his co-authors (2017) verified this spectacularly. They replaced the labels of an image dataset with labels drawn at random, with no link at all to the images. The networks still reached a perfect training score. On new images, of course, they answered at random. The training score alone therefore says nothing about generalisation.

Act 2: three datasets

Since the training score lies, we must measure something else. The idea is simple: we set aside examples that the network will never see during training, and we score it on them. We therefore split the data into three disjoint parts.

Why not merge validation and test? Because by repeatedly picking the setting that gives the best score on a set, we end up adapting to that set. Each choice is a small dose of learning. If we announced the validation score as the final performance, it would be optimistic. The test set must stay untouched until the very end.

Comparing the two scores gives a diagnosis:

  • Both scores are poor: this is underfitting, the model is too simple.
  • Training very good, validation poor: this is overfitting, the model has learned the noise.
  • Both good and close: this is a good balance, the model has learned the trend.

The rest of the chapter presents remedies for overfitting. They share a common name: regularisation Regularisation Any change to training that aims to improve generalisation, even at the cost of a slightly worse training loss. Examples: L2 and L1 penalties on the weights, early stopping, dropout. Source: Goodfellow, Bengio and Courville, 2016 , meaning anything we add to training to improve generalisation, even at the price of a slightly worse training score.

Act 3: the L2 penalty, or weight decay

The degree-nine polynomial that oscillates has a signature: huge coefficients, which cancel each other out to pass through every point. A natural idea is therefore to penalise large weights. We no longer minimise the score alone, but the score plus a fine proportional to the squared norm of the weights:

J(w)=L(w)+λ ∥w∥2,λ≥0.J(w) = L(w) + \lambda\,\|w\|^2, \qquad \lambda \ge 0.

It reads: the new score is the old one, plus λ\lambda times the sum of the squared weights. The number λ\lambda sets how heavy the fine is. At λ=0\lambda = 0, we recover the original score. The larger λ\lambda, the more expensive large weights become.

The update rule. The gradient of λ ∥w∥2=λ∑jwj2\lambda\,\|w\|^2 = \lambda\sum_j w_j^2 is 2λ w2\lambda\,w. A descent step on JJ therefore reads

w  ←  w−η(∇L(w)+2λ w).w \;\leftarrow\; w - \eta\big(\nabla L(w) + 2\lambda\,w\big).

We group the terms in ww:

w  ←  (1−2ηλ) w−η ∇L(w).w \;\leftarrow\; (1 - 2\eta\lambda)\,w - \eta\,\nabla L(w).

This line explains the name, weight decay Weight decay (L2 penalty) A regularisation that adds λ times the sum of the squared weights to the loss. Each descent step then multiplies the weights by 1 − 2ηλ before the gradient correction, hence the name. It mostly shrinks the directions that the data determine poorly. Source: Krogh and Hertz, 1992 . Even before the gradient correction, each step multiplies every weight by 1−2ηλ1 - 2\eta\lambda, a number slightly below 11. If the data do not call for a weight, it melts away on its own, step after step (Krogh and Hertz, 1992). In practice, only the weights are penalised, not the biases: a bias merely shifts an output, it does not create oscillations.

What the penalty does exactly. To find out, we study a score we know everything about: a sum of parabolas, one per weight,

L(w)=∑i=1nai (wi−wi⋆)2,ai>0.L(w) = \sum_{i=1}^{n} a_i\,(w_i - w_i^\star)^2, \qquad a_i > 0.

Without a penalty, its minimum is w⋆w^\star. Each aia_i is the curvature along weight ii, exactly as in chapter 9. This case is not just a toy: near a minimum, any smooth score looks like a bowl of this kind, after a well-chosen change of axes (Goodfellow, Bengio and Courville, 2016, section 7.1.1).

Theorem (shrinkage). The minimum of J(w)=L(w)+λ ∥w∥2J(w) = L(w) + \lambda\,\|w\|^2 is reached at

wi=aiai+λ wi⋆for each i.w_i = \frac{a_i}{a_i + \lambda}\,w_i^\star \quad \text{for each } i.

Proof. The penalised score is a sum of terms that each depend on a single weight:

J(w)=∑i=1n(ai (wi−wi⋆)2+λ wi2).J(w) = \sum_{i=1}^{n} \Big( a_i\,(w_i - w_i^\star)^2 + \lambda\,w_i^2 \Big).

We can therefore minimise each term separately. Fix ii and differentiate the term g(wi)=ai (wi−wi⋆)2+λ wi2g(w_i) = a_i\,(w_i - w_i^\star)^2 + \lambda\,w_i^2:

g′(wi)=2ai (wi−wi⋆)+2λ wi.g'(w_i) = 2a_i\,(w_i - w_i^\star) + 2\lambda\,w_i.

This derivative vanishes when (ai+λ) wi=ai wi⋆(a_i + \lambda)\,w_i = a_i\,w_i^\star, that is at wi=aiai+λ wi⋆w_i = \frac{a_i}{a_i + \lambda}\,w_i^\star. Finally, gg is a parabola whose wi2w_i^2 coefficient is ai+λ>0a_i + \lambda > 0: it opens upwards, so this point is its unique minimum. □

How to read it. Each optimal weight is multiplied by a factor aiai+λ\frac{a_i}{a_i + \lambda}, between 00 and 11. This factor depends on the curvature:

  • if aia_i is large compared with λ\lambda, the factor is close to 11: the weight is almost untouched;
  • if aia_i is small compared with λ\lambda, the factor is close to 00: the weight is crushed.

Now, a low curvature means that moving this weight barely changes the training score. The data do not really know what to do with it. It is precisely in these blurry directions that noise settles, because nothing stops it. The L2 penalty therefore leaves in place what the data determine clearly, and erases what they determine poorly. This is the ridge regression of Hoerl and Kennard (1970), rediscovered under another name by neural networks.

A bonus for descent. On the penalised score, the curvature along weight ii becomes ai+λa_i + \lambda. By chapter 9, descent therefore converges for η<1ai+λ\eta < \frac{1}{a_i + \lambda} in each direction. And the ravine softens: with curvatures 11 and 1010, the ratio between the steep and the flat direction is 1010. With λ=1\lambda = 1, it becomes 112=5.5\frac{11}{2} = 5.5.

Play with the lab. The ten points are noisy measurements of a sine wave, drawn as a dotted line. Start at degree nine with no penalty, then raise λ\lambda notch by notch.

Regularization lab

λerror (log)
  • Training error
  • Validation error
  • best
  • current
Best λ : 10⁻²
Training error : 0.000
Validation error : 0.304
Diagnosis : overfitting
Diagnosis : overfitting

Three things to watch as you play:

  • At λ=0\lambda = 0 and degree nine, the curve passes exactly through the ten points: the training error is zero, but the validation error is poor. That is memorisation.
  • As you raise λ\lambda, the training error always increases, while the validation error first drops, then rises again. The right-hand graph draws a U: the right setting sits at the bottom.
  • With a very large λ\lambda, the curve flattens towards the mean of the points. That is underfitting, caused this time by a fine that is too heavy.

Act 4: the L1 penalty and sparsity

Another possible fine uses the absolute value instead of the square:

J(w)=L(w)+λ ∥w∥1,∥w∥1=∑j∣wj∣.J(w) = L(w) + \lambda\,\|w\|_1, \qquad \|w\|_1 = \sum_{j} |w_j|.

It looks like a detail. It is a difference in kind: the L1 penalty sets weights exactly to zero, which the L2 penalty never does. To see it, take the simplest case, a single weight with a score of curvature 11 centred at cc.

Proposition (soft thresholding). For λ>0\lambda > 0, the function h(w)=(w−c)2+λ ∣w∣h(w) = (w - c)^2 + \lambda\,|w| reaches its minimum at

w={c−λ2if c>λ2,0if ∣c∣≤λ2,c+λ2if c<−λ2.w = \begin{cases} c - \frac{\lambda}{2} & \text{if } c > \frac{\lambda}{2}, \\[4pt] 0 & \text{if } |c| \le \frac{\lambda}{2}, \\[4pt] c + \frac{\lambda}{2} & \text{if } c < -\frac{\lambda}{2}. \end{cases}

Proof. The absolute value changes formula at 00, so we reason by cases.

Case ∣c∣≤λ2|c| \le \frac{\lambda}{2}. We compare h(w)h(w) with h(0)=c2h(0) = c^2. For w>0w > 0, we have ∣w∣=w|w| = w and

h(w)−h(0)=w2−2cw+λw=w (w+λ−2c).h(w) - h(0) = w^2 - 2cw + \lambda w = w\,(w + \lambda - 2c).

Since c≤λ2c \le \frac{\lambda}{2}, the number λ−2c\lambda - 2c is non-negative, so the bracket is strictly positive, and so is the product. For w<0w < 0, we have ∣w∣=−w|w| = -w and

h(w)−h(0)=w2−2cw−λw=w (w−2c−λ).h(w) - h(0) = w^2 - 2cw - \lambda w = w\,(w - 2c - \lambda).

Since c≥−λ2c \ge -\frac{\lambda}{2}, the number −2c−λ-2c - \lambda is non-positive, so the bracket is strictly negative. A negative number times a negative number is positive. In both cases, h(w)>h(0)h(w) > h(0): the minimum is at 00.

Case c>λ2c > \frac{\lambda}{2}. For w≥0w \ge 0, h(w)=(w−c)2+λwh(w) = (w - c)^2 + \lambda w is an upward parabola, with derivative 2(w−c)+λ2(w - c) + \lambda, which vanishes at w=c−λ2w = c - \frac{\lambda}{2}. This point is indeed positive, so it is the minimum over w≥0w \ge 0. For w≤0w \le 0, the derivative of h(w)=(w−c)2−λwh(w) = (w - c)^2 - \lambda w is 2(w−c)−λ2(w - c) - \lambda, which is strictly negative since w≤0<cw \le 0 < c: hh decreases down to 00, so nothing does better than h(0)h(0), which is itself beaten by h(c−λ2)h(c - \frac{\lambda}{2}).

Case c<−λ2c < -\frac{\lambda}{2}. This is the previous case seen in a mirror: replace ww with −w-w and cc with −c-c. □

How to read it. The L1 penalty moves each weight towards zero by a fixed amount, λ2\frac{\lambda}{2}, and if the weight cannot afford it, it falls to zero and stays there. Compare with L2 in the same situation: the minimum of (w−c)2+λ w2(w - c)^2 + \lambda\,w^2 is c1+λ\frac{c}{1 + \lambda}, which is never zero as long as c≠0c \ne 0. L2 trims every weight proportionally. L1 switches some of them off.

A model in which many weights are exactly zero is called sparse. This is useful when we suspect that only a few inputs really matter: L1 does the sorting on its own. This is the lasso of Tibshirani (1996). When the score has several weights with curvatures aia_i, the same computation gives a threshold of λ2ai\frac{\lambda}{2a_i} per weight.

Act 5: early stopping

The third method does not touch the score. It touches the schedule. During training, we measure the validation score at every epoch. At first, it goes down along with the training score. Then, at some point, it starts climbing while the training score keeps falling: the network is starting to learn the noise. We keep the weights from the best moment, and we stop. This is early stopping Early stopping A regularisation that monitors the validation loss during training and keeps the weights from the moment it was lowest, before the network learns the noise. On a quadratic loss, stopping after t steps acts like an L2 penalty of strength about 1/(2ηt). Source: Prechelt, 1998 .

In practice, we do not stop at the first rise, which may only be a hiccup. We allow a patience of a few epochs, and we keep in memory the best weights seen so far (Prechelt, 1998).

It looks like an engineering trick. We will see that it is a regularisation in the full sense, and even a very close cousin of L2.

Theorem (exact trajectory). Take the score L(w)=∑iai (wi−wi⋆)2L(w) = \sum_i a_i\,(w_i - w_i^\star)^2 again, and run gradient descent without a penalty from w=0w = 0, with a rate η\eta. After tt steps, each weight equals

wi(t)=(1−(1−2ηai)t) wi⋆.w_i(t) = \Big(1 - (1 - 2\eta a_i)^t\Big)\,w_i^\star.

Proof. The derivative of the score with respect to wiw_i is 2ai (wi−wi⋆)2a_i\,(w_i - w_i^\star). A descent step therefore gives

wi(t+1)=wi(t)−2ηai (wi(t)−wi⋆).w_i(t+1) = w_i(t) - 2\eta a_i\,\big(w_i(t) - w_i^\star\big).

We subtract wi⋆w_i^\star from both sides and factor:

wi(t+1)−wi⋆=(1−2ηai) (wi(t)−wi⋆).w_i(t+1) - w_i^\star = (1 - 2\eta a_i)\,\big(w_i(t) - w_i^\star\big).

This is exactly the geometric sequence of chapter 9, applied to the gap from the minimum. At the start, the gap is 0−wi⋆=−wi⋆0 - w_i^\star = -w_i^\star. After tt steps, it is therefore −(1−2ηai)t wi⋆-(1 - 2\eta a_i)^t\,w_i^\star. We add wi⋆w_i^\star to recover the weight, and we get the formula. □

How to read it. As with L2, each final weight wi⋆w_i^\star is multiplied by a factor between 00 and 11 that depends on the curvature. Steep directions converge in a few steps: their factor quickly reaches 11. Flat directions barely move: their factor stays close to 00 while tt is small. Stopping early therefore means keeping the well-determined directions and leaving the blurry ones behind. Exactly what the L2 penalty did.

Corollary (same envelope as L2). Assume η≤12ai\eta \le \frac{1}{2a_i}, the zone of calm descent from chapter 9. Then the early stopping factor and the L2 factor satisfy

1−(1−2ηai)t  ≤  2ηt aiandaiai+λ  ≤  aiλ.1 - (1 - 2\eta a_i)^t \;\le\; 2\eta t\,a_i \qquad\text{and}\qquad \frac{a_i}{a_i + \lambda} \;\le\; \frac{a_i}{\lambda}.

If we choose λ=12ηt\lambda = \frac{1}{2\eta t}, both factors therefore lie under the same line 2ηt ai2\eta t\,a_i.

Proof. The second inequality is immediate: enlarging a denominator, by adding ai>0a_i > 0 to it, makes a positive fraction smaller. For the first, set u=2ηaiu = 2\eta a_i, which lies between 00 and 11. It is enough to show Bernoulli’s inequality,

(1−u)t  ≥  1−t ufor every integer t≥0.(1 - u)^t \;\ge\; 1 - t\,u \quad \text{for every integer } t \ge 0.

We proceed by induction. For t=0t = 0, it reads 1≥11 \ge 1. If it holds at rank tt, we multiply it by 1−u1 - u, which is non-negative, so the inequality keeps its direction:

(1−u)t+1  ≥  (1−t u)(1−u)=1−(t+1) u+t u2.(1 - u)^{t+1} \;\ge\; (1 - t\,u)(1 - u) = 1 - (t+1)\,u + t\,u^2.

The last term t u2t\,u^2 is non-negative, so (1−u)t+1≥1−(t+1) u(1 - u)^{t+1} \ge 1 - (t+1)\,u: this is rank t+1t + 1. □

How to read it. The number of steps plays the role of the inverse of the penalty: λ≈12ηt\lambda \approx \frac{1}{2\eta t}. Stopping very early amounts to regularising very strongly, letting it run for a long time amounts to barely regularising. Be careful about exactly what the corollary says: it proves that both factors share the same envelope for flat directions, and that both tend to 11 for steep directions. It does not say they are equal. The equivalence between early stopping and L2 is an approximation, very good in practice, analysed in detail by Sjöberg and Ljung (1995) and by Goodfellow, Bengio and Courville (2016, section 7.8). Exercise 5 will have you measure the gap.

Switch the lab to early stopping mode. Descent starts from zero coefficients, at degree nine, with no penalty.

Regularization lab

epocherror (log)
  • Training error
  • Validation error
  • best
  • current
Epoch : 0
Best epoch : 72
Training error : 0.453
Validation error : 0.444
Diagnosis : underfitting
Early stopping. Best epoch : 72

Three things to watch as you play:

  • At first, the curve is flat, then it takes the shape of the sine wave: the steep directions, the overall trend, are learned first.
  • The validation error reaches its minimum fairly early, then rises again while the curve twists to catch every point.
  • Compare the best validation error with the one for the best λ\lambda in penalty mode. They are very close: two different roads to the same regularisation.

Act 6: dropout

The last method was born with deep networks. During training, at each step, we randomly switch off some of the hidden neurons. Each neuron is kept with probability pp, and switched off otherwise, independently of the others. At the next step, we draw again. This is dropout Dropout A regularisation that, at each training step, randomly switches off each hidden neuron with probability 1 − p. The kept outputs are divided by p to preserve their mean, so the full network is used at prediction time without any correction. Source: Srivastava et al., 2014 (Hinton et al., 2012; Srivastava et al., 2014).

Think of a football team that trains without ever knowing which players will show up. Nobody can rely entirely on one specific teammate, so everyone learns to be useful on their own. In a network, the matching danger is called co-adaptation: neurons that only work together, correcting each other, often to fit the noise. Dropout breaks up these arrangements.

Inverted dropout. For each hidden neuron jj, we draw a mask mjm_j equal to 11 with probability pp and 00 otherwise. The output hjh_j of the neuron is replaced by

h~j=mj hjp.\tilde h_j = \frac{m_j\,h_j}{p}.

It reads: if the neuron is kept, its output is divided by pp, hence amplified; if it is switched off, the output is zero. Why amplify?

Proposition (the mean is preserved). On average over the mask draws, E[h~j]=hj\mathbb{E}[\tilde h_j] = h_j.

Proof. The mask equals 11 with probability pp and 00 with probability 1−p1 - p, so its mean is

E[mj]=p⋅1+(1−p)⋅0=p.\mathbb{E}[m_j] = p \cdot 1 + (1 - p) \cdot 0 = p.

Since hjh_j and pp are fixed during the draw, we get

E[h~j]=hjp E[mj]=hjp⋅p=hj.□\mathbb{E}[\tilde h_j] = \frac{h_j}{p}\,\mathbb{E}[m_j] = \frac{h_j}{p} \cdot p = h_j. \qquad \square

By linearity, the weighted sum received by the next layer, ∑jwj h~j+b\sum_j w_j\,\tilde h_j + b, also has mean ∑jwj hj+b\sum_j w_j\,h_j + b. Practical consequence: at prediction time, we turn dropout off and use the full network, with no correction at all. The exact mean is only guaranteed before the activation function. After a non-linearity, preservation is only approximate, which works very well in practice.

A crowd of sub-networks. Each mask defines a sub-network. With nn hidden neurons, there are 2n2^n of them, and they all share the same weights. With 100100 neurons, that is 21002^{100}, more than 103010^{30}. Training with dropout means training each of them a little. Predicting with the full network means letting this whole crowd vote, approximately. And an average of many models has a lower variance than each of them: we find the third term of the bias-variance decomposition again. Srivastava and his co-authors recommend p=0.5p = 0.5 for hidden neurons and a value closer to 11, such as 0.80.8, for inputs.

Exercises

Grab something to write with. The solutions are deliberately detailed, line by line.

Exercise 1. Three networks give the following errors (training, validation): network A (0.30, 0.32)(0.30,\ 0.32), network B (0.01, 0.25)(0.01,\ 0.25), network C (0.04, 0.06)(0.04,\ 0.06). Give a diagnosis for each. Then: to choose the strength λ\lambda of a penalty, on which set do you compare the settings, and why not on the test set?

Exercise 2. A weight equals w=2w = 2, and backpropagation gives ∂L/∂w=0.5\partial L / \partial w = 0.5. Take a descent step with η=0.1\eta = 0.1 and an L2 penalty of strength λ=0.5\lambda = 0.5. Compare with the same step without a penalty.

Exercise 3. A two-weight score is L(w)=4 (w1−1)2+0.25 (w2−1)2L(w) = 4\,(w_1 - 1)^2 + 0.25\,(w_2 - 1)^2. With an L2 penalty of strength λ=1\lambda = 1, where is the minimum? Which direction is shrunk the most, and why?

Exercise 4. Three weights have the unpenalised minimum c=(3, 0.4, −1)c = (3,\ 0.4,\ -1), each on a score (w−c)2(w - c)^2. Compute the optimal weights with an L1 penalty of strength λ=1\lambda = 1, then with an L2 penalty of the same strength.

Exercise 5. A direction has curvature a=0.1a = 0.1 and minimum w⋆=2w^\star = 2. We start from w=0w = 0 with η=0.1\eta = 0.1 and stop after t=5t = 5 steps. Compute the resulting weight, check the corollary’s bound, then compare with the associated L2 penalty λ=12ηt\lambda = \frac{1}{2\eta t}.

In one sentence

A network can learn its examples by heart, and regularisation (the L2 penalty that shrinks blurry directions, the L1 penalty that switches weights off, early stopping that acts like an L2 penalty of strength 12ηt\frac{1}{2\eta t}, dropout that lets a crowd of sub-networks vote) trades a little training score for much better generalisation, tuned on a validation set.

Quiz

Quiz
  1. 1. A network has a training error of 0.01 and a validation error of 0.30. What is happening?

  2. 2. On a score Σ aᵢ (wᵢ − wᵢ*)², what does an L2 penalty of strength λ do?

  3. 3. Which penalty can set a weight exactly to zero?

  4. 4. Why is early stopping said to be a form of regularisation?

  5. 5. With inverted dropout, what do we do at prediction time?

Towards chapter 11

Early stopping starts from zero weights, and the L2 penalty pulls the weights towards zero. Everything pushes towards zero. So why not simply start a network with all its weights at zero? Because it would be fatal. Go back to the toy network of chapter 8, with its two hidden neurons. If their weights are identical at the start, they compute the same output, receive the same error signal, and undergo exactly the same update. At the next step, they are still identical, and so on forever. Two twin neurons are worth only one: the network has lost its hidden layer. Conversely, initial weights that are too large saturate the sigmoids, and we fall back on the vanishing gradient of chapter 8. We therefore need to start from weights that are small, but different, and at the right scale. Chapter 11 computes that scale, then shows how to maintain it layer after layer throughout training: this is initialisation, and batch normalisation.

Sources

  • Runge, C. (1901). “Über empirische Funktionen und die Interpolation zwischen äquidistanten Ordinaten.” Zeitschrift für Mathematik und Physik 46, 224-243. archive.org
  • Hoerl, A. E. & Kennard, R. W. (1970). “Ridge Regression: Biased Estimation for Nonorthogonal Problems.” Technometrics 12(1), 55-67. DOI 10.1080/00401706.1970.10488634
  • Krogh, A. & Hertz, J. A. (1992). “A Simple Weight Decay Can Improve Generalization.” Advances in Neural Information Processing Systems 4, 950-957.
  • Geman, S., Bienenstock, E. & Doursat, R. (1992). “Neural Networks and the Bias/Variance Dilemma.” Neural Computation 4(1), 1-58. DOI 10.1162/neco.1992.4.1.1
  • Sjöberg, J. & Ljung, L. (1995). “Overtraining, regularization and searching for a minimum, with application to neural networks.” International Journal of Control 62(6), 1391-1407. DOI 10.1080/00207179508921605
  • Tibshirani, R. (1996). “Regression Shrinkage and Selection via the Lasso.” Journal of the Royal Statistical Society, Series B 58(1), 267-288. DOI 10.1111/j.2517-6161.1996.tb02080.x
  • Prechelt, L. (1998). “Early Stopping, But When?” In Neural Networks: Tricks of the Trade, LNCS 1524, Springer, 55-69. DOI 10.1007/3-540-49430-8_3
  • Hinton, G. E., Srivastava, N., Krizhevsky, A., Sutskever, I. & Salakhutdinov, R. (2012). “Improving neural networks by preventing co-adaptation of feature detectors.” arXiv:1207.0580
  • Srivastava, N., Hinton, G., Krizhevsky, A., Sutskever, I. & Salakhutdinov, R. (2014). “Dropout: A Simple Way to Prevent Neural Networks from Overfitting.” Journal of Machine Learning Research 15, 1929-1958. jmlr.org
  • Zhang, C., Bengio, S., Hardt, M., Recht, B. & Vinyals, O. (2017). “Understanding deep learning requires rethinking generalization.” ICLR 2017. arXiv:1611.03530
  • Goodfellow, I., Bengio, Y. & Courville, A. (2016). Deep Learning. MIT Press. Chapter 7, especially sections 7.1.1 (L2 penalty) and 7.8 (early stopping). https://www.deeplearningbook.org