Compiling Probabilistic Logic Programs into Sentential Decision - - PowerPoint PPT Presentation

compiling probabilistic logic programs
SMART_READER_LITE
LIVE PREVIEW

Compiling Probabilistic Logic Programs into Sentential Decision - - PowerPoint PPT Presentation

Compiling Probabilistic Logic Programs into Sentential Decision Diagrams Jonas Vlasselaer, Joris Renkens, Guy Van den Broeck and Luc De Raedt KU Leuven, Belgium PLP 2014 July 17, 2014 Motivation Inference in Probabilistic Logic Programs


slide-1
SLIDE 1

Jonas Vlasselaer, Joris Renkens, Guy Van den Broeck and Luc De Raedt KU Leuven, Belgium PLP 2014 July 17, 2014

Compiling Probabilistic Logic Programs into Sentential Decision Diagrams

slide-2
SLIDE 2

Motivation

Inference in Probabilistic Logic Programs (PLPs) :

Probabilistic Logic Program

(Relevant to Query)

Grounded Program

(Break cycles)

Boolean Circuit

(Compilation)

Tractable Target Representation

(Weighted Model Counting)

Probability of Query

2

slide-3
SLIDE 3

Motivation

Inference in Probabilistic Logic Programs (PLPs)

Probabilistic Logic Program

(Relevant to Query)

Grounded Program

(Break cycles)

Boolean Circuit

(Compilation)

Tractable Target Representation

(Weighted Model Counting)

Probability of Query

2

slide-4
SLIDE 4

Motivation

Compiling Probabilistic Logic Programs Boolean Circuit

[De Raedt et al., …] [Fierens et al.]

OBDD d-DNNF

3

slide-5
SLIDE 5

Motivation

Compiling Probabilistic Logic Programs Boolean Circuit

[De Raedt et al., …] [Fierens et al.]

OBDD d-DNNF

3

slide-6
SLIDE 6

Motivation

Compiling Bayesian Networks Boolean Circuit

[Darwiche, …] [Darwiche, …] [Chavira et al., …]

OBDD SDD

d-DNNF

4

slide-7
SLIDE 7

Motivation

Compiling Bayesian Networks Boolean Circuit

[Darwiche, …] [Darwiche, …] [Chavira et al., …]

OBDD SDD

d-DNNF

4

slide-8
SLIDE 8

Motivation

Compiling Bayesian Networks Boolean Circuit

[Darwiche, …] [Darwiche, …] [Chavira et al., …]

OBDD SDD

d-DNNF

4

slide-9
SLIDE 9

Motivation

Compiling Probabilistic Logic Programs Boolean Circuit

[De Raedt et al., …] [Fierens et al.]

OBDD SDD

d-DNNF

5

slide-10
SLIDE 10

Outline

6

 From PLPs to Boolean Circuits  Properties of Target Representations  Circuit Compilation  Experimental Results

slide-11
SLIDE 11

From PLPs to Boolean Circuits

7

Probabilistic Logic Program (PLP)

0.4 :: friends(a,b). 0.5 :: friends(b,a). 0.8 :: friends(a,c). 0.9 :: friends(c,a). 0.2 :: friends(c,b). 0.1 :: friends(b,c). 0.1 :: stress(a). 0.5 :: stress(b). 0.9 :: stress(c). smokes(X) :- stress(X). smokes(X) :- friends(X,Y), smokes(Y).

slide-12
SLIDE 12

From PLPs to Boolean Circuits

8

Grounded PLP (probabilistic facts are omitted)

smokes(a) :- stress(a). smokes(b) :- stress(b). smokes(c) :- stress(c). smokes(a) :- friends(a,b), smokes(b). smokes(a) :- friends(a,c), smokes(c). smokes(b) :- friends(b,a), smokes(a). smokes(b) :- friends(b,c), smokes(c). smokes(c) :- friends(c,a), smokes(a). smokes(c) :- friends(c,b), smokes(b).

slide-13
SLIDE 13

From PLPs to Boolean Circuits

8

Grounded PLP (probabilistic facts are omitted)

smokes(a) :- stress(a). smokes(b) :- stress(b). smokes(c) :- stress(c). smokes(a) :- friends(a,b), smokes(b). smokes(a) :- friends(a,c), smokes(c). smokes(b) :- friends(b,a), smokes(a). smokes(b) :- friends(b,c), smokes(c). smokes(c) :- friends(c,a), smokes(a). smokes(c) :- friends(c,b), smokes(b). Cycle !

slide-14
SLIDE 14

From PLPs to Boolean Circuits

9

Cycle – Free Grounded PLP

smokes(a) :- stress(a). … smokes(a) :- friends(a,b), smokes-a(b). smokes(a) :- friends(a,c), smokes-a(c). … smokes-a(b) :- stress(b). smokes-a(c) :- stress(c). smokes-a(b) :- friends(b,c), smokes-ab(c). smokes-a(c) :- friends(c,b), smokes-ac(b). … smokes-ab(c) :- stress(c). smokes-ac(b) :- stress(b). …

slide-15
SLIDE 15

From PLPs to Boolean Circuits

10

Boolean Circuit

slide-16
SLIDE 16

From PLPs to Boolean Circuits

10

Boolean Circuit

smokes-a(b)

slide-17
SLIDE 17

From PLPs to Boolean Circuits

11

Boolean Circuit (propositional formula) Compile Tractable Target Representation (equivalent formula)

slide-18
SLIDE 18

From PLPs to Boolean Circuits

11

Boolean Circuit (propositional formula) Compile Tractable Target Representation (equivalent formula) HOW ? WHICH language ?

slide-19
SLIDE 19

Properties of Target Representations

12

 Three key properties for target languages:

 Succinctness  Class of tractable transformations  Class of tractable queries

A Knowledge Compilation Map [Darwiche et al.]

slide-20
SLIDE 20

Properties of Target Representations

13

 Tractable Queries

 Weighted Model Counting linear in compiled circuit

 Tractable Transformations

 Apply-operator (˄, ˅, ¬) simplifies compilation process  Variable reordering (minimization)

slide-21
SLIDE 21

Properties of Target Representations

13

 Tractable Queries

 Weighted Model Counting linear in compiled circuit

 Tractable Transformations

 Apply-operator (˄, ˅, ¬) simplifies compilation process  Variable reordering (minimization)

slide-22
SLIDE 22

Properties of Target Representations

14

 Succinctness

 Size of smallest compiled circuit

d-DNNF < SDD ≤ OBDD

 Upper bounds on the size of the compiled circuit

 OBDD : based on pathwidth  d-DNNF and SDD : based on treewidth

slide-23
SLIDE 23

Circuit Compilation

15

 Compiling into OBDD

 Historically used as target representation  Supports bottom-up compilation approach  Supports minimization of the circuit size

slide-24
SLIDE 24

Circuit Compilation

15

 Compiling into OBDD

 Historically used as target representation  Supports bottom-up compilation approach  Supports minimization of the circuit size

smokes(a) :- friends(a,b), smokes-a(b). smokes-a(b) :- stress(b). smokes-a(b) :- friends(b,c), stress(c).

slide-25
SLIDE 25

Circuit Compilation

15

 Compiling into OBDD

 Historically used as target representation  Supports bottom-up compilation approach  Supports minimization of the circuit size

smokes(a) :- friends(a,b), smokes-a(b). smokes-a(b) :- stress(b). smokes-a(b) :- friends(b,c), stress(c).

  • Variable true

Variable false

slide-26
SLIDE 26

Circuit Compilation

15

 Compiling into OBDD

 Historically used as target representation  Supports bottom-up compilation approach  Supports minimization of the circuit size

smokes(a) :- friends(a,b), smokes-a(b). smokes-a(b) :- stress(b). smokes-a(b) :- friends(b,c), stress(c).

Variable true Variable false

˅

slide-27
SLIDE 27

Circuit Compilation

15

 Compiling into OBDD

 Historically used as target representation  Supports bottom-up compilation approach  Supports minimization of the circuit size

smokes(a) :- friends(a,b), smokes-a(b). smokes-a(b) :- stress(b). smokes-a(b) :- friends(b,c), stress(c).

Variable true Variable false

slide-28
SLIDE 28

Circuit Compilation

15

 Compiling into OBDD

 Historically used as target representation  Supports bottom-up compilation approach  Supports minimization of the circuit size

smokes(a) :- friends(a,b), smokes-a(b). smokes-a(b) :- stress(b). smokes-a(b) :- friends(b,c), stress(c).

Variable true Variable false

slide-29
SLIDE 29

Circuit Compilation

15

 Compiling into OBDD

 Historically used as target representation  Supports bottom-up compilation approach  Supports minimization of the circuit size

smokes(a) :- friends(a,b), smokes-a(b). smokes-a(b) :- stress(b). smokes-a(b) :- friends(b,c), stress(c).

Variable true Variable false

˄

slide-30
SLIDE 30

Circuit Compilation

15

 Compiling into OBDD

 Historically used as target representation  Supports bottom-up compilation approach  Supports minimization of the circuit size

smokes(a) :- friends(a,b), smokes-a(b). smokes-a(b) :- stress(b). smokes-a(b) :- friends(b,c), stress(c).

Variable true Variable false

slide-31
SLIDE 31

Circuit Compilation

16

 Compiling into d-DNNF

 Requires intermediate encoding in CNF  Auxiliary variables needed (for every rule with >1 literal in body)  Compile CNF into d-DNNF

slide-32
SLIDE 32

Circuit Compilation

16

 Compiling into d-DNNF

 Requires intermediate encoding in CNF  Auxiliary variables needed (for every rule with >1 literal in body)  Compile CNF into d-DNNF

Conjunctions (˄) are decomposable Disjunctions (˅) are deterministic

slide-33
SLIDE 33

Circuit Compilation

16

 Compiling into d-DNNF

 Requires intermediate encoding in CNF  Auxiliary variables needed (for every rule with >1 literal in body)  Compile CNF into d-DNNF

Conjunctions (˄) are decomposable Disjunctions (˅) are deterministic

“Real” d-DNNF is bigger

slide-34
SLIDE 34

Circuit Compilation

Boolean Circuit

[De Raedt et al., …] [Fierens et al.]

OBDD d-DNNF

17

slide-35
SLIDE 35

Circuit Compilation

Boolean Circuit

[De Raedt et al., …] [Fierens et al.]

OBDD d-DNNF

More succinct Tighter upper bounds Requires CNF representation Auxiliary variables needed

17

slide-36
SLIDE 36

Circuit Compilation

Boolean Circuit

[De Raedt et al., …] [Fierens et al.]

OBDD SDD

d-DNNF

18

slide-37
SLIDE 37

Circuit Compilation

Boolean Circuit

[De Raedt et al., …] [Fierens et al.]

OBDD SDD

d-DNNF Tighter upper bounds on their size

18

slide-38
SLIDE 38

Circuit Compilation

Boolean Circuit

[De Raedt et al., …] [Fierens et al.]

OBDD SDD

d-DNNF Apply operator (bottom-up compilation) Support for minimization

18

slide-39
SLIDE 39

Circuit Compilation

Boolean Circuit

[De Raedt et al., …] [Fierens et al.]

OBDD SDD

d-DNNF SDD combine desirable properties of OBDD and d-DNNF

18

slide-40
SLIDE 40

Circuit Compilation

19

 Compiling into SDD

CNF compilation Bottom-up compilation (apply-operator) Minimization

slide-41
SLIDE 41

Circuit Compilation

19

 Compiling into SDD

CNF compilation Bottom-up compilation (apply-operator) Minimization

slide-42
SLIDE 42

Circuit Compilation

19

 Compiling into SDD

CNF compilation Bottom-up compilation (apply-operator) Minimization

Disjunctions (decisions) Conjunctions

slide-43
SLIDE 43

Experimental Results ‘Smokers example’

20

 Four different approaches:

 c2d : compile CNF into d-DNNF  cnf : compile CNF into SDD  sdd_m : bottom-up compilation into SDD with minimization  sdd_f : bottom-up compilation into SDD with fixed variable ordering

slide-44
SLIDE 44

Experimental Results ‘Smokers example’

21

 Four different approaches:

 c2d : compile CNF into d-DNNF  cnf : compile CNF into SDD  sdd_m : bottom-up compilation into SDD with minimization  sdd_f : bottom-up compilation into SDD with fixed variable ordering

Compilation Time

(until out of memory)

slide-45
SLIDE 45

Experimental Results ‘Smokers example’

22

 Four different approaches:

 c2d : compile CNF into d-DNNF  cnf : compile CNF into SDD  sdd_m : bottom-up compilation into SDD with minimization  sdd_f : bottom-up compilation into SDD with fixed variable ordering

Circuit Size

(until out of memory)

slide-46
SLIDE 46

Conclusions

Boolean Circuit

[De Raedt et al., …] [Vlasselaer et al.] [Fierens et al.]

OBDD SDD

d-DNNF

23

http://dtai.cs.kuleuven.be/problog/ http://reasoning.cs.ucla.edu/