Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Again, consider the general constrained optimization problem

minimize⁡f0(x)subject to⁡x∈Ω \begin{array}{ll} \minimize &\quad f_0(x)\\ \st &\quad x \in \Omega \end{array}

Goal: design a simple algorithm, based on first-order information ∇f\nabla f to solve (1).

Recall from Chapter 4 that, for unconstrained problems (Ω=Rn\Omega = \mathbb{R}^n) with differentiable objective, one simple algorithm is gradient descent (GD):

x(k+1)=x(k)−αk∇f(x(k)),αk>0,k=0,1,…x^{(k+1)} = x^{(k)}-\alpha_k\nabla f(x^{(k)}),\quad \alpha_k >0, \quad k=0, 1, \ldots

For constrained problems, a natural generalization is projected gradient descent (PGD), which combines GD with (Euclidean) projection onto Ω\Omega.

Projection onto a set

Comments

Projected gradient algorithm

Typical step-size strategies

Example

Consider the optimization problem

minimize⁡(x1−2)2+(x2−1)2subject tox12−x2≤0x1+x2≤2\begin{split} \operatorname{minimize}&\quad (x_1-2)^2+(x_2-1)^2\\ \text{subject to}&\quad x_1^2 - x_2 \leq 0\\ &\quad x_1+x_2\leq 2 \end{split}

First, let us plot the objective function and feasible set.

Source
<Figure size 640x480 with 1 Axes>

This can now visualize the trajectory of PGD for various starting points. In this example, we cannot compute easily the projection onto Ω\Omega, so that we compute it using a numerical solver (CVXPy, see in a few sections). The implementation is very basic, uses fixed step-size, and stops after a finite a number of iterations. Of course, we can do better, but that’s just to demonstrate how PGD forces iterates to be feasible by projecting the usual GD step onto Ω\Omega.

Source
<Figure size 640x480 with 1 Axes>

Comments on projected gradient descent