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
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
PP-Complet
YooJung Choi UCLA Dagstuhl 2017
Complete problems: hardest in their class
Input: Bayesian Network
MPE Marginals MAP SDP
SAT MAJ-SAT E-MAJ-SAT MAJ-MAJ-SAT Boolean expressions: (A or (not B) or C), ((not A) or D or (not E)), ….
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
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)
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}
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
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
Compiler Answer in Linear Time
MAJ-MAJ-SAT E-MAJ-SAT MAJ-SAT SAT
(A and (not B))
…
B
A C
D
and and and and and and and and
and and
NNF Circuit encoding
L P A
L
P
L P
K K A A A A
L P A
L
P
L P
K K A A A A
Darwiche, JACM 2001
L P A
L
P
L P
K K A A A A
Darwiche, JACM 2001
SAT in linear time
MAJ-SAT E-MAJ-SAT MAJ-MAJ-SAT
SAT
L P A
L
P
L P
K K A A A A
Input: L, K, P , A
Darwiche, JANCL 2000
L P A
L
P
L P
K K A A A A
Input: L, K, P , A
Darwiche, JANCL 2000
MAJ-SAT in linear time
E-MAJ-SAT MAJ-MAJ-SAT
SAT MAJ-SAT
L P A
L
P
L P
K K A A A A
Pipatsrisawat & Darwiche, AAAI 2008
L P A
L
P
L P
K K A A A A
K P A
vtree
Pipatsrisawat & Darwiche, AAAI 2008
L P A
L
P
L P
K K A A A A
K P A
vtree
Pipatsrisawat & Darwiche, AAAI 2008
L P A
L
P
L P
K K A A A A
K P A
vtree
Pipatsrisawat & Darwiche, AAAI 2008
Darwiche, IJCAI 2011
L P A
L
P
L P
K K A A A A
Input: L, K, P , A
Darwiche, IJCAI 2011
L P A
L
P
L P
K K A A A A
Input: L, K, P , A
Darwiche, IJCAI 2011
L P A
L
P
L P
K K A A A A
Input: L, K, P , A
Darwiche, IJCAI 2011
L P A
L
P
L P
K K A A A A
Input: L, K, P , A
Darwiche, IJCAI 2011
E-MAJ-SAT
SAT MAJ-SAT MAJ-MAJ-SAT
L P A
L
P
L 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
MAJ-MAJ-SAT
E-MAJ-SAT
SAT MAJ-SAT
Not yet…
Will solve a functional variant: How many x instantiations are there, that lead to more than T satisfying assignments?
X-constrained vtree contains a node vx
X-constrained vtree contains a node vx
1 2 3
L K P A X={L,K} X-constrained node
X-constrained vtree contains a node vx
2 3 1
L X-constrained node K
P
A X={L,K}
L P A
L
P
L P
K K A A A A
f
1 2 3
L K P A
L P A
L
P
L P
K K A A A A
f
1 2 3
L K P A
L P A
L
P
L P
K K A A A A
f
1 2 3
L K P A
SDD v2 library will include support for constrained SDDs
L P A
L
P
L P
K K A A A A
Oztok & Darwiche, KR 2016
𝐲
MC 𝑔 𝐲 > 𝑈] 𝐘 = {L, K} 𝑈 = 2
L P A
L
P
L 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
L P A
L
P
L 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
L P A
L
P
L 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
L P A
L
P
L 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
L P A
L
P
L 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
Is it even worth solving PPPP problems?
Threshold for Pregnancy is 90%
Threshold for Pregnancy is 90% Decision is Pregnant=no
Threshold for Pregnancy is 90% Decision is Pregnant=yes
SDP
𝑒,𝑈 𝐘 𝐟) = 𝐲
Pr 𝑒 𝐲𝐟 =𝑈 Pr 𝑒 𝐟)] ⋅ Pr 𝐲 𝐟)
What is the probability that I’ll stick with my current decision after observing additional variables?
Darwiche & Choi, PGM 2010
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 − −
To compute SDP
𝑒,𝑈 𝐘 𝐟) using X-constrained SDD:
Linear time in the size of SDD
Oztok & Darwiche, KR 2016
SDP
𝑒,𝑈 𝐘 𝐙, 𝐟) = 𝐳
SDP
𝑒,𝑈 𝐘 𝐳, 𝐟) ⋅ Pr 𝐳 𝐟)
Given that I’ll observe Y first, what is the probability that additionally observing X will not change my mind?
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
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
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} 𝐙 = {𝐵𝐷}
Using Y-constrained and XY-constrained SDD
Pr 𝑒 𝐲𝐳𝐟 =𝑈 Pr 𝑒 𝐳𝐟)] Linear time in the size of SDD
Choi, Darwiche & Van den Broeck, IJCAI 2017
C
F1 F2 F3 F4
C
F2 F3
Classifier 𝛽 Classifier 𝛾
Threshold 𝑈 Threshold 𝑈′
ECA(𝛽, 𝛾) =
𝐠
[𝐷𝑈 𝐠 = 𝐷𝑈′ 𝐠′ ] ⋅ Pr(𝐠)
How likely is it that the original classifier will agree with the smaller classifier?
C
F1 F2 F3 F4
𝑈 = 0.7 C
F1 F2
𝑈′ = 0.4
𝐹𝐷𝐵 = 0.60
C
F1 F2 F3 F4
C
F2 F3
𝑈 = 0.7 𝑈′ = 0.5 C
F1 F2
𝑈′ = 0.4
𝐹𝐷𝐵 = 0.95 𝐹𝐷𝐵 = 0.60
C
F1 F2 F3 F4
C
F2 F3
𝑈 = 0.7 𝑈′ = 0.5 C
F1 F2
𝑈′ = 0.4
𝐹𝐷𝐵 = 0.95 𝐹𝐷𝐵 = 0.60
complete problems