MVA · Course notes

Convex Optimization and Applications in Machine Learning

M2 MVA · Semester 1 · Learning · 5 ECTS

Contents

Introduction and overview

Module Convex Optimization and Applications in Machine Learning
Official title Convex optimization and applications in machine learning
Instructors A. D’ASPREMONT (master-mva.com, 2026–2027)
Period Semester 1 · period 1 (28/09/2026 – 08/01/2027)
Credits and volume 5 ECTS · 21 h (lectures 21 h) per the Université Paris-Saclay programme table
Label Learning · domains on master-mva.com: Theory
Language Not displayed (the master-mva.com course page is written in French)
Assessment Exam (“Examen”, master-mva.com; no format or weight displayed) · Université Paris-Saclay: “Evaluation Continue non Intégrale” (partial continuous assessment)
Prerequisites Notions of linear algebra (“Notions d’algèbre linéaire”, master-mva.com)
Note on sources master-mva.com announces 6 courses of 3 h; the Université Paris-Saclay table gives 21 h

Audience: a student with a good M1 in mathematics, computer science or physics who has already run gradient descent or called an optimization solver, and now wants to recognise convex problems, write their duals and know what the algorithms guarantee.

Empirical first: on a least-squares problem in dimension 500 with condition number 10^4, a thousand steps of gradient descent bring the gap f - f^* from 23.9 down to 0.012. Nesterov’s accelerated method uses the same thousand gradients, plus one line of code, and reaches 3.9 \times 10^{-6} (code in ch. 5).

An interior-point method solves a linear program with 100 constraints to eight digits in 54 Newton steps (ch. 6). Why the first method is slow, why the second is optimal, and why the third barely depends on the data are the questions of this course.

The course teaches how to recognise a convex problem, how to rewrite it in one of a few standard forms (linear, quadratic, second-order cone and semidefinite programs), how to read its dual, and how the two families of algorithms that solve it work: first-order methods, which scale to huge problems, and interior-point methods, which reach high accuracy in few iterations. It ends with applications in statistics, learning, finance and signal processing, and with convex relaxations of combinatorial problems.

It shares tools with Introduction to Statistical Learning and Foundations of Distributed and Large-Scale Computing Optimization, and prepares Kernel Methods, Inverse Problems and Imaging and Sequential Learning.

What you will be able to do

Official objectives and syllabus (2026–2027)

The course description on master-mva.com states one objective: to learn to recognise, manipulate and solve a relatively broad class of convex problems that arise in fields such as learning, finance or signal processing. It lists its themes under three headings (convex modelling, algorithms, applications), announces 6 lectures of 3 hours, an exam, and three reference books. The Université Paris-Saclay course detail gives the type of assessment and the volume, with no programme of its own.

Official topic Course section
Convex modelling (“Modélisation convexe”, heading of the first group of themes) ch. 1–ch. 4; the modelling transformations of ch. 3 (equivalent problems, Proposition 3.4, Examples 3.5–3.6)
Convex sets, functions and programs (“Ensembles, fonctions et programmes convexes”) ch. 1 (Definitions 1.1, 1.6, Example 1.2, Proposition 1.3); ch. 2 (Definition 2.1, Theorem 2.2, Propositions 2.4–2.5); ch. 3 (Definitions 3.1, 3.3, Theorem 3.2)
Review of convex analysis (“Rappels d’analyse convexe”) ch. 0 (dual norms, Schur complement, descent lemma); ch. 1 (projection, separation, dual cones: Theorems 1.4–1.5, Proposition 1.7); ch. 2 (conjugates, subgradients, smoothness and strong convexity: Definitions 2.6, 2.8, Propositions 2.9–2.10)
Duality (“Dualité”) ch. 4: weak duality, Slater’s theorem with proof, KKT conditions, sensitivity, SDP duality, water-filling (Proposition 4.2 to Example 4.9); Lagrangian relaxation in ch. 9
Algorithms (“Algorithmes”, heading of the second group) ch. 5–ch. 7
Interior-point methods (“Méthodes de points intérieurs”) ch. 6: Newton’s method, equality constraints, logarithmic barrier, central path, barrier method (Definition 6.1 to Example 6.8); primal–dual methods in ch. 10
Constraints, barriers, self-concordance and complexity (“Contraintes, barrières, self-concordance et complexité”) Constraints and barriers: Proposition 6.4, Definition 6.5, Proposition 6.6, Algorithm 6.7; self-concordance and complexity: ch. 7 (Definitions 7.1, 7.6, Proposition 7.3, Theorems 7.4 and 7.7)
First-order methods, acceleration (“Méthodes du premier ordre, accélération”) ch. 5: gradient descent, lower bound, Nesterov’s method, subgradient and proximal methods (Theorems 5.2–5.9); complete lower-bound proof and Frank–Wolfe in ch. 10
Applications (“Applications”, heading of the third group) ch. 8–ch. 9
Statistics and learning (“Statistiques et apprentissage”) ch. 8: convex maximum likelihood and logistic regression (Proposition 8.1), the LASSO with ISTA and FISTA (Example 8.2), SVMs and sparse inverse covariance (note)
Finance (“Finance”) ch. 8: Markowitz portfolio optimization (Example 8.3), value-at-risk and robust constraints as second-order cone constraints (Proposition 8.4)
Signal processing (“Traitement du signal”) ch. 8: total-variation denoising and its dual (Example 8.5), basis pursuit and exact sparse recovery (Theorem 8.6)
Combinatorics, convex relaxations (“Combinatoire, relaxations convexes”) ch. 9: Lagrangian and semidefinite relaxations (Example 9.1, Proposition 9.2), MAXCUT and Goemans–Williamson rounding (Definition 9.3, Theorem 9.4, Example 9.5), envelopes of cardinality and rank, sparse PCA
“Plus de détails” (item of the list) Not a topic: a link to further details on master-mva.com
“Les intervenants” (last item of the list) Not a topic: the heading above the instructor’s name, Alexandre d’Aspremont (CNRS – ENS Paris, as listed on master-mva.com)
Organisation: 6 lectures of 3 hours Session plan: sessions 1–6, plus a seventh session to reach the official 21 h
Assessment: exam (“Examen”, master-mva.com); “Evaluation Continue non Intégrale” (Université Paris-Saclay, “Nature de l’évaluation”) Projects and assessment: written exam proposal, projects for practice

Every official topic is taught on this page. The extensions beyond the syllabus are the review of ch. 0, the proximal methods of ch. 5, and two self-study chapters: complements (the complete lower-bound proof, Frank–Wolfe, primal–dual interior-point methods) in ch. 10, and research directions in ch. 11.

Where this course fits in the programme

Official prerequisites: notions of linear algebra. The page also uses multivariable calculus at M1 level; ch. 0 reviews everything that is needed.

Course outline

Session plan

21 h in class = 7 sessions of 3 h. The volume is the official one of the Université Paris-Saclay programme table: 21 h of lectures. master-mva.com announces 6 lectures of 3 h, that is 18 h; the plan keeps lectures of 3 h and gives the remaining 3 h to a seventh session on applications and convex relaxations. This split, and the content of each session, is a proposal.

Level 1 = foundations, 2 = core results and algorithms, 3 = advanced and research-level material. The level never goes down from one session to the next.

Session Hours Level Content Practice
1 3 h 1 ch. 0 Review: dual norms, Schur complement, descent lemma (0.1–0.7); ch. 1 Convex sets, projection, separation, dual cones (1.1–1.8) Ex. 1, 7 (a)
2 3 h 1 ch. 2 Convex functions, operations, conjugates, subgradients, smoothness and strong convexity (2.1–2.10) Ex. 2
3 3 h 2 ch. 3 Convex programs, global optimality, modelling, LP, QP, SOCP, SDP (3.1–3.6) Ex. 7 (b); lab: Chebyshev centre (Example 3.6)
4 3 h 2 ch. 4 Lagrange duality, Slater’s theorem, KKT, sensitivity, SDP duality, water-filling (4.1–4.9) Ex. 3, 8, 9
5 3 h 2 ch. 5 Gradient descent, lower bound, Nesterov’s method, subgradient and proximal methods (5.1–5.9) Ex. 4, 5, 10
6 3 h 3 ch. 6 Newton’s method, barrier, central path, barrier method (6.1–6.8); ch. 7 Self-concordance and complexity (7.1–7.7) Ex. 6, 11
7 3 h 3 ch. 8 Applications in statistics, learning, finance and signal processing (8.1–8.6); ch. 9 Convex relaxations, MAXCUT, Goemans–Williamson (9.1–9.5) Ex. 12, 13

Self-study, outside the 21 h (about 6 h in total): ch. 10 Complements: proof of the lower bound, Frank–Wolfe, primal–dual interior-point methods, mirror descent (≈ 3 h, with Ex. 14) · ch. 11 Research directions and open problems (≈ 3 h, with Ex. 15 and 16).

How to study this module

0. Review: norms, symmetric matrices and smooth functions

Convex optimization uses three M1 tools constantly: norms and their duals, symmetric matrices and their eigenvalues, and Taylor expansions of smooth functions. This chapter states them in the form used later.

The Linear Algebra, Analysis and Optimization refresher covers the same ground at a slower pace.

Norms and dual norms

Definition 0.1 — Dual norm For a norm \|\cdot\| on \mathbb{R}^n, the dual norm is \|y\|_* = \sup_{\|x\| \le 1} y^\top x . By construction y^\top x \le \|x\| \, \|y\|_* for all x, y (Hölder’s inequality).

The Euclidean norm is its own dual. The dual of \|\cdot\|_1 is \|\cdot\|_\infty and conversely, and the dual of \|\cdot\|_p is \|\cdot\|_q with 1/p + 1/q = 1.

Symmetric matrices

Proposition 0.2 — Spectral theorem and positive semidefinite matrices Every symmetric matrix A \in \mathbb{S}^n writes A = U \Lambda U^\top with U orthogonal and \Lambda real diagonal. Consequently, for all x, \lambda_{\min}(A) \, \|x\|_2^2 \le x^\top A x \le \lambda_{\max}(A) \, \|x\|_2^2 . A is positive semidefinite, A \succeq 0, when x^\top A x \ge 0 for all x, that is when all its eigenvalues are nonnegative; A \succ 0 when they are positive.

The inner product on \mathbb{S}^n is \langle A, B \rangle = \mathrm{tr}(AB).

Proposition 0.3 — Schur complement Let C \succ 0. Then \begin{pmatrix} A & B \\ B^\top & C \end{pmatrix} \succeq 0 \iff A - B C^{-1} B^\top \succeq 0 .

Proof. The block matrix equals P^\top \, \mathrm{diag}(A - BC^{-1}B^\top, C) \, P with the invertible matrix P = \begin{pmatrix} I & 0 \\ C^{-1} B^\top & I \end{pmatrix} . A congruence by an invertible matrix preserves positive semidefiniteness, and a block-diagonal matrix is positive semidefinite exactly when its blocks are. ∎

Gradients, Hessians and smoothness

Definition 0.4 — Taylor’s formula with integral remainder For f : \mathbb{R}^n \to \mathbb{R} twice continuously differentiable, f(y) = f(x) + \nabla f(x)^\top (y - x) + \int_0^1 (1 - s) \, (y - x)^\top \nabla^2 f(x + s(y - x)) \, (y - x) \, ds , \nabla f(y) - \nabla f(x) = \int_0^1 \nabla^2 f(x + s(y - x)) \, (y - x) \, ds . Two gradients are used throughout: \nabla \tfrac12 \|Ax - b\|_2^2 = A^\top (Ax - b), and \nabla \log\det X = X^{-1} on positive definite matrices.

Proposition 0.5 — Descent lemma If \nabla f is L-Lipschitz, that is \|\nabla f(x) - \nabla f(y)\|_2 \le L \|x - y\|_2, then for all x, y f(y) \le f(x) + \nabla f(x)^\top (y - x) + \frac{L}{2} \|y - x\|_2^2 . Such an f is called L-smooth.

Proof. By the fundamental theorem of calculus along the segment, f(y) - f(x) - \nabla f(x)^\top (y - x) = \int_0^1 \big(\nabla f(x + s(y - x)) - \nabla f(x)\big)^\top (y - x) \, ds . By Cauchy–Schwarz and the Lipschitz bound, the integrand is at most L s \|y - x\|_2^2, whose integral is \frac{L}{2}\|y - x\|_2^2. ∎

Optimality without inequality constraints

Proposition 0.6 — Fermat’s rule and Lagrange multipliers If x^* is a local minimum of a differentiable f on \mathbb{R}^n, then \nabla f(x^*) = 0, and \nabla^2 f(x^*) \succeq 0 if f is twice differentiable.

Now add the constraint h(x) = 0, with h : \mathbb{R}^n \to \mathbb{R}^p continuously differentiable.

If x^* is a local minimum of f under this constraint, and the Jacobian of h at x^* has rank p, there exists \nu \in \mathbb{R}^p with \nabla f(x^*) + \sum_{j=1}^p \nu_j \nabla h_j(x^*) = 0 . These conditions are only necessary. For convex problems they become sufficient (ch. 2 and 4), which is the first reason convexity matters.

Example 0.7 — A badly conditioned quadratic Let f(x) = \frac12 (x_1^2 + 100 x_2^2). Its gradient is (x_1, 100 x_2) and its Hessian is \mathrm{diag}(1, 100).

So f is L-smooth with L = 100, and the minimizer is 0.

The gradient step x - \nabla f(x)/L maps (x_1, x_2) to (0.99 \, x_1, \ 0) . The steep coordinate is solved in one step, but the flat one shrinks by only 1 % per step: about 460 steps to divide it by 100. The ratio 100 of the extreme curvatures, the condition number, sets the speed of gradient methods (ch. 5).

Key takeaways — chapter 0

  • The dual norm turns y^\top x into a product of norms; \ell_1 and \ell_\infty are dual, \ell_2 is self-dual.
  • Positive semidefiniteness is read on eigenvalues, and block matrices are tested by Schur complements.
  • Taylor’s formula with integral remainder gives the descent lemma: an L-smooth function lies below a quadratic.
  • Stationarity is necessary for a minimum; convexity will make it sufficient.

1. Convex sets

Every convex program optimizes over a convex set, and every duality argument rests on separating convex sets by hyperplanes. This chapter lists the convex sets used in the course, the operations that preserve convexity, and the two geometric tools: projection and separation.

Definition 1.1 — Convex set, cone, convex hull A set C \subseteq \mathbb{R}^n is convex if \theta x + (1 - \theta) y \in C for all x, y \in C and \theta \in [0, 1].

It is a cone if \theta x \in C for all x \in C and \theta \ge 0, and a convex cone if it is both.

The convex hull \mathrm{conv}\, S is the set of convex combinations \sum_i \theta_i x_i of points of S, with \theta_i \ge 0 and \sum_i \theta_i = 1. It is the smallest convex set containing S.

Example 1.2 — The catalogue

  • Hyperplanes \{x : a^\top x = b\} and halfspaces \{x : a^\top x \le b\}, with a \neq 0.
  • Norm balls \{x : \|x - x_c\| \le r\} and ellipsoids \{x_c + P u : \|u\|_2 \le 1\}.
  • Polyhedra \{x : Ax \preceq b, \ Cx = d\}, where \preceq is componentwise; the probability simplex is one.
  • The second-order cone \{(u, t) : \|u\|_2 \le t\}.
  • The positive semidefinite cone \mathbb{S}^n_+. It is convex because it is the intersection, over all z, of the halfspaces \{X : z^\top X z \ge 0\}.

Proposition 1.3 — Operations that preserve convexity

  • Intersection of any family of convex sets.
  • Image and inverse image under an affine map x \mapsto Ax + b.
  • Image and inverse image under the perspective map (z, t) \mapsto z/t on t > 0, and under linear-fractional maps.

For example, the solution set of a linear matrix inequality, \{x : x_1 A_1 + \dots + x_n A_n \preceq B\} with symmetric A_i and B, is convex. It is the inverse image of the cone \mathbb{S}^m_+ under the affine map x \mapsto B - \sum_i x_i A_i.

Proof. For affine images: if y_1 = Ax_1 + b and y_2 = Ax_2 + b with x_1, x_2 \in C, then \theta y_1 + (1 - \theta) y_2 = A\big(\theta x_1 + (1 - \theta) x_2\big) + b is the image of a point of C. Inverse images and intersections are checked the same way; for perspectives, see Boyd and Vandenberghe (2004, §2.3). ∎

Projection and separation

Theorem 1.4 — Projection onto a closed convex set Let C be nonempty, closed and convex, and x \in \mathbb{R}^n. There is a unique point P_C(x) \in C closest to x in Euclidean norm. It is characterised by \big(x - P_C(x)\big)^\top \big(z - P_C(x)\big) \le 0 \quad \text{for all } z \in C . Moreover P_C is non-expansive: \|P_C(x) - P_C(y)\|_2 \le \|x - y\|_2 .

Proof.

  • Existence: for any z_0 \in C, minimize the continuous function z \mapsto \|x - z\|_2 on the compact set of points of C at distance at most \|x - z_0\|_2 from x.
  • Characterization: let p = P_C(x), z \in C and \theta \in (0, 1]. The point p + \theta (z - p) is in C, so expanding \|x - p - \theta(z - p)\|_2^2 \ge \|x - p\|_2^2 gives -2\theta \, (x - p)^\top (z - p) + \theta^2 \|z - p\|_2^2 \ge 0 . Divide by \theta and let \theta \to 0. Conversely, if the inequality holds, then for every z \in C \|x - z\|^2 = \|x - p\|^2 - 2(x - p)^\top (z - p) + \|z - p\|^2 \ge \|x - p\|^2 .
  • Uniqueness and non-expansiveness: with p = P_C(x) and q = P_C(y), add the characterizations (x - p)^\top (q - p) \le 0 and (y - q)^\top (p - q) \le 0. This gives \|p - q\|_2^2 \le (x - y)^\top (p - q) \le \|x - y\|_2 \, \|p - q\|_2 . With x = y it forces p = q. ∎

Theorem 1.5 — Separating and supporting hyperplanes

  1. If C is nonempty, closed and convex and x_0 \notin C, there are a \neq 0 and b with a^\top z \le b < a^\top x_0 for all z \in C (strict separation).
  2. If C and D are disjoint nonempty convex sets, there are a \ne 0 and b such that a^\top x \le b \ \text{ on } C, \qquad a^\top x \ge b \ \text{ on } D .
  3. At every boundary point x_0 of a convex set C there is a supporting hyperplane: some a \neq 0 with a^\top z \le a^\top x_0 for all z \in C.

Consequently, a closed convex set is the intersection of the halfspaces that contain it.

Proof. Part 1: let p = P_C(x_0) and a = x_0 - p \neq 0. Theorem 1.4 gives a^\top z \le a^\top p for all z \in C, and a^\top x_0 - a^\top p = \|a\|_2^2 > 0. Take b = a^\top p.

Part 3: take points x_k outside the closure of C converging to x_0, separate them by Part 1 with unit normals a_k, and extract a convergent subsequence of the a_k.

Part 2: apply the same limiting argument to the convex set C - D, which does not contain 0 (Boyd and Vandenberghe 2004, §2.5). ∎

Definition 1.6 — Dual cone and generalized inequality The dual cone of a cone K is K^* = \{ y : y^\top x \ge 0 \text{ for all } x \in K \} . A closed convex cone K with nonempty interior that contains no line is called proper. It defines the generalized inequality x \preceq_K y \iff y - x \in K.

Proposition 1.7 — Self-dual cones The nonnegative orthant, the second-order cone and \mathbb{S}^n_+ are self-dual: K^* = K. The dual of the norm cone \{(x, t) : \|x\| \le t\} is the cone \{(y, s) : \|y\|_* \le s\} of the dual norm.

Proof. For \mathbb{S}^n_+: if X, Y \succeq 0, then \mathrm{tr}(XY) = \mathrm{tr}(X^{1/2} Y X^{1/2}) \ge 0, so \mathbb{S}^n_+ \subseteq (\mathbb{S}^n_+)^*.

Conversely, if \mathrm{tr}(XY) \ge 0 for all X \succeq 0, take X = z z^\top: then z^\top Y z \ge 0 for all z, so Y \succeq 0. ∎

Example 1.8 — Projection onto the simplex The projection onto the probability simplex \Delta = \{x \succeq 0, \ \mathbf{1}^\top x = 1\} has the form P_\Delta(v) = \max(v - \tau \mathbf{1}, \ 0) , where the threshold \tau makes the result sum to 1. Sorting v finds \tau in O(n \log n) operations.

The code checks the characterization of Theorem 1.4 on 10 000 random points of the simplex: the largest value of (v - P_\Delta(v))^\top (z - P_\Delta(v)) is -6.2 \times 10^{-4}, negative as it must be.

import numpy as np

def proj_simplex(v):
    """Euclidean projection of v onto {x >= 0, sum(x) = 1} (sort-based)."""
    u = np.sort(v)[::-1]
    css = np.cumsum(u) - 1.0
    k = np.arange(1, v.size + 1)
    rho = np.nonzero(u - css / k > 0)[0][-1]   # last index with a positive entry
    tau = css[rho] / (rho + 1)
    return np.maximum(v - tau, 0.0)

rng = np.random.default_rng(0)
v = rng.normal(size=6)
p = proj_simplex(v)
print("v      =", np.round(v, 3))
print("P(v)   =", np.round(p, 3), " sum =", p.sum().round(12))

# Check the obtuse-angle characterization (Theorem 1.4) on random simplex points
Z = rng.dirichlet(np.ones(6), size=10_000)
print("max_z (v - P(v))^T (z - P(v)) =", ((Z - p) @ (v - p)).max().round(12))

Key takeaways — chapter 1

  • Halfspaces, balls, ellipsoids, polyhedra, the second-order cone and the semidefinite cone are the building blocks; intersections and affine maps preserve convexity.
  • The projection onto a closed convex set exists, is unique, is characterised by an obtuse-angle inequality, and is non-expansive.
  • Separation and supporting hyperplanes follow from the projection; they are the engine of duality in ch. 4.
  • The orthant, the second-order cone and the semidefinite cone are self-dual, which is why their duals look like the primals.

2. Convex functions and convex analysis

Convex functions are the objectives and constraints of convex programs. This chapter gives the tests that recognise them, the operations that build new ones, and the three objects of convex analysis that every algorithm uses: the conjugate, the subdifferential, and the smoothness and strong-convexity constants.

Definition 2.1 — Convex, strictly convex and strongly convex functions A function f : \mathbb{R}^n \to \mathbb{R} \cup \{+\infty\} with convex domain \mathrm{dom}\, f = \{x : f(x) < \infty\} is convex if, for x, y \in \mathrm{dom}\, f and \theta \in [0, 1], f(\theta x + (1 - \theta) y) \le \theta f(x) + (1 - \theta) f(y) . Equivalently, its epigraph \{(x, t) : f(x) \le t\} is a convex set.

It is strictly convex if the inequality is strict for x \neq y and \theta \in (0, 1), and \mu-strongly convex (\mu > 0) if f - \frac{\mu}{2}\|\cdot\|_2^2 is convex. It is concave if -f is convex.

Theorem 2.2 — First- and second-order conditions Let f be differentiable on an open convex domain. Then f is convex if and only if f(y) \ge f(x) + \nabla f(x)^\top (y - x) \quad \text{for all } x, y . If f is twice differentiable, f is convex if and only if \nabla^2 f(x) \succeq 0 for all x.

The tangent plane is a global under-estimator: local information gives a global bound. In particular, \nabla f(x^*) = 0 makes x^* a global minimizer.

Proof.

  • (\Rightarrow) For \theta \in (0, 1], convexity gives f(x + \theta(y - x)) \le f(x) + \theta (f(y) - f(x)). Subtract f(x), divide by \theta and let \theta \to 0.
  • (\Leftarrow) Let z = \theta x + (1 - \theta) y. Write the inequality at z towards both points, multiply by \theta and 1 - \theta, and add. The gradient terms cancel, leaving \theta f(x) + (1 - \theta) f(y) \ge f(z) .
  • Second order: if \nabla^2 f \succeq 0, the remainder in Taylor’s formula (Definition 0.4) is nonnegative, which is the first-order condition.
  • Conversely, g(s) = f(x + s v) is convex. Adding the first-order inequality at s towards 0 and at 0 towards s gives (g'(s) - g'(0)) s \ge 0. So g' is nondecreasing, and g''(0) = v^\top \nabla^2 f(x) v \ge 0 . ∎

Example 2.3 — A catalogue of convex functions

  • On \mathbb{R}: the exponential e^{ax}, the negative logarithm -\log x and the negative entropy x \log x.
  • The powers x^p on x > 0, for p \ge 1 or p \le 0.
  • Every norm, by the triangle inequality and homogeneity.
  • \max_i x_i, and its smooth version log-sum-exp f(x) = \log \sum_i e^{x_i}, which satisfies \max_i x_i \le f(x) \le \max_i x_i + \log n .
  • The quadratic-over-linear function x^2 / y on y > 0, and -\log\det X on positive definite matrices.

Proposition 2.4 — Two Hessian computations Log-sum-exp is convex, and \log\det is concave on positive definite matrices.

Proof.

  • With z_i = e^{x_i}, the Hessian of log-sum-exp is \nabla^2 f(x) = \frac{\mathrm{diag}(z)}{\mathbf{1}^\top z} - \frac{z z^\top}{(\mathbf{1}^\top z)^2} , and v^\top \nabla^2 f(x) v \ge 0 is the Cauchy–Schwarz inequality (\sum_i z_i v_i)^2 \le (\sum_i z_i)(\sum_i z_i v_i^2).
  • For \log\det, restrict to a line X = Z + tV with Z \succ 0. With \lambda_i the eigenvalues of Z^{-1/2} V Z^{-1/2}, \log\det(Z + tV) = \log\det Z + \sum_i \log(1 + t \lambda_i) , a sum of concave functions of t. ∎

Proposition 2.5 — Operations that preserve convexity

  • Nonnegative weighted sums, and composition with an affine map, x \mapsto f(Ax + b).
  • Pointwise supremum f(x) = \sup_{y \in \mathcal{A}} g(x, y) of functions convex in x: its epigraph is an intersection of epigraphs. Example: \lambda_{\max}(X) = \sup_{\|y\|_2 = 1} y^\top X y is convex.
  • Composition h(g(x)) with h convex and nondecreasing and g convex (and the other sign rules of the composition calculus).
  • Partial minimization g(x) = \inf_{y \in C} f(x, y) of a jointly convex f over a convex set C, when g > -\infty. Example: the distance to a convex set.
  • Perspective (x, t) \mapsto t f(x / t) on t > 0.

Jensen’s inequality f(\mathbb{E} X) \le \mathbb{E} f(X) extends Definition 2.1 to all probability distributions.

Proof. For partial minimization: given x_1, x_2 and \varepsilon > 0, pick y_i \in C with f(x_i, y_i) \le g(x_i) + \varepsilon. Joint convexity gives g(\theta x_1 + (1 - \theta) x_2) \le f\big(\theta x_1 + (1 - \theta) x_2, \ \theta y_1 + (1 - \theta) y_2\big) \le \theta g(x_1) + (1 - \theta) g(x_2) + \varepsilon . Let \varepsilon \to 0. ∎

Conjugate functions

Definition 2.6 — Convex conjugate The conjugate of f is f^*(y) = \sup_{x \in \mathrm{dom} f} \big( y^\top x - f(x) \big) . It is convex, as a supremum of affine functions of y, even when f is not. It satisfies the Fenchel–Young inequality f(x) + f^*(y) \ge x^\top y.

If f is convex and closed (lower semicontinuous), then f^{**} = f: this is the Fenchel–Moreau theorem (Rockafellar 1970, §12).

Example 2.7 — Conjugates used later

f(x) f^*(y)
\frac12 x^\top Q x, Q \succ 0 \frac12 y^\top Q^{-1} y
\|x\| (any norm) 0 if \|y\|_* \le 1, +\infty otherwise
-\log x on x > 0 -1 - \log(-y) on y < 0
\sum_i x_i \log x_i on the simplex \log \sum_i e^{y_i}
e^x y \log y - y on y \ge 0 (value 0 at y = 0)

For the norm, suppose first \|y\|_* > 1. Some x with \|x\| \le 1 has y^\top x > 1, and its multiples tx make t(y^\top x - \|x\|) unbounded.

If instead \|y\|_* \le 1, then y^\top x \le \|x\| for all x, with equality at x = 0, so the supremum is 0.

Subgradients

Definition 2.8 — Subgradient and subdifferential A vector g is a subgradient of a convex f at x if f(y) \ge f(x) + g^\top (y - x) \quad \text{for all } y . The set \partial f(x) of subgradients is the subdifferential. It is closed and convex, it equals \{\nabla f(x)\} where f is differentiable, and it is nonempty at every interior point of the domain: apply the supporting hyperplane theorem (Theorem 1.5) to the epigraph at (x, f(x)).

Proposition 2.9 — Fermat’s rule and subdifferential calculus

  • x^* minimizes a convex f if and only if 0 \in \partial f(x^*), by the definition.
  • The subdifferential of a sum contains the sum of the subdifferentials, with equality when the relative interiors of the domains intersect (Rockafellar 1970, §23): \partial (f_1 + f_2)(x) \supseteq \partial f_1(x) + \partial f_2(x) .
  • \partial |x| = \{\mathrm{sign}(x)\} for x \neq 0 and [-1, 1] at 0; \partial \|x\|_1 is the product of these sets.
  • For any norm, \partial \|x\| = \{ g : \|g\|_* \le 1, \ g^\top x = \|x\| \}.
  • For f = \max_i f_i with differentiable convex f_i, \partial f(x) is the convex hull of the gradients of the f_i that attain the maximum.

Smoothness and strong convexity

Proposition 2.10 — Two-sided quadratic bounds If f is L-smooth (Proposition 0.5) and \mu-strongly convex, then for all x, y \frac{\mu}{2} \|y - x\|_2^2 \le f(y) - f(x) - \nabla f(x)^\top (y - x) \le \frac{L}{2} \|y - x\|_2^2 . For twice differentiable f this reads \mu I \preceq \nabla^2 f \preceq L I. The ratio \kappa = L / \mu is the condition number.

Minimizing both bounds over y gives, with f^* = \min f, \frac{1}{2L} \|\nabla f(x)\|_2^2 \le f(x) - f^* \le \frac{1}{2\mu} \|\nabla f(x)\|_2^2 . The left inequality needs only smoothness; it says that a large gradient means a large gap.

Key takeaways — chapter 2

  • Convexity is tested by the tangent inequality or by a positive semidefinite Hessian; restricting to lines reduces matrix functions to one variable.
  • Sums, affine compositions, suprema, partial minimization and perspectives preserve convexity: this calculus is how convexity is proved in practice.
  • The conjugate is always convex; its table turns into a table of duals in ch. 4.
  • Subgradients extend gradients to nonsmooth functions, and 0 \in \partial f(x^*) characterizes minimizers.
  • The constants L and \mu sandwich f between two quadratics; their ratio \kappa governs first-order methods.

3. Convex optimization problems

A convex program minimizes a convex function over a set described by convex inequalities and affine equalities. This chapter gives the standard form, the property that makes these problems tractable (every local minimum is global), and the hierarchy of conic programs into which modelling translates applied problems.

Definition 3.1 — Convex program in standard form \begin{array}{ll} \text{minimize} & f_0(x) \\ \text{subject to} & f_i(x) \le 0, \quad i = 1, \dots, m, \\ & Ax = b , \end{array} with f_0, \dots, f_m convex. The optimal value p^* is the infimum of f_0 over the feasible set: +\infty if it is empty, -\infty if f_0 is unbounded below on it.

A feasible x is \varepsilon-suboptimal if f_0(x) \le p^* + \varepsilon.

Theorem 3.2 — Local minima are global; optimality condition For a convex program, every locally optimal point is globally optimal, and the optimal set is convex. If f_0 is differentiable, a feasible x is optimal if and only if \nabla f_0(x)^\top (y - x) \ge 0 \quad \text{for every feasible } y .

Proof.

  • Let x be locally optimal and suppose a feasible y has f_0(y) < f_0(x). The points x + \theta (y - x) are feasible, and by convexity, for every \theta \in (0, 1], f_0\big(x + \theta (y - x)\big) \le (1 - \theta) f_0(x) + \theta f_0(y) < f_0(x) . Arbitrarily small \theta gives points arbitrarily close to x with a smaller value, which contradicts local optimality.
  • The optimal set is the intersection of the feasible set with the sublevel set \{f_0 \le p^*\}, two convex sets.
  • Sufficiency of the condition is Theorem 2.2: f_0(y) \ge f_0(x) + \nabla f_0(x)^\top (y - x) \ge f_0(x).
  • Necessity: if \nabla f_0(x)^\top (y - x) < 0 for a feasible y, small steps from x towards y stay feasible and decrease f_0. ∎

Equivalent problems

Modelling means rewriting a problem until a standard form appears. Four transformations are used constantly.

The conic hierarchy

Definition 3.3 — LP, QP, SOCP, SDP

  • Linear program (LP): minimize c^\top x subject to Gx \preceq h and Ax = b.
  • Quadratic program (QP): minimize \frac12 x^\top P x + q^\top x with P \succeq 0, under affine constraints. A QCQP also allows convex quadratic constraints.
  • Second-order cone program (SOCP): minimize f^\top x subject to Fx = g and \|A_i x + b_i\|_2 \le c_i^\top x + d_i , \quad i = 1, \dots, m .
  • Semidefinite program (SDP): minimize c^\top x subject to Ax = b and the linear matrix inequality x_1 F_1 + \dots + x_n F_n + G \preceq 0 , \qquad F_i, G \in \mathbb{S}^k . Its standard form is: minimize \mathrm{tr}(CX) subject to \mathrm{tr}(A_i X) = b_i and X \succeq 0.

Each class contains the previous one: LP \subset QP \subset QCQP \subset SOCP \subset SDP.

Proposition 3.4 — From quadratic to cone to semidefinite constraints

  • A convex quadratic constraint x^\top P x + s(x) \le 0, with P = R^\top R and s(x) = q^\top x + r affine, is the second-order cone constraint \left\| \begin{pmatrix} 2 R x \\ 1 + s(x) \end{pmatrix} \right\|_2 \le 1 - s(x) .
  • A second-order cone constraint is a linear matrix inequality: \|u\|_2 \le t \iff \begin{pmatrix} t I & u \\ u^\top & t \end{pmatrix} \succeq 0 .

Proof.

  • If the cone constraint holds, its right-hand side 1 - s is nonnegative, and squaring gives 4\|Rx\|_2^2 + (1 + s)^2 \le (1 - s)^2, that is \|Rx\|_2^2 \le -s. Conversely, \|Rx\|_2^2 \le -s gives s \le 0, so 1 - s > 0 and the square root of the squared inequality is the cone constraint.
  • For t > 0, the Schur complement (Proposition 0.3) with respect to the scalar block t gives tI - u u^\top / t \succeq 0, that is t^2 \ge \|u\|_2^2.
  • For t = 0, both sides force u = 0: a positive semidefinite matrix with a zero diagonal entry has a zero row. For t < 0 both sides fail. ∎

Example 3.5 — Modelling with the hierarchy

  • \ell_\infty regression \min \|Ax - b\|_\infty is the LP: minimize t subject to -t \mathbf{1} \preceq Ax - b \preceq t \mathbf{1}.
  • Least squares with bounds on x is a QP.
  • A robust constraint a^\top x \le b for every a in the ellipsoid \{\bar a + P u : \|u\|_2 \le 1\} is an SOC constraint. Indeed \sup_{\|u\|_2 \le 1} (Pu)^\top x = \|P^\top x\|_2, so it reads \bar a^\top x + \|P^\top x\|_2 \le b .
  • Minimizing the largest eigenvalue \lambda_{\max}(A_0 + \sum_i x_i A_i) is the SDP: minimize t subject to A_0 + \sum_i x_i A_i \preceq t I.

Example 3.6 — The Chebyshev centre of a polyhedron is an LP The ball \{x_c + u : \|u\|_2 \le r\} lies in the halfspace a_i^\top x \le b_i if and only if a_i^\top x_c + r \|a_i\|_2 \le b_i, because the supremum of a_i^\top u over the ball is r \|a_i\|_2 (Definition 0.1). Maximizing r under these linear constraints is an LP.

For the triangle x \succeq 0, x_1 + x_2 \le 4, cut by x_1 - 2 x_2 \le 2, the code finds the incircle of the triangle: x_c = (1.1716, \ 1.1716), \qquad r = 4 - 2\sqrt{2} = 1.1716 . The fourth constraint is inactive (slack 0.55) and the solver reports a zero dual variable for it, a fact that complementary slackness will explain.

import numpy as np
from scipy.optimize import linprog

# Polyhedron {x : a_i^T x <= b_i}: a triangle cut by a fourth half-plane
A = np.array([[-1.0, 0.0], [0.0, -1.0], [1.0, 1.0], [1.0, -2.0]])
b = np.array([0.0, 0.0, 4.0, 2.0])

# Chebyshev centre: maximize r s.t. a_i^T x + r ||a_i||_2 <= b_i  (variables x1, x2, r)
norms = np.linalg.norm(A, axis=1)
res = linprog(c=[0, 0, -1], A_ub=np.c_[A, norms], b_ub=b,
              bounds=[(None, None), (None, None), (0, None)], method="highs")
xc, r = res.x[:2], res.x[2]
print("centre =", np.round(xc, 4), " radius =", round(r, 4))
print("slacks b - A xc - r||a|| =", np.round(b - A @ xc - r * norms, 4))
print("dual variables (marginals) =", np.round(-res.ineqlin.marginals, 4))

Modelling languages CVX (Grant and Boyd 2008) and CVXPY (Diamond and Boyd 2016) implement the rules of Proposition 2.5: an expression is accepted when its convexity follows from the composition rules. It is then rewritten, with the transformations above, into a conic program handed to an interior-point or first-order solver. The code on this page uses only NumPy and SciPy, to show what such tools do inside.

Key takeaways — chapter 3

  • In a convex program every local minimum is global, and optimality is a first-order condition on feasible directions.
  • Epigraphs, slacks, splitting and auxiliary variables turn applied problems into standard forms.
  • LP, QP, SOCP and SDP form a nested hierarchy; Schur complements move constraints up the hierarchy.
  • Robust and norm constraints are second-order cone constraints; eigenvalue constraints are semidefinite.

4. Duality

Every optimization problem comes with a dual: a concave maximization whose value bounds the primal optimum from below. When the bound is tight, the dual variables certify optimality, measure the sensitivity of the optimum to the constraints, and often give a simpler problem to solve.

Definition 4.1 — Lagrangian and dual function For the problem of Definition 3.1, convex or not, the Lagrangian is L(x, \lambda, \nu) = f_0(x) + \sum_{i=1}^m \lambda_i f_i(x) + \nu^\top (Ax - b) , and the dual function is g(\lambda, \nu) = \inf_x L(x, \lambda, \nu), the infimum being over the common domain \mathcal{D} of the f_i. As a pointwise infimum of affine functions of (\lambda, \nu), g is concave.

The dual problem maximizes g(\lambda, \nu) over \lambda \succeq 0; its value is d^*.

Proposition 4.2 — Weak duality For every \lambda \succeq 0 and every \nu, g(\lambda, \nu) \le p^*. Hence d^* \le p^* .

Proof. For feasible x, each \lambda_i f_i(x) \le 0 and Ax - b = 0, so g(\lambda, \nu) \le L(x, \lambda, \nu) \le f_0(x). Take the infimum over feasible x. ∎

For a feasible x and a dual feasible (\lambda, \nu), the duality gap f_0(x) - g(\lambda, \nu) bounds the suboptimality of x. It is the stopping criterion of the solvers of ch. 6.

Example 4.3 — Three duals

  • LP in standard form: minimize c^\top x subject to Ax = b, x \succeq 0. The Lagrangian c^\top x - \lambda^\top x + \nu^\top (Ax - b) is affine in x.

    It is bounded below only if c + A^\top \nu - \lambda = 0. With y = -\nu, the dual is \text{maximize } b^\top y \quad \text{s.t.} \quad A^\top y \preceq c .

  • Least norm: minimize \|x\|_2^2 subject to Ax = b. The Lagrangian is minimized at x = -A^\top \nu / 2, and g(\nu) = -\tfrac14 \nu^\top A A^\top \nu - b^\top \nu .

  • Through conjugates: for minimize f_0(x) subject to Ax \preceq b and Cx = d, g(\lambda, \nu) = -b^\top \lambda - d^\top \nu - f_0^*(-A^\top \lambda - C^\top \nu) , so the table of conjugates (Example 2.7) is a table of duals.

Theorem 4.4 — Slater’s theorem Suppose the problem is convex and satisfies Slater’s condition: some \tilde x in the relative interior of \mathcal{D} is strictly feasible, f_i(\tilde x) < 0 for all i and A \tilde x = b. Then strong duality holds, and the dual optimum is attained when p^* is finite: d^* = p^* . Affine inequalities need not hold strictly; in particular a feasible LP with finite value has a zero duality gap.

Proof. We prove it with inequality constraints only and p^* finite; equality constraints add a relative-interior argument (Boyd and Vandenberghe 2004, §5.3.2).

  • Consider the set of pairs (u, t) achievable by some point of the domain: \mathcal{A} = \{ (u, t) : \exists x \in \mathcal{D}, \ f_i(x) \le u_i \text{ for all } i, \ f_0(x) \le t \} . It is convex because the f_i are. It does not meet \mathcal{B} = \{(0, s) : s < p^*\}.
  • Theorem 1.5 gives (\tilde\lambda, \mu) \ne 0 and \alpha with \tilde\lambda^\top u + \mu t \ge \alpha on \mathcal{A} and \mu t \le \alpha on \mathcal{B}.
  • \mathcal{A} is unbounded upwards in every coordinate, so \tilde\lambda \succeq 0 and \mu \ge 0. Letting s \to p^* in \mathcal{B} gives \mu p^* \le \alpha.
  • If \mu > 0, take (u, t) = (f(x), f_0(x)) and divide by \mu. This gives, for all x \in \mathcal{D}, L(x, \tilde\lambda / \mu) \ge p^* . So g(\tilde\lambda / \mu) \ge p^*, and weak duality makes \tilde\lambda / \mu dual optimal with d^* = p^*.
  • If \mu = 0, then \tilde\lambda \neq 0, \alpha \ge 0, and \sum_i \tilde\lambda_i f_i(x) \ge 0 for all x \in \mathcal{D}. At the Slater point the left-hand side is negative: a contradiction. ∎

Example 4.5 — When Slater’s condition fails Minimize e^{-x} subject to x^2 / y \le 0, on the domain y > 0. The constraint forces x = 0, so p^* = 1.

The dual function is g(\lambda) = \inf_{x, \, y > 0} (e^{-x} + \lambda x^2 / y) = 0: take x large and y much larger. So d^* = 0, a duality gap of 1. No point is strictly feasible.

Theorem 4.6 — Karush–Kuhn–Tucker conditions Let f_0, \dots, f_m be differentiable. The KKT conditions at (x, \lambda, \nu) are:

  • primal feasibility: f_i(x) \le 0 for all i, and Ax = b;
  • dual feasibility: \lambda \succeq 0;
  • complementary slackness: \lambda_i f_i(x) = 0 for all i;
  • stationarity: \nabla f_0(x) + \sum_i \lambda_i \nabla f_i(x) + A^\top \nu = 0 .

For a convex problem, every KKT point is primal and dual optimal, with zero gap. Under Slater’s condition, conversely, x is optimal if and only if some (\lambda, \nu) satisfies the KKT conditions with it.

Proof.

  • Sufficiency: L(\cdot, \lambda, \nu) is convex since \lambda \succeq 0, and stationary at x, so x minimizes it (Theorem 2.2). By complementary slackness and feasibility, g(\lambda, \nu) = L(x, \lambda, \nu) = f_0(x), and weak duality makes both optimal.
  • Necessity: let x^* be optimal and (\lambda^*, \nu^*) dual optimal (Theorem 4.4). Then f_0(x^*) = g(\lambda^*, \nu^*) \le L(x^*, \lambda^*, \nu^*) \le f_0(x^*) . Both inequalities are equalities. The second gives \sum_i \lambda_i^* f_i(x^*) = 0, a sum of nonpositive terms, hence complementary slackness. The first says that x^* minimizes L(\cdot, \lambda^*, \nu^*), hence stationarity. ∎

Proposition 4.7 — Sensitivity and shadow prices Perturb the constraints to f_i(x) \le u_i and Ax - b = v, and let p^*(u, v) be the optimal value. If strong duality holds with dual optimum (\lambda^*, \nu^*), then for all (u, v) p^*(u, v) \ge p^*(0, 0) - \lambda^{*\top} u - \nu^{*\top} v . Where p^* is differentiable, \partial p^* / \partial u_i = -\lambda_i^*. A large multiplier marks a constraint whose tightening is expensive; in economics, \lambda_i^* is the price of resource i.

Proof. Let x be feasible for the perturbed problem. Then \lambda_i^* f_i(x) \le \lambda_i^* u_i and Ax - b = v, so p^*(0, 0) = g(\lambda^*, \nu^*) \le L(x, \lambda^*, \nu^*) \le f_0(x) + \lambda^{*\top} u + \nu^{*\top} v . Take the infimum over such x. ∎

Proposition 4.8 — Semidefinite duality The dual of the SDP \text{minimize } c^\top x \quad \text{s.t.} \quad x_1 F_1 + \dots + x_n F_n + G \preceq 0 is the SDP \text{maximize } \mathrm{tr}(G Z) \quad \text{s.t.} \quad \mathrm{tr}(F_i Z) + c_i = 0, \ i = 1, \dots, n, \qquad Z \succeq 0 . The multiplier of a matrix inequality is a positive semidefinite matrix, because \mathbb{S}^k_+ is self-dual (Proposition 1.7). As in Theorem 4.4, strong duality holds when the primal is strictly feasible.

Example 4.9 — Water-filling To allocate a unit of power to n channels with noise levels \alpha_i > 0 and maximize capacity, solve \text{minimize } -\sum_{i=1}^n \log(\alpha_i + x_i) \quad \text{s.t.} \quad x \succeq 0, \ \mathbf{1}^\top x = 1 . The KKT conditions are x_i \ge 0, \lambda_i \ge 0, \lambda_i x_i = 0 and -1/(\alpha_i + x_i) - \lambda_i + \nu = 0. Eliminating \lambda gives x_i = \max\Big(0, \ \frac{1}{\nu} - \alpha_i\Big) , where the water level 1/\nu is fixed by \mathbf{1}^\top x = 1: the channels are filled up to a common level.

For \alpha = (0.2, 0.5, 0.9, 1.6), bisection finds the level 1/\nu = 0.85, and x^* = (0.65, \ 0.35, \ 0, \ 0), \qquad \lambda^* = (0, \ 0, \ 0.065, \ 0.551) . The two noisiest channels receive nothing, and their multipliers are positive.

import numpy as np

alpha = np.array([0.2, 0.5, 0.9, 1.6])          # noise levels of 4 channels
def x_of(nu):                                   # KKT solution for a given multiplier
    return np.maximum(0.0, 1.0 / nu - alpha)

lo, hi = 1e-6, 1e6                              # bisection on the "water level" 1/nu
for _ in range(200):
    nu = np.sqrt(lo * hi)
    lo, hi = (nu, hi) if x_of(nu).sum() > 1.0 else (lo, nu)
x = x_of(nu)
lam = nu - 1.0 / (alpha + x)                    # multipliers of x >= 0
print("water level 1/nu =", round(1 / nu, 4))
print("x* =", np.round(x, 4), " sum =", round(x.sum(), 6))
print("lambda* =", np.round(lam, 4) + 0.0)        # + 0.0 turns -0.0 into 0.0
print("complementary slackness max |lambda_i x_i| =", np.abs(lam * x).max().round(10))
print("optimal value =", round(-np.log(alpha + x).sum(), 4))

Key takeaways — chapter 4

  • The dual function is concave and bounds the primal value from below, convex or not (weak duality).
  • Under Slater’s condition the bound is tight; the proof is one separating hyperplane.
  • The KKT conditions characterize optimality of convex problems under Slater’s condition; complementary slackness says which constraints matter.
  • Dual variables are sensitivities of the optimal value, and the multiplier of a matrix inequality is a positive semidefinite matrix.

5. First-order methods and acceleration

When the dimension is large, a Newton step costs too much and one uses gradients only. This chapter proves how fast gradient methods converge, shows that no gradient method can beat a rate of order 1/k^2 on smooth convex functions, and gives Nesterov’s method, which attains it. Proximal versions extend everything to nonsmooth regularizers.

Definition 5.1 — First-order method A first-order method queries an oracle that returns f(x) and \nabla f(x), or a subgradient, and produces iterates with x_k \in x_0 + \mathrm{span}\{\nabla f(x_0), \dots, \nabla f(x_{k-1})\} . Its complexity on a class of functions is the number of oracle calls needed to guarantee f(x_k) - f^* \le \varepsilon (Nemirovski and Yudin 1983).

Theorem 5.2 — Gradient descent Let f be convex and L-smooth with a minimizer x^*, and x_{k+1} = x_k - \frac1L \nabla f(x_k). Then f(x_k) - f^* \le \frac{L \|x_0 - x^*\|_2^2}{2k} . If f is also \mu-strongly convex, \|x_k - x^*\|_2^2 \le \Big(1 - \frac{\mu}{L}\Big)^k \|x_0 - x^*\|_2^2 .

Proof. Write g = \nabla f(x_k).

  • The descent lemma (Proposition 0.5) gives f(x_{k+1}) \le f(x_k) - \frac{1}{2L}\|g\|^2: the values decrease.
  • Convexity gives f(x_k) \le f^* + g^\top (x_k - x^*). Adding, and expanding \|x_{k+1} - x^*\|^2 = \|x_k - x^* - g/L\|^2, f(x_{k+1}) - f^* \le g^\top (x_k - x^*) - \frac{1}{2L}\|g\|^2 = \frac{L}{2}\big(\|x_k - x^*\|^2 - \|x_{k+1} - x^*\|^2\big) .
  • Summing from 0 to k - 1 telescopes: the sum of the k gaps f(x_1) - f^*, \dots, f(x_k) - f^* is at most \frac{L}{2}\|x_0 - x^*\|^2. The gaps decrease, so the last one is at most their average.
  • Strongly convex case: Proposition 2.10, with y = x^*, gives g^\top (x_k - x^*) \ge f(x_k) - f^* + \frac{\mu}{2}\|x_k - x^*\|^2 , and the first step, with f^* \le f(x_{k+1}), gives \|g\|^2 / L^2 \le 2 (f(x_k) - f^*) / L. Insert both in \|x_{k+1} - x^*\|^2 = \|x_k - x^*\|^2 - \frac{2}{L} g^\top (x_k - x^*) + \frac{1}{L^2}\|g\|^2 . The function gaps cancel and \|x_{k+1} - x^*\|^2 \le (1 - \mu / L)\|x_k - x^*\|^2. ∎

Theorem 5.3 — Lower complexity bound For every k with 1 \le k \le (n - 1)/2 and every x_0, there is a convex L-smooth quadratic f on \mathbb{R}^n such that every first-order method satisfies f(x_k) - f^* \ge \frac{3 L \|x_0 - x^*\|_2^2}{32 (k + 1)^2} . The worst function (Nesterov 2004, §2.1) is f(x) = \frac{L}{4}\Big(\frac12 x^\top A x - x_1\Big) , where A is tridiagonal with 2 on the diagonal and -1 beside it, on the first 2k + 1 coordinates.

From x_0 = 0, each gradient reveals one more coordinate, so x_k lives on the first k coordinates, far from the minimizer. The complete computation is in ch. 10.

Nesterov’s accelerated gradient method

Algorithm 5.4 — Accelerated gradient method (Nesterov 1983) Start from z_0 = x_0 and set \theta_k = 2/(k + 2). For k = 0, 1, \dots y_k = (1 - \theta_k) x_k + \theta_k z_k, \qquad x_{k+1} = y_k - \tfrac{1}{L}\nabla f(y_k), \qquad z_{k+1} = z_k - \tfrac{1}{\theta_k L}\nabla f(y_k) . Eliminating z gives the familiar momentum form: x_{k+1} = y_k - \tfrac{1}{L}\nabla f(y_k), \qquad y_{k+1} = x_{k+1} + \frac{k}{k + 3}(x_{k+1} - x_k) .

Theorem 5.5 — The accelerated rate For convex L-smooth f, Algorithm 5.4 satisfies, for k \ge 1:

Key result — Nesterov’s rate f(x_k) - f^* \le \frac{2 L \|x_0 - x^*\|_2^2}{(k + 1)^2}

By Theorem 5.3 no first-order method can do better than this rate, up to a factor 64/3 \approx 21.

Proof. Let g = \nabla f(y_k) and r_k = \|z_k - x^*\|^2.

  • Descent lemma: f(x_{k+1}) \le f(y_k) - \frac{1}{2L}\|g\|^2.
  • Convexity at y_k, towards x_k with weight 1 - \theta_k and towards x^* with weight \theta_k: f(y_k) \le (1 - \theta_k) f(x_k) + \theta_k f^* + g^\top \big(y_k - (1 - \theta_k) x_k - \theta_k x^*\big) , and y_k - (1 - \theta_k) x_k = \theta_k z_k, so the last term is \theta_k g^\top (z_k - x^*).
  • Expanding the square in the z-update gives \theta_k g^\top (z_k - x^*) = \frac{\theta_k^2 L}{2}(r_k - r_{k+1}) + \frac{1}{2L}\|g\|^2 .
  • The three lines combine into f(x_{k+1}) - f^* \le (1 - \theta_k)\big(f(x_k) - f^*\big) + \frac{\theta_k^2 L}{2}(r_k - r_{k+1}) .
  • Divide by \theta_k^2 and note that \frac{1 - \theta_k}{\theta_k^2} = \frac{k(k + 2)}{4} \le \frac{(k + 1)^2}{4} = \frac{1}{\theta_{k-1}^2} . The quantity \theta_{k-1}^{-2}(f(x_k) - f^*) + \frac{L}{2} r_k never increases, and at k = 0 the coefficient (1 - \theta_0)/\theta_0^2 is zero.
  • Hence \theta_k^{-2}(f(x_{k+1}) - f^*) \le \frac{L}{2} r_0, which is the claim since \theta_k = 2/(k + 2). ∎

Strong convexity When \mu > 0 is known, the constant momentum (\sqrt{\kappa} - 1)/(\sqrt{\kappa} + 1) contracts the error by 1 - 1/\sqrt{\kappa} per step instead of 1 - 1/\kappa (Nesterov 2004, §2.2). For \kappa = 10^4 this needs about 100 times fewer iterations.

Restarting Algorithm 5.4 every \lceil\sqrt{8\kappa}\rceil steps recovers this rate up to a constant factor, but the period needs \kappa. Adaptive restarts, which need no knowledge of \mu, do as well in practice (Ex. 15).

Example 5.6 — Acceleration on a badly conditioned quadratic The code minimizes a quadratic in dimension 500 with eigenvalues from 10^{-4} to 1, so \kappa = 10^4, from f(x_0) = 23.9.

iterations K 10 100 1000
gradient descent 1.14 0.133 0.0116
accelerated 0.573 0.0076 3.9 \times 10^{-6}

Both stay below their bounds (Theorems 5.2 and 5.5). Acceleration gains a factor 3000 at K = 1000 for the cost of one extra line.

import numpy as np

rng = np.random.default_rng(0)
n = 500
Q, _ = np.linalg.qr(rng.normal(size=(n, n)))
eig = np.logspace(-4, 0, n)                     # mu = 1e-4, L = 1: condition number 1e4
H = (Q * eig) @ Q.T
xstar = rng.normal(size=n)
f = lambda x: 0.5 * (x - xstar) @ H @ (x - xstar)  # f* = 0
grad = lambda x: H @ (x - xstar)
L, x0 = eig.max(), np.zeros(n)

def gd(K):
    x = x0.copy()
    for _ in range(K):
        x = x - grad(x) / L
    return f(x)

def agd(K):                                     # Nesterov, momentum k/(k+3)
    x_prev = x = y = x0.copy()
    for k in range(K):
        x_prev, x = x, y - grad(y) / L
        y = x + k / (k + 3) * (x - x_prev)
    return f(x)

R2 = np.sum((x0 - xstar) ** 2)
print(f"f(x0) = {f(x0):.3f}")
for K in (10, 100, 1000):
    print(f"K={K:5d}  GD {gd(K):.2e}  AGD {agd(K):.2e}  "
          f"bound L R^2/(2K) {L * R2 / (2 * K):.2e}  bound 2LR^2/(K+1)^2 {2 * L * R2 / (K + 1)**2:.2e}")

Nonsmooth functions: the subgradient method

Theorem 5.7 — Subgradient method Let f be convex and G-Lipschitz, so that every subgradient has \|g\|_2 \le G, and let \|x_0 - x^*\|_2 \le R. The iteration x_{i+1} = x_i - \alpha_i g_i with g_i \in \partial f(x_i) satisfies \min_{i \le k} f(x_i) - f^* \le \frac{R^2 + G^2 \sum_{i=0}^k \alpha_i^2}{2 \sum_{i=0}^k \alpha_i} . The constant step \alpha_i = R / (G \sqrt{k + 1}) gives \min_{i \le k} f(x_i) - f^* \le \frac{R G}{\sqrt{k + 1}} .

Proof. Expand the square: \|x_{i+1} - x^*\|^2 = \|x_i - x^*\|^2 - 2\alpha_i g_i^\top (x_i - x^*) + \alpha_i^2 \|g_i\|^2 , and use g_i^\top (x_i - x^*) \ge f(x_i) - f^* (Definition 2.8). Summing over i = 0, \dots, k gives 2 \sum_{i=0}^k \alpha_i \big(f(x_i) - f^*\big) \le R^2 + G^2 \sum_{i=0}^k \alpha_i^2 . Bound each f(x_i) below by the minimum. ∎

The rate 1/\sqrt{k} is optimal for nonsmooth Lipschitz functions (Nemirovski and Yudin 1983): nonsmoothness, not the dimension, makes these problems slow.

Proximal gradient methods

Definition 5.8 — Proximal operator For a closed convex h and \gamma > 0, \mathrm{prox}_{\gamma h}(v) = \arg\min_x \Big( h(x) + \frac{1}{2\gamma}\|x - v\|_2^2 \Big) , well defined because the objective is strongly convex. The indicator of a closed convex set gives the projection onto it. For h = \|\cdot\|_1, Fermat’s rule (Proposition 2.9) gives soft thresholding: \mathrm{prox}_{\gamma \|\cdot\|_1}(v)_i = \mathrm{sign}(v_i) \max(|v_i| - \gamma, 0) .

Theorem 5.9 — ISTA and FISTA Let F = f + h with f convex and L-smooth and h closed convex. The proximal gradient iteration x_{k+1} = \mathrm{prox}_{h/L}\big(x_k - \tfrac{1}{L}\nabla f(x_k)\big) satisfies F(x_k) - F^* \le L\|x_0 - x^*\|^2 / (2k). Its accelerated version FISTA (Beck and Teboulle 2009) satisfies F(x_k) - F^* \le 2L\|x_0 - x^*\|^2 / (k + 1)^2. With h = \lambda \|\cdot\|_1, the first is called ISTA.

The proofs of Theorems 5.2 and 5.5 use smoothness and convexity only through one inequality, which still holds for F. For x^+ the proximal step from y and G = L(y - x^+), for every z: F(z) \ge F(x^+) + G^\top (z - y) + \frac{1}{2L}\|G\|_2^2 .

Key takeaways — chapter 5

  • Gradient descent with step 1/L converges as 1/k on smooth convex functions, and linearly at rate 1 - 1/\kappa under strong convexity.
  • No first-order method beats 1/k^2 on smooth convex functions; Nesterov’s method attains it with one extra momentum step.
  • On nonsmooth Lipschitz functions the subgradient method converges as 1/\sqrt{k}, which is optimal.
  • Proximal steps handle nonsmooth regularizers at the price of a projection-like operation: ISTA and FISTA keep the rates of the smooth case.

6. Newton’s method and interior-point methods

Interior-point methods solve linear, second-order cone and semidefinite programs to high accuracy in a few dozen Newton steps. This chapter builds them in three moves: Newton’s method for smooth problems, its extension to equality constraints, and the logarithmic barrier that turns inequality constraints into a smooth penalty.

Definition 6.1 — Newton step and Newton decrement For f twice differentiable with \nabla^2 f(x) \succ 0, \Delta x_{\mathrm{nt}} = -\nabla^2 f(x)^{-1} \nabla f(x), \qquad \lambda(x) = \big(\nabla f(x)^\top \nabla^2 f(x)^{-1} \nabla f(x)\big)^{1/2} . The step minimizes the second-order Taylor model of f at x, and \lambda(x)^2 / 2 is the decrease the model predicts.

Both are affine invariant: minimizing y \mapsto f(Ty), for an invertible T, instead of f maps the iterates by T and leaves \lambda unchanged.

Algorithm 6.2 — Damped Newton method with backtracking Given x \in \mathrm{dom}\, f, a tolerance \varepsilon, \alpha \in (0, 1/2) and \beta \in (0, 1), repeat:

  1. compute \Delta x_{\mathrm{nt}} and \lambda(x); stop if \lambda(x)^2 / 2 \le \varepsilon;
  2. line search: start from s = 1 and multiply s by \beta as long as f(x + s \Delta x_{\mathrm{nt}}) > f(x) - \alpha s \lambda(x)^2 ;
  3. update x \leftarrow x + s \Delta x_{\mathrm{nt}}.

Theorem 6.3 — Local quadratic convergence Suppose \nabla^2 f \succeq m I near the minimizer x^*, and \nabla^2 f is M-Lipschitz there. Then the full Newton step x_{k+1} = x_k + \Delta x_{\mathrm{nt}} satisfies \|x_{k+1} - x^*\|_2 \le \frac{M}{2m} \|x_k - x^*\|_2^2 . Once \frac{M}{2m}\|x_k - x^*\|_2 < 1, the error is squared at each step: the number of correct digits doubles.

Proof. Since \nabla f(x^*) = 0, the integral form of Definition 0.4 gives, with H_k = \nabla^2 f(x_k), x_{k+1} - x^* = H_k^{-1} \int_0^1 \big( H_k - \nabla^2 f(x^* + s(x_k - x^*)) \big) (x_k - x^*) \, ds . The integrand has norm at most M (1 - s) \|x_k - x^*\|^2, so the integral is at most \frac{M}{2}\|x_k - x^*\|^2, and \|H_k^{-1}\| \le 1/m. ∎

Proposition 6.4 — Newton step with equality constraints To minimize f(x) subject to Ax = b from a feasible x, the Newton step minimizes the quadratic model over the directions with A \Delta x = 0. By the KKT conditions (Theorem 4.6) it solves \begin{pmatrix} \nabla^2 f(x) & A^\top \\ A & 0 \end{pmatrix} \begin{pmatrix} \Delta x_{\mathrm{nt}} \\ w \end{pmatrix} = \begin{pmatrix} -\nabla f(x) \\ 0 \end{pmatrix} , where w estimates the multiplier \nu. The iterates stay feasible, and the analysis is unchanged.

The logarithmic barrier and the central path

Definition 6.5 — Logarithmic barrier and central path For the convex program of Definition 3.1, with twice differentiable f_i and a strictly feasible point, the logarithmic barrier is \phi(x) = -\sum_{i=1}^m \log(-f_i(x)) , convex and infinite on the boundary of the feasible set. For t > 0, the central point x^*(t) minimizes t f_0(x) + \phi(x) subject to Ax = b.

The curve t \mapsto x^*(t) is the central path: as t grows, the barrier weighs less and x^*(t) moves towards a solution.

Proposition 6.6 — Central points are m/t-suboptimal Every central point gives a dual feasible pair, \lambda_i^*(t) = -1/(t f_i(x^*(t))) and \nu^*(t) = w / t, where w is the multiplier of the centering problem. Consequently f_0(x^*(t)) - p^* \le \frac{m}{t} .

Proof. The optimality condition of the centering problem at x^* = x^*(t) reads t \nabla f_0(x^*) + \sum_i \frac{1}{-f_i(x^*)} \nabla f_i(x^*) + A^\top w = 0 . Divided by t, it says that x^* minimizes L(\cdot, \lambda^*(t), \nu^*(t)), with \lambda^*(t) \succ 0.

Moreover Ax^* = b, and \lambda_i^*(t) f_i(x^*) = -1/t for each i. Hence g(\lambda^*(t), \nu^*(t)) = f_0(x^*) + \sum_{i=1}^m \lambda_i^*(t) f_i(x^*) = f_0(x^*) - \frac{m}{t} , and weak duality concludes. ∎

The centrality conditions are the KKT conditions with complementary slackness relaxed to -\lambda_i f_i(x) = 1/t.

Algorithm 6.7 — Barrier method Given a strictly feasible x, t = t^{(0)} > 0, \mu > 1 and \varepsilon > 0, repeat:

  1. centering: compute x^*(t) by Newton’s method (Algorithm 6.2 with Proposition 6.4), starting from the current x;
  2. update x \leftarrow x^*(t);
  3. stop if m/t \le \varepsilon; otherwise set t \leftarrow \mu t.

Besides the initial centering, at t^{(0)}, the method performs one centering per update of t, and the number of updates is \Big\lceil \frac{\log\big(m / (\varepsilon t^{(0)})\big)}{\log \mu} \Big\rceil . A strictly feasible start comes from a phase I problem: minimize s subject to f_i(x) \le s and Ax = b. It starts from any x with Ax = b and a large s.

Example 6.8 — A barrier method for a linear program The code minimizes c^\top x subject to 100 random inequalities a_i^\top x \le b_i in dimension 50, with the barrier -\sum_i \log(b_i - a_i^\top x), \mu = 20 and \varepsilon = 10^{-7}.

The formula above predicts 1 + 7 = 8 centerings. Each takes between 5 and 9 Newton steps while the gap m/t falls from 100 to 7.8 \times 10^{-8}: 54 Newton steps in total. The value agrees with the HiGHS solver to 4 \times 10^{-8}.

A larger \mu means fewer centerings but more Newton steps per centering; Ex. 6 measures the trade-off.

import numpy as np
from scipy.optimize import linprog

rng = np.random.default_rng(1)
m, n = 100, 50
A = rng.normal(size=(m, n))
b = rng.uniform(1, 2, size=m)                   # x = 0 is strictly feasible
c = -A.T @ rng.uniform(0, 1, size=m)            # c = -A^T lambda, lambda >= 0: LP is bounded

def centering(x, t, tol=1e-9, max_steps=50):
    """Newton's method with backtracking on t c^T x - sum log(b - A x)."""
    F = lambda z: t * c @ z - np.log(b - A @ z).sum()
    for steps in range(max_steps):
        d = 1.0 / (b - A @ x)
        g = t * c + A.T @ d
        Hs = A.T @ (A * d[:, None] ** 2)
        dx = -np.linalg.solve(Hs, g)
        lam2 = -g @ dx                          # Newton decrement squared
        if lam2 / 2 <= tol:
            break
        s = 1.0
        while np.min(b - A @ (x + s * dx)) <= 0:
            s *= 0.5                            # stay inside the domain
        while F(x + s * dx) > F(x) - 0.25 * s * lam2 and s > 1e-8:
            s *= 0.5                            # Armijo backtracking, alpha = 0.25
        x = x + s * dx
    return x, steps

x, t, mu, eps, total = np.zeros(n), 1.0, 20.0, 1e-7, 0
while True:                                     # Algorithm 6.7
    x, k = centering(x, t)
    total += k
    print(f"t = {t:9.1e}  Newton steps = {k:2d}  duality gap m/t = {m / t:.1e}")
    if m / t <= eps:                            # stopping rule of step 3
        break
    t *= mu
ref = linprog(c, A_ub=A, b_ub=b, bounds=[(None, None)] * n, method="highs")
print(f"barrier: {c @ x:.8f}   HiGHS: {ref.fun:.8f}   total Newton steps: {total}")

Key takeaways — chapter 6

  • Newton’s method is affine invariant and converges quadratically near a minimizer; the Newton decrement measures the distance to it.
  • Equality constraints add a KKT linear system and change nothing else.
  • The logarithmic barrier replaces inequalities by a smooth penalty; its minimizers form the central path.
  • Each central point carries a dual certificate with gap exactly m/t, so the barrier method knows when to stop.

7. Self-concordance and complexity

The classical analysis of Newton’s method depends on constants m and M that change with the coordinates, although the method itself does not. Nesterov and Nemirovski (1994) found the affine-invariant condition that makes the analysis exact, self-concordance, and with it a polynomial bound on the number of Newton steps of interior-point methods.

Definition 7.1 — Self-concordant function A convex function f of one variable, three times differentiable on an open interval, is self-concordant if |f'''(x)| \le 2 f''(x)^{3/2} . A convex f on \mathbb{R}^n is self-concordant if every restriction t \mapsto f(x + tv) to a line is. The local norm at x is \|h\|_x = (h^\top \nabla^2 f(x) h)^{1/2}, and \lambda(x) = \|\Delta x_{\mathrm{nt}}\|_x.

Example 7.2 — Self-concordant functions

  • -\log x: here f'' = 1/x^2 and f''' = -2/x^3, with equality in the definition. Affine and convex quadratic functions have f''' = 0.
  • The class is closed under sums, affine changes of variable, and multiplication by a constant a \ge 1.
  • Hence the LP barrier -\sum_i \log(b_i - a_i^\top x) is self-concordant, and so are -\log\det X and -\log(t^2 - \|u\|_2^2) on the second-order cone (Nesterov and Nemirovski 1994).
  • e^x is not self-concordant on \mathbb{R} (Ex. 11).

Proposition 7.3 — Hessian control along a segment Let f be self-concordant and r = \|y - x\|_x < 1. Then for s \in [0, 1] (y - x)^\top \nabla^2 f(x + s(y - x)) (y - x) \le \frac{r^2}{(1 - s r)^2} , and, with \omega_*(r) = -r - \log(1 - r), f(y) \le f(x) + \nabla f(x)^\top (y - x) + \omega_*(r) .

Proof.

  • Let \varphi(s) = f(x + s(y - x)). Self-concordance says that the derivative of \varphi''(s)^{-1/2}, which is -\frac12 \varphi''' \varphi''^{-3/2}, has absolute value at most 1.
  • Since \varphi''(0) = r^2, integrating this bound gives \varphi''(s)^{-1/2} \ge \varphi''(0)^{-1/2} - s = \frac{1 - sr}{r} , which is the first inequality.
  • Insert it in Taylor’s formula (Definition 0.4); a direct computation gives \int_0^1 (1 - s) \frac{r^2}{(1 - sr)^2} ds = \omega_*(r). ∎

The Dikin ellipsoid \{y : \|y - x\|_x < 1\} lies in the domain of f when f tends to infinity at the boundary of its domain (Nesterov 2004, §4.1).

Theorem 7.4 — Newton’s method on self-concordant functions Let f be self-concordant, bounded below, and tend to infinity at the boundary of its domain. Let \omega(t) = t - \log(1 + t).

  1. The damped step x^+ = x + \frac{1}{1 + \lambda(x)} \Delta x_{\mathrm{nt}} stays in the domain and decreases f by at least \omega(\lambda(x)).
  2. If \lambda(x) < 1, the full step satisfies \lambda(x^+) \le \Big( \frac{\lambda(x)}{1 - \lambda(x)} \Big)^2 .
  3. Damped steps while \lambda \ge 1/4, then full steps, reach f(x) - f^* \le \varepsilon after at most \frac{f(x_0) - f^*}{\omega(1/4)} + \log_2 \log_2 \frac{1}{\varepsilon} + c Newton steps, for an absolute constant c; here \omega(1/4) \approx 0.0269. No constant of f appears.

Proof. Part 1: the step has local norm r = \lambda / (1 + \lambda) < 1, and \nabla f(x)^\top (x^+ - x) = -\lambda^2 / (1 + \lambda). Proposition 7.3 gives f(x^+) \le f(x) - \frac{\lambda^2}{1 + \lambda} - \frac{\lambda}{1 + \lambda} + \log(1 + \lambda) = f(x) - \omega(\lambda) . Part 2 uses the matrix form of Proposition 7.3 (Nesterov 2004, §4.1).

Part 3: while \lambda \ge 1/4, each step gains at least \omega(1/4). Afterwards Part 2 gives \lambda^+ \le \frac{16}{9}\lambda^2, and f(x) - f^* \le \omega_*(\lambda) \le \lambda^2 for \lambda \le 0.68 (Nesterov 2004, §4.1). ∎

Example 7.5 — The two phases, observed The code computes the analytic centre of 200 random halfspaces in \mathbb{R}^{20}, starting close to several faces. Twelve damped steps bring \lambda from 4.7 to 0.23. Three full steps then give \lambda = 3.8 \times 10^{-3}, \quad 2.2 \times 10^{-6}, \quad 1.2 \times 10^{-12} , the doubling of digits of Theorem 7.4. The worst-case bound of Part 3 allows 833 damped steps; twelve were needed.

import numpy as np

rng = np.random.default_rng(2)
m, n = 200, 20
A = rng.normal(size=(m, n))
b = rng.uniform(0.01, 1.0, size=m)              # x = 0 is strictly feasible, close to some faces
f = lambda x: -np.log(b - A @ x).sum()          # self-concordant (sum of -log of affine)

x, k = np.zeros(n), 0
while True:
    d = 1.0 / (b - A @ x)
    g, H = A.T @ d, A.T @ (A * d[:, None] ** 2)
    dx = -np.linalg.solve(H, g)
    lam = np.sqrt(-g @ dx)                      # Newton decrement lambda(x)
    print(f"k = {k:2d}  f = {f(x):10.6f}  lambda = {lam:.2e}")
    if lam < 1e-10:
        break
    step = 1.0 if lam < 0.25 else 1.0 / (1.0 + lam)   # damped phase, then pure Newton
    x, k = x + step * dx, k + 1
print("bound on damped steps: (f(x0) - f*) / omega(1/4) =",
      round((f(np.zeros(n)) - f(x)) / (0.25 - np.log(1.25)), 1))

Self-concordant barriers and the complexity of path following

Definition 7.6 — Self-concordant barrier A self-concordant \varphi whose domain is the interior of a closed convex set K is a \vartheta-self-concordant barrier for K if \nabla \varphi(x)^\top \nabla^2 \varphi(x)^{-1} \nabla \varphi(x) \le \vartheta \quad \text{for all } x . Three examples are used throughout:

  • -\sum_{i=1}^m \log(b_i - a_i^\top x) for a polyhedron with m faces, with \vartheta = m;
  • -\log\det X for \mathbb{S}^n_+, with \vartheta = n;
  • -\log(t^2 - \|u\|_2^2) for the second-order cone, with \vartheta = 2.

Theorem 7.7 — Complexity of path following Minimize a linear objective by Algorithm 6.7 with exact centering, with the logarithmic barrier of m = \vartheta inequalities. The barriers of the second-order and semidefinite cones, with the parameters of Definition 7.6, behave the same way (Boyd and Vandenberghe 2004, §11.6). When t becomes \mu t, the new centering problem starts at most \vartheta \, (\mu - 1 - \log \mu) above its minimum, so it costs at most \vartheta(\mu - 1 - \log\mu)/\omega(1/4) + c' Newton steps (Theorem 7.4).

With \mu = 1 + 1/\sqrt{\vartheta}, this is a constant number of Newton steps per centering, since \mu - 1 - \log \mu \le (\mu - 1)^2 / 2. The total number of Newton steps is then O\Big( \sqrt{\vartheta} \, \log \frac{\vartheta}{t^{(0)} \varepsilon} \Big) .

Proof. For the logarithmic barrier with m = \vartheta inequalities, let x = x^*(t), x^+ = x^*(\mu t) and (\lambda, \nu) the dual pair of Proposition 6.6, so that -f_i(x) = 1/(t \lambda_i). The gap of the new centering problem equals \mu t f_0(x) - \mu t f_0(x^+) + \sum_i \log\big(-\mu t \lambda_i f_i(x^+)\big) - m \log \mu . - By \log a \le a - 1, the sum is at most -\mu t \sum_i \lambda_i f_i(x^+) - m. - Since Ax^+ = b, the definition of the dual function gives f_0(x^+) + \sum_i \lambda_i f_i(x^+) = L(x^+, \lambda, \nu) \ge g(\lambda, \nu) . - By Proposition 6.6, f_0(x) - g(\lambda, \nu) = m/t. Together, the gap is at most \mu m - m - m\log\mu.

For general \vartheta-self-concordant barriers, the same O(\sqrt{\vartheta}\log(1/\varepsilon)) bound holds with a different analysis; see Nesterov and Nemirovski (1994) and Renegar (2001). ∎

Primal–dual methods Practical solvers use primal–dual variants that update x, \lambda and \nu together, by Newton steps on the relaxed KKT system, with Mehrotra’s predictor–corrector (Mehrotra 1992). They need a few tens of iterations on most problems, almost independently of the size; each iteration solves one linear system, which is the real cost. Ch. 10 sketches them.

Key takeaways — chapter 7

  • Self-concordance, |f'''| \le 2 f''^{3/2}, is affine invariant; logarithms of affine, log-determinant and second-order cone barriers satisfy it.
  • On self-concordant functions, damped Newton decreases f by a fixed amount, then converges quadratically, with bounds free of any constant of f.
  • A barrier’s parameter \vartheta measures the cost of a central path: O(\sqrt{\vartheta}\log(1/\varepsilon)) Newton steps suffice.
  • This is why interior-point methods solve LPs, SOCPs and SDPs in a number of iterations that barely depends on the data.

8. Applications: statistics, learning, finance and signal processing

The official syllabus names three fields where convex programs arise. This chapter models a representative problem from each, solves it with the algorithms of ch. 5–7, and reads its dual variables.

Statistics and machine learning

Proposition 8.1 — Convex maximum likelihood When the density of the observations is log-concave in the parameter, maximum likelihood is a convex program. Logistic regression with labels y_i \in \{-1, 1\} is the main example: \text{minimize} \ \sum_{i=1}^n \log\big(1 + e^{-y_i x_i^\top \beta}\big) + \frac{\rho}{2}\|\beta\|_2^2 . Each term is log-sum-exp of (0, -y_i x_i^\top \beta), convex by Propositions 2.4–2.5.

The Hessian is X^\top D X + \rho I, where D is diagonal with entries \sigma(u)(1 - \sigma(u)) \le 1/4 and \sigma is the logistic function. So the objective is \rho-strongly convex and L-smooth with L = \frac14 \|X\|_2^2 + \rho .

Example 8.2 — The LASSO The LASSO (Tibshirani 1996) is the convex program \text{minimize} \ F(\beta) = \frac{1}{2n}\|y - X\beta\|_2^2 + \lambda \|\beta\|_1 . Fermat’s rule (Proposition 2.9) gives its optimality condition: \frac{1}{n} X^\top (y - X\beta) \in \lambda \, \partial \|\beta\|_1 . Each correlation with the residual equals \lambda \, \mathrm{sign}(\beta_j) on the support and lies in [-\lambda, \lambda] off it. In particular \beta = 0 is optimal exactly when \lambda \ge \lambda_{\max} = \|X^\top y\|_\infty / n.

The code solves a problem with 100 observations, 300 correlated features and 10 true nonzeros, at \lambda = 0.05 \lambda_{\max}. The gap F - F^* is:

iterations 10 100 1000
ISTA 2.4 0.59 8.7 \times 10^{-3}
FISTA 1.7 4.1 \times 10^{-3} 2.6 \times 10^{-7}

The solution has 23 nonzeros, including the 10 true ones, and matches scikit-learn’s coordinate descent to 6 \times 10^{-12}.

import numpy as np
from sklearn.linear_model import Lasso

rng = np.random.default_rng(3)
n, p, s = 100, 300, 10
C = 0.9 ** np.abs(np.subtract.outer(np.arange(p), np.arange(p)))   # correlated features
X = rng.normal(size=(n, p)) @ np.linalg.cholesky(C).T
beta0 = np.zeros(p); beta0[::30] = rng.choice([-2.0, 2.0], size=s)
y = X @ beta0 + 0.5 * rng.normal(size=n)

lam_max = np.abs(X.T @ y).max() / n             # beta = 0 is optimal above this value
lam = 0.05 * lam_max
F = lambda b: 0.5 / n * np.sum((y - X @ b) ** 2) + lam * np.abs(b).sum()
L = np.linalg.norm(X, 2) ** 2 / n               # Lipschitz constant of the smooth part
soft = lambda v, a: np.sign(v) * np.maximum(np.abs(v) - a, 0.0)
step = lambda b: soft(b - X.T @ (X @ b - y) / (n * L), lam / L)

def ista(K):
    b = np.zeros(p)
    for _ in range(K):
        b = step(b)
    return b

def fista(K):
    b = z = np.zeros(p); t = 1.0
    for _ in range(K):
        b_new = step(z)
        t_new = (1 + np.sqrt(1 + 4 * t * t)) / 2
        z = b_new + (t - 1) / t_new * (b_new - b)
        b, t = b_new, t_new
    return b

ref = Lasso(alpha=lam, fit_intercept=False, tol=1e-14, max_iter=1_000_000).fit(X, y).coef_
Fstar = min(F(ref), F(fista(20000)))
print(f"lambda_max = {lam_max:.3f}, lambda = {lam:.4f}, L = {L:.1f}")
for K in (10, 100, 1000):
    print(f"K={K:5d}  ISTA gap {F(ista(K)) - Fstar:.1e}   FISTA gap {F(fista(K)) - Fstar:.1e}")
b = fista(20000)
print("nonzeros:", np.sum(np.abs(b) > 1e-6), " true support recovered:",
      set(np.flatnonzero(beta0)) <= set(np.flatnonzero(np.abs(b) > 1e-6)))
print("max |FISTA - sklearn| =", f"{np.abs(b - ref).max():.1e}")

Two more convex programs from statistics The support vector machine is a QP whose dual is derived in Ex. 8.

Sparse inverse covariance estimation (Banerjee, El Ghaoui and d’Aspremont 2008; Friedman, Hastie and Tibshirani 2008) maximizes a penalized Gaussian likelihood over \Theta \succ 0, given the sample covariance S: \log\det\Theta - \mathrm{tr}(S\Theta) - \rho \sum_{ij} |\Theta_{ij}| . The nonzero entries of \Theta are the edges of a Gaussian graphical model.

Finance

Example 8.3 — Markowitz portfolio optimization Asset returns r \in \mathbb{R}^n have mean \bar r and covariance \Sigma.

A portfolio w of wealth fractions, \mathbf{1}^\top w = 1, has mean return \bar r^\top w and variance w^\top \Sigma w. Markowitz (1952) minimizes the risk at a target return: \text{minimize } w^\top \Sigma w \quad \text{s.t.} \quad \bar r^\top w \ge r_{\min}, \ \ \mathbf{1}^\top w = 1, \ \ w \succeq 0 , a QP in which w \succeq 0 forbids short sales. Sweeping r_{\min} traces the efficient frontier. By Proposition 4.7, the multiplier of the return constraint is the marginal variance of one more unit of return; without w \succeq 0 the KKT conditions give the frontier in closed form (Ex. 12).

Proposition 8.4 — Value-at-risk and robust constraints are second-order cone constraints If r \sim \mathcal{N}(\bar r, \Sigma) and \eta \le 1/2, the constraint \mathbb{P}(r^\top w \le \alpha) \le \eta is equivalent to \bar r^\top w + \Phi^{-1}(\eta) \, \|\Sigma^{1/2} w\|_2 \ge \alpha , an SOC constraint since \Phi^{-1}(\eta) \le 0. A linear constraint that must hold for every vector of an ellipsoid is also an SOC constraint (Example 3.5).

Proof. r^\top w is Gaussian with mean \bar r^\top w and standard deviation \sigma = \|\Sigma^{1/2} w\|_2. The probability equals \Phi((\alpha - \bar r^\top w)/\sigma), which is at most \eta exactly when (\alpha - \bar r^\top w)/\sigma \le \Phi^{-1}(\eta). ∎

Signal processing

Example 8.5 — Denoising: quadratic smoothing and total variation We observe y = x + \text{noise} with x \in \mathbb{R}^n, and D is the first-difference matrix. Two denoisers compete: \min_x \ \|x - y\|_2^2 + \rho \|Dx\|_2^2 \qquad \text{and} \qquad \min_x \ \|x - y\|_2^2 + \rho \|Dx\|_1 . Quadratic smoothing, on the left, is one linear system but blurs jumps. Total variation, on the right (Rudin, Osher and Fatemi 1992), keeps jumps: the \ell_1 norm tolerates a few large differences.

Writing \rho \|Dx\|_1 = \max_{\|u\|_\infty \le \rho} u^\top D x and minimizing over x gives the dual, a box-constrained QP solved by projected gradient: \text{minimize} \ \|y - D^\top z\|_2^2 \quad \text{s.t.} \quad \|z\|_\infty \le \rho / 2 , and the denoised signal is x = y - D^\top z.

Theorem 8.6 — Exact recovery by \ell_1 minimization Let A \in \mathbb{R}^{m \times n} with m < n. Basis pursuit, minimize \|x\|_1 subject to Ax = y (Chen, Donoho and Saunders 1998), is an LP.

It recovers every s-sparse x_0 from y = A x_0 if and only if A has the null space property of order s: \|h_S\|_1 < \|h_{S^c}\|_1 \quad \text{for all } h \in \ker A \setminus \{0\} \text{ and all } |S| \le s .

Proof. Sufficiency: let x_0 be supported on S and x_0 + h, with h \in \ker A \setminus \{0\}, another feasible point. Then \|x_0 + h\|_1 = \|x_0 + h_S\|_1 + \|h_{S^c}\|_1 \ge \|x_0\|_1 - \|h_S\|_1 + \|h_{S^c}\|_1 > \|x_0\|_1 . Necessity: if \|h_S\|_1 \ge \|h_{S^c}\|_1 for some h \in \ker A, the s-sparse vector h_S and the vector -h_{S^c} have the same measurements, and the second has no larger \ell_1 norm. ∎

Gaussian matrices with m \ge C s \log(n/s) rows have this property with high probability (Candès, Romberg and Tao 2006; Donoho 2006): this is compressed sensing. In the code, with n = 200 unknowns and m = 60 measurements, basis pursuit recovers 20 out of 20 random vectors with 10 nonzeros, 15 with 15, 4 with 20, and none with 25.

import numpy as np
from scipy.optimize import linprog

rng = np.random.default_rng(4)
n, m = 200, 60                                   # unknowns, measurements
A = rng.normal(size=(m, n)) / np.sqrt(m)

def basis_pursuit(y):
    """min ||x||_1 s.t. Ax = y, as an LP in (u, v) with x = u - v, u, v >= 0."""
    res = linprog(np.ones(2 * n), A_eq=np.c_[A, -A], b_eq=y,
                  bounds=[(0, None)] * (2 * n), method="highs")
    return res.x[:n] - res.x[n:]

for s in (5, 10, 15, 20, 25):
    ok = 0
    for trial in range(20):
        x0 = np.zeros(n)
        x0[rng.choice(n, s, replace=False)] = rng.normal(size=s)
        ok += np.linalg.norm(basis_pursuit(A @ x0) - x0) < 1e-6 * np.linalg.norm(x0)
    print(f"sparsity s = {s:2d}: exact recovery in {ok:2d}/20 trials")

Key takeaways — chapter 8

  • Log-concave likelihoods, the LASSO and SVMs are convex programs; optimality conditions explain sparsity and give \lambda_{\max}.
  • On correlated designs, FISTA beats ISTA by orders of magnitude at equal cost.
  • Mean–variance portfolios are QPs; Gaussian value-at-risk and robust constraints are second-order cone constraints.
  • Total variation and basis pursuit are LPs or QPs; the null space property says exactly when \ell_1 minimization recovers sparse signals.

9. Combinatorial problems and convex relaxations

Many combinatorial problems are quadratic programs over \{-1, 1\}^n. Duality gives them a convex bound for free, and rounding the solution of that bound often gives a provably good feasible point. This chapter develops the semidefinite relaxation and the Goemans–Williamson algorithm for MAXCUT.

Example 9.1 — Two-way partitioning and its Lagrangian bound Consider the NP-hard problem p^* = \min_x \ x^\top W x \quad \text{s.t.} \quad x_i^2 = 1, \ i = 1, \dots, n . Its Lagrangian x^\top (W + \mathrm{diag}(\nu)) x - \mathbf{1}^\top \nu is bounded below in x exactly when W + \mathrm{diag}(\nu) \succeq 0. The dual is the SDP \text{maximize} \ -\mathbf{1}^\top \nu \quad \text{s.t.} \quad W + \mathrm{diag}(\nu) \succeq 0 , a lower bound on p^*, since weak duality (Proposition 4.2) needs no convexity. The feasible choice \nu = -\lambda_{\min}(W)\mathbf{1} already gives p^* \ge n \lambda_{\min}(W).

Proposition 9.2 — The lifted relaxation Write x^\top W x = \mathrm{tr}(W X) with X = x x^\top. The constraints become X \succeq 0, X_{ii} = 1 and \mathrm{rank}\, X = 1. Dropping the rank gives the SDP \text{minimize} \ \mathrm{tr}(W X) \quad \text{s.t.} \quad X \succeq 0, \ X_{ii} = 1 , whose value is at most p^*. It is the conic dual of the SDP of Example 9.1. Both are strictly feasible (X = I, and \nu large), so the two bounds coincide (Proposition 4.8).

MAXCUT and randomized rounding

Definition 9.3 — MAXCUT Given a graph with weights w_{ij} \ge 0 and Laplacian L = \mathrm{diag}(W\mathbf{1}) - W, find x \in \{-1, 1\}^n maximizing the weight of the edges cut: \mathrm{cut}(x) = \sum_{i < j} w_{ij} \frac{1 - x_i x_j}{2} = \frac14 x^\top L x . Its SDP relaxation, \mathrm{SDP} = \max \frac14 \mathrm{tr}(L X) subject to X \succeq 0 and X_{ii} = 1, is an upper bound on the maximum cut.

Theorem 9.4 — Goemans–Williamson rounding Let X solve the SDP and factor it as X_{ij} = v_i^\top v_j with unit vectors v_i. Draw a standard Gaussian vector g and set x_i = \mathrm{sign}(v_i^\top g). Then \mathbb{E}[\mathrm{cut}(x)] \ge \alpha_{\mathrm{GW}} \, \mathrm{SDP} \ge \alpha_{\mathrm{GW}} \, \mathrm{MAXCUT}, \qquad \alpha_{\mathrm{GW}} = \min_{0 < \theta \le \pi} \frac{2}{\pi} \frac{\theta}{1 - \cos\theta} \approx 0.8786 .

Proof.

  • The hyperplane orthogonal to g separates v_i from v_j with probability \theta_{ij}/\pi, where \theta_{ij} = \arccos(v_i^\top v_j).

    Indeed, the projection of g on the plane of the two vectors has a uniform direction, and the separating directions form two arcs of total angle 2\theta_{ij}.

  • Hence, by definition of \alpha_{\mathrm{GW}} and since w_{ij} \ge 0, \mathbb{E}[\mathrm{cut}(x)] = \sum_{i < j} w_{ij} \frac{\theta_{ij}}{\pi} \ge \alpha_{\mathrm{GW}} \sum_{i < j} w_{ij} \frac{1 - \cos\theta_{ij}}{2} = \alpha_{\mathrm{GW}} \, \mathrm{SDP} . The last equality uses X_{ij} = \cos\theta_{ij}. ∎

Under the Unique Games Conjecture, no polynomial algorithm guarantees a better constant (Khot, Kindler, Mossel and O’Donnell 2007).

Example 9.5 — Solving and rounding a MAXCUT relaxation The code solves the dual SDP, minimize \mathbf{1}^\top \nu subject to \mathrm{diag}(\nu) - L/4 \succeq 0, by the barrier method of ch. 6. Its barrier t\mathbf{1}^\top \nu - \log\det S, with S = \mathrm{diag}(\nu) - L/4, is self-concordant, so the damped step of Theorem 7.4 needs no line search.

The primal matrix comes for free. On the central path, X = S^{-1}/t is positive definite with unit diagonal (the centering condition), and the duality gap is \mathrm{tr}(SX) = n/t.

On a random graph with 14 vertices, the SDP bound is 34.158. Enumerating all 2^{13} cuts gives the maximum cut, 33. The mean rounded cut is 32.03, above the guarantee 0.8786 \times 34.158 = 30.01, and the best of 1000 roundings is optimal.

import itertools
import numpy as np

rng = np.random.default_rng(5)
n = 14
W = np.triu((rng.random((n, n)) < 0.5).astype(float), 1); W = W + W.T
Lap = np.diag(W.sum(1)) - W                     # cut(x) = x^T Lap x / 4 for x in {-1, 1}^n

# Dual SDP: minimize 1^T nu  s.t.  S(nu) = diag(nu) - Lap/4 >= 0, by the barrier method.
# t 1^T nu - log det S(nu) is self-concordant: damped Newton needs no line search.
def newton_center(nu, t):
    for _ in range(50):
        Sinv = np.linalg.inv(np.diag(nu) - Lap / 4)
        g, H = t - np.diag(Sinv), Sinv ** 2      # gradient and Hessian (Hadamard square)
        d = -np.linalg.solve(H, g)
        lam = np.sqrt(-g @ d)                    # Newton decrement
        if lam < 1e-6:                           # then f - f* <= lam^2 (Theorem 7.4)
            break
        nu = nu + (1.0 if lam < 0.25 else 1.0 / (1.0 + lam)) * d
    return nu

nu, t = np.full(n, np.linalg.eigvalsh(Lap / 4)[-1] + 1.0), 1.0
while True:
    nu = newton_center(nu, t)
    if n / t < 1e-5:
        break
    t *= 10
X = np.linalg.inv(np.diag(nu) - Lap / 4) / t    # primal point on the central path
sdp = np.trace(Lap @ X) / 4
print(f"SDP bound: dual {nu.sum():.5f}, primal {sdp:.5f}, gap {nu.sum() - sdp:.1e}, "
      f"max |diag(X) - 1| = {np.abs(X.diagonal() - 1).max():.1e}")

# Exact MAXCUT by enumeration (x_0 = +1 by symmetry)
best = max(np.array((1,) + s) @ Lap @ np.array((1,) + s) / 4
           for s in itertools.product((-1, 1), repeat=n - 1))

# Goemans-Williamson random-hyperplane rounding
w, U = np.linalg.eigh(X)
V = U * np.sqrt(np.maximum(w, 0))               # rows v_i with v_i . v_j = X_ij
cuts = [x @ Lap @ x / 4 for x in np.sign(rng.normal(size=(1000, n)) @ V.T)]
theta = np.linspace(1e-4, np.pi, 200_000)
alpha = np.min(2 / np.pi * theta / (1 - np.cos(theta)))
print(f"max cut = {best:.0f}, GW mean cut = {np.mean(cuts):.2f}, best of 1000 = {max(cuts):.0f}")
print(f"alpha_GW = {alpha:.5f}, guarantee alpha * SDP = {alpha * sdp:.2f}")

Other convex relaxations

  • Cardinality and rank. On the box \|x\|_\infty \le 1, the largest convex function below \mathrm{card}(x) is \|x\|_1. On the unit ball of the spectral norm, the largest convex function below \mathrm{rank}\, X is the nuclear norm, the sum of singular values (Recht, Fazel and Parrilo 2010). This explains basis pursuit and the LASSO (ch. 8), and low-rank matrix completion (Candès and Recht 2009).
  • Sparse PCA. Maximizing x^\top \Sigma x over unit vectors with few nonzeros has the SDP relaxation: maximize \mathrm{tr}(\Sigma X) - \rho \sum_{ij} |X_{ij}| subject to \mathrm{tr}\, X = 1, X \succeq 0 (d’Aspremont, El Ghaoui, Jordan and Lanckriet 2007).
  • Hierarchies. Lifting to higher-degree moments gives the sums-of-squares hierarchies of Lasserre (2001) and Parrilo (2003), whose levels tighten the relaxations of polynomial problems.

Key takeaways — chapter 9

  • Weak duality bounds any problem, convex or not; for quadratic problems over \{-1, 1\}^n the bound is an SDP.
  • Lifting x to X = xx^\top and dropping the rank gives the same bound from the primal side.
  • Random-hyperplane rounding of the MAXCUT relaxation is within a factor 0.8786 of the optimum in expectation.
  • The \ell_1 and nuclear norms are the convex envelopes of cardinality and rank: relaxation explains sparse and low-rank recovery.

10. Complements for self-study

This chapter completes three threads of the course: the proof that Nesterov’s rate cannot be improved, two first-order methods that avoid projections or adapt to the geometry of the constraints, and the primal–dual interior-point methods used by solvers.

The lower complexity bound

Proposition 10.1 — Proof of Theorem 5.3 Let p = 2k + 1 \le n, let A_p be the tridiagonal matrix with 2 on the diagonal and -1 beside it on the first p coordinates (zero elsewhere), and f(x) = \frac{L}{4}\Big(\frac12 x^\top A_p x - x_1\Big) . Every first-order method started at x_0 = 0 satisfies f(x_k) - f^* \ge \frac{3L\|x_0 - x^*\|_2^2}{32(k+1)^2}. Other starting points follow by translation.

Proof.

  • Smoothness: the quadratic form is a sum of squares, x^\top A_p x = x_1^2 + \sum_{i=1}^{p-1}(x_i - x_{i+1})^2 + x_p^2 . It lies between 0 and 4\|x\|_2^2, because (a - b)^2 \le 2a^2 + 2b^2. So 0 \preceq \nabla^2 f \preceq L I.
  • Minimizer: A_p x = e_1 is solved by x_i^* = 1 - \frac{i}{p+1} for i \le p and 0 beyond. At a minimizer f^* = -\frac{L}{8} x_1^*, so f^* = \frac{L}{8}\Big(-1 + \frac{1}{p+1}\Big) .
  • Distance: summing the squares of the coordinates, \|x^*\|_2^2 = \frac{1}{(p+1)^2}\sum_{j=1}^p j^2 = \frac{p(2p+1)}{6(p+1)} \le \frac{p+1}{3} .
  • Krylov property: if x is supported on the first i < p coordinates, \nabla f(x) = \frac{L}{4}(A_p x - e_1) is supported on the first i + 1. By induction, x_k is supported on the first k coordinates.
  • Restricted minimum: on those coordinates f is the same function with A_k in place of A_p, so f(x_k) \ge \frac{L}{8}\big(-1 + \frac{1}{k+1}\big).
  • Conclusion: with p = 2k + 1, f(x_k) - f^* \ge \frac{L}{8}\Big(\frac{1}{k+1} - \frac{1}{2k+2}\Big) = \frac{L}{16(k+1)} , and \|x_0 - x^*\|^2 \le \frac{2k+2}{3} gives the claim. ∎

Example 10.2 — The worst function, observed For k = 50, the code runs Algorithm 5.4 on this function in dimension 101. After 50 steps the iterate has exactly 50 nonzero coordinates, and 1.21 \times 10^{-3} \ \le \ f(x_{50}) - f^* = 3.90 \times 10^{-3} \ \le \ 2.58 \times 10^{-2} , between the lower bound of Theorem 5.3 and the upper bound of Theorem 5.5.

Frank–Wolfe: optimization without projections

Theorem 10.3 — Conditional gradient (Frank and Wolfe 1956) Let f be convex and L-smooth on a compact convex set C of diameter D. The iteration s_k \in \arg\min_{s \in C} \nabla f(x_k)^\top s, \qquad x_{k+1} = x_k + \gamma_k (s_k - x_k), \qquad \gamma_k = \frac{2}{k + 2}, stays in C and satisfies, for k \ge 1, f(x_k) - f^* \le \frac{2 L D^2}{k + 2} . The quantity \nabla f(x_k)^\top (x_k - s_k) is an upper bound on f(x_k) - f^*, computed for free.

Proof. Let h_k = f(x_k) - f^*. The descent lemma and the choice of s_k give h_{k+1} \le h_k + \gamma_k \nabla f(x_k)^\top (s_k - x_k) + \frac{L \gamma_k^2 D^2}{2} \le (1 - \gamma_k) h_k + \frac{L \gamma_k^2 D^2}{2}, because, by the choice of s_k and then by convexity, \nabla f(x_k)^\top (s_k - x_k) \le \nabla f(x_k)^\top (x^* - x_k) \le -h_k .

With \gamma_0 = 1, h_1 \le LD^2/2. If h_k \le 2LD^2/(k+2), then h_{k+1} \le 2LD^2 (k + 1)/(k + 2)^2 \le 2LD^2/(k + 3). ∎

Each step solves a linear problem over C instead of a projection. On the \ell_1 ball the linear problem picks one signed vertex, so the iterates stay sparse; on the nuclear-norm ball it needs only the top singular pair (Jaggi 2013). In the code, Frank–Wolfe on an \ell_1-ball constrained least-squares problem with 200 variables has 14 nonzeros after 200 steps, with a certified gap of 0.30.

import numpy as np

# Nesterov's worst function f(x) = L/4 (x^T A x / 2 - x_1), A tridiagonal (2, -1), size p
L, K = 1.0, 50
p = 2 * K + 1
A = 2 * np.eye(p) - np.eye(p, k=1) - np.eye(p, k=-1)
f = lambda x: L / 4 * (0.5 * x @ A @ x - x[0])
grad = lambda x: L / 4 * (A @ x - np.eye(p)[0])
xstar = 1 - np.arange(1, p + 1) / (p + 1)
fstar = f(xstar)

x_prev = x = y = np.zeros(p)
for k in range(K):                              # accelerated gradient, x_0 = 0
    x_prev, x = x, y - grad(y) / L
    y = x + k / (k + 3) * (x - x_prev)
lower = 3 * L * xstar @ xstar / (32 * (K + 1) ** 2)
upper = 2 * L * xstar @ xstar / (K + 1) ** 2
print(f"K = {K}: lower bound {lower:.2e} <= AGD gap {f(x) - fstar:.2e} <= upper bound {upper:.2e}")
print("nonzero coordinates of x_K:", np.count_nonzero(np.abs(x) > 0), "out of", p)

# Frank-Wolfe on min ||Bz - c||^2 / 2 over the l1 ball of radius 1
rng = np.random.default_rng(6)
B, c = rng.normal(size=(50, 200)), rng.normal(size=50)
z = np.zeros(200)
for k in range(200):
    g = B.T @ (B @ z - c)
    i = np.argmax(np.abs(g))
    s = np.zeros(200); s[i] = -np.sign(g[i])     # linear minimization oracle: a vertex
    gap = g @ (z - s)                           # Frank-Wolfe duality gap >= f(z) - f*
    z = z + 2 / (k + 2) * (s - z)
print(f"Frank-Wolfe after 200 steps: gap {gap:.2e}, nonzeros {np.count_nonzero(z)}")

Mirror descent

Proposition 10.4 — Mirror descent on the simplex To minimize a convex f over the probability simplex, with subgradients bounded by G_\infty in \ell_\infty norm, replace the Euclidean step by the exponentiated gradient update x_{k+1, i} = \frac{x_{k,i} \, e^{-\alpha g_{k,i}}}{\sum_j x_{k,j} \, e^{-\alpha g_{k,j}}} . From the uniform distribution, with a well-chosen constant step \alpha, \min_{i \le k} f(x_i) - f^* \le G_\infty \sqrt{\frac{2 \log n}{k + 1}} . The dependence on the dimension is \sqrt{\log n}, against \sqrt{n} for the projected subgradient method in the worst case. The update is a proximal step with the entropy in place of the squared Euclidean distance (Nemirovski and Yudin 1983; Beck and Teboulle 2003).

Primal–dual interior-point methods

Proposition 10.5 — The primal–dual Newton system for LP For the LP, minimize c^\top x subject to Ax = b and x \succeq 0, with dual slack s = c - A^\top y, the central path is defined by Ax = b, \qquad A^\top y + s = c, \qquad x_i s_i = 1/t, \qquad x, s \succ 0 . A primal–dual method takes Newton steps on these equations with target x_i s_i = \sigma \mu, where \mu = x^\top s / n and \sigma \in (0, 1): \begin{pmatrix} 0 & A^\top & I \\ A & 0 & 0 \\ S & 0 & X \end{pmatrix} \begin{pmatrix} \Delta x \\ \Delta y \\ \Delta s \end{pmatrix} = -\begin{pmatrix} A^\top y + s - c \\ Ax - b \\ X S \mathbf{1} - \sigma \mu \mathbf{1} \end{pmatrix} , with X = \mathrm{diag}(x) and S = \mathrm{diag}(s), followed by a step that keeps x and s positive.

The iterates need not be feasible: the residuals shrink along the way. Mehrotra’s predictor–corrector (Mehrotra 1992) chooses \sigma adaptively from an affine-scaling step and adds a second-order correction; Wright (1997) gives the theory. The homogeneous self-dual embedding (Ye, Todd and Mizuno 1994) also detects infeasible or unbounded problems. The same ideas extend to SOCP and SDP through the symmetric-cone framework (Nesterov and Todd 1997).

Key takeaways — chapter 10

  • The worst function for first-order methods is a chain: each gradient reveals one more coordinate, which forces the 1/k^2 lower bound.
  • Frank–Wolfe replaces projections by linear minimization, gives sparse or low-rank iterates and a free certificate, at rate 1/k.
  • Mirror descent adapts the step to the geometry of the constraints; on the simplex it pays \sqrt{\log n} instead of \sqrt{n}.
  • Primal–dual methods run Newton’s method on the relaxed KKT system and are what solvers implement.

11. Research directions and open problems

Convex optimization is a mature field whose questions are now about exact constants, scale, structure and the boundary with nonconvex problems. This chapter, for self-study, points to active lines of work with references that open each of them.

Exact worst cases and optimal step sizes

Work by Drori and Teboulle (2014) shows that the worst case of a first-order method on smooth convex functions is itself the value of a small semidefinite program, the performance estimation problem. Taylor, Hendrickx and Glineur (2017) make this exact through interpolation conditions, so that the best possible bound of a method can be computed.

This approach found the optimized gradient method of Kim and Fessler (2016), whose bound is about half of Nesterov’s, and Drori (2017) proved that no method does better. Altschuler and Parrilo (2023) show that plain gradient descent, with a fractal schedule of long steps, already beats the 1/k rate. The optimal step-size schedules of gradient descent without momentum are not yet known.

Restart, sharpness and adaptivity

Accelerated methods are not monotone and do not adapt to strong convexity. O’Donoghue and Candès (2015) restart them when the objective increases, and Roulet and d’Aspremont (2020) show that restart schemes adapt to sharpness, a growth condition weaker than strong convexity, with near-optimal rates.

Scieur, d’Aspremont and Bach (2016) accelerate any convergent sequence by nonlinear extrapolation, and the monograph of d’Aspremont, Scieur and Taylor (2021) surveys acceleration. Removing the need to know L without line search, as in the adaptive method of Malitsky and Mishchenko (2020), remains an active topic.

Interior-point methods at scale

On the theory side, Lee and Sidford (2014) solve linear programs in about \sqrt{\mathrm{rank}} iterations, and Cohen, Lee and Song (2021) in the time of matrix multiplication. Whether linear programming admits a strongly polynomial algorithm, with a number of operations independent of the size of the numbers, is open: it is Smale’s ninth problem.

In practice, very large LPs and conic programs are now solved by first-order primal–dual methods, such as the PDHG method of Chambolle and Pock (2011) in the PDLP solver (Applegate and coauthors 2021), the operator splitting of SCS (O’Donoghue, Chu, Parikh and Boyd 2016), and ADMM (Boyd, Parikh, Chu, Peleato and Eckstein 2011). How to reach interior-point accuracy at first-order cost is open.

Low-rank semidefinite programming

An SDP in n \times n matrices costs at least n^2 memory. Burer and Monteiro (2003) factor X = VV^\top with V of few columns and optimize V directly, a nonconvex problem.

Boumal, Voroninski and Bandeira (2016) show that, for generic smooth SDPs with m constraints, second-order critical points are optimal once the number of columns exceeds about \sqrt{2m}. Yurtsever, Tropp, Fercoq, Udell and Cevher (2021) combine Frank–Wolfe with sketching to store only a low-rank approximation.

When are convex relaxations tight?

Amelunxen, Lotz, McCoy and Tropp (2014) predict the phase transitions of convex recovery problems with random data, such as the one observed in ch. 8, from a single geometric quantity, the statistical dimension of a descent cone. Chandrasekaran, Recht, Parrilo and Willsky (2012) build convex penalties for general structured signals from atomic norms.

Phase retrieval can be relaxed to an SDP (Candès, Strohmer and Voroninski 2013) or written as a MAXCUT-like problem (Waldspurger, d’Aspremont and Mallat 2015). For community detection, the semidefinite relaxation reaches the information-theoretic threshold of exact recovery (Hajek, Wu and Xu 2016). Explaining when relaxations of higher levels of the sums-of-squares hierarchy help is a central question of average-case complexity.

Convex optimization inside learning systems

Amos and Kolter (2017) and Agrawal, Amos, Barratt, Boyd, Diamond and Kolter (2019) use convex programs as layers of neural networks, differentiating the solution through the KKT conditions (Theorem 4.6). Making such layers fast and robust when the problem is degenerate is open.

Questions to explore

Exercises

Levels: ★ apply the course, ★★ combine results or prove a short statement, ★★★ open-ended or research-flavoured. Exercises 6, 13, 14, 15 and 16 are computational.

  1. ★ Convex or not. Which of these sets are convex? (a) The slab \{x : a \le c^\top x \le b\}. (b) The points closer to a than to b, \{x : \|x - a\|_2 \le \|x - b\|_2\}. (c) \{x \in \mathbb{R}^2 : x_1 > 0, \ x_2 > 0, \ x_1 x_2 \ge 1\}. (d) \{x \in \mathbb{R}^2 : x_1^2 - x_2^2 \le 1\}.

    Solution: (a) Convex, an intersection of two halfspaces. (b) Convex: squaring, the condition is the halfspace 2(b - a)^\top x \le \|b\|_2^2 - \|a\|_2^2 .

    1. Convex: on the open quadrant it reads \log x_1 + \log x_2 \ge 0, a superlevel set of a concave function.

    2. Not convex: (2, 2) and (2, -2) belong to it, but their midpoint (2, 0) does not.

  2. ★ Conjugates. Compute the conjugates of (a) |x| on \mathbb{R}; (b) the hinge \max(0, 1 - x); (c) the logistic loss \log(1 + e^x); (d) -\log\det X on positive definite matrices.

    Solution: (a) 0 on [-1, 1] and +\infty elsewhere (Example 2.7).

    1. f^*(y) = y on [-1, 0], and +\infty elsewhere.

    Indeed, the supremum is infinite for y > 0 (let x \to +\infty) and for y < -1 (let x \to -\infty).

    On [-1, 0], the concave piecewise-linear function x \mapsto yx - \max(0, 1 - x) is maximal at the kink x = 1.

    1. f^*(y) = y \log y + (1 - y)\log(1 - y) on [0, 1], with the convention 0 \log 0 = 0. The supremum is at x = \log(y / (1 - y)).

    2. f^*(Y) = -\log\det(-Y) - n on Y \prec 0. The computation is the same as for -\log x, with \nabla \log\det X = X^{-1}.

  3. ★ The dual of \ell_\infty regression. Write \min_x \|Ax - b\|_\infty as minimize \|r\|_\infty subject to r = Ax - b, and derive its dual.

    Solution: the Lagrangian is \|r\|_\infty + \nu^\top (Ax - b - r). Minimizing over r gives 0 if \|\nu\|_1 \le 1 and -\infty otherwise (the conjugate of a norm, Example 2.7).

    Minimizing over x requires A^\top \nu = 0. With \nu \to -\nu the dual is \text{maximize } b^\top \nu \quad \text{s.t.} \quad \|\nu\|_1 \le 1, \ A^\top \nu = 0 . Strong duality holds (no inequality constraints), so a dual vector certifies the optimal value.

  4. ★ Proximal operators. Compute (a) the proximal operator of \gamma times the indicator of the box [l, u]; (b) of \frac{\gamma\lambda}{2}\|x\|_2^2; (c) of \gamma \|x\|_2.

    Solution: (a) The projection, componentwise \min(\max(v_i, l_i), u_i). (b) v / (1 + \gamma\lambda), from the stationarity condition \gamma\lambda x + x - v = 0.

    1. Block soft thresholding: v \max(0, 1 - \gamma / \|v\|_2). By Proposition 2.9, the optimality condition is 0 \in \gamma \partial\|x\|_2 + x - v.

    If \|v\|_2 \le \gamma, then x = 0 works, with v/\gamma as subgradient. Otherwise x is a positive multiple of v, and its norm is \|v\|_2 - \gamma.

  5. ★ Counting iterations. Let f be L-smooth and \mu-strongly convex, with L = 100 and \mu = 1.

    1. How many iterations of gradient descent does Theorem 5.2 need to divide \|x - x^*\|^2 by 10^6? How many with the contraction factor 1 - 1/\sqrt{\kappa} of accelerated methods?

    2. Without strong convexity, how many iterations do Theorems 5.2 and 5.5 need to guarantee the following accuracy? f(x_k) - f^* \le 10^{-6} L \|x_0 - x^*\|^2

    Solution: (a) Here \kappa = 100. Gradient descent needs k \ge \log(10^6) / (-\log 0.99) = 1374.6, so 1375 iterations.

    With the factor 0.9, the count is 13.82 / 0.105 = 131.1, so 132 iterations.

    1. Gradient descent needs k \ge 5 \times 10^5. The accelerated method needs (k + 1)^2 \ge 2 \times 10^6, that is k \ge 1414.
  6. ★ The trade-off of the barrier parameter (computational). Run the barrier method of Example 6.8 with \mu \in \{2, 10, 50, 200, 1000\} and the same stopping rule. Count the centerings and the total number of Newton steps, and explain the result with Theorem 7.7.

    Hints and expected result: wrap the main loop in a loop over \mu. The code gives:

    \mu 2 10 50 200 1000
    centerings 31 10 7 5 4
    Newton steps 146 67 55 46 40

    The centerings follow the count of Algorithm 6.7. Small \mu wastes many cheap centerings. Large \mu makes each centering longer, but by far less than the bound m(\mu - 1 - \log\mu) of Theorem 7.7 suggests, so the total stays between 40 and 67 steps from \mu = 10 to \mu = 1000: the reason solvers use aggressive updates.

  7. ★★ Schur complements and hyperbolic constraints. (a) Show that \{(x, y, t) : y > 0, \ x^\top x / y \le t\} is convex by writing it as a linear matrix inequality. (b) Show that, for x \in \mathbb{R}^n and y, z \in \mathbb{R}, \|x\|_2^2 \le yz, \ y \ge 0, \ z \ge 0 \iff \left\| \begin{pmatrix} 2x \\ y - z \end{pmatrix} \right\|_2 \le y + z .

    Solution: (a) By Proposition 0.3 with the block yI \succ 0, the condition is \begin{pmatrix} t & x^\top \\ x & y I \end{pmatrix} \succeq 0 , a linear matrix inequality in (x, y, t), whose solution set is convex (Proposition 1.3).

    1. Squaring, 4\|x\|^2 + (y - z)^2 \le (y + z)^2 is \|x\|^2 \le yz. The cone constraint implies y + z \ge |y - z|, that is y, z \ge 0, and conversely y, z \ge 0 make y + z nonnegative, so squaring is legitimate.
  8. ★★ The dual of the support vector machine. Derive the dual of \text{minimize } \frac12 \|w\|_2^2 + C \sum_{i=1}^n \xi_i \quad \text{s.t.} \quad y_i (w^\top x_i + b) \ge 1 - \xi_i, \ \xi \succeq 0 , and use complementary slackness to describe the points with nonzero multipliers.

    Solution: with multipliers \alpha_i for the margin constraints and \beta_i for \xi_i \ge 0, stationarity gives w = \sum_i \alpha_i y_i x_i, \sum_i \alpha_i y_i = 0 and \alpha_i + \beta_i = C. The dual is \text{maximize } \sum_i \alpha_i - \frac12 \sum_{i, j} \alpha_i \alpha_j y_i y_j x_i^\top x_j \quad \text{s.t.} \quad 0 \le \alpha_i \le C, \ \sum_i \alpha_i y_i = 0 . \alpha_i > 0 only for points on or inside the margin (the support vectors), and \alpha_i < C forces \xi_i = 0. The data enter only through inner products, which Kernel Methods replaces by a kernel.

  9. ★★ The dual of the LASSO and a stopping rule. Consider the LASSO objective P(\beta) = \frac12\|y - X\beta\|_2^2 + \lambda\|\beta\|_1 . Introduce r = y - X\beta, derive the dual, and turn any \beta into a certified suboptimality bound.

    Solution: with multiplier \theta for r = y - X\beta, minimizing over r gives r = \theta, and minimizing over \beta requires \|X^\top \theta\|_\infty \le \lambda (Example 2.7). The dual is \text{maximize } \frac12\|y\|_2^2 - \frac12\|y - \theta\|_2^2 \quad \text{s.t.} \quad \|X^\top \theta\|_\infty \le \lambda , and at the optimum \theta^* is the residual y - X\beta^*.

    For any \beta, the scaled residual \theta = r \min(1, \lambda / \|X^\top r\|_\infty) is dual feasible, and P(\beta) - g(\theta) bounds P(\beta) - P^*.

    Since \theta = y is feasible when \lambda \ge \|X^\top y\|_\infty, with g(y) = P(0), this recovers \lambda_{\max} of Example 8.2. There it is divided by n, because of the factor 1/(2n).

  10. ★★ Step sizes for the subgradient method. (a) Among constant steps, show that \alpha = R / (G\sqrt{k + 1}) minimizes the bound of Theorem 5.7. (b) For \alpha_i = R / (G\sqrt{i + 1}), show a bound of order RG \log k / \sqrt{k}. (c) When f^* is known, show that the Polyak step \alpha_i = (f(x_i) - f^*) / \|g_i\|^2 also gives RG / \sqrt{k + 1}.

    Solution: (a) The bound (R^2 + (k + 1) G^2 \alpha^2) / (2(k + 1)\alpha) is minimal where its derivative in \alpha vanishes, at the given step, with value RG / \sqrt{k + 1}.

    1. \sum_{i \le k} 1/\sqrt{i+1} \ge 2(\sqrt{k + 2} - 1) and \sum_{i \le k} 1/(i+1) \le 1 + \log(k + 1), so the bound is at most \frac{RG \, (2 + \log(k + 1))}{4(\sqrt{k + 2} - 1)} .
    2. With this step, the expansion of Theorem 5.7 gives \|x_{i+1} - x^*\|^2 \le \|x_i - x^*\|^2 - \frac{(f(x_i) - f^*)^2}{G^2} . Summing, \sum_i (f(x_i) - f^*)^2 \le R^2 G^2. So the smallest squared gap is at most R^2 G^2 / (k + 1), which is the claim.
  11. ★★ Self-concordance. (a) Show that if f is self-concordant, so is x \mapsto f(Ax + b).

    1. Show that -\log x - \log(1 - x) is a 2-self-concordant barrier for [0, 1], and compute its Newton decrement at x = 1/4.

    2. Show that e^x is not self-concordant on \mathbb{R}, and find the largest interval on which it is.

    Solution: (a) The restriction of f(Ax + b) to a line is the restriction of f to a line, and Definition 7.1 only involves lines.

    1. Each term is a 1-self-concordant barrier (f'^2 / f'' = 1 for -\log x), and the parameters add.

    At x = 1/4, f' = -4 + 4/3 = -8/3 and f'' = 16 + 16/9 = 160/9. So \lambda^2 = f'^2 / f'' = 0.4 \le 2, and \lambda = \sqrt{0.4} \approx 0.63.

    1. f''' = f'' = e^x, and e^x \le 2 e^{3x/2} holds exactly when x \ge -2\log 2. So e^x is self-concordant on (-2\log 2, \infty) only.
  12. ★★ The efficient frontier. Without the constraint w \succeq 0, minimize w^\top \Sigma w subject to \mathbf{1}^\top w = 1 and \bar r^\top w = r, with \Sigma \succ 0.

    Let a = \mathbf{1}^\top \Sigma^{-1}\mathbf{1}, b = \mathbf{1}^\top \Sigma^{-1}\bar r and c = \bar r^\top \Sigma^{-1}\bar r. Show that the minimal variance is \sigma^2(r) = \frac{a r^2 - 2 b r + c}{a c - b^2} .

    Solution: stationarity gives w = \Sigma^{-1}(\lambda \mathbf{1} + \gamma \bar r) for some multipliers. The constraints become a\lambda + b\gamma = 1 and b\lambda + c\gamma = r, so \lambda = \frac{c - br}{ac - b^2}, \qquad \gamma = \frac{ar - b}{ac - b^2} . The variance is w^\top \Sigma w = \lambda + \gamma r, which is the formula. Its minimum, at r = b/a, is 1/a: the global minimum-variance portfolio \Sigma^{-1}\mathbf{1}/a.

  13. ★★ MAXCUT on the 5-cycle (computational). For the cycle with 5 vertices and unit weights, show that the maximum cut is 4 and that the SDP value is (25 + 5\sqrt{5})/8. Check it with the code of Example 9.5.

    Solution: an odd cycle cannot be fully cut, and alternating labels cut 4 edges. Place v_k at angle 4\pi k / 5 on the unit circle: consecutive vectors make an angle 4\pi/5, so the SDP value is at least 5 \cdot \frac{1 - \cos(4\pi/5)}{2} = \frac{25 + 5\sqrt{5}}{8} \approx 4.5225 . The dual point \nu = \frac14 \lambda_{\max}(L)\mathbf{1} is feasible. With \lambda_{\max}(L) = 2 - 2\cos(4\pi/5) \approx 3.618, its value is the same 4.5225, so both are optimal.

    The code returns 4.52254 and X_{12} = -0.80902. The ratio 4/4.5225 = 0.8845 is close to \alpha_{\mathrm{GW}}.

  14. ★★★ Frank–Wolfe or projections for low-rank matrices (computational). Generate a 200 \times 200 matrix of rank 5 and observe 20 % of its entries. Minimize the squared error on the observed entries over the nuclear-norm ball of radius \tau, (i) by projected gradient, with a full SVD per step, and (ii) by Frank–Wolfe, with only the top singular pair per step. Compare accuracy against time and the rank of the iterates.

    Hints and expected result: projecting on the nuclear-norm ball means projecting the singular values on an \ell_1 ball (Example 1.8 with a scaled simplex). Take \tau equal to the nuclear norm of the true matrix and the step 1/L with L = 1.

    After 300 iterations, runs with these sizes give a relative Frobenius error, against the true matrix, of about 7 % for projected gradient and about 10 % for Frank–Wolfe. The Frank–Wolfe iterations are three to four times cheaper (one call to scipy.sparse.linalg.svds with one singular pair). The k-th Frank–Wolfe iterate is a sum of k rank-one terms, which matters when n is large and k \ll n. Jaggi (2013) discusses these trade-offs.

  15. ★★★ Restarting acceleration. (a) Let f be L-smooth and \mu-strongly convex. Combine Theorem 5.5 with Proposition 2.10 to show that restarting Algorithm 5.4 every \lceil\sqrt{8\kappa}\rceil steps at least halves f - f^*.

    Deduce a complexity of order \sqrt{\kappa}\log(1/\varepsilon).

    1. Implement fixed restarts and the adaptive restart of O’Donoghue and Candès (2015), which restarts when f increases, on the quadratic of Example 5.6.

    Hints and expected result: (a) Strong convexity gives \|x_0 - x^*\|^2 \le 2(f(x_0) - f^*)/\mu, so after k steps f(x_k) - f^* \le 4\kappa (f(x_0) - f^*)/(k + 1)^2, at most half when (k + 1)^2 \ge 8\kappa.

    1. With \kappa = 10^4 the period is 283. After 3000 gradients the gap is about 9 \times 10^{-8} without restart, 8 \times 10^{-16} with fixed restarts, and 5 \times 10^{-19} with adaptive restart. Adaptive restart needs no knowledge of \mu; Roulet and d’Aspremont (2020) extend restart schemes to sharp functions.
  16. ★★★ The phase transition of basis pursuit (computational). With the code of Theorem 8.6, estimate the probability of exact recovery on a grid of (m/n, \, s/m) for n = 100. Compare with the prediction of Amelunxen, Lotz, McCoy and Tropp (2014): recovery succeeds when m exceeds the statistical dimension of the descent cone of \|\cdot\|_1, which is n\psi(s/n) with \psi(\rho) = \min_{\tau \ge 0} \Big\{ \rho(1 + \tau^2) + 2(1 - \rho)\big[(1 + \tau^2)\bar\Phi(\tau) - \tau\phi(\tau)\big] \Big\} . Here \phi and \bar\Phi are the standard Gaussian density and upper tail.

    Hints and expected result: the empirical transition is sharp and follows the curve. For the setting of ch. 8 (n = 200, m = 60), the statistical dimension equals 60 near s = 17, consistent with the observed drop between s = 15 (15 of 20 recovered) and s = 20 (4 of 20). Larger n makes the transition sharper.

Projects and assessment

The official assessment, on master-mva.com, is an exam (“Examen”), with no format or weight displayed. The Université Paris-Saclay course detail describes the assessment as “Evaluation Continue non Intégrale” (partial continuous assessment).

The written exam below is a proposal in the spirit of the official exam, for self-assessment. The projects are not part of the official assessment: they are paper studies at the scale of other MVA courses, for students who want to practise the methods on a real question, or to prepare a research internship in optimization.

Solo projects

  1. [Solo · ≈ 20 h] Adaptive restart of accelerated methods. Can restarting recover the linear rate of acceleration without knowing the strong-convexity constant? A paper study of O’Donoghue and Candès (2015).
    • Implement: gradient descent, Algorithm 5.4, fixed-period restart, and the function and gradient restart schemes of the paper, plus the constant-momentum method when \mu is known.
    • Data: quadratics with condition numbers from 10^2 to 10^6, and \ell_2-regularized logistic regression on the breast-cancer data set bundled with scikit-learn (569 samples, 30 features, standardized before use).
    • Deliverables: code, 4–6 page report, 10-minute talk. Chapters: ch. 2, 5.
    • Success criterion: adaptive restart reaches a gap of 10^{-8} within a factor 2 of the number of gradients of the best fixed period, on every test problem.
  2. [Solo · ≈ 20 h] A barrier solver for linear programs. How far can fifty lines of NumPy go against a production LP solver?
    • Implement: Algorithm 6.7 with a phase I problem, equality constraints through Proposition 6.4, and a certificate of infeasibility read from the dual of phase I.
    • Data: random feasible and infeasible LPs with 50 to 500 inequalities, and transportation problems with known optimum.
    • Deliverables: code, 4–6 page report, 10-minute talk. Chapters: ch. 4, 6, 7.
    • Success criterion: relative agreement 10^{-6} with HiGHS on 100 random instances; a plot of total Newton steps against the number of constraints that grows slowly, as in Boyd and Vandenberghe (2004, §11.3); every infeasible instance detected with a valid certificate.
  3. [Solo · ≈ 20 h] Sparse inverse covariance estimation. How many samples does the penalized likelihood of ch. 8 need to recover the graph of a Gaussian model? A paper study of Banerjee, El Ghaoui and d’Aspremont (2008).
    • Implement: block coordinate descent on the dual problem, with a duality-gap stopping rule, for the penalty of ch. 8 (every entry of \Theta) and for the variant that leaves the diagonal unpenalized.
    • Data: synthetic Gaussian models on chain and grid graphs with 50 variables, sample sizes from 50 to 1000.
    • Deliverables: code, 4–6 page report, 10-minute talk. Chapters: ch. 2, 4, 8.
    • Success criterion: duality gap below 10^{-6}; for the variant with an unpenalized diagonal, which is the convention of scikit-learn, estimates within 10^{-4} of sklearn.covariance.graphical_lasso run with tol=1e-10; a curve of support recovery (F1 score) against sample size.

Group projects

  1. [Group of 2–3 · ≈ 30 h each] MAXCUT at scale: interior points against low-rank factorization. How large a MAXCUT relaxation can be solved and rounded on a laptop? A paper study of Goemans and Williamson (1995) and Burer and Monteiro (2003).
    • Split: member A extends the barrier method of Example 9.5; member B implements the Burer–Monteiro factorization with unit-norm rows and a projected or Riemannian gradient; member C implements rounding with local search, and the experiments.
    • Data: random graphs G(n, 1/2), planted partitions and cycles, with n from 14 (exact enumeration) to 2000.
    • Deliverables: code, 8–10 page joint report, 20-minute talk. Chapters: ch. 6, 7, 9.
    • Success criterion: on graphs with at most 20 vertices, rounded cuts above 0.878 times the SDP bound and compared with the exact optimum; on the largest graphs, both SDP solvers agree to 10^{-4} where both run, and the factorization scales beyond.
  2. [Group of 2–3 · ≈ 30 h each] Phase transitions of convex recovery. Does the statistical dimension predict where \ell_1 and \ell_\infty recovery succeed? A paper study of Amelunxen, Lotz, McCoy and Tropp (2014), with Donoho (2006).
    • Split: member A writes the solvers (basis pursuit and \ell_\infty recovery as LPs, and FISTA on a penalized version for speed); member B computes the statistical dimensions (Ex. 16 for \ell_1; for \ell_\infty at a sign vector it equals n/2); member C runs the experiments.
    • Data: Gaussian measurements of sparse vectors and of sign vectors, n from 100 to 400.
    • Deliverables: code, 8–10 page joint report, 20-minute talk. Chapters: ch. 3, 5, 8.
    • Success criterion: the empirical 50 % transition lies within 0.05 of the predicted curve (in m/n) over the whole grid.

Written exam (proposal)

Three hours, one handwritten A4 sheet allowed, no calculator needed; four independent questions.

  1. Question (5 points). State Slater’s condition and the KKT conditions for a convex program with differentiable functions. Prove that a KKT point is primal optimal. Give a convex problem with a nonzero duality gap and say which hypothesis fails.

    Expected: Theorem 4.4 and the four conditions of Theorem 4.6. Proof: the Lagrangian is convex in x and stationary, so x minimizes it; complementary slackness gives g(\lambda, \nu) = f_0(x); weak duality concludes. Example 4.5, where no point is strictly feasible.

  2. Question (6 points). Minimize \frac12\|x\|_2^2 subject to a^\top x \ge b, with a = (1, 2) and b = 2. (a) Solve the KKT conditions. (b) Derive and solve the dual, and check that the gap is zero. (c) Predict the optimal value for b = 2.1 with Proposition 4.7, and compare with the exact value.

    Expected: (a) Stationarity gives x^* = \lambda^* a, and the constraint is active, so \lambda^* = b/\|a\|^2 = 0.4. Hence x^* = (0.4, 0.8) and p^* = 0.4.

    1. Minimizing the Lagrangian at x = \lambda a gives the dual function g(\lambda) = \lambda b - \frac12 \lambda^2\|a\|^2 = 2\lambda - 2.5\lambda^2 , maximal at \lambda = 0.4 with value 0.4: the gap is zero.

    2. Prediction 0.4 + 0.4 \times 0.1 = 0.44; exact value b^2/(2\|a\|^2) = 0.441.

  3. Question (5 points). Let f be convex and L-smooth with minimizer x^*. Prove that gradient descent with step 1/L satisfies f(x_k) - f^* \le L\|x_0 - x^*\|^2/(2k).

    Expected: the descent lemma with the step 1/L; convexity at x_k; the identity that turns the sum into \frac{L}{2}(\|x_k - x^*\|^2 - \|x_{k+1} - x^*\|^2); telescoping and monotonicity (Theorem 5.2).

  4. Question (4 points). Write each problem as an LP, an SOCP or an SDP: (a) \min_x \|Ax - b\|_1; (b) \min_x \|Ax - b\|_2 + \|x\|_1.

    1. \min c^\top x subject to a^\top x \le 1 for all a with \|a - \bar a\|_2 \le \rho; (d) \min_x \lambda_{\max}(A_0 + \sum_i x_i A_i).

    Expected, one point each:

      1. LP: minimize \mathbf{1}^\top t s.t. -t \preceq Ax - b \preceq t.
      1. SOCP: minimize s + \mathbf{1}^\top u s.t. \|Ax - b\|_2 \le s and -u \preceq x \preceq u.
      1. SOCP: minimize c^\top x s.t. \bar a^\top x + \rho\|x\|_2 \le 1 (Example 3.5).
      1. SDP: minimize t s.t. A_0 + \sum_i x_i A_i \preceq tI.

Total: 5 + 6 + 5 + 4 = 20 points.

Grading rubric (proposal)

Criterion Weight What earns the marks
Understanding of the method or paper 25 % The problem, the algorithm and its assumptions are stated precisely; the key theorem is explained with its proof idea
Correctness of the implementation 25 % The code runs from a fixed seed, is checked on a case with a known answer, and certifies its results with duality gaps
Experimental design and analysis 20 % Comparisons at equal cost (gradients, Newton steps or time), several instances, honest reporting of failures
Report and presentation 20 % Clear structure within the page and time limits, readable figures, a correct answer to “why does it work?”
Questions and teamwork 10 % Precise answers to questions; for groups, a visible and balanced split of the work

References

Official references of the course (master-mva.com):

Textbooks and monographs:

Papers: