Table of Contents
Fetching ...

Gradient Descent, Stochastic Optimization, and Other Tales

Jun Lu

TL;DR

The paper demystifies gradient-based optimization by grounding it in precise mathematics and geometry. It surveys vanilla gradient descent, stochastic variants, and line-search strategies, deriving update rules and convergence properties for convex and quadratic settings, and then extends to learning-rate schedules, momentum, and modern adaptive methods (AdaGrad, RMSProp, AdaDelta, AdaSmooth, Adam, Nadam). It culminates with second-order approaches (Newton, damped Newton, Levenberg–Marquardt) and conjugate-gradient methods, including preconditioning to address ill-conditioning. Collectively, the work provides a self-contained, rigorous toolkit for understanding when and how to apply these methods in ML tasks, with practical guidance and illustrative analyses of convergence rates and saddle-point behavior. The inclusion of appendices on Taylor expansion and Cholesky decomposition reinforces the theoretical foundations and practical computational strategies for quadratic and nonlinear optimization.

Abstract

The goal of this paper is to debunk and dispel the magic behind black-box optimizers and stochastic optimizers. It aims to build a solid foundation on how and why the techniques work. This manuscript crystallizes this knowledge by deriving from simple intuitions, the mathematics behind the strategies. This tutorial doesn't shy away from addressing both the formal and informal aspects of gradient descent and stochastic optimization methods. By doing so, it hopes to provide readers with a deeper understanding of these techniques as well as the when, the how and the why of applying these algorithms. Gradient descent is one of the most popular algorithms to perform optimization and by far the most common way to optimize machine learning tasks. Its stochastic version receives attention in recent years, and this is particularly true for optimizing deep neural networks. In deep neural networks, the gradient followed by a single sample or a batch of samples is employed to save computational resources and escape from saddle points. In 1951, Robbins and Monro published \textit{A stochastic approximation method}, one of the first modern treatments on stochastic optimization that estimates local gradients with a new batch of samples. And now, stochastic optimization has become a core technology in machine learning, largely due to the development of the back propagation algorithm in fitting a neural network. The sole aim of this article is to give a self-contained introduction to concepts and mathematical tools in gradient descent and stochastic optimization.

Gradient Descent, Stochastic Optimization, and Other Tales

TL;DR

The paper demystifies gradient-based optimization by grounding it in precise mathematics and geometry. It surveys vanilla gradient descent, stochastic variants, and line-search strategies, deriving update rules and convergence properties for convex and quadratic settings, and then extends to learning-rate schedules, momentum, and modern adaptive methods (AdaGrad, RMSProp, AdaDelta, AdaSmooth, Adam, Nadam). It culminates with second-order approaches (Newton, damped Newton, Levenberg–Marquardt) and conjugate-gradient methods, including preconditioning to address ill-conditioning. Collectively, the work provides a self-contained, rigorous toolkit for understanding when and how to apply these methods in ML tasks, with practical guidance and illustrative analyses of convergence rates and saddle-point behavior. The inclusion of appendices on Taylor expansion and Cholesky decomposition reinforces the theoretical foundations and practical computational strategies for quadratic and nonlinear optimization.

Abstract

The goal of this paper is to debunk and dispel the magic behind black-box optimizers and stochastic optimizers. It aims to build a solid foundation on how and why the techniques work. This manuscript crystallizes this knowledge by deriving from simple intuitions, the mathematics behind the strategies. This tutorial doesn't shy away from addressing both the formal and informal aspects of gradient descent and stochastic optimization methods. By doing so, it hopes to provide readers with a deeper understanding of these techniques as well as the when, the how and the why of applying these algorithms. Gradient descent is one of the most popular algorithms to perform optimization and by far the most common way to optimize machine learning tasks. Its stochastic version receives attention in recent years, and this is particularly true for optimizing deep neural networks. In deep neural networks, the gradient followed by a single sample or a batch of samples is employed to save computational resources and escape from saddle points. In 1951, Robbins and Monro published \textit{A stochastic approximation method}, one of the first modern treatments on stochastic optimization that estimates local gradients with a new batch of samples. And now, stochastic optimization has become a core technology in machine learning, largely due to the development of the back propagation algorithm in fitting a neural network. The sole aim of this article is to give a self-contained introduction to concepts and mathematical tools in gradient descent and stochastic optimization.
Paper Structure (86 sections, 275 equations, 31 figures, 3 tables, 10 algorithms)

This paper contains 86 sections, 275 equations, 31 figures, 3 tables, 10 algorithms.

Figures (31)

  • Figure 1: Figure \ref{['fig:alsgd1']} shows a convex function surface plot and its contour plot (blue=low, yellow=high), where the upper graph is the surface plot, and the lower one is the projection of it (i.e., contour). Figure \ref{['fig:alsgd2']}: $-\nabla L(\bm{x})$ pushes the loss to decrease for the convex function $L(\bm{x})$.
  • Figure 2: Constrained gradient descent with $\bm{x}^\top\bm{x}\leq C$. The green vector $\bm{w}$ is the projection of $\bm{v}_1$ into $\bm{x}^\top\bm{x}\leq C$ where $\bm{v}_1$ is the component of $-\nabla l(\bm{x})$ perpendicular to $\bm{x}_1$. The right picture is the next step after the update in the left picture. $\bm{x}_\star$ denotes the optimal solution of {$\min l(\bm{x})$}.
  • Figure 3: Loss surface for different quadratic forms.
  • Figure 4: Illustration for the linear search of quadratic form with $\bm{A}=20755$, $\bm{b}=\mathbf{0}$, and $c=0$. The procedure is at $\bm{x}_t=[-3,3.5]^\top$ for the $t$-th iteration.
  • Figure 5: Rate of convergence (per iteration) in vanilla GD method. The $y$-axis is $\frac{\kappa-1}{\kappa+1}$.
  • ...and 26 more figures

Theorems & Definitions (22)

  • Definition 1.1: Matlab Notation
  • Definition 1.2: Eigenvalue
  • Definition 1.3: Spectrum and Spectral Radius
  • Definition 1.4: Eigenvector
  • Definition 1.5: Subspace
  • Definition 1.6: Span
  • Definition 1.7: Linearly Independent
  • Definition 1.8: Basis and Dimension
  • Definition 1.9: Column Space (Range)
  • Definition 1.10: Null Space (Nullspace, Kernel)
  • ...and 12 more