Us Using Knowled edge e Compilati tion to to PP PP PP -Complet - - PowerPoint PPT Presentation

us using knowled edge e compilati tion to to
SMART_READER_LITE
LIVE PREVIEW

Us Using Knowled edge e Compilati tion to to PP PP PP -Complet - - PowerPoint PPT Presentation

Us Using Knowled edge e Compilati tion to to PP PP PP -Complet Solve e PP ete e Pro roblem ems YooJung Choi UCLA Dagstuhl 2017 Agenda Beyond NP Sentential Decision Diagrams (SDDs) Solving MAJ-MAJ-SAT using SDDs


slide-1
SLIDE 1

Us Using Knowled edge e Compilati tion to to Solve e PP PPPP

PP-Complet

ete e Pro roblem ems

YooJung Choi UCLA Dagstuhl 2017

slide-2
SLIDE 2

Agenda

  • Beyond NP
  • Sentential Decision Diagrams (SDDs)
  • Solving MAJ-MAJ-SAT using SDDs
  • Application: Same-Decision Probability
slide-3
SLIDE 3

Pro robabilisti tic c Infer eren ence

  • A. Darwiche

PPPP

Complete problems: hardest in their class

Input: Bayesian Network

NPPP PP NP

MPE Marginals MAP SDP

slide-4
SLIDE 4

Pro roto toty typical Pro roblem ems

  • A. Darwiche

PPPP NPPP PP NP

SAT MAJ-SAT E-MAJ-SAT MAJ-MAJ-SAT Boolean expressions: (A or (not B) or C), ((not A) or D or (not E)), ….

slide-5
SLIDE 5

Reducti tions

  • A. Darwiche

PPPP NPPP PP NP

SAT MAJ-SAT E-MAJ-SAT MAJ-MAJ-SAT MPE Marginals MAP SDP Boolean expressions: (A or (not B) or C), ((not A) or D or (not E)), …. Prototypical problems

Park, AAAI 2002 Darwiche, KR 2002 Huang et al, AAAI 2006 Oztok et al, KR 2016

slide-6
SLIDE 6

Solvi ving by y Knowled edge e Compilati tion

  • A. Darwiche

PPPP NPPP PP NP

SAT MAJ-SAT E-MAJ-SAT MAJ-MAJ-SAT MPE Marginals MAP SDP Boolean expressions: (A or (not B) or C), ((not A) or D or (not E)), …. Prototypical problems Systematic Approach

(Compile to Boolean Circuits)

slide-7
SLIDE 7

MAJ-MAJ-SAT

  • A. Darwiche

A B C T T T T T F T F T T F F F T T F T F F F T F F F

Boolean expression: (A or B) and (not C)

Split variables X={C}, Y={A,B}

slide-8
SLIDE 8

MAJ-MAJ-SAT

  • A. Darwiche

Boolean expression: (A or B) and (not C)

MAJ-MAJ-SAT: Is there a majority of X-instantiation under which the majority of Y-instantiations satisfying? Split variables X={C}, Y={A,B} A B C T T T T T F T F T T F F F T T F T F F F T F F F

slide-9
SLIDE 9

MAJ-MAJ-SAT

  • A. Darwiche

Boolean expression: (A or B) and (not C)

MAJ-MAJ-SAT: Is there a majority of X-instantiation under which the majority of Y-instantiations satisfying? No Split variables X={C}, Y={A,B} A B C T T T T T F T F T T F F F T T F T F F F T F F F

slide-10
SLIDE 10

Knowled edge Compilati tion

  • A. Darwiche

Compiler Answer in Linear Time

MAJ-MAJ-SAT E-MAJ-SAT MAJ-SAT SAT

(A and (not B))

  • r(C and (not D))
  • r ((not C) and D)

  • A

B

  • B

A C

  • D

D

  • C

and and and and and and and and

  • r
  • r
  • r
  • r

and and

  • r

NNF Circuit encoding

slide-11
SLIDE 11

NNF NNF Circu cuits ts

  • A. Darwiche
  • L K

L  P A

  • P 

L

  • L
  • P A

P

  • L K

L  P

  • P 

K K A A A A

slide-12
SLIDE 12

De Deco composability ty (DNN DNNF) F)

  • A. Darwiche
  • L K

L  P A

  • P 

L

  • L
  • P A

P

  • L K

L  P

  • P 

K K A A A A

Darwiche, JACM 2001

slide-13
SLIDE 13

De Deco composability ty (DNN DNNF) F)

  • A. Darwiche
  • L K

L  P A

  • P 

L

  • L
  • P A

P

  • L K

L  P

  • P 

K K A A A A

Darwiche, JACM 2001

SAT in linear time

PPPP NPPP PP

MAJ-SAT E-MAJ-SAT MAJ-MAJ-SAT

NP

SAT

slide-14
SLIDE 14

De Dete terminism (d-DN DNNF) F)

  • A. Darwiche
  • L K

L  P A

  • P 

L

  • L
  • P A

P

  • L K

L  P

  • P 

K K A A A A

Input: L, K, P , A

Darwiche, JANCL 2000

slide-15
SLIDE 15

De Dete terminism (d-DN DNNF) F)

  • A. Darwiche
  • L K

L  P A

  • P 

L

  • L
  • P A

P

  • L K

L  P

  • P 

K K A A A A

Input: L, K, P , A

Darwiche, JANCL 2000

MAJ-SAT in linear time

PPPP NPPP

E-MAJ-SAT MAJ-MAJ-SAT

PP NP

SAT MAJ-SAT

slide-16
SLIDE 16

Structu tured De Deco composability ty

  • A. Darwiche
  • L K

L  P A

  • P 

L

  • L
  • P A

P

  • L K

L  P

  • P 

K K A A A A

Pipatsrisawat & Darwiche, AAAI 2008

slide-17
SLIDE 17

Structu tured De Deco composability ty

  • A. Darwiche
  • L K

L  P A

  • P 

L

  • L
  • P A

P

  • L K

L  P

  • P 

K K A A A A

  • L

K P A

vtree

Pipatsrisawat & Darwiche, AAAI 2008

slide-18
SLIDE 18

Structu tured De Deco composability ty

  • A. Darwiche
  • L K

L  P A

  • P 

L

  • L
  • P A

P

  • L K

L  P

  • P 

K K A A A A

  • L

K P A

vtree

Pipatsrisawat & Darwiche, AAAI 2008

slide-19
SLIDE 19

Structu tured De Deco composability ty

  • A. Darwiche
  • L K

L  P A

  • P 

L

  • L
  • P A

P

  • L K

L  P

  • P 

K K A A A A

  • L

K P A

vtree

Pipatsrisawat & Darwiche, AAAI 2008

slide-20
SLIDE 20

Parti titi tioned ed De Determ erminism (SDDs DDs)

  • A. Darwiche

Darwiche, IJCAI 2011

slide-21
SLIDE 21

Parti titi tioned ed De Determ erminism (SDDs DDs)

  • A. Darwiche
  • L K

L  P A

  • P 

L

  • L
  • P A

P

  • L K

L  P

  • P 

K K A A A A

Input: L, K, P , A

Darwiche, IJCAI 2011

slide-22
SLIDE 22

Parti titi tioned ed De Determ erminism (SDDs DDs)

  • A. Darwiche
  • L K

L  P A

  • P 

L

  • L
  • P A

P

  • L K

L  P

  • P 

K K A A A A

Input: L, K, P , A

Darwiche, IJCAI 2011

slide-23
SLIDE 23

Parti titi tioned ed De Determ erminism (SDDs DDs)

  • A. Darwiche
  • L K

L  P A

  • P 

L

  • L
  • P A

P

  • L K

L  P

  • P 

K K A A A A

Input: L, K, P , A

Darwiche, IJCAI 2011

slide-24
SLIDE 24

Parti titi tioned ed De Determ erminism (SDDs DDs)

  • A. Darwiche
  • L K

L  P A

  • P 

L

  • L
  • P A

P

  • L K

L  P

  • P 

K K A A A A

Input: L, K, P , A

Darwiche, IJCAI 2011

PPPP NPPP PP

E-MAJ-SAT

NP

SAT MAJ-SAT MAJ-MAJ-SAT

slide-25
SLIDE 25

Parti titi tioned ed De Determ erminism (SDDs DDs)

  • A. Darwiche
  • L K

L  P A

  • P 

L

  • L
  • P A

P

  • L K

L  P

  • P 

K K A A A A

Input: L, K, P , A

Darwiche, IJCAI 2011

MAJ-MAJ-SAT in linear time using appropriate vtree

Oztok & Darwiche, KR 2016

PPPP

MAJ-MAJ-SAT

NPPP

E-MAJ-SAT

PP NP

SAT MAJ-SAT

Not yet…

slide-26
SLIDE 26

Solvi ving MAJ-MAJ-SAT using SDDs DDs

Will solve a functional variant: How many x instantiations are there, that lead to more than T satisfying assignments?

slide-27
SLIDE 27

Constr trained SDDs DDs

X-constrained vtree contains a node vx

  • on the right-most path
  • s.t. X is precisely the set of variables outside of vx
slide-28
SLIDE 28

Constr trained SDDs DDs

X-constrained vtree contains a node vx

  • on the right-most path
  • s.t. X is precisely the set of variables outside of vx

1 2 3

L K P A X={L,K} X-constrained node

slide-29
SLIDE 29

Constr trained SDDs DDs

X-constrained vtree contains a node vx

  • on the right-most path
  • s.t. X is precisely the set of variables outside of vx

2 3 1

L X-constrained node K

P

A X={L,K}

slide-30
SLIDE 30

Constr trained SDDs DDs

  • L K

L  P A

  • P 

L

  • L
  • P A

P

  • L K

L  P

  • P 

K K A A A A

f

1 2 3

L K P A

slide-31
SLIDE 31

Constr trained SDDs DDs

  • L K

L  P A

  • P 

L

  • L
  • P A

P

  • L K

L  P

  • P 

K K A A A A

f

1 2 3

L K P A

slide-32
SLIDE 32

Constr trained SDDs DDs

  • L K

L  P A

  • P 

L

  • L
  • P A

P

  • L K

L  P

  • P 

K K A A A A

f

1 2 3

L K P A

SDD v2 library will include support for constrained SDDs

slide-33
SLIDE 33

MAJ-MAJ-SAT Algori rith thm

  • L K

L  P A

  • P 

L

  • L
  • P A

P

  • L K

L  P

  • P 

K K A A A A

Oztok & Darwiche, KR 2016 ෍

𝐲

MC 𝑔 𝐲 > 𝑈] 𝐘 = {L, K} 𝑈 = 2

slide-34
SLIDE 34

MAJ-MAJ-SAT Algori rith thm

  • L K

L  P A

  • P 

L

  • L
  • P A

P

  • L K

L  P

  • P 

K K A A A A

Oztok & Darwiche, KR 2016 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 ෍

𝐲

MC 𝑔 𝐲 > 𝑈] 𝐘 = {L, K} 𝑈 = 2

slide-35
SLIDE 35

MAJ-MAJ-SAT Algori rith thm

  • L K

L  P A

  • P 

L

  • L
  • P A

P

  • L K

L  P

  • P 

K K A A A A

Oztok & Darwiche, KR 2016 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 2 1 2 1 2 ෍

𝐲

MC 𝑔 𝐲 > 𝑈] 𝐘 = {L, K} 𝑈 = 2

slide-36
SLIDE 36

MAJ-MAJ-SAT Algori rith thm

  • L K

L  P A

  • P 

L

  • L
  • P A

P

  • L K

L  P

  • P 

K K A A A A

Oztok & Darwiche, KR 2016 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 2 1 2 1 2 [1>2]=0 1 2 [3>2]=1 1 [2>2]=0 ෍

𝐲

MC 𝑔 𝐲 > 𝑈] 𝐘 = {L, K} 𝑈 = 2

slide-37
SLIDE 37

MAJ-MAJ-SAT Algori rith thm

  • L K

L  P A

  • P 

L

  • L
  • P A

P

  • L K

L  P

  • P 

K K A A A A

Oztok & Darwiche, KR 2016 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 2 1 2 1 2 [1>2]=0 1 2 [3>2]=1 1 [2>2]=0 2 ෍

𝐲

MC 𝑔 𝐲 > 𝑈] 𝐘 = {L, K} 𝑈 = 2

slide-38
SLIDE 38

MAJ-MAJ-SAT Algori rith thm

  • L K

L  P A

  • P 

L

  • L
  • P A

P

  • L K

L  P

  • P 

K K A A A A

Oztok & Darwiche, KR 2016 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 2 1 2 1 2 [1>2]=0 1 2 [3>2]=1 1 [2>2]=0 2 2 ෍

𝐲

MC 𝑔 𝐲 > 𝑈] 𝐘 = {L, K} 𝑈 = 2

slide-39
SLIDE 39

Ap Appl plications

Is it even worth solving PPPP problems?

slide-40
SLIDE 40

Same-Deci ecision Pro robability ty

  • A. Darwiche

Threshold for Pregnancy is 90%

slide-41
SLIDE 41

Same-Deci ecision Pro robability ty

  • A. Darwiche

Threshold for Pregnancy is 90% Decision is Pregnant=no

slide-42
SLIDE 42

Same-Deci ecision Pro robability ty

  • A. Darwiche
slide-43
SLIDE 43

Same-Deci ecision Pro robability ty

  • A. Darwiche

Threshold for Pregnancy is 90% Decision is Pregnant=yes

slide-44
SLIDE 44

Same-Deci ecision Pro robability ty

  • A. Darwiche
slide-45
SLIDE 45

Same-Deci ecision Pro robability ty (SDP) DP)

SDP

𝑒,𝑈 𝐘 𝐟) = ෍ 𝐲

Pr 𝑒 𝐲𝐟 =𝑈 Pr 𝑒 𝐟)] ⋅ Pr 𝐲 𝐟)

What is the probability that I’ll stick with my current decision after observing additional variables?

Darwiche & Choi, PGM 2010

slide-46
SLIDE 46

Compilati tion

D

R1 R2 AC 𝑄

1 ⟺ ¬𝐸⋀¬𝑆1

𝑄2 ⟺ ¬𝐸⋀¬𝑆1 𝑄3 ⟺ ¬𝐸⋀¬𝑆1 𝑄

4 ⟺ ¬𝐸⋀¬𝑆1

𝑥 𝑄

1 = 0.7

𝑥(𝑄2) = 0.3 𝑥 𝑄3 = 0.2 𝑥(𝑄

4) = 0.8

𝑥 𝑚 = 1.0 for all other literal 𝑚 Pr(𝐸 = +) 0.2 𝐸 Pr 𝑆1 = + 𝐸) + 0.7 − 0.2 𝐸 Pr 𝑆2 = + 𝐸) + 0.6 − 0.1

𝑆1 𝑆2 Pr 𝐵𝐷 = + 𝑆1𝑆2) + + 0.9 + − 0.2 − + 0.1 − −

slide-47
SLIDE 47

SDP DP Algori rith thm

To compute SDP

𝑒,𝑈 𝐘 𝐟) using X-constrained SDD:

  • 1st pass: WMC satisfying e and de
  • 2nd pass: at constrained nodes, Pr 𝑒 𝐲𝐟 ≥ 𝑈]

Linear time in the size of SDD

Oztok & Darwiche, KR 2016

slide-48
SLIDE 48

Expected d Same me-Decis ision ion Pro roba babil ility ty (E (E-SDP)

SDP

𝑒,𝑈 𝐘 𝐙, 𝐟) = ෍ 𝐳

SDP

𝑒,𝑈 𝐘 𝐳, 𝐟) ⋅ Pr 𝐳 𝐟)

Given that I’ll observe Y first, what is the probability that additionally observing X will not change my mind?

slide-49
SLIDE 49

Fe Featu ture Selec ecti tion using E-SDP DP

If I make a decision based on AC, I will stick with that decision 92% of the times after observing R1 and R2.  SDP 𝑆1, R2 𝐵𝐷) = 0.92

D

R1 R2 AC

slide-50
SLIDE 50

Fe Featu ture Selec ecti tion using E-SDP DP

If I make a decision based on AC, I will stick with that decision 92% of the times after observing R1 and R2.  SDP 𝑆1, R2 𝐵𝐷) = 0.92 SDP 𝑆1, 𝐵𝐷 𝑆2) = 0.90  Choose AC over R2

D

R1 R2 AC

slide-51
SLIDE 51

E-SDP DP Algori rith thm

To compute SDP

𝑒,𝑈 𝐘 𝐙, 𝐟), need Y-constrained and

XY-constrained SDD

2 3 4

R1 R2 D P XY-constrained node

1

AC Y-constrained node

𝐘 = {R1, 𝑆2} 𝐙 = {𝐵𝐷}

slide-52
SLIDE 52

E-SDP DP Algori rith thm

Using Y-constrained and XY-constrained SDD

  • 1st pass: WMC satisfying e and de
  • 2nd pass: at XY-constrained nodes,

Pr 𝑒 𝐲𝐳𝐟 =𝑈 Pr 𝑒 𝐳𝐟)] Linear time in the size of SDD

Choi, Darwiche & Van den Broeck, IJCAI 2017

slide-53
SLIDE 53

Ex Expect ected ed Classificati tion Agree reemen ent

C

F1 F2 F3 F4

C

F2 F3

Classifier 𝛽 Classifier 𝛾

Threshold 𝑈 Threshold 𝑈′

slide-54
SLIDE 54

Ex Expect ected ed Classificati tion Agree reemen ent

ECA(𝛽, 𝛾) = ෍

𝐠

[𝐷𝑈 𝐠 = 𝐷𝑈′ 𝐠′ ] ⋅ Pr(𝐠)

How likely is it that the original classifier will agree with the smaller classifier?

slide-55
SLIDE 55

Classifier er Trimming

C

F1 F2 F3 F4

𝑈 = 0.7 C

F1 F2

𝑈′ = 0.4

𝐹𝐷𝐵 = 0.60

slide-56
SLIDE 56

Classifier er Trimming

C

F1 F2 F3 F4

C

F2 F3

𝑈 = 0.7 𝑈′ = 0.5 C

F1 F2

𝑈′ = 0.4

𝐹𝐷𝐵 = 0.95 𝐹𝐷𝐵 = 0.60

slide-57
SLIDE 57

Classifier er Trimming

C

F1 F2 F3 F4

C

F2 F3

𝑈 = 0.7 𝑈′ = 0.5 C

F1 F2

𝑈′ = 0.4

𝐹𝐷𝐵 = 0.95 𝐹𝐷𝐵 = 0.60

slide-58
SLIDE 58

Concl clusion

  • Constrained SDD as a template to solve PPPP-

complete problems

  • Useful PPPP-complete queries: SDP, E-SDP, ECA
  • Can we loosen the constraints?