CPBS 7620 - Lecture 18 - Convex Optimization
Overview
Nicholas Dwork introduces convex sets, convex functions, and convex optimization, then explains disciplined convex programming (DCP) as a rule-based way to build problems that solvers can verify and solve. He demonstrates CVX and CVXPY workflows, including status checks, a LASSO objective, and reformulations that make otherwise unrecognized or nonconvex-looking expressions DCP-compliant.
Key takeaways
- A convex optimization problem combines a convex objective with convex inequality constraints and affine equalities, so every local minimum is also a global minimum.
- The epigraph criterion connects function convexity to set convexity: a function is convex exactly when the region above its graph is a convex set.
- DCP rules let CVXPY verify convexity compositionally, but an equivalent expression may be accepted or rejected depending on whether it uses recognized atoms.
- The expression sqrt(1 + z^2) is not recognized directly in the example, but rewriting it as the norm of [1, z] makes its convex structure recognizable to DCP.
- Algebraic substitutions can expose convex structure: for positive x and y, xy ≥ 4 is equivalent to 4/x ≤ y.
- Introducing t as a reciprocal denominator and variables y₁ = tx₁ and y₂ = tx₂ can linearize a fractional objective and convert its constraints into a DCP-compliant form.
Chapters
- A set is convex when every line segment between two of its points stays inside it; intersections of any number of convex sets remain convex.
- A function is convex when its epigraph, the set of points above its graph, is convex; sums, pointwise maxima, and positive scalar multiples preserve convexity.
- Dwork defines convex optimization using a convex objective, convex inequality constraints, and affine equalities, then distinguishes the feasible set from the optimal set.
- Examples include the squared L2 residual plus an L1 penalty used in LASSO, and the perspective and indicator-function constructions.
- Disciplined convex programming builds problems from recognized function atoms using composition rules, and Dwork identifies CVX for MATLAB and CVXPY for Python as implementations.
- For convex outer function H, composition with affine G is convex; composition also works when H is nonincreasing and G concave, or H is nondecreasing and G convex.
- In CVXPY, minimizing (x - 3)^2 subject to x ≥ 5 returns the optimal point x = 5 and objective value 4.
- CVXPY reports optimal, optimal inaccurate, infeasible, or unbounded; DCP recognition is sufficient but not necessary, as sqrt(1 + z^2) is accepted when rewritten as the norm of [1, z].
- The LASSO example minimizes a squared L2 residual plus λ times an L1 norm, and a loop can solve the problem repeatedly for different λ values.
- For positive x and y, the constraint xy ≥ 4 can be rewritten as 4/x ≤ y; the inverse-positive function is a recognized convex atom in CVXPY.
- A fractional objective can be made linear by introducing t as the reciprocal of its denominator and substituting y₁ = tx₁ and y₂ = tx₂.
- The substitutions transform the original constraints into convex inequalities and an affine equality involving t, y₁, and y₂, producing a DCP-compliant problem.
Transcript excerpt
0:00 Hi, I'm Nicholas Dwork and in this lecture we'll discuss convex optimization. Recall a convex set S is one where the line segment connecting any two points in the set lies in the set. So for example, this set is convex and if we choose any two points in the set and connect them with a line, the whole line is within the set. This set is not convex. We can find two points where if we connect those two points with a line segment, then at least part of the segment lies outside of the set. The intersection of convex sets is convex. So here's a simple example. And we needn't restrict the number of sets that we're intersecting to two. We can add a third. And in fact, this statement is true for an infinite number of convex sets. Recall that a convex function is one where the line connecting any two points
0:48 on the function lies above the function. So here's one example. If we choose any two points on this function, the line segment lies above the function. So this example is convex. Here's a different example. In this case, we can choose two points that lie on the function where the line segment connecting those two points lies below the function in at least one location. So this example is not convex. And here is the rigorous definition for a convex function. Recall that the epigraph of a function is the set of all points that lie above the function. And a function is convex if and only if its epigraph is a convex set. We have rules for convex functions that let us make more interesting convex functions out of more basic ones. One is
1:35 that the sum of two convex functions defined on the same domain is convex.
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Nicholas Dwork.