4 Regularization and Optimization
Lecture 3
Based on Lecture 3 of CS231n, Stanford University, Spring 2025.
4.1 Two questions the loss leaves open
The objective built in the previous chapter, Equation 3.5, turns a classifier into a number, but it does not single out a classifier. Take the car image from that chapter’s worked example. With the scores , and put the correct class more than a margin ahead of both competitors, so . Now double every entry of . The scores become , and ; the margins double along with them; and the loss is unchanged, since and . Any scaling by a factor greater than one preserves a zero loss, so the objective is minimized not by one but by an unbounded family of them, and nothing written down so far prefers any member of that family over the others.
That is the first gap. The second is more elementary: Equation 3.5 says how to score a candidate , and says nothing whatsoever about how to produce one. Both gaps have to be closed before a classifier can be trained, and each is answered by half of this chapter—the first by adding a term to the objective, the second by a procedure for descending it.
4.2 Regularization
The fix for the first gap is to stop asking the objective to measure only fit. Write it as a sum of two terms,
where the first term is the data loss of Equation 3.5 and the second is a regularization term that depends on the weights alone and never looks at the data. Because ignores the training examples, it cannot express any opinion about accuracy; it can only express a preference among the weight settings that the data leaves tied.
Stated that way, regularization sounds like a tiebreaker, which undersells it. Its more important effect is to make the model fit the training data less well on purpose. Consider fitting a curve to a handful of noisy points, as in Figure 4.1. A high-degree polynomial can pass exactly through every one of them and drive the data loss to zero. A straight line cannot, and by the only measurement available at training time it is the worse model. But the wiggles that let the polynomial hit each point are reconstructions of the noise in those particular points, and there is no reason for the noise in a fresh sample to lie the same way. The straight line, wrong on the training set, is the one that transfers.
This is Occam’s razor recast as an optimization problem: among competing hypotheses that explain the observations, prefer the simplest, and only reach for a more elaborate one when the simple hypothesis is shown to be wrong. The razor is a heuristic about the world rather than a theorem, and Equation 4.1 is a way of asserting it numerically.
The scalar sets how loudly that assertion is made. At the regularizer is switched off and Equation 4.1 collapses back to the data loss. As grows, the optimizer becomes progressively more willing to accept a worse fit in exchange for a smaller penalty, until at very large the weights are driven towards zero and the model stops fitting anything at all. Between those extremes lies a value that generalizes best, and it cannot be found by minimizing Equation 4.1—raising always makes the training objective’s job harder, so training loss cannot vote on it. It is a hyperparameter, chosen the same way was chosen for nearest neighbors in Section 3.3: by measuring on held-out data.
Three choices of account for most of the classical use. The first, and by far the most common in vision, is regularization, also called weight decay:
The second replaces the square with an absolute value, giving regularization:
and the third, elastic net, is their weighted sum, , which trades one behaviour against the other. All three are penalties on the size of the weights, which is why they answer the question this section opened with: doubling leaves the data loss at zero but multiplies Equation 4.2 by four, so the scaled copy is no longer tied with the original.
These are not the only regularizers, or even the ones that do the most work in a modern network. Dropout, batch normalization and stochastic depth all belong to the same family in intent—each makes training harder in order to make testing better—but they act on the layers of the model rather than on a penalty added to the loss, and they are taken up later in the course. What Equation 4.1 shares with them is the trade being made, not the mechanism.
Three separate motives are worth keeping distinct, because they justify regularization on different grounds. It expresses a preference over weights, when the shape of the problem gives a reason to prefer one kind of solution. It makes the model simpler, so that it depends on the training sample less and transfers better. And, for specifically, it improves the optimization itself: adding a quadratic term adds curvature to the objective, which is a property the second half of this chapter will show to be valuable in its own right.
4.3 What and each prefer
The two penalties are usually distinguished by asserting that produces sparse weights and produces small, spread-out ones. That is the right conclusion, but the standard example for it is more interesting than the slogan suggests.
Take an input and two candidate weight vectors, and . Both give the same score, since , so the data loss cannot distinguish them at all and the regularizer decides alone. Under Equation 4.2 the first costs and the second costs , four times less: prefers , because squaring punishes a single large entry far more than it punishes several small ones summing to the same total. Spreading the weight out is exactly what it rewards, and there is a reading of that behaviour in terms of the model rather than the arithmetic—a classifier whose weight is concentrated on one input dimension is betting everything on one measurement, and pushes it to take account of all four.
Now ask the same question of Equation 4.3, and the answer is that there is no preference. The first vector costs and the second costs ; they tie exactly. This is not an artefact of the numbers chosen. The penalty of any vector is unchanged by moving mass between coordinates, so it is indifferent to how spread out the weights are and cares only about their total magnitude.
Which raises the obvious objection: if does not prefer the sparse vector here, where does its reputation for sparsity come from? Not from comparing endpoints, but from what happens along the way. The penalties differ in their derivatives. The gradient of is , which shrinks as approaches zero, so under the pressure on a weight to get smaller weakens exactly as it becomes small—the last stretch to zero is pushed with almost no force, and weights settle at small non-zero values. The gradient of is , which has the same magnitude no matter how small is, so under a weight that is not earning its place is pushed towards zero with undiminished force until it arrives there. Sparsity is a consequence of the optimization dynamics, not of the penalty’s value at the solution.
Both stories reduce to the same underlying trade, which is worth stating in the general form because it governs every regularizer in the chapter. The optimizer is minimizing a sum. If a change to the weights lowers the regularization term without meaningfully raising the data loss, it lowers the total, and the optimizer will make it. A weight that contributes nothing to accuracy is therefore not merely permitted to vanish—it is actively removed, because keeping it costs something and buys nothing.
4.4 Optimization as search
The second gap is the harder one. Equation 4.1 is now a complete statement of what a good would be, and completely silent on how to obtain one.
The standard picture is a landscape. Each setting of the weights is a location, the loss at that setting is the elevation, and training is the problem of walking downhill to the lowest point. The picture is worth keeping, provided one correction is made to it: the walker is blindfolded. A person standing on a real hillside can look across the valley and see where the bottom is, and no such information is available here. What is available is purely local—the elevation underfoot and the slope of the ground at that one spot. Every algorithm in the rest of this chapter is a rule for choosing a step from local information alone, and the differences between them are differences in how much local history they are willing to remember.
Before turning to slopes, it is worth seeing what happens without them. Random search is the crudest possible strategy: draw a thousand random weight matrices, evaluate Equation 4.1 on each, and keep whichever scored best. It is not a straw man—it needs no derivatives, works on any loss whatever, and is trivially parallel. On CIFAR-10 it reaches about test accuracy.
That number is the argument for everything that follows. Ten classes means random guessing is already right of the time, so a thousand samples of the weight space bought roughly five points over chance, while networks trained by the methods in this chapter exceed . The weight space of even the linear classifier from Section 3.4 has dimensions, and sampling it blindly is hopeless at any budget one might realistically spend. The loss surface has structure, and the only way to reach a good is to use it.
4.5 Following the slope
The structure worth using is the slope. In one dimension it is the derivative, defined as the limit of a ratio of differences,
which reports how much the function changes per unit of movement. In many dimensions the analogous object is the gradient , the vector whose entries are the partial derivatives of with respect to each weight in turn. It has the same shape as itself, so a linear CIFAR-10 classifier has a gradient with entries, one per parameter.
Two facts about the gradient make it the right object. The slope of the loss along any direction is the dot product , so a single gradient answers the question “what happens if I move this way?” for every direction at once. And that dot product is largest when points along , which means the gradient points in the direction of steepest ascent and its negative points in the direction of steepest descent. The blindfolded walker’s best move is .
There are two ways to get it. The first is to take Equation 4.4 literally: pick a small , perturb one weight by it, re-evaluate the loss, and divide the change by . The deck’s worked example makes the mechanics plain. With a particular the loss is . Adding to the first weight moves it to , so that partial derivative is : increasing this weight lowers the loss. Perturbing the second weight instead gives , a partial derivative of , so this weight should be decreased. Perturbing the third leaves the loss at to five decimal places, and the partial derivative is recorded as .
The procedure works and should not be used. It is approximate twice over— is finite rather than infinitesimal, and subtracting two nearly equal floating-point numbers discards most of the significant digits before the division amplifies what is left. Worse, it needs one full evaluation of the loss over the dataset per weight. Filling in all entries of that gradient means passes over the training set to take a single step, and this for the smallest model in the course.
The second way is to notice that none of this is necessary. The loss is not a black box to be probed; it is an expression that was written down, and as a function of is a composition of a matrix multiply, some exponentials and logarithms, and a sum. Composition of differentiable functions is what the chain rule is for. Differentiating Equation 4.1 with respect to , holding the data and fixed, yields a formula that computes the whole gradient in closed form, at a cost comparable to evaluating the loss once. This analytic gradient is exact and fast.
Its one weakness is that it is derived and implemented by a person, and both steps admit mistakes that do not announce themselves—a wrong sign or a dropped factor produces a gradient that still points roughly downhill, so training still appears to work, just worse than it should. The standard defence is to use both methods: compute the analytic gradient in the code that trains the model, and compare it against the numerical gradient at a few randomly chosen coordinates before trusting it. This comparison is called a gradient check, and it is the reason the slow method is worth knowing.
4.6 Gradient descent, and why it becomes stochastic
With a gradient in hand the algorithm is a single line, repeated:
Evaluate the gradient at the current weights, move against it, repeat. The scalar is the step size or learning rate, and of all the hyperparameters in deep learning it is the one that most often decides whether a training run works at all.
Two details of Equation 4.5 are easy to misread. The step size is fixed, but the distance travelled per iteration is not: the update is times a gradient whose magnitude varies, so the same produces long strides on a steep slope and short ones as the surface flattens out. Descent naturally decelerates near a minimum without anything being scheduled. And the loop as written never terminates. In practice it is run for a fixed number of iterations, or until the loss stops improving by more than some tolerance—there is no condition internal to Equation 4.5 that signals arrival.
The real obstacle is cost. The gradient in Equation 4.5 is the gradient of Equation 4.1, which is an average over all training examples, so one step requires touching the entire dataset. On a dataset of a million images that makes each individual step of a procedure that needs many thousands of steps prohibitively expensive.
The resolution is to accept a worse gradient in exchange for far more steps. Sample a minibatch of examples at random and use it to estimate the average:
This is stochastic gradient descent, and the word stochastic refers to the sampling: each step uses a different random subset, so the estimate is noisy and the direction is only correct on average. Batch sizes of , , and are the usual choices. In implementations the batches are not drawn independently but by shuffling the dataset and cutting it into consecutive blocks, so that every example is used exactly once before any is reused; one such traversal is an epoch.
The trade is heavily in favour of the noisy estimate. A gradient computed on examples is a poor approximation to the true one, but it costs a few thousandth of the full computation, and taking a thousand approximate steps makes far more progress than taking one exact step. SGD in this form, or one of the refinements of it developed below, trains essentially every model in this course.
4.7 Three ways SGD struggles
Plain SGD is enough to train the linear classifier of the previous chapter, and it is not enough for much beyond it. Three distinct failures account for most of the difficulty, and it is worth separating them, because a single modification fixes all three.
The first is poor conditioning. Suppose the loss falls steeply as one weight changes and only gently as another changes—the level sets are then long, narrow ellipses rather than circles, as in the left panel of Figure 4.2. The negative gradient at almost every point in such a valley aims mostly across it rather than along it, because the steep direction dominates the gradient’s magnitude. Descent therefore bounces from wall to wall, making rapid progress in the direction where there is nothing to gain and creeping along the direction that actually leads to the minimum. If the step size is large enough relative to the steepness, the oscillation grows instead of decaying and the run diverges. The quantity that measures this is the condition number of the loss, the ratio of the largest to the smallest eigenvalue of its matrix of second derivatives; a high condition number means a valley whose walls are much steeper than its floor is sloped, and such valleys are the normal case rather than a pathology.
The second failure is that a zero gradient does not mean a minimum. At a local minimum the gradient vanishes and Equation 4.5 stops moving, which is the intended behaviour if the local minimum is good and a trap if it is not. More troubling is the saddle point, sketched in the right panel of Figure 4.2: a point where the surface curves upwards along some directions and downwards along others, so the gradient is zero while a large decrease lies just to one side. Descent stalls there, and near it—where the gradient is small but not exactly zero—it crawls, which in practice costs more time than the exact saddles do.
Intuition from two dimensions badly understates how much this matters. In one dimension a stationary point is a minimum or a maximum; in two, a saddle is already possible. In dimensions a stationary point is a minimum only if the surface curves upwards along every one of directions, and the chance of that happening falls sharply as grows. Empirically, in the high-dimensional losses that neural networks produce, the stationary points encountered during training are overwhelmingly saddles rather than local minima (Dauphin et al., 2014). The problem gets worse, not better, as models get larger.
The third failure is built into Equation 4.6. The gradient from a minibatch is an estimate, and estimates have error, so each step is aimed slightly wrong. The path to the minimum is not a smooth descent but a wandering one, and the wandering costs iterations. This one is a consequence of the very approximation that made SGD affordable, so it cannot be removed by computing more carefully—only by averaging.
4.8 Momentum
All three problems are complaints about a single quantity: the update depends only on the gradient at the current point, and throws away everything the walk has already learned. Momentum keeps some of it. Introduce a velocity with the same shape as , and let each gradient nudge the velocity rather than the weights directly:
The coefficient , typically or , controls how much of the past survives each step. Setting recovers plain SGD. The physical reading is a ball rolling downhill instead of a walker being teleported: the gradient supplies acceleration rather than displacement, and acts as friction. The mathematical reading is that is an exponentially weighted running mean of the gradients seen so far, with setting roughly how many recent steps it averages over—ten steps at , a hundred at .
Both readings explain the same three repairs. In a narrow valley the across-valley components of successive gradients point in opposite directions and cancel in the running mean, while the along-valley components point the same way every time and accumulate; the zigzag is damped and the useful direction is amplified. At a saddle or a flat region the gradient is nearly zero, but is not, so the accumulated velocity carries the iterate through instead of letting it stall. And minibatch noise is zero-mean by construction, so averaging over the last ten or hundred gradients suppresses it while leaving the signal they share.
None of this is free. A ball with momentum overshoots the bottom of a bowl and has to come back, so momentum can converge more slowly on an easy problem than plain SGD would. The bet is that overshooting a bad minimum in order to find a better one is worth the extra iterations, and empirically, for the loss surfaces neural networks produce, it usually is. It is not a law: there are models for which plain SGD wins, and choosing between them is done by trying both.
A refinement worth knowing is Nesterov momentum, which changes where the gradient is measured. Standard momentum evaluates the gradient at the current point and then adds it to the velocity, even though the velocity is about to move the iterate somewhere else. Nesterov’s version looks ahead first, evaluating the gradient at —the point the velocity alone would reach—and mixing that into the update:
The correction is anticipatory: if the velocity is about to carry the iterate up the far wall of a valley, the look-ahead gradient already points back before the overshoot happens. Written this way the update needs the gradient at a point other than the current parameters, which most software is not organized to supply; a change of variables rearranges it into a form that only ever evaluates the gradient where the parameters already are, which is how it is implemented.
4.9 Per-parameter learning rates
Momentum treats every weight identically: one , one , applied elementwise to a vector whose entries may differ in scale by orders of magnitude. The second family of methods drops that assumption and gives each parameter its own effective step size, inferred from the gradients that parameter has received.
The original is AdaGrad (Duchi et al., 2011), which accumulates the squared gradient elementwise and divides the step by its square root:
Every operation here is elementwise, and —typically —only prevents division by zero. The effect is a direct attack on poor conditioning. A weight along a steep direction receives large gradients, accumulates a large , and is divided by a large number, so its steps shrink. A weight along a flat direction accumulates little and keeps taking full-size steps. Progress is damped where it was wasteful and accelerated where it was too slow, which is exactly the correction the narrow valley needed.
The flaw shows up over long runs. Since only ever grows, the denominator only ever grows, and the effective learning rate decays monotonically towards zero. On a convex problem that is a feature, since the schedule anneals automatically. On a neural network, where training may need to keep moving for a hundred thousand iterations, it means the optimizer quietly stops before the loss has finished falling.
RMSProp repairs it with one change: replace the running sum by a running average, so that old gradients are forgotten.
The decay rate , usually or , plays the same role for squared gradients that plays for gradients in Equation 4.7. Because now tracks the recent magnitude rather than the cumulative one, it can fall as well as rise, and the effective learning rate no longer collapses. The nickname is leaky AdaGrad, and it is accurate: Equation 4.10 is Equation 4.9 with the accumulator given a leak.
At this point two independent improvements are on the table. Momentum averages the gradients to decide which way to go; RMSProp averages their squares to decide how far. There is no reason not to do both, and Adam is the method that does (Kingma and Ba, 2015). It maintains a running mean of the gradient and a running mean of its square—the first and second moments—and combines them:
Written this way the method is broken at the first step, and the reason is worth working through because it is the one part of Adam that looks arbitrary. Both accumulators start at zero, and the standard settings , mean they fill up slowly. After one step with gradient , the moments are and , so the update in Equation 4.12 is . The first step is more than three times the intended learning rate, in a direction determined by a single noisy minibatch, and it is large regardless of how small the gradient actually was—the two moments are both biased towards zero, but the second is under a square root, so the bias does not cancel.
Adam’s fix is to divide out the known bias. At iteration the expected shrinkage of is a factor and that of is , so scaling each accumulator up by its own factor removes it:
At this gives and , so the first step is exactly , as intended. As grows, and the correction fades to nothing, which is why it is described as a warm-up for the moment estimates rather than a permanent part of the method.
Equation 4.13 with , and of or is a sound default for a model whose optimizer has not yet been tuned, and it is the reason Adam is the most widely used optimizer in deep learning. It is not universally best—the whole point of the previous paragraphs is that each ingredient addresses a specific failure, and a problem that does not have that failure gains nothing from the machinery that treats it.
4.10 Why AdamW is not Adam plus
One question remains from the first half of the chapter: where does enter, once the optimizer is no longer plain gradient descent? The natural answer is that it does not need to enter anywhere special—it is part of the loss, so its gradient is part of , and every method above uses . That answer is correct, and its consequences are not the ones intended.
Follow the term through Equation 4.13. Its contribution to the gradient is , proportional to the weight, which is precisely the uniform shrinkage that “weight decay” describes. But that contribution is then folded into and along with everything else, and the final update divides by . A weight that has been receiving large gradients has a large and therefore has its decay term divided down; a weight receiving small gradients has its decay term divided up. The regularization has stopped being uniform: how strongly a weight is pulled towards zero now depends on the recent gradient history of that weight, which is not what Equation 4.2 asked for and not something anyone chose.
AdamW decouples the two (Loshchilov and Hutter, 2019). The moments are computed from the data loss alone, and the decay is applied to the weights directly, after the adaptive scaling and outside it:
The optimizer’s estimate of the loss landscape is now a function of the data alone, while the decay does exactly what its name says to every weight at the same rate. Practically the change is small; in results it is not, and AdamW rather than Adam is the default for large models today, including the LLaMA family. The general lesson outlives the specific fix: a regularizer and an optimizer are not independent modules, and a term added to the loss is not necessarily the term that reaches the weights.
4.11 Learning rate schedules
Every optimizer above—SGD, momentum, RMSProp, Adam, AdamW—still takes as an input, and none of them chooses it. Its effect is easy to see in the training curve, and Figure 4.3 shows the four characteristic shapes. Too large, and the loss rises rather than falls: the iterate is bouncing out of the valley described in Section 4.7. Too small, and the loss falls steadily but so slowly that the budget runs out before training does. In between sits a rate high enough to make quick early progress but too high to settle, where the loss drops sharply and then plateaus well above where it could have gone. The one to want falls fast at first and keeps improving afterwards.
The interesting observation is that the third and fourth curves are the same run seen at different times. A rate that is right for the first epoch, when the weights are random and any direction is an improvement, is too coarse for the last, when the iterate is near a minimum and needs to settle into it. Rather than compromise on one value, vary it: start high and reduce it as training proceeds. Every competitive training recipe in modern deep learning does this.
The simplest form is step decay—hold fixed, then multiply it by a constant at a few chosen points. The schedule long used for ResNets on ImageNet multiplies by after epochs , and , and its signature is unmistakable in a loss curve, which drops abruptly at each cut as the finer step lets the optimizer descend where it had been stuck. Its drawback is that the cut points are three more hyperparameters.
Smooth schedules avoid that. Cosine decay sweeps the rate from its initial value down to zero along a half period of a cosine (Loshchilov and Hutter, 2017),
where is the initial rate, the total number of epochs and the current one. Linear decay does the same with a straight line, , and inverse square root decay uses , the schedule that trained the original Transformer. Figure 4.4 puts them on one axis. Cosine and linear both need only and , which is much of their appeal: they add one hyperparameter where step decay adds several, and is usually fixed by the compute budget anyway.
Decay handles the end of training; the beginning needs the opposite treatment. At initialization the weights are random and the first gradients can be large and badly aimed, so starting at full risks the divergence in Figure 4.3 before the run has done anything. Linear warmup ramps the rate from zero to over the first few thousand iterations and only then hands over to the decay schedule. Warmup followed by cosine decay is one of the most widely used configurations in current practice.
Warmup matters most when the learning rate is large, and it becomes large for a reason worth stating. The linear scaling rule holds that multiplying the batch size by should be accompanied by multiplying the learning rate by (Goyal et al., 2017). The intuition is that a batch times larger gives a gradient estimate whose noise is correspondingly smaller, so a proportionally longer step can be trusted; the justification is empirical rather than derived, and it holds over a wide but not unlimited range. Training at large batch sizes therefore means training at large learning rates, which is exactly where the first few steps become dangerous—and warmup was developed for that regime.
4.12 Second-order methods
Everything in this chapter is first-order: it uses the gradient and nothing else. Geometrically, that means approximating the loss near the current point by a plane and stepping downhill along it. A plane has no bottom, which is why a step size is needed at all—the linear approximation says which way to go and is silent on how far, so supplies an answer that the mathematics does not.
Keeping the next term of the Taylor expansion removes that gap. Around a point ,
where is the Hessian, the matrix of second partial derivatives . This approximation is a paraboloid, and a paraboloid does have a bottom. Setting the derivative to zero and solving gives the Newton update,
which jumps directly to the minimum of the local quadratic model. There is no learning rate in Equation 4.17, and no schedule: the curvature that encodes already says how far to go in each direction, which is the information the whole of Section 4.9 was trying to estimate from gradient histories.
The reason this is not how networks are trained is arithmetic. For parameters, has entries and inverting it costs . A modest network with a million parameters has a Hessian of entries, four terabytes in single precision, and modern models run to hundreds of millions or billions of parameters—for parameters the Hessian would hold numbers, tens of petabytes, before anything is done with them. The matrix cannot be formed, let alone inverted, and the compute that forming it would consume buys far more if spent on additional gradient steps over more data.
Quasi-Newton methods reduce the cost without eliminating it. BFGS maintains an approximation to the inverse Hessian using rank-one updates, at per step instead of ; L-BFGS keeps only a short window of past updates and never forms the matrix at all. Both work well when the objective is deterministic and can be evaluated on the full dataset, which makes them a reasonable choice for small problems—but they transfer poorly to the minibatch setting, where the objective changes from step to step and the curvature information they accumulate is contaminated by sampling noise.
Which leaves the practical summary. Adam or AdamW is the right first thing to try on a new problem, and it often works acceptably even at a constant learning rate. SGD with momentum can beat it, at the cost of considerably more tuning of both the rate and the schedule, because it has no adaptive term to absorb a badly scaled direction. And if the dataset is small enough that full-batch updates are affordable, second-order methods become worth considering—with every source of stochasticity switched off first.
4.13 Where the linear model stops
The whole of this chapter has optimized , and optimized it as well as it can be optimized. That is worth stating plainly, because it isolates what comes next: no schedule, no adaptive rate and no amount of regularization can make a linear model represent something a linear model cannot represent.
The standard demonstration is two classes arranged in concentric rings—one colour in the middle, the other surrounding it. No straight line separates them, so no setting of classifies them correctly, and the optimizer converges perfectly well to a solution that is perfectly useless. But rewrite each point in polar coordinates, replacing by radius and angle, and the rings become two horizontal bands that a single line separates easily. The data were always separable; the representation was wrong.
That suggests learning the transformation rather than choosing it. A two-layer network does exactly this, composing two linear maps with a non-linearity between them:
The elementwise is essential and not incidental. Without it the composition is a single linear map with a more complicated factorization, no more expressive than what we started with. With it, the first layer learns a representation and the second classifies in that representation, and both are fitted by the same gradient descent developed above. The name “neural network” is broad enough to be unhelpful here; models of this specific shape are more precisely called fully connected networks, or multi-layer perceptrons.
Only one thing is missing. Every optimizer in this chapter consumes , and Equation 4.18 has two weight matrices with a non-linearity between them, so the closed-form differentiation of Section 4.5 no longer suffices. Computing gradients through arbitrary compositions of functions—efficiently, and without deriving each one by hand—is backpropagation, and it is the subject of the next chapter.
References
- J. Duchi, E. Hazan and Y. Singer, “Adaptive Subgradient Methods for Online Learning and Stochastic Optimization,” Journal of Machine Learning Research, 12, 2011. Paper
- T. Tieleman and G. Hinton, “Lecture 6.5 — RMSProp,” Neural Networks for Machine Learning, Coursera, 2012.
- I. Sutskever, J. Martens, G. Dahl and G. Hinton, “On the Importance of Initialization and Momentum in Deep Learning,” ICML, 2013. Proceedings
- Y. Dauphin et al., “Identifying and Attacking the Saddle Point Problem in High-Dimensional Non-Convex Optimization,” NIPS, 2014. arXiv:1406.2572
- D. Kingma and J. Ba, “Adam: A Method for Stochastic Optimization,” ICLR, 2015. arXiv:1412.6980
- I. Loshchilov and F. Hutter, “SGDR: Stochastic Gradient Descent with Warm Restarts,” ICLR, 2017. arXiv:1608.03983
- P. Goyal et al., “Accurate, Large Minibatch SGD: Training ImageNet in 1 Hour,” 2017. arXiv:1706.02677
- A. Vaswani et al., “Attention Is All You Need,” NIPS, 2017. arXiv:1706.03762
- I. Loshchilov and F. Hutter, “Decoupled Weight Decay Regularization,” ICLR, 2019. arXiv:1711.05101