1 / 22

Integrating Systematic and Local Search: A New Strategy for MaxSAT

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. Combinatorial Search Paradigms. Generally believed to have complementary strengths

nowles
Télécharger la présentation

Integrating Systematic and Local Search: A New Strategy for MaxSAT

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. 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 Generally believed to have complementary strengths Would like to harness the power of bothparadigms through a hybrid method! (especially with dual-core / multi-core hardware) Context: Constraint Satisfaction Problems (CSPs), Boolean Satisfiability (SAT) • Local search • Typically focused random walk • A bunch of bells and whistles • Great on under-constrainedinstances, and more • Systematic search • Typically branch-and-bound • A bunch of bells and whistles • Great on highly structuredinstances Other, less mainstream, paradigms too:message passing, knowledge compilation, streamlining, … 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) Ashish Sabharwal (joint work with Kroc, Gomes, Selman)

  4. 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 SatCls0 0 3 0 1 4 1 0 4 1 1 5 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] 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 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)

  7. Systematic Search: 2 Key Features Unfortunately, unit propagation and clause learning arenot 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 solverse.g., verification instance cmu-bmc-barrel6.cnf: – best MaxSAT solvers need 20-30 minutes – MiniSat needs ~2 seconds Ashish Sabharwal (joint work with Kroc, Gomes, Selman)

  8. 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? 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 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)

  10. Systematic Local Search a=1 b=? d=? e=? 0 1 c=0 0 1 Searchhere 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 = 0x11112222; // any unique IDint 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 Note: “loose” coupling; Walksat could continue exploring the c=1 sub-space 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 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)

  12. Experimental Evaluation

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

  14. Experimental Results Most unsatinstances 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 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)

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

  16. 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? 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? 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: 1400 unsat clauses MiniWalk:2 unsat clauses(spends most time near 35,000 unsat. Clauses) Ashish Sabharwal (joint work with Kroc, Gomes, Selman)

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

  21. A Note on Alternatives • Would more time have helpedother 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 stabilizeat highly sub-optimal value Not at all within the reach ofsystematic MaxSAT solvers 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 Ashish Sabharwal (joint work with Kroc, Gomes, Selman)

More Related