First-Order Knowledge Compilation for Probabilistic Reasoning Guy - - PowerPoint PPT Presentation

first order knowledge compilation for probabilistic
SMART_READER_LITE
LIVE PREVIEW

First-Order Knowledge Compilation for Probabilistic Reasoning Guy - - PowerPoint PPT Presentation

First-Order Knowledge Compilation for Probabilistic Reasoning Guy Van den Broeck based on joint work with Adnan Darwiche, Dan Suciu, and many others MOTIVATION 1 A Simple Reasoning Problem ... ? Probability that Card1 is Hearts? [Van den


slide-1
SLIDE 1

First-Order Knowledge Compilation for Probabilistic Reasoning

Guy Van den Broeck based on joint work with Adnan Darwiche, Dan Suciu, and many others

slide-2
SLIDE 2

MOTIVATION 1

slide-3
SLIDE 3

...

A Simple Reasoning Problem

?

Probability that Card1 is Hearts?

[Van den Broeck; AAAI-KRR‟15]

slide-4
SLIDE 4

...

A Simple Reasoning Problem

?

Probability that Card1 is Hearts? 1/4

[Van den Broeck; AAAI-KRR‟15]

slide-5
SLIDE 5

A Simple Reasoning Problem

... ?

Probability that Card52 is Spades given that Card1 is QH?

[Van den Broeck; AAAI-KRR‟15]

slide-6
SLIDE 6

A Simple Reasoning Problem

... ?

Probability that Card52 is Spades given that Card1 is QH? 13/51

[Van den Broeck; AAAI-KRR‟15]

slide-7
SLIDE 7

Automated Reasoning

Let us automate this:

  • 1. CNF encoding for deck of cards
  • 2. Compile to tractable knowledge base (e.g., d-DNNF)
  • 3. Condition on observations/questions

“Card1 is hearts”

  • 4. Model counting
slide-8
SLIDE 8

Automated Reasoning

Let us automate this:

  • 1. CNF encoding for deck of cards
  • 2. Compile to tractable knowledge base (e.g., d-DNNF)
  • 3. Condition on observations/questions

“Card1 is hearts”

  • 4. Model counting

A typical BeyondNP pipeline!

slide-9
SLIDE 9

Automated Reasoning

Let us automate this:

  • 1. CNF encoding for deck of cards

Card(p1,c1) v Card(p1,c2) v … Card(p1,c1) v Card(p2,c1) v … ¬Card(p1,c1) v ¬Card(p1,c2) ¬Card(p1,c2) v ¬Card(p1,c3) … ¬Card(p2,c1) v ¬Card(p2,c2) …

slide-10
SLIDE 10

Let us automate this:

  • 1. CNF encoding for deck of cards
  • 2. Compile to tractable knowledge base (e.g., d-DNNF)
  • 3. Condition on observations/questions

“Card1 is hearts”

  • 4. Model counting

Which language to choose? Cards problem is easy: we want to be polynomial.

Automated Reasoning

slide-11
SLIDE 11

Deck of Cards Graphically

K♥ A♥ 2♥ 3♥

… …

Card(K♥,p14)

  • 2. Compile to tractable knowledge base
  • 3. Condition on observations/questions
  • 4. Model counting
slide-12
SLIDE 12

Deck of Cards Graphically

K♥ A♥ 2♥ 3♥

… …

Card(K♥,p14)

  • 2. Compile to tractable knowledge base
  • 3. Condition on observations/questions
  • 4. Model counting
slide-13
SLIDE 13

Deck of Cards Graphically

K♥ A♥ 2♥ 3♥

… …

Card(K♥,p14)

  • 2. Compile to tractable knowledge base
  • 3. Condition on observations/questions
  • 4. Model counting

¬ Card(K♥,p14)

slide-14
SLIDE 14

Deck of Cards Graphically

K♥ A♥ 2♥ 3♥

… …

  • 2. Compile to tractable knowledge base
  • 3. Condition on observations/questions
  • 4. Model counting

¬ Card(K♥,p14)

slide-15
SLIDE 15

Deck of Cards Graphically

K♥ A♥ 2♥ 3♥

… …

  • 2. Compile to tractable knowledge base
  • 3. Condition on observations/questions
  • 4. Model counting
slide-16
SLIDE 16

Deck of Cards Graphically

K♥ A♥ 2♥ 3♥

… …

  • 2. Compile to tractable knowledge base
  • 3. Condition on observations/questions
  • 4. Model counting: How many perfect matchings?
slide-17
SLIDE 17

Deck of Cards Graphically

K♥ A♥ 2♥ 3♥

… …

  • 2. Compile to tractable knowledge base
  • 3. Condition on observations/questions
  • 4. Model counting: How many perfect matchings?
slide-18
SLIDE 18

Observations

  • Deck of cards = complete bigraph
  • CD = removing edges in bigraph

Encode any bigraph in cards problem

  • CT = counting perfect matchings
  • Problem is #P-complete!

No language with CD and CT can represent the cards problem compactly, unless P=NP.

slide-19
SLIDE 19

...

What's Going On Here?

?

Probability that Card52 is Spades given that Card1 is QH?

[Van den Broeck; AAAI-KRR‟15]

slide-20
SLIDE 20

...

What's Going On Here?

?

Probability that Card52 is Spades given that Card1 is QH?

[Van den Broeck; AAAI-KRR‟15]

13/51

slide-21
SLIDE 21

...

What's Going On Here?

?

Probability that Card52 is Spades given that Card1 is QH? 13/51

[Van den Broeck; AAAI-KRR‟15]

slide-22
SLIDE 22

What's Going On Here?

? ...

Probability that Card52 is Spades given that Card2 is QH?

[Van den Broeck; AAAI-KRR‟15]

slide-23
SLIDE 23

What's Going On Here?

? ...

Probability that Card52 is Spades given that Card2 is QH? 13/51

[Van den Broeck; AAAI-KRR‟15]

slide-24
SLIDE 24

What's Going On Here?

? ...

Probability that Card52 is Spades given that Card3 is QH?

[Van den Broeck; AAAI-KRR‟15]

slide-25
SLIDE 25

What's Going On Here?

? ...

Probability that Card52 is Spades given that Card3 is QH? 13/51

[Van den Broeck; AAAI-KRR‟15]

slide-26
SLIDE 26

...

Tractable Reasoning

What's going on here? Which property makes reasoning tractable?

[Niepert, Van den Broeck; AAAI‟14], [Van den Broeck; AAAI-KRR‟15]

slide-27
SLIDE 27

...

Tractable Reasoning

What's going on here? Which property makes reasoning tractable?

⇒ Lifted Inference

 High-level (first-order) reasoning  Symmetry  Exchangeability

[Niepert, Van den Broeck; AAAI‟14], [Van den Broeck; AAAI-KRR‟15]

slide-28
SLIDE 28

Let us automate this:

 Relational/FO model  First-Order Knowledge Compilation

∀p, ∃c, Card(p,c) ∀c, ∃p, Card(p,c) ∀p, ∀c, ∀c‟, Card(p,c) ∧ Card(p,c‟) ⇒ c = c‟

...

slide-29
SLIDE 29

MOTIVATION 2

slide-30
SLIDE 30

Model Counting

  • Model = solution to a propositional logic formula Δ
  • Model counting = #SAT

Rain Cloudy Model? T T Yes T F No F T Yes F F Yes #SAT = 3

+

Δ = (Rain ⇒ Cloudy)

[Valiant] #P-hard, even for 2CNF

slide-31
SLIDE 31

Weighted Model Counting

  • Model = solution to a propositional logic formula Δ
  • Model counting = #SAT

Rain Cloudy Model? T T Yes T F No F T Yes F F Yes #SAT = 3

+

Δ = (Rain ⇒ Cloudy)

slide-32
SLIDE 32

Weighted Model Counting

  • Model = solution to a propositional logic formula Δ
  • Model counting = #SAT

Rain Cloudy Model? T T Yes T F No F T Yes F F Yes #SAT = 3 Weight 1 * 3 = 3 2 * 3 = 6 2 * 5 = 10

  • Weighted model counting (WMC)

– Weights for assignments to variables – Model weight is product of variable weights w(.)

+

Δ = (Rain ⇒ Cloudy)

w( R)=1 w(¬R)=2 w( C)=3 w(¬C)=5

slide-33
SLIDE 33

Weighted Model Counting

  • Model = solution to a propositional logic formula Δ
  • Model counting = #SAT

Rain Cloudy Model? T T Yes T F No F T Yes F F Yes #SAT = 3 Weight 1 * 3 = 3 2 * 3 = 6 2 * 5 = 10 WMC = 19

  • Weighted model counting (WMC)

– Weights for assignments to variables – Model weight is product of variable weights w(.)

+ +

Δ = (Rain ⇒ Cloudy)

w( R)=1 w(¬R)=2 w( C)=3 w(¬C)=5

slide-34
SLIDE 34

Assembly language for probabilistic reasoning and learning

Bayesian networks Factor graphs Probabilistic databases Relational Bayesian networks Probabilistic logic programs Markov Logic Weighted Model Counting

slide-35
SLIDE 35

First-Order Model Counting

Model = solution to first-order logic formula Δ

Δ = ∀d (Rain(d) ⇒ Cloudy(d)) Days = {Monday}

slide-36
SLIDE 36

First-Order Model Counting

Model = solution to first-order logic formula Δ

Rain(M) Cloudy(M) Model? T T Yes T F No F T Yes F F Yes

FOMC = 3

+ Δ = ∀d (Rain(d) ⇒ Cloudy(d)) Days = {Monday}

slide-37
SLIDE 37

Weighted First-Order Model Counting

Model = solution to first-order logic formula Δ

Rain(M) Cloudy(M) Rain(T) Cloudy(T) Model?

T T T T Yes T F T T No F T T T Yes F F T T Yes T T T F No T F T F No F T T F No F F T F No T T F T Yes T F F T No F T F T Yes F F F T Yes T T F F Yes T F F F No F T F F Yes F F F F Yes

Δ = ∀d (Rain(d) ⇒ Cloudy(d)) Days = {Monday Tuesday}

slide-38
SLIDE 38

Weighted First-Order Model Counting

Model = solution to first-order logic formula Δ

Rain(M) Cloudy(M) Rain(T) Cloudy(T) Model?

T T T T Yes T F T T No F T T T Yes F F T T Yes T T T F No T F T F No F T T F No F F T F No T T F T Yes T F F T No F T F T Yes F F F T Yes T T F F Yes T F F F No F T F F Yes F F F F Yes

#SAT = 9

+ Δ = ∀d (Rain(d) ⇒ Cloudy(d)) Days = {Monday Tuesday}

slide-39
SLIDE 39

Weighted First-Order Model Counting

Model = solution to first-order logic formula Δ

Weight

1 * 1 * 3 * 3 = 9 2 * 1* 3 * 3 = 18 2 * 1 * 5 * 3 = 30 1 * 2 * 3 * 3 = 18 2 * 2 * 3 * 3 = 36 2 * 2 * 5 * 3 = 60 1 * 2 * 3 * 5 = 30 2 * 2 * 3 * 5 = 60 2 * 2 * 5 * 5 = 100

Rain(M) Cloudy(M) Rain(T) Cloudy(T) Model?

T T T T Yes T F T T No F T T T Yes F F T T Yes T T T F No T F T F No F T T F No F F T F No T T F T Yes T F F T No F T F T Yes F F F T Yes T T F F Yes T F F F No F T F F Yes F F F F Yes

#SAT = 9

+ Δ = ∀d (Rain(d) ⇒ Cloudy(d)) Days = {Monday Tuesday} w( R)=1 w(¬R)=2 w( C)=3 w(¬C)=5

slide-40
SLIDE 40

Weighted First-Order Model Counting

Model = solution to first-order logic formula Δ

Weight

1 * 1 * 3 * 3 = 9 2 * 1* 3 * 3 = 18 2 * 1 * 5 * 3 = 30 1 * 2 * 3 * 3 = 18 2 * 2 * 3 * 3 = 36 2 * 2 * 5 * 3 = 60 1 * 2 * 3 * 5 = 30 2 * 2 * 3 * 5 = 60 2 * 2 * 5 * 5 = 100

WFOMC = 361

+

Rain(M) Cloudy(M) Rain(T) Cloudy(T) Model?

T T T T Yes T F T T No F T T T Yes F F T T Yes T T T F No T F T F No F T T F No F F T F No T T F T Yes T F F T No F T F T Yes F F F T Yes T T F F Yes T F F F No F T F F Yes F F F F Yes

#SAT = 9

+ Δ = ∀d (Rain(d) ⇒ Cloudy(d)) Days = {Monday Tuesday} w( R)=1 w(¬R)=2 w( C)=3 w(¬C)=5

slide-41
SLIDE 41

Assembly language for high-level probabilistic reasoning and learning

Parfactor graphs Probabilistic databases Relational Bayesian networks Probabilistic logic programs Markov Logic Weighted First-Order Model Counting

[VdB et al.; IJCAI‟11, PhD‟13, KR‟14, UAI‟14]

slide-42
SLIDE 42

Statistical Relational Learning

  • An MLN = set of constraints (w, Γ(x))
  • Weight of a world = product of w, for all rules (w, Γ(x))

and groundings Γ(a) that hold in the world

∞ Smoker(x) ⇒ Person(x)

3.75 Smoker(x)∧Friend(x,y) ⇒ Smoker(y) PMLN(Q) = [sum of weights of worlds of Q] / Z

Soft constraint Hard constraint

Applications: large probabilistic KBs

slide-43
SLIDE 43

FO NNF SYNTAX

slide-44
SLIDE 44

First-Order Knowledge Compilation

  • Input: Sentence in FOL
  • Output: Representation tractable for some

class of queries.

  • In this work:

– Function-free FOL – Model counting in NNF tradition

  • Some pre-KC-map work:

– FO Horn clauses – FO BDDs

slide-45
SLIDE 45

Alphabet

  • FOL

– Predicates/relations: Friends – Object names: x, y, z – Object variables: X, Y, Z – Symbols classical FOL (∀, ∃, ∧, ∨, ¬,…)

  • Group logic

– Group variables: X, Y, Z – Symbols from basic set theory (e.g., ∪, ∩, ∈, ⊆, {, }, complement).

slide-46
SLIDE 46

Syntax

  • Object terms: X, alice, bob
  • Group terms : X, {alice,bob}, X ∪ Y
  • Atom: Friends(alice,X)
  • Formulas:

– (α), ¬α, α ∨ β, and α ∧ β – ∀X ∈ G, α and ∃X ∈ G, α – ∀X ⊆ G, α and ∃X ⊆ G, α

  • Group logic syntactic sugar:

– P(G) is ∀X ∈ G, P (X) – `P(G) is ∀X ∈ G, ¬P (X)

slide-47
SLIDE 47

Examples:

  • ∀X ∈ G, Y ∈ {alice, bob},

Enemies(X, Y ) ⇒ ¬Friends(X, Y ) ∧ ¬Friends(Y, X)

  • ∀X ∈ G, Y ∈ G,

Smokes(X) ∧ Friends(X, Y) ⇒ Smokes(Y)

  • ∃G ⊆ {alice, bob}, Smokes(G) ∧`Healthy(G)
slide-48
SLIDE 48

Semantics

  • Template language for propositional logic
  • Grounding a sentence: gr(α)
  • Replace ∀ by ∧
  • Replace ∃ by ∨
  • End result: ground sentence = propositional logic
  • Grounding is polynomial in group sizes

when no ∀X ⊆ G or ∃X ⊆ G

Important for polytime reduction to NNF circuits

slide-49
SLIDE 49

Decomposability

  • Conjunction: α(X,G) ∧ β(X,G)

For any substitution X=c and G=g, we have that gr(α(c,g)) ∧ gr(β(c,g)) is decomposable Meaning: α and β can never talk about the same ground atoms

  • Quantifier: ∀Y ∈ G, α(Y)

For any two a,b ∈ G, we have that gr(α(a)) ∧ gr(α(b)) is decomposable

slide-50
SLIDE 50

Determinism

  • Disjunction: α(X,G) ∨ β(X,G)

For any substitution X=c and G=g, we have that gr(α(c,g)) ∨ gr(β(c,g)) is deterministic Meaning: α ∧ β is UNSAT

  • Quantifier: ∃Y ∈ G, α(Y)

For any two a,b ∈ G, we have that gr(α(a)) ∨ gr(α(b)) is decomposable

slide-51
SLIDE 51

Group Quantifiers

  • Decomposability: ∀X ⊆ G, α(X)

For any two A,B ⊆ G, we have that gr(α(A)) ∨ gr(α(B)) is decomposable

  • Determinism: ∃X ⊆ G, α(X)

For any two A,B ⊆ G, we have that gr(α(A)) ∨ gr(α(B)) is deterministic

slide-52
SLIDE 52

Automorphism

  • Object permutation σ : D→ D is a one-to-one

mapping from objects to objects.

  • Permuting α using σ replaces o in α by σ(o).
  • Sentences α and β are p-equivalent iff α is

equivalent to an object permutation of β.

Smokes(alice) and Smokes(bob) are p-equivalent

  • Group quantifiers: ∀X ⊆ G, α(X) or ∃X ⊆ G, α(X)

Are automorphic iff for any two A,B ⊆ G s.t. |A|=|B|, gr(α(A)) and gr(α(B)) are p-equivalent

slide-53
SLIDE 53

First-Order NNF

Decomposable

slide-54
SLIDE 54

First-Order NNF

Decomposable

slide-55
SLIDE 55

First-Order DNNF

Decomposable

slide-56
SLIDE 56

First-Order DNNF

Deterministic

slide-57
SLIDE 57

First-Order d-DNNF

Deterministic

slide-58
SLIDE 58

First-Order d-DNNF

Automorphic

slide-59
SLIDE 59

First-Order d-DNNF

Automorphic

slide-60
SLIDE 60

First-Order ad-DNNF

Automorphic

slide-61
SLIDE 61

FO NNF Languages

  • FO NNF: group logic circuits, negation only on

atoms

  • FO d-DNNF: determinism and decomposability

Grounding generates a d-DNNF

  • FO DNNF

Grounding generates a DNNF

  • FO ad-DNNF: automorphic

Powerful properties!

slide-62
SLIDE 62

FO NNF TRACTABILITY

slide-63
SLIDE 63

Symmetric WFOMC

  • Def. A weighted vocabulary is (R, w), where

– R = (R1, R2, …, Rk) = relational vocabulary – w = (w1, w2, …, wk) = weights

  • Fix an FO formula Q, domain of size n
  • The weight of a ground tuple t in Ri is wi

Complexity of FOMC / WFOMC(Q, n)? Data/domain complexity: fixed Q, input n / and w

slide-64
SLIDE 64

Symmetric WFOMC

  • n FO ad-DNNF

Complexity polynomial in domain size! Polynomial in NNF size for bounded depth.

slide-65
SLIDE 65

FO-Model Counting: w(R) = w(¬R) = 1 FO ad-DNNF sentences

FOMC Query: Example

slide-66
SLIDE 66

4.

FO-Model Counting: w(R) = w(¬R) = 1 FO ad-DNNF sentences

Δ = (Stress(Alice) ⇒ Smokes(Alice)) Domain = {Alice}

FOMC Query: Example

slide-67
SLIDE 67

4.

FO-Model Counting: w(R) = w(¬R) = 1 FO ad-DNNF sentences

→ 3 models

Δ = (Stress(Alice) ⇒ Smokes(Alice)) Domain = {Alice}

FOMC Query: Example

slide-68
SLIDE 68

4.

FO-Model Counting: w(R) = w(¬R) = 1 FO ad-DNNF sentences

→ 3 models

Δ = (Stress(Alice) ⇒ Smokes(Alice)) Domain = {Alice}

3.

Δ = ∀x, (Stress(x) ⇒ Smokes(x)) Domain = {n people}

FOMC Query: Example

slide-69
SLIDE 69

4. → 3n models

FO-Model Counting: w(R) = w(¬R) = 1 FO ad-DNNF sentences

→ 3 models

Δ = (Stress(Alice) ⇒ Smokes(Alice)) Domain = {Alice}

3.

Δ = ∀x, (Stress(x) ⇒ Smokes(x)) Domain = {n people}

FOMC Query: Example

slide-70
SLIDE 70

FOMC Query: Example

→ 3n models 3.

Δ = ∀x, (Stress(x) ⇒ Smokes(x)) Domain = {n people}

slide-71
SLIDE 71

FOMC Query: Example

→ 3n models 3.

Δ = ∀x, (Stress(x) ⇒ Smokes(x)) Domain = {n people}

2.

Δ = ∀y, (ParentOf(y) ∧ Female ⇒ MotherOf(y)) D = {n people}

slide-72
SLIDE 72

FOMC Query: Example

→ 3n models 3.

Δ = ∀x, (Stress(x) ⇒ Smokes(x)) Domain = {n people}

2.

Δ = ∀y, (ParentOf(y) ∧ Female ⇒ MotherOf(y)) D = {n people} If Female = true? Δ = ∀y, (ParentOf(y) ⇒ MotherOf(y)) → 3n models

slide-73
SLIDE 73

FOMC Query: Example

→ 3n models 3.

Δ = ∀x, (Stress(x) ⇒ Smokes(x)) Domain = {n people}

2.

Δ = ∀y, (ParentOf(y) ∧ Female ⇒ MotherOf(y)) D = {n people} If Female = true? Δ = ∀y, (ParentOf(y) ⇒ MotherOf(y)) → 3n models → 4n models If Female = false? Δ = true

slide-74
SLIDE 74

→ 3n + 4n models

FOMC Query: Example

→ 3n models 3.

Δ = ∀x, (Stress(x) ⇒ Smokes(x)) Domain = {n people}

2.

Δ = ∀y, (ParentOf(y) ∧ Female ⇒ MotherOf(y)) D = {n people} If Female = true? Δ = ∀y, (ParentOf(y) ⇒ MotherOf(y)) → 3n models → 4n models If Female = false? Δ = true

slide-75
SLIDE 75

→ 3n + 4n models

FOMC Query: Example

→ 3n models 3.

Δ = ∀x, (Stress(x) ⇒ Smokes(x)) Domain = {n people}

2.

Δ = ∀y, (ParentOf(y) ∧ Female ⇒ MotherOf(y))

1.

Δ = ∀x, ∀ y, (ParentOf(x,y) ∧ Female(x) ⇒ MotherOf(x,y)) D = {n people} D = {n people} If Female = true? Δ = ∀y, (ParentOf(y) ⇒ MotherOf(y)) → 3n models → 4n models If Female = false? Δ = true

slide-76
SLIDE 76

→ 3n + 4n models → (3n + 4n)

n models

FOMC Query: Example

→ 3n models 3.

Δ = ∀x, (Stress(x) ⇒ Smokes(x)) Domain = {n people}

2.

Δ = ∀y, (ParentOf(y) ∧ Female ⇒ MotherOf(y))

1.

Δ = ∀x, ∀ y, (ParentOf(x,y) ∧ Female(x) ⇒ MotherOf(x,y)) D = {n people} D = {n people} If Female = true? Δ = ∀y, (ParentOf(y) ⇒ MotherOf(y)) → 3n models → 4n models If Female = false? Δ = true

slide-77
SLIDE 77

Group Quantifiers: Example

  • Not decomposable!
  • Rewrite as FO ad-DNNF:
  • Not possible to ground to d-DNNF!
  • How to do tractable CT?

∃G ⊆ D, Smokes( G ) ∧`Smokes(`G ) ∧`Friends( G ,`G )

Δ = ∀x ,y ∈ D, (Smokes(x) ∧ Friends(x,y) ⇒ Smokes(y)) Domain = {n people}

slide-78
SLIDE 78

Group Quantifiers: Example

∃G ⊆ D, Smokes( G ) ∧`Smokes(`G ) ∧`Friends( G ,`G )

slide-79
SLIDE 79

Group Quantifiers: Example

 If we know G precisely: who smokes, and there are k smokers?

k n-k k n-k Database: Smokes(Alice) = 1 Smokes(Bob) = 0 Smokes(Charlie) = 0 Smokes(Dave) = 1 Smokes(Eve) = 0 ...

Smokes Smokes Friends

∃G ⊆ D, Smokes( G ) ∧`Smokes(`G ) ∧`Friends( G ,`G )

slide-80
SLIDE 80

Group Quantifiers: Example

 If we know G precisely: who smokes, and there are k smokers?

k n-k k n-k Database: Smokes(Alice) = 1 Smokes(Bob) = 0 Smokes(Charlie) = 0 Smokes(Dave) = 1 Smokes(Eve) = 0 ...

Smokes Smokes Friends

∃G ⊆ D, Smokes( G ) ∧`Smokes(`G ) ∧`Friends( G ,`G )

slide-81
SLIDE 81

Group Quantifiers: Example

 If we know G precisely: who smokes, and there are k smokers?

k n-k k n-k Database: Smokes(Alice) = 1 Smokes(Bob) = 0 Smokes(Charlie) = 0 Smokes(Dave) = 1 Smokes(Eve) = 0 ...

Smokes Smokes Friends

∃G ⊆ D, Smokes( G ) ∧`Smokes(`G ) ∧`Friends( G ,`G )

slide-82
SLIDE 82

Group Quantifiers: Example

 If we know G precisely: who smokes, and there are k smokers?

k n-k k n-k Database: Smokes(Alice) = 1 Smokes(Bob) = 0 Smokes(Charlie) = 0 Smokes(Dave) = 1 Smokes(Eve) = 0 ...

Smokes Smokes Friends

∃G ⊆ D, Smokes( G ) ∧`Smokes(`G ) ∧`Friends( G ,`G )

slide-83
SLIDE 83

Group Quantifiers: Example

 If we know G precisely: who smokes, and there are k smokers?

k n-k k n-k Database: Smokes(Alice) = 1 Smokes(Bob) = 0 Smokes(Charlie) = 0 Smokes(Dave) = 1 Smokes(Eve) = 0 ...

Smokes Smokes Friends

∃G ⊆ D, Smokes( G ) ∧`Smokes(`G ) ∧`Friends( G ,`G )

slide-84
SLIDE 84

Group Quantifiers: Example

 If we know G precisely: who smokes, and there are k smokers?

k n-k k n-k Database: Smokes(Alice) = 1 Smokes(Bob) = 0 Smokes(Charlie) = 0 Smokes(Dave) = 1 Smokes(Eve) = 0 ...

Smokes Smokes Friends

∃G ⊆ D, Smokes( G ) ∧`Smokes(`G ) ∧`Friends( G ,`G )

slide-85
SLIDE 85

Group Quantifiers: Example

 If we know G precisely: who smokes, and there are k smokers?

k n-k k n-k Database: Smokes(Alice) = 1 Smokes(Bob) = 0 Smokes(Charlie) = 0 Smokes(Dave) = 1 Smokes(Eve) = 0 ...

Smokes Smokes Friends

∃G ⊆ D, Smokes( G ) ∧`Smokes(`G ) ∧`Friends( G ,`G )

slide-86
SLIDE 86

Group Quantifiers: Example

 If we know G precisely: who smokes, and there are k smokers?

k n-k k n-k Database: Smokes(Alice) = 1 Smokes(Bob) = 0 Smokes(Charlie) = 0 Smokes(Dave) = 1 Smokes(Eve) = 0 ...

Smokes Smokes Friends

∃G ⊆ D, Smokes( G ) ∧`Smokes(`G ) ∧`Friends( G ,`G )

slide-87
SLIDE 87

Group Quantifiers: Example

 If we know G precisely: who smokes, and there are k smokers?

k n-k k n-k Database: Smokes(Alice) = 1 Smokes(Bob) = 0 Smokes(Charlie) = 0 Smokes(Dave) = 1 Smokes(Eve) = 0 ...

Smokes Smokes Friends

∃G ⊆ D, Smokes( G ) ∧`Smokes(`G ) ∧`Friends( G ,`G )

slide-88
SLIDE 88

Group Quantifiers: Example

 If we know G precisely: who smokes, and there are k smokers?

k n-k k n-k

→ models

Database: Smokes(Alice) = 1 Smokes(Bob) = 0 Smokes(Charlie) = 0 Smokes(Dave) = 1 Smokes(Eve) = 0 ...

Smokes Smokes Friends

∃G ⊆ D, Smokes( G ) ∧`Smokes(`G ) ∧`Friends( G ,`G )

slide-89
SLIDE 89

Group Quantifiers: Example

 If we know G precisely: who smokes, and there are k smokers?

k n-k k n-k

 If we know that there are k smokers?

→ models

Database: Smokes(Alice) = 1 Smokes(Bob) = 0 Smokes(Charlie) = 0 Smokes(Dave) = 1 Smokes(Eve) = 0 ...

Smokes Smokes Friends

∃G ⊆ D, Smokes( G ) ∧`Smokes(`G ) ∧`Friends( G ,`G )

slide-90
SLIDE 90

Group Quantifiers: Example

 If we know G precisely: who smokes, and there are k smokers?

k n-k k n-k

 If we know that there are k smokers?

→ models

Database: Smokes(Alice) = 1 Smokes(Bob) = 0 Smokes(Charlie) = 0 Smokes(Dave) = 1 Smokes(Eve) = 0 ...

→ models

Smokes Smokes Friends

∃G ⊆ D, Smokes( G ) ∧`Smokes(`G ) ∧`Friends( G ,`G )

slide-91
SLIDE 91

Group Quantifiers: Example

 If we know G precisely: who smokes, and there are k smokers?

k n-k k n-k

 If we know that there are k smokers?  In total…

→ models

Database: Smokes(Alice) = 1 Smokes(Bob) = 0 Smokes(Charlie) = 0 Smokes(Dave) = 1 Smokes(Eve) = 0 ...

→ models

Smokes Smokes Friends

∃G ⊆ D, Smokes( G ) ∧`Smokes(`G ) ∧`Friends( G ,`G )

slide-92
SLIDE 92

Group Quantifiers: Example

 If we know G precisely: who smokes, and there are k smokers?

k n-k k n-k

 If we know that there are k smokers?  In total…

→ models

Database: Smokes(Alice) = 1 Smokes(Bob) = 0 Smokes(Charlie) = 0 Smokes(Dave) = 1 Smokes(Eve) = 0 ...

→ models → models

Smokes Smokes Friends

∃G ⊆ D, Smokes( G ) ∧`Smokes(`G ) ∧`Friends( G ,`G )

slide-93
SLIDE 93

...

Playing Cards Revisited

Let us automate this:

∀p, ∃c, Card(p,c) ∀c, ∃p, Card(p,c) ∀p, ∀c, ∀c’, Card(p,c) ∧ Card(p,c’) ⇒ c = c’

[Van den Broeck.; AAAI-KR‟15]

slide-94
SLIDE 94

...

Playing Cards Revisited

Let us automate this:

∀p, ∃c, Card(p,c) ∀c, ∃p, Card(p,c) ∀p, ∀c, ∀c’, Card(p,c) ∧ Card(p,c’) ⇒ c = c’

[Van den Broeck.; AAAI-KR‟15]

slide-95
SLIDE 95

...

Playing Cards Revisited

Let us automate this:

∀p, ∃c, Card(p,c) ∀c, ∃p, Card(p,c) ∀p, ∀c, ∀c’, Card(p,c) ∧ Card(p,c’) ⇒ c = c’

Computed in time polynomial in n

[Van den Broeck.; AAAI-KR‟15]

slide-96
SLIDE 96

FO COMPILATION

slide-97
SLIDE 97

Compilation Rules

  • Lots of preprocessing
  • Shannon decomposition/Boole’s expansion
  • Detect propositional decomposability
  • FO Shannon decomposition:

Simplify β (remove atoms subsumed by P(X)) Always deterministic! Ensure automorphic ∃

  • Detect FO decomposability
slide-98
SLIDE 98

FO NNF EXPRESSIVENESS

slide-99
SLIDE 99

Main Positive Result: FO2

  • FO2 = FO restricted to two variables
  • “The graph has a path of length 10”:
  • Theorem: Compilation algorithm to FO ad-

DNNF is complete for FO2

  • Model counting for FO2 in PTIME domain

complexity

∃x∃y(R(x,y) ∧∃x (R(y,x) ∧∃y (R(x,y) ∧…)))

slide-100
SLIDE 100

Main Negative Results

Domain complexity:

  • There exists an FO formula Q s.t. symmetric

FOMC(Q, n) is #P1 hard

  • There exists Q in FO3 s.t. FOMC(Q, n) is #P1

hard

  • There exists a conjunctive query Q s.t.

symmetric WFOMC(Q, n) is #P1 hard

  • There exists a positive clause Q w.o. „=„ s.t.

symmetric WFOMC(Q, n) is #P1 hard Therefore, no FO ad-DNNF can exist 

slide-101
SLIDE 101

Proof

  • Theorem. There exists an FO3 sentence Q s.t.

FOMC(Q,n) is #P1-hard Proof

  • Step 1. Construct a Turing Machine U s.t.

– U is in #P1 and runs in linear time in n – U computes a #P1 –hard function

  • Step 2. Construct an FO3 sentence Q s.t.

FOMC(Q,n) / n! = U(n)

slide-102
SLIDE 102

Fertile Ground

FO2 CNF FO2 Safe monotone CNF Safe type-1 CNF Θ1 FO3 Υ1 CQs S

[VdB; NIPS’11], [VdB et al.; KR’14], [Gribkoff, VdB, Suciu; UAI’15], [Beame, VdB, Gribkoff, Suciu; PODS’15], etc.

slide-103
SLIDE 103

Fertile Ground

FO2 CNF FO2 Safe monotone CNF Safe type-1 CNF ? Θ1 FO3 Υ1 CQs Δ = ∀x,y,z, Friends(x,y) ∧ Friends(y,z) ⇒ Friends(x,z) S

[VdB; NIPS’11], [VdB et al.; KR’14], [Gribkoff, VdB, Suciu; UAI’15], [Beame, VdB, Gribkoff, Suciu; PODS’15], etc.

slide-104
SLIDE 104

Other Queries and Transformations

  • What if all ground atoms have different

weights? Asymmetric WFOMC

  • FO d-DNNF complete for all monotone FO

CNFs that support efficient CT

  • No clausal entailment
  • No conditioning
slide-105
SLIDE 105

Conclusions

  • Very powerful already!
  • We need to solve this!

THANKS

slide-106
SLIDE 106

References

  • Cards Example:

Guy Van den Broeck. Towards High-Level Probabilistic Reasoning with Lifted Inference, In Proceedings of KRR, 2015.

  • First-Order Knowledge Compilation:

Guy Van den Broeck. Lifted Inference and Learning in Statistical Relational Models, PhD thesis, KU Leuven, 2013.

  • Expressiveness:

Paul Beame, Guy Van den Broeck, Eric Gribkoff, Dan Suciu. Symmetric Weighted First-Order Model Counting, In Proceedings of PODS, 2015.