Online Learning and Stochastic Approximations
Paper · 1998 · Léon Bottou
Summary
An online learning algorithm can adjust its parameters as soon as it sees an example. That makes each update cheap, but the example may favor a different adjustment from the one suggested by the data as a whole. Léon Bottou asks when a succession of these noisy adjustments can nevertheless solve a learning problem. He answers by treating online learning as a form of stochastic approximation, the study of how repeated random corrections can approach a solution. The connection gives a common explanation for the behavior of several familiar algorithms in machine learning.
The starting point is expected risk, the average loss a system would incur under the distribution that generates its observations. The distribution is typically unknown, so the learner works with the observations it can obtain. It can update directly from incoming events and aim at expected risk, or sample from a fixed training set and aim at the average loss on that set. In either case, Bottou asks for an update direction whose average, at the current parameters, equals the gradient of the chosen cost. This covers ordinary online gradient descent, updates based on several examples at once, and gradients perturbed by noise. The paper uses the same framework to examine the adaline, the perceptron, multilayer networks, and clustering, then shows how curvature information leads to Kalman-style and centroid-specific updates.
The strongest convergence result concerns a cost with a unique minimizer and an average direction that keeps pointing toward it with sufficient strength away from the solution. Under the paper’s learning-rate and moment conditions, the parameters approach that minimizer with probability 1. The learning rates have two jobs. Their squares must sum to a finite quantity to control the effect of noisy discrete steps, while the rates themselves must have an infinite sum so that the learner can keep making progress.
For a general smooth cost, Bottou first establishes that the parameters stay bounded under an additional inward-direction assumption. He then proves that the cost approaches a finite limit and the gradient tends to zero, both with probability 1. A small gradient is compatible with a minimum, a saddle, a maximum, or a flat region. The proof therefore gives a stationarity guarantee whose meaning depends on the shape of the cost. The paper’s results are theoretical. Its algorithm examples explain where the assumptions matter, while its discussion of learning speed distinguishes the final phase of convergence from the still-open problem of describing the entire trajectory in general.
Deep dive: Online Learning and Stochastic Approximations
Léon Bottou explains when online gradient updates converge, how sampling noise affects them, and what changes when the cost has several minima. · about 40 minutes to read
The problem and its context
Learning while observations arrive
An algorithm that works through an entire training set before changing its parameters spends that pass evaluating the old parameters. An online algorithm can use the first observation to make an adjustment and process the next observation with the updated parameters. This can be an important difference when the training set is large, when observations arrive one at a time, or when the system has to make decisions while it is still adapting. It also creates a mathematical difficulty. The next update depends on both the next observation and all the earlier updates that produced the current state.
Bottou presents online learning as an old practical idea with a well-developed mathematical counterpart. Early learning systems relied heavily on online rules because simple updates fit the hardware available to their designers. The paper traces a parallel development in engineering, where recursive adaptive algorithms carried information forward in an updated state as measurements arrived. Stochastic approximation grew out of the study of these procedures. In both settings, the basic operation is to take a measurement, turn it into a correction, and repeat without solving the entire estimation problem afresh.
The exchange between the fields predates this paper. Bottou points to earlier treatments that already recognized the affinity between recursive adaptation and learning. His contribution is to use that affinity systematically. He supplies a common mathematical form for an online learning rule, works through familiar algorithms to identify their objectives or update directions, and applies a common proof strategy to their convergence. This lets a reader ask the same questions of a threshold classifier and a clustering rule even though they describe their observations, parameters, and errors differently.
What the learner is trying to minimize
The starting point, taken from the work of Tsypkin and Vapnik, is to describe learning as a decision about which parameters incur the least loss on average. A loss makes explicit what counts as a costly outcome on an individual observation. A probability distribution describes how frequently different observations occur. Combining the two gives a quantity to minimize. The learner can see outcomes and evaluate losses for them, while the distribution that would let it calculate the full average is unknown.
The paper’s postal example makes the distinction concrete. An observation contains an image of a ZIP code and its intended reading. The adjustable quantities are the weights of the recognition network. A possible loss is the financial cost of handling the letter given the system’s answer. A correct reading keeps that cost low. An error can require detection and rerouting, with a higher cost. The aim of learning in this formulation is to reduce the average cost under the distribution of mail the system encounters. The frequency of particular images and mistakes matters because a loss that occurs often contributes differently from a loss that occurs rarely.
The loss can also incorporate something the system designer already knows about the observations. Bottou imagines an image-capture process with a known tendency to spoil images. If its conditional behavior is known, the designer can average over the possible capture outcomes when defining the loss for a given envelope and intended ZIP code. Learning can then work with the remaining distribution of envelope and code pairs. A preference for smooth functions belongs elsewhere in the formulation. It concerns which solutions the learning system should favor and can motivate regularization, a modification that biases the learner towards certain parameter choices.
Why use a random update?
The standard way to obtain a computable objective is to collect a finite set of observations and average their losses. Bottou places this choice in the tradition of empirical risk minimization. The theory he cites studies when a solution on a sufficiently large training set can give a good solution under the population distribution. That relationship concerns generalization. A separate optimization question concerns how the learner gets to a solution of whichever objective it has been given.
Batch gradient descent addresses the optimization question by evaluating how every training example’s loss changes at the current parameters and averaging those directions. A single batch step therefore requires a computation across the whole set. Large sets impose storage and processing costs, even when many examples carry similar information. The alternative is to sample an example and use its direction immediately. If sampling is uniform, averaging over all the directions the next example could produce gives the batch direction at the current parameters.
The distinction between averaging possible next steps and following an actual sequence of steps is central to the paper. Once an example has moved the parameters, the next example is evaluated at a new point. Over many iterations, the directions and the locations where they are evaluated depend on the same sampling history. The average direction at a fixed point is the initial fact the analysis can use. The rest of the proof has to say how individual departures from that average accumulate and whether the parameters continue to make progress.
A stream of real events gives the same procedure a different objective. If the observations come independently from the distribution of interest, a step computed from the next event can point, on average, in the direction that improves population risk. A training-set step points towards improved performance on that training set. Bottou illustrates the appeal of processing real events with an autopilot that could keep learning how commands affect the aircraft as conditions change. The example explains the operational reason to learn online. The convergence analysis itself works with a fixed sampling distribution.
The method, step by step
From a loss on one example to an update rule
The paper begins by identifying the parameter vector, the observable event, and a way of measuring the loss on that event. A supervised event includes an input and the desired response. A clustering event can consist of the input alone. The same candidate parameter vector can be evaluated on either kind of event. The objective assigns that vector the expected loss under the distribution being considered.
J(w) = E_z[Q(z, w)] = ∫ Q(z, w) dP(z)
Here w is the adaptable parameter vector, z is an event, and Q(z, w) is the loss at that event and parameter value. J(w) is the expected risk, E_z denotes expectation over the event, and the integral with dP(z) averages with respect to the event distribution P. The parameters are held fixed in this average.
When a finite training set serves as a substitute for the population, the learner can calculate its average loss exactly. The paper takes the observations that compose the set to be independent draws from the population. Once the set is fixed, there is a separate choice about how to present its examples to the learner.
Ĵ_L(w) = (1/L) Σ_{i=1}^{L} Q(z_i, w)
Here Ĵ_L(w) is the empirical risk for a set of size L, i indexes its examples, z_i is the event at index i, and Σ adds the losses for all those events. Q and w have the same roles as in the expected risk. The factor 1/L gives each entry equal weight, including any repeated entries.
For batch gradient descent, all of the losses are differentiated at the same parameter vector. The resulting average gradient estimates how the empirical risk will change for a small movement. The update moves against that gradient. The positive learning rate specifies how far to go in the chosen direction.
w_{t+1} = w_t − γ_t ∇_w Ĵ_L(w_t)
The index t denotes the current iteration, w_t is its parameter vector, and w_{t+1} is the vector after the update. γ_t is the learning rate, ∇_w means to take the vector of first derivatives with respect to the parameters, and Ĵ_L(w_t) is the empirical objective evaluated at the current vector.
In ordinary online gradient descent, the learner samples an example, differentiates its loss at the current vector, and takes the step right away. For a finite set, an independently sampled uniform index makes each entry equally likely on every iteration. For a stream, the learner instead uses the event that arrives. The study treats those events as independent draws from a common distribution.
w_{t+1} = w_t − γ_t ∇_w Q(z_t, w_t)
Here z_t is the example drawn for iteration t, and ∇_w Q(z_t, w_t) differentiates its individual loss with respect to w at w_t. The subscripts on w and γ have the same meanings as in the batch update. Even if the same example is drawn again, the next derivative is evaluated at whichever parameters the algorithm has reached by then.
Bottou abstracts the last operation into a general update. He writes the cost as C so the same expression can cover either population or training-set risk. The event used to compute an update can contain several observations or include a random perturbation. What matters for the analysis is the conditional behavior of the resulting direction.
One iteration of the general online gradient algorithm
The steps in order.
w_{t+1} = w_t − γ_t H(z_t, w_t)
H(z_t, w_t) is the random update direction before scaling, determined by the draw z_t and the current vector w_t. The learning rate γ_t can be a positive scalar or, in the broader framework, a positive definite matrix acting on the direction. The main convergence arguments are presented with scalar rates.
E_z[H(z, w)] = ∇_w C(w)
E_z averages over the randomness used to form H at a fixed w, and ∇_w C(w) is the gradient of the cost there. C is the expected loss under the objective’s distribution. Uniform sampling from a fixed training set supplies an instance in which the right-hand side is the gradient of the empirical risk.
This last identity is the meaning of an unbiased direction in the paper. It permits individual directions that point uphill or have very different magnitudes. Its force comes from fixing the current parameters and then averaging. When the history determines the current vector and the next draw is independent of that history, the identity also gives the average direction specifically at the current stage of the run. The later bounds on moments, which measure powers of the direction’s magnitude, supplement that information about its mean.
For a mini-batch, several sampled observations form the event for a single step. Their average direction has the required mean when the individual directions do. For noisy gradient descent, the algorithm can use the cost gradient plus a random perturbation, provided that perturbation averages to zero in the relevant conditional calculation. These examples separate the definition of the objective from the mechanics of forming an estimate of its gradient. They also show why it is useful to state the proof in terms of H: different update procedures may have the same mean and different noise.
What common learning rules have in common
The adaline shows how a choice of training loss can make an update straightforward even when prediction uses a threshold. The system first computes a linear score from the input features. A constant feature folds the intercept into the parameter vector. At prediction time, a positive or negative score determines the class. In training, the correction is proportional to the residual between the target and the unthresholded score, multiplied by the input vector.
w_{t+1} = w_t + γ_t (y_t − w_tᵀ x_t) x_t
x_t is the input feature vector at iteration t, y_t is its desired response, and w_tᵀ x_t is the scalar product between the parameters and the input. The superscript ᵀ denotes transpose. The quantity in parentheses is the residual, and γ_t scales the correction to obtain w_{t+1}.
This delta rule is the gradient update for a squared residual with a normalization absorbed into the learning rate. It keeps receiving information about the score after the sign is right. A loss based only on the thresholded decision would be flat wherever small changes to the score leave the class unchanged. The squared residual supplies a derivative there and distinguishes among scores that make the same classification. Its objective is therefore defined on the numerical responses, even though the deployed decision depends on their signs.
A multilayer network uses a related strategy but keeps the nonlinear behavior between layers. If every threshold were treated as linear in training, the composition would also be linear. Bottou uses the hyperbolic tangent as a smooth approximation to a threshold. Larger coefficients can make its transition more abrupt. With these smooth elements, back-propagation computes how an error at the output depends on parameters through all the intervening layers.
Q_mse(z, w) = (1/2)(y − f(x, w))²
Q_mse is the squared-error loss with a factor of 1/2, which cancels the factor from differentiating the square. The event z contains the input x and target y, f(x, w) is the network response, and w contains its adjustable weights. The superscript ² denotes squaring. The example gives a way to compute a gradient on each observation, whether those gradients are used individually or combined in a batch.
The perceptron also predicts from the sign of a score, but its correction is tied to a mistake. Bottou recovers this rule from a loss that vanishes for a correctly classified example and charges a penalty proportional to the magnitude of the score for an incorrect example. The score therefore indicates how far the current response lies on the wrong side of the threshold. This differs in purpose from moving every score towards a prescribed numerical target.
Q_perceptron(z, w) = (sign(wᵀ x) − y)(wᵀ x)
Q_perceptron is the perceptron loss for event z, which consists of input x and class y. The class is +1 or −1. The scalar product wᵀ x is the score, and sign extracts its sign. The term sign(wᵀ x) − y is zero for a correct classification away from the boundary. On a mistake away from that boundary it produces the familiar correction in the direction of y x, with the factor 2 in the paper’s update convention.
This loss has a corner where the score is zero. It also takes its smallest value at the zero parameter vector, which gives zero scores for every observation. As a result, a low value of this objective needs to be interpreted alongside the classification problem. If the training examples admit a separating threshold, the paper describes a perceptron that can find a separation. The loss also explains how the weights can shrink toward zero when separation is unavailable.
When individual losses have corners
The perceptron’s corner motivates a distinction between the differentiability of the loss for one event and the differentiability of the average cost. For a fixed parameter value, an exceptional set of events may have probability zero. The gradient can then be computed on the other events, and the update can be set to zero on the exceptional set. This still leaves a question about the mean direction. Differentiating a loss for each event and then averaging has to agree with differentiating the averaged cost.
H(z, w) = ∇_w Q(z, w) if the derivative exists, and 0 otherwise
H is the update direction, z is the observed event, and w is the current parameter value. ∇_w Q is the loss gradient where it exists. The value 0 in the other case is the zero vector, which leaves the parameters unchanged.
Bottou gives a sufficient condition for exchanging the derivative and the average. At a parameter value reached by the algorithm, changes in the loss under nearby parameter perturbations must have a bound proportional to the size of the perturbation. The proportionality factor can depend on the event, as long as it is integrable under the event distribution. Roughly, that rules out a situation in which a few events have such large slopes that they defeat control of the average.
|Q(z, v) − Q(z, w)| ≤ ‖v − w‖ Φ(z, w) for v ∈ ϑ(w)
v is a nearby parameter vector, ϑ(w) is a neighborhood of w, and ∈ means membership in that neighborhood. The vertical bars measure the absolute difference between the two loss values. ‖v − w‖ is the length of the parameter perturbation, and Φ(z, w) is the integrable slope bound for event z at the point w. The condition is used together with the probability-zero requirement for events where the derivative fails.
K-means illustrates why this distinction matters. The parameters are a collection of centroids. An observation is represented by whichever centroid is closest, and the loss is the squared distance to that centroid. In the interior of a region where the nearest centroid is unique, a small parameter movement differentiates an ordinary squared-distance function. At a boundary between such regions, two candidates can exchange roles.
Q_kmeans(x, w) = min_{k=1,…,K} ‖x − w⁽ᵏ⁾‖²
Q_kmeans is the quantization loss for the observed point x, w is the collection of centroid vectors, and w⁽ᵏ⁾ is the centroid indexed by k. K is the number of centroids. The minimum takes the smallest squared distance over the indicated indices. Quantization here means substituting the chosen centroid for the original point.
With a unique winner, the online operation selects that centroid and moves it toward the observation. The learning rate absorbs the constant arising from differentiation. Centroids other than the winner keep their current values for this step. This makes the operation local in parameter space even though finding the winner compares the observation with the whole collection. A tie is the exceptional case. Whether ties have probability zero depends on the observation distribution and on the current centroid positions.
Learning Vector Quantization II gives the centroids class labels and uses them as reference points for classification. When an observation is misclassified, the rule compares the distance to the closest reference point overall with the distance to the closest reference point of the correct class. An update occurs only if that correct reference point is sufficiently close. A correct reference far away from the observation therefore plays a different role from one that nearly won the comparison.
‖x − w⁺‖² < (1 + δ) ‖x − w⁻‖²
x is the observation, w⁺ is the nearest reference point with the correct label, and w⁻ is the nearest reference point overall. The two norms give squared distances. δ sets the tolerance in the distance comparison, with 1 + δ multiplying the winning point’s squared distance. The inequality is applied in the misclassification case, when the two reference points differ.
When the rule activates, it pushes the incorrect winner away from the observation and pulls the correct reference point toward it. Bottou relates this behavior to a continuous loss that is zero for a correct classification, is saturated when the correct reference point is too far away, and varies with the relative distances between those cases. Its average gives a surrogate for the misclassification rate. Differentiation gives the same push and pull with distance-dependent coefficients. The correspondence explains the selection and direction of updates. An exact identification of step magnitudes requires accounting for the separate coefficients of the two movements.
Rescaling the direction with curvature
A scalar learning rate gives the same scale to every coordinate. Bottou also considers quasi-Newton updates, which use a matrix to approximate the effect of dividing by curvature. The Hessian is the matrix of second derivatives of a cost. Where this matrix describes an upward-curving objective, its inverse can enlarge a gradient step along a shallow direction and shrink it along a steep one. A matrix can also reorient the step when the curvature directions cut across the coordinate axes.
The linear least-squares example makes this construction concrete. At each step the learner receives an input and a numerical target. The aggregate squared-error cost for observations seen so far is quadratic in the weights. Under the half-squared-error normalization, its Hessian is the sum of the input outer products. Each input adds one such product, so the new curvature matrix can be obtained from the old matrix without revisiting the observations.
H_t = Σ_{i=1}^{t} x_i x_iᵀ
In this example, H_t denotes the accumulated Hessian and is distinct from the update function H(z, w) in the general algorithm. The index i runs over the inputs received through iteration t. x_i x_iᵀ is the outer product of the input vector with itself, and Σ adds these matrices.
Kalman-style recursion takes advantage of this structure to update the inverse curvature matrix. If the previous inverse is available, the arrival of one input changes it by a scaled outer product. The learner uses the resulting matrix to rescale its residual correction. This is cheaper than finding a new inverse from scratch at each step, although it still carries a full matrix whose size grows with the parameter dimension.
K_{t+1} = K_t − ((K_t x_t)(K_t x_t)ᵀ)/(1 + x_tᵀ K_t x_t)
K_t is the inverse curvature matrix before input x_t is incorporated, and K_{t+1} is the inverse after that incorporation. K_t x_t is a vector, the transposed factor in the numerator makes the numerator an outer product, and x_tᵀ K_t x_t is a scalar in the denominator. The formula presupposes a suitable initial inverse or an accumulated curvature matrix that can be inverted.
w_{t+1} = w_t + K_{t+1}(y_t − w_tᵀ x_t)x_t
Here w_t and w_{t+1} are the weights before and after the step, y_t is the target paired with input x_t, and y_t − w_tᵀ x_t is the prediction residual. The matrix K_{t+1} scales the residual direction after incorporating the newest observation into the curvature. For the quadratic problem, if the old weights minimize the previous aggregate loss, the new weights minimize the aggregate with the new observation included. The old gradient vanishes at the old solution, and a step using the new inverse curvature cancels the gradient contributed by the new observation.
For nonlinear squared-error learning, the true Hessian includes a term involving the residual and the second derivatives of the network response. The Gauss–Newton approximation drops this term and keeps the outer product of the first derivatives of the response. The retained contribution has non-negative curvature in every direction. With adequate curvature information it can be used to form an inverse, and its outer-product structure gives a reason to consider recursions similar to those for linear least squares. The exact minimization property depended on the linear problem’s quadratic cost.
∇²_w Q_mse(z, w) ≈ ∇_w f(x, w) (∇_w f(x, w))ᵀ
∇²_w takes the Hessian with respect to the parameters w, and ∇_w takes a gradient with respect to the same parameters. Q_mse is the squared-error loss for the event z, and f(x, w) is the response to x. The transpose creates an outer product of that response’s gradient. The approximation symbol ≈ expresses the omission of the curvature term involving the residual and the response’s second derivatives.
K-means gets a simpler curvature-based adjustment. In the analysis Bottou describes, each centroid’s scaling depends on how frequently it receives the winning assignment. The learner estimates this frequency through a count of the examples assigned to that centroid. The next sample changes the winning centroid’s count and uses the reciprocal of the updated count as the step size.
n_{t+1}⁽ᵏ⁾ = n_t⁽ᵏ⁾ + 1
k is the index of the centroid that won the assignment for x_t. n_t⁽ᵏ⁾ is its earlier assignment count, and n_{t+1}⁽ᵏ⁾ is its count after the current observation. The increment 1 incorporates that observation.
w_{t+1}⁽ᵏ⁾ = w_t⁽ᵏ⁾ + (x_t − w_t⁽ᵏ⁾)/n_{t+1}⁽ᵏ⁾
w_t⁽ᵏ⁾ and w_{t+1}⁽ᵏ⁾ are the winning centroid before and after the update, x_t is the new point, and n_{t+1}⁽ᵏ⁾ is the updated count. The numerator points from the centroid to the observation. Counting separately lets a often selected centroid settle more quickly in terms of the overall stream of observations, while a rarely selected centroid can still make substantial adjustments when it receives data. The rule averages observations according to the assignments made as the centroids move.
The proof when a unique solution attracts the updates
Bottou arranges the proofs around a Lyapunov criterion, a non-negative quantity whose behavior can certify progress. In the case with a unique minimizer, the quantity is the squared distance from the current parameters to that minimizer. Since the analysis asks whether the algorithm approaches the minimizer, this criterion directly addresses the desired outcome. The algorithm itself can operate without knowing the minimizer or measuring that distance.
h_t = ‖w_t − w*‖²
h_t is the Lyapunov criterion at iteration t, w_t is the current parameter vector, and w* is the unique minimizer. The norm measures Euclidean distance, and squaring it gives a quantity that is zero exactly at w*.
The essential geometric condition is that the gradient have an outward component relative to the minimizer, so the negative gradient has an inward component. The paper requires more than a positive component at each individual point. Everywhere beyond a fixed positive distance from the solution, the inner product in the condition must have a positive lower bound. This ensures continued progress if the iterates settle at some positive distance from the solution. Bottou calls this the convex case, but the directional condition is what the proof uses.
inf_{‖w − w*‖² > ε} (w − w*) · ∇_w C(w) > 0 for every ε > 0
inf is the greatest lower bound over the indicated parameter vectors w, and ε specifies a positive threshold on squared distance from w*. The dot denotes an inner product between the displacement from the minimizer and the gradient of C with respect to w. A positive value means that taking a small step against the gradient reduces squared distance at first order.
In the paper’s continuous comparison, the parameter vector moves along the negative gradient with time treated as a continuous variable. The derivative of squared distance is then proportional to the negative of that inner product. The distance declines as the trajectory proceeds. If it stayed bounded away from zero, the directional condition would make it decline indefinitely at a rate bounded away from zero, contrary to its nonnegativity. This comparison identifies the desired motion before the analysis introduces discrete steps or randomness.
dw/dt = −∇_w C(w)
dw/dt is the instantaneous velocity of the continuous trajectory w as a function of time t. The right-hand side is the negative gradient of the cost C at the current location. In this display t is continuous, whereas the subscripts on w_t and h_t elsewhere refer to iterations.
In discrete time, the squared distance contains a term from the finite length of the step. Taking a step whose direction is inward to first order can still increase the distance if it overshoots. This effect exists for batch descent as well. With random updates, the change in distance is itself random, and the algorithm can take an unfavorable step even when its conditional expected direction is favorable.
E[h_{t+1} − h_t | P_t] = −2γ_t (w_t − w*) · ∇_w C(w_t) + γ_t² E_z[‖H(z, w_t)‖²]
E[· | P_t] denotes conditional expectation given the information P_t available before the next draw. That history includes the current parameters w_t, the rate γ_t, and the earlier observations. h_{t+1} − h_t is the change in squared distance. w* is the minimizer, ∇_w C(w_t) is the mean update direction at the current vector, and E_z[‖H(z, w_t)‖²] is the second moment of the random direction. The first term, with factor −2γ_t, comes from the inner product of the old displacement with the step. The term scaled by γ_t² comes from squaring the step itself.
The second moment must grow slowly enough with the distance from the minimizer. This includes control of the variability across examples. A bound on the gradient alone would control only the mean direction. Bottou allows the bound on the second moment to grow with the current squared distance, so the allowed update magnitude can increase as the learner moves away from the solution.
E_z[‖H(z, w)‖²] ≤ A + B ‖w − w*‖²
E_z averages over the random event z, H(z, w) is the update direction at fixed parameters w, and ‖H(z, w)‖² is its squared length. A and B are non-negative constants. The quantity multiplying B is squared distance to w*. The bound permits a positive second moment even at the solution.
The learning-rate requirements address two different dangers. Large rates used for too long can make the positive contribution from discrete steps accumulate. Rates that shrink too rapidly can leave the learner with insufficient total movement. The theorem expresses these requirements through two infinite sums.
Σ_{t=1}^{∞} γ_t² < ∞
γ_t is the positive scalar learning rate at iteration t. Σ adds its squares from index 1 onward, and ∞ indicates that the series includes all future iterations. The inequality says that the total squared rate is finite.
Σ_{t=1}^{∞} γ_t = ∞
Here γ_t and t refer to the same rates and iterations. This time the unsquared rates are added, and equality to ∞ means that their series diverges. If the mean direction remains consistently inward and bounded away from zero in the relevant projection, the accumulated pull can overcome any fixed initial distance.
From expected changes to convergence on a run
To explain the stochastic proof, Bottou first considers a deterministic non-negative sequence. If all of its upward increments have a finite total, its downward increments also have a finite total magnitude. Otherwise the downward motion would eventually carry the sequence below zero. Both accumulated variations then have limits, which gives a limit for the sequence. Individual increases are compatible with this argument.
In the random case the next realized increment is unknown given the past. The proof classifies the increment by the sign of its conditional mean. A quasi-martingale convergence theorem supplies the corresponding result: for a non-negative process, summability of the expected positive conditional changes is sufficient for almost-sure convergence. Almost sure means that the conclusion holds for sampling paths with total probability 1 under the assumed draw process.
Σ_{t=1}^{∞} E[(E[u_{t+1} − u_t | P_t])₊] < ∞
u_t is a non-negative random process, u_{t+1} − u_t is its increment, and P_t is the pre-update history. The inner E averages the increment conditionally on that history. The subscript ₊ takes the positive part of the resulting conditional mean. The outer E averages that positive part over histories, and the series sums these contributions over iterations t. Taking the positive part after conditioning makes this a criterion about predictable upward drift. A run can still contain many realized upward movements.
The second-moment bound leaves a term proportional to the current squared distance times the squared rate. Bottou removes that growth term by rescaling the distance with a product. In effect, the product discounts the possible multiplicative increase allowed at each step. The total discount is finite in the sense that the product tends to a strictly positive limit, because the summed squared rates are finite. A limit for the rescaled distance therefore gives a limit for the original distance.
μ_t = ∏_{i=1}^{t−1} (1 + B γ_i²)⁻¹
μ_t is the rescaling factor before step t, ∏ multiplies factors for earlier steps indexed by i, and B is the growth coefficient from the moment bound. γ_i² is the squared rate on step i, and ⁻¹ takes the reciprocal of the corresponding factor. The updated rescaling μ_{t+1} includes the possible growth factor for step t.
The quasi-martingale argument establishes that the distance has a limit. The proof then retains the favorable drift in the same bound. Its learning-rate-weighted total is finite: the non-negative distance cannot supply an unlimited amount of decrease, and the rescaled upward contribution is summable. Were the limit of the distance positive, the gradient condition would give a persistent inward component away from the minimizer. The sum of the unsquared rates would then make the total favorable drift infinite. This rules out a positive distance limit.
w_t → w* almost surely as t → ∞
w_t is the random sequence of parameter vectors, w* is the unique minimizer, and the arrows express its limiting value as the iteration index t grows without bound. The result uses the directional condition, the second-moment bound, and both learning-rate conditions. Bottou also notes that the distance proof can use a directly specified mean update field with the required inward projection. In that formulation, the field need not be introduced as the gradient of a differentiable cost.
Confinement and stationarity for a general cost
A general cost can have several minima, and the learner can move between regions attracted to different ones. Squared distance to a chosen solution then starts with a difficulty: the analysis has yet to establish that the algorithm is heading for that solution. Bottou changes the quantities being followed. He first controls the size of the parameters, then uses the cost to establish progress, and finally studies the squared gradient to determine what kind of stopping behavior follows.
The general result takes a lower-bounded cost with three continuous derivatives. A constant shift can put its lower bound at zero without changing the gradient or the parameter updates. The scalar learning-rate conditions remain the same. In the general proof, the added conditions bound the update’s moments of orders two through four and make an assumption about which way the mean update points at points far enough from the origin.
E_z[‖H(z, w)‖ᵏ] ≤ A_k + B_k ‖w‖ᵏ for k ∈ {2, 3, 4}
k is the order of the moment and takes the values 2, 3, and 4. E_z averages over the event z. ‖H(z, w)‖ᵏ is the length of the update direction raised to the indicated power. A_k and B_k are constants for that order, and ‖w‖ᵏ measures the allowed growth with the length of the parameter vector. Higher moments help bound contributions from unusually large steps.
inf_{‖w‖² ≥ D} w · ∇_w C(w) > 0
D is the threshold on squared distance from the origin, w · ∇_w C(w) is the radial inner product, and inf takes its greatest lower bound over vectors whose squared length reaches the threshold. The positive lower bound means the negative gradient has an inward projection there. The origin plays the role of a reference for bounding the parameters and need not be a minimizer.
To prove confinement, Bottou monitors a quantity that is zero inside the threshold and grows as the square of the excess outside it. This criterion ignores motion within the inner region. Outside, it makes large excursions more expensive in the analysis and exposes terms involving higher powers of the step. The inward mean direction gives favorable first-order drift precisely where the criterion is sensitive.
f_t = (‖w_t‖² − D)₊²
f_t measures the excursion at iteration t, w_t is the current vector, and D is the threshold on squared length. The positive-part operation ₊ sets negative excesses to zero. The outer square makes the criterion quadratic in the positive excess of the squared length.
Expanding the change in this criterion yields terms involving the second through fourth powers of the update magnitude. The moment assumptions bound their conditional means. These terms have at least the square of the learning rate as a factor, and their allowed growth can be bounded by a constant plus a multiple of the criterion itself. The inward radial drift makes the remaining first-order contribution nonpositive. This gives the same form of multiplicative bound as in the distance proof.
E[f_{t+1} − f_t | P_t] ≤ γ_t²(A + B f_t)
f_t and f_{t+1} are the excursion criterion before and after step t, P_t is the information before the draw, and E[· | P_t] averages over the next event conditional on that information. γ_t² is the squared learning rate. A and B are bounds for this argument, which may differ from the constants in the unique-minimum proof.
The product rescaling and quasi-martingale theorem give a limit for the excursion criterion. If the limit were positive, the iterates would eventually stay sufficiently far outside the threshold that the inward projection produces persistent weighted decrease. The divergence of the sum of learning rates rules that out. For the cost analysis, the essential consequence is boundedness. With probability 1 each trajectory stays in some bounded region, whose size can depend on the draws along that trajectory.
Why the gradient itself tends to zero
Once the iterates are confined, the cost is the next criterion. A Taylor expansion describes how the cost changes after a step. Its first-order term pairs the realized update direction with the gradient. Under conditional expectation the direction becomes the gradient, giving a decrease proportional to the squared gradient length. Terms left over by the first-order approximation have a bound involving the squared learning rate, the update’s second moment, and curvature on the region in use.
h_t = C(w_t)
h_t is now the cost criterion, C is the lower-bounded cost shifted to be non-negative, and w_t is the parameter vector at iteration t. In this part of the proof h_t measures objective value. The earlier criterion with the same letter measured distance to a known minimizer.
The conditional increases of the cost are controlled by a summable bound. The quasi-martingale argument therefore gives convergence of the cost. Keeping the favorable drift term in the estimate also bounds the learning-rate-weighted sum of the squared gradients. To see the connection, consider summing the expected changes over many updates. The cost cannot continue dropping below its lower bound, and the squared-rate corrections have a finite total. There is only a finite budget for the weighted decreases.
Σ_{t=1}^{∞} γ_t ‖∇_w C(w_t)‖² < ∞ almost surely
γ_t is the rate, ∇_w C(w_t) is the cost gradient at the current vector, and ‖·‖² measures its squared length. Σ runs over all iterations t starting at 1. The sum is finite for paths with total probability 1. This still permits a sequence with occasional large gradients occurring at indices where the combined learning rates are small.
The last step addresses that possibility directly. Bottou treats the squared gradient as its own non-negative process. Taking its derivative brings in the Hessian. Expanding its change under a step, then taking the conditional expectation, gives a first-order term controlled by the weighted squared gradient and a second-order remainder controlled by the squared rate. Continuity of the third derivatives of the cost is used in bounding the remainder for this new criterion.
g_t = ‖∇_w C(w_t)‖²
g_t is the squared gradient criterion at iteration t, ∇_w C(w_t) is the gradient with respect to the parameters evaluated at w_t, and the squared norm takes its squared length. The positive expected changes of this criterion are bounded using the weighted-gradient sum and the squared-rate sum. Both contributions are summable, so the quasi-martingale theorem gives a limit for g_t.
The limit must be zero. If it were positive, the squared gradient would eventually stay above a positive threshold, and the infinite total of the learning rates would make the weighted-gradient sum diverge. Thus the convergence of the cost, the finiteness of the weighted sum, and the convergence of the squared gradient do distinct jobs in the proof. The first provides a stable quantity for measuring descent, the second limits how much sustained descent can remain, and the third turns that limit into a statement about every sufficiently late step.
∇_w C(w_t) → 0 almost surely as t → ∞
∇_w C(w_t) is the gradient vector at the current parameters, 0 denotes the zero vector, and t → ∞ refers to increasing iteration count. The result constrains the positions of the late iterates to regions where the gradient is small. If a subsequence of bounded iterates approaches a parameter vector, continuity of the gradient makes that vector stationary. Several stationary vectors can share a cost value, so a cost limit and vanishing gradients can coexist with more than one candidate limit for the parameters.
Experiments and results
The paper’s evidence consists of proofs, worked algorithm examples, and qualitative reports of earlier comparisons. It introduces no benchmark dataset, train or test split, numerical baseline score, or new measured run. Its figures describe algorithms and proof concepts. The diagram of batch descent shows a gradient computed on an entire training set, while the online diagram shows updates from observations. The convergence figures illustrate positive increments of a sequence and regions where the gradient can become small.
The numerical comparison below concerns a stated requirement of the convergence results. It shows the highest update-moment order explicitly bounded in each case. Lower on this axis means that the moment assumptions stop at a lower order. The cases have different geometric assumptions and different conclusions, so the chart cannot rank the theorems by overall strength.
Highest update-moment order required by each convergence proof
The unique-minimum proof requires control of fewer update moments than the general-cost proof.
The numbers
| System or setting | moment order |
|---|---|
| Unique-minimum convergence (this paper) | 2 |
| General-cost convergence | 4 |
Under the unique-minimum condition, the outcome measured by the proof is distance in parameter space. The result is convergence to the minimizer with probability 1 over the draws, assuming the learning-rate and update-moment conditions. That probability describes the theorem’s guarantee for the random sequence. It is not a proportion of successful runs estimated from data. Under the general-cost conditions, the relevant quantities are boundedness of the parameter trajectory, convergence of objective value, and convergence of the gradient to 0. The value 0 is the limiting gradient, so it supplies no numerical estimate of the attained cost or of classification error.
The application examples give those abstract quantities different meanings. In supervised squared-error learning, the cost averages errors in the numerical response. For K-means, it averages the squared distance incurred by substituting the winning centroid for the observation. For Learning Vector Quantization II, Bottou constructs a continuous approximation to the cost of misclassification. Those applications share update geometry and proof techniques. Their losses have different meanings and are never compared as measurements on a common scale.
The paper also describes earlier evidence that online training can make faster progress than batch training on large, redundant datasets. It gives an intuitive explanation using a training set made of repeated copies of the same observations. A batch calculation repeats gradient evaluations at the same parameter vector. An online calculation can use the repetitions to change the vector again. The paper provides no timings, named dataset split, or numerical speed comparison for that illustration. The example isolates redundancy as a reason the cost of an entire batch step can be poorly matched to the progress it produces.
The discussion of K-means reports another qualitative comparison from earlier work. Online updates with assignment-count scaling can locate the relative positions of clusters quickly, while the randomness of the updates slows late refinement. The paper describes evidence favoring an online phase followed by batch refinement with a faster terminal convergence method. The objective in that discussion is quantization error and the comparison concerns the speed of optimizing it. The paper gives no numerical quantization errors, elapsed times, or protocol for choosing the switch.
The Kalman-style example yields an exact result of a different sort. In the linear quadratic setting, the recursive update can recover the minimizer of the loss accumulated through the latest observation. The scalar delta rule gives a gradient correction for the latest residual. The recursive curvature matrix lets the Kalman-style rule account for the response of the whole accumulated quadratic objective to that correction. This is a mathematical comparison of the two updates, and exact minimization there concerns the observed data. Predictive performance on fresh observations is a separate quantity.
What the ablations show
The paper contains no empirical ablations, and instead uses mathematical comparisons to isolate the roles of discretization, sampling noise, learning rates, curvature, and confinement.
Discrete steps and sampling noise have distinct effects
The continuous and batch arguments expose the effect of replacing smooth motion with a sequence of finite steps. The continuous criterion changes according to an inner product between the gradient and the displacement. The batch criterion acquires an extra positive term from the squared step length. With the full gradient in hand, a discrete update can still be sufficiently large to overshoot. This comparison explains why the condition on squared learning rates appears in the discrete analysis.
The comparison between batch and online descent then holds the mean direction fixed while changing the second-order term. The batch term uses the squared gradient. The online term uses the expected squared update, which can be split into the squared mean and the variance around that mean. At a minimizer the true gradient vanishes, but observations can still suggest individual corrections. Their cancellation in the average leaves a positive variance whenever those corrections disagree.
E_z[‖H(z, w)‖²] = ‖∇_w C(w)‖² + var_z H(z, w)
H(z, w) is the random update at parameters w, E_z averages its squared length over z, and ∇_w C(w) is its mean under the unbiasedness condition. var_z H(z, w) denotes the average squared length of the deviation from that mean. The identity displays the noise contribution even when w is at a point with zero gradient.
This comparison explains the tension in the learning-rate schedule. A rate small enough to limit the motion caused by that remaining variance can also limit how fast the learner corrects its remaining error. The paper’s analysis of the terminal phase relates the size of the expected distance changes to the remaining inward drift and the scaled variance. Its use of this comparison is local to the approach to a solution. No single speed across all phases of learning follows from the balance.
Curvature changes the step without changing the target
The scalar and matrix comparisons isolate the geometry of the correction. A single scalar usually has to accommodate the directions where the cost changes most steeply. A suitable inverse-curvature matrix can allow larger progress in directions where it changes slowly. In Kalman-style least squares, the example makes this effect especially easy to interpret because the second derivatives of the quadratic objective are known from the accumulated inputs.
K-means supplies a comparison within a simpler update rule. The usual online move corrects the winning centroid using a supplied learning rate. The count-based move uses a rate determined by that centroid’s assignments. The direction is still towards the observation and the other centroids still receive no correction. What changes is the scale of the movement for centroids with different assignment histories. This is a way to relate curvature to observed frequencies. The noise of the random assignments and observations remains part of late convergence.
A surrogate determines which errors drive learning
The adaline and the perceptron both lead to a thresholded decision, so their training rules clarify how much the selected loss matters. The adaline adjusts a numerical score towards a target even if the score already has the desired sign. The perceptron uses an error-triggered update. A thresholded misclassification loss, by comparison, makes most small perturbations invisible. The paper’s worked losses explain how different criteria can make useful parameter changes visible while preserving the underlying threshold decision.
The K-means and vector-quantization examples also separate smoothness of the averaged cost from smoothness on particular inputs. The nearest-centroid rule creates boundaries where a competing representative takes over. The average may have a usable derivative under the paper’s assumptions even though individual terms have corners. This analysis identifies which part of the objective needs regularity for the general gradient proof and which part can tolerate exceptions.
The target of convergence changes with the criterion
With a known unique destination for the analysis, squared distance records the desired result directly. With multiple plausible destinations, a proof based on the cost can follow progress without making an early commitment about where the parameters will end up. The tradeoff is that many configurations can share a cost, and small gradients can occur near points of very different quality. The parallel proofs show exactly where the stronger conclusion in parameter space comes from: a uniform inward projection toward the chosen minimizer. In the general argument the inward condition serves the different purpose of preventing escape at large parameter norms.
Limitations
Limits Bottou identifies
The general-cost theorem gives cost convergence and vanishing gradients under its assumptions. The paper explicitly includes saddle points, local maxima, and flat regions among the possibilities compatible with that conclusion. Noise can help a trajectory leave an unstable point if it perturbs the parameters in a direction that leads away. Online sampling can produce noise concentrated in particular directions, however. The mean-update and moment conditions do not guarantee that the noise has a component in every direction needed for escape.
The inward condition at large parameter norms is a substantial restriction. Bottou uses the sigmoid example to show how it can fail. A network trained toward targets at the asymptotic values of its sigmoid can make its outputs closer to those targets by continuing to increase the magnitude of parameters. The objective and gradient can appear to settle while the parameter sequence continues drifting. The confinement result addresses precisely that failure mode. The paper discusses choices such as targets inside the asymptotes and a small linear adjustment to the sigmoid in response to this issue.
The sampling assumption also matters. The main analysis uses independent draws from a single distribution. Traversing a training set in a fixed sequence can be convenient, but the next example is then determined by where the learner is in that sequence. Averaging over the possible examples no longer describes the next conditional update in the same way. Bottou points to stochastic approximation tools for Markovian sampling and leaves that extension outside the main proof. Similarly, the adaptive autopilot example gives a reason to process data online. Tracking changing conditions raises a question beyond convergence for a fixed distribution and a step size that diminishes.
The paper distinguishes terminal convergence speed from the speed of progress over a long trajectory. The end-phase analysis relates noise, step size, and curvature near a solution. It leaves open a general account of the broader trajectory of online learning. Bottou cites the analysis of multilayer learning by Saad and Solla as progress in restricted cases. The paper also observes that the precision of a highly refined training-set solution can have little value when the objective itself is a finite-sample approximation.
Limits visible in the setup
The two convergence theorems are conditional statements about a class of updates. Expressing an algorithm in the common form establishes a connection to the framework. Applying a particular theorem still requires verifying its assumptions for that algorithm, objective, and sampling process. For example, when a loss is nonsmooth on assignment boundaries, the argument for ignoring those boundaries relies on their probability at the current parameter value. A finite sample can put positive mass on a tied observation. In such a case the tie rule and the differentiability of the empirical objective require separate attention.
The same issue appears in the examples with curvature estimates. A matrix that is well suited to the objective late in a run can provide poor scaling earlier, especially if the observed inputs have yet to supply enough information in some directions. The inverse in the linear recursive derivation presupposes invertible curvature or appropriate initialization. The matrix discussion gives the optimization motivation and recursive form. The general theorem’s scalar learning-rate schedule cannot simply be substituted for checks on the behavior of an adaptive matrix schedule.
There is also a distinction between a bounded sample path and a uniform bound shared by all possible sample paths. The confinement argument gives the former. It allows derivative bounds on a ball containing that path, since the parameter space is finite-dimensional and the cost derivatives are continuous. In reading the conditional Taylor estimates, care is needed about the next step and where the derivative bounds apply. A proof can make this precise by working on fixed bounded regions with stopped or localized processes, then using confinement to cover almost every whole path. Treating the random bounds supplied by confinement as deterministic constants inside an expectation would skip that step.
The uniqueness condition is what turns a diminishing distance into a statement about a specific parameter vector. A lower-bounded smooth cost with a flat set of stationary parameters can provide little information about motion along that set. The general result still restricts the limit of the cost and the locations of accumulation points, but it does not select a representative parameter vector within a stationary set. Convergence of the parameters to a single point would require further information about the objective or the dynamics.
Finally, optimizing the empirical loss on a fixed training set establishes a property relative to the discrete distribution over those examples. It says nothing by itself about the discrepancy between that distribution and the population of future observations. A very accurate recursive least-squares fit can therefore coexist with poor generalization. Bottou invokes empirical risk theory to explain how that separate question can be addressed, while the results here identify the behavior of the optimizer under its own objective and sampling assumptions.
What came after
The later citations span neural-network training for language tasks and learning from a continuing stream. Their titles identify the application problems, while the citations establish a connection to Bottou’s work on online optimization. The application details of that connection differ in how directly they can be inferred from each problem.
One citing paper studies semantic similarity between sentences using convolutional neural networks and multiple perspectives on the comparison. The point of contact is the optimization of adjustable network weights, the setting for which Bottou’s multilayer example connects an observation-level training loss to an average objective. The citation by itself leaves open the precise optimizer, sampling procedure, and relationship to the convergence conditions. Multi-Perspective Sentence Similarity Modeling with Convolutional Neural Networks
Another citation comes from work on task-free continual learning. Its subject is close to one of the distinctions Bottou draws at the outset: a system can keep updating as observations arrive, so its objective and update procedure have to be understood in relation to that stream. Bottou’s theorem provides a fixed-distribution case against which to understand the theoretical question. The citation leaves unspecified which assumptions carry over to the later task-free setting. Task-Free Continual Learning
A third paper studies discourse analysis through entity-augmented distributed semantics for discourse relations. Here the subject is how to represent information relevant to a relation between stretches of text. Bottou’s paper addresses a complementary question about the behavior of successive parameter updates once a representation and learning objective are specified. The citation establishes that the later work drew on the paper, while the role of the citation in its learning procedure remains unspecified. One Vector is Not Enough
Cite
Cite as Léon Bottou. 1998. Online Learning and Stochastic Approximations. On-line Learning in Neural Networks, Cambridge University Press.
@inproceedings{bottou1998online,
title = {{Online Learning and Stochastic Approximations}},
author = {Léon Bottou},
booktitle = {On-line Learning in Neural Networks, Cambridge University Press},
year = {1998},
url = {https://leon.bottou.org/papers/bottou-98x}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/bottou-1998-online-learning-stochastic-approximations/