Convexity turns local optimality conditions into certificates of global solutions, even when objectives have corners or encode constraints. This provides a common language for understanding regularization and designing optimization methods. We develop subgradients and normal cones, study convex conjugates and their relation to smoothness, and derive dual problems and optimality conditions.
We write f(x) for the objective and x for the variable to be optimized. The main references are [13, 4].
Equivalently, its epigraph {(x,r)∈H×R;r⩾f(x)} is convex. The inequality is interpreted in the extended real line Rˉ, with the convention 0⋅(+∞)=0 at the endpoints t=0,1.
The function f is strictly convex if the inequality in (18.2) is strict whenever x,y∈dom(f) are distinct and 0<t<1.
A set Ω is convex if and only if ιΩ is a convex function.
Figure 18.1. Convexity and strict convexity for functions and sets.
Throughout the chapter, convex functions f are assumed proper, meaning dom(f)=∅, and lower semicontinuous (lsc), meaning that for every x∈H,
y→xliminff(y)⩾f(x).
For a convex function, lower semicontinuity is equivalent to the epigraph epi(f) being closed.
We denote by Γ0(H) the set of proper convex lsc functions.
We first address existence. Lower semicontinuity and coercivity provide a useful sufficient condition.
This compactness argument is known as the direct method in the calculus of variations.
For f in Γ0(H), the minimizer set argminf is closed and convex, and every local minimizer is global. Strict convexity of f implies that there is at most one minimizer.
Subdifferential.
The subdifferential at x of f is
∂f(x):={u∈H∗;∀y∈H,f(y)⩾f(x)+⟨u,y−x⟩},x∈dom(f).
We set ∂f(x)=∅ outside dom(f). Here H∗=RN denotes the space of dual vectors. The inner product identifies the dual space with H, but distinguishing primal and dual variables remains useful. The duality pairing itself is canonical; the identification of a linear functional with a vector depends on the inner product.
The subdifferential ∂f(x) consists of the slopes u of supporting affine functions f(x)+⟨u,z−x⟩ that lie below f.
Figure 18.2. The subdifferential
At an interior point of dom(f), the function f is differentiable exactly when its subdifferential consists of the gradient alone:
∂f(x)={∇f(x)}.
Multiple elements of ∂f(x) indicate distinct supporting slopes of f at x.
The subdifferential can also be empty at a boundary point of the effective domain. For example, f(x)=−1−x2 on [−1,1], extended by +∞ outside this interval, has no subgradient at x=±1.
Since ∂f(x)⊂H∗ is an intersection of half-spaces, it is a closed convex set.
Thus ∂f:H↦2H∗ is a set-valued operator, also written ∂f:H↪H∗.
For the absolute value f(x)=∣x∣, write ∂f(x)=∂∣⋅∣(x). Its subdifferential is
∂∣⋅∣(x)=⎩⎨⎧{−1}ifx<0,{1}ifx>0,[−1,1]ifx=0.
Figure 18.3. Subdifferential of the absolute value and a piecewise affine convex function.
First-order conditions.
The subdifferential gives a necessary and sufficient optimality condition.
Subdifferential calculus.
Calculus rules simplify subdifferential computations. For a separable function f(x1,…,xK)=∑k=1Kfk(xk), the subdifferential is the Cartesian product
∂f(x1,…,xK)=∂f1(x1)×…×∂fK(xK).
Applying this rule to the ℓ1 norm ∣∣x∣∣1=∑k=1N∣xk∣ gives
∂∣∣⋅∣∣1(x)=k=1∏N∂∣⋅∣(xk)
a hyperrectangle. With I=supp(x), the condition u∈∂∣∣⋅∣∣1(x) is equivalent to
uI=sign(xI)and∣∣uIc∣∣∞⩽1.
A sum rule requires a domain qualification. If one function is finite and continuous at a point in the domain of the other, then for every x∈dom(f)∩dom(g),
∂(f+g)(x)=∂f(x)⊕∂g(x)={u+v;(u,v)∈∂f(x)×∂g(x)}
where ⊕ denotes the Minkowski sum. In particular, if f is differentiable at x, then
∂(f+g)(x)=∇f(x)+∂g(x)={∇f(x)+v;v∈∂g(x)}.
Positive scaling gives
∀λ>0,∂(λf)(x)=λ(∂f(x)).
General compositions need not preserve convexity, so no unrestricted chain rule is available.
Composition with a linear map does preserve convexity. For A∈RP×N and f∈Γ0(RP), assume Im(A)∩relint(dom(f))=∅. Then f∘A∈Γ0(RN) and
∂(f∘A)(x)=A∗(∂f)(Ax):={A∗u;u∈∂f(Ax)}.
Normal cone.
For a nonempty closed convex set C, the subdifferential of its indicator is the normal cone:
∀x∈C,∂ιC(x)=NC(x):={v;∀z∈C,⟨z−x,v⟩⩽0}.
Outside the set, x∈/C implies ∂ιC(x)=∅.
For an affine space C=a+V with direction space V⊂H, the normal cone at each of its points is NC(x)=V⊥, the orthogonal complement of V. More generally, at an interior point x∈int(C) of C, we have NC(x)={0}. At a boundary point, the normal cone describes the supporting directions of C at x.
Figure 18.4. Normal cones
The normal cone expresses first-order optimality for the constrained problem
x∈Cminf(x)
If f is finite and continuous at a point of C, the sum rule gives the optimality condition
The Legendre–Fenchel transform provides a dual representation of a convex function. It makes many Lagrange-duality calculations systematic by expressing inner minimizations through conjugates.
For f∈Γ0(H), we define its Legendre–Fenchel transform, or convex conjugate, by
f∗(u):=xsup⟨x,u⟩−f(x).(18.3)
As a supremum of continuous affine functions, f∗ is convex and lower semicontinuous; in fact, f⋆∈Γ0(H∗). The following biconjugacy theorem recovers the original function.
Even when f is not convex, f∗ is convex. If f admits an affine minorant, f∗∗ is its lower semicontinuous convex envelope: the largest lower semicontinuous convex function below f.
The subdifferentials of f and f∗ satisfy the following inverse relation.
Here are useful examples and transformation rules.
The Legendre–Fenchel transform exchanges smoothness and strong convexity. It inverts subdifferentials; when f is twice continuously differentiable with positive definite Hessian and y=∇f(x), the inverse function theorem yields
∂2f∗(y)=(∂2f(x))−1.
The next statement gives a version of this correspondence that does not require second derivatives.
This suggests a useful smoothing operation. The infimal convolution is
(f⊗g)(x):=y+y′=xinf{f(y)+g(y′)}.
For proper convex functions, whenever this infimum defines a proper function, it is convex and satisfies
(f⊗g)∗=f∗+g∗.
Moreover, (f+g)∗=f∗⊗g∗ under the qualification relint(dom(f))∩relint(dom(g))=∅; without a qualification, a lower semicontinuous closure can be necessary.
For μ>0, the Moreau–Yosida regularization of f∈Γ0(H) is
fμ:=f⊗(2μ1∣∣⋅∣∣2)=(f∗+2μ∣∣⋅∣∣2)∗.(18.4)
The function inside the conjugate is μ-strongly convex, so fμ has a 1/μ-Lipschitz gradient.
For the absolute value, the Moreau–Yosida regularization is
(∣⋅∣μ)(x)={2μ1x2if∣x∣⩽μ,∣x∣−2μif∣x∣>μ.
Compare this with the earlier regularization x2+μ2, which lies above the absolute value.
A dual problem depends on the chosen primal formulation. A change of variables or a different representation of the constraints can produce a different dual problem.
for a continuous convex function f:H→R, a matrix A∈RP×N and a function g:H→RQ such that each coordinate gi:H→R is continuous and convex.
In the standard formulation of a convex program, equality constraints are affine.
Problems with convex inequality constraints can be written in the form (18.5). The representation is not unique, and different formulations lead to different dual problems.
For simplicity, f is assumed finite and continuous on its full domain dom(f)=RN.
The theory extends to more general dom(f), with additional domain qualifications. Here all constraints are expressed through Ax=y and g(x)⩽0.
Conic duality extends this construction from nonnegativity x⩾0 to positive semidefiniteness X⪰0 of a matrix X, and more generally to membership in a convex cone.
The dual objective is F(u,v):=infxL(x,u,v). Exchanging the order of optimization gives the dual value
d⋆=(u,v)∈RP×R+QsupF(u,v).(18.6)
The dual objective F is concave because it is an infimum of affine functions. The dual problem therefore maximizes a concave objective.
Weak duality states that every feasible dual value is a lower bound on the primal optimum.
The next theorem gives a constraint qualification that guarantees equality of the primal and dual values.
The existence of x0 is Slater’s constraint qualification; the strict inequality g(x0)<0 holds componentwise. Other, weaker qualifications are possible.
Condition (18.8) states primal and dual feasibility.
Condition (18.9) expresses optimality of L(x,u,v) with respect to x.
Together with feasibility, condition (18.10) expresses maximality of L(x⋆,u,v) over the admissible multipliers (u,v).
Together these are the Karush–Kuhn–Tucker (KKT) conditions. Under the stated qualification, they are necessary and sufficient for primal-dual optimality.
Complementary slackness, vi⋆gi(x⋆)=0, relates a multiplier to its constraint: if gi(x⋆)<0, the constraint is inactive and vi⋆=0; if vi⋆>0, the constraint must be active, gi(x⋆)=0.
For an affine inequality gi(x)=⟨x,hi⟩−ci⩽0, strict feasibility gi(x0)<0 may be replaced by ordinary feasibility ⟨x0,hi⟩⩽ci in the qualification.
If dom(f) is a proper subset of RN, the objective itself encodes constraints in addition to those written with ⩽. The qualification then also requires x0∈relint(dom(f)).
Theorem 18.11 extends the Lagrange-multiplier conditions to convex problems with inequalities. Inequality constraints introduce nonnegative multipliers v. Convexity ensures that the KKT conditions are sufficient, and the stated constraint qualification ensures their necessity.
As an example, consider projection onto a nonempty affine space {x:Ax=y}:
The minimizing x satisfies x−z+A∗u=0, hence x=z−A∗u. Therefore
F(u)=−21∣∣A∗u∣∣2+⟨u,Az−y⟩.
An optimal multiplier solves AA∗u⋆=Az−y. Since y∈Im(A), a solution is u⋆=(AA∗)+(Az−y), where + denotes the Moore–Penrose inverse. If A has full row rank, (AA∗)+=(AA∗)−1. The unique projection is
x⋆=ProjA⋅=y(z)=z−A+(Az−y)=(Id−A+A)z+A+y.(18.11)
A further example, the Lasso, is treated in Section 11.1.5.
This gives the Fenchel–Rockafellar dual problem. The following theorem states a sufficient domain qualification for strong duality.
Condition (18.16) is the constraint qualification ensuring that one can exchange the infimum and supremum in (18.17). It is the relative-interior qualification corresponding to the equality-constrained reformulation (18.14).
The relations (18.18) express first-order optimality in the primal variable x and dual variable u for the saddle function L. They can be collected in matrix notation as