Presentation is loading. Please wait.

Presentation is loading. Please wait.

Integrating Systematic and Local Search: A New Strategy for MaxSAT

Similar presentations


Presentation on theme: "Integrating Systematic and Local Search: A New Strategy for MaxSAT"— Presentation transcript:

1 Integrating Systematic and Local Search: A New Strategy for MaxSAT
Lukas Kroc, Ashish Sabharwal, Carla P. Gomes, Bart Selman Cornell University IJCAI 2009, Pasadena, CA July 17, 2009

2 Combinatorial Search Paradigms
Context: Constraint Satisfaction Problems (CSPs), Boolean Satisfiability (SAT) Systematic search Typically branch-and-bound A bunch of bells and whistles Great on highly structured instances Local search Typically focused random walk A bunch of bells and whistles Great on under-constrained instances, and more Other, less mainstream, paradigms too: message passing, knowledge compilation, streamlining, … Generally believed to have complementary strengths Would like to harness the power of both paradigms through a hybrid method! (especially with dual-core / multi-core hardware) IJCAI 2009 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)

3 Integrating Systematic + Local Search
Several attempts E.g., for SAT: [Mazure-Sais-Gregoire ’98, Gregoire-Mazure-Piette ’07, Hamadi-Jabbour-Sais ’08, etc.] More work in various contexts; arguably limited success so far Challenges: What kind of information to pass between the two solvers? When and how to exchange information efficiently? Should one process wait for the other? Dovetail? Run in parallel and synchronize? How to effectively use exchanged information? Finding the right balance holds the key! This work: continuously exchange light-weight information (one-way) IJCAI 2009 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)

4 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)
SAT and MaxSAT SAT: Given a Boolean formula such as find, if possible, a truth assignment such that F is satisfied. MaxSAT: Given a Boolean formula, find a truth assignment that satisfies as many constraints as possible Many applications in combinatorial and probabilistic reasoning (e.g., critical failure paths; as a tool within Markov Logic Networks) Traditional approaches for MaxSAT: Systematic search: complete but limited scalability (e.g., MiniMaxSat [Heras et al. ’07], Msuf [Marques-Silva et al.’08], MaxSatz [Li et al.’07]) Local search: scalable but sometimes far from optimum (e.g., Walksat [Selman-Kautz-Cohen ’96], GLS [Mills et al. ’00], SAPS [Hutter-Tompkins-Hoos ’02-03], Adaptg2wsat+p [Li-Wei-Zhang ’07]) x y SatCls 0 0 3 0 1 4 1 0 4 1 1 5 IJCAI 2009 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)

5 Local Search: “Natural” for MaxSAT?
Local search methods walk on a landscape composed of truth assignments Height = number of unsatisfied constraints At every point in time, have a (sub-optimal) MaxSAT solution! “anytime solution” to MaxSAT Bottleneck: local minima, just as in local search for SAT [credit: reactive-search.org] IJCAI 2009 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)

6 Systematic Search: 2 Key Features
The DPLL process, and extensions, for SAT Search guided by “Well-informed” heuristics Clauses falsified or made “critical” during search Efficiency relies heavily on the ability to avoid local inconsistencies and prune the search space Unit propagation: if a=0, b=0, and have clause (a or b or c), better force c=1 right away Clause learning: if a search branch reaches a contradiction, learn why this happened and never let this happen again IJCAI 2009 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)

7 Systematic Search: 2 Key Features
Unfortunately, unit propagation and clause learning are not suitable for DPLL-based MaxSAT solvers For MaxSAT, it may be best to ignore the current local inconsistency and try to satisfy the rest of the formula as much as you can Systematic DPLL-style MaxSAT solvers necessarily do not employ traditional unit propagation or clause learning [note: may use more sophisticated resolution-based inference] Cost? Systematic MaxSAT solvers are significantly less scalable than systematic SAT solvers e.g., verification instance cmu-bmc-barrel6.cnf: – best MaxSAT solvers need minutes – MiniSat needs ~2 seconds IJCAI 2009 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)

8 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)
The Question(s) Can state-of-the-art systematic SAT techniques be used as (incomplete) effective heuristics for MaxSAT? Perhaps as a guidance mechanism for local search? To zoom down to near-satisfying assignments? Yes! [this talk, also at IJCAI-09] Effort driven by local search, guided by DPLL running in parallel Yes! [recently presented at SAT-09] Effort driven by “relaxed” DPLL search, followed by local search if needed Aside: What do “best possible” near-solutions of unsatisfiable industrial SAT instances (~100K variables, 100K-1M clauses) look like? 1000’s of unsatisfied clauses or just a few? IJCAI 2009 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)

9 Contribution: Hybrid Solver MiniWalk
Context: MaxSAT instances non-trivial to prove unsatisfiable Otherwise method falls back to pure local search Main idea: Use local search as the main MaxSAT search method “Loosely” couple it with systematic search for guidance Key features: Both solvers run in parallel (no one “waits” for the other to finish) Shared memory to continuously communicate very little information – a single partial truth assignment Ideal for multi-core processors Very easy to code: just a few lines on top of Walksat and Minisat IJCAI 2009 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)

10 The Hybrid Solver: MiniWalk
Systematic (Minisat) and local search (Walksat) run in parallel, using a shared memory to continuously exchange variables fixed by Minisat Key hybridization constraint: Local search not allowed to flip variables against Minisat’s current variable setting “Gory details” of the implementation: // declare shared memory #include <sys/shm.h> int *sharedMem = NULL; long shmKey = 0x ; // any unique ID int shmId = shmget (shmKey, \ sizeof(int) * (nVars+1), IPC_CREAT|0600);; sharedMem = (int*) shmat(shmId, NULL, 0); // within Walksat: check against sharedMem // before any flip // within Minisat: write to sharedMem // when any variable is (un)assigned a value Systematic c=0 a=1 1 Search here Local Search b=? d=? e=? Shared Memory a b c d e 1 - Note: “loose” coupling; Walksat could continue exploring the c=1 sub-space IJCAI 2009 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)

11 The Hybrid Solver: MiniWalk
Results: Surprisingly good performance in practice (on instances non-trivial to prove unsatisfiable) Tested on all 52 unsat. industrial instances from SAT Race-08 (more on this later) Substantially better quality solutions, often within seconds: MiniWalk often finds a solution with “very few” unsatisfied clauses – best systematic methods time out – pure local search suggests 100’s or 1000’s of unsatisfied clauses Insights: New kind of search behavior than pure local search Some correlation with long backtracks and restarts of the DPLL part IJCAI 2009 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)

12 Experimental Evaluation

13 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)
Experimental Setup Comparison against: Systematic MaxSAT solvers with best performance in MaxSAT Evaluation (maxsatz, msuf) Local search MaxSAT solvers from UBCSAT with best performance on our suite (saps, adaptg2wsat+p) [Time limit = 1 hour] IJCAI 2009 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)

14 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)
Experimental Results Most unsat instances from SAT Race 2008 competition have assignments with only ONE unsatisfied clause! (not detected by any other solver) [a modified version, recently presented at SAT-09, finds such assignments for 51 out of all 52 instances] Time limit: 1 hour IJCAI 2009 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)

15 Experimental Results, contd.
IJCAI 2009 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)

16 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)
A Note on Benchmarks Industrial SAT Race instances clearly have interest, but… would have liked to compare on “standard” MaxSAT benchmarks from MaxSAT competitions, etc. “Unfortunately,” they are too easy for current SAT solvers (proved unsatisfiable in a couple of seconds) MiniWalk falls back to pure Walksat Is this really a true reflection of MaxSAT problem domains? Or a chicken-and-egg problem? Perhaps there aren’t hard-to-prove-unsatisfiable MaxSAT benchmarks because no current MaxSAT solvers can handle them? IJCAI 2009 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)

17 A Note on Design Choices
Which DPLL and local search solvers to use? Relative speed and freedom of the two solvers play a crucial role Minisat + Walksat combination worked the best Artificially slowing down Minisat can sometimes help Rsat: perhaps too fast? “branch memory” adds too much focus? Saps / Adaptg2wsat+p: too focused to let DPLL guide them? Why not an exact MaxSAT solver rather than Minisat? Too slow; does not provide enough variation over time Restart rate, Walksat parameters, etc.: used defaults Perhaps a role for automatic parameter tuning? IJCAI 2009 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)

18 MiniWalk: Further Insights

19 A Different Search Behavior
Local search: gradual descent to “good” solution; relatively low noise MiniWalk: stays high but makes very steep dives Best alternative: unsat clauses MiniWalk: 2 unsat clauses (spends most time near 35,000 unsat. Clauses) IJCAI 2009 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)

20 Correlation with Backtracks / Restarts
steep dives by MiniWalk significant change in DPLL depth Loose correlation; would like to understand better! Note: plots overlaid to visually highlight x-axis correlation; curves have different “units” on y axis IJCAI 2009 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)

21 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)
A Note on Alternatives Would more time have helped other solvers? In retrospect, how about SAT re-encoding allowing one violated clause? Create F’: satisfiable iff F has a near-solution violating 1 clause Need one new variable per clause of F  100K+ additional vars Need a way to count violated clauses naïve way: (100K+)2 clauses cascading count: additional variables, limited propagation  doesn’t scale Local search appears to stabilize at highly sub-optimal value Not at all within the reach of systematic MaxSAT solvers IJCAI 2009 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)

22 Summary and Future Directions
DPLL-based systematic SAT solvers can provide effective guidance for MaxSAT search Good at recognizing “deep near-solutions”, helping put local search on the right track for MaxSAT Creation of MaxSAT benchmarks that admit “near-solutions” and/or are hard to prove unsatisfiable? Do these single “bottleneck constraints” give any useful info.? Note: different random seeds often yield different bottleneck constraints Effective ways to exploit information flow in the other direction? (Walksat to Minisat) Reproducibility of hybrid runs Automatic parameter tuning IJCAI 2009 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)


Download ppt "Integrating Systematic and Local Search: A New Strategy for MaxSAT"

Similar presentations


Ads by Google