RoundingSat
recent work on
pseudo-Boolean solving
Jo Devriendt †, Jan Elffers †, Ambros Gleixner ‡, Jakob Nordström *
† KTH Royal Institute of Technology, Sweden
‡ Zuse Institut Berlin, Germany
* University of Copenhagen, Denmark
jhmde@kth.se
- PB solvers & learning
- Leveraging LP solving for PB solving
Talk in two parts
Pseudo-Boolean background
- Pseudo-Boolean (PB) constraint:
- Bounded weighted sum of literals:
- Note:
- Equivalent to 0-1 integer linear programming constraint
- Bounded weighted sum of literals:
- PB formula: conjunction of PB constraints
- PB solvers decide satisfiability of PB formula
- PB generalizes SAT
- State-of-the-art PB systems:
MiniSat+, Sat4J, Open-WBO, NaPS, RoundingSat- Most translate to SAT
- MIP systems also have strong (Optimization) PB performance
Why pseudo-Boolean?
Strong learning!
- Conflict-Driven Conflict Learning (CDCL) SAT solvers learn implied clause from each conflict
- Study of resolution proof system characterizes SAT solver performance
- RoundingSat (and Sat4J) learn implied PB constraint from each conflict
- Study of cutting plane (CP) proof system characterizes RoundingSat performance
- CP polynomially simulates resolution
- PB solvers can be exponentially stronger than SAT solvers on same instance
On learning
What is a proof system?
- Language to write statements
- Syntactical inference rules
Informally
- Propositional clauses
- Resolution rule
Resolution proof system
Resolution proof system
Cutting plane proof system
- Linear inequalities:
- Inference rules:
Cutting plane proof system
- -2x + y ≥ 0 (axiom)
- x + -2y ≥ -2 (axiom)
- 2x + y ≥ 2 (axiom)
- 2x + -4y ≥ -4 (2*2)
- -3y ≥ -4 (1+4)
- -y ≥ -1 (rounding of 5)
- 2x ≥ 1 (3+6)
- x ≥ 1 (rounding of 7)
- -2x ≥ -1 (1+6)
- -x ≥ 0 (rounding of 9)
- 0 ≥ 1 (8+10)
- E.g., consider:
- Cardinality constraints
- MX is UNSAT if domain of x > domain of y
- IDP* will timeout for domain size > 20
- IDP uses clausal learning (resolution)
- RoundingSat will find solution easily
- RoundingSat uses PB learning (cutting planes)
- *Symmetry is not always the answer
On learning
On learning
- CP > resolution, so RoundingSat > IDP?
- RoundingSat does canceling addition CP
- On CNF inputs, equivalent to resolution
- Existence of a short proof does not imply efficient deduction of a short proof
- E.g., for rationally infeasible instances
- RoundingSat does canceling addition CP
- Only two practical "CDCL" proof systems
- resolution
- canceling addition CP for PB
- Not obvious to generalize to integer setting
- see IntSat work
currently, PB solvers learn best
RoundingSat's idea
- From every conflict, generate PB constraint
- Obvious idea: canceling addition instead of resolving
- Problem: does not preserve falsification
- Solution: divide and round reason constraint to be "tight"
Rational infeasibility
- PB formula can be rationally infeasible
- no assignment to interval [0,1] satisfies the formula, e.g.:
- no assignment to interval [0,1] satisfies the formula, e.g.:
- Rational infeasibility implies UNSAT
- CNF formula is rationally infeasible
- iff unit propagation leads to conflict
- Otherwise, trivial rational solution: assign 0.5 to all non-propagated variables
- All clauses not satisfied by unit propagation have at least 2 unassigned literals
- Such clauses are satisfied by 0.5-assignment
For CNF, deciding rational infeasibility is trivial
- Deciding rational infeasibility of PB formulas is easy in theory:
- Algorithmic complexity class: P [K1979]
- Proof-theoretic complexity: short CP [CCT87] proofs exist [F1902]
- Linear programming (LP) solvers efficiently decide rational feasibility
- In practice, many PB solvers struggle on rationally infeasible formulas [EGNV18]
- Even PB solvers that natively build cutting plane proofs, e.g., RoundingSat and Sat4J
Goal of our work:
use LP solver to check rational feasibility during PB search
Rational infeasibility
Linear Programming (LP) solver
- Input:
- conjunction of linear constraints
- variable bounds
- objective function
- Output: either
- SAT: optimal rational solution
- UNSAT: Farkas multipliers
- defines violated positive linear combination of input constraints
PB search loop
Propagation
Conflict?
Learn PB constraint
Backjump
Decide unassigned variable
yes
no
PB search loop
with LP solver call
Propagation
Conflict?
Backjump
Decide unassigned variable
no
Rational infeasibility?
Query LP solver
yes
no
Learn PB constraint
Extract Farkas multipliers
yes
Learn Farkas constraint
- LP solvers are slow compared to PB search loop
- Limit calls to LP solver
- Limit LP solver running time
- Deterministic measure: compare #conflicts in PB solver to #pivots in LP solver
- Learned constraint must be implied by input formula
- LP solver uses inexact floating point arithmetic
- Recalculate Farkas constraint with exact arithmetic
- Verify Farkas constraint is still conflicting
Two technical hurdles
- PB solver RoundingSat [EN18]
- Native cutting plane proofs
- Performed well in past PB competitions
- LP solver SoPlex [ZIB]
- SCIP's native LP solver
- Fast
- Open source
Working implementation
Experiments!
- 5 solver configurations
- RoundingSat
- RoundingSat+SoPlex
- SCIP
- Sat4J
- Sat4J-CP
- 3000s on 16GiB machines
- 4 benchmark families:
- PB12
- PB16
- MIPLIB
- PROOF
Performance experiment
Performance experiment
Performance experiment
Performance experiment
- RoundingSat+SoPlex never really worse than RoundingSat
- small LP overhead at worst, huge speedups at best
- Not only more solved UNSAT instances (+16%), but also more solved SAT instances (+14%)
- RoundingSat+SoPlex and SCIP trade places
- SoPlex does not like PB12
Performance experiment
Conflict depth experiment
Conflict depth experiment
- Conflict depth for rational infeasibility check and unit propagation are similar
- Technique detects rational infeasibility also in deep search nodes
Learned constraint addition experiment
Learned constraint addition experiment
- Adding learned constraints to LP solver does not lead to more solved instances
- Also no improvement in number of conflicts needed
- Hypothesis 1: no objective function to guide "tight" variant
- Hypothesis 2: rational solution at deep search nodes is not useful
- Other hypotheses?
Current work
- Optimization
- LP cut generation
[K1979] A polynomial algorithm for linear programming - 1979 - Khachiyan
[CCT87] On the Complexity of Cutting-Plane Proofs - Cook, Coullard, Turán
[F1902] Über die Theorie der Einfachen Ungleichungen - 1902 - Farkas
[EGNV18] Using combinatorial benchmarks to probe the reasoning power of pseudo-Boolean solvers - 2018 - Elffers, Giráldez-Cru, Nordström, Vinyals
[EN18] Divide and conquer: Towards faster pseudo-boolean solving - 2018 - Elffers, Nordström
[ZIB] SoPlex - soplex.zib.de
References
How about rational variables?
-
Mixed Integer Programming (MIP)
- constraints have both discrete and continuous variables
- Integrate in CDCL-like system throught SMT-style theory reasoning
- Potential advanced approach:
- split theory in integral and continuous
s.t. - decide
- call rational system to extend to or learn falsified constraint. E.g. (exact) LP solver
- split theory in integral and continuous
- Note: for model counting or deduction, is representative of model class containing
RoundingSat 2019: recent work on PB solving
By Jo Devriendt
RoundingSat 2019: recent work on PB solving
- 977