Knowledge Compilation Guy Van den Broeck and Adnan Darwiche Jan 28, - - PowerPoint PPT Presentation

knowledge compilation
SMART_READER_LITE
LIVE PREVIEW

Knowledge Compilation Guy Van den Broeck and Adnan Darwiche Jan 28, - - PowerPoint PPT Presentation

On the Role of Canonicity in Knowledge Compilation Guy Van den Broeck and Adnan Darwiche Jan 28, 2015, AAAI Knowledge Compilation Reasoning with logical knowledge bases A Tractable languages and compilers B Boolean circuits: C


slide-1
SLIDE 1

On the Role of Canonicity in Knowledge Compilation

Guy Van den Broeck and Adnan Darwiche

Jan 28, 2015, AAAI

slide-2
SLIDE 2

Knowledge Compilation

  • Reasoning with logical knowledge bases
  • Tractable languages and compilers
  • Boolean circuits:

OBDDs, d-DNNFs, SDDs, etc.

  • Applications:

– Diagnosis – Planning – Inference in probabilistic databases, graphical models, probabilistic programs – Learning tractable probabilistic models

A B C 1 D

slide-3
SLIDE 3

Bottom-Up Compilation with Apply

  • Build Boolean combinations of existing circuits
  • Compile CNF: (1) circuit for literals (2) disjoin to

get circuit for clauses (3) conjoin for CNF.

  • Compile arbitrary sentence incrementally
  • Avoiding CNF crucial for many applications

=

( A  ( B  D ))  (C ∨ D) ( A  ( B  D )) (C ∨ D)

slide-4
SLIDE 4

Two Properties Under Investigation

Polytime Apply Complexity is polynomial in size of input circuits. Informally: one Apply cannot blow up size. Canonicity Equivalent sentences have identical circuits.

= O( ) x

A  (C ∨ D) (A  C) ∨ (A  D)

≡ =

slide-5
SLIDE 5

What We Knew Before

  • A practical language for bottom-up compilation

requires a polytime Apply.

– Explains success of OBDDs – Why do Apply when it blows up? – Guided search for new languages (structured DNNF)

  • Canonicity is convenient for building compilers

– Detect/cache equivalent subcircuits

slide-6
SLIDE 6

What We Knew Before

  • A practical language for bottom-up compilation

requires a polytime Apply.

– Explains success of OBDDs – Why do Apply when it blows up? – Guided search for new languages (structured DNNF)

  • Canonicity is convenient for building compilers

– Detect/cache equivalent subcircuits

slide-7
SLIDE 7

Sentential Decision Diagrams

Properties:

  • OBDD  SDD
  • Treewidth

upper bound

  • Quasipolynomial

separation with OBDD

  • Supports OBDD queries

C ¬A A ¬A A ¬B B D ¬B B ¬D

  

slide-8
SLIDE 8

C ¬A A ¬A A ¬B B D ¬B B ¬D

  

f (A, B, C, D) = ( A  ( B  D ))  C

Sentential Decision Diagrams

slide-9
SLIDE 9

C

¬A A

¬A A

¬B B D

¬B B ¬D

            

f (A, B, C, D) = ( A  ( B  D ))  C

Sentential Decision Diagrams

slide-10
SLIDE 10

Basing Decisions on Sentences

f (A, B, C, D) = ( A  B )  ( C  D )

A B ¬A A ¬B ¬A C D ¬C

   

A = t, B = f, C = t, D = t

slide-11
SLIDE 11

Basing Decisions on Sentences

f (A, B, C, D) = ( A  B )  ( C  D )

A B ¬A A ¬B ¬A C D ¬C

   

A = t, B = f, C = t, D = t

A ¬B C D

slide-12
SLIDE 12

Basing Decisions on Sentences

f (A, B, C, D) = ( A  B )  ( C  D )

A B ¬A A ¬B ¬A C D ¬C

   

A = t, B = f, C = t, D = t

A ¬B C D

A  B

  • A  B
slide-13
SLIDE 13

Basing Decisions on Sentences

f (A, B, C, D) = ( A  B )  ( C  D )

A B ¬A A ¬B ¬A C D ¬C

   

A = t, B = f, C = t, D = t

A ¬B C D

A  B

  • A  B

primes,subs primes,subs

slide-14
SLIDE 14

Basing Decisions on Sentences

f (A, B, C, D) = ( A  B )  ( C  D )

A  B

  • A  B

primes,subs primes,subs

In an (X,Y)-partition: f (X, Y) = p1(X) s1(Y) …  pn(X) sn(Y) primes are mutually exclusive, exhaustive and not false

slide-15
SLIDE 15

Compression and Canonicity

  • An (X,Y)-partition:

f (X, Y) = p1(X)s1(Y) …  pn(X)sn(Y) is compressed when the subs are distinct: si(Y) ≠ si(Y) if i≠j

  • f(X,Y) has a unique compressed (X,Y)-partition
  • For fixed X,Y throughout the SDD (i.e. a vtree),

compressed SDDs* are canonical!

* requires some additional maintenance (pruning/normalization)

slide-16
SLIDE 16

Compression

slide-17
SLIDE 17

Compression

slide-18
SLIDE 18

Compression

slide-19
SLIDE 19

Compression

slide-20
SLIDE 20

Compression 

slide-21
SLIDE 21

Is Apply for SDDs Polytime?

slide-22
SLIDE 22

Is Apply for SDDs Polytime?

  • |α|x|β| recursive calls
  • Polytime!
slide-23
SLIDE 23

Is Apply for SDDs Polytime?

  • |α|x|β| recursive calls
  • Polytime!
  • But what about

compression/canonicity?

slide-24
SLIDE 24

Is Apply for SDDs Polytime?

  • Polytime Apply?
  • Open question answered

in this paper

slide-25
SLIDE 25

Theoretical Results

Theorem: There exists a class of Boolean functions fm (X1,…,Xm) such that fm has an SDD of size O(m2 ), yet the canonical SDD of fm has size Ω(2m).

slide-26
SLIDE 26

Two options

  • 1. Enable compression

– No polytime Apply – Canonicity

  • 2. Disable compression

– Polytime Apply – No Canonicity

What should we do? Popular belief: Choose polytime Apply, or circuits blow up!

slide-27
SLIDE 27

Empirical Results

slide-28
SLIDE 28

Empirical Results

slide-29
SLIDE 29

What We Know Now

  • Canonical SDDs have no polytime Apply!
  • Yet they work!

Outperform OBDDs and non-canonical SDDs

  • We argue: Canonicity is more important

Facilitates caching and minimization (vtree search)

  • Questions common wisdom
slide-30
SLIDE 30

Thanks