Draft Connecting Width and Structure in Knowledge Compilation - - PowerPoint PPT Presentation

draft
SMART_READER_LITE
LIVE PREVIEW

Draft Connecting Width and Structure in Knowledge Compilation - - PowerPoint PPT Presentation

Draft Connecting Width and Structure in Knowledge Compilation Antoine Amarilli 1 , Mikal Monet 1 , 3 , Pierre Senellart 2 , 3 March 28th, 2018 1 LTCI, Tlcom ParisTech, Universit Paris-Saclay; Paris, France 2 cole normale suprieure,


slide-1
SLIDE 1

Draft

Connecting Width and Structure in Knowledge Compilation

Antoine Amarilli1, Mikaël Monet1,3, Pierre Senellart2,3 March 28th, 2018 1LTCI, Télécom ParisTech, Université Paris-Saclay; Paris, France 2École normale supérieure, PSL Reasearch University; Paris, France 3Inria Paris; Paris, France
slide-2
SLIDE 2

Draft

What is Knowledge Compilation?

  • You have a task
→ Boolean SAT (is there a satisfying assignment?) 1/20
slide-3
SLIDE 3

Draft

What is Knowledge Compilation?

  • You have a task
→ Boolean SAT (is there a satisfying assignment?) → #SAT (model counting) (how many satisfying assignments?) 1/20
slide-4
SLIDE 4

Draft

What is Knowledge Compilation?

  • You have a task
→ Boolean SAT (is there a satisfying assignment?) → #SAT (model counting) (how many satisfying assignments?) → probabilistic evaluation 1/20
slide-5
SLIDE 5

Draft

What is Knowledge Compilation?

  • You have a task
→ Boolean SAT (is there a satisfying assignment?) → #SAT (model counting) (how many satisfying assignments?) → probabilistic evaluation → enumeration 1/20
slide-6
SLIDE 6

Draft

What is Knowledge Compilation?

  • You have a task
→ Boolean SAT (is there a satisfying assignment?) → #SAT (model counting) (how many satisfying assignments?) → probabilistic evaluation → enumeration
  • Idea: compile the input into a format that is designed to solve

efficiently your task

1/20
slide-7
SLIDE 7

Draft

Why would I do that?

  • Without knowledge compilation

Input class C1 Result

  • Algo. 1
2/20
slide-8
SLIDE 8

Draft

Why would I do that?

  • Without knowledge compilation

Input class C1 Result

  • Algo. 1

Input class C2 Result

  • Algo. 2
2/20
slide-9
SLIDE 9

Draft

Why would I do that?

  • Without knowledge compilation

Input class C1 Result

  • Algo. 1

Input class C2 Result

  • Algo. 2

Input class C3 Result

  • Algo. 3

...

2/20
slide-10
SLIDE 10

Draft

Why would I do that?

  • Without knowledge compilation

Input class C1 Result

  • Algo. 1

Input class C2 Result

  • Algo. 2

Input class C3 Result

  • Algo. 3

...

  • With knowledge compilation:
2/20
slide-11
SLIDE 11

Draft

Why would I do that?

  • Without knowledge compilation

Input class C1 Result

  • Algo. 1

Input class C2 Result

  • Algo. 2

Input class C3 Result

  • Algo. 3

...

  • With knowledge compilation:

Input class C1 Input class C2 Input class C3 Compilation target for your task Result Generic algo.

2/20
slide-12
SLIDE 12

Draft

Why would I do that?

  • Without knowledge compilation

Input class C1 Result

  • Algo. 1

Input class C2 Result

  • Algo. 2

Input class C3 Result

  • Algo. 3

...

  • With knowledge compilation:

Input class C1 Input class C2 Input class C3 Compilation target for your task Result Generic algo.

  • Algo. 1′
2/20
slide-13
SLIDE 13

Draft

Why would I do that?

  • Without knowledge compilation

Input class C1 Result

  • Algo. 1

Input class C2 Result

  • Algo. 2

Input class C3 Result

  • Algo. 3

...

  • With knowledge compilation:

Input class C1 Input class C2 Input class C3 Compilation target for your task Result Generic algo.

  • Algo. 1′
  • Algo. 2′
2/20
slide-14
SLIDE 14

Draft

Why would I do that?

  • Without knowledge compilation

Input class C1 Result

  • Algo. 1

Input class C2 Result

  • Algo. 2

Input class C3 Result

  • Algo. 3

...

  • With knowledge compilation:

Input class C1 Input class C2 Input class C3 Compilation target for your task Result Generic algo.

  • Algo. 1′
  • Algo. 2′
  • Algo. 3′
2/20
slide-15
SLIDE 15

Draft

Why would I do that?

  • Without knowledge compilation

Input class C1 Result

  • Algo. 1

Input class C2 Result

  • Algo. 2

Input class C3 Result

  • Algo. 3

...

  • With knowledge compilation: modularity!

Input class C1 Input class C2 Input class C3 Compilation target for your task Result Generic algo.

  • Algo. 1′
  • Algo. 2′
  • Algo. 3′
2/20
slide-16
SLIDE 16

Draft

Studying the compilation targets

  • Tradeoffs between:
→ Complexity of compilation (conciseness of the compilation target) → Complexity of solving the task

Input Ctarget Compilation Result Complexity

3/20
slide-17
SLIDE 17

Draft

Studying the compilation targets

  • Tradeoffs between:
→ Complexity of compilation (conciseness of the compilation target) → Complexity of solving the task

Input Ctarget Compilation Result Complexity Truth table

3/20
slide-18
SLIDE 18

Draft

Studying the compilation targets

  • Tradeoffs between:
→ Complexity of compilation (conciseness of the compilation target) → Complexity of solving the task

Input Ctarget Compilation Result Complexity Truth table Evaluation

3/20
slide-19
SLIDE 19

Draft

Studying the compilation targets

  • Tradeoffs between:
→ Complexity of compilation (conciseness of the compilation target) → Complexity of solving the task

Input Ctarget Compilation Result Complexity Truth table O(1) Evaluation

3/20
slide-20
SLIDE 20

Draft

Studying the compilation targets

  • Tradeoffs between:
→ Complexity of compilation (conciseness of the compilation target) → Complexity of solving the task

Input Ctarget Compilation Result Complexity Truth table O(1) Evaluation SAT

3/20
slide-21
SLIDE 21

Draft

Studying the compilation targets

  • Tradeoffs between:
→ Complexity of compilation (conciseness of the compilation target) → Complexity of solving the task

Input Ctarget Compilation Result Complexity Truth table O(1) O(n) Evaluation SAT

3/20
slide-22
SLIDE 22

Draft

Studying the compilation targets

  • Tradeoffs between:
→ Complexity of compilation (conciseness of the compilation target) → Complexity of solving the task

Input Ctarget Compilation Result Complexity Truth table O(1) O(n) Evaluation SAT #SAT

3/20
slide-23
SLIDE 23

Draft

Studying the compilation targets

  • Tradeoffs between:
→ Complexity of compilation (conciseness of the compilation target) → Complexity of solving the task

Input Ctarget Compilation Result Complexity Truth table O(1) O(n) O(n) Evaluation SAT #SAT

3/20
slide-24
SLIDE 24

Draft

Studying the compilation targets

  • Tradeoffs between:
→ Complexity of compilation (conciseness of the compilation target) → Complexity of solving the task

Input Ctarget Compilation Result Complexity DNF Evaluation SAT #SAT

3/20
slide-25
SLIDE 25

Draft

Studying the compilation targets

  • Tradeoffs between:
→ Complexity of compilation (conciseness of the compilation target) → Complexity of solving the task

Input Ctarget Compilation Result Complexity DNF O(n) Evaluation SAT #SAT

3/20
slide-26
SLIDE 26

Draft

Studying the compilation targets

  • Tradeoffs between:
→ Complexity of compilation (conciseness of the compilation target) → Complexity of solving the task

Input Ctarget Compilation Result Complexity DNF O(n) O(n) Evaluation SAT #SAT

3/20
slide-27
SLIDE 27

Draft

Studying the compilation targets

  • Tradeoffs between:
→ Complexity of compilation (conciseness of the compilation target) → Complexity of solving the task

Input Ctarget Compilation Result Complexity DNF O(n) O(n) #P hard Evaluation SAT #SAT

3/20
slide-28
SLIDE 28

Draft

Studying the compilation targets

  • Tradeoffs between:
→ Complexity of compilation (conciseness of the compilation target) → Complexity of solving the task

Input Ctarget Compilation Result Complexity Boolean circuit Evaluation SAT #SAT

3/20
slide-29
SLIDE 29

Draft

Studying the compilation targets

  • Tradeoffs between:
→ Complexity of compilation (conciseness of the compilation target) → Complexity of solving the task

Input Ctarget Compilation Result Complexity Boolean circuit O(n) Evaluation SAT #SAT

3/20
slide-30
SLIDE 30

Draft

Studying the compilation targets

  • Tradeoffs between:
→ Complexity of compilation (conciseness of the compilation target) → Complexity of solving the task

Input Ctarget Compilation Result Complexity Boolean circuit O(n) NP hard Evaluation SAT #SAT

3/20
slide-31
SLIDE 31

Draft

Studying the compilation targets

  • Tradeoffs between:
→ Complexity of compilation (conciseness of the compilation target) → Complexity of solving the task

Input Ctarget Compilation Result Complexity Boolean circuit O(n) NP hard #P hard Evaluation SAT #SAT

3/20
slide-32
SLIDE 32

Draft

Studying the compilation targets

  • Tradeoffs between:
→ Complexity of compilation (conciseness of the compilation target) → Complexity of solving the task

Input Ctarget Compilation Result Complexity Boolean circuit O(n) NP hard #P hard Evaluation SAT #SAT → When can we convert from one target to another?

3/20
slide-33
SLIDE 33

Draft

Studying the compilation targets

  • Tradeoffs between:
→ Complexity of compilation (conciseness of the compilation target) → Complexity of solving the task

Input Ctarget Compilation Result Complexity Boolean circuit O(n) NP hard #P hard Evaluation SAT #SAT → When can we convert from one target to another?

  • We are interested by #SAT and probability evaluation
3/20
slide-34
SLIDE 34

Draft

Target classes in knowledge compilation

For #SAT and probabilistic evaluation, two main restrictions on compilation targets:

4/20
slide-35
SLIDE 35

Draft

Target classes in knowledge compilation

For #SAT and probabilistic evaluation, two main restrictions on compilation targets: Width-based:

  • Bounded pathwidth/treewidth Boolean circuits, CNFs, DNFs, etc.
4/20
slide-36
SLIDE 36

Draft

Target classes in knowledge compilation

For #SAT and probabilistic evaluation, two main restrictions on compilation targets: Width-based:

  • Bounded pathwidth/treewidth Boolean circuits, CNFs, DNFs, etc.
→ message passing algorithm for #SAT and probabilistic evaluation 4/20
slide-37
SLIDE 37

Draft

Target classes in knowledge compilation

For #SAT and probabilistic evaluation, two main restrictions on compilation targets: Width-based:

  • Bounded pathwidth/treewidth Boolean circuits, CNFs, DNFs, etc.
→ message passing algorithm for #SAT and probabilistic evaluation
  • Links with Bayesian networks
4/20
slide-38
SLIDE 38

Draft

Target classes in knowledge compilation

For #SAT and probabilistic evaluation, two main restrictions on compilation targets: Width-based:

  • Bounded pathwidth/treewidth Boolean circuits, CNFs, DNFs, etc.
→ message passing algorithm for #SAT and probabilistic evaluation
  • Links with Bayesian networks

Semantics-based:

  • Ordered Binary Decision Diagrams (OBDDs)/ Deterministic

Structured Decomposable Negation Normal Forms (d-SDNNFs)

4/20
slide-39
SLIDE 39

Draft

Target classes in knowledge compilation

For #SAT and probabilistic evaluation, two main restrictions on compilation targets: Width-based:

  • Bounded pathwidth/treewidth Boolean circuits, CNFs, DNFs, etc.
→ message passing algorithm for #SAT and probabilistic evaluation
  • Links with Bayesian networks

Semantics-based:

  • Ordered Binary Decision Diagrams (OBDDs)/ Deterministic

Structured Decomposable Negation Normal Forms (d-SDNNFs)

→ #SAT and probabilistic evaluation are easy because these classes have strong semantic constraints 4/20
slide-40
SLIDE 40

Draft

Target classes in knowledge compilation

For #SAT and probabilistic evaluation, two main restrictions on compilation targets: Width-based:

  • Bounded pathwidth/treewidth Boolean circuits, CNFs, DNFs, etc.
→ message passing algorithm for #SAT and probabilistic evaluation
  • Links with Bayesian networks

Semantics-based:

  • Ordered Binary Decision Diagrams (OBDDs)/ Deterministic

Structured Decomposable Negation Normal Forms (d-SDNNFs)

→ #SAT and probabilistic evaluation are easy because these classes have strong semantic constraints
  • Used to understand #SAT solvers
4/20
slide-41
SLIDE 41

Draft

Target classes in knowledge compilation

For #SAT and probabilistic evaluation, two main restrictions on compilation targets: Width-based:

  • Bounded pathwidth/treewidth Boolean circuits, CNFs, DNFs, etc.
→ message passing algorithm for #SAT and probabilistic evaluation
  • Links with Bayesian networks

Semantics-based:

  • Ordered Binary Decision Diagrams (OBDDs)/ Deterministic

Structured Decomposable Negation Normal Forms (d-SDNNFs)

→ #SAT and probabilistic evaluation are easy because these classes have strong semantic constraints
  • Used to understand #SAT solvers

Question: what are the links beetween the two?

4/20
slide-42
SLIDE 42

Draft

Plan

  • Circuit C of treewidth k

d-SDNNF O(|C| × exp(k))

5/20
slide-43
SLIDE 43

Draft

Plan

  • Circuit C of treewidth k

d-SDNNF O(|C| × exp(k))

  • + ≃ matching lower bound
5/20
slide-44
SLIDE 44

Draft

Plan

  • Circuit C of treewidth k

d-SDNNF O(|C| × exp(k))

  • + ≃ matching lower bound

Then

  • (not us)

DNF/CNF ϕ of pathwidth k OBDD O(|ϕ| × exp(k))

5/20
slide-45
SLIDE 45

Draft

Plan

  • Circuit C of treewidth k

d-SDNNF O(|C| × exp(k))

  • + ≃ matching lower bound

Then

  • (not us)

DNF/CNF ϕ of pathwidth k OBDD O(|ϕ| × exp(k))

  • + matching lower bound
5/20
slide-46
SLIDE 46

Draft

Plan

  • Circuit C of treewidth k

d-SDNNF O(|C| × exp(k))

  • + ≃ matching lower bound

Then

  • (not us)

DNF/CNF ϕ of pathwidth k OBDD O(|ϕ| × exp(k))

  • + matching lower bound

Then

  • Application to provenance and probabilistic databases
5/20
slide-47
SLIDE 47

Draft

Treewidth and d-SDNNFs

6/20
slide-48
SLIDE 48

Draft

Bounded treewidth Boolean circuits

∧ ∧ x ¬ ∨ t ¬ ∨ ∧ z y

7/20
slide-49
SLIDE 49

Draft

Bounded treewidth Boolean circuits

∧ ∧ x ¬ ∨ t ¬ ∨ ∧ z y Treewidth of C = that of the underlying graph

7/20
slide-50
SLIDE 50

Draft

Bounded treewidth Boolean circuits

∧ ∧ x ¬ ∨ t ¬ ∨ ∧ z y Treewidth of C = that of the underlying graph We can do message passing: Theorem (Lauritzen & Spielgelhalter, 1988) Fix k ∈ N. Given a Boolean circuit C of treewidth k, we can compute its probability in time O(f(k) × |C|), where f is singly exponential

7/20
slide-51
SLIDE 51

Draft

d-SDNNF

∨ ∧ x ∧ y ¬ z ∧ ¬ x ∧ y z

8/20
slide-52
SLIDE 52

Draft

d-SDNNF

∨ ∧ x ∧ y ¬ z ∧ ¬ x ∧ y z

  • Negation Normal Form: negations
  • nly applied to the leaves
8/20
slide-53
SLIDE 53

Draft

d-SDNNF

∨ ∧ x ∧ y ¬ z ∧ ¬ x ∧ y z

  • Negation Normal Form: negations
  • nly applied to the leaves
  • Decomposable: inputs of ∧-gates are

independent (no variable has a path to two different inputs of the same ∧-gate)

8/20
slide-54
SLIDE 54

Draft

d-SDNNF

∨ ∧ x ∧ y ¬ z ∧ ¬ x ∧ y z

  • Negation Normal Form: negations
  • nly applied to the leaves
  • Decomposable: inputs of ∧-gates are

independent (no variable has a path to two different inputs of the same ∧-gate)

→ SAT can be solved efficiently 8/20
slide-55
SLIDE 55

Draft

d-SDNNF

∨ ∧ x ∧ y ¬ z ∧ ¬ x ∧ y z

  • Negation Normal Form: negations
  • nly applied to the leaves
  • Decomposable: inputs of ∧-gates are

independent (no variable has a path to two different inputs of the same ∧-gate)

→ SAT can be solved efficiently
  • Deterministic: inputs of ∨-gates are

mutually exclusive

8/20
slide-56
SLIDE 56

Draft

d-SDNNF

∨ ∧ x ∧ y ¬ z ∧ ¬ x ∧ y z

  • Negation Normal Form: negations
  • nly applied to the leaves
  • Decomposable: inputs of ∧-gates are

independent (no variable has a path to two different inputs of the same ∧-gate)

→ SAT can be solved efficiently
  • Deterministic: inputs of ∨-gates are

mutually exclusive

→ #SAT and probability evaluation 8/20
slide-57
SLIDE 57

Draft

d-SDNNF

∨ ∧ x ∧ y ¬ z ∧ ¬ x ∧ y z

  • z

y x

  • Negation Normal Form: negations
  • nly applied to the leaves
  • Decomposable: inputs of ∧-gates are

independent (no variable has a path to two different inputs of the same ∧-gate)

→ SAT can be solved efficiently
  • Deterministic: inputs of ∨-gates are

mutually exclusive

→ #SAT and probability evaluation
  • Structured: there is a vtree that

structures the ∧-gates

8/20
slide-58
SLIDE 58

Draft

d-SDNNF

∨ ∧ x ∧ y ¬ z ∧ ¬ x ∧ y z

  • z

y x

  • Negation Normal Form: negations
  • nly applied to the leaves
  • Decomposable: inputs of ∧-gates are

independent (no variable has a path to two different inputs of the same ∧-gate)

→ SAT can be solved efficiently
  • Deterministic: inputs of ∨-gates are

mutually exclusive

→ #SAT and probability evaluation
  • Structured: there is a vtree that

structures the ∧-gates

→ Enumeration 8/20
slide-59
SLIDE 59

Draft

Treewidth and d-SDNNFs: Upper bound

Theorem (Bova & Szeider, 2017) Let C be a Boolean circuit on m variables of treewidth k. There exists a d-SDNNF equivalent to C of size O(m × g(k)), where g is doubly exponential

9/20
slide-60
SLIDE 60

Draft

Treewidth and d-SDNNFs: Upper bound

Theorem (Bova & Szeider, 2017) Let C be a Boolean circuit on m variables of treewidth k. There exists a d-SDNNF equivalent to C of size O(m × g(k)), where g is doubly exponential Drawbacks: non constructive

9/20
slide-61
SLIDE 61

Draft

Treewidth and d-SDNNFs: Upper bound

Theorem (Bova & Szeider, 2017) Let C be a Boolean circuit on m variables of treewidth k. There exists a d-SDNNF equivalent to C of size O(m × g(k)), where g is doubly exponential Drawbacks: non constructive Theorem (This paper) Let C be a Boolean circuit of treewidth k. We can compute a d-SDNNF equivalent to C in time O(|C| × f(k)), where f is singly exponential

9/20
slide-62
SLIDE 62

Draft

Treewidth and d-SDNNFs: Upper bound

Theorem (Bova & Szeider, 2017) Let C be a Boolean circuit on m variables of treewidth k. There exists a d-SDNNF equivalent to C of size O(m × g(k)), where g is doubly exponential Drawbacks: non constructive Theorem (This paper) Let C be a Boolean circuit of treewidth k. We can compute a d-SDNNF equivalent to C in time O(|C| × f(k)), where f is singly exponential Applications: recapturing message passing, and enumeration of satisfying valuations

9/20
slide-63
SLIDE 63

Draft

Construction sketch

10/20
slide-64
SLIDE 64

Draft

Construction sketch

10/20
slide-65
SLIDE 65

Draft

Construction sketch

10/20
slide-66
SLIDE 66

Draft

Construction sketch

10/20
slide-67
SLIDE 67

Draft

Construction sketch

10/20
slide-68
SLIDE 68

Draft

Construction sketch

10/20
slide-69
SLIDE 69

Draft

Construction sketch

10/20
slide-70
SLIDE 70

Draft

Construction sketch

10/20
slide-71
SLIDE 71

Draft

Construction sketch

10/20
slide-72
SLIDE 72

Draft

Construction sketch

10/20
slide-73
SLIDE 73

Draft

Construction sketch

10/20
slide-74
SLIDE 74

Draft

Construction sketch

10/20
slide-75
SLIDE 75

Draft

Construction sketch

10/20
slide-76
SLIDE 76

Draft

Construction sketch

10/20
slide-77
SLIDE 77

Draft

Construction sketch

10/20
slide-78
SLIDE 78

Draft

Construction sketch

10/20
slide-79
SLIDE 79

Draft

Construction sketch

10/20
slide-80
SLIDE 80

Draft

Construction sketch

10/20
slide-81
SLIDE 81

Draft

Treewidth and d-SDNNFs: Lower bound

  • Already applies to very restricted Boolean circuits: monotone

DNFs and CNFs

11/20
slide-82
SLIDE 82

Draft

Treewidth and d-SDNNFs: Lower bound

  • Already applies to very restricted Boolean circuits: monotone

DNFs and CNFs

  • Treewidth of a DNF/CNF: that of its Gaifman graph
11/20
slide-83
SLIDE 83

Draft

Treewidth and d-SDNNFs: Lower bound

  • Already applies to very restricted Boolean circuits: monotone

DNFs and CNFs

  • Treewidth of a DNF/CNF: that of its Gaifman graph
  • Arity: size of the largest clause
11/20
slide-84
SLIDE 84

Draft

Treewidth and d-SDNNFs: Lower bound

  • Already applies to very restricted Boolean circuits: monotone

DNFs and CNFs

  • Treewidth of a DNF/CNF: that of its Gaifman graph
  • Arity: size of the largest clause
  • Degree: maximal number of clauses to which a variable belongs
11/20
slide-85
SLIDE 85

Draft

Treewidth and d-SDNNFs: Lower bound

  • Already applies to very restricted Boolean circuits: monotone

DNFs and CNFs

  • Treewidth of a DNF/CNF: that of its Gaifman graph
  • Arity: size of the largest clause
  • Degree: maximal number of clauses to which a variable belongs

Theorem Let ϕ be a monotone DNF of treewidth k, let a := arity(ϕ) and d := degree(ϕ). Then any d-SDNNF for ϕ has size 2

  • k
3×a3×d2
  • − 1
11/20
slide-86
SLIDE 86

Draft

Treewidth and d-SDNNFs: Lower bound

  • Already applies to very restricted Boolean circuits: monotone

DNFs and CNFs

  • Treewidth of a DNF/CNF: that of its Gaifman graph
  • Arity: size of the largest clause
  • Degree: maximal number of clauses to which a variable belongs

Theorem Let ϕ be a monotone DNF of treewidth k, let a := arity(ϕ) and d := degree(ϕ). Then any d-SDNNF for ϕ has size 2

  • k
3×a3×d2
  • − 1
  • For CNFs, the bound even works for (non-deterministic) SDNNF
11/20
slide-87
SLIDE 87

Draft

Treewidth and d-SDNNFs: Lower bound

  • Already applies to very restricted Boolean circuits: monotone

DNFs and CNFs

  • Treewidth of a DNF/CNF: that of its Gaifman graph
  • Arity: size of the largest clause
  • Degree: maximal number of clauses to which a variable belongs

Theorem Let ϕ be a monotone DNF of treewidth k, let a := arity(ϕ) and d := degree(ϕ). Then any d-SDNNF for ϕ has size 2

  • k
3×a3×d2
  • − 1
  • For CNFs, the bound even works for (non-deterministic) SDNNF
  • The bound is generic: it applies to any monotone DNF/CNF
11/20
slide-88
SLIDE 88

Draft

Pathwidth and OBDDs

12/20
slide-89
SLIDE 89

Draft

Ordered Binary Decision Diagrams (OBDDs)

  • DAG with sink nodes {⊤, ⊥} and internal

nodes labeled by variables

13/20
slide-90
SLIDE 90

Draft

Ordered Binary Decision Diagrams (OBDDs)

  • DAG with sink nodes {⊤, ⊥} and internal

nodes labeled by variables

  • Semantics: follow the path of an assignment

to get the value of the Boolean function

13/20
slide-91
SLIDE 91

Draft

Ordered Binary Decision Diagrams (OBDDs)

  • DAG with sink nodes {⊤, ⊥} and internal

nodes labeled by variables

  • Semantics: follow the path of an assignment

to get the value of the Boolean function

  • There is a total order on the variables

v = X1 X2 X3 X4 such that each root-to-sink path is compatible with v

13/20
slide-92
SLIDE 92

Draft

Ordered Binary Decision Diagrams (OBDDs)

  • DAG with sink nodes {⊤, ⊥} and internal

nodes labeled by variables

  • Semantics: follow the path of an assignment

to get the value of the Boolean function

  • There is a total order on the variables

v = X1 X2 X3 X4 such that each root-to-sink path is compatible with v

  • Compute probability bottom-up
13/20
slide-93
SLIDE 93

Draft

Ordered Binary Decision Diagrams (OBDDs)

  • DAG with sink nodes {⊤, ⊥} and internal

nodes labeled by variables

  • Semantics: follow the path of an assignment

to get the value of the Boolean function

  • There is a total order on the variables

v = X1 X2 X3 X4 such that each root-to-sink path is compatible with v

  • Compute probability bottom-up

Prπ(•) = π(X3) × Prπ(•) +(1 − π(X3)) × Prπ(•)

13/20
slide-94
SLIDE 94

Draft

Ordered Binary Decision Diagrams (OBDDs)

  • DAG with sink nodes {⊤, ⊥} and internal

nodes labeled by variables

  • Semantics: follow the path of an assignment

to get the value of the Boolean function

  • There is a total order on the variables

v = X1 X2 X3 X4 such that each root-to-sink path is compatible with v

  • Compute probability bottom-up

Prπ(•) = π(X3) × Prπ(•) +(1 − π(X3)) × Prπ(•)

  • Width of the OBDD ≃ largest number of

nodes that are labeled by the same variable

13/20
slide-95
SLIDE 95

Draft

Pathwidth and OBDDs: Upper and lower bounds

Upper bound: Theorem (Bova & Slivovsky, 2017) Let ϕ be a CNF or DNF of pathwidth k. We can compile ϕ into an OBDD

  • f width 2k+2 (hence of size nb_vars × 2k+2)
14/20
slide-96
SLIDE 96

Draft

Pathwidth and OBDDs: Upper and lower bounds

Upper bound: Theorem (Bova & Slivovsky, 2017) Let ϕ be a CNF or DNF of pathwidth k. We can compile ϕ into an OBDD

  • f width 2k+2 (hence of size nb_vars × 2k+2)

Lower bound: Theorem (This paper) Let ϕ be a monotone CNF or DNF of pathwidth k, and let a := arity(ϕ) and d := degree(ϕ). Then any OBDD for ϕ has width 2

  • k
a3×d2
  • 14/20
slide-97
SLIDE 97

Draft

Pathwidth and OBDDs: Upper and lower bounds

Upper bound: Theorem (Bova & Slivovsky, 2017) Let ϕ be a CNF or DNF of pathwidth k. We can compile ϕ into an OBDD

  • f width 2k+2 (hence of size nb_vars × 2k+2)

Lower bound: Theorem (This paper) Let ϕ be a monotone CNF or DNF of pathwidth k, and let a := arity(ϕ) and d := degree(ϕ). Then any OBDD for ϕ has width 2

  • k
a3×d2
  • Again, this is a generic lower bound!
14/20
slide-98
SLIDE 98

Draft

Pathwidth and OBDDs: Upper and lower bounds

Upper bound: Theorem (Bova & Slivovsky, 2017) Let ϕ be a CNF or DNF of pathwidth k. We can compile ϕ into an OBDD

  • f width 2k+2 (hence of size nb_vars × 2k+2)

Lower bound: Theorem (This paper) Let ϕ be a monotone CNF or DNF of pathwidth k, and let a := arity(ϕ) and d := degree(ϕ). Then any OBDD for ϕ has width 2

  • k
a3×d2
  • Again, this is a generic lower bound!
  • For monotone DNF/CNF ϕ of constant arity and degree, the

smallest width of an OBDD for ϕ is 2Θ(pathwidth(ϕ))

14/20
slide-99
SLIDE 99

Draft

Application to provenance

15/20
slide-100
SLIDE 100

Draft

Provenance: definition

Definition The provenance Prov(q, I) of query q on relational instance I is the Boolean function with facts of I as variables and such that for any valuation ν : I → {0, 1}, Prov(q, I) evaluates to ⊤ under ν iff {F ∈ I|ν(F) = 1} | = q

16/20
slide-101
SLIDE 101

Draft

Example: Provenance

∃x y z (R(x, y) ∧ S(y, z)) ∨ (S(x, y) ∧ R(y, z)) R b c c a c d S a b d b

17/20
slide-102
SLIDE 102

Draft

Example: Provenance

∃x y z (R(x, y) ∧ S(y, z)) ∨ (S(x, y) ∧ R(y, z)) R b c c a c d S a b d b b d c a S R R S R

17/20
slide-103
SLIDE 103

Draft

Example: Provenance

∃x y z (R(x, y) ∧ S(y, z)) ∨ (S(x, y) ∧ R(y, z)) b d c a S R R S R

17/20
slide-104
SLIDE 104

Draft

Example: Provenance

∃x y z (R(x, y) ∧ S(y, z)) ∨ (S(x, y) ∧ R(y, z)) b d c a S R R S R Prov(q, I) = [S(a, b) ∧ (R(b, c) ∨ R(c, a))]

17/20
slide-105
SLIDE 105

Draft

Example: Provenance

∃x y z (R(x, y) ∧ S(y, z)) ∨ (S(x, y) ∧ R(y, z)) b d c a S R R S R Prov(q, I) = [S(a, b) ∧ (R(b, c) ∨ R(c, a))] ∨ [S(d, b) ∧ (R(b, c) ∨ R(c, d))]

17/20
slide-106
SLIDE 106

Draft

Example: Provenance

∃x y z (R(x, y) ∧ S(y, z)) ∨ (S(x, y) ∧ R(y, z)) b d c a S R R S R R(b, c) R(c, a) R(c, d) ∨ ∨ S(a, b) S(d, b) ∧ ∧ ∨ Prov(q, I) = [S(a, b) ∧ (R(b, c) ∨ R(c, a))] ∨ [S(d, b) ∧ (R(b, c) ∨ R(c, d))]

17/20
slide-107
SLIDE 107

Draft

Treewidth of instances

  • We can compute a lineage whose treewidth is exponential in the

treewidth of the database

18/20
slide-108
SLIDE 108

Draft

Treewidth of instances

  • We can compute a lineage whose treewidth is exponential in the

treewidth of the database

  • Conversely, there are queries for which the lineage as a DNF has

same treewidth as the instance

18/20
slide-109
SLIDE 109

Draft

Treewidth of instances

  • We can compute a lineage whose treewidth is exponential in the

treewidth of the database

  • Conversely, there are queries for which the lineage as a DNF has

same treewidth as the instance

  • Hence, there are queries for which d-SDNNF representations of

the lineage have size exponential in the treewidth of the database!

18/20
slide-110
SLIDE 110

Draft

Intricate queries

Theorem (This paper) There is a constant d ∈ N such that the following is true. Let σ be an arity-2 signature, and Q a connected UCQ= which is intricate on σ. For any instance I on σ of treewidth k, any d-SDNNF representing the lineage of Q on I has size 2Ω(k1/d)

19/20
slide-111
SLIDE 111

Draft

Conclusion

  • Strong connections between width- and semantics-based

restrictions in knowledge compilation:

20/20
slide-112
SLIDE 112

Draft

Conclusion

  • Strong connections between width- and semantics-based

restrictions in knowledge compilation:

→ Recapture message passing on bounded treewidth circuits by compiling them to d-SDNNF 20/20
slide-113
SLIDE 113

Draft

Conclusion

  • Strong connections between width- and semantics-based

restrictions in knowledge compilation:

→ Recapture message passing on bounded treewidth circuits by compiling them to d-SDNNF → Compilation is singly exponential in the treewidth of the circuit and cannot be avoided 20/20
slide-114
SLIDE 114

Draft

Conclusion

  • Strong connections between width- and semantics-based

restrictions in knowledge compilation:

→ Recapture message passing on bounded treewidth circuits by compiling them to d-SDNNF → Compilation is singly exponential in the treewidth of the circuit and cannot be avoided → The width of an OBDD and the pathwidth of a DNF/CNF are within a constant of each other 20/20
slide-115
SLIDE 115

Draft

Conclusion

  • Strong connections between width- and semantics-based

restrictions in knowledge compilation:

→ Recapture message passing on bounded treewidth circuits by compiling them to d-SDNNF → Compilation is singly exponential in the treewidth of the circuit and cannot be avoided → The width of an OBDD and the pathwidth of a DNF/CNF are within a constant of each other
  • Future work:
→ Get rid of arity and degree assumptions? → Notion of width for d-SDNNFs? → Lower bound for d-DNNFs?

Thanks for your attention!

20/20