ArticleslgStudy

mathematics

Gradient descent

Gradient descent is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Gradient descent rather than just read about it. In short: Gradient descent is a method for unconstrained mathematical optimization. It is a first-order iterative algorithm for minimizing a differentiable multivariate function.

Gradient descent — main illustration
Gradient descent — illustration

Key takeaways

  • Gradient descent belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Gradient descent to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Gradient descent from memory before moving on to harder problems.

Reference excerpt

Gradient descent is a method for unconstrained mathematical optimization. It is a first-order iterative algorithm for minimizing a differentiable multivariate function.

The idea is to take repeated steps in the opposite direction of the gradient (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 as gradient ascent. Gradient descent should not be confused with local search algorithms, although both are iterative methods for optimization. Gradient descent is particularly useful in machine learning and artificial intelligence for minimizing the cost or loss function. Gradient descent is generally attributed to Augustin-Louis Cauchy, who first suggested it in 1847. Jacques Hadamard independently proposed a similar method in 1907. Its convergence properties for non-linear optimization problems were first studied by Haskell Curry in 1944, with the method becoming increasingly well-studied and used in the following decades. A simple extension of gradient descent, stochastic gradient descent, serves as the most basic algorithm used for training most deep networks today.

Description

Gradient descent is based on the observation that if the multi-variable function f ( x ) {\displaystyle f(\mathbf {x} )} is defined and differentiable in a neighborhood of a point a {\displaystyle \mathbf {a} } , then f ( x ) {\displaystyle f(\mathbf {x} )} decreases fastest if one goes from a {\displaystyle \mathbf {a} } in the direction of the negative gradient of f {\displaystyle f} at a , i . e . , − ∇ f ( a ) {\displaystyle \mathbf {a} ,i.e.,-\nabla f(\mathbf {a} )} . It follows that, if

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

for a small enough step size or learning rate η ∈ R + {\displaystyle \eta \in \mathbb {R} _{+}} , then f ( a n ) ≥ f ( a n + 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 from a {\displaystyle \mathbf {a} } because we want to move against the gradient, toward the local minimum. With this observation in mind, one starts with a guess x 0 {\displaystyle \mathbf {x} _{0}} for a local minimum of f {\displaystyle f} , and considers the sequence x 0 , x 1 , x 2 , … {\displaystyle \mathbf {x} _{0},\mathbf {x} _{1},\mathbf {x} _{2},\ldots } such that

x n + 1 = x n − η n ∇ f ( x n ) , n ≥ 0. {\displaystyle \mathbf {x} _{n+1}=\mathbf {x} _{n}-\eta _{n}\nabla f(\mathbf {x} _{n}),\ n\geq 0.}

We have a monotonic sequence

f ( x 0 ) ≥ f ( x 1 ) ≥ f ( x 2 ) ≥ ⋯ , {\displaystyle f(\mathbf {x} _{0})\geq f(\mathbf {x} _{1})\geq f(\mathbf {x} _{2})\geq \cdots ,}

… excerpt ends here. Continue reading the full article.

Illustrations

Gradient descent: Illustration of gradient descent on a series of level sets
Illustration of gradient descent on a series of level sets
Gradient descent: Negative gradient in direction of steepest descent.
Negative gradient in direction of steepest descent.
Gradient descent: Fog in the mountains
Fog in the mountains
Gradient descent: The steepest descent algorithm applied to the Wiener filter[12]
The steepest descent algorithm applied to the Wiener filter[12]
Gradient descent: Convergence path of steepest descent method for A = [[2, 2], [2, 3]]
Convergence path of steepest descent method for A = [[2, 2], [2, 3]]

Worked examples

Example 1 — a first encounter with Gradient descent

Start with the simplest possible case. Write down what Gradient descent claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Gradient descent before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Gradient descent ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Gradient descent

In research
Gradient descent appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Gradient descent in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Gradient descent is common in secondary-school and first-year university syllabi. It links to neighbouring topics First order methods, Gradient methods, Mathematical optimization, so understanding it makes those chapters shorter.
In everyday life
Look for Gradient descent outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Gradient descent” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Gradient descent in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Gradient descent means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Gradient descent out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Gradient descent in simple terms?

Gradient descent is a method for unconstrained mathematical optimization. It is a first-order iterative algorithm for minimizing a differentiable multivariate function.

Why does Gradient descent matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Gradient descent?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Gradient descent.

Tags

  • First order methods
  • Gradient methods
  • Mathematical optimization
  • Optimization algorithms and methods

Keep exploring