Methods: Semidefinite programming

Definition

Under the term semi­de­fi­ni­te pro­gramming (SDP), one under­stands optimi­zation pro­blems which have a line­ar objec­ti­ve func­tion and who­se cons­traints con­sist of line­ar equa­tions and spec­tral ine­qua­li­ties which are less inter­pr­e­ta­ble but more powerful than line­ar or qua­dra­tic inequalities.

Spec­tral ine­qua­li­ties quan­ti­fy requi­re­ments on the spec­trum (the eigenva­lues) of matri­ces con­s­truc­ted from the optimi­zation varia­bles. Thus, the cen­tral optimi­zation pro­blems are:

$$ \begin{align} \min_x ~~~& \langle c, x\rangle \\ \text{s.t.}
~~~&Ax =b \\ ~~~& \sum_{k=1}^n x_k G_k \succeq 0 \end{align}$$

in the optimi­zation varia­bles \(x\) [1, p. 168]. Here, \(x, c, b\) are vec­tors, \(A, G_1, …, G_n, H\) are matri­ces and for a matrix \(F\), \(F\succeq 0\) means that the spec­trum of \(F\) is posi­ti­ve. \(F \succeq 0\) is a glo­bal state­ment about cer­tain com­bi­na­ti­ons of all ele­ments of \(F\) tog­e­ther and can­not be sim­pli­fied to ele­ment-wise ine­qua­li­ties. The pro­blem descri­bed in detail is as follows.

  • Find the varia­bles \(x_1, …, x_n\) such that \(\langle c,x\rangle = c_1x_1 +, … , +c_nx_n\) is minimized.
  • The fol­lo­wing should hold:
    1. \(a_{k1} x_1 + , …, + a_{kn}x_n =b_k ~~~~k=1, …, m_1\)
    2. \(x_1 G_1 + , …, + x_n G_n \succeq H\)

Like in LP, the pro­blem con­sists of mini­mi­zing a sum \(\langle c,x\rangle\), \(m_1\) equa­tions, and ine­qua­li­ties. Unli­ke LP, the ine­qua­li­ties per­tain to the spec­trum of the matrix \(x_1G_1 + , …, + x_nG_n‑H\), making them much more fle­xi­ble but also har­der to inter­pret. SDP is very gene­ral and includes LP, QP, QCQP, and SOCP [2, p. 3].

Example

Every exam­p­le of LP, QP, QCQP, and SOCP is also an exam­p­le of SDP. SDP is par­ti­cu­lar­ly sui­ta­ble for optimi­zation tasks con­cer­ning the eigenva­lues of matri­ces, thus for exam­p­le, mini­mi­zing uncer­tain­ty mea­su­res. Con­sider the matrix

$$ \begin{align} F=\begin{bmatrix} x_1 & x_2 \\ x_2 &1 \end{bmatrix} \succeq 0 ~~~~~ x_1+x_2=2 \end{align}$$

which is the cova­ri­ance matrix, a mea­su­re for the uncer­tain­ties and cor­re­la­ti­ons in expe­ri­ments. Here, \(x_1\) and \(x_2\) are decis­i­on varia­bles con­cer­ning the choice of expe­ri­ments. They should be cho­sen such that the lar­gest eigenva­lue of \(F\) — as an indi­ca­tor of maxi­mum uncer­tain­ty — is mini­mi­zed. Through seve­ral trans­for­ma­ti­ons [1, p. 387], the pro­blem can be writ­ten as the SDP

$$ \begin{align} \min_{x_1, …, x_n, t} ~~~& t \\ \text{s.t.}
~~~&x_1+x_2 =2 \\ ~~~& t \begin{bmatrix} 1 & 0 \\ 0 & 1\end{bmatrix} — \begin{bmatrix} x_1 & x_2 \\ x_2 & 1 \end{bmatrix} \succeq 0 ~~~~\begin{bmatrix} x_1 & x_2 \\ x_2 & 1 \end{bmatrix} \succeq 0 \end{align}$$

Using CVXPY [3] and the inte­gra­ted SCS algo­rithm [4], the non-tri­vi­al solu­ti­on \(x_1=1.6, x_2=0.4\) is obtained.

Figu­re 1: Geo­me­tric inter­pre­ta­ti­on of the pro­blem of mini­mi­zing the maxi­mum eigenva­lue of a matrix under line­ar cons­traints. The con­tour lines and the fea­si­ble set are high­ly curved.

Applications

The appli­ca­ti­ons of Semi­de­fi­ni­te Pro­gramming (SDP) are enorm­ously diver­se and include all pro­blems whe­re the spec­trum of matri­ces is rele­vant. The­se cover many pro­ba­bi­li­stic and phy­si­cal issues; par­ti­cu­lar­ly in opti­mal con­trol, sys­tem sta­bi­liza­ti­on, con­trol engi­nee­ring, port­fo­lio optimi­zation, expe­ri­men­tal design, sta­tis­ti­cal ine­qua­li­ties, robust appro­xi­ma­ti­on and decis­i­on making, struc­tu­ral engi­nee­ring design, optimi­zation under pro­ba­bi­li­stic cons­traints, and see­king appro­xi­ma­ti­on solu­ti­ons for hard com­bi­na­to­ri­al pro­blems such as Max Cut or the optimi­zation of qua­dra­tic forms on graphs. Details can be found here.

The optimi­zation varia­bles \(x_1, …, x_n\) are often inter­pre­ted as para­me­ters of cova­ri­ance or ener­gy matri­ces. Due to various tricks for for­mu­la­ting SDPs, they are often extre­me­ly dif­fi­cult to under­stand. As an exam­p­le, con­sider the embed­ding of Second Order Cone Pro­gramming (SOCP). The­se optimi­zation pro­blems of the form

$$ \begin{align} \min_x ~~~& \langle c, x\rangle \\ \text{s.t.}
~~~&Ax =b \\ ~~~& \|G_k x +h_k\|_2 \le \langle f_k,x\rangle + d_k ~~~ k=1, …, m_2 \end{align}$$

can be refor­mu­la­ted using the Schur com­ple­ment as the SDP

$$ \begin{align} \min_x ~~~& \langle c, x\rangle \\ \text{s.t.}
~~~&Ax =b \\ ~~~& \begin{bmatrix} r_kI & q_k \\ q_k^T & r_k \end{bmatrix} \succeq 0 ~~~k=1, …, m_2 \end{align}$$

Here, \(I\) is the iden­ti­ty matrix, \(r_k=\langle f_k,x\rangle +d_k\), \(q_k=G_kx+h_k\), and the equi­va­lence ari­ses from \([A ~~b ; b^T~~ c] \succeq 0 \Leftrightarrow A\succeq 0 \wedge c- b^T Ab\succeq 0\).

Solution procedure

Semi­de­fi­ni­te pro­grams have been sol­va­ble with open-access soft­ware sin­ce the ear­ly 2000s, with theo­re­ti­cal algo­rith­ms exis­ting sin­ce the 1980s [5]. As the illus­tra­ted exam­p­le shows, opti­ma do not neces­s­a­ri­ly occur on the boun­da­ry of the fea­si­ble set, which excludes methods like the Sim­plex method.

Ins­tead, inte­ri­or-point methods are used that replace con­di­ti­ons of the type \(X \succeq 0\) with bar­ri­er func­tions \(-\mu \log \det x\), which grow explo­si­ve­ly at the edge of the fea­si­ble set. As \(\mu\) is suc­ces­si­ve­ly redu­ced, the mini­mum of \(\langle c,x\rangle — \mu \log \det x\) approa­ches \(\min_x \langle c,x\rangle\) with \(x \succeq 0\) [6, p. 286]. The fea­si­ble sets are non­line­ar and the path through the set is direc­ted by local gra­di­ents, as shown in the figure.

Figu­re 2: The fea­si­ble set of a line­ar matrix ine­qua­li­ty \(\begin{bmatrix} 1 & x_1 & x_2 \\ x_1 & 1 & x_3 \\ x_2 & x_3 & 1 \end{bmatrix} \succeq 0\) with 3 varia­bles \(x_1, x_2, x_3\) deri­ved from [7].

Practical aspects

SDPs with tens of thou­sands of varia­bles can be relia­bly sol­ved today. The cor­re­spon­ding algo­rith­ms have been deve­lo­ped and imple­men­ted in the form of open-source soft­ware. SCS [4], SeDu­Mi [8], and SDPT3 [9] are publicly available—however, this soft­ware is nume­ri­cal­ly less sta­ble than com­pa­ra­ble sol­vers for LP or QP. Sin­ce the cons­traints in SDP can be con­side­red as infi­ni­te­ly many line­ar ine­qua­li­ties, SDP is a very com­pre­hen­si­ve pro­blem class. Howe­ver, mode­ling as a spec­t­ral­ly cons­trai­ned optimi­zation pro­blem is a challenge.

Code & Sources

Exam­p­le code: Methods_sdp.py in our tuto­ri­al­fol­der

[1] Boyd, S., & Van­den­berg­he, L. (2004). Con­vex Optimi­zation. Cam­bridge: Cam­bridge Uni­ver­si­ty Press.

[2] De Klerk, E. (2006). Aspects of Semi­de­fi­ni­te Pro­gramming: Inte­ri­or Point Algo­rith­ms and Sel­ec­ted Appli­ca­ti­ons. Ber­lin Hei­del­berg: Sprin­ger Sci­ence & Busi­ness Media.

[3] Dia­mond S., & Boyd S., (2016). CVXPY: A Python-embedded mode­ling lan­guage for con­vex optimi­zation. Jour­nal of Machi­ne Lear­ning Rese­arch, 17(83), 1–5.

[4] O’do­noghue, B., Chu, E., Parikh, N., & Boyd, S. (2016). Conic Optimi­zation via Ope­ra­tor Split­ting and Homo­ge­neous Self-Dual Embed­ding. Jour­nal of Optimi­zation Theo­ry and Appli­ca­ti­ons, 169(3), 1042–1068.

[5] Kar­mar­kar, N. (1984). A new poly­no­mi­al-time algo­rithm for line­ar pro­gramming. Com­bi­na­to­ri­ca, 4, 373–395.

[6] Wol­ko­wicz, H., Sai­gal, R., & Van­den­berg­he, L. (2012). Hand­book of Semi­de­fi­ni­te Pro­gramming: Theo­ry, Algo­rith­ms, and Appli­ca­ti­ons. Ber­lin Hei­del­berg: Sprin­ger Sci­ence & Busi­ness Media.

[7] Vinz­ant, C. (2014). What is … a spec­tra­he­dron? Noti­ces of the Ame­ri­can Mathe­ma­ti­cal Socie­ty, 61, 492–494.

[8] Sturm, J. F. (1999). Using SeDu­Mi 1.02, a MATLAB tool­box for optimi­zation over sym­me­tric cones. Optimi­zation Methods and Soft­ware, 11(1–4), 625–653.

[9] Tütün­cü, R. H., Toh, K. C., & Todd, M. J. (2003). Sol­ving semi­de­fi­ni­te-qua­dra­tic-line­ar pro­grams using SDPT3, Mathe­ma­ti­cal Pro­gramming, 95, 189–217.