analysis and synthesis: a complexity perspective · • convex condition • efficiently checked...

38
Analysis and synthesis: a complexity perspective Pablo A. Parrilo Pablo A. Parrilo ETH Z ETH Z ü ü rich rich control.ee.ethz.ch/~parrilo

Upload: others

Post on 18-Jul-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

Analysis and synthesis:a complexity perspective

Pablo A. ParriloPablo A. ParriloETH ZETH Züürichrich

control.ee.ethz.ch/~parrilo

Page 2: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

Outline

System analysis/designFormal and informal methodsSOS/SDP techniques and applicationsWhy we think this is a good ideaA view on complexityConnections with other approachesLimitations, challenges, and perspectives

Page 3: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

System analysis

Analysis: establish properties of systems

System descriptions (models), not reality.

o Informal: reasoning, analogy, intuition, design rules, simulation, extensive testing, etc.

o Formal: Mathematically correct proofs. Guarantees can be deterministic or in probability.

Many recent advances in formal methods (hardware/software design, robust control, etc)

Page 4: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

Complexity issues

What are the barriers to fully automated design/synthesis?How to quantify the computational resources needed for these tasks?How do they scale with problem size?If a system has a certain property, can we concisely explain why? (a scientist’s nightmare)Does the existence of a simple proof guarantee that we can efficiently find it?

Page 5: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

NP(concise proofs)

co-NP(concise counterexamples) Linear

programming

Travelingsalesman

Polynomial nonnegativity

P

NPCCo-NPC

Unless they’re all the same…

Page 6: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

• So far, analysis or verification.

• Synthesis (design), a much more complicated beast.

( ) ?x P x∀

( , ) ?y x P x y∃ ∀

• In general, a higher complexity class

• Optimization vs. games, minimax, robustness, etc

• Alternating quantifiers, relativized Turing machines: the polynomial time hierarchy.

Analysis vs. synthesis

Page 7: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

1∏

2∏

3∏

1∑

2∑

3∑

......

NPCo-NP

0 0∏ = ∑

PAnalysis

Synthesis

( )?x P x∀

( , )?y x P x y∃ ∀

Polynomial time hierarchy

Page 8: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

( , ) 0y x P x y∃ ∀ ≥

A possible way out?

•In general is Π2-hard.

•Really bad. No hope of solving this efficiently.

•But when P(x,y) is quadratic in x and affine in y…

•This is exactly semidefinite programming (SDP)

•Drops two levels to P, polynomial time !

•A reason behind the ubiquity of SDP-based methods

Page 9: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

• Synthesis results depend on hand-crafted “tricks”that we don’t fully understand yet.

• Until recently we could say the same about analysis, where custom techniques abound.

• For analysis, there’s a method in the madness, earlier results unified and expanded.

Page 10: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

Semialgebraic modeling

Many problems in different domains can be modeled by polynomial inequalities

Continuous, discrete, hybridNP-hard in generalTons of examples: spin glasses, dynamical systems, robustness analysis, SAT, quantum systems, etc.

How to prove things about them, in an algorithmic, certified and efficient way?

0)(,0)( =≥ xgxf ii

Page 11: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

Proving vs. disproving

Really, it’s automatic theorem provingBig difference: finding counterexamples vs. producing proofs (NP vs. co-NP)

Page 12: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

“bad”region

Nominal System

• Find bad events(e.g. protocol deadlock, death)

Bad events are easy to describe (NP)

Safety proofs could potentially be long (co-NP)

or…

• Safety guarantees(e.g. Lyapunov, barriers, certificates)

Page 13: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

Proving vs. disproving

Big difference: finding counterexamples vs. producing proofs (NP vs. co-NP)Decision theory exists (Tarski-Seidenberg, etc), practical performance is quite poor Want unconditionally valid proofs, but may fail to get them sometimesRather, we use a particular proof system from real algebra: the Positivstellensatz

Page 14: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

An example

}02:,03:|),{( 22 =++=≥+−= xygyxfyx

Is the set described by these inequalities empty?

How to certify this?

Page 15: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

Example (continued)

}02:,03:|),{( 22 =++=≥+−= xygyxfyx

Is empty, since

1121 −=++ gtfss

with

6,2,)(6)(2 122

612

23

31

1 −==−+++= tsxys

Reason: evaluate on candidate feasible points

nonnegative zero

Page 16: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

Define two algebraic objects:The cone generated by the inequalities

The polynomials are sums of squaresThe ideal generated by the equalities

∑∑ +++=ji

jiiji

iii ffsfssf,

0:)(cone L

What is this? How to generalize it?

}0)(,0)(:{ =≥∈ xgxfRx iin

∑=i

iii gtg :)(ideal

αs

Page 17: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

A sufficient condition for nonnegativity:

Sums of squares (SOS)

2( ) : ( ) ( ) ?i ii

f x p x f x∃ = ∑

• Convex condition

• Efficiently checked using SDP

Write: ( ) , 0Tp x z Qz Q= ≥

where z is a vector of monomials. Expanding and equating sides, obtain linear constraints among the Qij.

Finding a PSD Q subject to these conditions is exactly a semidefinite program (LMI).

Page 18: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

Infeasibility certificates for polynomial systems over the reals. Sums of squares (SOS) are essentialConditions are convex in f,g Bounded degree solutions can be computed!A convex optimization problem.Furthermore, it’s a semidefinite program (SDP)

1:)(ideal),(cone −=+∈∈∃ gfggff ii

Positivstellensatz (Real Nullstellensatz)

empty is}0)(,0)(:{ =≥∈ xgxfRx iin

if and only if

Page 19: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

P-satz proofs

Proofs are given by algebraic identitiesExtremely easy to verifyUse convex optimization to search for them

Convexity, hence a duality structure:On the primal, simple proofs.On the dual, weaker models (liftings, etc)

General algorithmic constructionBased on the axioms of formally real fieldsTechniques for exploiting problem structure

Page 20: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

ModelingRobustness barriers

Polynomial inequalities

AnalysisReal algebraic geometry

DualitySDP/SOS

A formal, complete proof systemVery effective in a wide variety of areasLook for short (bounded-depth) proofs first, according to resources

Page 21: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

System Analysis

Want to decouple System complexityComplexity of verification.

“bad”region

Nominal System

• Even for extremely complex systems, there may exist simple robustness proofs. Try to look for those first…

Page 22: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

Special cases

Generalizes well-known methods:Linear programming dualityS-procedureSDP relaxations for QPLMI techniques for linear systems Structured singular valueSpectral bounds for graphsCustom heuristics (e.g. NPP)

Page 23: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

A few sample applications

Continuous and combinatorial optimizationGraph properties: stability numbers, cuts, …Dynamical systems: Lyapunov and Bendixson-Dulac functions Bounds for linear PDEs (Hamilton-Jacobi, etc)Robustness analysis, model validationReachability analysis: set mappings, …Hybrid and time-delay systemsData/model consistency in biological systemsGeometric theorem provingQuantum information theory

Page 24: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

DS applications: Bendixson-Dulac

• In 2D, a well-known criterion: Bendixson-Dulac

• Higher dimensional generalizations (Rantzer)

• Weaker stability criterion than Lyapunov (allowing a zero-measure set of divergent trajectories).

• Convexity for synthesis.

• How to search for ρ ?

0)( >⋅∇ fρ

Does a dynamical system have periodic solutions?How to rule out oscillations?

Page 25: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

Bendixson-Dulac

• Restrict to polynomial (or rationals), use SOS.

• As for Lyapunov, now a fully algorithmic procedure.

Given:22 yxyxy

yx++−−=

=

&

& Propose: cybxa ++=ρ

After optimization: 1,3,321

==−−= cba

− + 3⎛

⎝⎜⎜

⎠⎟⎟ + − − y

13

3 x16

312

2 12

12

3=⋅∇ )( fρ 0>

Page 26: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

x ' = y y ' = - x - y + x 2 + y 2

-3 -2 -1 0 1 2 3

-3

-2

-1

0

1

2

3

x

yConclusion: a certificate of the inexistence of periodic orbits

Page 27: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

Example: Lyapunov stability

• Ubiquitous, fundamental problem

• Algorithmic solution

• Extends to uncertain, hybrid, etc.Given:

yxyxxyx

2632 32

−=−+−=

&

&

Propose:

j

ji

iij yxcyxV ∑

≤+

=4

),(

After optimization: coefficients of V.

A Lyapunov function V, that proves stability.

00

V V fV

= ∇ ⋅ <≥

&

Page 28: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

Conclusion: a certificate of global stability

Page 29: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

Why do we like these methods?

Very powerful!For several problems, best available techniquesIn simplified special cases, reduce to well-known successful methodsReproduce domain-specific resultsVery effective in “well-posed” instancesRich algebraic/geometric structureConvexity guarantees tractabilityEfficient computation

Page 30: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

Traditional view: worst-case over classes of instancesRather, an instance-dependent notion: proof length

Our claim: this makes more sense for systems designed to be robustOur hope: also holds for biology

Complexity

Page 31: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

Things to think about

Correct notion of proof length?Degree? Straight-line programs?

“Smart” proof structures?Proof strategies affect proof length

P-satz proofs are globalFor some problems, branching is better

Decomposition strategies(Re)use of abstractions

Page 32: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

Exploiting structure

Isolate algebraic properties!

Symmetry reduction: invariance under a group Sparsity: Few nonzeros, Newton polytopesIdeal structure: Equalities, quotient ringGraph structure: use the dependency graph to simplify the SDPs

Methods (mostly) commute, can mix and match

Page 33: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

P-satzrelaxations

Exploitstructure

Symmetry reduction

Ideal structure

Sparsity

Graph structureSemidefiniteprograms

Polynomialdescriptions

Page 34: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

A convexity-based scheme has dual interpretationsWant to feedback information from the dual

For instance, attempting to proving emptiness, we may obtain a feasible point in the set.

Page 35: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

ModelingRobustness barriers

Polynomial inequalities

AnalysisReal algebraic geometry

DualitySDP/SOS

Model fragility

Proof complexity

Use dual information to get info on primal fragility

Page 36: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

Numerical issues

SDPs can essentially be solved in polynomial time Implementation: SOSTOOLS (Prajna, Papachristodoulou, P.)Good results with general-purpose solvers. But, we need to do much better:

Reliability, conditioning, stiffnessProblem sizeSpeed

Currently working on customized solvers

Page 37: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

Future challenges

Structure: we know a lot, can we do more?A good algorithmic use of abstractions, modularization, and randomization.Reuse/parametrization of known tautologiesInfinite # of variables? Possible, but not too nice computationally. PSD integral operators, discretizations, etc.Incorporate stochasticsOther kinds of structure to exploit?Algorithmics: alternatives to interior point?Do proofs need domain-specific interpretations?

Page 38: Analysis and synthesis: a complexity perspective · • Convex condition • Efficiently checked using SDP Write: , 0 px zQz Q= T ≥ where z is a vector of monomials. Expanding and

Summary

New mathematical toolsAlgorithmic construction of P-satz relaxationsGeneralization of many earlier schemesVery powerful in practiceDone properly, can fully exploit structureCustomized solvers in the horizon

Lots of applications, many more to come!