Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Gradient descent

From Wikipedia, the free encyclopedia
Optimization algorithm
For the analytical method called "steepest descent", seeMethod of steepest descent.
Part of a series on
Machine learning
anddata mining
Gradient descent in 2D

Gradient descent is a method for unconstrainedmathematical optimization. It is afirst-orderiterativealgorithm for minimizing adifferentiablemultivariate function.

The idea is to take repeated steps in the opposite direction of thegradient (or approximate gradient) of the function at the current point, because this is the direction of steepest descent. Conversely, stepping in the direction of the gradient will lead to a trajectory that maximizes that function; the procedure is then known asgradient ascent.It is particularly useful inmachine learning for minimizing the cost or loss function.[1] Gradient descent should not be confused withlocal search algorithms, although both areiterative methods foroptimization.

Gradient descent is generally attributed toAugustin-Louis Cauchy, who first suggested it in 1847.[2]Jacques Hadamard independently proposed a similar method in 1907.[3][4] Its convergence properties for non-linear optimization problems were first studied byHaskell Curry in 1944,[5] with the method becoming increasingly well-studied and used in the following decades.[6][7]

A simple extension of gradient descent,stochastic gradient descent, serves as the most basic algorithm used for training mostdeep networks today.

Description

[edit]
Illustration of gradient descent on a series oflevel sets

Gradient descent is based on the observation that if themulti-variable functionf(x){\displaystyle f(\mathbf {x} )} isdefined anddifferentiable in a neighborhood of a pointa{\displaystyle \mathbf {a} }, thenf(x){\displaystyle f(\mathbf {x} )} decreasesfastest if one goes froma{\displaystyle \mathbf {a} } in the direction of the negativegradient off{\displaystyle f} ata,f(a){\displaystyle \mathbf {a} ,-\nabla f(\mathbf {a} )}. It follows that, if

an+1=anηf(an){\displaystyle \mathbf {a} _{n+1}=\mathbf {a} _{n}-\eta \nabla f(\mathbf {a} _{n})}

for a small enough step size orlearning rateηR+{\displaystyle \eta \in \mathbb {R} _{+}}, thenf(an)f(an+1){\displaystyle f(\mathbf {a_{n}} )\geq f(\mathbf {a_{n+1}} )}. In other words, the termηf(a){\displaystyle \eta \nabla f(\mathbf {a} )} is subtracted froma{\displaystyle \mathbf {a} } because we want to move against the gradient, toward the local minimum. With this observation in mind, one starts with a guessx0{\displaystyle \mathbf {x} _{0}} for a local minimum off{\displaystyle f}, and considers the sequencex0,x1,x2,{\displaystyle \mathbf {x} _{0},\mathbf {x} _{1},\mathbf {x} _{2},\ldots } such that

xn+1=xnηnf(xn), n0.{\displaystyle \mathbf {x} _{n+1}=\mathbf {x} _{n}-\eta _{n}\nabla f(\mathbf {x} _{n}),\ n\geq 0.}

We have amonotonic sequence

f(x0)f(x1)f(x2),{\displaystyle f(\mathbf {x} _{0})\geq f(\mathbf {x} _{1})\geq f(\mathbf {x} _{2})\geq \cdots ,}

so the sequence(xn){\displaystyle (\mathbf {x} _{n})} converges to the desired local minimum. Note that the value of thestep sizeη{\displaystyle \eta } is allowed to change at every iteration.

It is possible to guarantee theconvergence to a local minimum under certain assumptions on the functionf{\displaystyle f} (for example,f{\displaystyle f}convex andf{\displaystyle \nabla f}Lipschitz) and particular choices ofη{\displaystyle \eta }. Those include the sequence

ηn=|(xnxn1)[f(xn)f(xn1)]|f(xn)f(xn1)2{\displaystyle \eta _{n}={\frac {\left|\left(\mathbf {x} _{n}-\mathbf {x} _{n-1}\right)^{\top }\left[\nabla f(\mathbf {x} _{n})-\nabla f(\mathbf {x} _{n-1})\right]\right|}{\left\|\nabla f(\mathbf {x} _{n})-\nabla f(\mathbf {x} _{n-1})\right\|^{2}}}}

as in theBarzilai-Borwein method,[8][9] or a sequenceηn{\displaystyle \eta _{n}} satisfying theWolfe conditions (which can be found by usingline search). When the functionf{\displaystyle f} isconvex, all local minima are also global minima, so in this case gradient descent can converge to the global solution.

This process is illustrated in the adjacent picture. Here,f{\displaystyle f} is assumed to be defined on the plane, and that its graph has abowl shape. The blue curves are thecontour lines, that is, the regions on which the value off{\displaystyle f} is constant. A red arrow originating at a point shows the direction of the negative gradient at that point. Note that the (negative) gradient at a point isorthogonal to the contour line going through that point. We see that gradientdescent leads us to the bottom of the bowl, that is, to the point where the value of the functionf{\displaystyle f} is minimal.

An analogy for understanding gradient descent

[edit]
Fog in the mountains

The basic intuition behind gradient descent can be illustrated by a hypothetical scenario. People are stuck in the mountains and are trying to get down (i.e., trying to find the global minimum). There is heavy fog such that visibility is extremely low. Therefore, the path down the mountain is not visible, so they must use local information to find the minimum. They can use the method of gradient descent, which involves looking at the steepness of the hill at their current position, then proceeding in the direction with the steepest descent (i.e., downhill). If they were trying to find the top of the mountain (i.e., the maximum), then they would proceed in the direction of steepest ascent (i.e., uphill). Using this method, they would eventually find their way down the mountain or possibly get stuck in some hole (i.e., local minimum orsaddle point), like a mountain lake. However, assume also that the steepness of the hill is not immediately obvious with simple observation, but rather it requires a sophisticated instrument to measure, which the people happen to have at that moment. It takes quite some time to measure the steepness of the hill with the instrument. Thus, they should minimize their use of the instrument if they want to get down the mountain before sunset. The difficulty then is choosing the frequency at which they should measure the steepness of the hill so as not to go off track.

In this analogy, the people represent the algorithm, and the path taken down the mountain represents the sequence of parameter settings that the algorithm will explore. The steepness of the hill represents theslope of the function at that point. The instrument used to measure steepness isdifferentiation. The direction they choose to travel in aligns with thegradient of the function at that point. The amount of time they travel before taking another measurement is the step size.

Choosing the step size and descent direction

[edit]

Since using a step sizeη{\displaystyle \eta } that is too small would slow convergence, and aη{\displaystyle \eta } too large would lead to overshoot and divergence, finding a good setting ofη{\displaystyle \eta } is an important practical problem.Philip Wolfe also advocated using "clever choices of the [descent] direction" in practice.[10] While using a direction that deviates from the steepest descent direction may seem counter-intuitive, the idea is that the smaller slope may be compensated for by being sustained over a much longer distance.

To reason about this mathematically, consider a directionpn{\displaystyle \mathbf {p} _{n}} and step sizeηn{\displaystyle \eta _{n}} and consider the more general update:

an+1=anηnpn{\displaystyle \mathbf {a} _{n+1}=\mathbf {a} _{n}-\eta _{n}\,\mathbf {p} _{n}}.

Finding good settings ofpn{\displaystyle \mathbf {p} _{n}} andηn{\displaystyle \eta _{n}} requires some thought. First of all, we would like the update direction to point downhill. Mathematically, lettingθn{\displaystyle \theta _{n}} denote the angle betweenf(an){\displaystyle -\nabla f(\mathbf {a_{n}} )} andpn{\displaystyle \mathbf {p} _{n}}, this requires thatcosθn>0.{\displaystyle \cos \theta _{n}>0.} To say more, we need more information about the objective function that we are optimising. Under the fairly weak assumption thatf{\displaystyle f} is continuously differentiable, we may prove that:[11]

f(an+1)f(an)ηnf(an)2pn2(cosθnmaxt[0,1]f(antηnpn)f(an)2f(an)2){\displaystyle f(\mathbf {a} _{n+1})\leq f(\mathbf {a} _{n})-\eta _{n}\|\nabla f(\mathbf {a} _{n})\|_{2}\|\mathbf {p} _{n}\|_{2}\left(\cos \theta _{n}-\max _{t\in [0,1]}{\frac {\|\nabla f(\mathbf {a} _{n}-t\eta _{n}\mathbf {p} _{n})-\nabla f(\mathbf {a} _{n})\|_{2}}{\|\nabla f(\mathbf {a} _{n})\|_{2}}}\right)}1

This inequality implies that the amount by which we can be sure the functionf{\displaystyle f} is decreased depends on a trade off between the two terms in square brackets. The first term in square brackets measures the angle between the descent direction and the negative gradient. The second term measures how quickly the gradient changes along the descent direction.

In principle inequality (1) could be optimized overpn{\displaystyle \mathbf {p} _{n}} andηn{\displaystyle \eta _{n}} to choose an optimal step size and direction. The problem is that evaluating the second term in square brackets requires evaluatingf(antηnpn){\displaystyle \nabla f(\mathbf {a} _{n}-t\eta _{n}\mathbf {p} _{n})}, and extra gradient evaluations are generally expensive and undesirable. Some ways around this problem are:

Usually by following one of the recipes above,convergence to a local minimum can be guaranteed. When the functionf{\displaystyle f} isconvex, all local minima are also global minima, so in this case gradient descent can converge to the global solution.

Solution of a linear system

[edit]
The steepest descent algorithm applied to theWiener filter[12]

Gradient descent can be used to solve asystem of linear equations

Axb=0{\displaystyle \mathbf {A} \mathbf {x} -\mathbf {b} =0}

reformulated as a quadratic minimization problem.If the system matrixA{\displaystyle \mathbf {A} } is realsymmetric andpositive-definite, an objective function is defined as the quadratic function, with minimization of

f(x)=xAx2xb,{\displaystyle f(\mathbf {x} )=\mathbf {x} ^{\top }\mathbf {A} \mathbf {x} -2\mathbf {x} ^{\top }\mathbf {b} ,}

so that

f(x)=2(Axb).{\displaystyle \nabla f(\mathbf {x} )=2(\mathbf {A} \mathbf {x} -\mathbf {b} ).}

For a general real matrixA{\displaystyle \mathbf {A} },linear least squares define

f(x)=Axb2.{\displaystyle f(\mathbf {x} )=\left\|\mathbf {A} \mathbf {x} -\mathbf {b} \right\|^{2}.}

In traditional linear least squares for realA{\displaystyle \mathbf {A} } andb{\displaystyle \mathbf {b} } theEuclidean norm is used, in which case

f(x)=2A(Axb).{\displaystyle \nabla f(\mathbf {x} )=2\mathbf {A} ^{\top }(\mathbf {A} \mathbf {x} -\mathbf {b} ).}

Theline search minimization, finding the locally optimal step sizeη{\displaystyle \eta } on every iteration, can be performed analytically for quadratic functions, and explicit formulas for the locally optimalη{\displaystyle \eta } are known.[6][13]

For example, for realsymmetric andpositive-definite matrixA{\displaystyle \mathbf {A} }, a simple algorithm can be as follows,[6]

repeat in the loop:r:=bAxη:=rr/rArx:=x+ηrif rr is sufficiently small, then exit loopend repeat loopreturn x as the result{\displaystyle {\begin{aligned}&{\text{repeat in the loop:}}\\&\qquad \mathbf {r} :=\mathbf {b} -\mathbf {Ax} \\&\qquad \eta :={\mathbf {r} ^{\top }\mathbf {r} }/{\mathbf {r} ^{\top }\mathbf {Ar} }\\&\qquad \mathbf {x} :=\mathbf {x} +\eta \mathbf {r} \\&\qquad {\hbox{if }}\mathbf {r} ^{\top }\mathbf {r} {\text{ is sufficiently small, then exit loop}}\\&{\text{end repeat loop}}\\&{\text{return }}\mathbf {x} {\text{ as the result}}\end{aligned}}}

To avoid multiplying byA{\displaystyle \mathbf {A} } twice per iteration,we note thatx:=x+ηr{\displaystyle \mathbf {x} :=\mathbf {x} +\eta \mathbf {r} } impliesr:=rηAr{\displaystyle \mathbf {r} :=\mathbf {r} -\eta \mathbf {Ar} }, which gives the traditional algorithm,[14]

r:=bAxrepeat in the loop:η:=rr/rArx:=x+ηrif rr is sufficiently small, then exit loopr:=rηArend repeat loopreturn x as the result{\displaystyle {\begin{aligned}&\mathbf {r} :=\mathbf {b} -\mathbf {Ax} \\&{\text{repeat in the loop:}}\\&\qquad \eta :={\mathbf {r} ^{\top }\mathbf {r} }/{\mathbf {r} ^{\top }\mathbf {Ar} }\\&\qquad \mathbf {x} :=\mathbf {x} +\eta \mathbf {r} \\&\qquad {\hbox{if }}\mathbf {r} ^{\top }\mathbf {r} {\text{ is sufficiently small, then exit loop}}\\&\qquad \mathbf {r} :=\mathbf {r} -\eta \mathbf {Ar} \\&{\text{end repeat loop}}\\&{\text{return }}\mathbf {x} {\text{ as the result}}\end{aligned}}}
Convergence path of steepest descent method for A = [[2, 2], [2, 3]]

The method is rarely used for solving linear equations, with theconjugate gradient method being one of the most popular alternatives. The number of gradient descent iterations is commonly proportional to the spectralcondition numberκ(A){\displaystyle \kappa (\mathbf {A} )} of the system matrixA{\displaystyle \mathbf {A} } (the ratio of the maximum to minimumeigenvalues ofAA{\displaystyle \mathbf {A} ^{\top }\mathbf {A} }), while the convergence ofconjugate gradient method is typically determined by a square root of the condition number, i.e., is much faster. Both methods can benefit frompreconditioning, where gradient descent may require less assumptions on the preconditioner.[14]

Geometric behavior and residual orthogonality

[edit]

In steepest descent applied to solvingAx=b{\displaystyle \mathbf {Ax} =\mathbf {b} }, whereA{\displaystyle \mathbf {A} } is symmetric positive-definite, the residual vectorsrk=bAxk{\displaystyle \mathbf {r} _{k}=\mathbf {b} -\mathbf {A} \mathbf {x} _{k}} are orthogonal across iterations:

rk+1,rk=0.{\displaystyle \langle \mathbf {r} _{k+1},\mathbf {r} _{k}\rangle =0.}

Because each step is taken in the steepest direction, steepest-descent steps alternate between directions aligned with the extreme axes of the elongated level sets. Whenκ(A){\displaystyle \kappa (\mathbf {A} )} is large, this produces a characteristic zig–zag path. The poor conditioning ofA{\displaystyle \mathbf {A} } is the primary cause of the slow convergence, and orthogonality of successive residuals reinforces this alternation.

As shown in the image on the right, steepest descent converges slowly due to the high condition number ofA{\displaystyle \mathbf {A} }, and the orthogonality of residuals forces each new direction to undo the overshoot from the previous step. The result is a path that zigzags toward the solution. This inefficiency is one reason conjugate gradient or preconditioning methods are preferred.[15]

Solution of a non-linear system

[edit]

Gradient descent can also be used to solve a system ofnonlinear equations. Below is an example that shows how to use the gradient descent to solve for three unknown variables,x1,x2, andx3. This example shows one iteration of the gradient descent.

Consider the nonlinear system of equations

An animation showing the first 83 iterations of gradient descent applied to this example. Surfaces areisosurfaces off(x(n)){\displaystyle f(\mathbf {x} ^{(n)})} at current guessx(n){\displaystyle \mathbf {x} ^{(n)}}, and arrows show the direction of descent. Due to a small and constant step size, the convergence is slow.
{3x1cos(x2x3)32=04x12625x22+2x21=0exp(x1x2)+20x3+10π33=0{\displaystyle {\begin{cases}3x_{1}-\cos(x_{2}x_{3})-{\tfrac {3}{2}}=0\\4x_{1}^{2}-625x_{2}^{2}+2x_{2}-1=0\\\exp(-x_{1}x_{2})+20x_{3}+{\tfrac {10\pi -3}{3}}=0\end{cases}}}

Let us introduce the associated function

G(x)=[3x1cos(x2x3)324x12625x22+2x21exp(x1x2)+20x3+10π33],{\displaystyle G(\mathbf {x} )={\begin{bmatrix}3x_{1}-\cos(x_{2}x_{3})-{\tfrac {3}{2}}\\4x_{1}^{2}-625x_{2}^{2}+2x_{2}-1\\\exp(-x_{1}x_{2})+20x_{3}+{\tfrac {10\pi -3}{3}}\\\end{bmatrix}},}

where

x=[x1x2x3].{\displaystyle \mathbf {x} ={\begin{bmatrix}x_{1}\\x_{2}\\x_{3}\\\end{bmatrix}}.}

One might now define the objective function

f(x)=12G(x)G(x)=12[(3x1cos(x2x3)32)2+(4x12625x22+2x21)2+(exp(x1x2)+20x3+10π33)2],{\displaystyle {\begin{aligned}f(\mathbf {x} )&={\frac {1}{2}}G^{\top }(\mathbf {x} )G(\mathbf {x} )\\&={\frac {1}{2}}\left[\left(3x_{1}-\cos(x_{2}x_{3})-{\frac {3}{2}}\right)^{2}+\left(4x_{1}^{2}-625x_{2}^{2}+2x_{2}-1\right)^{2}+\right.\\&{}\qquad \left.\left(\exp(-x_{1}x_{2})+20x_{3}+{\frac {10\pi -3}{3}}\right)^{2}\right],\end{aligned}}}

which we will attempt to minimize. As an initial guess, let us use

x(0)=0=[000].{\displaystyle \mathbf {x} ^{(0)}=\mathbf {0} ={\begin{bmatrix}0\\0\\0\\\end{bmatrix}}.}

We know that

x(1)=0η0f(0)=0η0JG(0)G(0),{\displaystyle \mathbf {x} ^{(1)}=\mathbf {0} -\eta _{0}\nabla f(\mathbf {0} )=\mathbf {0} -\eta _{0}J_{G}(\mathbf {0} )^{\top }G(\mathbf {0} ),}

where theJacobian matrixJG{\displaystyle J_{G}} is given by

JG(x)=[3sin(x2x3)x3sin(x2x3)x28x11250x2+20x2exp(x1x2)x1exp(x1x2)20].{\displaystyle J_{G}(\mathbf {x} )={\begin{bmatrix}3&\sin(x_{2}x_{3})x_{3}&\sin(x_{2}x_{3})x_{2}\\8x_{1}&-1250x_{2}+2&0\\-x_{2}\exp {(-x_{1}x_{2})}&-x_{1}\exp(-x_{1}x_{2})&20\\\end{bmatrix}}.}

We calculate:

JG(0)=[3000200020],G(0)=[2.5110.472].{\displaystyle J_{G}(\mathbf {0} )={\begin{bmatrix}3&0&0\\0&2&0\\0&0&20\end{bmatrix}},\qquad G(\mathbf {0} )={\begin{bmatrix}-2.5\\-1\\10.472\end{bmatrix}}.}

Thus

x(1)=0η0[7.52209.44],{\displaystyle \mathbf {x} ^{(1)}=\mathbf {0} -\eta _{0}{\begin{bmatrix}-7.5\\-2\\209.44\end{bmatrix}},}

and

f(0)=0.5((2.5)2+(1)2+(10.472)2)=58.456.{\displaystyle f(\mathbf {0} )=0.5\left((-2.5)^{2}+(-1)^{2}+(10.472)^{2}\right)=58.456.}

Now, a suitableη0{\displaystyle \eta _{0}} must be found such that

f(x(1))f(x(0))=f(0).{\displaystyle f\left(\mathbf {x} ^{(1)}\right)\leq f\left(\mathbf {x} ^{(0)}\right)=f(\mathbf {0} ).}

This can be done with any of a variety ofline search algorithms. One might also simply guessη0=0.001,{\displaystyle \eta _{0}=0.001,} which gives

x(1)=[0.00750.0020.20944].{\displaystyle \mathbf {x} ^{(1)}={\begin{bmatrix}0.0075\\0.002\\-0.20944\\\end{bmatrix}}.}

Evaluating the objective function at this value, yields

f(x(1))=0.5((2.48)2+(1.00)2+(6.28)2)=23.306.{\displaystyle f\left(\mathbf {x} ^{(1)}\right)=0.5\left((-2.48)^{2}+(-1.00)^{2}+(6.28)^{2}\right)=23.306.}

The decrease fromf(0)=58.456{\displaystyle f(\mathbf {0} )=58.456} to the next step's value of

f(x(1))=23.306{\displaystyle f\left(\mathbf {x} ^{(1)}\right)=23.306}

is a sizable decrease in the objective function. Further steps would reduce its value further until an approximate solution to the system was found.

Comments

[edit]

Gradient descent works in spaces of any number of dimensions, even in infinite-dimensional ones. In the latter case, the search space is typically afunction space, and one calculates theFréchet derivative of the functional to be minimized to determine the descent direction.[7]

That gradient descent works in any number of dimensions (finite number at least) can be seen as a consequence of theCauchy–Schwarz inequality, i.e. the magnitude of the inner (dot) product of two vectors of any dimension is maximized when they arecolinear. In the case of gradient descent, that would be when the vector of independent variable adjustments is proportional to the gradient vector of partial derivatives.

The gradient descent can take many iterations to compute a local minimum with a requiredaccuracy, if thecurvature in different directions is very different for the given function. For such functions,preconditioning, which changes the geometry of the space to shape the function level sets likeconcentric circles, cures the slow convergence. Constructing and applying preconditioning can be computationally expensive, however.

The gradient descent can be modified via momentums[16] (Nesterov, Polyak,[17] and Frank–Wolfe[18]) and heavy-ball parameters (exponential moving averages[19] and positive-negative momentum[20]). The main examples of such optimizers are Adam, DiffGrad, Yogi, AdaBelief, etc.

Methods based onNewton's method and inversion of theHessian usingconjugate gradient techniques can be better alternatives.[21][22] Generally, such methods converge in fewer iterations, but the cost of each iteration is higher. An example is theBFGS method which consists in calculating on every step a matrix by which the gradient vector is multiplied to go into a "better" direction, combined with a more sophisticatedline search algorithm, to find the "best" value ofη.{\displaystyle \eta .} For extremely large problems, where the computer-memory issues dominate, a limited-memory method such asL-BFGS should be used instead of BFGS or the steepest descent.

While it is sometimes possible to substitute gradient descent for alocal search algorithm, gradient descent is not in the same family: although it is aniterative method forlocal optimization, it relies on anobjective function’s gradient rather than an explicit exploration of asolution space.

Gradient descent can be viewed as applyingEuler's method for solvingordinary differential equationsx(t)=f(x(t)){\displaystyle x'(t)=-\nabla f(x(t))} to agradient flow. In turn, this equation may be derived as an optimal controller[23] for the control systemx(t)=u(t){\displaystyle x'(t)=u(t)} withu(t){\displaystyle u(t)} given in feedback formu(t)=f(x(t)){\displaystyle u(t)=-\nabla f(x(t))}.


Modifications

[edit]

Gradient descent can converge to a local minimum and slow down in a neighborhood of asaddle point. Even for unconstrained quadratic minimization, gradient descent develops a zig–zag pattern of subsequent iterates as iterations progress, resulting in slow convergence. Multiple modifications of gradient descent have been proposed to address these deficiencies.

Fast gradient methods

[edit]

Yurii Nesterov has proposed[24] a simple modification that enables faster convergence for convex problems and has been since further generalized. For unconstrained smooth problems, the method is called thefast gradient method (FGM) or theaccelerated gradient method (AGM). Specifically, if the differentiable functionf{\displaystyle f} is convex andf{\displaystyle \nabla f} isLipschitz, and it is not assumed thatf{\displaystyle f} isstrongly convex, then the error in the objective value generated at each stepk{\displaystyle k} by the gradient descent method will bebounded byO(k1){\textstyle {\mathcal {O}}\left({k^{-1}}\right)}. Using the Nesterov acceleration technique, the error decreases atO(k2){\textstyle {\mathcal {O}}\left({k^{-2}}\right)}.[25][26] It is known that the rateO(k2){\displaystyle {\mathcal {O}}\left({k^{-2}}\right)} for the decrease of thecost function is optimal for first-order optimization methods. Nevertheless, there is the opportunity to improve the algorithm by reducing the constant factor. Theoptimized gradient method (OGM)[27] reduces that constant by a factor of two and is an optimal first-order method for large-scale problems.[28]

For constrained or non-smooth problems, Nesterov's FGM is called thefast proximal gradient method (FPGM), an acceleration of theproximal gradient method.

Momentum orheavy ball method

[edit]

Trying to break the zig-zag pattern of gradient descent, themomentum or heavy ball method uses a momentum term in analogy to a heavy ball sliding on the surface of values of the function being minimized,[6] or to mass movement inNewtonian dynamics through aviscous medium in aconservative force field.[29] Gradient descent with momentum remembers the solution update at each iteration, and determines the next update as alinear combination of the gradient and the previous update. For unconstrained quadratic minimization, a theoretical convergence rate bound of the heavy ball method is asymptotically the same as that for the optimalconjugate gradient method.[6]

This technique is used instochastic gradient descent and as an extension to thebackpropagation algorithms used to trainartificial neural networks.[30][31] In the direction of updating, stochastic gradient descent adds a stochastic property. The weights can be used to calculate the derivatives.

Extensions

[edit]

Gradient descent can be extended to handleconstraints by including aprojection onto the set of constraints. This method is only feasible when the projection is efficiently computable on a computer. Under suitable assumptions, this method converges. This method is a specific case of theforward–backward algorithm for monotone inclusions (which includesconvex programming andvariational inequalities).[32]

Gradient descent is a special case ofmirror descent using the squared Euclidean distance as the givenBregman divergence.[33]

Theoretical properties

[edit]

The properties of gradient descent depend on the properties of the objective function and the variant of gradient descent used (for example, if aline search step is used). The assumptions made affect the convergence rate, and other properties, that can be proven for gradient descent.[34] For example, if the objective is assumed to bestrongly convex andlipschitz smooth, then gradient descent converges linearly with a fixed step size.[1] Looser assumptions lead to either weaker convergence guarantees or require a more sophisticated step size selection.[34]

Examples

[edit]

See also

[edit]

References

[edit]
  1. ^abBoyd, Stephen; Vandenberghe, Lieven (2004-03-08).Convex Optimization. Cambridge University Press.doi:10.1017/cbo9780511804441.ISBN 978-0-521-83378-3.
  2. ^Lemaréchal, C. (1 January 2012)."Cauchy and the gradient method"(PDF). In Grötschel, M. (ed.).Optimization Stories. Documenta Mathematica Series. Vol. 6 (1st ed.). EMS Press. pp. 251–254.doi:10.4171/dms/6/27.ISBN 978-3-936609-58-5. Archived fromthe original(PDF) on 2018-12-29. Retrieved2020-01-26.
  3. ^Hadamard, Jacques (1908). "Mémoire sur le problème d'analyse relatif à l'équilibre des plaques élastiques encastrées".Mémoires présentés par divers savants éstrangers à l'Académie des Sciences de l'Institut de France.33.
  4. ^Courant, R. (1943)."Variational methods for the solution of problems of equilibrium and vibrations".Bulletin of the American Mathematical Society.49 (1):1–23.doi:10.1090/S0002-9904-1943-07818-4.
  5. ^Curry, Haskell B. (1944)."The Method of Steepest Descent for Non-linear Minimization Problems".Quart. Appl. Math.2 (3):258–261.doi:10.1090/qam/10667.
  6. ^abcdePolyak, Boris (1987).Introduction to Optimization.
  7. ^abAkilov, G. P.;Kantorovich, L. V. (1982).Functional Analysis (2nd ed.). Pergamon Press.ISBN 0-08-023036-9.
  8. ^Barzilai, Jonathan; Borwein, Jonathan M. (1988). "Two-Point Step Size Gradient Methods".IMA Journal of Numerical Analysis.8 (1):141–148.doi:10.1093/imanum/8.1.141.
  9. ^Fletcher, R. (2005). "On the Barzilai–Borwein Method". In Qi, L.; Teo, K.; Yang, X. (eds.).Optimization and Control with Applications. Applied Optimization. Vol. 96. Boston: Springer. pp. 235–256.ISBN 0-387-24254-6.
  10. ^Wolfe, Philip (April 1969). "Convergence Conditions for Ascent Methods".SIAM Review.11 (2):226–235.doi:10.1137/1011036.
  11. ^Bernstein, Jeremy; Vahdat, Arash; Yue, Yisong; Liu, Ming-Yu (2020-06-12). "On the distance between two neural networks and the stability of learning".arXiv:2002.03432 [cs.LG].
  12. ^Haykin, Simon S. Adaptive filter theory. Pearson Education India, 2008. - p. 108-142, 217-242
  13. ^Saad, Yousef (2003).Iterative methods for sparse linear systems (2nd ed.). Philadelphia, Pa.: Society for Industrial and Applied Mathematics. pp. 195.ISBN 978-0-89871-534-7.
  14. ^abBouwmeester, Henricus; Dougherty, Andrew; Knyazev, Andrew V. (2015)."Nonsymmetric Preconditioning for Conjugate Gradient and Steepest Descent Methods".Procedia Computer Science.51:276–285.arXiv:1212.6680.doi:10.1016/j.procs.2015.05.241.
  15. ^Holmes, M. (2023).Introduction to Scientific Computing and Data Analysis, 2nd Ed. Springer.ISBN 978-3-031-22429-4.
  16. ^Abdulkadirov, Ruslan; Lyakhov, Pavel; Nagornov, Nikolay (January 2023)."Survey of Optimization Algorithms in Modern Neural Networks".Mathematics.11 (11): 2466.doi:10.3390/math11112466.ISSN 2227-7390.
  17. ^Diakonikolas, Jelena; Jordan, Michael I. (January 2021)."Generalized Momentum-Based Methods: A Hamiltonian Perspective".SIAM Journal on Optimization.31 (1):915–944.arXiv:1906.00436.doi:10.1137/20M1322716.ISSN 1052-6234.
  18. ^Meyer, Gerard G. L. (November 1974)."Accelerated Frank–Wolfe Algorithms".SIAM Journal on Control.12 (4):655–663.doi:10.1137/0312050.ISSN 0036-1402.
  19. ^Kingma, Diederik P.; Ba, Jimmy (2017-01-29),Adam: A Method for Stochastic Optimization,arXiv:1412.6980
  20. ^Xie, Zeke; Yuan, Li; Zhu, Zhanxing; Sugiyama, Masashi (2021-07-01)."Positive-Negative Momentum: Manipulating Stochastic Gradient Noise to Improve Generalization".Proceedings of the 38th International Conference on Machine Learning. PMLR:11448–11458.arXiv:2103.17182.
  21. ^Press, W. H.;Teukolsky, S. A.; Vetterling, W. T.;Flannery, B. P. (1992).Numerical Recipes in C: The Art of Scientific Computing (2nd ed.). New York:Cambridge University Press.ISBN 0-521-43108-5.
  22. ^Strutz, T. (2016).Data Fitting and Uncertainty: A Practical Introduction to Weighted Least Squares and Beyond (2nd ed.). Springer Vieweg.ISBN 978-3-658-11455-8.
  23. ^Ross, I.M. (July 2019)."An optimal control theory for nonlinear optimization".Journal of Computational and Applied Mathematics.354:39–51.doi:10.1016/j.cam.2018.12.044.S2CID 127649426.
  24. ^Nesterov, Yurii (2004).Introductory Lectures on Convex Optimization : A Basic Course. Springer.ISBN 1-4020-7553-7.
  25. ^Vandenberghe, Lieven (2019)."Fast Gradient Methods"(PDF).Lecture notes for EE236C at UCLA.
  26. ^Walkington, Noel J. (2023)."Nesterov's Method for Convex Optimization".SIAM Review.65 (2):539–562.doi:10.1137/21M1390037.ISSN 0036-1445.
  27. ^Kim, D.; Fessler, J. A. (2016)."Optimized First-order Methods for Smooth Convex Minimization".Mathematical Programming.151 (1–2):81–107.arXiv:1406.5468.doi:10.1007/s10107-015-0949-3.PMC 5067109.PMID 27765996.S2CID 207055414.
  28. ^Drori, Yoel (2017). "The Exact Information-based Complexity of Smooth Convex Minimization".Journal of Complexity.39:1–16.arXiv:1606.01424.doi:10.1016/j.jco.2016.11.001.S2CID 205861966.
  29. ^Qian, Ning (January 1999). "On the momentum term in gradient descent learning algorithms".Neural Networks.12 (1):145–151.CiteSeerX 10.1.1.57.5612.doi:10.1016/S0893-6080(98)00116-6.PMID 12662723.S2CID 2783597.
  30. ^"Momentum and Learning Rate Adaptation".Willamette University. Retrieved17 October 2014.
  31. ^Geoffrey Hinton; Nitish Srivastava; Kevin Swersky."The momentum method".Coursera. Retrieved2 October 2018. Part of a lecture series for theCoursera online courseNeural Networks for Machine LearningArchived 2016-12-31 at theWayback Machine.
  32. ^Combettes, P. L.; Pesquet, J.-C. (2011). "Proximal splitting methods in signal processing". In Bauschke, H. H.;Burachik, R. S.; Combettes, P. L.; Elser, V.; Luke, D. R.; Wolkowicz, H. (eds.).Fixed-Point Algorithms for Inverse Problems in Science and Engineering. New York: Springer. pp. 185–212.arXiv:0912.3522.ISBN 978-1-4419-9568-1.
  33. ^"Mirror descent algorithm".
  34. ^abBubeck, Sébastien (2015). "Convex Optimization: Algorithms and Complexity".arXiv:1405.4980 [math.OC].

Further reading

[edit]

External links

[edit]
Wikimedia Commons has media related toGradient descent.
Concepts
Applications
Implementations
Audio–visual
Text
Decisional
People
Architectures
Functions
Gradients
Convergence
Quasi–Newton
Other methods
Hessians
Graph of a strictly concave quadratic function with unique maximum.
Optimization computes maxima and minima.
General
Differentiable
Convex
minimization
Linear and
quadratic
Interior point
Basis-exchange
Paradigms
Graph
algorithms
Minimum
spanning tree
Shortest path
Network flows
Retrieved from "https://en.wikipedia.org/w/index.php?title=Gradient_descent&oldid=1323290931"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp