survey propagation algorithm elitza maneva uc berkeley joint work with elchanan mossel and martin...

39
Survey Propagation Survey Propagation Algorithm Algorithm Elitza Maneva Elitza Maneva UC Berkeley UC Berkeley Joint work with Elchanan Mossel and Martin Joint work with Elchanan Mossel and Martin Wainwright Wainwright

Upload: lambert-wilkinson

Post on 17-Dec-2015

218 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

Survey Propagation Algorithm Survey Propagation Algorithm

Elitza ManevaElitza ManevaUC BerkeleyUC Berkeley

Joint work with Elchanan Mossel and Martin WainwrightJoint work with Elchanan Mossel and Martin Wainwright

Page 2: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

The PlanThe Plan

• Background:Background:

– Random SAT Random SAT

– Finding solutions by inference on Markov random field (MRF)Finding solutions by inference on Markov random field (MRF)

– Belief propagation algorithm (BP) Belief propagation algorithm (BP) [Pearl `88][Pearl `88]

– Survey propagation alg. (SP) Survey propagation alg. (SP) [Mezard, Parisi, Zecchina `02][Mezard, Parisi, Zecchina `02]

• Survey propagation is a belief propagation algorithmSurvey propagation is a belief propagation algorithm [Maneva, Mossel, Wainwright [Maneva, Mossel, Wainwright

`05]`05]– MRF on partial assignmentsMRF on partial assignments– Relation of the MRF to the structure of the solution space of a Relation of the MRF to the structure of the solution space of a

random instancerandom instance

Page 3: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

Boolean CSPBoolean CSP

• Input: Input: – n Boolean variables xn Boolean variables x11, x, x22, …, x, …, xnn

– m constraintsm constraints

• Question: Question: Find an assignment to the variables, such Find an assignment to the variables, such that all constraints are satisfied?that all constraints are satisfied?

• Applications: Applications: – VerificationVerification– Planning and schedulingPlanning and scheduling– Major theoretical interestMajor theoretical interest

Page 4: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

Examples of Boolean CSPExamples of Boolean CSP

Constraints come from a fixed set of relations.Constraints come from a fixed set of relations.

Examples:Examples:• 2-SAT (x2-SAT (x1 1 x x2 2 ) ) ( x( x11 xx33))• 3-SAT ( x3-SAT ( x11 xx22 x x33 ) ) (x (x22 x x33 x x44))• 3-XOR-SAT ( x3-XOR-SAT ( x11 xx22 x x33) ) (x (x22 xx33 x x44))• 1-in-3-SAT ( x1-in-3-SAT ( x11 xx22 x x33 ) ) (x (x22 x x33 x x44))

Schaefer’s Dichotomy Theorem [1978]:Schaefer’s Dichotomy Theorem [1978]:Every Boolean CSP is either :Every Boolean CSP is either :• in P (e.g. 2-SAT, Horn-SAT, XOR-SAT, etc.) in P (e.g. 2-SAT, Horn-SAT, XOR-SAT, etc.) oror• NP-complete (3-SAT, NAE-3-SAT, etc.).NP-complete (3-SAT, NAE-3-SAT, etc.).

___

_

_

_ _

Page 5: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

Graph representationGraph representation

x1 x2 x3 x4 x5 x6 x7 x8

constraintsconstraints

variablesvariables

Page 6: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

Graph representation of 3-SATGraph representation of 3-SAT

x1 x2 x3 x4 x5 x6 x7 x8

positive literalpositive literal

negative literalnegative literal

( x( x11 xx33 x x55 ) )__ __

Page 7: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

We can find solutions via inferenceWe can find solutions via inference

Suppose the formula is satisfiable.Suppose the formula is satisfiable.

Consider the uniform distribution Consider the uniform distribution

over satisfying assignments.over satisfying assignments.

Simple ClaimSimple Claim: : If we can compute Pr[xIf we can compute Pr[xii=1], then we =1], then we

can find a solution fast.can find a solution fast.

DecimationDecimation: : Assign variables one by one to a value Assign variables one by one to a value that has highest probability. that has highest probability. No backtracking in this talk!No backtracking in this talk!

Page 8: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

Fact: We cannot hope to compute Pr[xi=1]

Heuristics for guessing the best variable to assign:

1. Pure Literal Rule (PLR): Choose a variable that appears always positive / always negative.

2. Myopic Rule: Choose a variable based on number of positive and negative occurrences, and density of 2-clause and 3-clauses.

3. Belief Propagation: Estimate Pr[xi=1] by belief propagation and choose variable with largest estimated bias.

4. Survey Propagation: Estimate the probability that a variable is frozen in a cluster of solutions, and choose the variable with maximum probability of being frozen.

Page 9: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

PLRPLR

WalkSATWalkSAT

Belief propagationBelief propagation

Survey propagationSurvey propagation Not Not satisfiablesatisfiable

SatisfiableSatisfiable

SatisfiableSatisfiable Not Not satisfiablesatisfiable

Random 3-SATRandom 3-SAT

00 1.631.63 3.953.953.523.52 4.274.27 4.514.51

MyopicMyopic

x1 x2 x3 x4 x5 x6 x7 x8 n

m = n

Page 10: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

Computing Pr[xComputing Pr[x11=0] on a tree formula (3-SAT)=0] on a tree formula (3-SAT)

x1

108108192192

1111

1111

111111

111111

1111

1111

3344

4433

3344

12121212

36364848

#Solutions with 0#Solutions with 0#Solutions with 1#Solutions with 1

#Solns with 0#Solns with 0#Solns with 1#Solns with 1

Page 11: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

Vectors can be normalizedVectors can be normalized

x1

.36.36

.64.64

.5.5

.5.5

.43.43

.57.57

.5.5

.5.5

.5.5

.5.5 .5.5.5.5

.5.5

.5.5

.5.5

.5.5.5.5.5.5

.5.5

.5.5

.43.43

.57.57

.43.43

.57.57

.57.57

.43.43

Page 12: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

… … and thought of as messagesand thought of as messagesx1

Vectors can be normalizedVectors can be normalized

Page 13: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

What if the graph is not a tree?What if the graph is not a tree?

Belief propagationBelief propagation

Page 14: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

Belief propagationBelief propagation

x11

x5

x1

x4

x10

x6

x9 x8 x7

x3

x2

Pr[xPr[x11, …, x, …, xnn] ] ΠΠaa aa(x(xN(N(aa))) )

(x(x11, x, x22 , x , x33))

Page 15: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

Belief Propagation [Pearl ’88]Belief Propagation [Pearl ’88]

x1 x2 x3 x4 x5 x6 x7 nn

mm

Given:Given: Pr[xPr[x1 1 …x…x77]] aa(x(x11, x, x33) ) bb(x(x11, x, x22) ) cc(x(x11, x, x44) ) ……

Goal: Goal: Compute Pr[xCompute Pr[x11] (i.e. ] (i.e. marginalmarginal))

Message passing rules:M i c (xi) = Π M b i (xi)

M c i (xi) = Σ c(x N(c) ) Π M j c (xj)

Estimated marginals:i(xi) = Π M c i (xi)

xj: j N(c)\i j N(c)\i

cN(i)

bN(i)/c

i.e. Markov Random Field (MRF)i.e. Markov Random Field (MRF)

Belief propagation is a dynamic programming algorithm.It is exact only when the recurrence relation holds, i.e.:1. if the graph is a tree.2. if the graph behaves like a tree: large cycles

Page 16: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

Applications of belief propagationApplications of belief propagation

• Statistical learning theoryStatistical learning theory• VisionVision• Error-correcting codes (Turbo, LDPC, LT)Error-correcting codes (Turbo, LDPC, LT)• Constraint satisfactionConstraint satisfaction• Lossy data-compressionLossy data-compression• Computational biologyComputational biology• Sensor networksSensor networks• Nash equilibriaNash equilibria

Page 17: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

Survey propagation algorithmSurvey propagation algorithm

• Designed by Designed by Mezard, Parisi, Zecchina, 2002

• Approximation methods of statistical physics:Approximation methods of statistical physics:– Parisi’s 1-step Replica Symmetry BreakingParisi’s 1-step Replica Symmetry Breaking– cavity methodcavity method

• Instances with 10Instances with 1066 variables and 4.25 variables and 4.25 10 1066 clauses are clauses are solved within a few minutes.solved within a few minutes.

• Message-passing algorithm (like belief propagation)Message-passing algorithm (like belief propagation)

Page 18: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

Survey propagationSurvey propagation

.12.12

.81.81

.07.07

0011

Page 19: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

Survey propagationSurvey propagation

Mci= ————————

Muic = (1- (1- Mbi )) (1-Mbi)

Msic = (1- (1- Mbi )) (1-Mbi)

Mic = (1- Mbi )

Mujc

Muj c+Ms

j c+Mjc

jN(c)\i

b Nsa (i)b Nu

a (i)

b Nsc (i) b Nu

c (i)

b N(i)\c

x1 x2 x3 x4 x5 x6 x7 x8

You have to satisfy me

with prob. 60%

I’m 0 with prob 10%,1 with prob 70%,

whichever (i.e. ) 20%

Page 20: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

00 1.61.6 3.93.93.53.5 4.24.2 4.54.5

PLRPLR

Myopic Unit ClauseMyopic Unit Clause

WalkSATWalkSAT

Belief propagationBelief propagation

Survey propagationSurvey propagation

Survey propagationSurvey propagation

Single cluster of solutionsSingle cluster of solutions

Mu

ltiple

Mu

ltiple

clusters

clusters

No solutionsNo solutions

x1 x2 x3 x4 x5 x6 x7 x8

Page 21: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

Clustering of solutionsClustering of solutions

{0, 1}{0, 1}55

11

0011100111

010010

Page 22: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

00 1.61.6 4.14.13.53.5 4.24.2 4.54.5

Difficult problems are in Difficult problems are in the multiple clusters phasethe multiple clusters phase

Single cluster of solutionsSingle cluster of solutions

Mu

ltiple

Mu

ltiple

clusters

clusters No solutionsNo solutions

Page 23: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

Question:Question: Can survey propagation be interpreted as Can survey propagation be interpreted as computing the marginals of an MRF on {0, 1, computing the marginals of an MRF on {0, 1, }}nn ? ?

[ Maneva, Mossel, Wainwright ’05 ][ Maneva, Mossel, Wainwright ’05 ]

Theorem:Theorem: Survey propagation is Survey propagation is equivalentequivalent to to belief propagation on a non-uniform distribution belief propagation on a non-uniform distribution over such partialover such partial assignments. assignments.

Plan:Plan:• Definition of the distribution• Expressing the distribution as MRF (in order to apply BP)• Combinatorial properties of the distribution

Page 24: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

0101111

4

23

nn(())

3. 3. A family of belief propagation algorithms:A family of belief propagation algorithms:00 11

Vanilla BPVanilla BP SPSP

Pr[Pr[] ] (1- (1- ))nn(()) nnoo(())

Definition of the new distributionDefinition of the new distribution

FormulaFormula

11111111

111111 111111

1111 1111

11

1111

11 11 11

1010101001110111

011011 010010 101000

Partial assignmentsPartial assignments

2. 2. Weight of partial assignments:Weight of partial assignments:

nnoo(())

1. 1. Includes all assignments without contradictions or implicationsIncludes all assignments without contradictions or implications

Page 25: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

The distribution is an MRFThe distribution is an MRF

• Every variable is either Every variable is either , implied or free, implied or free– nn(() is the number of ) is the number of – nnoo(() is the number of free) is the number of free

• Variables know whether they are implied or free based on the Variables know whether they are implied or free based on the set of clauses that constrain them. So extend the domain:set of clauses that constrain them. So extend the domain:

XXii {0, 1, {0, 1, } } { subsets of clauses that contain x { subsets of clauses that contain x ii } }

• In the new domain we can express the distribution in factorized In the new domain we can express the distribution in factorized form and apply belief propagation.form and apply belief propagation.

Pr[Pr[] ] (1- (1- ))nn(()) nnoo(())

Page 26: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

What is the relation of the distribution What is the relation of the distribution to clustering?to clustering?

11

0011100111

010010

Page 27: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

001122334455

nn

# unassigned# unassigned varsvars

Space of partial assignmentsSpace of partial assignments

110001110001

1100

Page 28: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

Partial assignmentsPartial assignments{0, 1}{0, 1}nn assignments assignments

01011100

101011110110101101

# st

ars

# st

ars

corecore

corecore

=0=0

=1=1

Pr[Pr[] ] (1- (1- ))nn(()) nnoo(())

00 11

Vanilla BPVanilla BP SPSP

This is the correct picture for 9-SAT and above.This is the correct picture for 9-SAT and above.[Achlioptas, Ricci-Tersenghi ‘06]

Page 29: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

Clustering for k-SATClustering for k-SAT

What is known?What is known?2-SAT: a single cluster 2-SAT: a single cluster

3-SAT to 7-SAT: not known3-SAT to 7-SAT: not known

8-SAT : exponential number of clusters8-SAT : exponential number of clusters

9-SAT and above: exponential number of clusters and 9-SAT and above: exponential number of clusters and they have non-trivial cores they have non-trivial cores

[Achlioptas, Ricci-Tersenghi `06][Achlioptas, Ricci-Tersenghi `06]

[Mezard, Mora, Zecchina `05] [Mezard, Mora, Zecchina `05]

Page 30: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

Experiments to find cores for 3-SATExperiments to find cores for 3-SAT

0

0

01

1

1

0

0

Page 31: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

Experiments to find cores for 3-SATExperiments to find cores for 3-SAT

0

0

01

1

1

0

0

Page 32: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

Experiments to find cores for 3-SATExperiments to find cores for 3-SAT

0

0

01

1

0

0

Page 33: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

Experiments to find cores for 3-SATExperiments to find cores for 3-SAT

0

0

01

1

0

Page 34: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

Experiments to find cores for 3-SATExperiments to find cores for 3-SAT

0

0

01

0

Page 35: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

Experiments to find cores for 3-SATExperiments to find cores for 3-SAT

0

0

01

Page 36: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

Peeling Experiment for 3-SAT, Peeling Experiment for 3-SAT, n n =10=1055

0

10000

20000

30000

40000

50000

60000

70000

80000

90000

100000

0 20000 40000 60000 80000 100000

# stars

# u

nc

on

str

ain

ed

2

2.5

3

3.5

4

4.1

4.2

Page 37: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

Clusters and partial assignmentsClusters and partial assignments

Partial assignmentsPartial assignments{0, 1}{0, 1}nn assignments assignments

# st

ars

# st

ars

0110101101

01011100

101011110110101101

Page 38: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

Unresolved questionsUnresolved questions

• Why do the marginals of this distribution lead to Why do the marginals of this distribution lead to an algorithm for finding solutions?an algorithm for finding solutions?

• Why does BP for this distribution converge, Why does BP for this distribution converge, while BP on the uniform over satisfying while BP on the uniform over satisfying assignments does not (in the clustered phase)?assignments does not (in the clustered phase)?

Page 39: Survey Propagation Algorithm Elitza Maneva UC Berkeley Joint work with Elchanan Mossel and Martin Wainwright

Thank youThank you