Certified Roundoff Error Bounds using Semidefinite Programming

Similar documents
Formal Proofs, Program Analysis and Moment-SOS Relaxations

New applications of moment-sos hierarchies

Semialgebraic Relaxations using Moment-SOS Hierarchies

arxiv: v2 [math.oc] 16 Oct 2014

How to generate weakly infeasible semidefinite programs via Lasserre s relaxations for polynomial optimization

Lower bounds on the size of semidefinite relaxations. David Steurer Cornell

6-1 The Positivstellensatz P. Parrilo and S. Lall, ECC

4. Convex optimization problems

approximation algorithms I

Optimization over Nonnegative Polynomials: Algorithms and Applications. Amir Ali Ahmadi Princeton, ORFE

Research Reports on Mathematical and Computing Sciences

arxiv: v1 [math.oc] 26 Jul 2013

Analysis and synthesis: a complexity perspective

Optimization-based Modeling and Analysis Techniques for Safety-Critical Software Verification

Lecture: Convex Optimization Problems

The moment-lp and moment-sos approaches

SDP Relaxations for MAXCUT

The moment-lp and moment-sos approaches in optimization

Abstract Interpretation with Higher-Dimensional Ellipsoids and Conic Extrapolation

Advanced SDPs Lecture 6: March 16, 2017

Convex optimization problems. Optimization problem in standard form

Semidefinite Programming Basics and Applications

Approximation & Complexity

Semidefinite Programming

Unique Games and Small Set Expansion

Lecture Note 5: Semidefinite Programming for Stability Analysis

Representations of Positive Polynomials: Theory, Practice, and

Module 04 Optimization Problems KKT Conditions & Solvers

Convex Optimization. (EE227A: UC Berkeley) Lecture 28. Suvrit Sra. (Algebra + Optimization) 02 May, 2013

Semidefinite Programming

On Sound Relative Error Bounds for Floating-Point Arithmetic

arxiv: v1 [cs.sc] 10 Jul 2013

Semidefinite programming lifts and sparse sums-of-squares

Research Reports on Mathematical and Computing Sciences

Towards Solving Bilevel Optimization Problems in Quantum Information Theory

Formal Verification of Mathematical Algorithms

ORF 523 Lecture 9 Spring 2016, Princeton University Instructor: A.A. Ahmadi Scribe: G. Hall Thursday, March 10, 2016

Nonlinear Control as Program Synthesis (A Starter)

Hilbert s 17th Problem to Semidefinite Programming & Convex Algebraic Geometry

Automatic determination of numerical properties of software and systems

Sum of Squares Relaxations for Polynomial Semi-definite Programming

Robust and Optimal Control, Spring 2015

SPECTRA - a Maple library for solving linear matrix inequalities in exact arithmetic

An explicit construction of distinguished representations of polynomials nonnegative over finite sets

Formal verification for numerical methods

Interactive Theorem Proving in Industry

Linear and non-linear programming

Enabling Efficient Analog Synthesis by Coupling Sparse Regression and Polynomial Optimization

Non-linear Interpolant Generation and Its Application to Program Verification

Introduction to Semidefinite Programming I: Basic properties a

Convex Optimization & Parsimony of L p-balls representation

Global polynomial optimization with Moments Matrices and Border Basis

III. Applications in convex optimization

CSCI 1951-G Optimization Methods in Finance Part 10: Conic Optimization

4. Convex optimization problems

Optimization over Polynomials with Sums of Squares and Moment Matrices

Solving Global Optimization Problems with Sparse Polynomials and Unbounded Semialgebraic Feasible Sets

Sum-of-Squares Method, Tensor Decomposition, Dictionary Learning

Notes on the decomposition result of Karlin et al. [2] for the hierarchy of Lasserre by M. Laurent, December 13, 2012

on Semialgebraic Sets for Nonnnegative Polynomials Finding Representations

4. Algebra and Duality

Strong duality in Lasserre s hierarchy for polynomial optimization

Exact SDP Relaxations for Classes of Nonlinear Semidefinite Programming Problems

Intel s Successes with Formal Methods

Research overview. Seminar September 4, Lehigh University Department of Industrial & Systems Engineering. Research overview.

Introduction to LP and SDP Hierarchies

A heuristic prover for real inequalities

Rigorous Polynomial Approximations and Applications

An Introduction to Differential Algebra

On Polynomial Optimization over Non-compact Semi-algebraic Sets

V&V MURI Overview Caltech, October 2008

A PARALLEL INTERIOR POINT DECOMPOSITION ALGORITHM FOR BLOCK-ANGULAR SEMIDEFINITE PROGRAMS IN POLYNOMIAL OPTIMIZATION

Fast ADMM for Sum of Squares Programs Using Partial Orthogonality

Lift-and-Project Techniques and SDP Hierarchies

Certifying the Global Optimality of Graph Cuts via Semidefinite Programming: A Theoretic Guarantee for Spectral Clustering

arxiv: v1 [cs.lo] 24 Mar 2015

arxiv:math/ v3 [math.oc] 5 Oct 2007

9. Interpretations, Lifting, SOS and Moments

arxiv: v1 [math.oc] 31 Jan 2017

Convergence rates of moment-sum-of-squares hierarchies for volume approximation of semialgebraic sets

1. Introduction. We consider the general global optimization problem

HW1 solutions. 1. α Ef(x) β, where Ef(x) is the expected value of f(x), i.e., Ef(x) = n. i=1 p if(a i ). (The function f : R R is given.

Symmetric Sums of Squares

Rational Sums of Squares and Applications

arxiv: v1 [math.oc] 9 Sep 2015

Detecting global optimality and extracting solutions in GloptiPoly

The maximal stable set problem : Copositive programming and Semidefinite Relaxations

Dimension reduction for semidefinite programming

The Trust Region Subproblem with Non-Intersecting Linear Constraints

LOWER BOUNDS FOR A POLYNOMIAL IN TERMS OF ITS COEFFICIENTS

Semidefinite Relaxations Approach to Polynomial Optimization and One Application. Li Wang

A new look at nonnegativity on closed sets

Strange Behaviors of Interior-point Methods. for Solving Semidefinite Programming Problems. in Polynomial Optimization

DSOS/SDOS Programming: New Tools for Optimization over Nonnegative Polynomials

What can be expressed via Conic Quadratic and Semidefinite Programming?

Power and limitations of convex formulations via linear and semidefinite programming lifts. Hamza Fawzi

Semidefinite programming and convex algebraic geometry

Lecture 10. Semidefinite Programs and the Max-Cut Problem Max Cut

Limitations in Approximating RIP

Optimization of a Convex Program with a Polynomial Perturbation

Transcription:

Certified Roundoff Error Bounds using Semidefinite Programming Victor Magron, CNRS VERIMAG joint work with G. Constantinides and A. Donaldson INRIA Mescal Team Seminar 19 November 2015 Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 1 / 27

Errors and Proofs Mathematicians and Computer Scientists want to eliminate all the uncertainties on their results. Why? Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 2 / 27

Errors and Proofs Mathematicians and Computer Scientists want to eliminate all the uncertainties on their results. Why? M. Lecat, Erreurs des Mathématiciens des origines à nos jours, 1935. ; 130 pages of errors! (Euler, Fermat, Sylvester,... ) Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 2 / 27

Errors and Proofs Mathematicians and Computer Scientists want to eliminate all the uncertainties on their results. Why? M. Lecat, Erreurs des Mathématiciens des origines à nos jours, 1935. ; 130 pages of errors! (Euler, Fermat, Sylvester,... ) Ariane 5 launch failure, Pentium FDIV bug Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 2 / 27

Errors and Proofs GUARANTEED OPTIMIZATION Input : Linear problem (LP), geometric, semidefinite (SDP) Output : solution + certificate numeric-symbolic formal Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 3 / 27

Errors and Proofs GUARANTEED OPTIMIZATION Input : Linear problem (LP), geometric, semidefinite (SDP) Output : solution + certificate numeric-symbolic formal VERIFICATION OF CRITICAL SYSTEMS Reliable software/hardware embedded codes Aerospace control molecular biology, robotics, code synthesis,... Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 3 / 27

Errors and Proofs GUARANTEED OPTIMIZATION Input : Linear problem (LP), geometric, semidefinite (SDP) Output : solution + certificate numeric-symbolic formal VERIFICATION OF CRITICAL SYSTEMS Reliable software/hardware embedded codes Aerospace control molecular biology, robotics, code synthesis,... Efficient Verification of Nonlinear Systems Automated precision tuning of systems/programs analysis/synthesis Efficiency sparsity correlation patterns Certified approximation algorithms Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 3 / 27

Rounding Error Bounds Real : p(x) := x 1 x 2 + x 3 Floating-point : ˆp(x, e) := [x 1 x 2 (1 + e 1 ) + x 3 ](1 + e 2 ) Input variable uncertainties x S Finite precision bounds over e e i 2 m m = 24 (single) or 53 (double) Guarantees on absolute round-off error ˆp p? Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 4 / 27

Nonlinear Programs Polynomials programs : +,, x 2 x 5 + x 3 x 6 + x 1 ( x 1 + x 2 + x 3 x 4 + x 5 + x 6 ) Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 5 / 27

Nonlinear Programs Polynomials programs : +,, x 2 x 5 + x 3 x 6 + x 1 ( x 1 + x 2 + x 3 x 4 + x 5 + x 6 ) Semialgebraic programs:,, /, sup, inf 4x 1 + x 1.11 Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 5 / 27

Nonlinear Programs Polynomials programs : +,, x 2 x 5 + x 3 x 6 + x 1 ( x 1 + x 2 + x 3 x 4 + x 5 + x 6 ) Semialgebraic programs:,, /, sup, inf 4x 1 + x 1.11 Transcendental programs: arctan, exp, log,... log(1 + exp(x)) Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 5 / 27

Existing Frameworks Classical methods: Abstract domains [Goubault-Putot 11] FLUCTUAT: intervals, octagons, zonotopes Interval arithmetic [Daumas-Melquiond 10] GAPPA: interface with COQ proof assistant Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 6 / 27

Existing Frameworks Recent progress: Affine arithmetic + SMT [Darulova 14] rosa: sound compiler for reals (in SCALA) Symbolic Taylor expansions [Solovyev 15] FPTaylor: certified optimization (in OCAML and HOL-LIGHT) Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 6 / 27

Contributions Maximal Rounding error of the program implementation of f : r := max ˆf (x, e) f (x) Decomposition: linear term l w.r.t. e + nonlinear term h r max l(x, e) + max h(x, e) Sparse SDP bounds for l Coarse bound of h with interval arithmetic Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 7 / 27

Contributions 1 Comparison with SMT and linear/affine arithmetic: More Efficient optimization + Tight upper bounds 2 Extensions to transcendental/conditional programs 3 Formal verification of SDP bounds 4 Open source tool Real2Float (in OCAML and COQ) Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 7 / 27

Introduction Semidefinite Programming for Polynomial Optimization Rounding Error Bounds with Sparse SDP Conclusion

What is Semidefinite Programming? Linear Programming (LP): min z c z s.t. A z d. Linear cost c Linear inequalities i A ij z j d i Polyhedron Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 8 / 27

What is Semidefinite Programming? Semidefinite Programming (SDP): min z s.t. c z F i z i F 0. i Linear cost c Symmetric matrices F 0, F i Linear matrix inequalities F 0 (F has nonnegative eigenvalues) Spectrahedron Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 9 / 27

What is Semidefinite Programming? Semidefinite Programming (SDP): min z s.t. c z F i z i F 0, A z = d. i Linear cost c Symmetric matrices F 0, F i Linear matrix inequalities F 0 (F has nonnegative eigenvalues) Spectrahedron Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 10 / 27

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 Certified Roundoff Error Bounds using Semidefinite Programming 11 / 27

SDP for Polynomial Optimization Prove polynomial inequalities with SDP: Find z s.t. p(a, b) = p(a, b) := a 2 2ab + b 2 0. ( a ) ( ) z 1 z 2 b z 2 z 3 }{{} 0 ( ) a b Find z s.t. a 2 2ab + b 2 = z 1 a 2 + 2z 2 ab + z 3 b 2 (A z = d) ( ) ( ) ( ) ( ) ( ) z1 z 2 1 0 0 1 0 0 0 0 = z z 2 z 3 0 0 1 + z 1 0 2 + z 0 1 3 0 0 }{{}}{{}}{{}}{{} F 1 F 2 F 3 F 0. Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 12 / 27

SDP for Polynomial Optimization Choose a cost c e.g. (1, 0, 1) and solve: min z s.t. ( ) z1 z Solution 2 = z 2 z 3 c z F i z i F 0, A z = d. i ( ) 1 1 0 (eigenvalues 0 and 1) 1 1 a 2 2ab + b 2 = ( a b ) ( ) ( ) 1 1 a = (a b) 2. 1 1 b }{{} 0 Solving SDP = Finding SUMS OF SQUARES certificates Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 13 / 27

SDP for Polynomial Optimization General case: Semialgebraic set S := {x R n : g 1 (x) 0,..., g m (x) 0} p := min p(x): NP hard x S Sums of squares (SOS) Σ[x] (e.g. (x 1 x 2 ) 2 ) Q(S) := { } σ 0 (x) + m j=1 σ j(x)g j (x), with σ j Σ[x] Fix the degree 2k of sums of squares Q k (S) := Q(S) R 2k [x] Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 14 / 27

SDP for Polynomial Optimization Hierarchy { of SDP relaxations: } λ k := sup λ : p λ Q k (S) λ Convergence guarantees λ k p [Lasserre 01] Can be computed with SDP solvers (CSDP, SDPA) No Free Lunch Rule: ( n+2k ) SDP variables n Extension to semialgebraic functions r(x) = p(x)/ q(x) [Lasserre-Putinar 10] Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 15 / 27

Sparse SDP Optimization [Waki, Lasserre 06] Correlative sparsity pattern (csp) of variables x 2 x 5 + x 3 x 6 x 2 x 3 x 5 x 6 + x 1 ( x 1 + x 2 + x 3 x 4 + x 5 + x 6 ) 6 5 4 1 2 3 1 Maximal cliques C 1,..., C l 2 Average size κ ( κ+2k κ ) variables C 1 := {1, 4} C 2 := {1, 2, 3, 5} C 3 := {1, 3, 5, 6} Dense SDP: 210 variables Sparse SDP: 115 variables Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 16 / 27

Introduction Semidefinite Programming for Polynomial Optimization Rounding Error Bounds with Sparse SDP Conclusion

Polynomial Programs Input: exact f (x), floating-point ˆf (x, e), x S, e i 2 m Output: Bound for f ˆf 1: Error r(x, e) := f (x) ˆf (x, e) = r α (e)x α α 2: Decompose r(x, e) = l(x, e) + h(x, e), l linear in e 3: l(x, e) = n i=0 s i(x)e i 4: Maximal cliques correspond to {x, e 1 },..., {x, e n } 5: Bound l(x, e) with sparse SDP relaxations (and h with IA) Dense relaxation: ( n+n +2k n+n ) SDP variables Sparse relaxation: n ( n+1+2k n+1 ) SDP variables Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 17 / 27

Preliminary Comparisons f (x) := x 2 x 5 + x 3 x 6 x 2 x 3 x 5 x 6 + x 1 ( x 1 + x 2 + x 3 x 4 + x 5 + x 6 ) x [4.00, 6.36] 6, e [ ɛ, ɛ] 15, ɛ = 2 24 Dense SDP: ( 6+15+4 6+15 ) = 12650 variables Out of memory Sparse SDP Real2Float tool: 15( 6+1+4 6+1 ) = 4950 789ɛ Interval arithmetic: 2023ɛ (17 less CPU) Symbolic Taylor FPTaylor tool: 936ɛ (16.3 more CPU) SMT-based rosa tool: 789ɛ (4.6 more CPU) Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 18 / 27

Preliminary Comparisons 1,000 936ɛ 800 789ɛ 789ɛ Error Bound (ɛ) 600 400 200 0 Real2Float rosa CPU Time FPTaylor Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 18 / 27

Extensions: Transcendental Programs Given K a compact set and f a transcendental function, bound f = inf x K f (x) and prove f 0 f is under-approximated by a semialgebraic function f sa Reduce the problem f sa := inf x K f sa (x) to a polynomial optimization problem (POP) Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 19 / 27

Extensions: Transcendental Programs Approximation theory: Chebyshev/Taylor models mandatory for non-polynomial problems hard to combine with Sum-of-Squares techniques (degree of approximation) Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 19 / 27

Maxplus Approximations Initially introduced to solve Optimal Control Problems [Fleming-McEneaney 00] Curse of dimensionality reduction [McEaneney Kluberg, Gaubert-McEneaney-Qu 11, Qu 13]. Allowed to solve instances of dim up to 15 (inaccessible by grid methods) In our context: approximate transcendental functions Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 20 / 27

Maxplus Approximations Definition Let γ 0. A function φ : R n R is said to be γ-semiconvex if the function x φ(x) + γ 2 x 2 2 is convex. y par + a 1 par + a 2 arctan par a 2 m a 1 a 2 M a par a 1 Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 20 / 27

Maxplus Approximations Exact parsimonious maxplus representations y a Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 21 / 27

Maxplus Approximations Exact parsimonious maxplus representations y a Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 21 / 27

Extensions: Programs with Conditionals if (p(x) 0) f (x); else g(x); DIVERGENCE PATH ERROR: r := max{ } max ˆf (x, e) g(x) p(x) 0,p(x,e) 0 max ĝ(x, e) f (x) p(x) 0,p(x,e) 0 max ˆf (x, e) f (x) p(x) 0,p(x,e) 0 max ĝ(x, e) g(x) p(x) 0,p(x,e) 0 Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 22 / 27

Benchmarks Doppler 5,000 4,477ɛ u [ 100, 100] v [20, 20000] T [ 30, 50] Error Bound (ɛ) 4,000 3,000 2,000 1,415ɛ 2,567ɛ let t 1 = 331.4 + 0.6T in t 1 v (t 1 + u) 2 1,000 0 FPTaylor Real2Float rosa CPU Time Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 23 / 27

Benchmarks Kepler2 10 4 23,509ɛ x [4, 6.36] 6 x 1 x 4 ( x 1 + x 2 + x 3 x 4 +x 5 + x 6 ) + x 2 x 5 (x 1 x 2 +x 3 + x 4 x 5 + x 6 ) +x 3 x 6 (x 1 + x 2 x 3 +x 4 + x 5 x 6 ) x 2 x 3 x 4 x 1 x 3 x 5 x 1 x 2 x 6 x 4 x 5 x 6 Error Bound (ɛ) 2 1.5 1 0.5 0 17,114ɛ Real2Float FPTaylor CPU Time 19,456ɛ rosa Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 24 / 27

Benchmarks verhulst 6 6.15ɛ x [0.1, 0.3] 4x 1 + x 1.11 Error Bound (ɛ) 4 2 3.07ɛ 3.16ɛ 0 Real2Float FPTaylor rosa CPU Time Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 25 / 27

Benchmarks 20 logexp x [ 8, 8] log(1 + exp(x)) Error Bound (ɛ) 15 10 5 13.5ɛ 15.4ɛ 0 Real2Float FPTaylor CPU Time Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 26 / 27

Introduction Semidefinite Programming for Polynomial Optimization Rounding Error Bounds with Sparse SDP Conclusion

Conclusion Sparse SDP relaxations analyze NONLINEAR PROGRAMS: Polynomial and transcendental programs Handles conditionals, input uncertainties,... Certified Formal rounding error bounds Real2Float open source tool: https://forge.ocamlcore.org/projects/nl-certify Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 27 / 27

Conclusion Further research: Improve formal polynomial checker Alternative polynomial bounds using geometric programming (T. de Wolff, S. Iliman) Mixed linear/sdp certificates (trade-off CPU/precision) More program verification: while loops Automatic FPGA code generation Victor Magron Certified Roundoff Error Bounds using Semidefinite Programming 27 / 27

End Thank you for your attention! http://www-verimag.imag.fr/~magron V. Magron, G. Constantinides, A. Donaldson. Certified Roundoff Error Bounds Using Semidefinite Programming, arxiv.org/abs/1507.03331