clause size reduction with all uip learning
play

Clause Size Reduction with all-UIP Learning Nick Feng and Fahiem - PowerPoint PPT Presentation

Clause Size Reduction with all-UIP Learning Nick Feng and Fahiem Bacchus University of Toronto Introduction Clause Learning Clause Learning is an essential technique in SAT solvers (1996) u Clause Learning Clause Learning is an essential


  1. Clause Size Reduction with all-UIP Learning Nick Feng and Fahiem Bacchus University of Toronto

  2. Introduction

  3. Clause Learning Clause Learning is an essential technique in SAT solvers (1996) u

  4. Clause Learning Clause Learning is an essential technique in SAT solvers (1996) u Many learning schemes proposed, but converged on 1-UIP after Chaff’s success (2001) u

  5. Clause Learning Clause Learning is an essential technique in SAT solvers (1996) u Many learning schemes proposed, but converged on 1-UIP after Chaff’s success (2001) u LBD (Literal Block Distance) proposed as clause quality metric (2009) u

  6. Clause Learning Clause Learning is an essential technique in SAT solvers (1996) u Many learning schemes proposed, but converged on 1-UIP after Chaff’s success (2001) u LBD (Literal Block Distance) proposed as clause quality metric (2009) u 1-UIP clauses have the optimal LBD among all clauses from UIP schemes u

  7. Clause Learning Clause Learning is an essential technique in SAT solvers (1996) u Many learning schemes proposed, but converged on 1-UIP after Chaff’s success (2001) u LBD (Literal Block Distance) proposed as clause quality metric (2009) u 1-UIP clauses have the optimal LBD among all clauses from UIP schemes u However, 1-UIP clauses can be large, and need minimization (2009) u

  8. Clause Learning Clause Learning is an essential technique in SAT solvers (1996) u Many learning schemes proposed, but converged on 1-UIP after Chaff’s success (2001) u LBD (Literal Block Distance) proposed as clause quality metric (2009) u 1-UIP clauses have the optimal LBD among all clauses from UIP schemes u However, 1-UIP clauses can be large, and need minimizations (2009) u Investigation of Chaff's 1-UIP scheme came before our knowledge of LBD and techniques u for clause minimization

  9. Re-examine 1-UIP and other early proposed alternatives Design a new learning scheme Our Goals: by exploiting the main idea of all-UIP learning Provide Empirical evidences for the new scheme

  10. Re-examine Existing Learning Schemes

  11. i+1 x i w … 6 f Trail (partial assignment) 5 e 4 d 3 c 2 b 1 a

  12. x w … f e d {~a, ~b, c } c Forced literals {~a, b} b a Decision literal

  13. x The deepest decision level w … f e Decision level 2 d c Decision level 1 b a

  14. { ~ a, ~b, ~e, ~f, … , ~x ,~z} conflict z y x w … f e d c b a

  15. { ~ a, ~b, ~e, ~f, … , ~x ,~z} conflict z y x w … f e d c b a

  16. conflict { ~ a, ~b, ~e, ~f, … , ~x ,~z} UIP for the deepest decision level ( x unit imply the conflict) x 1-UIP Clause: { ~ a, ~b, ~e, ~f, … ~x} … f e d c b a

  17. conflict { ~ a, ~b, ~e, ~f, … , ~x ,~z} x UIP for i decision levels … i-UIP Clause: { ~ a, ~b, ~e ... ~x} e Every literal in the clause belongs to a unique decision level except for level 1 c b a

  18. conflict { ~ a, ~b, ~e, ~f, … , ~x ,~z} x … UIP for all decision levels e all-UIP Clause: { ~ a, ~e ... ~x} Every literal in the clause belongs to a unique decision level a

  19. { ~ a, ~b, ~e, ~f, … , ~x ,~z} conflict w … Decision literals for all related decision levels all-dec Clause: { ~ a, ~d ... ~w} d a

  20. Learning Schemes Decision for all levels UIP for the deepest level UIP for the i levels UIP for all levels

  21. Schemes Comparison # of resolutions u 1-UIP ≤ i-UIP ≤ all-UIP ≤ all-dec Clauses LBDs u 1 − UIP ≤ i − UIP ≤ all − UIP ≤ all − dec The LBD of a learnt clause 𝐷 ! is the number of different decision levels in it. Empirically, 𝐷 ! with lower LBD tend to be more useful!

  22. Reasons to Prefer 1-UIP 1-UIP clauses are asserting (1-empowering) u They have the optimal LBD among all asserting clauses u Less learning overhead (resolution step) u

  23. Alternative Learning Schemes i-UIP , all-UIP and all-dec learning schemes: Have larger LBDs u Have more learning overhead u However, the extra resolutions performed by them may reduce the clause size u significantly over the 1-UIP clause learning scheme recipe: (1) 1-empowering (2) the minimum LBD (3) small clause size (our focus)

  24. Using all-UIP Clause Learning

  25. Why Learn Shorter Clause Although LBD is the more important quality metric, learning shorter clause is important because: Less memory u Smaller future clauses u Semantically stronger u We exploit all-UIP learning scheme for its ability to learn shorter clauses.

  26. stable-alluip Clause Learner C 1 C i Copy Minimized 1-UIP clause for decision lvl i in C 1 Call “ try-uip-level ” to try to reduce every decision level try-uip-level 𝑗 in 𝐷 # to UIP without Trail (C i , i) Increasing 𝐷 # ’s LBD Return the shorter clause Return shorter between 𝐷 ! and 𝐷 " after C i VS C 1

  27. C 1 C i Ci = (¬m 10 , ¬k 6 , ¬j 6 , ¬i 6 , ¬h 6 , ¬g 5 , ¬d 2 , ¬c 2 ) Copy decLvls: [10, 6 ,5 ,2] for decision lvl ¬m $% is the UIP at the i in C 1 conflicting level. We start processing level 6 try-uip-level Trail (C i , i) Return shorter C i VS C 1

  28. Try-uip-level 6 try-uip-level tries to reduce the set of literals at the target level 𝑗 in 𝐷 ! to a single UIP literal by performing ordered trail resolutions.

  29. C 1 C i Ci = (¬m 10 , ¬h 6 , ¬g 5 , ¬f 5, ¬e 5 ¬d 2 , ¬c 2 ) Copy decLvls: [10, 6 ,5 ,2] for decision lvl i in C 1 try-uip-level Trail (C i , i) Return shorter C i VS C 1

  30. Try-uip-level 5 try-uip-level tries to reduce the set of literals at the target level 𝑗 in 𝐷 ! to a single UIP literal by performing ordered trail resolutions. If a resolution step on variable 𝑞 introduce new decision levels (the resolution will increase 𝐷 ! ’s LBD), then we have two options: u Abort attempt to UIP at the 𝑗 , and return 𝐷 ! with level 𝑗 unchanged (pure-alluip) u Keep the literal 𝑞 in 𝐷 ! without performing the resolution, and continue to resolve away other literals at level 𝑗 until UIP (min-alluip)

  31. Try-uip-level 5 unchanged

  32. Cpure = (¬m 10 , ¬h 6 , ¬g 5 , ¬f 5, ¬e 5 ¬d 2 , ¬c 2 ) C 1 C i Copy Cmin = (¬m 10 , ¬h 6 , ¬f 5, ¬e 5 ¬d 2 , ¬c 2, ¬a 2 ) decLvls: [10, 6 ,5 ,2] for decision lvl i in C 1 try-uip-level Trail (C i , i) After processing level 2, stable-alluip Size Reduction 1 returns 𝐷 # . Cpure = (¬m 10 , ¬h 6 , ¬g 5 , ¬f 5, ¬e 5 ¬d 2 , ¬c 2 ) Return shorter C i VS C 1 Cmin = (¬m 10 , ¬h 6 , ¬f 5, ¬e 5, b 2, ¬a 2 ) Size Reduction 2

  33. Optimization 1: Early Stop Observation 1: After stable-alluip finishes processing levels u 𝑒𝑓𝑑𝑀𝑤𝑚𝑡[0]– 𝑒𝑓𝑑𝑀𝑤𝑚𝑡[𝑗] , the literal at those level will not change Observation 2: The best can be done is to reduce the remaining |𝑒𝑓𝑑𝑀𝑤𝑚𝑡| − u (𝑗 + 1) levels down to a single literal each Stopping condition: The sum of those two number is a lower bound on the size u of the final learnt clause. If it exceeds the size of the input 1-UIP clause, we can abort stable-alluip

  34. C 1 C i Copy Early stop: Check the stopping condition here for decision lvl False i in C 1 Check Stop True Return C 1 Conditoin try-uip-level Trail (C i , i) Return shorter C i VS C 1

  35. Optimization 2: 𝑢 !"# Problem: when stable-alluip doesn’t learn a shorter clause, the extra cost of u resolution could hurt the solver’s performance Observation: for a 1-UIP clause 𝐷 " , the maximum clause size reduction is u bounded by 𝑕𝑏𝑞(𝐷 " ) = |𝐷 " | − 𝑀𝐶𝐸(𝐷 " ). When 𝑕𝑏𝑞(𝐷 " ) is small, stable-alluip is unlikely to succeed, and the gain is small Solution: dynamically set a non-negative target threshold 𝑢 #$% , such that we u do not attempt stable-alluip when 𝑕𝑏𝑞(𝐷 " ) ≤ 𝑢 #$% 𝑢 #$% is updated on every restart. If the success rate since the last restart is u larger than 80% (less than 80%), we decrease(increase) 𝑢 #$% by one not allowing it to become negative

  36. t gap < gap(C 1 ) C 1 True C i False for decision lvl Return False i in C 1 C 1 Check Stop True Return C 1 Conditoin try-uip-level Trail (C i , i) Return shorter C i VS C 1

  37. Variants of stable-alluip to Adjust Variable Activity Morden CDCL solver’s often use variables’ activity to guide solver’s branching choice. We developed variants of stable-alluip to accommodate this feature: 1. alluip-active : learn 𝐷 ! when it has both smaller size and larger average variable activity over the 1-UIP clause 2. alluip-inclusive: Bump variable’s activity for new literals in the final learnt clause 𝐷 ! 3. alluip-exclusive: alluip-inclusive + remove activity bumps of those variable’s that are in 𝐷 " that are no longer in 𝐷 !

  38. stable-alluip with Chronological Backtracking When Chronological Backtracking is used, the literals on the trail may not be sorted by the decision level u Let 𝑚 ! and 𝑚 " be two literals on the trail. We say that 𝑚 ! > #$%&' 𝑚 " if 𝑒𝑓𝑑𝑀𝑤𝑚(𝑚 ! ) > 𝑒𝑓𝑑𝑀𝑤𝑚(𝑚 " ) ∨ ( 𝑒𝑓𝑑𝑀𝑤𝑚(𝑚 ! ) = 𝑒𝑓𝑑𝑀𝑤𝑚(𝑚 " ) ∧ 𝜅(𝑚 ! ) > 𝜅(𝑚 " ) ) u stable-alluip continue to work as long as literals are resolved away from the initial conflict in descending > #$%&' order

  39. Experiments and Results

Recommend


More recommend