relaxed dpll search for maxsat (short paper) lukas kroc, ashish sabharwal, bart selman cornell...
TRANSCRIPT
Relaxed DPLL Search for MaxSAT(short paper)
Lukas Kroc, Ashish Sabharwal, Bart Selman
Cornell University
SAT-09 Conference
Swansea, U.K.
July 3, 2009
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])
Ashish Sabharwal 2
x y SatCls0 0 30 1 41 0 41 1 5
yx¬y¬xy¬x¬yxyx F
SAT 2009
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
SAT 2009 Ashish Sabharwal 3
[credit: reactive-search.org]
Systematic Search: 2 Key Features
The DPLL process, and extensions, for SAT
Search guided by Heuristics Clauses falsified or made “critical” during search
Efficiency relies heavily on the ability to avoid local inconsistencies
• 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
SAT 2009 Ashish Sabharwal 4
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
SAT 2009 Ashish Sabharwal 5
The Question(s)
SAT 2009 Ashish Sabharwal 6
Can state-of-the-art systematic SAT techniques be used as (incomplete) effective heuristics for MaxSAT?
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?
1. Perhaps as a guidance mechanism for local search?
2. To zoom down to near-satisfying assignments?
Yes! [upcoming paper at IJCAI-09]Effort driven by local search, guided by DPLL running in parallel
Yes! [this talk]Effort driven by “relaxed” DPLL search, followed by local search if needed
Proposed Solver: RelaxedMinisat + Walksat
Context: Suited to MaxSAT instances non-trivial to prove unsatisfiable
(otherwise method falls back to pure local search) Instances with “near-solutions” (≤ 200 or so violated clauses)
Main idea:1. Use “relaxed” DPLL (w/ CL) as the main MaxSAT search engine
Rexation = tolerate “k” conflicts before backtracking
2. Report truth assignment with at most k conflicts on a branch
3. Improve it with local search, if needed
“Theorem”: sound (even with unit prop., clause learning, etc., solution found by RelaxedMinisat violates at most k clauses) but not complete
SAT 2009 Ashish Sabharwal 7
Proposed Solver: RelaxedMinisat + Walksat
Solver “instantiation”:― Minisat for base DPLL search; Walksat for local search― #conflicts to tolerate (small) fixed through quick binary search― Rapid restarts helpful (every 100 backtracks)
Key features: Very easy to code: a few lines on top of Minisat; no change to
Walksat
Running time very close to that of ‘pure’ Minisat provides “bottleneck constraints” in the time comparable to prove unsatisfiability
Reveals a surprising feature of industrial unsat. instances not detected by any other current MaxSAT solver
SAT 2009 Ashish Sabharwal 8
Experimental Evaluation
Results Summary
Simple idea; 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, and faster:
Often finds a solution with “very few” violated clauses within seconds – best systematic methods time out after one hour – best local search suggests 100’s to 1000’s of violated clauses
SAT 2009 Ashish Sabharwal 10
Experimental Setup
Comparison against:
Systematic solvers with best performance in MaxSAT Evaluation 2007(maxsatz, msuf)
Local search solvers from UBCSAT with best performance on our suite(saps, adaptg2wsat+p)
Hybrid technique to be presented at IJCAI-09(MiniWalk)
[Time limit = 1 hour]
SAT 2009 Ashish Sabharwal 11
Experimental Results
Ashish Sabharwal 12SAT 2009 Timelimit: 1 hour
Surprising observation: Most unsat instances from
SAT RACE ‘08 competition have assignments
with only ONE unsatisfied clause!
Surprising observation: Most unsat instances from
SAT RACE ‘08 competition have assignments
with only ONE unsatisfied clause!
Experimental Results: continued
Ashish Sabharwal 13SAT 2009 Timelimit: 1 hour
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)
RelaxedMinisat 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?
SAT 2009 Ashish Sabharwal 14
A Note on Alternatives
Would more time have helped?
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
SAT 2009 Ashish Sabharwal 15
Local search appears to stabilizeat highly sub-optimal value
Not at all within the reach ofsystematic MaxSAT solvers
Summary and Future Directions
Simple, low-overhead strategy yields promising, and surprising, results! DPLL-based systematic SAT solvers can provide effective guidance for
MaxSAT search Good at recognizing “near-solutions”, especially on interesting
industrial instances
Creation of MaxSAT benchmarks that are hard to prove unsatisfiable
Do these single “bottleneck constraints” give any useful information? Luckily, do not appear to be “goal constraints”; usually more interesting Different bottleneck constraints for different random seeds
What does this say about our SAT encodings? Brittle encodings?
Dynamic parameter tuning and other optimizations [cf. Mate Soos for crypto-specific optimizations]
Weighted MaxSAT
SAT 2009 Ashish Sabharwal 16