On the Effect of Learned Clauses on Stochastic Local Search - - PowerPoint PPT Presentation

on the effect of learned clauses on stochastic local
SMART_READER_LITE
LIVE PREVIEW

On the Effect of Learned Clauses on Stochastic Local Search - - PowerPoint PPT Presentation

On the Effect of Learned Clauses on Stochastic Local Search Jan-Hendrik Lorenz Florian Wrz July 8th, 2020 Slide 1 Motivation SLS = Search CDCL = Intelligent Search Rough idea: Use preprocessing in SLS to find a logically equivalent


slide-1
SLIDE 1

On the Effect of Learned Clauses

  • n Stochastic Local Search

Jan-Hendrik Lorenz Florian Wörz July 8th, 2020

Slide 1

slide-2
SLIDE 2

Motivation

SLS = Search CDCL = Intelligent Search Rough idea: Use preprocessing in SLS to find a logically equivalent formula. Suspicion: Runtime of SLS on these instances can vary dramatically. AIM: Find (efficently computable) log. equiv. formula which is beneficial to the runtime.

Introduction and Preliminaries Slide 2

slide-3
SLIDE 3

probSAT [BS12]

Sketch of the Algorithm

Operates on complete assignments, starts with a complete initial assignment α, tries to find a solution by repeatedly flipping variables. Input: Formula F, maxFlips, function f α := complete assignment for F for i = 1 to maxFlips do if α satisfies F then return “satisfiable” Choose a falsified clause C = (u1 ∨ u2 ∨ · · · ∨ uℓ) Choose j ∈ {1, . . . , ℓ} with probability according to f Flip the chosen variable uj and update α

Introduction and Preliminaries Slide 3

slide-4
SLIDE 4

probSAT

Successes

probSAT-based solvers performed excellently on random instances:

probSAT won the random track of the SAT competition 2013, dimetheus [BM16] in 2014 and 2016, YalSAT [Bie17] won in 2017.

Only recently, in 2018, other types of solvers significantly exceeded probSAT based

  • algorithms. → Reason for choosing probSAT in this study.

Introduction and Preliminaries Slide 4

slide-5
SLIDE 5

Backbone, General and Deceptive Model

First idea: Use a formula F as a base. Add a set of clauses S = {C1, . . . , Ct} to F to obtain a new formula G := F ∪ S. Definition ([Kil+05]) The backbone B(F) are the literals appearing in all satisfying assignments of F. Deceptive model: (x ∨ y ∨ z) where x, y, z ∈ B(F) General model: (x ∨ y ∨ z) where x ∈ B(F) and y, z ∈ Var(F)

The Quality of Learned Clauses Slide 5

slide-6
SLIDE 6

Effect of the Models

20 40 60 80 100 120 140 160 180 200 104 105 106 107

Number of added clauses Flips Deceptive model

20 40 60 80 100 120 140 160 180 200 105 106

Number of added clauses General model Definition We call clauses that have a high number of correct literals w. r. t. a fixed solution high-quality clauses.

The Quality of Learned Clauses Slide 6

slide-7
SLIDE 7

General and Deceptive Model Are Not Realistic

Evident: It is crucial which clauses are added. Problem: Neither the deceptive nor the general model can be applied to real instances (we would need to know the solution space / calculating Backbones is not efficient). Idea: Compare models based on resolution and CDCL. Definition Let F be a formula and let B, C ∈ F be clauses such that there is a resolvent R. We call R level 1 resolvent. Let D or E (or both) be level 1 resolvents and S be their resolvent. Then we call S a level 2 resolvent.

The Quality of Learned Clauses Slide 7

slide-8
SLIDE 8

F1, F2, FC

Let F be a 3-CNF formula with m clauses. We obtain new and log. equiv. formulas: F1 Randomly select ≤ m/10 level 1 resolvents of width ≤ 4 and add them to F. F2 Randomly select ≤ m/10 level 2 resolvents of width ≤ 4 and add them to F. FC Randomly select ≤ m/10 clauses of width ≤ 4 from Glucose (with a time limit of 300 seconds) and add them to F.

The Quality of Learned Clauses Slide 8

slide-9
SLIDE 9

Tests on Uniform Random Instances: Setting and Results

Observe behavior of probSAT over 1000 runs per instance on instance types F1, F2, FC. Testbed of uniformly generated 3-CNF instances with

5000 – 11 600 variables and ratio of 4.267.

Results: Type F1 most challenging for probSAT (even harder than original formula). Type F2 better (t-test: p < 0.01). Type FC most efficient (t-test: p < 0.05) → will investigate this further.

The Quality of Learned Clauses Slide 9

slide-10
SLIDE 10

Hidden Solution Instances: Definition

Randomly generated instances with hidden solution [BC18]: Given a solution α. Randomly generate a clause with 3 literals. Depending on the number i of satisfied literals under α add the clause with probability pi. Repeat until enough clauses are added.

The Quality of Learned Clauses Slide 10

slide-11
SLIDE 11

Quality of Clauses

SAT competition 2018 incorporated 3 types of models with hidden solutions (only differing in the parameters). Measure quality w. r. t. to the hidden solution: On all 3 models, level 2 clauses have a higher quality than level 1 claues. On 2 of 3 domains, CDCL clauses have a higher quality than level 2 clauses.

The Quality of Learned Clauses Slide 11

slide-12
SLIDE 12

Can this method help to improve probSAT?

The hardness of an instance is impacted by the added clauses. CDCL seems to produce high-quality clauses. Going forward, we only use clauses generated by Glucose. Which clauses should be added? (We focus on the width) How many clauses should be added? (In % of the original number of clauses)

Training Experiments Slide 12

slide-13
SLIDE 13

Training Data

All satisfiable, random instances from the SAT-Competition 2014 to 2017. In total: 377 instances. 120 instances with a hidden solution. 149 uniform 3, 5, and 7-SAT instances of medium size. 108 uniform 3, 5, and 7-SAT instances of huge size.

Training Experiments Slide 13

slide-14
SLIDE 14

Setup

The experiments were performed on a heterogeneous cluster. Thus, seconds are inappropriate to measure the runtime. Instead, flips were used. Timeouts: 3-SAT: 109 flips, 5-SAT: 5 · 108 flips, 7-SAT: 2.5 · 108 flips. 1000 runs per instance. Performance measure: number of timeouts.

Training Experiments Slide 14

slide-15
SLIDE 15

Optimal combinations for uniform, medium size instances

Width Number (in %) 3-SAT ≤ 4 unlimited 5-SAT ≤ 8 5% 7-SAT ≤ 9 1%

Training Experiments Slide 15

slide-16
SLIDE 16

Uniform Instances: 3-SAT

4000 6000 8000 10000 12000 −100 −50 50 # variables Difference timeouts 16 18 20 2 4 6

  • 0.4
  • 0.3
  • 0.2
  • 0.1

0.0 0.1 # added clauses in % of the original # clauses Log performance change

Training Experiments Slide 16

slide-17
SLIDE 17

Uniform Instances: 5 and 7-SAT

200 300 400 500 600 −40 −20 # variables Difference timeouts

5-SAT instances

14 16 18 20

Figure: 5-SAT instances

80 100 120 140 160 −40 −20 20 # variables 14 16 18 20

Figure: 7-SAT instances

Training Experiments Slide 17

slide-18
SLIDE 18

Hidden Solution and Huge Instances

Hidden Solution: Similar results, adding new clauses is generally beneficial. Huge instances: Few clauses are generated; yielding no significant improvement.

Training Experiments Slide 18

slide-19
SLIDE 19

GapSAT

Start #Vars > 9000 k-SAT probSAT probSAT

15 000 000 flips

probSAT

35 000 000 flips

probSAT

6 000 000 flips

Glucose

= 300 s width≤4

Glucose

≤ 300 s 5%, width≤8

Glucose

≤ 300 s 1%, width≤9

probSAT

until timeout

probSAT

until timeout

probSAT

until timeout

no yes k = 3 k = 5 k = 7

Training Experiments Slide 19

slide-20
SLIDE 20

Evaluation

Random instances of the SAT competition 2018 Used solvers: probSAT, Sparrow2Riss [BM18], GapSAT Timeout: 5000 seconds Performance measure: par2 par2(x) =

  • x,

x < 5000 10000, else

Experimental Evaluation Slide 20

slide-21
SLIDE 21

Results

# solved score probSAT 133 1 234 986.01 Sparrow2Riss 189 672 335.89 GapSAT 223 347 156.40

100 200 10−2 10−1 100 101 102 103

# solved instances

GapSAT probSAT Sparrow2Riss

Experimental Evaluation Slide 21

slide-22
SLIDE 22

Domain Results

hidden medium huge probSAT 872 938.74 137 396.83 224 650.43 Sparrow2Riss 8 589.12 171 492.91 492 253.86 GapSAT 851.36 127 982.19 218 322.85

Experimental Evaluation Slide 22

slide-23
SLIDE 23

Summary and Outlook

The presented technique significantly improves probSAT. Parameter tuning of probSAT could further improve the results. A clause selection heuristic would be useful. The supplementary material is available online1.

1https://zenodo.org/record/3776052

Summary and Outlook Slide 23