Sum-of-squares optimization

{{Hatnote|This article deals with sum-of-squares constraints. For problems with sum-of-squares cost functions, see Least squares.}}

A sum-of-squares optimization program is an optimization problem with a linear cost function and a particular type of constraint on the decision variables. These constraints are of the form that when the decision variables are used as coefficients in certain polynomials, those polynomials should have the polynomial SOS property. When fixing the maximum degree of the polynomials involved, sum-of-squares optimization is also known as the Lasserre hierarchy of relaxations in semidefinite programming.

Sum-of-squares optimization techniques have been applied across a variety of areas, including control theory (in particular, for searching for polynomial Lyapunov functions for dynamical systems described by polynomial vector fields), statistics, finance and machine learning.{{Cite book|publisher=American Mathematical Society|url=https://www.worldcat.org/oclc/1157604983|title=Sum of squares : theory and applications : AMS short course, sum of squares : theory and applications, January 14-15, 2019, Baltimore, Maryland|others=Parrilo, Pablo A.; Thomas, Rekha R.|year=2020|isbn=978-1-4704-5025-0|location=Providence, Rhode Island|oclc=1157604983}}Tan, W., Packard, A., 2004. "[http://jagger.me.berkeley.edu/papers/weehong_3.pdf Searching for control Lyapunov functions using sums of squares programming]". In: Allerton Conf. on Comm., Control and Computing. pp. 210–219.Tan, W., Topcu, U., Seiler, P., Balas, G., Packard, A., 2008. [http://folk.ntnu.no/skoge/prost/proceedings/cdc-2008/data/papers/1767.pdf Simulation-aided reachability and local gain analysis for nonlinear dynamical systems]. In: Proc. of the IEEE Conference on Decision and Control. pp. 4097–4102.A. Chakraborty, P. Seiler, and G. Balas, "[http://www.aem.umn.edu/~AerospaceControl/V&VWebpage/Papers/AIAANlin.pdf Susceptibility of F/A-18 Flight Controllers to the Falling-Leaf Mode: Nonlinear Analysis]," AIAA Journal of Guidance, Control, and Dynamics, vol. 34 no. 1 (2011), pp. 73–85.

Optimization problem

Given a vector c\in \R^n and polynomials a_{k,j} for k=1, \dots N_s, j = 0, 1, \dots, n, a sum-of-squares optimization problem is written as

\begin{aligned}

\underset{u\in\R^n}{\text{maximize}} \quad & c^T u \\

\text{subject to} \quad &

a_{k,0}(x) + a_{k,1}(x)u_1 + \cdots + a_{k,n}(x)u_n \in \text{SOS} \quad (k=1,\ldots, N_s).

\end{aligned}

Here "SOS" represents the class of sum-of-squares (SOS) polynomials.

The quantities u\in \R^n are the decision variables. SOS programs can be converted to semidefinite programs (SDPs) using the duality of the SOS polynomial program and a relaxation for constrained polynomial optimization using positive-semidefinite matrices, see the following section.

Dual problem: constrained polynomial optimization

Suppose we have an n -variate polynomial p(x): \mathbb{R}^n \to \mathbb{R} , and suppose that we would like to minimize this polynomial over a subset A \subseteq \mathbb{R}^n . Suppose furthermore that the constraints on the subset A can be encoded using m polynomial equalities of degree at most 2d , each of the form a_i(x) = 0 where a_i: \mathbb{R}^n \to \mathbb{R} is a polynomial of degree at most 2d . A natural, though generally non-convex program for this optimization problem is the following:

\min_{x \in \mathbb{R}^{n}} \langle C, x^{\le d} (x^{\le d})^\top \rangle

subject to:

{{NumBlk|| \langle A_i, x^{\le d}(x^{\le d})^\top \rangle = 0 \qquad \forall \ i \in [m],|{{EquationRef|1}}}}

x_{\emptyset} = 1,

where x^{\le d} is the n^{O(d)} -dimensional vector with one entry for every monomial in x of degree at most d , so that for each multiset S \subset [n], |S| \le d, x_S = \prod_{i \in S}x_i , C is a matrix of coefficients of the polynomial p(x) that we want to minimize, and A_i is a matrix of coefficients of the polynomial a_i(x) encoding the i -th constraint on the subset A \subset \R^n . The additional, fixed constant index in our search space, x_{\emptyset} = 1 , is added for the convenience of writing the polynomials p(x) and a_i(x) in a matrix representation.

This program is generally non-convex, because the constraints ({{EquationNote|1}}) are not convex. One possible convex relaxation for this minimization problem uses semidefinite programming to replace the rank-one matrix of variables x^{\le d} (x^{\le d})^\top with a positive-semidefinite matrix X : we index each monomial of size at most 2d by a multiset S of at most 2d indices, S \subset [n], |S| \le 2d . For each such monomial, we create a variable X_S in the program, and we arrange the variables X_S to form the matrix X \in \mathbb{R}^{[n]^{\le d} \times [n]^{\le d}} , where \R^{[n]^{\le d}\times [n]^{\le d}} is the set of real matrices whose rows and columns are identified with multisets of elements from n of size at most d . We then write the following semidefinite program in the variables X_S :

\min_{X \in \R^{[n]^{\le d} \times [n]^{\le d} }}\langle C, X \rangle

subject to:

\langle A_i, X \rangle =0 \qquad \forall \ i \in [m], Q

X_{\emptyset} = 1 ,

X_{U \cup V} = X_{S \cup T} \qquad \forall \ U,V,S,T \subseteq [n], |U|,|V|,|S|,|T| \le d,\text{ and} \ U \cup V = S \cup T ,

X \succeq 0,

where again C is the matrix of coefficients of the polynomial p(x) that we want to minimize, and A_i is the matrix of coefficients of the polynomial a_i(x) encoding the i -th constraint on the subset A \subset \R^n .

The third constraint ensures that the value of a monomial that appears several times within the matrix is equal throughout the matrix, and is added to make X respect the symmetries present in the quadratic form x^{\le d}(x^{\le d})^\top .

= Duality =

One can take the dual of the above semidefinite program and obtain the following program:

\max_{y \in \mathbb{R}^{m'}} y_0 ,

subject to:

C - y_0 e_{\emptyset}- \sum_{i \in [m]} y_i A_i - \sum_{S\cup T = U\cup V} y_{S,T,U,V} (e_{S,T} - e_{U,V})\succeq 0.

We have a variable y_0 corresponding to the constraint \langle e_{\emptyset}, X\rangle = 1 (where e_{\emptyset} is the matrix with all entries zero save for the entry indexed by (\varnothing,\varnothing) ), a real variable y_i for each polynomial constraint \langle X,A_i \rangle = 0 \quad s.t. i \in [m], and for each group of multisets S,T,U,V \subset [n], |S|,|T|,|U|,|V| \le d, S\cup T = U \cup V , we have a dual variable y_{S,T,U,V} for the symmetry constraint \langle X, e_{S,T} - e_{U,V} \rangle = 0 . The positive-semidefiniteness constraint ensures that p(x) - y_0 is a sum-of-squares of polynomials over A \subset \R^n : by a characterization of positive-semidefinite matrices, for any positive-semidefinite matrix Q\in \mathbb{R}^{m \times m} , we can write Q = \sum_{i \in [m]} f_i f_i^\top

for vectors f_i \in \mathbb{R}^m . Thus for any x \in A \subset \mathbb{R}^n ,

\begin{align}

p(x) - y_0

&= p(x) - y_0 - \sum_{i \in [m']} y_i a_i(x) \qquad \text{since } x \in A\\

&=(x^{\le d})^\top \left( C - y_0 e_{\emptyset} - \sum_{i\in [m']} y_i A_i - \sum_{S\cup T = U \cup V} y_{S,T,U,V}(e_{S,T}-e_{U,V}) \right)x^{\le d}\qquad \text{by symmetry}\\

&= (x^{\le d})^\top \left( \sum_{i} f_i f_i^\top \right)x^{\le d} \\

&= \sum_{i} \langle x^{\le d}, f_i\rangle^2 \\

&= \sum_{i} f_i(x)^2,

\end{align}

where we have identified the vectors f_i with the coefficients of a polynomial of degree at most d . This gives a sum-of-squares proof that the value p(x) \ge y_0 over

A \subset \mathbb{R}^n .

The above can also be extended to regions A \subset \mathbb{R}^n defined by polynomial inequalities.

Sum-of-squares hierarchy

The sum-of-squares hierarchy (SOS hierarchy), also known as the Lasserre hierarchy, is a hierarchy of convex relaxations of increasing power and increasing computational cost. For each natural number d \in \mathbb{N} the corresponding convex relaxation is known as the dth level or d-th round of the SOS hierarchy. The 1st round, when d=1, corresponds to a basic semidefinite program, or to sum-of-squares optimization over polynomials of degree at most 2. To augment the basic convex program at the 1st level of the hierarchy to d-th level, additional variables and constraints are added to the program to have the program consider polynomials of degree at most 2d.

The SOS hierarchy derives its name from the fact that the value of the objective function at the d-th level is bounded with a sum-of-squares proof using polynomials of degree at most 2d via the dual (see "Duality" above). Consequently, any sum-of-squares proof that uses polynomials of degree at most 2d can be used to bound the objective value, allowing one to prove guarantees on the tightness of the relaxation.

In conjunction with a theorem of Berg, this further implies that given sufficiently many rounds, the relaxation becomes arbitrarily tight on any fixed interval. Berg's result{{Cite book |last = Berg|first = Christian| title=Moments in Mathematics | chapter=The multidimensional moment problem and semigroups | series=Proceedings of Symposia in Applied Mathematics |date = 1987 |volume = 37|pages = 110–124|doi = 10.1090/psapm/037/921086|isbn = 9780821801147|editor-last = Landau|editor-first = Henry J.|chapter-url=https://books.google.com/books?id=IEo2Iu_uogUC&dq=%22The+multidimensional+moment+problem+and+semigroups%22&pg=PA110}}{{Cite journal|title = A Sum of Squares Approximation of Nonnegative Polynomials|url = http://epubs.siam.org/doi/abs/10.1137/070693709|journal = SIAM Review|date = 2007-01-01|issn = 0036-1445|pages = 651–669|volume = 49|issue = 4|doi = 10.1137/070693709|first = J.|last = Lasserre|arxiv = math/0412398| bibcode=2007SIAMR..49..651L }} states that every non-negative real polynomial within a bounded interval can be approximated within accuracy \varepsilon on that interval with a sum-of-squares of real polynomials of sufficiently high degree, and thus if OBJ(x) is the polynomial objective value as a function of the point x, if the inequality c + \varepsilon - OBJ(x) \ge 0 holds for all x in the region of interest, then there must be a sum-of-squares proof of this fact. Choosing c to be the minimum of the objective function over the feasible region, we have the result.

= Computational cost =

When optimizing over a function in n variables, the d-th level of the hierarchy can be written as a semidefinite program over n^{O(d)} variables, and can be solved in time n^{O(d)} using the ellipsoid method.

Sum-of-squares background

{{Main|Polynomial SOS}}

A polynomial p is a sum of squares (SOS) if there exist polynomials \{f_i\}_{i=1}^m such that p = \sum_{i=1}^m f_i^2 . For example,

p=x^2 - 4xy + 7y^2

is a sum of squares since

p = f_1^2 + f_2^2

where

f_1 = (x-2y)\text{ and }f_2 = \sqrt{3}y.

Note that if p is a sum of squares then p(x) \ge 0 for all x \in \R^n. Detailed descriptions of polynomial SOS are available.Parrilo, P., (2000) [https://thesis.library.caltech.edu/1647/1/Parrilo-Thesis.pdf Structured semidefinite programs and semialgebraic geometry methods in robustness and optimization]. Ph.D. thesis, California Institute of Technology.

Parrilo, P. (2003) "[http://www.cds.caltech.edu/~doyle/hot/SDPrelaxations.pdf Semidefinite programming relaxations for semialgebraic problems]". Mathematical Programming Ser. B 96 (2), 293–320.Lasserre, J. (2001) "[http://khalilghorbal.info/assets/spa/papers/lasserre.pdf Global optimization with polynomials and the problem of moments]". SIAM Journal on Optimization, 11 (3), 796{817.

Quadratic forms can be expressed as p(x)=x^T Q x where Q is a symmetric matrix. Similarly, polynomials of degree ≤ 2d can be expressed as

p(x)=z(x)^\mathsf{T} Q z(x) ,

where the vector z contains all monomials of degree \le d . This is known as the Gram matrix form. An important fact is that p is SOS if and only if there exists a symmetric and positive-semidefinite matrix Q such that p(x) = z(x)^\mathsf{T} Q z(x) .

This provides a connection between SOS polynomials and positive-semidefinite matrices.

Software tools

  • [http://www.cds.caltech.edu/sostools/ SOSTOOLS], licensed under the GNU GPL. The reference guide is available at arXiv:1310.4716 [math.OC], and a presentation about its internals is available [https://www.youtube.com/watch?v=4_N16UPAgzQ here].
  • [https://github.com/oxfordcontrol/CDCS/tree/master/packages/%2Bcdcs_sos CDCS-sos], a package from [https://github.com/oxfordcontrol/CDCS CDCS], an augmented Lagrangian method solver, to deal with large scale SOS programs.
  • The [https://github.com/JuliaOpt/SumOfSquares.jl SumOfSquares] extension of [https://github.com/JuliaOpt/JuMP.jl JuMP] for Julia.
  • [https://github.com/wangjie212/TSSOS TSSOS] for Julia, a polynomial optimization tool based on the sparsity adapted moment-SOS hierarchies.
  • For the dual problem of constrained polynomial optimization, [http://homepages.laas.fr/henrion/software/gloptipoly/ GloptiPoly] for MATLAB/Octave, [https://github.com/peterwittek/ncpol2sdpa Ncpol2sdpa] for Python and [https://github.com/lanl-ansi/MomentOpt.jl MomentOpt] for Julia.

References