1 / 49

Survey Propagation: an Algorithm for Satisfiability

Survey Propagation: an Algorithm for Satisfiability. A. Braunstein, M. Mezard, R. Zecchina. Hannaneh Hajishirzi : hajishir@uiuc.edu. Content. SAT Problem Warning Passing Survey Propagation Belief Propagation. SAT Problem. CNF Clause a = (z i1  z i2  …  z ik )

kailey
Download Presentation

Survey Propagation: an Algorithm for Satisfiability

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Survey Propagation: an Algorithm for Satisfiability A. Braunstein, M. Mezard, R. Zecchina Hannaneh Hajishirzi : hajishir@uiuc.edu

  2. Content • SAT Problem • Warning Passing • Survey Propagation • Belief Propagation

  3. SAT Problem • CNF • Clause a = (zi1 zi2 … zik) And: Jair = 1 if zir= ~xir Jair = -1 if zir = xir

  4. Factor Graph • Bipartite Graph • Variables  Variable nodes • Clauses  Function nodes Edge(a - i): variable “i” appears in clause “a”

  5. Variable Node Function Node

  6. Some Notions • V(i): neighbors of variable i • V+(i): clauses that i appears un-negated • V- (i): clauses that i appears negated • V(i)\b: set V(i) without a node b

  7. Warning Passing j hja uai a = (i  j  k  l) k a i hka hla l uai can be a warning

  8. Formulae hja : Cavity Field uai : Cavity Bias [1]

  9. WP algorithm • T = 0: Randomly initialize cavity bias(uai ) • For t = 1 to t = tmax 2.1 Update all uai(t) sequentially. (update method) 2.2 If uai(t) = uai(t-1) for all edges, u*ai = uai(t). Goto 3. • If t = tmax Return UN-CONVERGED. else output cavity biases u*ai.

  10. Update Method • Update(uai ) • For every j  V(a) \ i, compute hja • Using hja, compute uai

  11. Convergence • Local Field: Hi • Contradiction Number: ci

  12. b a 1 1 0 0 1 2 0 0 c 0 0 3 d

  13. b a 1 1 1 2 1 0 0 c 0 0 0 3 d

  14. b a 1 1 1 2 -1 0 0 c 0 0 0 3 d

  15. b a 1 1 1 2 1 -1 0 0 c 0 1 1 0 3 d

  16. WP on Tree • If Factor graph: Tree • WP converges •  i: ci > 0 UNSAT • Otherwise: SAT

  17. 1. Remove edge a-i2. Level of ‘a’ = 0u = 13. Level of ‘a’ = 1 u = 04. Level of ‘a’ = r can be determined from u’s at level r-2

  18. Solving SAT with WP 1. Run WP. 2. Check if there are conflicts. 3. Fix all constrained variables Clean the graph. 4. Choose randomly an un-biased variable,Fix it to one value (0, 1), Clean the graph. 5. Run again WP on the new instance.

  19. Example x1 = 1, x2 = 0 x3 = 1, x4 = 1 x7 {0, 1}

  20. Example x1 = 1, x2 = 0 x3 = 1, x4 = 1 x7 {0, 1} x5 = 1 x6 = 1 1 1 [3]

  21. Clustering • Random SAT with M =  N •  < d = 3.921 Set of all satisfying assignmentsis connected (1 cluster) Local Search

  22. Clustering • d <  < c = 4.267 (hard-SAT region) - Set of all satisfying assignmentsbecomes divided into subsets (clusters) - Proliferation of meta-stable clusters Difficult for Local Search Methods

  23. Clustering •  = c Number of Clusters = 0 •  > c Almost unsatisfiable  Survey Propagation tries to solve SAT problem in hard-SAT region.

  24. Definition of Surveys • Survey uai uai in cluster l Ncl :Number of clusters (x, y) = 1 if x = y,otherwise = 0

  25. Surveys u  {0, 1} Binomial Distribution For any set of cavity biases: Q(u, v, w,…): Joint Probability

  26. [1]

  27. Jaj = 1: [2] Jaj = -1:V+(i) & V-(i) exchange

  28. Factorized Form Normalization Factor Constraint All values for all ubj

  29. Compute C • Class u: ubj = 1, b  Vua(j) 2. Class s: ubj = 1, b  Vsa(j)

  30. Compute C • 3. Class 0: ubj = 0, b  V(j)

  31. Closed Formula

  32. SP Algorithm 1. T = 0: Randomly initialize cavity bias(ai ) 2. For t = 1 to t = tmax 2.1 Update all ai(t) sequentially. (update method) 2.2 If |ai(t) - ai(t-1)| < for all edges, *ai = ai(t). Goto 3. 3. If t = tmax Return UN-CONVERGED. else output cavity biases *ai.

  33. Discussion on SP • If factor-graph = tree, the same as WP • No proof of convergence • Experimental: converges where WP doesn’t • Useful for large N

  34. Find SAT Assignment • Simple Algorithm (at most 2N SP calls) • Fix one variable • Run SP for size N-1 • If sub-problem is SAT keep the assignment • Otherwise change the value • Drawbacks • Imprecision of determining if problem is Satisfiable or not • Not using information from “surveys”

  35. Properties of Variables Fraction of clusters that xj is positive:

  36. Properties of Variables

  37. Categories of Variables • Under-constrained: Fix it: Affects internal structure of clusters • Biased: Fix it: Few clusters are eliminated • Balanced: Fix it: Enormous effect or and

  38. Search Algorithm 1. Run SP 2. Evaluate all Wi+,Wi-,Wi0. 3. Simplify & Search 3.1 If (exists  <> 0) , fix with largest |Wi+ - Wi-| 3.2 If (all  = 0) , Run WalkSAT 3.3 SP doesn’t converge, “Probably UNSAT” 4. If Done, output “SAT” If no contradiction  goto 1

  39. BP in SAT Problem • ia(xi): variable takes xi, in the absence of clause “a” • ai(xi): Clause “a” becomes satisfied, given value for xi For all values of variables xj 1 if X={xi} satisfies “a”Otherwise 0

  40. BP in SAT Problem • ia(xi): Probability that variable takes xi and violates clause “a” • ai: Probability that all variables in “a” except “i”, violate “a” i appears un-negated

  41. BP in SAT Problem Probability that xj = 1

  42. Example  1 = 1, 2 = 0  3 = 1, 4 = 1  7 =3/4 ai ia  5 = 1/2  6 = 3/4 [3]

  43. Null Message • Null message onto a variable means: • Receives no warning • Under-constrained • 3 states for a variable • 0, 1, * (joker state)

  44. New BP • No warning from Vua(i) & Vsa(i) • No warning from Vsa(i), but at least 1 from Vua(i)

  45. New BP • No warning from Vua(i), but at least 1 from Vsa(i) • At least 1 warning from Vsa(i), and 1 from Vua(i) New Formula:

  46. Loopy Factor Graph 2 possible solutions for WP,2 generalized assignments (1, 1, *), (0, 0, 1) In SP:a1 = b2 = x a2 = b1= yc1 = c2= 0c3= (1-x)2y2 / (1-xy)2

  47. When is SP useful? • Maybe in small cases WP is better • Useful in difficult cases for WP • When messages are sent according to different clusters = • When graph is not well connected SP performs better

  48. Conclusion • Message Passing Methods for SAT • Advantage of SP • More theoretical & empirical work needed

More Related