Title: Understanding the Power of Clause Learning
1Understanding the Power ofClause Learning
- Ashish Sabharwal, Paul Beame, Henry Kautz
- University of Washington, Seattle
- IJCAI Conference Aug 14, 2003
2SAT The Satisfiability Problem
- Given a CNF formula F,
- e.g. F (a ? b) ? (?a ? c) ? ?a
- determine if F has a satisfying assignment
3SAT Solver DPLL Algorithm
- Best complete CNF (un)satisfiability algorithms
in - practice are extensions of the DPLL algorithm
Davis-Putnam 60 - Davis-Logeman-Loveland 62
- Recursive backtrack search
- Search space pruning based on falsified clauses
4DPLL Algorithm
DPLL(F) // Perform unit propagation while
exists unit clause (y) ? F F Fy if F is
empty, report satisfiable and halt if F
contains the empty clause L, return else choose
a literal x DPLL(Fx) DPLL(F?x)
Remove all clauses containing y Shrink all
clauses containing ?y
5Extending DPLL Clause Learning
When backtracking in DPLL, add new clauses
corresponding to causes of failure of the
search EBL Kleer-Williams 87, Stallman-Sussman
77, Genesereth 84, Davis 84 CL
Bayardo-Schrag 97, MarquesSilva-Sakallah 96,
Zhang 97, Moskewicz et al. 01, Zhang et al.
01
- Added conflict clauses
- Capture reasons of conflicts
- Obtained via unit propagations from known ones
- Reduce future search by producing conflicts sooner
6Conflict Graphs
Known Clauses (p ? q ? a) (? a ? ? b ? ? t) (t ?
?x1) (t ? ?x2) (t ? ?x3) (x1 ? x2 ? x3 ? y) (x2 ?
?y)
Current decisions p false q false b true
7Restarts
- Clause Learning (CL) algorithms can be restarted
at any point Baptista-Silva 00 - Unset all variables and start over
- But retain all clauses learned so far
- Avoids getting stuck in one part of the search
space - Evidently adds power to CL
8CL Critical to Performance
- Best current SAT algorithms rely heavily on CL
for good behavior on real world problems -
- GRASP MarquesSilva-Sakallah 96, SATO H.Zhang
97zChaff Moskewicz et al. 01, Berkmin
Goldberg-Novikov 02
- However,
- No good understanding of its strengths and
weaknesses - Not much insight on why it works when it does
9Our Contribution
- Mathematical framework
- for analyzing clause learning
- Characterization of its power
- in relation to well-studied topics in
- proof complexity theory
- Ways to improve solver performance
- based on formal analysis
10Proofs of Unsatisfiability
- When F is unsatisfiable,
- DPLL refutation of F is a proof of its
unsatisfiability - Size lower bound on proofs of F givestime lower
bound on executions of DPLL(F) - Size upper bound on proofs of F givespotential
for quick executions of such algorithms
(with or w/o learning depending on the class of
proofs)
(with the best possible branching heuristic, the
best learning scheme, etc.)
11What about Satisfiable Formulas?
- Achlioptas-Beame-Molloy 01
Bounds on unsatisfiable formulas imply bounds on
satisfiable ones!
DPLL Tree
Satisfying assignment
12Proof System Resolution
- F (a ? b) ? (?a ? c) ? ?a ? (?b ? c) ? (a ?
?c) - Unsatisfiable CNF formula
13Special Cases of Resolution
- Tree-like resolution
- Graph of inferences forms a tree ? DPLL
- Regular resolution
- Variable can be resolved on only once on any path
from input to empty clause? Directed acyclic
graph analog of DPLL tree - Natural to not branch on a variable once it has
been eliminated - Used in original DP Davis-Putnam 60
14Proof System Hierarchy
Space of polynomial time solvable formulas
15Our Results
General RES
General RES
Regular RES
CL w/o restarts
Regular RES
DPLL Tree-like
Trivial RES Learned clauses
16Thm1. CL can beat Regular RES
Such formulas exist! GTn Ordering principlePeb
Pebbling formulas Alekhnovich et al. 02
17PT(f,?) Proof Trace Extension
- Start with
- unsatisfiable formula f with poly-size RES proof
?
- PT(f, ?) contains
- All clauses of f
- For each derived clause Q(a?b?c) in ?,
- Trace variable tQ
- New clauses (tQ ? ?a), (tQ ? ?b), (tQ ? ?c)
CL proof of PT(f, ?) works by branching
negatively on tQs in bottom up order of clauses
of ?
18PT(f,?) Proof Trace Extension
Formula f RES proof ?
?
Q ? (a ? b ? c)
(a ? b ? x)
(c ? ?x)
19How hard is PT(f,?)?
- Easy for CL by construction
- CL branches exactly once on each trace
variable? branches size(?) - Hard for Regular RES reduction argument
- Fact 1 PT(f,?)TraceVars true ? f
- Fact 2 If ? is a Regular RES proof of g,
then ?x is a Regular RES
proof of gx - Fact 3 f does not have small Regular proofs!
20Implications?
- DPLL algorithms w/o clause learning arehopeless
for some structured formulas - CL algorithms have potential for small proofs
Can we use such analysis to harness this
potential?
21Branching Sequence
- B (x1, x4, ?x3, x1, ?x8, ?x2, ?x4, x7, ?x1)
- DPLL picks branching literals from B
- Repetitions allowed
- Different from branching order
- How good is B?
- Depends on backtracking process, learning scheme,
etc
22From Analysis to Practice
- Maximum size of grid pebbling formulas solvable
- by zChaff (in 1 day) can be substantially
increased!
Results extend to general randomized pebbling
formulas Sabharwal-Beame-Kautz SAT 2003
23Trivial RES
Known clauses (a ? b ? c), (?a ? x), (?b ? c),
(?c ? y) Derived clause (x ? y)
- Simple ladder structure
- Distinct variables resolved upon
- Properties
- Tree-like
- Regular
- Linear
Clauses learned by CL are those that can be
derived by trivial RES
24Our Results
CL w/o restarts
Regular RES
DPLL Tree-like
Trivial RES Learned clauses
25CL-- A Variant of CL
- Allow branching on variables whose value is
already implied by unit propagation - Equivalently, allow branching on variables not
appearing at all in the residual formula
How can this possibly help?
Can learn a conflict clause that will reduce
search later!
26Error in Paper
- Incorrect Theorem 1 in the paperCL restarts
is equivalent to RES
Correct versionCL-- restarts is equivalent
to RES
27Thm2. CL-- restarts General RES
- General RES can simulate CL restarts
- CL learns by unit propagation
- Infer learned clauses using RES derivation
- CL-- restarts can simulate General RES
- If RES proof resolves (A ? x) and (B ? ?x) to
obtain C, branch and set all literals of A and B
to false, learn C, restart - Eventually learn empty clause
28Our Results
General RES CL-- restarts
CL w/o restarts
Regular RES
DPLL Tree-like
Trivial RES Learned clauses
29Summary
- Formal framework
- CL can be stronger than Regular RES
- FirstNewCut learning scheme
- CL-- restarts is equivalent to RES
30Open Problems
- Fill in complexity hierarchy gaps
- Can CL efficiently simulate Regular RES?
- Can CL restarts efficiently simulate RES?
From Analysis to Practice Can we use this
framework to improve SAT solvers for other
classes of structured formulas?E.g. Planning
as satisfiability Bounded model checking