survey propagation algorithm elitza maneva uc berkeley joint work with elchanan mossel and martin...
TRANSCRIPT
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
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
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
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.).
___
_
_
_ _
Graph representationGraph representation
x1 x2 x3 x4 x5 x6 x7 x8
constraintsconstraints
variablesvariables
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 ) )__ __
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!
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.
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
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
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
… … and thought of as messagesand thought of as messagesx1
Vectors can be normalizedVectors can be normalized
What if the graph is not a tree?What if the graph is not a tree?
Belief propagationBelief propagation
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))
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
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
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)
Survey propagationSurvey propagation
.12.12
.81.81
.07.07
0011
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%
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
Clustering of solutionsClustering of solutions
{0, 1}{0, 1}55
11
0011100111
010010
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
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
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
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(())
What is the relation of the distribution What is the relation of the distribution to clustering?to clustering?
11
0011100111
010010
001122334455
nn
# unassigned# unassigned varsvars
Space of partial assignmentsSpace of partial assignments
110001110001
1100
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]
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]
Experiments to find cores for 3-SATExperiments to find cores for 3-SAT
0
0
01
1
1
0
0
Experiments to find cores for 3-SATExperiments to find cores for 3-SAT
0
0
01
1
1
0
0
Experiments to find cores for 3-SATExperiments to find cores for 3-SAT
0
0
01
1
0
0
Experiments to find cores for 3-SATExperiments to find cores for 3-SAT
0
0
01
1
0
Experiments to find cores for 3-SATExperiments to find cores for 3-SAT
0
0
01
0
Experiments to find cores for 3-SATExperiments to find cores for 3-SAT
0
0
01
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
Clusters and partial assignmentsClusters and partial assignments
Partial assignmentsPartial assignments{0, 1}{0, 1}nn assignments assignments
# st
ars
# st
ars
0110101101
01011100
101011110110101101
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)?
Thank youThank you