Paper Review 8: SGDR: SGD with warm restarts(+ theory behind the Grad descent algorithm)

Basic university-level math is enough to follow this ๐Ÿ˜‰
July 27, 2026

๐Ÿค” What you need to know before reading paper?

This section is essential if you want a quick refresher or need to learn the basics of deep learning.

โ€œIf I have seen further, it is by standing on the shoulders of giants.โ€ โ€” Sir Isaac Newton

Isaac Newton famously said he only saw further by standing on the shoulders of giants. Before we look at where the authors are taking us, we need to take a quick look at the โ€œgiantsโ€ they are standing onโ€”the basic background of this field.

Lets start..Gradient descent?

Training of DNN(deep neural networks) is a problem of minimizing a function f : Rโฟ โ†’ R

๐Ÿค” f : Rโฟ โ†’ R means: you feed f a vector of n real numbers, and it spits out one real number.

๐ŸŒ What is Function?

๐ŸŒ Vector

๐ŸŒ Real number

Examples:

  1. n = 2: f : Rยฒ โ†’ R takes a pair (x, y) and returns one number.
\[f(x, y) = x^2 + y^2\]

This is like a surface โ€” for every point (x, y) on a plane, you get a height. Think of a hill: input is your (latitude, longitude)-style location, output is the elevation there.

โ€œTo optimize f we iteratively adjust xโ‚œ โˆˆ โ„โฟ (the parameter vector at time step t) using gradient information โˆ‡fโ‚œ(xโ‚œ).โ€

This process is almost always written as:

\[x_{t+1} = x_t - \eta \, \nabla f_t(x_t)\]
  • xโ‚œโ‚Šโ‚ โ€” the new parameter vector (next step)
  • xโ‚œ โ€” current parameter vector
  • ฮท (eta) โ€” the learning rate / step size (how big a step to take)
  • โˆ‡fโ‚œ(xโ‚œ) โ€” the gradient at the current point
  • The minus sign means: move against the gradient, i.e., downhill

๐Ÿค” But, Where is the data points from train set lives?

f (or fโ‚œ) is not just a function of x โ€” itโ€™s secretly a function of both the parameters and the data. The full picture is usually:

\[f_t(x) = \frac{1}{|B_t|}\sum_{i \in B_t} \ell(x; z_i)\]
  • z_i = (input_i, label_i) โ€” a single data point (e.g., an image and its class)
  • Bโ‚œ โ€” the batch of data points sampled at time step t (could be one example, a mini-batch, or the whole dataset)
  • โ„“(x; z_i) โ€” the loss on a single example, given parameters x
  • fโ‚œ(x) โ€” the average loss over the batch, at parameters x

So fโ‚œ(xโ‚œ) = โ€œplug the current parameters xโ‚œ into the model, run them against batch Bโ‚œ, and compute the average loss.โ€

Also good to know that gradient of a loss function is a function itself

There is also second order methods, instead of just using GD

Second-order methods use curvature to correct the step:

\[x_{t+1} = x_t - \eta_t H_t^{-1} \nabla f_t(x_t)\]

๐Ÿค” what is H?

The Hessian is the matrix of second derivatives of f โ€” it tells you about the curvature of the loss surface, not just its slope.

From Gradient to Hessian

The Hessian is the matrix of second derivatives of f โ€” it tells you about the curvature of the loss surface, not just its slope.

  • Gradient โˆ‡f(x) โ€” a vector of first derivatives (โˆ‚f/โˆ‚xโ‚, โˆ‚f/โˆ‚xโ‚‚, โ€ฆ, โˆ‚f/โˆ‚xโ‚™). Tells you the slope in each direction โ€” which way is downhill.

  • Hessian H โ€” a matrix of second derivatives. Tells you how the slope itself is changing โ€” i.e., whether the surface is curving like a bowl, a saddle, a ridge, etc.

๐Ÿค” Why Itโ€™s a Problem in Practice

For a model with n parameters:

Gradient โˆ‡f - n numbers - cheap

Hessian H - n ร— n numbers - expensive to compute

Inverse Hessian Hโปยน - n ร— n - very expensive to compute (roughly O(nยณ))

๐Ÿค” you will probably ask a question, why we say that Hessian is a maxtrix

if f(x) = xยณ (single variable, n = 1):

  • f'(x) = 3xยฒ (gradient โ€” 1 number, since n=1)
  • f''(x) = 6x (Hessian โ€” which is justโ€ฆ a number)

ANSWER

So when n = 1, the โ€œmatrixโ€ has exactly one entry, and it collapses down to what you already know as the ordinary second derivative. Nothing new happens โ€” this is the degenerate case.

๐Ÿค” Where It Actually Becomes a Matrix

The Hessian only becomes a real matrix (more than 1 entry) when you have more than one variable โ€” because now you need to ask not just โ€œhow does the slope change,โ€ but โ€œhow does the slope in each direction change as I move in each directionโ€ โ€” and there are multiple combinations of that.

image

SGD with momentum

Instead of stepping purely based on the current gradient, you keep a โ€œmemoryโ€ of past gradients that keeps pushing you in a consistent direction.

The Two Equations

update the velocity:

\[v_{t+1} = \mu_t v_t - \eta_t \nabla f_t(x_t)\]

update the parameters using velocity:

\[x_{t+1} = x_t + v_{t+1}\]

Compare this to plain gradient descent, which you already know:

\[x_{t+1} = x_t - \eta_t \nabla f_t(x_t)\]

The difference: plain GD moves you directly by the (scaled) gradient. Momentum instead updates a separate velocity vector v, and that is what moves you.

tags: basis