The original article is in Chinese. The English version is automatically translated by AI.
0x00 Preface
This article focuses on convergence analysis in deep learning. As the first part, it introduces the basic concepts of optimization problems in deep learning and the derivations of common inequalities.
I don’t come from an optimization background—I picked up this material because my research needed it. If there are any mistakes in the content or derivations, please let me know.
Here I’d like to summarize what I’ve learned. Since a single full write-up would be too long to read comfortably, I split it into several parts, and I hope it helps you as you read through.
0x01 Fundamental Concepts
Optimization Problem
An optimization problem is the problem of finding the maximum or minimum of an objective function subject to certain constraints. Its general form is:
In deep learning, $f(x)$ is usually a loss function and the problem is unconstrained, so this article will not cover constrained optimization problems or methods such as Lagrange multipliers.
Convex Function
A convex function is a function whose domain is a convex set, such that the function value on the line segment connecting any two points is less than or equal to the weighted sum of the function values at those two points. A convex function is defined as follows:
defination
Consider a real-valued function $f: R^d \to R$. If for any $x,y\in R^d$ the following inequality holds:$$ f(y) \geq f(x)+\nabla f(x)^{\top}(y-x) $$then the function $f$ is said to be convex.
From this formula, another form of convexity can be derived:
$\mu$-strongly convex
We often encounter convex functions, but in practice we prefer functions that are “more convex”—that is, with greater curvature—so that convergence can be faster. Therefore we introduce the concept of $\mu$-strong convexity, defined as follows:
defination
Consider a real-valued function $f: R^{d}\to R$ and a norm $||\cdot||$. If for any $x,y\in R^d$ the following inequality holds:$$ f(y) \geq f(x)+\nabla f(x)^{\top}(y-x)+\frac{\mu}{2}||y-x||^2, \quad \forall x, y \in \mathcal{D} $$then $f$ is said to be $\mu$-strongly convex with respect to the norm $||\cdot||$.
As we can see, the definition of $\mu$-strong convexity adds a norm term with coefficient $\mu$ on top of convexity, which gives a $\mu$-strongly convex function greater curvature.
If we set $x = x^*$, then $\nabla f(x^*) = 0$, giving $f(y)-f(x^) \geq \frac{\mu}{2}||y-x^||^2$; if we set $y = x^*$, we get:
It is also straightforward to verify that $f$ is $\mu$-strongly convex if and only if $f-\frac{\mu}{2}||\cdot||^2$ is convex.
Lipschitz continuous
$L$-Lipschitz continuity requires that the slope of the line connecting any two points on the curve of the function is uniformly bounded—that is, every slope is bounded by the same constant, which is called the Lipschitz constant.
defination
Consider a real-valued function $f: R^{d}\to R$ and a norm $||\cdot||$. If there exists a constant $L>0$ such that for any $x,y\in R^d$ the following inequality holds:$$ |f(x)-f(y)| \leq L||x-y|| $$then $f$ is said to be $L$-Lipschitz continuous with respect to the norm $||\cdot||$.
Smoothness
For a differentiable function, smoothness depends on its derivative and is defined as follows:
defination
Consider a real-valued function $f: R^{d}\to R$ and a norm $||\cdot||$. If there exists a constant $L>0$ such that for any $x,y\in R^d$ the following inequality holds:$$ f(x)-f(y) \leq \nabla f(y)^{\top}(x-y)+\frac{L}{2}||x-y||^2 \tag{1} \label{1} $$then $f$ is said to be $L$-smooth with respect to the norm $||\cdot||$.
Another form is:
That is, a convex function $f$ is $L$-smooth if and only if its gradient $\nabla f$ is $L$-Lipschitz continuous.
Combining $\eqref{1}$ and $\eqref{2}$, we can see that $L$-Lipschitz actually gives an upper bound on the function, while $\mu$-strong convexity gives a lower bound 1.
First let’s prove the equivalence between $\eqref{1}$ and $\eqref{2}$; here I follow the proof in 2.
Proof:
Therefore,
Q.E.D.
Step $\eqref{3.1}$ uses the Cauchy-Schwarz inequality, and step $\eqref{3.2}$ uses the definition of $L$-Lipschitz continuity from $\eqref{2}$. We can also see that with $|\nabla f(x) - \nabla f(y)| \leq L|x - y|$, we can relate the variables directly to their gradients.
0x02 Optimization Methods
Gradient Descent
The gradient descent update rule is:
where $\eta_t$ is the learning rate, $w_t$ is the parameter, $f(w_t)$ is the objective function, and $\eta_t \leq \eta_{t-1} \leq \cdots \leq \eta_1$ is a decreasing sequence.
The following identity holds in all cases 3:
Stochastic Gradient Descent
Because full gradient descent has high computational complexity when the dataset is large, we use stochastic gradient descent, estimating the full gradient with just a single sample $(\mathbf{x_i}, y_i)$ each time. The stochastic gradient descent update rule is:
The stochastic gradient is often denoted as $g(w_t)=\nabla f(w_t; \xi_t)$.
Mini-batch Stochastic Gradient Descent
Mini-batch Stochastic Gradient Descent is an improvement over SGD that uses $b$ samples each step to estimate the full gradient, i.e., $g(w_t)=\frac{1}{b}\sum_{i=1}^b \nabla f(w_t; \xi_{t,i})$. The update rule is:
0x03 Common Assumptions
Analyses of optimization methods in deep learning typically introduce the following assumptions:
Variance Bounded Assumption
Bounded-domain assumption: let the model parameter be $w$, then:
Gradient Bounded Assumption
Bounded-gradient assumption: let the gradient be $\nabla f(w)$, then:
Unbiased Estimate
The gradient estimate of mini-batch SGD is unbiased, i.e.:
Gradient Bounded Variance Assumption
Bounded gradient variance assumption: let the gradient sampled in one mini-batch be $\nabla f(w; \xi)$, then:
tip
From the two assumptions above (unbiased estimate and bounded gradient variance), we have:$$ \mathrm{Var}(g(w; \xi)) = \mathbb{E}_{\xi}[||g(w; \xi)||^2]- ||\mathbb{E}_{\xi}[g(w; \xi)]||^{2} \leq \frac{\sigma^2}{b} $$That is,$$ \mathbb{E}_{\xi}[||g(w; \xi)||^2] \leq ||\nabla f(w)||^{2} + \frac{\sigma^2}{b} $$
0x04 Common Inequalities
Here I only list a few inequalities that show up constantly in convergence analysis (some papers even use them directly without mentioning their names, which was a big reason I got confused when first reading them).
Cauchy-Schwarz Inequality
Jensen Inequality
A common special case is when all $\eta_i$ are equal, namely:
which is equivalent to
Triangle Inequality
Polyak-Lojasiewicz (PL) Inequality
defination
If a function is $\mu$-strongly convex, then for any $x\in R^{d}$ its lower bound can be written as:$$ 2\mu(f(x)-f(x^*)) \leq ||\nabla f(x)||_2^2 $$
Proof:
The proof starts from the definition of $\mu$-strong convexity and minimizes both sides of the inequality.
To minimize the left-hand side, simply set $x_1 = x^*$. To minimize the right-hand side, differentiate with respect to $x_1$ and set the derivative to 0.
That is, $x_1 = x_2 - \frac{1}{\mu}\nabla f(x_2)$. Substituting back into the original inequality:
Rearranging gives the result. Q.E.D.
0x05 Acknowledgement
I studied optimization on and off for nearly a year and took quite a few detours along the way. At first I tried learning directly from derivations in papers, but many definitions made little sense to me, so I turned to dedicated optimization textbooks. Maybe I was slow to catch on, or much of it drifted too far from my own research direction—I grew impatient, which is why my study kept stopping and starting. It wasn’t until the second half of 2022, when I took Prof. Lingfeng Niu’s elective course Practical Optimization Algorithms and Their Applications, that I finally got a clear picture of the field, and reading related material this year became much easier. Many thanks to Prof. Lingfeng Niu for offering this course, which gave me an approachable entry into optimization without having to take a full specialist course like Optimization Theory and Methods.
Reference
Non-convex Optimization Cornerstone: Lipschitz Condition (in Chinese), https://www.zhihu.com/tardis/bd/art/27554191 ↩︎
Convergence Analysis of Gradient Methods under Different Conditions 1—(Non)convex+(Non)smooth (in Chinese), https://zhuanlan.zhihu.com/p/92385493 ↩︎

