Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.A speed limit for functions
If a car never goes faster than 60 km/h, then in 2 hours it moves at most 120 km. You know that without seeing the route. A function with a speed limit works the same way: if its output never changes faster than times its input, then nudging the input by 0.1 moves the output by at most . Such a function is Lipschitz with constant .
There’s also a speed limit on how fast the slope can change. Functions with that property are called smooth. Smooth functions can’t hide sudden cliffs, so a careful step downhill is guaranteed to go down.
A self-driving car’s vision network shouldn’t change its answer because one pixel flickered. If the network is Lipschitz with a small constant, small sensor noise provably causes small output changes. Gradient-descent step sizes are set by the smoothness constant, too.
- 1. At most 60 km/h for 2 h: the farthest you can get?
- 2. f(x) = 3x + 1: its speed limit L is…
- 3. Is |x| Lipschitz?
Level 1: Beginner
★★☆☆☆ Basic⏱ 15 minSecondary-school mathematics: arithmetic and elementary algebra.Definitions
- is -Lipschitz if for all . For differentiable , the best is (by the mean value theorem, A3.1-4).
- is -smooth if its gradient is -Lipschitz: . For twice-differentiable , that means (A3.2-6).
| Function | Lipschitz | Smoothness |
|---|---|---|
| 1 | 1 | |
| 1 | ||
| sigmoid | ||
| ReLU, | 1 | not smooth (kink) |
| only on bounded sets | 1 | |
| only on bounded sets | ||
| on | not Lipschitz | not smooth |
| linear map | 0 |
Composition multiplies constants: . So a network’s constant is at most the product of its layers’ constants.
- 1. Lipschitz constant of 5 sin(2x)?
- 2. Lipschitz constant of x² on [−4, 4]?
- 3. Smoothness constant of ½xᵀAx with eigenvalues 4 and 1?
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 45 minUndergraduate students and practising engineers.The descent lemma and the step size 1/L
If is -smooth, then for all :
So lies below a parabola touching it at . Minimize that parabola over and you get , with guaranteed progress:
That’s why step size is the textbook safe choice. Any step in still decreases . Beyond , GD on a quadratic diverges along the top eigenvector. Sharp minima (large ) need small steps. “Edge of stability” research shows that neural-net training often hovers right at (Cohen et al., 2021).
Rates for convex, -smooth with step : . If is also -strongly convex, the error shrinks like , governed by the condition number (A2.3-8, A6).
- 1. The safe GD step size for an L-smooth f is…
- 2. With L = 4, GD on a quadratic diverges for steps beyond…
- 3. The Lipschitz constant of x ↦ Wx is…
Level 3: Advanced
★★★★☆ Advanced⏱ 40 minGraduate level, with full derivations and proofs.Proof of the descent lemma
Let . Then
By Cauchy–Schwarz and -smoothness, the last integrand is at most . Integrating gives . ∎
Proof that compositions multiply
. ∎
Lipschitz vs continuity
- Lipschitz implies uniformly continuous: take . It also implies differentiability almost everywhere (Rademacher’s theorem).
- The converse fails. on is uniformly continuous, but .
- In between sits Hölder continuity, with . is -Hölder.
Why
Combine the descent lemma with convexity, . Each step satisfies . Summing telescopes to , using monotonicity of . ∎ (Nesterov, 2004, Thm 2.1.14.)
Exercise 3.1: Show that √x is not Lipschitz on [0, 1]
If it were, for all (taking ). That means , which fails for .
- 1. The descent lemma's proof integrates the gradient along…
- 2. Lipschitz implies…
- 3. √x is Hölder with exponent…
Level 4: Expert
★★★★★ Expert⏱ 45 minResearchers: original papers and open problems.Smoothness drives optimization theory
Every convergence rate in A6 is stated in terms of (and ):
- plain GD: ;
- Nesterov acceleration: , optimal for first-order methods (Nesterov, 1983);
- SGD: step sizes plus a variance term.
Estimating sets learning rates. For logistic regression, , computable by power iteration. Line searches (backtracking/Armijo) estimate adaptively.
Lipschitz networks: robustness, GANs, control
- Certified robustness. If the margin function (true logit minus the runner-up) is -Lipschitz, no perturbation with can flip the prediction (Tsuzuku et al., 2018; Practice Code 5). Randomized smoothing makes any classifier Lipschitz in a probabilistic sense (Cohen et al., 2019).
- Computing is hard. The product of spectral norms is a cheap upper bound but can be loose by orders of magnitude (Practice Code 4). The exact constant of a ReLU network is NP-hard to compute (Virmaux and Scaman, 2018). SDP relaxations give tighter certificates (Fazlyab et al., 2019).
- Wasserstein GANs need a 1-Lipschitz critic, enforced by gradient penalties (Gulrajani et al., 2017) or spectral normalization, which divides each layer by its top singular value (Miyato et al., 2018).
- Learned dynamics and control. A Lipschitz bound on a learned model’s error turns into robust MPC tubes and safety certificates. Spectrally normalized dynamics networks were used for stable drone landing near the ground (“Neural Lander”; Shi et al., 2019). Lipschitz constants also govern how well a learned policy transfers when the true system deviates.
- Neural ODEs and ResNets. A residual block is invertible if (i-ResNets; Behrmann et al., 2019). The ODE’s solution exists and is unique by Picard–Lindelöf, because the vector field is Lipschitz (a Banach fixed point, A3.5-1).
References
- Y. Nesterov (2004). Introductory Lectures on Convex Optimization. Kluwer.
- S. Bubeck (2015). “Convex optimization: algorithms and complexity.” Foundations and Trends in ML, 8(3–4).
- J. Cohen, S. Kaur, Y. Li, J. Z. Kolter, A. Talwalkar (2021). “Gradient descent on neural networks typically occurs at the edge of stability.” ICLR.
- Y. Tsuzuku, I. Sato, M. Sugiyama (2018). “Lipschitz-margin training.” NeurIPS.
- A. Virmaux, K. Scaman (2018). “Lipschitz regularity of deep neural networks: analysis and efficient estimation.” NeurIPS.
- M. Fazlyab, A. Robey, H. Hassani, M. Morari, G. Pappas (2019). “Efficient and accurate estimation of Lipschitz constants for deep neural networks.” NeurIPS.
- I. Gulrajani et al. (2017). “Improved training of Wasserstein GANs.” NeurIPS.
- T. Miyato et al. (2018). “Spectral normalization for generative adversarial networks.” ICLR.
- G. Shi et al. (2019). “Neural Lander: stable drone landing control using learned dynamics.” ICRA.
- J. Behrmann et al. (2019). “Invertible residual networks.” ICML.
- J. Cohen, E. Rosenfeld, J. Z. Kolter (2019). “Certified adversarial robustness via randomized smoothing.” ICML.