Symmetric explanation learning: Effective dynamic symmetry handling for SAT
Jo Devriendt,
Bart Bogaerts,
Maurice Bruynooghe, Marc Denecker
University of Leuven
What's up with symmetry in SAT?
 CNF theory T, literal l, variable x, assignment α
 Symmetry σ: permutation of literals
 commutes with negation σ(l) = ¬σ(¬l)
 preserves satisfaction σ(α) ⊨ T iff α ⊨ T
 syntactically fixes T σ(T) = T
 syntactically fixes T σ(T) = T
 Set of symmetries Σ generate a mathematical group <Σ> under ◦ (composition)
What's up with symmetry in SAT?
 E.g. pigeonhole problem
 Set of holes {h_{1},h_{2},...,h_{n}}
 Set of pigeons {p_{1} ,p_{2},...,p_{n+1}}
 Symmetries σ on pigeons and holes
e.g., swapping h_{1} and h_{2}
 Symmetry group <Σ> of all permutations on pigeons and/or holes
Symmetry detection in SAT

Saucy [1]
 Convert CNF to colored graph
 Automorphisms are syntactical symmetries
 Result: set
Σ
of generator symmetries for
<Σ>

BreakID [7]
 Find "the right" generators
Symmetry exploitation in SAT
Two classes of techniques
 Dynamic symmetry exploitation
 Static symmetry exploitation/breaking
avoid symmetrical parts of the search space
Symmetry exploitation in SAT

lexleader symmetry breaking formula sbf(σ) for σ
 based on variable order


Shatter and BreakID preprocessors [2,7]
 Given Σ, construct sbf(σ) for each σ∈Σ
 Linear encoding of sbf(σ) into clauses
 Very good results in recent SAT competitions
static symmetry breaking
Symmetry exploitation in SAT
 Takes symmetries into account during search
 Requires dedicated solvers
 SymChaff [3]
 Symmetry propagation for SAT (SP) [4]
 Symmetric Learning Scheme (SLS) [5]
 ...
dynamic symmetry exploitation
Symmetric learning
 Modern SAT solvers learn new clauses during search
 Typically by resolution, but the idea works for any proof system
 Learnt clauses are logical consequences of the theory
 Whenever c is a consequence of T, so is σ(c)
 Why not also learn σ(c)?
Symmetric learning
 Learning σ(c) for all σ∈<Σ>:
 infeasible [6] (simpy too many σ)
 How to ensure that no duplicate/subsumed clauses are learnt?
 Various algorithms exist that make some choice on which symmetries to apply (SP, SEL)
 None of them performs as well as stateofthe art static symmetry breaking
 We present a novel algorithm in this family: symmetric explanation learning
Symmetric explanation learning
 Idea: we prefer to learn clauses with a high chance of propagation
 Even better: we prefer to only learn clauses that propagate at least once
 Idea: symmetries typically permute only a fraction of the literals
 Hence, if c is unit, σ(c) has a good chance of being unit as well
 This notion of "interesting" candidate learned clause is dynamic
Symmetric explanation learning
 Proposal: whenever c propagates, store σ(c) in a separate clause store θ for each σ∈Σ
 Propagation on θ happens with low priority: only if standard unit propagation is at a fixpoint
 Whenever a clause in θ propagates, we learn it (we upgrade it to a "normal" learned clause)
 Whenever we backtrack over the level where c propagated, we remove σ(c) from θ
SEL: Properties
 Duplicate/subsumed clauses are never learnt
 Combinatorial explosion of learnt clauses is contained by:
 Only considering candidates σ(c) for σ∈Σ (not σ∈<Σ>) and c a learnt clause
 Removing candidates upon backtracking
 Still allows for transitive effects (learning σ(σ'(c)) if σ'(c) propagates at least once)
SEL: Optimizations
 Standard twowatched literal scheme applied to θ
 Do not store σ(c) if it is satisfied at the time of c's propagation
 Store a simplification of σ(c) in θ:
 Remove all false literals at the time of c's propagation
 Restore original σ(c) if needed
SEL vs SLS
 SLS: learn σ(c) for each learned clause c and each σ∈Σ
 SLS: possibly learns useless clauses (shows up in experiments)
 SEL: possibly misses useful clauses
 SLS: no (intrinsic) mechanism to avoid duplicates
 SLS: no transitive effects (possibly misses useful clauses)
SEL vs SP
 SP: similar idea to SEL: heuristic to guarantee that symmetric learnt clause propagates at least once
 SP: based on weak activity
 SP vs SEL: whenever SP learns σ(c), so does SEL (not vice versa)
Notation
 State:
 : assignment (list of literals)
 : decision literals
 : learned clause store
 : explanation (maps propagated literals to the clause that propagated them)
 : symmetrical learned clause store
SEL: Experiments
 Limits:
 5000s
 16GB
 Benchmarks
 app14, hard14
 app16, hard16
 highly symmetric instances
 Solvers:
 Glucose 4.0
 Glucose 4.0 + BreakID
 Glucose 4.0 + SEL
 Glucose 4.0 + SP
 Glucose 4.0 + SLS
If SEL does not outperform static symmetry breaking... Why bother?
Symmetry exploitation in SAT
Static symmetry breaking:
 Compatible with any solver (simple preprocessing!)
 Discards models a priori
Dynamic symmetry exploitation (SEL):
 Simple idea
 Requires dedicated solvers
 Does not discard models a priori

Compatible with other inference tasks, such as:
 Model counting
 (partial) MAXSAT
 Optimization

Compatible with other inference tasks, such as:
 "Lazy"
static vs dynamic
Summary
 We presented the first generalpurpose dynamic symmetry exploitation technique +/ on par with static symmetry breaking
 Based on symmetric learning; propagationdirected selection of learnt clauses
 No completeness results yet. Under which conditions on Σ is SEL guaranteed to never visit two symmetrical assignments?
Thanks for your attention!
Questions?
[1] Symmetry and Satisfiability: An Update  2010  Katebi e.a.
[2] Efficient SymmetryBreaking for Boolean Satisfiability  2006  Aloul e.a.
[3] On the importance of row symmetry  2014  Devriendt e.a.
[4] Automatic generation of constraints for partial symmetry breaking  2011  Jefferson & Petrie
[5] Symmetry and satisfiability  2009  Sakallah
[6] On Local Domain Symmetry for Model Expansion  2016  Devriendt e.a.
[7] Improved Static Symmetry Breaking for SAT  2016  Devriendt e.a.
An open research problem:
Do 7825 pigeons fit in 7824 holes?
Do 7825 pigeons fit in 7824 holes?
 impossible for SAT solvers
 trivial on the firstorder level
Thanks for your attention!
Questions?
[1] Symmetry and Satisfiability: An Update  2010  Katebi e.a.
[2] Efficient SymmetryBreaking for Boolean Satisfiability  2006  Aloul e.a.
[3] On the importance of row symmetry  2014  Devriendt e.a.
[4] Automatic generation of constraints for partial symmetry breaking  2011  Jefferson & Petrie
[5] Symmetry and satisfiability  2009  Sakallah
[6] On Local Domain Symmetry for Model Expansion  2016  Devriendt e.a.
[7] Improved Static Symmetry Breaking for SAT  2016  Devriendt e.a.
(really, this time)
SEL
By krr