Method · Machine learning
Stochastic gradient descent
Iterative optimization method
Stochastic gradient descent is an iterative method for fitting a model to data.
It improves the model a little at a time: at each step it looks at a small random sample of the training examples, measures how wrong the model is on that sample, and nudges the model's parameters in the direction that reduces the error. The same procedure repeats many times, and the parameters drift toward values that fit the data well. What makes the method distinctive is the word stochastic: the direction of each step is estimated from a handful of examples rather than from the entire dataset, so the path to a good fit is a wandering one rather than a straight descent.
Key facts
| 90.14% | ResNet training accuracy for facial expression recognition, ahead of VGG and Inception V3[1] |
|---|---|
| 2.1 | Full-gradient-equivalent work S2GD needed for a 10e-6 accurate solution[2] |
| 112 | GPUs used to test decentralized parallel SGD against centralized counterparts[3] |
| 99.97% | MNIST recognition rate of the dropout-plus-SGD convolutional network[4] |
Overview
Stochastic gradient descent
A concrete picture helps. Suppose the task is to recognise a handwritten digit from a small greyscale image, and the model has thousands of adjustable numbers, called parameters, that together turn an image into a guess about which digit it shows. A loss function scores how badly the model is doing: it is large when the guess is wrong and small when it is right. The gradient of the loss is the list of small changes to each parameter that would reduce the loss fastest. Ordinary gradient descent computes that gradient over every training image before taking one step, which on a large collection is expensive. Stochastic gradient descent instead picks one example, or a small handful, computes the gradient of the loss on just that, and takes a step. Each step is far cheaper, and a great many of them can be taken in the time a single full pass would take.

The saving comes at a price. The gradient from one example is only an estimate of the gradient over the whole dataset; it points roughly the right way but carries a random error, so the parameter updates jitter rather than glide. That noise is not simply a defect. It is the feature that later parts of this chapter return to when asking why models trained this way often generalise well to data they have never seen, and how the size of the sample traded against the size of the step shapes the answer.[5] For now the essential point is that the method trades a precise direction for a cheap one, and accepts a bumpy route in exchange for many more steps.
The approach is central to modern machine learning. Stochastic gradient descent is described as not only simple but also very effective, and it is discussed in the context of deep learning applications such as natural language processing, visual data processing, and voice and audio processing. The same basic step, with refinements, appears among the optimizers available in PyTorch, where several variants sit alongside the plain algorithm.[6] One widely used refinement is Adam, an algorithm for gradient-based optimisation of stochastic objective functions that keeps adaptive estimates of lower-order moments of the gradient; it is designed to be simple to implement, light on memory, and suited to problems that are large in data or parameters and whose gradients are noisy or sparse.[7] Such methods are built on top of the stochastic step rather than replacing it, and the later sections take up how they work.
Three matters remain live and are treated in their own sections. The first is the noise itself: how much of it a step carries, and what it does to the path the parameters follow. The second is the step size, the number that scales each update, which is a setting several lines of work address in choosing it well.[8][9][10] The third is scale: how to run stochastic gradient descent in parallel without spoiling its convergence is a problem with several competing answers.[11][12][3][13] Each of these is a place where the simple description above turns out to need care, and each is covered later.
Stochastic gradient descent replaces an expensive exact direction with a cheap noisy one, and much of its behaviour, for good and ill, follows from that single trade.
History
From averaging gradients to sampling them
The plainest way to fit a model is to measure the error over every training example, work out which way to move each parameter to reduce that total, and take one step. This is full-batch gradient descent, and its appeal is that each step uses the complete, exact direction. Its cost is the problem. On a very large dataset, a single step requires a pass over all of the examples, and a model may need many steps. The arithmetic grows with the data, so the very collections that make a model worth training are the ones that make each exact step slow.

The stochastic version breaks that link between step cost and dataset size. Instead of averaging the gradient over everything, it draws a small sample and uses the gradient from that sample as its estimate of the full one. The estimate is rough, but it is cheap, and cheapness changes the arithmetic of training: many approximate steps can be taken in the time one exact step would take. The trade is deliberate. A precise direction is exchanged for an affordable one, and the route to a good fit becomes a series of small corrections rather than a single well-aimed leap.
This is the sense in which stochastic gradient descent is described as one of the core techniques behind the success of deep neural networks.[14] The description is not a claim that the method is elegant; it is a claim about what makes training large networks feasible at all. A network with a very large number of parameters, trained on a dataset too large to sweep repeatedly, needs steps that are cheap enough to take in enormous numbers. Sampling supplies them.
The same idea sits underneath a whole family of refinements. One line of work starts from a specific complaint about the basic method: it changes every parameter by equal-sized steps, regardless of how the gradient behaves from one parameter to the next, and an efficient optimiser should instead give each parameter its own adaptive step size. That complaint motivates a set of methods, among them AdaGrad, AdaDelta, RMSProp and Adam, which build their step sizes from the square roots of exponential moving averages of squared past gradients.[14] Adam itself is framed as an algorithm for first-order gradient-based optimisation of stochastic objective functions, keeping adaptive estimates of lower-order moments of the gradient; it is presented as straightforward to implement, light on memory, well suited to problems that are large in data and/or parameters, and appropriate for problems with very noisy and/or sparse gradients.[7] The stochastic sample remains the raw material; what changes is how the resulting gradient is turned into a step.
These variants are not scattered across research papers alone. A survey of the field notes that several versions of stochastic gradient descent and its variants are already present in the PyTorch optimiser, including plain SGD, Adagrad, Adadelta, RMSprop, Adam and AdamW.[6] The practical consequence is that a person training a network chooses among them from a menu rather than implementing each from scratch, and the choice matters. The same survey observes that a gap remains between the theoretical conditions under which these algorithms are known to converge and how they behave in practice, and that closing that gap is an open question.[6]
So the move from averaging to sampling is more than a shortcut. It sets the terms for everything that follows: the noise in each estimate, the size of the step taken on it, and the way that step is scaled per parameter all become the levers that determine whether training converges quickly, slowly, or not at all. The sections that follow take up each lever in turn, beginning with the update rule itself and the role of the learning rate that scales it.
Sampling replaces an exact but expensive direction with a cheap approximate one, and the entire family of adaptive optimisers is built on top of that bargain.
How it works
The update rule, step by step
Training a model means choosing the values of its parameters so that the model's guesses come close to the truth. To make that concrete, a loss function turns a set of parameter values into a single number that says how badly the model is doing on the data at hand: large when the guesses are wrong, small when they are right. Fitting the model is then a search for parameter values that make this number small. The search is what the update rule carries out, one small adjustment at a time.
The tool that drives the search is the gradient. For each parameter, the gradient records the rate at which the loss changes as that parameter is nudged, and collected together across all parameters it points in the direction of steepest increase. Moving the parameters a little way in the opposite direction, along the negative gradient, therefore lowers the loss. This is the whole logic of a gradient step: measure the slope, then walk downhill. The size of the walk is set by a separate number, the learning rate, which multiplies the gradient before it is subtracted from the parameters. A large learning rate takes bold strides; a small one takes cautious ones. The learning rate is an important setting in the procedure, and the question of how to choose it is covered later.
In stochastic gradient descent the slope is not measured on the whole dataset. A small random sample of examples is drawn, the loss is computed on that sample alone, and its gradient is used in place of the full one. The estimate this produces is unbiased: although any single sample may point too far left or too far right, the errors average out across samples, so the estimate is centred on the true gradient rather than systematically tilted away from it. What the estimate lacks is precision. Each draw carries a random error, and the parameters therefore jitter around the downhill path rather than following it smoothly.
The character of that jitter has been studied directly. Treating the sequence of updates as a random process, one analysis shows that the noise has a structured effect on where training ends up: starting from a local minimum, the iterates escape it in a number of steps that grows almost linearly with the inverse step size, while from a saddle point the escape takes a number of steps that grows exponentially with the inverse step size.[15] The practical reading is that the step size governs how restless the walk is. Small steps make the parameters settle; larger ones keep them moving, which matters for the reasons taken up in the section on generalisation.
The noise is also tied to the size of the sample, and the relationship can be written down. Modelling the updates as a stochastic differential equation, one account identifies a noise scale of the form $g = \epsilon(N/B - 1)$, where $\epsilon$ is the learning rate, $N$ the number of training examples and $B$ the number drawn per step; the quantity is approximately $\epsilon N / B$ when the sample is small next to the dataset.[5] The formula makes plain that the learning rate and the sample size pull against each other: doubling the learning rate roughly doubles the noise, and doubling the sample roughly halves it. The choice of batch size is therefore not a separate decision from the choice of step size, a point developed in the section on mini-batches.
A further wrinkle concerns how the step treats each parameter. In the basic rule the learning rate is a single number applied uniformly, so every parameter moves by an amount proportional to its own gradient but scaled by the same factor. One line of work frames this as the central shortcoming of the plain method: it changes every parameter by equal-sized steps regardless of how the gradient behaves from one parameter to the next, whereas an efficient optimiser ought to give each parameter its own adaptive step size.[14] That complaint is the starting point for the adaptive family, which is covered later.
Put together, the update rule is short enough to state in a sentence: draw a sample, compute the loss on it, take the gradient with respect to each parameter, and subtract the learning rate times that gradient. Everything that follows in the chapter is a refinement of one of those three ingredients, the sample, the gradient estimate, or the rate at which it is applied.
A step is a slope measured on a sample and a stride set by the learning rate; the sample makes the slope cheap and noisy, and the rate decides how much of that noise the parameters feel.
Choosing the step size
Every stochastic gradient step is scaled by the learning rate, the number that multiplies the gradient before it is subtracted from the parameters. The gradient says which way to move; the learning rate says how far. That single number decides much of what training does. Too small, and the parameters creep toward a good fit, wasting the cheap steps the method was designed to take. Too large, and each step overshoots, so the parameters bounce around the minimum or diverge from it altogether. The loss surface itself offers no fixed answer, because the steepness of the slope changes as the parameters move and differs from one parameter to another. Choosing the rate is therefore the central tuning problem of the method, and the approaches to it fall into two broad families: schedules fixed in advance, and rates adjusted automatically while training runs.

The simplest choice is a fixed rate, held constant for the whole run. It is easy to reason about and easy to implement, but it forces a compromise: a value small enough to settle reliably near the end is often too timid at the start, when the parameters are far from any good setting. The common alternative is a diminishing step size, a schedule in which the learning rate starts larger and shrinks over the course of training according to a rule set in advance. The intent is to combine bold early progress with cautious late refinement. The weakness is that the schedule is decided before training begins, so it cannot respond to what the run actually encounters.
Hand tuning is the practical face of both approaches. A person picks a fixed value, or the shape of a diminishing schedule, by trying candidates and watching how training behaves, which can be time consuming.[9] The difficulty is compounded because the best rate depends on the problem, the model and the scale of the gradients, so a value that works well in one setting may fail in another. This is what motivates methods that compute the rate from the run itself rather than asking a person to guess it.
One such method borrows a technique from deterministic optimization. The Barzilai-Borwein (BB) method chooses a step size by comparing how much the parameters changed on the previous step with how much the gradient changed over the same step, using that ratio to estimate a sensible scale for the next move. Applying it to stochastic gradient descent gives an algorithm called SGD-BB, in which the step size is recomputed automatically as training proceeds instead of being fixed or scheduled by hand. The same paper pairs the idea with a variance-reduced variant, SVRG-BB, and proves that the latter converges linearly for strongly convex objective functions; on standard datasets the two methods performed comparably to, and sometimes better than, SGD and SVRG with best-tuned step sizes, and were superior to some advanced SGD variants.[9] The point of interest is not that automatic beats manual in general, but that a rule computed from the observed gradients can stand in for the guesswork.
A second approach treats the learning rate as something to be optimized alongside the parameters. Hypergradient descent works by differentiating the update rule with respect to the learning rate itself, producing a gradient for the rate, and then adjusting the rate in the direction that improves the training objective. The extra computation is modest: it needs only one additional copy of the original gradient held in memory and relies on the machinery of reverse-mode automatic differentiation that training already uses. Applied to plain stochastic gradient descent, to a momentum variant, and to Adam, the technique was reported to reduce substantially the need to tune the initial learning rate by hand.[10] The initial value still has to be set somewhere, but the run is no longer hostage to it.
A third line of work adapts the rate specifically for image registration, the task of aligning one medical scan with another. The method, called adaptive stochastic gradient descent (ASGD), predicts step sizes from general characteristics of the cost functions that arise in intensity-based registration, and it was compared against a standard non-adaptive scheme, the Robbins-Monro algorithm, on three-dimensional CT and MR data of the head, lungs and prostate.[16] Both methods used random subsampling to speed the optimization. The adaptive version proved robust to variations in the similarity measures and transformation models tested and was less sensitive to the user-set parameters than the non-adaptive one, whose main drawback was the need to specify a step size function in advance.[16] The result is a concrete case of the general argument: a rate that responds to the problem relieves the person setting it up.
None of these schemes removes the learning rate from the method. They move the decision from a person's guess to a rule computed during training, and each rule encodes an assumption about how the loss behaves. The adaptive and momentum-based optimizers covered later take the same ambition further, giving every parameter its own step size rather than one rate for all.
The learning rate sets how far each step travels; fixed schedules commit to that distance in advance, while automatic schemes let the run itself decide.
Adaptive and momentum-based variants
The plain update rule applies one learning rate to every parameter. That is a strong assumption: it treats a parameter whose gradient is consistently large and a parameter whose gradient is tiny as if they deserved the same stride. In practice the gradients across a network's parameters differ greatly in size, and a single rate that suits one may be far too large or far too small for another. The adaptive family of optimizers begins from this observation. Rather than one rate for all, each parameter gets its own step size, computed from the history of its own gradients, so that parameters with persistently large gradients are moved cautiously and those with small ones are moved more boldly.
The motivation is often stated as a direct complaint about the basic method: it changes every parameter by equal-sized steps regardless of how the gradient behaves from one parameter to the next, and an efficient optimizer ought instead to give each parameter its own adaptive step size. The adaptive methods that answer this complaint, among them AdaGrad, AdaDelta, RMSProp and Adam, build their step sizes from the square roots of exponential moving averages of squared past gradients.[14] The squared gradients are averaged over recent steps, and the square root of that average sets the scale for the parameter's next move. A parameter whose recent gradients have been large has a large average, so its step is divided down; one with small gradients has a small average, so its step is divided by less. The same machinery thus rescales every parameter automatically.
Adam adds a second idea on top. Its name stands for adaptive moment estimation, and it keeps two running averages: one of the gradients themselves, and one of their squares. The first average acts as momentum, a smoothed version of the gradient that carries direction from past steps into the current one, so that a parameter moving consistently downhill gathers speed while a parameter whose gradient keeps flipping sign is steadied. The second average supplies the per-parameter scaling just described. Adam is presented as an algorithm for first-order gradient-based optimization of stochastic objective functions that keeps adaptive estimates of lower-order moments of the gradient; it is described as straightforward to implement, light on memory, and suited to problems that are large in data or parameters and whose gradients are noisy or sparse.[7] The two moments are what the method is named for, and together they give each parameter a step that is both smoothed in direction and rescaled in size.
Momentum on its own has been analyzed carefully. Stochastic gradient descent with momentum, usually abbreviated SGDM, is widely applied and is often run with step sizes and momentum weights that are adjusted in stages over training rather than held fixed. An analysis of the method shows that it converges as fast as plain stochastic gradient descent for smooth objectives, under both strongly convex and non-convex settings, and it establishes a convergence guarantee for the multistage setting, finding that adjusting the parameters in stages is beneficial compared with holding them fixed.[17] The practical reading is that momentum does not cost convergence speed, and that changing its settings partway through a run is not a hack but something with a guarantee behind it.
A later proposal takes a different signal from the gradient. The diffGrad optimizer adjusts each parameter's step size according to how much that parameter's gradient changed between the present step and the one before: parameters whose gradients are changing quickly receive larger steps, and those whose gradients are changing slowly receive smaller ones.[14] The reasoning is that a rapidly shifting gradient marks a parameter still far from settled, while a nearly constant gradient marks one that is close. Where Adam scales by the size of past gradients, diffGrad scales by their rate of change, so the two methods respond to different features of the same history.
A more recent modification of Adam, called HN_Adam, adjusts the step size automatically over the training epochs by using the norm of the parameter update, computed from the gradients seen so far, and combines the standard Adam rule with the AMSGrad algorithm in a hybrid mechanism.[18] The aim is to keep Adam's fast convergence while recovering the generalization behavior associated with plain stochastic gradient descent. Evaluated on a convolutional network trained to classify images from the MNIST and CIFAR-10 datasets, the method was compared against basic Adam, plain SGD and five other recent adaptive algorithms; in most comparisons it outperformed them on accuracy and convergence speed, with AdaBelief the most competitive of the alternatives, and it improved on AdaBelief by 1.0 percent in test accuracy and 0.29 percent in training time on MNIST, and by 0.93 percent and 1.68 percent on CIFAR-10.[18] Those margins are modest, which is itself instructive: the adaptive family has many members, and the differences among the better ones are refinements rather than transformations.
What unites the family is the move away from a single global rate. Whether the scale comes from averaged squared gradients, from the change in the gradient, or from the norm of the update, each method lets the run decide how far each parameter should travel. The learning rate still exists, but it now sets an overall level that the per-parameter rules modulate.
Adaptive methods replace one rate for all parameters with a rate computed for each, from the history of that parameter's own gradients.
Mini-batches, variance and the noise scale
The plainest stochastic step uses a single training example. That is the cheapest possible estimate of the gradient, but it is also the noisiest, since one example's slope can differ wildly from the slope over the whole dataset. A mini-batch is the middle ground: instead of one example or all of them, the method draws a small group, say a few dozen, computes the gradient of the loss averaged over that group, and takes one step on it. The batch sits between the two extremes, and moving along it trades cost against precision. A larger batch gives a steadier estimate and can use hardware more efficiently, because the arithmetic for many examples can be done in parallel; a smaller batch gives a rougher estimate but takes each step more cheaply, so more steps fit into the same time.

The trade has a shape that can be measured. In a method called mS2GD, a mini-batching scheme is folded into semi-stochastic gradient descent, a procedure that alternates a single exact gradient computation with a long run of cheap stochastic steps. The analysis shows two separate gains: as long as the batch size stays below a certain threshold, any target accuracy can be reached with less total work than without batching, and because the batch's gradients can be computed in parallel, the scheme is also open to further speed-up.[19] The threshold matters, because it says batching helps up to a point and then stops paying. Beyond it, the extra examples per step cost more than the steadier direction is worth.
The deeper problem mini-batching only softens is variance, the spread of the sampled gradient around the true one. Averaging over a batch shrinks that spread, but it never removes it, and a noisy estimate keeps the parameters jittering even close to a good fit. A family of methods attacks the variance directly rather than by averaging more examples. The general trick is to remember gradient information from earlier in the run and use it to correct the current estimate, so that the corrected gradient is much closer to the full one while still costing about as little as a plain stochastic step. SVRG, short for stochastic variance reduced gradient, is one such scheme: it computes an exact gradient at a checkpoint, then uses the difference between current and stored per-example gradients to correct each cheap step.
Semi-stochastic descent is a close relative. In S2GD, training runs for one or several epochs, and in each epoch a single full gradient is computed alongside a random number of stochastic gradients drawn according to a geometric law; for strongly convex objectives the method converges linearly, and the total work to reach a given accuracy, counted in passes over the data, scales with the problem's condition number and inversely with the number of component functions. The SVRG method arises as a special case of this framework. The practical claim is striking: for a problem with a billion component functions and a condition number of a thousand, the method needed work equivalent to about 2.1 full gradient evaluations to reach a solution accurate to 10e-6.[2] Variance reduction, in other words, can buy the reliability of a full gradient at a small fraction of its cost.
A related line exploits structure in the data rather than in the gradient's history. When training examples resemble their neighbours, information about past stochastic gradients can be shared and reused across nearby points, which helps most in the early, transient phase of optimization before the run has settled. The same work gives a unified convergence analysis for this family of memorization algorithms, tying several variance-reduction schemes together under one account.[20] A progressive scheme takes yet another route: a proximal stochastic gradient method uses a multistage plan to reduce the variance of the stochastic gradient step by step, and while each iteration costs about the same as a classical stochastic step, the expected objective value converges to the optimum at a geometric rate, with overall complexity far below both the full-gradient method and the standard stochastic one.[21]
Batch size and learning rate turn out not to be independent knobs. Modelling the updates as a stochastic differential equation, one account identifies a noise scale of the form $g = \epsilon(N/B - 1)$, with $\epsilon$ the learning rate, $N$ the number of training examples and $B$ the batch size, approximately $\epsilon N / B$ when the batch is small against the dataset. Holding the learning rate fixed, there is an optimum batch size that maximizes test accuracy, and it is proportional to both the learning rate and the size of the training set.[5] The formula explains why: the noise scale, and with it the character of the walk the parameters take, depends on the ratio of learning rate to batch size, so changing one without the other changes the kind of minimum training lands in. What that implies for generalisation is covered later.
A batch buys a steadier direction at a price per step; variance reduction buys the same steadiness by reusing old gradients, and the noise scale ties batch size to the learning rate.
Research
Does it converge, and how fast
A method that wanders cannot be trusted unless the wandering ends somewhere useful. The question of convergence is therefore not a formality: it asks whether the sequence of parameter values produced by the updates settles on a good fit, and how many steps that settling takes. The answer depends on what kind of loss surface the method is descending. A convex loss is shaped like a bowl with a single lowest point, so any downhill path ends at the same place. A strongly convex loss is a bowl with a guaranteed minimum curvature, which rules out long flat valleys and makes the descent easier to bound. Most modern models are neither, and the theory has to be built in stages to reach them.

The cleanest results come from the strongly convex, smooth case, where the loss changes gently and has no sharp corners. For strongly convex problems, the standard guarantee for stochastic gradient descent was a rate of order log(T)/T after T steps, obtained by running the method and returning the average of the iterates rather than the last one.[22] That averaging step is not cosmetic. Because each iterate carries noise, the final one may sit some distance from the optimum, whereas the average of many noisy iterates cancels much of that error.
Later work showed that for smooth strongly convex problems the method with averaging attains the optimal rate of order 1/T, so the older bound was not the best the algorithm could do. The same analysis found that for non-smooth strongly convex problems the averaged rate can genuinely be of order log(T)/T, not merely an artifact of a loose proof, and that a simple modification of the averaging step recovers the optimal 1/T rate without any other change to the algorithm.[22] The lesson is that how the iterates are combined at the end is part of the method, not an afterthought.
Non-smooth losses matter because they arise in ordinary models: a support vector machine, for instance, scores its errors with a function that has a corner. Classical analyses had assumed smoothness, which left such models outside the theory. Dropping that assumption, an analysis of stochastic gradient descent proved that after T rounds the suboptimality of the last iterate scales as log(T)/√T for non-smooth convex objectives, and as log(T)/T in the non-smooth strongly convex case.[23] These bounds almost match the minimax-optimal rates obtainable by appropriate averaging schemes, and the same work proposed a simple averaging rule that attains optimal rates and can be easily computed on the fly, in contrast to the suffix averaging scheme of Rakhlin et al. (2011), which is not as simple to implement.[23] So the guarantee survives the loss of smoothness, at the cost of a slower rate in the general convex case.
The convex setting is the easy one, and deep networks are not convex. Their loss surfaces can have many valleys, and the worry is not only that the method settles in a poor one but that it stalls on a saddle point, a spot that slopes upward in some directions and downward in others, where the gradient is zero yet the point is not a minimum. A flat gradient gives no direction to follow, so a purely deterministic descent can stop there. The noise in a stochastic step is what rescues it: a sampled gradient is unlikely to be exactly zero, so the parameters are nudged off the saddle. This intuition has been made into a guarantee. For non-convex problems with a strict saddle property, meaning every saddle point has at least one direction of clear downward curvature, stochastic gradient descent converges to a local minimum in a number of iterations that grows only polynomially. That result was described as the first global convergence guarantee for the method on non-convex functions with exponentially many local minima and saddle points, and it was applied to orthogonal tensor decomposition, a problem used in learning latent variable models.[24]
A stronger question remains: can the method find not just a local minimum but the global one, in a network far larger than its training data? For over-parameterized networks, those with more parameters than training examples, the answer turns out to be yes under mild conditions. For the binary classification problem, for a broad family of loss functions, with proper random initialization, both gradient descent and its stochastic version find the global minimum of the training loss for an over-parameterized deep ReLU network under mild assumptions on the training data. The argument is that random initialization followed by gradient steps keeps the parameters inside a small region around their starting values, and within that region the loss has curvature nice enough to guarantee convergence.[25] A companion line of work bounds how well such a trained network performs on data it has not seen: for a wide enough network, the expected 0-1 loss can be bounded by the training loss of a random feature model induced by the gradient at initialization, and for data distributions classifiable by that model with sufficiently small error this yields a bound of order Õ(n^(-1/2)) independent of network width.[26] Convergence to a good fit on the training data and good behaviour on new data are thus studied as separate questions, and the second is taken up later.
Averaging the iterates turns a noisy walk into a provable descent, and in non-convex problems the very noise that spoils each step is what carries the parameters off saddle points.
Why noisy steps can generalise well
A model that fits its training data perfectly may still fail on new data, and the gap between the two is what generalisation means. Stochastic gradient descent is interesting here because it seems to do the opposite of fitting perfectly: its steps are noisy and its runs are often stopped early, before the training error has been driven to its lowest value. Both of those apparent weaknesses have been connected to better performance on unseen examples, and the explanations come from two different directions, one about how sensitive the training procedure is to any single example, the other about which kind of minimum the noise steers the parameters toward.
Stability: a procedure that does not overreact
The first account is built on algorithmic stability, a property of a training procedure rather than of the model it produces. A procedure is stable if changing or removing one training example changes the resulting parameters only slightly. Stability matters because it bounds generalisation error directly: if no single example can pull the fitted model far, then the model cannot have memorised the peculiarities of any one of them, and its performance on the training set is a fair guide to its performance elsewhere. The question then becomes which training procedures are stable, and the answer for stochastic gradient descent turns out to depend on how long it runs.
An analysis of stochastic gradient methods under standard smoothness assumptions derived stability bounds for both convex and non-convex objectives, and the conclusion was that models trained by such a method with few iterations have vanishing generalisation error.[27] The mechanism is easiest to see in the early steps. At the start the parameters are the same whatever the data, since they are set by initialisation. Each step moves them a little in response to a sampled gradient, so the influence of any one example accumulates gradually; run only a few steps and that influence has had little chance to build up. The practical implication is unusual: stopping training early is not merely a way to save time, it is a way to keep the procedure stable, which is why reducing training time can matter beyond its obvious benefit.[27]
Sharp and flat minima
The second account asks not how sensitive the procedure is but what the loss surface looks like where training comes to rest. A sharp minimum is a narrow dip: the loss rises steeply as the parameters move away from it in almost any direction. A flat minimum is a broad basin where the loss stays low across a wide neighbourhood of parameter values. The distinction matters because the training data is only a sample. A minimum that is sharp with respect to that sample may not be sharp, or may not even be a minimum, with respect to the wider population, so a model resting in a narrow dip can be exquisitely tuned to the examples it saw and wrong about the ones it did not.
The framework used to make this precise is Bayesian evidence, a measure of how well a region of parameter space is supported by the data that penalises sharp minima while remaining invariant to how the model is parameterised.[5] The evidence account was developed in response to a striking observation: deep networks can memorise randomly labelled training data and yet still generalise well when the labels are real. The same phenomenon, it turns out, appears in small linear models, and the evidence measure explains both cases by penalising sharp minima while remaining invariant to model parameterisation.[5] What connects this to stochastic gradient descent is the noise. Treating the updates as a stochastic differential equation, the analysis proposes that the noise introduced by small mini-batches drives the parameters toward minima whose evidence is large, that is, toward flat ones.[5] The jitter that makes each step imprecise is what keeps the parameters from settling into the first narrow dip they encounter, pushing them along until they reach a basin wide enough to hold them.
Small batches and escape from sharp points
That picture implies a testable consequence: if noise is what carries the parameters out of sharp minima, then the amount of noise should change where training ends up. The same analysis found that, holding the learning rate fixed, there is an optimum batch size that maximises test accuracy, and that this optimum is proportional to both the learning rate and the size of the training set. The result follows from the noise scale g = ε(N/B − 1) ≈ εN/B, where ε is the learning rate, N the training set size and B the batch size: a smaller batch means a noisier walk, and the walk's restlessness is what does the selecting among minima.[5]
A separate treatment of the same question, modelling the updates as a diffusion process, reached a compatible conclusion from the dynamics of escape. In the small step size regime and the presence of omnidirectional noise, the analysis found that small batch size is helpful for stochastic gradient descent to escape unstable stationary points and sharp minimisers, and its theory indicated that the batch size should be increased at a later stage so that the method becomes trapped in flat minimisers for better generalisation.[15] The two prescriptions point the same way: noise early, when the parameters still need to roam, and calm later, when a broad basin has been found and the parameters should settle into it.
Noise and early stopping are not defects to be engineered away; on these accounts they are part of why a model trained this way travels well to data it has never seen.
Faults, adversaries and robustness
When training is spread over many machines, each worker computes a gradient on its own share of the data and the results are combined into a single update. That arrangement assumes the workers can be trusted. In an adversarial setting they cannot: a Byzantine worker is one that may behave arbitrarily, sending a corrupted gradient or no useful gradient at all, and the worry is that a few such workers can pull the shared model off course or stop it converging. The difficulty is that a malicious message and an honest but noisy one look much alike, since every stochastic gradient already carries random error. A defence therefore has to separate the two without knowing in advance which workers are which.
The first question is what tolerance is even possible. For a setting with $m$ machines, of which an $\alpha$-fraction are Byzantine, one analysis gives a variant of stochastic gradient descent that finds an approximate minimizer of a convex function in $T = \tilde{O}(1/(\varepsilon^2 m) + \alpha^2/\varepsilon^2)$ iterations, whereas ordinary mini-batch stochastic gradient descent needs only $O(1/(\varepsilon^2 m))$ iterations but cannot tolerate any Byzantine failures at all. The same work provides a lower bound showing that, up to logarithmic factors, the method is optimal in both sampling and time complexity.[28] The trade is explicit: robustness is bought with extra iterations, and the price rises as the share of faulty workers grows.
A second line of defence attacks the noise rather than the adversary directly. Because the random error in each honest gradient is what makes a corrupted message hard to spot, reducing that error makes the honest messages easier to tell apart from the malicious ones. One approach combines stochastic gradient descent with variance reduction and replaces the plain mean used to aggregate the workers' corrected gradients with the geometric median, a point that is pulled less by any single outlying contribution than an average would be. Under the assumption that fewer than half the workers are Byzantine, the resulting method converges linearly to a neighbourhood of the optimal solution, with the size of the residual error set by the number of Byzantine workers.[29] Two ideas are doing the work here: the corrected gradients are less noisy, and the aggregation rule is less easily dragged by an outlier.
A third approach does not assume a majority of honest workers at all. The method called Zeno tolerates an arbitrary number of faulty workers, needing only that a single non-faulty worker exists, and it does so by suspecting workers that may be defective rather than trusting a presumed good set. Suspicion invites false accusations, so the method ranks workers by a preference mechanism and uses that ranking to decide whose contributions to keep, and it comes with a proof of convergence for non-convex problems under these conditions.[30] The shift is from counting votes to weighing them.
Decentralized systems raise the stakes. Where a central server can compare what every worker sends, a network of peers has no such vantage point, and one analysis shows that a single malicious participant can arbitrarily alter the models of its neighbours by sending carefully crafted updates. The proposed remedy, called Ubar, gives each benign node an aggregation rule for selecting useful parameter updates and filtering out malicious ones at every training iteration, and it guarantees that each benign node trains a correct model under strong attacks with an arbitrary number of faulty nodes. Experiments on standard image classification tasks found the rule effective against both simple and sophisticated attacks, with better efficiency than existing solutions.[31]
What unites these defences is a change in what the update step is asked to do. In ordinary training the gradient is averaged and the average is followed; under attack the average itself becomes the vulnerability, and the method must instead aggregate in a way that a corrupted contribution cannot dominate. The cost is paid in iterations, in assumptions about how many workers are honest, or in the extra computation of a robust aggregation rule.
A noisy gradient and a malicious one are hard to tell apart, so robust training either reduces the noise, aggregates in a way an outlier cannot steer, or both.
In practice
Training deep networks in practice
A robot that reads faces

A humanoid robot that is meant to respond to a person's mood has to solve two problems in sequence before it can act: find the face in the picture, then read the expression on it. One system built for the NAO robot does exactly this with two convolutional networks run one after the other, a convolutional neural network being a model that learns to detect visual patterns by sliding small filters over an image and stacking the results into higher-level features. The first network localises and aligns a face; its output becomes the input to the second, which classifies the expression into one of seven emotions: happiness, surprise, neutral, sadness, fear, angriness and disgust. The robot then adjusts its behaviour according to instructions drawn up with psychologists, physicians, educators and therapists, with the aim of reducing frustration and anxiety in the person it is talking to.[1]
Training those networks is where the stochastic step earns its place. The expression network was trained on a large collection of web images, and the team found that mixing in 5–6% of laboratory-controlled images from other databases raised accuracy by more than 10% over the highest score so far on that benchmark, using a ResNet model that reached 90.14 percent training accuracy, ahead of 87 percent for a VGG network and 81 percent for Inception V3.[1] The optimiser mattered too. A recent method called rectified Adam (RAdam) introduces a term that corrects the variance of the adaptive learning rate, applying a warm-up with a low initial learning rate, and when it was used to train the three expression networks it produced a more robust loss during training and an accuracy improvement of 3 to 4 percent on each network compared with other optimisers. The RAdam gains come from the choice of update rule, while the larger accuracy increase came from adding laboratory-controlled images together with other optimizations, using the ResNet model.[1]
Handwritten characters
A different application shows the plain algorithm doing the work without an adaptive layer on top. A modified convolutional network for recognising handwritten characters used stochastic gradient descent as its optimiser, inserting dropout layers into the fully connected and output layers to curb overfitting and minimising cross entropy, with a rectified linear unit as the activation function to avoid the vanishing-gradient problem and speed convergence.[4] The design is a compact illustration of how the pieces fit: the network supplies the function, the loss supplies the number to reduce, and the stochastic step supplies the means of reducing it.
The choice of learning rate was studied directly in that work. Testing the optimiser under different settings, the authors found the network recognised characters well when the learning rate sat between 0.05 and 0.07.[4] That is a narrow window, and it makes concrete the tuning problem described earlier: the rate is not a detail but a setting that decides whether training works. The results on three benchmarks were strong. On MNIST the network reached a recognition rate of 99.97 percent, and its time cost was 21.95 percent of MLP-CNN and 10.02 percent of SVM-ELM; on a second benchmark it improved recognition by an average of 2.35 percent over SVM-ELM at 15.41 percent of the time cost; and on a third test set recognition ranged from 84.93 to 95.29 percent, averaging 89.77 percent. On MNIST and HCL2000 the network reached high recognition rates at a fraction of the time cost of the comparison methods, and on EnglishHand recognition averaged 89.77 percent.[4]
Recommendations from sparse data
The same step also fits models that have nothing to do with images. A recommender system predicts what a user might like from a matrix of ratings that is mostly empty, and latent factor analysis handles this by representing each user and each item as a short vector of hidden numbers, so that a predicted rating is the product of the two vectors. Fitting those vectors means minimising error over the observed entries only, and stochastic gradient descent is the efficient way to do it, updating the vectors for one observed rating at a time.
A study of eight extended versions of the algorithm built eight latent-factor models and tested them on two sparse matrices generated by real recommender systems. Compared with a model trained by the standard algorithm, the extended versions achieved higher prediction accuracy for the missing entries, a faster convergence rate, and greater diversity among models. The result shows that extended SGD algorithms also improve latent-factor models, achieving higher prediction accuracy for missing data, faster convergence and model diversity.[32]
Running this step across many machines at once, and the pitfalls that come with tuning it, are covered later.
The same cheap noisy step trains a robot's expression classifier, a character recogniser and a recommender; what changes between them is the model and the optimiser, not the logic of the update.
Running SGD across many machines
A single machine improves a model one step at a time, and the steps are cheap, so the obvious way to train faster is to have many machines take steps at once. The straightforward arrangement gives each worker a share of the data, lets it compute a gradient on its own share, and has the workers combine their results into a shared set of parameters. The complication is that the workers must read and write the same parameters, and the usual way to keep them from interfering is a lock, a mechanism that lets one worker hold a piece of memory while others wait their turn. Locks are safe, but waiting is exactly what a parallel system is supposed to avoid, and the time spent queueing can swallow the gain from the extra machines.
The HOGWILD! scheme removes the locks entirely. Workers are allowed to read and write the shared parameters whenever they like, with the possibility of overwriting each other's work, and no worker ever waits. The scheme is not reckless in the cases that matter, because the analysis identifies a condition under which the interference is harmless: when the optimization problem is sparse, meaning most gradient updates touch only a small part of the parameter vector, two workers are unlikely to be writing to the same numbers at the same moment. Under that condition the method achieves a nearly optimal rate of convergence, and experiments found it faster than alternative schemes that use locking by an order of magnitude.[11] The lesson generalises beyond the specific scheme: the cost of coordination can exceed the cost of the occasional collision, provided the collisions are rare and their damage is small.
A second family of methods accepts that workers will fall out of step and tries to correct for it. In asynchronous parallel stochastic gradient descent, workers do not wait for one another at all; each computes a gradient, sends it to a shared model, and moves on. The trouble is that by the time a worker's gradient arrives, other workers may have already changed the model, so the gradient is applied to parameters it was not computed for. This is the delayed gradient problem, and it makes the optimization behave differently from the sequential version. One remedy, called delay compensation, uses a Taylor expansion of the gradient function together with an efficient approximation of the Hessian, the matrix of second derivatives of the loss, to adjust each arriving gradient for the changes made since it was computed, so that the parallel run behaves more like a sequential one. Evaluated on the CIFAR-10 and ImageNet datasets, the compensated method outperformed both synchronous and asynchronous stochastic gradient descent and came close to the performance of the sequential algorithm.[33]
Theory has caught up with these practices. For two asynchronous implementations, one across a computer network and one on shared memory, an analysis establishes a convergence rate of order $1/\sqrt{K}$ over $K$ total iterations, and proves that linear speedup is achievable, meaning the work finishes proportionally faster as workers are added, so long as the number of workers stays bounded by the square root of the iteration count.[13] The bound is a caution as much as a promise: adding workers helps, but only within a limit set by how long the run lasts, because more workers mean more staleness in the gradients being combined.
Where the workers sit also matters. In a centralized system every worker sends its gradient to one parameter server, which aggregates them and broadcasts the updated model; the server is a single point through which all traffic must pass, and it becomes the bottleneck as workers multiply. A decentralized system has no server: each worker exchanges information only with its neighbours in a network, averaging with them and taking a local gradient step. An analysis of decentralized parallel stochastic gradient descent identified a regime in which the decentralized method can outperform the centralized one, because the two have comparable total computational cost while the decentralized scheme places far less communication burden on the busiest node. Experiments across multiple frameworks and network configurations, on computation platforms of up to 112 GPUs, found that on networks with low bandwidth or high latency the decentralized method could be up to an order of magnitude faster than well-optimized centralized counterparts.[3] The advantage is not universal; it appears when communication, rather than arithmetic, is what holds training back.
A fourth setting arises when the data cannot be gathered in one place at all. In federated learning, a large number of clients, often phones or other devices, coordinate with a central server to learn a model without sharing their own training data. The standard optimization method for this setting, Federated Averaging, is difficult to tune and shows unfavourable convergence behaviour, and one response is to bring the adaptive optimizers into the federated setting. Federated versions of Adagrad, Adam and Yogi were proposed and their convergence analyzed in the presence of heterogeneous data for general non-convex problems, with results highlighting how the differences between clients interact with the cost of communication. Extensive experiments showed that using adaptive optimizers can significantly improve the performance of federated learning.[34] The appeal is the same one that made these optimizers popular on a single machine: when the gradients arriving from many sources differ in scale and reliability, a per-parameter rule that adapts to their history copes better than one fixed rate for all.
What these schemes share is a willingness to give up exactness in the combination of gradients in exchange for not waiting. Locks, delays, network topology and client heterogeneity are all ways the same tension appears, and each is met by a rule that keeps the aggregate close enough to the sequential answer for training to converge. How much tuning such systems demand, and where the theory still parts company with practice, is covered later.
Parallel training trades exact coordination for speed, and the workable schemes are those that keep the interference between workers small enough for convergence to survive.
Criticism
Limits, tuning pitfalls and open questions
The comparison depends on the search space

Choosing an optimiser looks like a question with an empirical answer: train the same model with each candidate and keep the one that does best. The trouble is that every candidate comes with its own settings, and the result of the comparison depends heavily on how those settings were searched. An analysis of the problem found that the hyperparameter search space may be the single most important factor explaining the rankings reported in recent empirical comparisons, and that those rankings can be reversed when the search space is changed.[35] A method given a wide range of step sizes and momentum values to try has more chances to find a good configuration than one restricted to a narrow range, so a comparison can end up measuring the generosity of the search rather than the quality of the algorithm.
There is a logical constraint that any fair comparison ought to respect. Some optimisers contain others as special cases: Adam, with its momentum term switched off and its adaptive scaling neutralised, reduces to plain momentum or to gradient descent. As tuning effort grows without bound, a more general optimiser should therefore never do worse than one it can approximate. The analysis notes that recent attempts at comparison either treat these inclusion relationships as practically irrelevant or restrict the hyperparameters in ways that break them, and in its own experiments it found that the inclusions did matter and always predicted the comparisons, with the popular adaptive methods never underperforming momentum or gradient descent.[35] The practical warning is that a single reported win, on one model and one search budget, says little on its own.
The gap between theory and practice
A second limit is that the guarantees and the behaviour do not quite meet. The conditions under which the optimisers are proved to converge are not the conditions that hold when a network is actually trained, and a survey of the field concluded that a gap remains between the two, with the question of how to bridge it left open.[6] The theory described earlier establishes that the iterates settle under stated assumptions about smoothness, curvature and the noise in the gradient; a real training run may violate any of them, and the proofs then say nothing about it. Convergence in the limit of many steps is also a weaker promise than it sounds, since a run is stopped long before the limit is reached, and what matters is the loss at the point where training was halted.
The cost of tuning
The step size remains the setting that most affects the outcome, and the ways of choosing it each carry a cost. Hand tuning means trying candidate values and watching how training behaves, which can be time consuming.[9] Automatic schemes move the decision into the run, but they do not remove it: they encode an assumption about how the loss behaves, and when that assumption fails the rate they compute can be worse than a well-chosen fixed one. The handwritten-character work found good recognition performance when the learning rate was set between 0.05 and 0.07.[4] A setting that works for one model, dataset and batch size may fail for another, so tuning effort does not transfer cleanly from one problem to the next.
The adaptive methods add settings of their own. Adam's behaviour is sensitive to its momentum parameter, and one set of experiments found that at a high value of that parameter the method outperformed a carefully tuned accelerated gradient method on most of the tests, in terms of reaching lower training and test losses, while the accelerated method could sometimes do better at the value most commonly used. The same experiments reported that the accelerated method had better abilities in reducing the gradient norms, and produced iterates showing an increasing trend for the smallest eigenvalue of the Hessian of the loss.[36] A default that is common is not therefore a default that is right, and the settings that govern the adaptive scaling are as much a part of the tuning problem as the learning rate itself.
Many variants, modest differences
The family of optimisers has grown large, and the differences among the better members are often small. The comparison of a modified Adam against basic Adam, plain stochastic gradient descent and five other recent adaptive algorithms found it ahead in most comparisons, but its margin over the most competitive alternative (AdaBelief) was about 1.0% and 0.93% in testing accuracy and 0.29% and 1.68% in training time for MNIST and CIFAR-10 respectively.[18] Gains of that size are real, yet they sit within the range that a change of search space or a different random seed can produce, which is why the question of how to benchmark optimisers fairly remains open.[35] The menu of variants is a convenience and a hazard at once: it offers a method suited to many situations, and it makes the choice among them a research problem in itself.
An optimiser's reported advantage is only as trustworthy as the search that produced it, and the settings that decide a run are often the ones least examined.
Beyond ordinary training: other uses of the same step
The update rule described so far assumes the parameters live in ordinary flat space, where the difference between two settings is a straight subtraction. Many models do not. A covariance matrix, a rotation, a point on a sphere: these are constrained objects, and stepping off the constraint gives a meaningless model. Riemannian manifold is the name for a curved space on which distance and direction are defined locally, so that a straight line becomes a curve that stays on the surface.
Stochastic gradient descent extends to such spaces by taking the step along the manifold rather than through the surrounding flat space, and an analysis of the procedure proves that, as in the flat case, it converges to a critical point of the cost function. The same work illustrates the extension with four examples, among them a gossip algorithm on the set of covariance matrices tested numerically.[37] The lesson is that the stochastic step is not tied to flat coordinates; what it needs is a notion of direction, and a curved space supplies one.
A second extension changes what the wandering is for. With a constant learning rate, the sequence of parameter values behaves like a Markov chain, a random process that settles into a stable distribution rather than a single point. Read that way, the noise is not an obstacle to be reduced but a source of spread, and the spread can be shaped. One analysis shows that constant-rate stochastic gradient descent can serve as an approximate Bayesian posterior inference algorithm, with its tuning parameters adjusted so that the distribution it settles into best matches the posterior, measured by the Kullback-Leibler divergence between the two. The same perspective yields a variational EM algorithm for optimizing hyperparameters in complex probabilistic models, and a scheme for sampling with momentum in which the damping coefficient is adjusted accordingly.[38] Training and inference, usually separate activities, become the same run viewed two ways.
The step can also be turned on the settings that govern training itself. Tuning hyperparameters is hard because gradients with respect to them are usually unavailable, but the entire training procedure is a long chain of arithmetic, and a chain can be differentiated backwards. One method computes exact gradients of cross-validation performance with respect to all hyperparameters by chaining derivatives backwards through the whole training run, which requires exactly reversing the dynamics of stochastic gradient descent with momentum. Those gradients allow thousands of hyperparameters to be optimized at once, including step-size and momentum schedules, weight initialization distributions, regularization schemes and network architectures.[39] The optimiser becomes an object that can itself be optimised.
A related idea appears in meta-learning, where an agent uses prior learning episodes to improve quickly on a new task. Bayesian hierarchical modelling formalises this as inference over a set of parameters shared across tasks, and the model-agnostic meta-learning algorithm can be reformulated as a method for probabilistic inference in such a model, its use of a scalable gradient descent procedure for posterior inference being what makes it applicable to complex function approximators. Identifying the algorithm this way explains how it operates as a meta-learning procedure and opens the door to approximate-inference techniques, which the authors use to propose an improvement drawing on curvature estimation.[40]
The same step even appears where the arithmetic is not ordinary arithmetic. In hybrid quantum-classical optimization, gradients are estimated from measurements of parameterized quantum circuits, and estimating an expectation value from a finite number of measurement outcomes is itself a stochastic estimate. Formalising this shows that for problems including the variational quantum eigensolver, the quantum approximate optimization algorithm and certain quantum classifiers, estimating expectation values with a given number of measurement outcomes yields optimization algorithms whose convergence can be rigorously understood, and even single measurement outcomes suffice. Where the required gradients are linear combinations of expectation values, sampling over the terms as well gives a doubly stochastic optimiser, with convergence guarantees proved for all the algorithms.[41]
Finally, gradient descent may be happening inside a model rather than being used to build one. Training a Transformer on an auto-regressive objective is closely related to gradient-based meta-learning, and a simple weight construction shows that a single linear self-attention layer induces the same data transformation as one gradient-descent step on a regression loss. Empirically, when self-attention-only Transformers are trained on simple regression tasks, the models learned by gradient descent and by the Transformer show great similarity, or the weights found by optimization match the construction outright, so that trained Transformers become mesa-optimizers, learning models by gradient descent in their forward pass.[42] The step that trains the network and the step the network appears to run are, in this account, the same operation.
The stochastic step needs only a direction and a way to move; give it a curved space, a distribution to match, a training run to differentiate, or a circuit to measure, and it still works.
Key studies
| Year | Study | Sample | Design | Finding |
|---|---|---|---|---|
| 2009 | Klein et al.[16] | 3D CT and MR images of the head, lungs, and prostate | image registration experiments comparing adaptive stochastic gradient descent with the non-adaptive Robbins-Monro algorithm | The adaptive method was less sensitive to user-set parameters than the Robbins-Monro algorithm, which needs a predetermined step size function. |
| 2015 | Hardt et al.[27] | convex and non-convex optimization settings | stability analysis of stochastic gradient methods | Models trained by a stochastic gradient method with few iterations have vanishing generalization error. |
| 2016 | Tan et al.[9] | standard data sets | numerical experiments with Barzilai-Borwein step sizes for SGD and SVRG | On standard data sets, SGD-BB and SVRG-BB matched SGD and SVRG tuned to their best step sizes, and in some cases did better. |
| 2017 | Smith & Le[5] | small linear models and empirical tests | Bayesian analysis of generalization and batch size | With a fixed learning rate there is an optimum batch size that maximizes test accuracy, and the optimum is proportional to both the learning rate and the training set size. |
| 2017 | Mandt et al.[38] | theoretical analysis of SGD as approximate Bayesian inference | Run with a constant learning rate, SGD behaves like a Markov chain that settles into a stationary distribution, and the tuning parameters can be set so that this distribution comes closest to a Bayesian posterior. | |
| 2017 | Lian et al.[12] | ResNet-50 on ImageNet with up to 128 GPUs | asynchronous decentralized parallel SGD: theoretical analysis and empirical demonstration | AD-PSGD converged similarly to AllReduce-SGD in epochs, but each epoch could be up to 4-8X faster in a network-sharing HPC environment. |
| 2018 | De et al.[36] | autoencoder setups and VGG-9 on CIFAR-10 | empirical comparison of RMSProp and Adam against Nesterov accelerated gradient | Adam at a momentum parameter of 0.99 beat a carefully tuned Nesterov method on most experiments in terms of lower training and test losses. |
| 2018 | Alistarh et al.[28] | m machines, an alpha-fraction of them Byzantine | theoretical analysis of distributed stochastic optimization | The Byzantine variant finds approximate minimizers in T = O(1/(epsilon^2 m) + alpha^2/epsilon^2) iterations, while traditional mini-batch SGD needs O(1/(epsilon^2 m)) but cannot tolerate Byzantine failures. |
| 2019 | Choi et al.[35] | optimizer comparisons from recent literature | analysis of how hyperparameter tuning protocols affect rankings | Rankings can be contradicted when search spaces change, and adaptive gradient methods never underperformed momentum or gradient descent. |
| 2020 | Dubey et al.[14] | CIFAR10 and CIFAR100 image sets | image categorization with a ResNet-based network at batch sizes of 32, 64, and 128 | diffGrad outperformed SGDM, AdaGrad, AdaDelta, RMSProp, AMSGrad, and Adam on both sets at all three batch sizes. |
| 2020 | Melinte & Vladareanu[1] | facial expression recognition data with VGG, Inception V3, and ResNet networks | transfer learning and fine-tuning with a rectified Adam optimizer | ResNet reached 90.14% training accuracy, VGG 87%, and Inception V3 81%, and rectified Adam improved each network by 3% to 4%. |
| 2023 | Reyad et al.[18] | MNIST and CIFAR-10 image sets | training a convolutional neural network with 5 independent runs and 200 epochs | The modified Adam reached 98.59% testing accuracy on MNIST and beat AdaBelief by 1.0% in accuracy and 0.29% in convergence speed. |
See also
References
- Melinte, D. O., & Vladareanu, L. (2020). Facial Expressions Recognition for Human–Robot Interaction Using Deep Convolutional Neural Networks with Rectified Adam Optimizer. Sensors, 20(8), 2393. doi:10.3390/s20082393
- Konečný, J., & Richtárik, P. (2017). Semi-Stochastic Gradient Descent Methods. Frontiers in Applied Mathematics and Statistics, 3. doi:10.3389/fams.2017.00009
- Lian, X., Zhang, C., Zhang, H., Hsieh, C., Zhang, W., & Liu, J. (2017). Can Decentralized Algorithms Outperform Centralized Algorithms? A Case Study for Decentralized Parallel Stochastic Gradient Descent. arXiv. doi:10.48550/arxiv.1705.09056 Free full text
- Yang, J., & Yang, G. (2018). Modified Convolutional Neural Network Based on Dropout and the Stochastic Gradient Descent Optimizer. Algorithms, 11(3), 28. doi:10.3390/a11030028
- Smith, S. L., & Le, Q. V. (2017). A Bayesian Perspective on Generalization and Stochastic Gradient Descent. arXiv. doi:10.48550/arxiv.1710.06451 Free full text
- Tian, Y., Zhang, Y., & Zhang, H. (2023). Recent Advances in Stochastic Gradient Descent in Deep Learning. Mathematics, 11(3), 682. doi:10.3390/math11030682
- Kingma, D. P., & Ba, J. L. (2014). Adam: A Method for Stochastic Optimization. arXiv. doi:10.48550/arxiv.1412.6980 Free full text
- Li, X., & Orabona, F. (2018). On the Convergence of Stochastic Gradient Descent with Adaptive Stepsizes. arXiv. doi:10.48550/arxiv.1805.08114 Free full text
- Tan, C., Ma, S., Dai, Y., & Qian, Y. (2016). Barzilai-Borwein Step Size for Stochastic Gradient Descent. arXiv. doi:10.48550/arxiv.1605.04131 Free full text
- Baydin, A. G., Cornish, R., Martínez-Rubio, D., Schmidt, M., & Wood, F. (2017). Online Learning Rate Adaptation with Hypergradient Descent. arXiv. doi:10.48550/arxiv.1703.04782 Free full text
- Feng, N., Recht, B., Ré, C., & Wright, S. J. (2011). HOGWILD!: A Lock-Free Approach to Parallelizing Stochastic Gradient Descent. arXiv. doi:10.48550/arxiv.1106.5730 Free full text
- Lian, X., Zhang, W., Zhang, C., & Liu, J. (2017). Asynchronous Decentralized Parallel Stochastic Gradient Descent. arXiv. doi:10.48550/arxiv.1710.06952 Free full text
- Lian, X., Huang, Y., Li, Y., & Ji, L. (2015). Asynchronous Parallel Stochastic Gradient for Nonconvex Optimization. arXiv. doi:10.48550/arxiv.1506.08272 Free full text
- Dubey, S. R., Chakraborty, S., Roy, S. K., Mukherjee, S., Singh, S. K., & Chaudhuri, B. B. (2020). diffGrad: An Optimization Method for Convolutional Neural Networks. IEEE Transactions on Neural Networks and Learning Systems, 31(11), 4500-4511. doi:10.1109/tnnls.2019.2955777
- Hu, W., Li, C. J., Li, L., & Liu, J. G. (2019). On the diffusion approximation of nonconvex stochastic gradient descent. Annals of Mathematical Sciences and Applications, 4(1), 3-32. doi:10.4310/amsa.2019.v4.n1.a1
- Klein, S., Pluim, J. P. W., Staring, M., & Viergever, M. A. (2009). Adaptive Stochastic Gradient Descent Optimisation for Image Registration. International Journal of Computer Vision, 81(3), 227-239. doi:10.1007/s11263-008-0168-y
- Liu, Y., Gao, Y., & Yin, W. (2020). An Improved Analysis of Stochastic Gradient Descent with Momentum. arXiv. doi:10.48550/arxiv.2007.07989 Free full text
- Reyad, M., Sarhan, A. M., & Arafa, M. (2023). A modified Adam algorithm for deep neural network optimization. Neural Computing and Applications, 35(23), 17095-17112. doi:10.1007/s00521-023-08568-z
- Konecny, J., Liu, J., Richtarik, P., & Takac, M. (2016). Mini-Batch Semi-Stochastic Gradient Descent in the Proximal Setting. IEEE Journal of Selected Topics in Signal Processing, 10(2), 242-255. doi:10.1109/jstsp.2015.2505682
- Hofmann, T., Lucchi, A., Lacoste-Julien, S., & McWilliams, B. (2015). Variance Reduced Stochastic Gradient Descent with Neighbors. arXiv. doi:10.48550/arxiv.1506.03662 Free full text
- Xiao, L., & Zhang, T. (2014). A Proximal Stochastic Gradient Method with Progressive Variance Reduction. SIAM Journal on Optimization, 24(4), 2057-2075. doi:10.1137/140961791
- Rakhlin, A., Shamir, O., & Sridharan, K. (2011). Making Gradient Descent Optimal for Strongly Convex Stochastic Optimization. arXiv. doi:10.48550/arxiv.1109.5647 Free full text
- Shamir, O., & Zhang, T. (2012). Stochastic Gradient Descent for Non-smooth Optimization: Convergence Results and Optimal Averaging Schemes. arXiv. doi:10.48550/arxiv.1212.1824 Free full text
- Rong, G., Huang, F., Jin, C., & Yang, Y. (2015). Escaping From Saddle Points --- Online Stochastic Gradient for Tensor Decomposition. arXiv. doi:10.48550/arxiv.1503.02101 Free full text
- Zou, D., Cao, Y. J., Zhou, D., & Gu, Q. (2018). Stochastic Gradient Descent Optimizes Over-parameterized Deep ReLU Networks. arXiv. doi:10.48550/arxiv.1811.08888 Free full text
- Cao, Y. J., & Gu, Q. (2019). Generalization Bounds of Stochastic Gradient Descent for Wide and Deep Neural Networks. arXiv. doi:10.48550/arxiv.1905.13210 Free full text
- Hardt, M., Recht, B., & Singer, Y. (2015). Train faster, generalize better: Stability of stochastic gradient descent. arXiv. doi:10.48550/arxiv.1509.01240 Free full text
- Alistarh, D., Allen-Zhu, Z., & Li, J. Z. (2018). Byzantine Stochastic Gradient Descent. arXiv. doi:10.48550/arxiv.1803.08917 Free full text
- Wu, Z., Ling, Q., Chen, T., & Giannakis, G. B. (2020). Federated Variance-Reduced Stochastic Gradient Descent With Robustness to Byzantine Attacks. IEEE Transactions on Signal Processing, 68, 4583-4596. doi:10.1109/tsp.2020.3012952
- Xie, C., Koyejo, S., & Gupta, I. (2018). Zeno: Distributed Stochastic Gradient Descent with Suspicion-based Fault-tolerance. arXiv. doi:10.48550/arxiv.1805.10032 Free full text
- Guo, S., Zhang, T., Yu, H., Xie, X., Ma, L., Xiang, T., & Liu, Y. (2022). Byzantine-Resilient Decentralized Stochastic Gradient Descent. IEEE Transactions on Circuits and Systems for Video Technology, 32(6), 4096-4106. doi:10.1109/tcsvt.2021.3116976
- Luo, X., Wang, D., Zhou, M., & Yuan, H. (2021). Latent Factor-Based Recommenders Relying on Extended Stochastic Gradient Descent Algorithms. IEEE Transactions on Systems, Man, and Cybernetics: Systems, 51(2), 916-926. doi:10.1109/tsmc.2018.2884191
- Zheng, S., Meng, Q., Wang, T., Chen, W., Yu, N., Ma, Z. M., & Liu, T. (2016). Asynchronous Stochastic Gradient Descent with Delay Compensation. arXiv. doi:10.48550/arxiv.1609.08326 Free full text
- Reddi, S. J., Charles, Z., Zaheer, M., Garrett, Z., Rush, K., Konečný, J., Kumar, S., & McMahan, H. B. (2020). Adaptive Federated Optimization. arXiv. doi:10.48550/arxiv.2003.00295 Free full text
- Choi, D., Shallue, C. J., Nado, Z., Lee, J., Maddison, C. J., & Dahl, G. E. (2019). On Empirical Comparisons of Optimizers for Deep Learning. arXiv. doi:10.48550/arxiv.1910.05446 Free full text
- De, S., Mukherjee, A., & Ullah, E. (2018). Convergence guarantees for RMSProp and ADAM in non-convex optimization and an empirical comparison to Nesterov acceleration. arXiv. doi:10.48550/arxiv.1807.06766 Free full text
- Bonnabel, S. (2013). Stochastic Gradient Descent on Riemannian Manifolds. IEEE Transactions on Automatic Control, 58(9), 2217-2229. doi:10.1109/tac.2013.2254619
- Mandt, S., Hoffman, M. D., & Blei, D. M. (2017). Stochastic Gradient Descent as Approximate Bayesian Inference. arXiv. doi:10.48550/arxiv.1704.04289 Free full text
- Maclaurin, D., Duvenaud, D., & Adams, R. P. (2015). Gradient-based Hyperparameter Optimization through Reversible Learning. arXiv. doi:10.48550/arxiv.1502.03492 Free full text
- Grant, E., Finn, C., Levine, S., Darrell, T. J., & Griffiths, T. L. (2018). Recasting Gradient-Based Meta-Learning as Hierarchical Bayes. arXiv. doi:10.48550/arxiv.1801.08930 Free full text
- Sweke, R., Wilde, F., Meyer, J., Schuld, M., Faehrmann, P. K., Meynard-Piganeau, B., & Eisert, J. (2020). Stochastic gradient descent for hybrid quantum-classical optimization. Quantum, 4, 314. doi:10.22331/q-2020-08-31-314
- Oswald, J. v., Niklasson, E., Randazzo, E., Sacramento, J., Mordvintsev, A., Zhmoginov, A., & Vladymyrov, M. (2022). Transformers learn in-context by gradient descent. arXiv. doi:10.48550/arxiv.2212.07677 Free full text
Cite this page: Atlas Nova editors. (2026). Stochastic gradient descent. Atlas Nova. https://velocer.io/atlas/stochastic-gradient-descent/