New Applications of Semidefinite Programming Victor Magron , RA - - PowerPoint PPT Presentation

new applications of semidefinite programming
SMART_READER_LITE
LIVE PREVIEW

New Applications of Semidefinite Programming Victor Magron , RA - - PowerPoint PPT Presentation

New Applications of Semidefinite Programming Victor Magron , RA Imperial College 3 Fvrier 2015 Journes GDRIM y par + b 3 par + b sin ( b ) b 1 b b 3 = 500 1 b 1 b 2 par + par b 2 b 3 par b 2 par b 1 Victor Magron


slide-1
SLIDE 1

New Applications of Semidefinite Programming

Victor Magron, RA Imperial College

3 Février 2015

Journées GDRIM

b y b → sin( √ b) par−

b1

par−

b2

par−

b3

par+

b1

par+

b2

par+

b3

1 b1 b2 b3 = 500

Victor Magron New Applications of Semidefinite Programming 1 / 22

slide-2
SLIDE 2

What is Semidefinite Programming?

Linear Programming (LP): min

z

c

⊤z

s.t. A z d .

Linear cost c Linear inequalities “∑i Aij zj di”

Polyhedron

Victor Magron New Applications of Semidefinite Programming 2 / 22

slide-3
SLIDE 3

What is Semidefinite Programming?

Semidefinite Programming (SDP): min

z

c

⊤z

s.t.

i

Fi zi F0 .

Linear cost c Symmetric matrices F0, Fi Linear matrix inequalities “F 0” (F has nonnegative eigenvalues)

Spectrahedron

Victor Magron New Applications of Semidefinite Programming 2 / 22

slide-4
SLIDE 4

What is Semidefinite Programming?

Semidefinite Programming (SDP): min

z

c

⊤z

s.t.

i

Fi zi F0 , A z = d .

Linear cost c Symmetric matrices F0, Fi Linear matrix inequalities “F 0” (F has nonnegative eigenvalues)

Spectrahedron

Victor Magron New Applications of Semidefinite Programming 2 / 22

slide-5
SLIDE 5

Applications of SDP

Combinatorial optimization Control theory Matrix completion Unique Games Conjecture (Khot ’02) : “A single concrete algorithm provides optimal guarantees among all efficient algorithms for a large class of computational problems.” (Barak and Steurer survey at ICM’14) Solving polynomial optimization (Lasserre ’01)

Victor Magron New Applications of Semidefinite Programming 3 / 22

slide-6
SLIDE 6

SDP for Polynomial Optimization

Prove polynomial inequalities with SDP: p(a, b) := a2 − 2ab + b2 0 . Find z s.t. p(a, b) =

  • a

b z1 z2 z2 z3

  • a

b

  • .

Find z s.t. a2 − 2ab + b2 = z1a2 + 2z2ab + z3b2 (A z = d)

z1 z2 z2 z3

  • =

1

  • F1

z1 + 1 1

  • F2

z2 + 1

  • F3

z3

  • F0

Victor Magron New Applications of Semidefinite Programming 4 / 22

slide-7
SLIDE 7

SDP for Polynomial Optimization

Choose a cost c e.g. (1, 0, 1) and solve: min

z

c

⊤z

s.t.

i

Fi zi F0 , A z = d . Solution

z1 z2 z2 z3

  • =

1 −1 −1 1

  • (eigenvalues 0 and 1)

a2 − 2ab + b2 =

  • a

b 1 −1 −1 1

  • a

b

  • = (a − b)2 .

Solving SDP = ⇒ Finding SUMS OF SQUARES certificates

Victor Magron New Applications of Semidefinite Programming 4 / 22

slide-8
SLIDE 8

SDP for Polynomial Optimization

General case: Semialgebraic set S := {x ∈ Rn : g1(x) 0, . . . , gm(x) 0} p∗ := min

x∈S p(x): NP hard

Sums of squares (SOS) Σ[x] (e.g. (x1 − x2)2) Q(S) :=

  • σ0(x) + ∑m

j=1 σj(x)gj(x), with σj ∈ Σ[x]

  • Fix the degree 2k of sums of squares

Qk(S) := Q(S) ∩ R2k[x]

Victor Magron New Applications of Semidefinite Programming 4 / 22

slide-9
SLIDE 9

SDP for Polynomial Optimization

Hierarchy of SDP relaxations: λk := sup

λ

  • λ : p − λ ∈ Qk(S)
  • Convergence guarantees λk ↑ p∗ [Lasserre 01]

Can be computed with SDP solvers (CSDP, SDPA) Extension to semialgebraic functions r(x) = p(x)/

  • q(x)

[Lasserre-Putinar 10]

Victor Magron New Applications of Semidefinite Programming 4 / 22

slide-10
SLIDE 10

Introduction SDP for Nonlinear (Formal) Optimization SDP for Real Algebraic Geometry SDP for Program Verification Conclusion

slide-11
SLIDE 11

From Oranges Stack...

Kepler Conjecture (1611): The maximal density of sphere packings in 3D-space is

π √ 18

Face-centered cubic Packing Hexagonal Compact Packing

Victor Magron New Applications of Semidefinite Programming 5 / 22

slide-12
SLIDE 12

...to Flyspeck Nonlinear Inequalities

The proof of T. Hales (1998) contains mathematical and computational parts Computation: check thousands of nonlinear inequalities Flyspeck [Hales 06]: Formal Proof of Kepler Conjecture

Victor Magron New Applications of Semidefinite Programming 6 / 22

slide-13
SLIDE 13

...to Flyspeck Nonlinear Inequalities

The proof of T. Hales (1998) contains mathematical and computational parts Computation: check thousands of nonlinear inequalities Flyspeck [Hales 06]: Formal Proof of Kepler Conjecture Project Completion on 10 August by the Flyspeck team!!

Victor Magron New Applications of Semidefinite Programming 6 / 22

slide-14
SLIDE 14

A “Simple” Example

In the computational part: Multivariate Polynomials:

∆x := x1x4(−x1 + x2 + x3 − x4 + x5 + x6) + x2x5(x1 − x2 + x3 + x4 − x5 + x6) + x3x6(x1 + x2 − x3 + x4 + x5 − x6) − x2(x3x4 + x1x6) − x5(x1x3 + x4x6)

Victor Magron New Applications of Semidefinite Programming 7 / 22

slide-15
SLIDE 15

A “Simple” Example

In the computational part: Semialgebraic functions: composition of polynomials with | · |, √, +, −, ×, /, sup, inf, . . . p(x) := ∂4∆x q(x) := 4x1∆x r(x) := p(x)/

  • q(x)

l(x) := −π 2 + 1.6294 − 0.2213 (√x2 + √x3 + √x5 + √x6 − 8.0) + 0.913 (√x4 − 2.52) + 0.728 (√x1 − 2.0)

Victor Magron New Applications of Semidefinite Programming 7 / 22

slide-16
SLIDE 16

A “Simple” Example

In the computational part: Transcendental functions T : composition of semialgebraic functions with arctan, exp, sin, +, −, ×, . . .

Victor Magron New Applications of Semidefinite Programming 7 / 22

slide-17
SLIDE 17

A “Simple” Example

In the computational part: Feasible set S := [4, 6.3504]3 × [6.3504, 8] × [4, 6.3504]2 Lemma9922699028 from Flyspeck: ∀x ∈ S, arctan p(x)

  • q(x)
  • + l(x) 0

Victor Magron New Applications of Semidefinite Programming 7 / 22

slide-18
SLIDE 18

New Framework (in my PhD thesis)

Certificates for Nonlinear Optimization using SDP and:

Maxplus approximation (Optimal Control) Nonlinear templates (Static Analysis)

Verification of these certificates inside COQ: p = σ0 + ∑j σjgj = ⇒ ∀x ∈ S, p(x) 0 .

Victor Magron New Applications of Semidefinite Programming 8 / 22

slide-19
SLIDE 19

Contribution: Publications and Software

  • V. M., X. Allamigeon, S. Gaubert and B. Werner.

Formal Proofs for Nonlinear Optimization, arxiv:1404.7282, 2015. Journal of Formalized Reasoning. Software Implementation NLCertify: https://forge.ocamlcore.org/projects/nl-certify/ 15 000 lines of OCAML code 4000 lines of COQ code

  • V. M. NLCertify: A Tool for Formal Nonlinear Optimization,

arxiv:1405.5668, 2014. ICMS.

Victor Magron New Applications of Semidefinite Programming 9 / 22

slide-20
SLIDE 20

Introduction SDP for Nonlinear (Formal) Optimization SDP for Real Algebraic Geometry SDP for Program Verification Conclusion

slide-21
SLIDE 21

Projections of Semialgebraic Sets

Semialgebraic set S := {x ∈ Rn : g1(x) 0, . . . , gl(x) 0} A polynomial map f : Rn → Rm, x → f(x) := (f1(x), . . . , fm(x)) F := f(S) ⊆ B, with B ⊂ Rm a box or a ball Tractable approximations of F ?

Victor Magron New Applications of Semidefinite Programming 10 / 22

slide-22
SLIDE 22

Projections of Semialgebraic Sets

g1 := −(x1 − 2)3/2 − x2 + 2.5 , g2 := −x1 − x2 + 8(−x1 + x2 + 0.65)2 + 3.85 , S := {x ∈ R2 : g1(x) 0, g2(x) 0} .

S

f1 := (x1 + x2 − 7.5)2/4 + (−x1 + x2 + 3)2 , f2 := (x1 − 1)2/4 + (x2 − 4)2/4 .

F = f(S)

Victor Magron New Applications of Semidefinite Programming 10 / 22

slide-23
SLIDE 23

Projections of Semialgebraic Sets

Includes important special cases:

1 m = 1: polynomial optimization

F ⊆ [min

x∈S f(x), max x∈S f(x)] 2 Approximate projections of S when f(x) := (x1, . . . , xm)

Victor Magron New Applications of Semidefinite Programming 10 / 22

slide-24
SLIDE 24

Existential Quantifier Elimination

Another point of view: F = {y ∈ B : ∃x ∈ S s.t. f(x) = y} ,

Victor Magron New Applications of Semidefinite Programming 11 / 22

slide-25
SLIDE 25

Existential Quantifier Elimination

Another point of view: F = {y ∈ B : ∃x ∈ S s.t. y − f(x)2

2 = 0} ,

Victor Magron New Applications of Semidefinite Programming 11 / 22

slide-26
SLIDE 26

Existential Quantifier Elimination

Another point of view: F = {y ∈ B : ∃x ∈ S s.t. hf (x, y) 0} , with hf (x, y) := −y − f(x)2

2 .

Define h(y) := supx∈S hf (x, y)

Victor Magron New Applications of Semidefinite Programming 11 / 22

slide-27
SLIDE 27

Existential Quantifier Elimination

Hierarchy of SDP: inf

q

  • B(q − h)dy : q − hf ∈ Qk(S × B))
  • .

Existential QE: approximate F as closely as desired [Lasserre 14] Fk := {y ∈ B : qk(y) 0} , for some polynomials qk ∈ R2k[y].

Victor Magron New Applications of Semidefinite Programming 11 / 22

slide-28
SLIDE 28

Existential Quantifier Elimination

Theorem Assuming that S has non empty interior, lim

k→∞ vol(Fk\F) = 0 .

Victor Magron New Applications of Semidefinite Programming 11 / 22

slide-29
SLIDE 29

Approximating Projections

f(x) = (x1, x2): projection on R2 of the semialgebraic set S := {x ∈ R3 :x2

2 1, 1/4 − (x1 + 1/2)2 − x2 2 0,

1/9 − (x1 − 1/2)4 − x4

2 0}

F2

Victor Magron New Applications of Semidefinite Programming 12 / 22

slide-30
SLIDE 30

Approximating Projections

f(x) = (x1, x2): projection on R2 of the semialgebraic set S := {x ∈ R3 :x2

2 1, 1/4 − (x1 + 1/2)2 − x2 2 0,

1/9 − (x1 − 1/2)4 − x4

2 0}

F3

Victor Magron New Applications of Semidefinite Programming 12 / 22

slide-31
SLIDE 31

Approximating Projections

f(x) = (x1, x2): projection on R2 of the semialgebraic set S := {x ∈ R3 :x2

2 1, 1/4 − (x1 + 1/2)2 − x2 2 0,

1/9 − (x1 − 1/2)4 − x4

2 0}

F4

Victor Magron New Applications of Semidefinite Programming 12 / 22

slide-32
SLIDE 32

Approximating Pareto Curves

g1 := −(x1 − 2)3/2 − x2 + 2.5 , g2 := −x1 − x2 + 8(−x1 + x2 + 0.65)2 + 3.85 , S := {x ∈ R2 : g1(x) 0, g2(x) 0} . f1 := (x1 + x2 − 7.5)2/4 + (−x1 + x2 + 3)2 , f2 := (x1 − 1)2/4 + (x2 − 4)2/4 . Victor Magron New Applications of Semidefinite Programming 13 / 22

slide-33
SLIDE 33

Approximating Pareto Curves

F1

Victor Magron New Applications of Semidefinite Programming 13 / 22

slide-34
SLIDE 34

Approximating Pareto Curves

F2

Victor Magron New Applications of Semidefinite Programming 13 / 22

slide-35
SLIDE 35

Approximating Pareto Curves

F4

Victor Magron New Applications of Semidefinite Programming 13 / 22

slide-36
SLIDE 36

Approximating Pareto Curves

“Zoom” on the region which is hard to approximate: F4

Victor Magron New Applications of Semidefinite Programming 14 / 22

slide-37
SLIDE 37

Approximating Pareto Curves

“Zoom” on the region which is hard to approximate: F5

Victor Magron New Applications of Semidefinite Programming 14 / 22

slide-38
SLIDE 38

Contributions

  • V. Magron, D. Henrion, J.B. Lasserre. Semidefinite

approximations of projections and polynomial images of semialgebraic sets. oo:2014.10.4606, October 2014.

Victor Magron New Applications of Semidefinite Programming 15 / 22

slide-39
SLIDE 39

Introduction SDP for Nonlinear (Formal) Optimization SDP for Real Algebraic Geometry SDP for Program Verification Conclusion

slide-40
SLIDE 40

Polynomial Programs (One-loop with Guards)

r, s, Ti, Te ∈ R[x] x0 ∈ X0, with X0 semialgebraic set x = x0; while (r(x) 0){ if (s(x) 0){ x = Ti(x); } else{ x = Te(x); } }

Victor Magron New Applications of Semidefinite Programming 16 / 22

slide-41
SLIDE 41

Polynomial Inductive Invariants

Sufficient condition to get inductive invariant: α := min

q∈R[x]

sup

x∈X0

q(x) s.t. q − q ◦ Ti 0 , if s(x) 0 and r(x) 0 , q − q ◦ Te 0 , if s(x) 0 and r(x) 0 , q − κ 0 .

  • k∈N

Xk ⊆ {x ∈ Rn : q(x) α} ⊆ {x ∈ Rn : κ(x) α}

Victor Magron New Applications of Semidefinite Programming 17 / 22

slide-42
SLIDE 42

Bounding Polynomial Invariants

Sufficient condition to get bounding inductive invariant: α := min

q∈R[x]

sup

x∈X0

q(x) s.t. q − q ◦ Ti 0 , if s(x) 0 and r(x) 0 , q − q ◦ Te 0 , if s(x) 0 and r(x) 0 , q − · 2

2 0 .

  • k∈N

Xk ⊆ {x ∈ Rn : q(x) α} ⊆ {x ∈ Rn : x2 α}

Victor Magron New Applications of Semidefinite Programming 18 / 22

slide-43
SLIDE 43

Bounds for

k∈N Xk

X0 := [0.9, 1.1] × [0, 0.2] r(x) := 1 s(x) := 1 − x2 Ti(x) := (x2

1 + x3 2, x3 1 + x2 2)

Te(x) := (1 2x2

1 + 2

5x3

2, −3

5x3

1 + 3

10x2

2)

κ(x) = x2 Degree 6

Victor Magron New Applications of Semidefinite Programming 19 / 22

slide-44
SLIDE 44

Bounds for

k∈N Xk

X0 := [0.9, 1.1] × [0, 0.2] r(x) := 1 s(x) := 1 − x2 Ti(x) := (x2

1 + x3 2, x3 1 + x2 2)

Te(x) := (1 2x2

1 + 2

5x3

2, −3

5x3

1 + 3

10x2

2)

κ(x) = x2 Degree 8

Victor Magron New Applications of Semidefinite Programming 19 / 22

slide-45
SLIDE 45

Bounds for

k∈N Xk

X0 := [0.9, 1.1] × [0, 0.2] r(x) := 1 s(x) := 1 − x2 Ti(x) := (x2

1 + x3 2, x3 1 + x2 2)

Te(x) := (1 2x2

1 + 2

5x3

2, −3

5x3

1 + 3

10x2

2)

κ(x) = x2 Degree 10

Victor Magron New Applications of Semidefinite Programming 19 / 22

slide-46
SLIDE 46

Does

k∈N Xk avoid unsafe region?

X0 := [0.5, 0.7]2 r(x) := 1 s(x) := 1 − x2 Ti(x) := (x2

1 + x3 2, x3 1 + x2 2)

Te(x) := (1 2x2

1 + 2

5x3

2, −3

5x3

1 + 3

10x2

2)

κ(x) = 1 4 − (x1 + 1 2)2 − (x2 + 1 2)2 Degree 6

Victor Magron New Applications of Semidefinite Programming 20 / 22

slide-47
SLIDE 47

Does

k∈N Xk avoid unsafe region?

X0 := [0.5, 0.7]2 r(x) := 1 s(x) := 1 − x2 Ti(x) := (x2

1 + x3 2, x3 1 + x2 2)

Te(x) := (1 2x2

1 + 2

5x3

2, −3

5x3

1 + 3

10x2

2)

κ(x) = 1 4 − (x1 + 1 2)2 − (x2 + 1 2)2 Degree 8

Victor Magron New Applications of Semidefinite Programming 20 / 22

slide-48
SLIDE 48

Does

k∈N Xk avoid unsafe region?

X0 := [0.5, 0.7]2 r(x) := 1 s(x) := 1 − x2 Ti(x) := (x2

1 + x3 2, x3 1 + x2 2)

Te(x) := (1 2x2

1 + 2

5x3

2, −3

5x3

1 + 3

10x2

2)

κ(x) = 1 4 − (x1 + 1 2)2 − (x2 + 1 2)2 Degree 10

Victor Magron New Applications of Semidefinite Programming 20 / 22

slide-49
SLIDE 49

Ongoing: Bounding Floating-point Errors

Exact: f(x) := x1x2 + x3x4 Floating-point: ˆ f(x, ǫ) := [x1x2(1 + ǫ1) + x3x4(1 + ǫ2)](1 + ǫ3) x ∈ S , | ǫi | 2−p p = 24 (single) or 53 (double)

Victor Magron New Applications of Semidefinite Programming 21 / 22

slide-50
SLIDE 50

Ongoing: Bounding Floating-point Errors

Input: exact f(x), floating-point ˆ f(x, ǫ), x ∈ S, | ǫi | 2−p Output: Bounds for f − ˆ f

1: Error r(x, ǫ) := f(x) − ˆ

f(x, ǫ) = ∑

α

rα(ǫ)xα

2: Decompose r(x, ǫ) = l(x, ǫ) + h(x, ǫ), l linear in ǫ 3: Bound h(x, ǫ) with interval arithmetic 4: Bound l(x, ǫ) with SPARSE SUMS OF SQUARES

Victor Magron New Applications of Semidefinite Programming 21 / 22

slide-51
SLIDE 51

Introduction SDP for Nonlinear (Formal) Optimization SDP for Real Algebraic Geometry SDP for Program Verification Conclusion

slide-52
SLIDE 52

Conclusion

SDP is powerful to handle NONLINEARITY: Optimize nonlinear (transcendental) functions Approximate Pareto Curves, projections of semialgebraic sets Analyze nonlinear programs

Victor Magron New Applications of Semidefinite Programming 22 / 22

slide-53
SLIDE 53

Conclusion

Further research: Alternative polynomial bounds using geometric programming (T. de Wolff, S. Iliman) Mixed linear/SDP certificates (trade-off CPU/precision) More program verification Flyspeck nonlinear inequalities : decrease current verification time (5000 CPU hours!!)

Victor Magron New Applications of Semidefinite Programming 22 / 22

slide-54
SLIDE 54

End

Thank you for your attention! cas.ee.ic.ac.uk/people/vmagron