GANAK: A Scalable Probabilistic Exact Model Counter Shubham Sharma 1 - - PowerPoint PPT Presentation

ganak a scalable probabilistic exact model counter
SMART_READER_LITE
LIVE PREVIEW

GANAK: A Scalable Probabilistic Exact Model Counter Shubham Sharma 1 - - PowerPoint PPT Presentation

GANAK: A Scalable Probabilistic Exact Model Counter Shubham Sharma 1 , Mate Soos 2 , Subhajit Roy 1 and Kuldeep S. Meel 2 1 Indian Institute of Technology Kanpur, India 2 National University of Singapore IJCAI 2019 1 / 20 Propositional Model


slide-1
SLIDE 1

GANAK: A Scalable Probabilistic Exact Model Counter

Shubham Sharma1, Mate Soos2, Subhajit Roy1 and Kuldeep S. Meel2

1Indian Institute of Technology Kanpur, India 2National University of Singapore

IJCAI 2019

1 / 20

slide-2
SLIDE 2

Propositional Model Counting

Given:

Propositional formula F (CNF) over a set of variables X

Propositional Model Counting (#SAT):

Compute the number of satisfying assignments of F

#SAT is a #P complete problem

2 / 20

slide-3
SLIDE 3

Propositional Model Counting

Probabilistic Exact Model Counting

Given a propositional formula F (CNF) and confidence δ ∈ (0, 1], counter returns count such that: Pr

  • |Solutions of F| = count
  • ≥ 1 − δ

1Chakraborty et al., 2019 3 / 20

slide-4
SLIDE 4

Propositional Model Counting

Probabilistic Exact Model Counting

Given a propositional formula F (CNF) and confidence δ ∈ (0, 1], counter returns count such that: Pr

  • |Solutions of F| = count
  • ≥ 1 − δ

Probabilistic Exact Model Counting is almost as hard as Exact Model Counting1

1Chakraborty et al., 2019 3 / 20

slide-5
SLIDE 5

Applications of Propositional Model Counting

4 / 20

slide-6
SLIDE 6

Main Ingredients

Decision Process:

– (F ∧ l) ∨ (F ∧ ¬l) mutually inconsistent – #(F) = #(F ∧ l) + #(F ∧ ¬l)

5 / 20

slide-7
SLIDE 7

Main Ingredients

Decision Process:

– (F ∧ l) ∨ (F ∧ ¬l) mutually inconsistent – #(F) = #(F ∧ l) + #(F ∧ ¬l)

Component Decomposition:

– F = ∆1 ∧ ∆2 · · · ∆n ∆1 · · · ∆n does not share any variables – #(F) = #(∆1) × #(∆2) · · · × #(∆n) mutually disjoint

5 / 20

slide-8
SLIDE 8

Main Ingredients

Decision Process:

– (F ∧ l) ∨ (F ∧ ¬l) mutually inconsistent – #(F) = #(F ∧ l) + #(F ∧ ¬l)

Component Decomposition:

– F = ∆1 ∧ ∆2 · · · ∆n ∆1 · · · ∆n does not share any variables – #(F) = #(∆1) × #(∆2) · · · × #(∆n) mutually disjoint

Component Caching: Key Value ∆1 #(∆1) ∆2 #(∆2)

5 / 20

slide-9
SLIDE 9

Main Ingredients

Decision Process:

– (F ∧ l) ∨ (F ∧ ¬l) mutually inconsistent – #(F) = #(F ∧ l) + #(F ∧ ¬l)

Component Decomposition:

– F = ∆1 ∧ ∆2 · · · ∆n ∆1 · · · ∆n does not share any variables – #(F) = #(∆1) × #(∆2) · · · × #(∆n) mutually disjoint

Component Caching: Key Value ∆1 #(∆1) ∆2 #(∆2) Conflict Driven Clause Learning

5 / 20

slide-10
SLIDE 10

Example

F = (x1 ∨ x2 ∨ x3) ∧ (x1 ∨ x4 ∨ x5) ∧ (¬x1 ∨ x2 ∨ x3)

6 / 20

slide-11
SLIDE 11

Example

F = (x1 ∨ x2 ∨ x3) ∧ (x1 ∨ x4 ∨ x5) ∧ (¬x1 ∨ x2 ∨ x3) (x2 ∨ x3){x4, x5} x1 Key Value (x2 ∨ x3) 3 (x2 ∨ x3){x4, x5} 12

7 / 20

slide-12
SLIDE 12

Example

F = (x1 ∨ x2 ∨ x3) ∧ (x1 ∨ x4 ∨ x5) ∧ (¬x1 ∨ x2 ∨ x3) (x2 ∨ x3){x4, x5} x1 ∧ (x2 ∨ x3) (x4 ∨ x5) ¬x1 Key Value (x2 ∨ x3) 3 (x2 ∨ x3){x4, x5} 12

8 / 20

slide-13
SLIDE 13

Example

F = (x1 ∨ x2 ∨ x3) ∧ (x1 ∨ x4 ∨ x5) ∧ (¬x1 ∨ x2 ∨ x3) (x2 ∨ x3){x4, x5} x1 ∧ (x2 ∨ x3) (x4 ∨ x5) ¬x1 Key Value (x2 ∨ x3) 3 (x2 ∨ x3){x4, x5} 12 (x4 ∨ x5) 3

9 / 20

slide-14
SLIDE 14

Example

F = (x1 ∨ x2 ∨ x3) ∧ (x1 ∨ x4 ∨ x5) ∧ (¬x1 ∨ x2 ∨ x3) (x2 ∨ x3){x4, x5} x1 ∧ (x2 ∨ x3) (x4 ∨ x5) ¬x1 Key Value (x2 ∨ x3) 3 (x2 ∨ x3){x4, x5} 12 (x4 ∨ x5) 3 (x2 ∨ x3) ∧ (x4 ∨ x5) 9

10 / 20

slide-15
SLIDE 15

Example

F = (x1 ∨ x2 ∨ x3) ∧ (x1 ∨ x4 ∨ x5) ∧ (¬x1 ∨ x2 ∨ x3) (x2 ∨ x3){x4, x5} x1 ∧ (x2 ∨ x3) (x4 ∨ x5) ¬x1 Key Value (x2 ∨ x3) 3 (x2 ∨ x3){x4, x5} 12 (x4 ∨ x5) 3 (x2 ∨ x3) ∧ (x4 ∨ x5) 9 F = (x1 ∨ x2 ∨ x3) ∧ (x1 ∨ x4 ∨ x5) ∧ (¬x1 ∨ x2 ∨ x3) 21

11 / 20

slide-16
SLIDE 16

Our Contribution

1 Probabilistic Component Caching (PCC) 2 Variable Branching Heuristic (CSVSADS) 3 Phase Selection Heuristic (PC) 4 Independent Support (IS) 5 Restarts (LSO) 6 Exponentially Decaying Randomness (EDR) 12 / 20

slide-17
SLIDE 17

Probabilistic Component Caching (PCC)

F = (¬x3 ∨ ¬x5 ∨ x6) ∧ (¬x1 ∨ x4 ∨ ¬x6) ∧ (x2 ∨ x3 ∨ x6) Schema Key Value STD2

  • 3, -5, 6, 0, -1, 4, -6, 0, 2, 3, 6, 0

#(F) HC3 1, 2, 3, 4, 5, 6, 1, 2, 3 #(F) GANAK Hash of HC/STD #(F)

2Sang et al., 2005 3Thurley, 2006 13 / 20

slide-18
SLIDE 18

Variable Branching Heuristic (CSVSADS)

Score(VSADS)4 = p × Score(VSIDS) + q × Score(DLCS)

VSIDS: Prioritize variables present in recently generated conflict clauses DLCS: Prioritize the highest occurring variable in the residual formula

4Sang et al., 2005 14 / 20

slide-19
SLIDE 19

Variable Branching Heuristic (CSVSADS)

Score(VSADS)4 = p × Score(VSIDS) + q × Score(DLCS)

VSIDS: Prioritize variables present in recently generated conflict clauses DLCS: Prioritize the highest occurring variable in the residual formula

Score(CSVSADS) = α × CacheScore + β × Score(VSADS)

Prioritize variables not present in the components which are recently added to the cache

4Sang et al., 2005 14 / 20

slide-20
SLIDE 20

Phase Selection Heuristic (PC)

DLIS5 l |l| ≥ |¬l| ¬l

  • therwise

5Sang et al., 2005 15 / 20

slide-21
SLIDE 21

Phase Selection Heuristic (PC)

DLIS5 l |l| ≥ |¬l| ¬l

  • therwise

We reduce our trust on DLIS by adding randomness in DLIS if the difference in |l| and |¬l| is not overwhelmingly high

5Sang et al., 2005 15 / 20

slide-22
SLIDE 22

Tool

GANAK6: First Scalable Probabilistic Exact Model Counter Given a propositional formula F (CNF) and confidence δ ∈ (0, 1] GANAK(F, δ) returns count such that Pr [|Sol(F)| = count] ≥ 1 − δ Tool is available at: https://github.com/meelgroup/ganak

6GANAK (

in Sanskrit) refers to a device that counts

16 / 20

slide-23
SLIDE 23

Experimental Evaluation

Benchmarks arising from probabilistic reasoning, plan recognition, DQMR networks, ISCAS89 combinatorial circuits, quantified information flow, etc

17 / 20

slide-24
SLIDE 24

Experimental Evaluation

Benchmarks arising from probabilistic reasoning, plan recognition, DQMR networks, ISCAS89 combinatorial circuits, quantified information flow, etc Objectives:

1

Study the impact of different configurations of heuristics

2

Study the performance of GANAK with respect to the state-of-the-art model counters

17 / 20

slide-25
SLIDE 25

Experimental Evaluation: Individual Analysis

3020 3025 2495 2491 3015 3020 2462 2463 3008 3006 2474 2480 3009 3004 2453 2474 3008 3009 2382 2406 3004 2998 2367 2379 2989 2990 2368 2379 2989 2996 2359 2359

00 01 10 11 000 001 010 011 100 101 110 111

PCC−CSVSADS−PC IS−LSO

2400 2600 2800 3000

PAR2

GANAK performed best when all the heuristics are turned on

18 / 20

slide-26
SLIDE 26

Experimental Evaluation: Comparison with other tools

1400 1425 1450 1475 1500 1525 1550 1575 1600 instances 1000 2000 3000 4000 5000 CPU time (s) GANAK SharpSAT

δ = 0.05, Component Cache Size = 2 GB, Timeout=5000 secs In our experiments, the model count returned by GANAK was equal to the exact model count for all benchmarks

19 / 20

slide-27
SLIDE 27

Thank You

Tool is available at: https://github.com/meelgroup/ganak

20 / 20