Averaged stationarity bound for stochastic gradient descent Created 2026-10-25 Updated 2026-11-05
Suppose a fixed-step size stochastic gradient descent iteration satisfiesand has a global minimizer . Taking expectations and forming a telescoping sum proves the displayed bound with and deterministic . The Cauchy-Schwarz inequality then bounds the averaged, or the best, expected gradient Euclidean norm by . This is a guarantee of stationarity in the indicated senses, rather than a last-iterate convergence assertion. The additive is a stochastic gradient noise floor.
Target: real-analysis.bigb, under Strongly convex function. Backtracking line search 2026-10-24
Start with a trial step size and repeatedly replace by , with , until the Armijo condition holds. For a differentiable function and a descent direction, the short-step argument in the Armijo condition proves finite termination. This alone does not enforce the curvature part of the Wolfe conditions.
Cauchy decrease bound 2026-10-25
Use the induced spectral norm for the symmetric matrix and interpret when . If , the Cauchy point gives a decrease at least . If , its step size satisfies and , soThus the numerical constant is independent of the model data. The bound links a nonzero gradient to a definite predicted decrease, including for an indefinite matrix .
Cauchy point 2026-10-25
Let , and for the transformed symmetric positive-definite matrix. Then preconditioned steepest descent satisfiesThis is a worst-case bound, not necessarily the actual rate. For our scaled example the bound is , slightly above its computed factor . If the initial transformed error is an eigenvector, exact line search for a positive-definite quadratic removes it in one step, regardless of the full condition number.
A short proof compares exact line search for a positive-definite quadratic with the trial step size in the transformed coordinates. In an orthonormal eigenbasis of , each error coefficient is multiplied by , whose absolute value is at most . Summing times the squared coefficients bounds the trial energy by the square of this factor. The exact minimizing step size does at least as well. This also explains the terminating case : the trial step removes the entire error in one iteration.
Suppose is a differentiable convex function with coordinate Lipschitz continuity constant . Put , the Bregman divergence from the supporting affine function at . The subgradient inequality gives , and its coordinate Lipschitz constant is still . The coordinate descent lemma with step size yieldsSince , rearrangement proves the bound. Continuous differentiability suffices; a Hessian matrix is unnecessary.
Target: gradient-descent.bigb, under Lipschitz gradient. Coordinate Lipschitz continuity 2026-10-25
The displayed estimate, for all and real , defines a coordinate Lipschitz constant for the partial derivative in coordinate . It implies the coordinate descent lemmaby the fundamental theorem of calculus and integration of the Lipschitz continuity estimate. Subtracting an affine function leaves these constants unchanged.
The apparently weaker estimate along the singleton negative gradient direction is equivalent when every real step size is allowed: if the initial partial derivative is nonzero, any displacement can be written ; if it is zero but the final partial derivative is nonzero, reverse the endpoints; if both vanish the estimate is trivial.
Target: gradient-descent.bigb, under Lipschitz gradient. Delayed solutions of a square-root differential equation Created 2026-10-14 Updated 2026-10-20
This initial value problem uses a square root and absolute value to define a continuous function on all of . For every finite waiting time , a forward solution of a differential equation on isThe constant solution of a differential equation is another choice. For example, at , waits give values . These are dimensionless mathematical trajectories; no measured physical waiting time is being supplied.
Verification uses the original ordinary differential equation, including the join. Before departure, both and vanish. For , their common value is . For , the difference quotient at the join isThus the derivative exists at , equals the rate law there, and is continuous across the join. For the same computation gives the right derivative at the starting endpoint. For , the left and right second derivatives at departure are and : these forward solutions of a differential equation are continuously differentiable functions, without being twice differentiable at departure. The local two-sided statement of the Peano existence theorem is separate from this explicitly forward family.
The rate law tends to zero as , but its secant slopes from zero are unbounded:No finite local Lipschitz constant exists at zero. At the quotient is , even though the rates are shrinking to zero. Continuity controls the rate itself; Lipschitz continuity would control its change relative to the state displacement.
There is also a numerical lesson. The forward Euler method starting exactly at zero gives at every step. It reproduces the constant solution of a differential equation for every positive step size, while the moving trajectories remain equally valid. A computation producing one trajectory cannot establish uniqueness. Likewise, the separable differential equation calculation that divides by only describes the moving pieces: checking the original equation recovers the zero pieces and their joins.
Descent lemma Created 2026-10-06 Updated 2026-10-25
Suppose is a differentiable function on an open convex set and has an -Lipschitz gradient there, in the Euclidean norm. For , the descent lemma statesA bounded continuous Hessian matrix gives one sufficient route to this estimate.[ref]
For a short proof, put . The fundamental theorem of calculus along the line segment givesThe Cauchy-Schwarz inequality and the Lipschitz gradient bound make the integrand at most ; its integral is . This proof needs no assumption that is a convex function.
For the gradient descent update , provided , substitution yieldsFor and , this ensures strict decrease whenever the gradient is nonzero. At it guarantees only nonincrease; the quadratic example has a nonshrinking alternating component at this endpoint. At the guaranteed decrease is . A bound valid only on cannot justify a step leaving .
If a fixed admissible step size is used forever, every iterate stays in , and has a finite lower bound, summing this inequality shows , hence . That conclusion alone gives neither convergence of the iterates nor a global minimum. For example, the smooth polynomial has and : gradient descent started at zero never moves, although . On , , so the Lipschitz gradient hypothesis holds on this domain. Convex functions and strongly convex functions provide additional structure; the exact quadratic convergence result above uses a positive-definite matrix.
Dissipative vector field 2026-10-05
A real vector field is dissipative in an inner product iffor all . Two solutions of the ordinary differential equation satisfyThus their distance never increases. The linear case recovers the dissipative operator condition. B-stability asks whether a Runge-Kutta method preserves this contraction for every positive step size.
Exact line search Created 2026-10-24 Updated 2026-10-31
A line search that finds a global minimizer along the chosen ray, provided one exists. For a negative gradient direction, its decrease in the objective function is at least that of any admissible fixed step size. The cost of solving this one-dimensional minimization problem must be included when comparing computation time.
Target: vector-space.bigb, under Vector subspace. Existence of a Wolfe step 2026-10-25
Suppose is continuously differentiable, is a descent direction, and is bounded below for . A positive step size satisfying the weak Wolfe conditions exists. To prove this, put , , and . The Armijo condition proof shows just to the right of zero. Boundedness below gives . Consequently there is a first positive zero , with on . By the mean value theorem, some satisfiesAt , gives the Armijo condition, and the displayed derivative gives the weak Wolfe conditions.
Fixed-step gradient descent on a positive-definite quadratic Created 2026-10-18 Updated 2026-10-25
Consider the original two-dimensional exampleThe Hessian matrix is , a symmetric matrix and positive-definite matrix. Its eigenvectors are the coordinate directions, its eigenvalues are and , and its Euclidean norm condition number is . The unique global minimum is , so the error equals . The linear map , with the identity matrix, givesFor , the two coordinate error multipliers are and . Consequently , , and the second coordinate changes sign at every step while both shrink. The Euclidean norm of the error contracts by each step. The objective gap, which we call the quadratic energy, contracts by its square:The level sets of are ellipses. Oscillation across their narrow direction is compatible with strictly decreasing energy.
Original gradient descent iterates on : step size contracts both directions, whereas expands the second
. Details. For , the coordinate error multipliers become and , giving . The first coordinate still tends to zero, but the second alternates and grows. Direct substitution givesThus a larger positive step size can turn a strictly convex function into a divergent iteration. Energy and error are different quantities: coordinate errors carry signed multipliers, while each coordinate's contribution to energy carries the squared multiplier.
For the general quadratic form with linear termthe error obeys the same linear map . The spectral theorem for real symmetric matrices supplies an orthonormal basis of eigenvectors with positive eigenvalues . Writing gives the exact solution and energy identityTherefore convergence from every initial vector is equivalent toAt , a nonzero error component along a largest-eigenvalue eigenvector flips sign without shrinking. Above that threshold it grows. A particular start can still converge if it has zero components in every unstable direction; the interval is the condition for all starts. If , then and . These bounds follow by summing the squared components in the orthonormal basis.
Gradient accumulation 2026-11-05
Gradient accumulation combines gradient contributions from several processed mini-batches before one optimizer update. Parameters stay fixed while those contributions are evaluated. With consistent normalization, an additive per-example loss function can therefore use an effective batch size larger than the group processed at once.[ref]
Automatic Mixed Precision examples in the PyTorch documentation. Gradient accumulation subsection and example loop
For an original example, let per-example scalar gradients be at the same parameter value. Process the first two together and the last separately. Their means are 2 and 8. The combined per-example mean isThe unweighted mean of group means is 5 and gives the smaller group too much weight. One implementation accumulates each group's summed loss divided by the total example count, then performs one update.
Accumulation is also different from consecutive updates. Let , with , starting at and using step size . One accumulated mean-gradient step gives . Updating first on the two-example mean gives ; the last example then has gradient , and a second step gives .
The distinction is where the gradients are evaluated. Agreement with one larger group requires fixed parameters and compatible model state, additive losses and consistent weighting. A method whose calculations depend on the whole group can violate those assumptions. State whether batch size denotes a processed group or the complete set contributing to an update.
Gradient descent Created 2026-09-24 Updated 2026-10-18
Gradient descent is an iterative method for minimizing a differentiable function : choose an initial vector and repeatedly move opposite its gradient.[ref]
With a fixed positive step size , the update isThe direction and the step size play different roles: the gradient supplies local information about increase, while determines how far that information is trusted. A varying step size gives instead; exact line search for a positive-definite quadratic chooses it by minimizing along the current direction.
Why is this the steepest direction? For a unit vector in the Euclidean norm, the directional derivative is . The Cauchy-Schwarz inequality bounds it below by , attained by when the gradient is nonzero. This is steepest descent relative to the Euclidean norm; changing the norm can change the steepest direction. A finite step need not decrease , because a directional derivative describes infinitesimal motion.
For the quadratic form with linear term , assuming is a symmetric matrix, the negative gradient is the linear-system residual . Thus gradient descent turns the linear system into repeated residual corrections; a positive-definite matrix makes its solution the unique global minimum. This is useful when applying the linear map is affordable but directly solving the linear system is costly.
The attraction is that a gradient evaluation gives an entire update without solving a new linear system. The difficulty is choosing a step size that progresses along gently curved directions without overshooting steep ones. Fixed-step gradient descent on a positive-definite quadratic makes this tension exact: every eigenvector direction has its own multiplier, determined by its eigenvalue. The resulting condition number dependence explains why a narrow valley can slow even an inexpensive iterative method.
The simplicity of the gradient update and its sensitivity to the condition number of the Hessian matrix are central practical features.[ref]
Convex Optimization by Stephen Boyd and Lieven Vandenberghe. §9.3.1, pp. 466–468, and §9.3.2, p. 475, Conclusions: convergence and conditioning
Gradient descent preserves an eigenline for a cubic product Created 2026-10-25 Updated 2026-10-31
Let be real symmetric, let be a unit eigenvector satisfying , and use scalar step sizes . The gradient of the displayed cubic polynomial function isOn the eigenline, , so a gradient descent update remains on that same line and obeys the scalar recurrence in the title. Induction proves invariance for every iterate starting on the line, including an iterate that reaches zero. This is a statement about the geometry of the updates, not a convergence theorem: when , the restriction is unbounded below in one direction.
Gradient flow Created 2026-09-24 Updated 2026-11-05
For a smooth real function on Euclidean space, its downward gradient flow is the ordinary differential equation . The chain rule givesThus is a Lyapunov function, and a nonstationary trajectory cannot return to its starting point. For , the solution is . The explicit Euler method gives , namely gradient descent. The continuous decrease does not guarantee decrease for every discrete step size; even this quadratic example requires for strict contraction.
Line search Created 2026-10-20 Updated 2026-10-24
A line search chooses a positive step size along a search vector , updating to . For a differentiable function , a descent direction makes sufficiently short steps decrease the objective function; an Armijo condition quantifies the decrease, while the Wolfe conditions also prevent accepting an unnecessarily short step.
Optimal fixed step for quadratic gradient descent Created 2026-10-18 Updated 2026-10-31
For a fixed symmetric matrix and positive-definite matrix , what positive step size minimizes the largest coordinate error multiplier over all eigenvector directions? Let and . Since is a convex function of , its maximum over the eigenvalues occurs at an endpoint:Balance the two extremes by solving :Here is the Euclidean norm condition number of . This balance is optimal: for the endpoint exceeds , and for the endpoint exceeds . The optimal worst-case energy factor is , rather than . This optimizes a uniform one-step bound; a particular initial error supported on fewer eigenvectors can have a different best step size.
In the example , , so and . Both eigenvalue directions attain that energy factor, making the displayed history exact. The smaller step size instead givesIts first step reaches , below for , but subsequent progress is limited by the first direction's energy factor . By , the energies are approximately and , respectively; by , the iteration is ahead. A better first step need not yield a faster long-run history.
As the condition number grows, approaches one: stability in the direction of the largest eigenvalue forces small movement along the smallest-eigenvalue direction. This is a precise reason to improve scaling or use a method such as the conjugate gradient method, rather than merely increasing the step size. When , choosing eliminates every error component in one step.
Past exam of the continuous optimisation course of the University of Oxford 2025 1 a Solution 2026-10-25
Fix an iteration and abbreviate , , . Since is a descent direction, . The directional derivative givesChoose so that for . ThenThis is the Armijo condition for every such positive step size, and gives equality. In particular, a backtracking line search terminates after finitely many reductions.


