scispace - formally typeset
Search or ask a question
Book ChapterDOI

Graph Implementations for Nonsmooth Convex Programs

01 Jan 2008-Lecture Notes in Control and Information Sciences (Springer, London)-pp 95-110
TL;DR: Graph implementations as mentioned in this paper is a generic method for representing a convex function via its epigraph, described in a disciplined convex programming framework, which allows a very wide variety of smooth and nonsmooth convex programs to be easily specified and efficiently solved.
Abstract: We describe graph implementations, a generic method for representing a convex function via its epigraph, described in a disciplined convex programming framework. This simple and natural idea allows a very wide variety of smooth and nonsmooth convex programs to be easily specified and efficiently solved, using interiorpoint methods for smooth or cone convex programs.

Summary (2 min read)

Introduction

  • In contrast, there are many solvers available for smooth convex programs, as well as for certain standard forms such as semidefinite programs (SDPs), that are efficient in both theory and practice; e.g., [13, 16, 17, 18].
  • The versatility of the approach, of course, depends upon the variety of transformations known by the modeler.
  • A graph implementation encapsulates a method for transforming instances of a specific function in a constraint or objective into a form compatible with the underlying solver's standard form.
  • The conditions imposed by the DCP ruleset ensure that these transformations always preserve equivalence and convexity.

2 A B r i e f I n t r o d u c t i o n t o cvx

  • The indentat ion is purely for stylistic reasons and is optional.
  • The code is relatively self-explanatory, but a few notes are in order: 9 9 Variables must be declared before their first use.
  • (6) This function implicitly constrains P to be symmetric and positive definite.
  • This is, of course, a considerably abbreviated introduction to cvx, intended only to give the reader an idea of the basic syntax and structure of cvx models.

3 Disciplined Convex Programming

  • Disciplined convex programming was first named and described by Grant, Boyd, and Ye in [9] and Grant in [10].
  • Such modelers do not simply construct arbitrary nonlinear programs and attempt to verify convexity after the fact; rather, they begin with a mental library of functions and sets with known geometries, and combine them in ways which convex analysis guarantees will preserve convexity.
  • It consists of two key components: 9 an atom library--a collection of functions or sets with known properties of curvature (convexity and concavity) and monotonicity; and 9 the DCP ruleset--a finite enumeration of ways in which atoms may be combined in objectives and constraints while preserving convexity.
  • The rules are drawn from basic principles of convex analysis, and are easy to learn, once you have had an exposure to convex analysis and convex optimization.
  • The authors will provide examples of such violations and their resolution later in this section.

3.1 Preliminaries

  • The rules of disciplined convex programming depend primarily upon the curvature of numeric expressions.
  • Complex constant and affine expressions are considered as well, but of course convex and concave expressions are real by definition.
  • Three categories of monotonicity are considered: nondecreasing, nonincreasing, and nonmonotonic.
  • Secondly, for functions with multiple arguments, curvature is considered jointly, while montonicity is considered separately for each argument.
  • With terminology defined, the authors now proceed to the ruleset itself.

3 .4 Compositions

  • The four compos i t ion rules are: 9 (In each case, the authors assume that the argument is of compatible size.).
  • In fact, nearly every rule in the DCP ruleset can be derived from these composition rules.
  • As the authors stated in the introduction to this section, the DCP rules are sufficient but not necessary conditions for the convexity (or concavity) of an expression, constraint, or objective.
  • Obviously, both norm and the longer, non-compliant version are equivalent numerically, but the latter form enables cvx to complete the verification and conversion process.
  • Of course, because the library is finite, there will inevitably be instances where a simple substitution is not possible.

4 Graph Implementations

  • Any modeling framework for optimization must provide a computational description of the functions its supports to the underlying solver.
  • If f_abs is called with a numeric value of x, then the cvx specification it contains will construct a linear program with a single variable and two inequalities.
  • What cvx does in this circumstance is to incorporate the specification into the surrounding model itself, in a manner not unlike the expansion of a inline function in C++.
  • Thus a graph implementation can solve the nondifferentiability problem.
  • Key omissions include logarithms, exponentials, and entropy; such functions simply cannot be exactly represented in an SQLP solver.

5 Final W o r d s

  • The authors believe that disciplined convex programming closes a significant gap between the theory and practice of convex optimization.
  • A modeling framework that supports disciplined convex programming provides a truly attractive alternative in most of these cases.

Did you find this useful? Give us your feedback

Content maybe subject to copyright    Report

Graph Implementations for Nonsmooth
Convex Programs
Michael C. Grant I and Stephen P. Boyd 2
1 Stanford University
mcgrant9 ord. edu
2 Stanford University
boydOstanf ord. edu
Summary. We describe graph implementations, a generic method for representing
a convex function via its epigraph, described in a disciplined convex programming
framework. This simple and natural idea allows a very wide variety of smooth and
nonsmooth convex programs to be easily specified and efficiently solved, using interior-
point methods for smooth or cone convex programs.
Keywords: Convex optimization, nonsmooth optimization, disciplined convex pro-
gramming, optimization modeling languages, semidefinite programming, second-order
cone programming, conic optimization, nondifferentiable functions.
1 Introduction
It is well known that convex programs have many attractive properties, includ-
ing the proven existence of efficient methods to solve them. What is not as
widely appreciated, however, is that nonsmooth convex programs--i.e., models
with nondifferentiable constraints or objectives--can, in theory, be solved just
as efficiently as their smooth counterparts. But here, as is often the case, theory
and practice do not coincide. Methods that are theoretically efficient for general
nondifferentiable problems, such as the ellipsoid method [3], are notoriously slow
in practice.
In contrast, there are many solvers available for smooth convex programs, as
well as for certain standard forms such as semidefinite programs (SDPs), that are
efficient in both theory and practice; e.g., [13, 16, 17, 18]. These solvers can often
be used to solve a general nonsmooth problem as well--not directly of course,
but by first transforming it into an equivalent form supported by the solver. The
equivalent problem is usually larger than the original, but the superior efficiency
of the solver more than compensates for the increase in size, especially if problem
structure is taken into account.
The transformation approach dates back to the very first days of linear pro-
graming [7]. It is usually taught as a collection of tricks that a modeler can use
to (hopefully) reformulate problems by hand. The versatility of the approach,
of course, depends upon the variety of transformations known by the modeler.
But while some transformations are fairly obvious and widely known, others are
V.D. Blondel et al. (Eds.) Recent Advances in Learning and Control, LNCIS 371, pp. 95-110, 2008.
springerlink.com (~) Springer-Verlag Berlin Heidelberg 2008

96 M.C. Grant and S.P. Boyd
neither obvious nor well known, even to some experts in convex optimization.
Furthermore, even if a transformation is identified, the reformulation process is
often time consuming and error prone, for both experts and applications-oriented
modelers alike.
We propose to enable modeling frameworks to largely
automate
the process
of identifying and applying these transformations, so that a much wider variety
of models--smooth and nonsmooth alike--can be both easily specified and era-
ciently solved. Our approach depends upon two distinct but interrelated devel-
opments. The first is a methodology for constructing convex optimization models
called
disciplined convex programming.
The methodology imposes a set of rules
or conventions that must be followed when constructing convex programs. The
rules are simple and teachable, drawn from basic principles of convex analy-
sis, and follow the practices of those who regularly use convex optimization.
Conforming problems are called, appropriately,
disciplined convex programs,
or
DCPs.
The DCP ruleset does not limit generality, but it does require that the
modeler explicitly provide just enough structure to allow further analysis and
solution of a problem to be automated.
The second development is a new method for defining or implementing a func-
tion in a modeling framework, as as the optimal value of a parameterized convex
program (specifically, a DCP). We call such a function definition a
graph ira-
plementation
because it exploits the relationship between convex and concave
functions and their epigraphs and hypographs, respectively. A graph implemen-
tation encapsulates a method for transforming instances of a specific function
in a constraint or objective into a form compatible with the underlying solver's
standard form. The conditions imposed by the DCP ruleset ensure that these
transformations always preserve equivalence and convexity. The most significant
benefit of graph implementations is their ability to efficiently implement non-
differentiable functions. But in fact, graph implementations can also be used
to implement many
smooth
functions as well when the target standard form is
nonsmooth
(e.g.,
an SDP).
We have created a modeling framework called cvx [8] that supports disciplined
convex programming and graph implementations, cvx uses the object-oriented
features of MATLAB~to turn it into an optimization modeling language: opti-
mization variables can be declared and constraints and objectives specified using
natural MATLAB| syntax, cvx verifies compliance with the DCP ruleset, trans-
forms conforming models to solvable form, calls an appropriate numerical solver,
and translates the numerical results back to the original problem--all without
user intervention. The framework includes a large library of common convex and
concave functions, both smooth and nonsmooth, and more can be added.
To an applications-oriented user, the conceptual model presented by cvx is
very simple: cvx solves any problem (up to some practical size limits, of course)
constructed according to the DCP ruleset from functions found in the cvx library.
The modeler need not know what transformations are taking place, or even
that a transformation is necessary. That is, graph implementations are entirely
opaque
or hidden from a standard cvx user. On the other hand, expert users

Graph Implementations for Nonsmooth Convex Programs 97
can use graph implementations to add new transformations to the system that
general users can exploit simply by calling the new functions in their models.
This division of labor allows modelers to focus on building convex programs, and
experts to focus on solving them.
In what follows, we will describe disciplined convex programming and graph
implementations in detail. Both are abstract, language-independent concepts;
nevertheless, it will be easier to explain both using examples from an actual
modeling framework such as cvx. So we begin by i~roducing cvx with a few
simple examples. A basic familiarity with MATLAB~is assumed throughout.
2 A Brief Introduction to cvx
To begin, consider the simple linear program
minimize
c T x
subject to
Ax < b,
(1)
with variable x C R n and data
A C R mxn, b C R m,
and c C R n. The following
(MATLAB@/cvx) code generates and solves a random instance of (1)"
m = 16; n = 8;
A = randn(m,n) ; b = randn(m,1) ; c = randn(n,1);
cvx_begin
variable x (n)
minimize( c' * x )
subject to
A.x<=b;
cvx end
The indentation is purely for stylistic reasons and is optional. The code is rela-
tively self-explanatory, but a few notes are in order:
9 The cvx begin and cvx end commands mark the beginning and end, re-
spectively, of any cvx model.
9 Variables must be declared before their first use. For example, the variable
statement above declares x to be a vector of length n.
9 The subject to statement is optional--it is provided by cvx only to make
models more readable and has no mathematical effect.
9 Objectives and constraints may be placed in any order.
When cvx end is reached, cvx will complete the conversion of the model to
solvable form and call the underlying numerical solver. It will replace the
MATLAB| variable x, which up to that point was a special cvx variable object,
with a numeric vector representing an optimal value.
Now consider a norm minimization problem with box constraints:
minimize
IIAy- bll 2
(2)
subject to g __ y _ u

98 M.C. Grant and S.P. Boyd
The following cvx/MATLAB@ code constructs and solves a version of (2),
reusing A and b from above and generating random bounds:
1 = -abs(randn(n,2)) ; u = +abs(randn(n,2)) ;
cvx_begin
variable y(n)
minimize(norm(A,y-b,2) )
subject
to
y<=u;
y>=l;
cvx_end
It is well known that (2) can be reformulated as a (convex) quadratic program
(QP) or a second-order cone program (SOCP). (cvx, in fact, converts this prob-
lem to an SOCP.) The transformation in this case is not particularly complicated;
still, it is nice to have it completely automated.
cvx supports a variety of other norms and penalties for this model simply by
replacing the objective function; for example:
minimize(norm(A,y-b,2) + O. l,norm(y, I) )
minimize(norm(A,y-b,3.5) )
minimize(sum(huber(A,y-b)) )
All of these examples can be reformulated as SOCPs as well. Here, however, the
transformations are not at all obvious, even to experts; and in all three cases
working out the transformation by hand would be tedious and error prone, cvx,
however, can solve all three problems automatically.
As a final example, consider the task of determining the minimum volume
ellipsoid (also known as the LSwner-John ellipsoid) g containing a finite set of
points Zl, z2, 9 9 9 zn c R d"
minimize vol(g) (3)
subject tozicg,
i-1,...,n.
The parameterization we will use for g is
-~ {u I IIPu + qll2 -< 1 }, (4)
where
(P, q) E R dxd
x R d, and P is symmetric positive semidefinite. In this case,
vol(g) is proportional to det(P -1) (see [6, w With this parametrization we
can cast the problem above as
minimize det P-1
subject tollPzi+ql[2<l, i-l,2,...,n, (5)
with variables
P - pT E a dxd
and q C R d. We have written the objective
informally as det P- 1; a more precise description is faet_inv (P), where
A [det(P) -1
P - pT ~_ 0
f~_~v(P)
+oc otherwise. (6)

Graph Implementations for Nonsmooth Convex Programs 99
This function implicitly constrains P to be symmetric and positive definite. The
function faet_inv is convex, so the,problem above is a convex problem.
The following cvx/MATLAB~ code generates a random set of points and
computes the optimal ellipsoid by solving (5)"
d=2;
z = randn(d,n) ;
cvx_begin
variables P(d,d) q(d)
minimize (det_inv(P) )
subject to
for i = i 9 n,
norm( P,z(',i)+q,2 ) <= I;
end
cvx_end
The function det_inv represents faet_inv('), including the implicit constraint that
its argument be symmetric and positive definite. It is known that this problem
can be cast as a semidefinite program (SDP), but the required conversion is
quite complicated. Fortunately, that conversion is buried inside cvx's definition
of det_inv and performed automatically.
This is, of course, a considerably abbreviated introduction to cvx, intended
only to give the reader an idea of the basic syntax and structure of cvx models.
The reader is encouraged to read the user's guide [8] for a more thorough treat-
ment, or to download the software and try it. The examples presented here can
be entered exactly as listed.
3 Disciplined Convex Programming
Disciplined convex programming was first named and described by Grant, Boyd,
and Ye in [9] and Grant in [10]. It was modeled on the methods used by those who
regularly construct convex optimization models. Such modelers do not simply
construct arbitrary nonlinear programs and attempt to verify convexity after the
fact; rather, they begin with a mental library of functions and sets with known
geometries, and combine them in ways which convex analysis guarantees will
preserve convexity.
Disciplined convex programming is an attempt to formalize and this practice
and codify its techniques. It consists of two key components:
9 an atom library--a collection of functions or sets with known properties of
curvature (convexity and concavity) and monotonicity; and
9 the DCP ruleset--a finite enumeration of ways in which atoms may be com-
bined in objectives and constraints while preserving convexity.
The rules are drawn from basic principles of convex analysis, and are easy to
learn, once you have had an exposure to convex analysis and convex optimization.
They constitute a set of sufficient but not necessary conditions for convexity,

Citations
More filters
Posted Content
TL;DR: CVXPY allows the user to express convex optimization problems in a natural syntax that follows the math, rather than in the restrictive standard form required by solvers.
Abstract: CVXPY is a domain-specific language for convex optimization embedded in Python. It allows the user to express convex optimization problems in a natural syntax that follows the math, rather than in the restrictive standard form required by solvers. CVXPY makes it easy to combine convex optimization with high-level features of Python such as parallelism and object-oriented design. CVXPY is available at this http URL under the GPL license, along with documentation and examples.

1,215 citations


Cites methods from "Graph Implementations for Nonsmooth..."

  • ...The conversion is done using graph implementations of convex functions (Grant and Boyd, 2008)....

    [...]

Journal ArticleDOI
TL;DR: In this article, the authors developed a mathematical theory of super-resolution, which is the problem of recovering the details of an object from coarse scale information only from samples at the low end of the spectrum.
Abstract: This paper develops a mathematical theory of super-resolution. Broadly speaking, superresolution is the problem of recovering the ne details of an object|the high end of its spectrum| from coarse scale information only|from samples at the low end of the spectrum. Suppose we have many point sources at unknown locations in [0; 1] and with unknown complex-valued amplitudes. We only observe Fourier samples of this object up until a frequency cut-o fc. We show that one can super-resolve these point sources with innite precision|i.e. recover the exact locations and amplitudes|by solving a simple convex optimization problem, which can essentially be reformulated as a semidenite program. This holds provided that the distance between sources is at least 2=fc. This result extends to higher dimensions and other models. In one dimension for instance, it is possible to recover a piecewise smooth function by resolving the discontinuity points with innite precision as well. We also show that the theory and methods are robust to noise. In particular, in the discrete setting we develop some theoretical results explaining how the accuracy of the super-resolved signal is expected to degrade when both the noise level and the super-resolution factor vary.

1,157 citations

Journal ArticleDOI
TL;DR: A theoretical framework in which dynamic mode decomposition is defined as the eigendecomposition of an approximating linear operator, which generalizes DMD to a larger class of datasets, including nonsequential time series, and shows that under certain conditions, DMD is equivalent to LIM.
Abstract: Originally introduced in the fluid mechanics community, dynamic mode decomposition (DMD) has emerged as a powerful tool for analyzing the dynamics of nonlinear systems. However, existing DMD theory deals primarily with sequential time series for which the measurement dimension is much larger than the number of measurements taken. We present a theoretical framework in which we define DMD as the eigendecomposition of an approximating linear operator. This generalizes DMD to a larger class of datasets, including nonsequential time series. We demonstrate the utility of this approach by presenting novel sampling strategies that increase computational efficiency and mitigate the effects of noise, respectively. We also introduce the concept of linear consistency, which helps explain the potential pitfalls of applying DMD to rank-deficient datasets, illustrating with examples. Such computations are not considered in the existing literature, but can be understood using our more general framework. In addition, we show that our theory strengthens the connections between DMD and Koopman operator theory. It also establishes connections between DMD and other techniques, including the eigensystem realization algorithm (ERA), a system identification method, and linear inverse modeling (LIM), a method from climate science. We show that under certain conditions, DMD is equivalent to LIM.

1,067 citations


Cites methods from "Graph Implementations for Nonsmooth..."

  • ...12), using the software package cvx [66, 67] to compute Âr....

    [...]

Journal ArticleDOI
TL;DR: The user‐friendly syntax of the ACADO Toolkit to set up optimization problems is illustrated with two tutorial examples: an optimal control and a parameter estimation problem.
Abstract: In this paper the software environment and algorithm collection ACADO Toolkit is presented, which implements tools for automatic control and dynamic optimization. It provides a general framework for using a great variety of algorithms for direct optimal control, including model predictive control as well as state and parameter estimation. The ACADO Toolkit is implemented as a self-contained C++ code, while the object-oriented design allows for convenient coupling of existing optimization packages and for extending it with user-written optimization routines. We discuss details of the software design of the ACADO Toolkit 1.0 and describe its main software modules. Along with that we highlight a couple of algorithmic features, in particular its functionality to handle symbolic expressions. The user-friendly syntax of the ACADO Toolkit to set up optimization problems is illustrated with two tutorial examples: an optimal control and a parameter estimation problem. Copyright © 2010 John Wiley & Sons, Ltd.

958 citations


Cites background from "Graph Implementations for Nonsmooth..."

  • ...The corresponding algorithmic routines are based on disciplined convex programming [13]....

    [...]

References
More filters
Book
01 Mar 2004
TL;DR: In this article, the focus is on recognizing convex optimization problems and then finding the most appropriate technique for solving them, and a comprehensive introduction to the subject is given. But the focus of this book is not on the optimization problem itself, but on the problem of finding the appropriate technique to solve it.
Abstract: Convex optimization problems arise frequently in many different fields. A comprehensive introduction to the subject, this book shows in detail how such problems can be solved numerically with great efficiency. The focus is on recognizing convex optimization problems and then finding the most appropriate technique for solving them. The text contains many worked examples and homework exercises and will appeal to students, researchers and practitioners in fields such as engineering, computer science, mathematics, statistics, finance, and economics.

33,341 citations

Proceedings ArticleDOI
02 Sep 2004
TL;DR: Free MATLAB toolbox YALMIP is introduced, developed initially to model SDPs and solve these by interfacing eternal solvers by making development of optimization problems in general, and control oriented SDP problems in particular, extremely simple.
Abstract: The MATLAB toolbox YALMIP is introduced. It is described how YALMIP can be used to model and solve optimization problems typically occurring in systems and control theory. In this paper, free MATLAB toolbox YALMIP, developed initially to model SDPs and solve these by interfacing eternal solvers. The toolbox makes development of optimization problems in general, and control oriented SDP problems in particular, extremely simple. In fact, learning 3 YALMIP commands is enough for most users to model and solve the optimization problems

7,676 citations


"Graph Implementations for Nonsmooth..." refers background or methods in this paper

  • ...Disciplined convex programming was first named and described by Grant, Boyd, and Ye in [GBY06] and Grant in [ Gra04 ]....

    [...]

  • ...We call such a definition a graph implementation, a term first coined in [ Gra04 ] and inspired by the properties of epigraphs and hypographs of convex and concave functions, respectively....

    [...]

Journal ArticleDOI
Jos F. Sturm1
TL;DR: This paper describes how to work with SeDuMi, an add-on for MATLAB, which lets you solve optimization problems with linear, quadratic and semidefiniteness constraints by exploiting sparsity.
Abstract: SeDuMi is an add-on for MATLAB, which lets you solve optimization problems with linear, quadratic and semidefiniteness constraints. It is possible to have complex valued data and variables in SeDuMi. Moreover, large scale optimization problems are solved efficiently, by exploiting sparsity. This paper describes how to work with this toolbox.

7,655 citations


"Graph Implementations for Nonsmooth..." refers background in this paper

  • ...For more information about these problems, consult [VB96, LVBL98], or the documentation on the solvers themselves [ Stu99 , TTT99]....

    [...]

  • ...In contrast, there are many solvers available for smooth convex programs, as well as for certain standard forms such as semidefinite programs (SDPs), that are efficient in both theory and practice;e.g., [Van99, MOS07, TTT99, Stu99 ]....

    [...]

Book
01 Jan 1963
TL;DR: This classic book looks at a wealth of examples and develops linear programming methods for their solutions and begins by introducing the basic theory of linear inequalities and describes the powerful simplex method used to solve them.
Abstract: In real-world problems related to finance, business, and management, mathematicians and economists frequently encounter optimization problems. In this classic book, George Dantzig looks at a wealth of examples and develops linear programming methods for their solutions. He begins by introducing the basic theory of linear inequalities and describes the powerful simplex method used to solve them. Treatments of the price concept, the transportation problem, and matrix methods are also given, and key mathematical concepts such as the properties of convex sets and linear vector spaces are covered."The author of this book was the main force in establishing a new mathematical discipline, and he has contributed to its further development at every stage and from every angle. This volume ... is a treasure trove for those who work in this field--teachers, students, and users alike. Its encyclopaedic coverage, due in part to collaboration with other experts, makes it an absolute must."--S. Vajda, Zentralblatt fYr Mathematik und ihre Grenzgebiete

5,679 citations

Frequently Asked Questions (9)
Q1. What is the obvious benefit of graph implementations?

Using graph implementations, a variety of both smooth and nonsmooth functions were added to the cvx atom library for SQLP solvers, including minimums and maximums, absolute values, quadratic forms, convex and concave branches of the power function x p, ~p norms, convex and concave polynomials, geometricmeans, eigenvalue and singular value functions, and determinants. 

The transformation approach dates back to the very first days of linear programing and is usually taught as a collection of tricks that a modeler can use to reformulate problems by hand this paper. 

It consists of two key components:9 an atom library--a collection of functions or sets with known properties of curvature (convexity and concavity) and monotonicity; and 9 the DCP ruleset--a finite enumeration of ways in which atoms may be combined in objectives and constraints while preserving convexity. 

Key omissions include logarithms, exponentials, and entropy; such functions simply cannot be exactly represented in an SQLP solver. 

The function de t_ inv represents faet_inv('), including the implicit constraint that its argument be symmetric and positive definite. 

Note that the precise transformation depends on how square and abs are themselves implemented; multilevel transformations like this are quite typical. 

A valid const ra in t is - a set membersh ip relat ion (E) in which the lef t-hand side (LHS) is affineand the r igh t -hand side (RHS) is a convex set.- an equali ty (=) with an affine LHS and an affine RHS. 

4.1 T h e BasicsRecall the definition of the epigraph of a function f : R n --~ (R U +oc):epi f _a { (x, y) e R n x a The authorf (x) _ y }. (11)A fundamental principle of convex analysis states that f is a convex function if and only if epi f is a convex set. 

So if x is a real variable, thensquare( x )is accepted by cvx; and, thanks to the above rule, so issquare( A 9 x + b )if A and b are cons tan t matr ices of compat ib le size.