Convex optimization is a subfield of mathematical optimization that studies the problem of minimizing convex functions over convex sets (or, equivalently, maximizing concave functions over convex sets). Many classes of convex optimization problems admit polynomial-time algorithms, whereas mathematical optimization is in general NP-hard.[1] [2] [3]
A convex optimization problem is defined by two ingredients:[4] [5]
f:lD\subseteqRn\toR
C\subseteqRn
The goal of the problem is to find some
x\ast |
\inC
inf\{f(x):x\inC\}
f
C
C
A convex optimization problem is in standard form if it is written as
\begin{align} &\underset{x
where:
x\inRn
f:lD\subseteqRn\toR
gi:Rn\toR
i=1,\ldots,m
hi:Rn\toR
i=1,\ldots,p
hi(x)=
ai ⋅ |
x-bi
ai |
bi
The feasible set
C
x\inl{D}
l{D}
f
-f
In the standard form it is possible to assume, without loss of generality, that the objective function f is a linear function. This is because any program with a general objective can be transformed into a program with a linear objective by adding a single variable t and a single constraint, as follows:[8]
\begin{align} &\underset{x,t}{\operatorname{minimize}}&&t\\ &\operatorname{subject to} &&f(x)-t\leq0\\ &&&gi(x)\leq0, i=1,...,m\\ &&&hi(x)=0, i=1,...,p, \end{align}
Every convex program can be presented in a conic form, which means minimizing a linear objective over the intersection of an affine plane and a convex cone:
\begin{align} &\underset{x
It is possible to convert a convex program in standard form, to a convex program with no equality constraints. Denote the equality constraints hi(x)=0 as Ax=b, where A has n columns. If Ax=b is infeasible, then of course the original problem is infeasible. Otherwise, it has some solution x0, and the set of all solutions can be presented as: Fz+x0, where z is in Rk, k=n-rank(A), and F is an n-by-k matrix. Substituting x = Fz+x0 in the original problem gives:
where the variables are z. Note that there are rank(A) fewer variables. This means that, in principle, one can restrict attention to convex optimization problems without equality constraints. In practice, however, it is often preferred to retain the equality constraints, since they might make some algorithms more efficient, and also make the problem easier to understand and analyze.}& & f(\mathbf) \\&\operatorname& &g_i(\mathbf) \leq 0, \quad i = 1, \dots, m \\\end\begin{align} &\underset{x
The following problem classes are all convex optimization problems, or can be reduced to convex optimization problems via simple transformations:[9]
Other special cases include;
The following are useful properties of convex optimization problems:[10]
These results are used by the theory of convex minimization along with geometric notions from functional analysis (in Hilbert spaces) such as the Hilbert projection theorem, the separating hyperplane theorem, and Farkas' lemma.
The convex programs easiest to solve are the unconstrained problems, or the problems with only equality constraints. As the equality constraints are all linear, they can be eliminated with linear algebra and integrated into the objective, thus converting an equality-constrained problem into an unconstrained one.
In the class of unconstrained (or equality-constrained) problems, the simplest ones are those in which the objective is quadratic. For these problems, the KKT conditions (which are necessary for optimality) are all linear, so they can be solved analytically.
For unconstrained (or equality-constrained) problems with a general convex objective that is twice-differentiable, Newton's method can be used. It can be seen as reducing a general unconstrained convex problem, to a sequence of quadratic problems.Newton's method can be combined with line search for an appropriate step size, and it can be mathematically proven to converge quickly.
Other efficient algorithms for unconstrained minimization are gradient descent (a special case of steepest descent).
The more challenging problems are those with inequality constraints. A common way to solve them is to reduce them to unconstrained problems by adding a barrier function, enforcing the inequality constraints, to the objective function. Such methods are called interior point methods.They have to be initialized by finding a feasible interior point using by so-called phase I methods, which either find a feasible point or show that none exist. Phase I methods generally consist of reducing the search in question to a simpler convex optimization problem.
Convex optimization problems can also be solved by the following contemporary methods:[11]
Subgradient methods can be implemented simply and so are widely used.[14] Dual subgradient methods are subgradient methods applied to a dual problem. The drift-plus-penalty method is similar to the dual subgradient method, but takes a time average of the primal variables.
Consider a convex minimization problem given in standard form by a cost function
f(x)
gi(x)\leq0
1\leqi\leqm
l{X}
l{X}=\left\{x\inX\vertg1(x),\ldots,gm(x)\leq0\right\}.
The Lagrangian function for the problem is
L(x,λ0,λ1,\ldots,λm)=λ0f(x)+λ1g1(x)+ … +λmgm(x).
For each point
x
X
f
X
λ0,λ1,\ldots,λm,
x
L(y,λ0,λ1,\ldots,λm)
y\inX,
λ0,λ1,\ldots,λm\geq0,
λk>0,
λ1g1(x)= … =λmgm(x)=0
If there exists a "strictly feasible point", that is, a point
z
g1(z),\ldots,gm(z)<0,
then the statement above can be strengthened to require that
λ0=1
Conversely, if some
x
X
λ0,\ldots,λm
λ0=1
x
f
X
There is a large software ecosystem for convex optimization. This ecosystem has two main categories: solvers on the one hand and modeling tools (or interfaces) on the other hand.
Solvers implement the algorithms themselves and are usually written in C. They require users to specify optimization problems in very specific formats which may not be natural from a modeling perspective. Modeling tools are separate pieces of software that let the user specify an optimization in higher-level syntax. They manage all transformations to and from the user's high-level model and the solver's input/output format.
The table below shows a mix of modeling tools (such as CVXPY and Convex.jl) and solvers (such as CVXOPT and MOSEK). This table is by no means exhaustive.
CVX | MATLAB | Interfaces with SeDuMi and SDPT3 solvers; designed to only express convex optimization problems. | [15] | ||
CVXMOD | Python | Interfaces with the CVXOPT solver. | |||
CVXPY | Python | [16] | |||
Convex.jl | Julia | Disciplined convex programming, supports many solvers. | [17] | ||
CVXR | R | [18] | |||
YALMIP | MATLAB, Octave | Interfaces with CPLEX, GUROBI, MOSEK, SDPT3, SEDUMI, CSDP, SDPA, PENNON solvers; also supports integer and nonlinear optimization, and some nonconvex optimization. Can perform robust optimization with uncertainty in LP/SOCP/SDP constraints. | |||
LMI lab | MATLAB | Expresses and solves semidefinite programming problems (called "linear matrix inequalities") | |||
LMIlab translator | Transforms LMI lab problems into SDP problems. | ||||
xLMI | MATLAB | Similar to LMI lab, but uses the SeDuMi solver. | |||
AIMMS | Can do robust optimization on linear programming (with MOSEK to solve second-order cone programming) and mixed integer linear programming. Modeling package for LP + SDP and robust versions. | ||||
ROME | Modeling system for robust optimization. Supports distributionally robust optimization and uncertainty sets. | ||||
GloptiPoly 3 | MATLAB,Octave | Modeling system for polynomial optimization. | |||
SOSTOOLS | Modeling system for polynomial optimization. Uses SDPT3 and SeDuMi. Requires Symbolic Computation Toolbox. | ||||
SparsePOP | Modeling system for polynomial optimization. Uses the SDPA or SeDuMi solvers. | ||||
CPLEX | Supports primal-dual methods for LP + SOCP. Can solve LP, QP, SOCP, and mixed integer linear programming problems. | ||||
CSDP | C | Supports primal-dual methods for LP + SDP. Interfaces available for MATLAB, R, and Python. Parallel version available. SDP solver. | |||
CVXOPT | Python | Supports primal-dual methods for LP + SOCP + SDP. Uses Nesterov-Todd scaling. Interfaces to MOSEK and DSDP. | |||
MOSEK | Supports primal-dual methods for LP + SOCP. | ||||
SeDuMi | MATLAB, Octave, MEX | Solves LP + SOCP + SDP. Supports primal-dual methods for LP + SOCP + SDP. | |||
SDPA | C++ | Solves LP + SDP. Supports primal-dual methods for LP + SDP. Parallelized and extended precision versions are available. | |||
SDPT3 | MATLAB, Octave, MEX | Solves LP + SOCP + SDP. Supports primal-dual methods for LP + SOCP + SDP. | |||
ConicBundle | Supports general-purpose codes for LP + SOCP + SDP. Uses a bundle method. Special support for SDP and SOCP constraints. | ||||
DSDP | Supports general-purpose codes for LP + SDP. Uses a dual interior point method. | ||||
LOQO | Supports general-purpose codes for SOCP, which it treats as a nonlinear programming problem. | ||||
PENNON | Supports general-purpose codes. Uses an augmented Lagrangian method, especially for problems with SDP constraints. | ||||
SDPLR | Supports general-purpose codes. Uses low-rank factorization with an augmented Lagrangian method. | ||||
GAMS | Modeling system for linear, nonlinear, mixed integer linear/nonlinear, and second-order cone programming problems. | ||||
Optimization Services | XML standard for encoding optimization problems and solutions. |
Convex optimization can be used to model problems in a wide range of disciplines, such as automatic control systems, estimation and signal processing, communications and networks, electronic circuit design, data analysis and modeling, finance, statistics (optimal experimental design),[19] and structural optimization, where the approximation concept has proven to be efficient.[20] Convex optimization can be used to model problems in the following fields:
Extensions of convex optimization include the optimization of biconvex, pseudo-convex, and quasiconvex functions. Extensions of the theory of convex analysis and iterative methods for approximately solving non-convex minimization problems occur in the field of generalized convexity, also known as abstract convex analysis.