Skip to content
nonconvexcard

Projected, Proximal and Constrained First-Order Methods

Projection, the proximal operator, mirror descent and Frank–Wolfe, and the single inequality that makes all of their proofs work.

Advanced OptimizationGraduate⏱ 1 day13 min readprojected gradientproximalmirror descentfrank-wolfecoordinate descent
4 problems →

Unconstrained gradient descent needs one modification to handle constraints and non-smooth regularisers, and the modification is the same in every case: replace "take a gradient step" by "take a gradient step, then do something that respects the structure". This page collects the four standard choices of "something".

Projection

DefinitionEuclidean projection

For a closed convex C⊆Rd\mathcal{C}\subseteq\R^d, ΠC(x)=arg min⁡z∈C∥x−z∥2\Pi_{\mathcal{C}}(x) = \argmin_{z\in\mathcal{C}}\norm{x-z}_2. The minimiser exists and is unique by strong convexity of the objective on the closed convex feasible set.

LemmaProjection is non-expansive

For all x,y∈Rdx,y\in\R^d and all z∈Cz\in\mathcal{C},

(i)⟨x−ΠC(x),z−ΠC(x)⟩≤0,(ii)∥ΠC(x)−ΠC(y)∥2≤∥x−y∥2.\text{(i)}\quad \ip{x - \Pi_\mathcal{C}(x)}{z - \Pi_\mathcal{C}(x)} \le 0, \qquad \text{(ii)}\quad \norm{\Pi_\mathcal{C}(x)-\Pi_\mathcal{C}(y)}_2 \le \norm{x-y}_2 .
TheoremConvergence of projected gradient descent

Let ff be convex and LL-smooth on a closed convex C\mathcal{C}, with minimiser x⋆x^\star over C\mathcal{C}. The iteration

xt+1=ΠC(xt−1L∇f(xt))x_{t+1} = \Pi_\mathcal{C}\big(x_t - \tfrac1L\nabla f(x_t)\big)

satisfies f(xt)−f(x⋆)≤L∥x0−x⋆∥222tf(x_t) - f(x^\star) \le \dfrac{L\norm{x_0-x^\star}_2^2}{2t}, the same rate as in the unconstrained case.

The proximal operator

DefinitionProximal operator

For a convex, closed, proper h:Rd→R∪{+∞}h:\R^d\to\R\cup\{+\infty\} and η>0\eta>0,

prox⁡ηh(v)=arg min⁡z{h(z)+12η∥z−v∥22}.\prox_{\eta h}(v) = \argmin_{z}\left\{h(z) + \frac{1}{2\eta}\norm{z-v}_2^2\right\}.

The minimiser is unique because the objective is strongly convex.

Taking h=ιCh = \iota_\mathcal{C}, the indicator function of a convex set (00 on C\mathcal{C}, +∞+\infty off it), recovers prox⁡ηιC=ΠC\prox_{\eta\iota_\mathcal{C}} = \Pi_\mathcal{C}. So projection is a special case of the proximal operator, and the theory below subsumes the theory above.

PropositionProx of the l1 norm is soft thresholding

For h(z)=∥z∥1h(z) = \norm{z}_1,

[prox⁡ηh(v)]i=sign⁡(vi)max⁡(∣vi∣−η, 0)=:Sη(vi).\big[\prox_{\eta h}(v)\big]_i = \sign(v_i)\max\big(|v_i| - \eta,\ 0\big) =: S_\eta(v_i).

Key idea

Soft thresholding is why the lasso produces exactly-zero coefficients rather than merely small ones. A gradient step followed by soft thresholding sets to zero every coordinate whose gradient signal is below η\eta — the sparsity is created by the prox operator, in closed form, at no computational cost. Ridge regression, whose prox is the shrinkage v/(1+2η)v/(1+2\eta), never produces an exact zero.

TheoremConvergence of proximal gradient descent

Let F=f+hF = f + h with ff convex and LL-smooth and hh convex closed proper. The iteration

xt+1=prox⁡h/L(xt−1L∇f(xt))x_{t+1} = \prox_{h/L}\big(x_t - \tfrac1L\nabla f(x_t)\big)

satisfies F(xt)−F⋆≤L∥x0−x⋆∥222tF(x_t)-F^\star \le \dfrac{L\norm{x_0-x^\star}_2^2}{2t}. The accelerated variant (FISTA) attains O(1/t2)O(1/t^2).

Quoted from Beck–Teboulle. The structure of the proof is the projected-gradient proof with the non-expansiveness of ΠC\Pi_\mathcal{C} replaced by the firm non-expansiveness of prox⁡\prox; the references give it in full.

Algorithm — ISTA — proximal gradient for the lasso
  1. Input. Design X∈Rn×pX\in\R^{n\times p}, response yy, regularisation λ\lambda, step η=1/L\eta = 1/L with L=∥X⊤X∥/nL = \norm{X^\top X}/n.
  2. Repeat for t=0,1,2,…t = 0,1,2,\dots:
  3. gradient step vt=βt−ηnX⊤(Xβt−y)v_t = \beta_t - \dfrac{\eta}{n} X^\top(X\beta_t - y);
  4. soft threshold βt+1=Sηλ(vt)\beta_{t+1} = S_{\eta\lambda}(v_t), coordinatewise;
  5. Until ∥βt+1−βt∥2≤tol\norm{\beta_{t+1}-\beta_t}_2 \le \text{tol}.

Frank–Wolfe

When projection is expensive but linear minimisation over C\mathcal{C} is cheap — as for the ℓ1\ell^1 ball, the nuclear-norm ball, or a combinatorial polytope — the conditional gradient method applies.

TheoremFrank–Wolfe convergence

Let ff be convex and LL-smooth on a compact convex C\mathcal{C} of diameter DD. The iteration

st=arg min⁡s∈C⟨∇f(xt),s⟩,xt+1=(1−γt)xt+γtst,γt=2t+2,s_t = \argmin_{s\in\mathcal{C}}\ip{\nabla f(x_t)}{s}, \qquad x_{t+1} = (1-\gamma_t)x_t + \gamma_ts_t, \quad \gamma_t = \frac{2}{t+2},

satisfies f(xt)−f⋆≤2LD2t+2f(x_t) - f^\star \le \dfrac{2LD^2}{t+2}.

Mirror descent

PropositionMirror descent and geometry

Let Φ\Phi be 11-strongly convex with respect to a norm ∥⋅∥\norm{\cdot} on C\mathcal{C}, and define the Bregman divergence DΦ(x,y)=Φ(x)−Φ(y)−⟨∇Φ(y),x−y⟩D_\Phi(x,y) = \Phi(x)-\Phi(y)-\ip{\nabla\Phi(y)}{x-y}. The iteration

xt+1=arg min⁡x∈C{η⟨∇f(xt),x⟩+DΦ(x,xt)}x_{t+1} = \argmin_{x\in\mathcal{C}}\left\{\eta\ip{\nabla f(x_t)}{x} + D_\Phi(x,x_t)\right\}

satisfies, for convex ff with ∥∇f∥∗≤G\norm{\nabla f}_* \le G in the dual norm,

f(xˉT)−f⋆≤DΦ(x⋆,x0)ηT+ηG22,f(\bar x_T) - f^\star \le \frac{D_\Phi(x^\star,x_0)}{\eta T} + \frac{\eta G^2}{2},

so with optimal η\eta the rate is G2DΦ(x⋆,x0)/TG\sqrt{2D_\Phi(x^\star,x_0)/T}.

The proof is the subgradient-method proof with 12∥⋅∥22\tfrac12\norm{\cdot}_2^2 replaced by DΦD_\Phi throughout; it is in Bubeck's survey. The content is the choice of Φ\Phi:

C\mathcal{C}Φ\PhiNormRate constant
Rd\R^d12∥x∥22\tfrac12\norm{x}_2^2ℓ2\ell^2∥x⋆∥2∥∇f∥2\norm{x^\star}_2\norm{\nabla f}_2
simplex Δd\Delta_d∑ixilog⁡xi\sum_ix_i\log x_iℓ1\ell^1log⁡d ∥∇f∥∞\sqrt{\log d}\,\norm{\nabla f}_\infty

On the simplex the entropic choice gives a log⁡d\sqrt{\log d} dependence on dimension where the Euclidean choice would give d\sqrt d. That is a genuinely large gain for large dd, and it is obtained by measuring the gradient in ℓ∞\ell^\infty rather than ℓ2\ell^2 — the geometry of the problem, not the algorithm, is what changed.

Key idea

Gradient descent is not "the" first-order method; it is the first-order method for the Euclidean geometry. The gradient is a representation of the derivative that depends on an inner product, and mirror descent makes that dependence a design choice. Adaptive methods such as Adam can be read the same way, as descent in a metric that changes with the iterates.

Problems

Projection onto the probability simplexProof · Advanced · 1 hour The proximal operator of the l1 normProof · Beginner · 15 min The Frank–Wolfe duality gap certificateProof · Intermediate · 30 min Mirror descent on the simplex beats Euclidean projectionProof · Graduate · 1 hour

References

  • SurveyNeal Parikh and Stephen Boyd (2014). Proximal Algorithms
  • PaperAmir Beck and Marc Teboulle (2009). A fast iterative shrinkage-thresholding algorithm for linear inverse problemsFISTA, the accelerated proximal gradient method.
  • PaperMartin Jaggi (2013). Revisiting Frank–Wolfe: Projection-Free Sparse Convex Optimization
  • SurveySébastien Bubeck (2015). Convex Optimization: Algorithms and Complexity

These works are cited as sources to read, not reproduced. All exposition, examples and problems on this site are written independently; where an argument is standard, the citation points to a canonical treatment.

Results stated on this page

Problems (4)

All problems