Post on 09-Jun-2020
Bayesian networks and BDDs
石畠正和
東京工業大学佐藤研究室 D2日本学術振興会特別研究員(DC1)日本学術振興会特別研究員(DC1)
2012/4/9 BNs and BDDs
事の発端2
• 2011/12/6石畠がBDD上でB i t kの確率学習する研究を発表した!– 石畠がBDD上でBayesian networkの確率学習する研究を発表した!
• 2011/12/8– Knuth が ”Bayesian trees and BDDs” というタイトルで講義した!– 石畠は不安な気持ちになった!
• 2012/1/10– 石畠はKnuthの講義を Youtubeで観た!
石畠は混乱した!– 石畠は混乱した!– Knuth 「このビデオを10回くらい見れば理解できるはずだ!」
• 2012/1/30– 石畠は理解した!
2012/4/9 BNs and BDDs
Outline 3
1. Bayesian networks and BDDs1. Bayesian networks and BDDs2. Bayesian trees and BDDs3. Learning Bayesian trees on BDDs
2012/4/9 BNs and BDDs
Bayesian networks [1/3] 4y [ ]
• Bayesian network (BN) = DAG + CPTsy– DAG = 確率変数間の条件付き独立性を表現
– CPT = 条件付き確率表 x表
– BN = 確率変数の同時分布を定義x1
x3x2( ) ( ) ( | ) ( | )
• BN上の周辺確率計算
32
x1\x3 x3=1 2x1=1 0 1 0 9
p(x1, x2, x3) = p(x1)p(x2 | x1)p(x3 | x1)
BN上の周辺確率計算– 一般には指数時間かかる
– 効率的な計算手法が提案されている
x1 1 0.1 0.92 0.8 0.2
– 効率的な計算手法が提案されている• Junction tree + Belief propagation• Loopy BPpy• Compiling BNs 今日はこの話
2012/4/9 BNs and BDDs
Bayesian networks [2/3] 5y [ ]• xi ≡ i 番目の変数 (1≦i≦N)
≡ の k 番目の値π1 = {}
• xik ≡ xi の k 番目の値
• π ≡ x の親集合 x
π2 = π3 = {x1}
i 3• πi ≡ xi の親集合
• πij ≡ πi の j 番目の値
x1
x3x2
i =3
• θijk ≡ p(xik | πij)
32
π3\x3 x31 x32
π31 = {x11} θ311 θ312
x ≡ possible world | x | = Ne ≡ evidence set | e | ≦ Nijk p( ik | ij)
• e ⊆ x ∈ Πi {xik}k
π31 {x11} θ311 θ312
π32 = {x12} θ321 θ322j =2
k 1
e ≡ evidence set | e | ≦ N
– e = {x11, x21, x31}– p(e | θ) = p(x11| {} ) p(x21 | {x11}) p(x31 | {x11})
k =1
θ ≡ ( | )p( | ) p( 11| {} ) p( 21 | { 11}) p( 31 | { 11})
= θ111θ211θ3112012/4/9 BNs and BDDs
θ321≡ p(x13 | π12)
Bayesian networks [3/3] 6y [ ]• Multi‐linear function (MLF) F(λ, θ)
I di t i bl λ ∈{0 1} λ ≡ {λ }x1– Indicator variable λik ∈{0,1}, λ ≡ {λik}ik
– F(λ, θ) ≡ λ11λ21λ31 θ111θ211θ311+ λ λ λ θ θ θ
x3x2+ λ11λ21λ32 θ111θ211θ312+ …p(x11, x21, x31 | θ) = θ111θ211θ311
• MLF と確率計算– p(e | θ) = F(λ, θ) where λik= 0 if xik’∈e (k’≠k)
1 otherwiseik
– p({x31}| θ) = F({λ3k=0 (k≠1), others=1}, θ)1 otherwise
– p({x11, x21, x31}| θ) = F({λ11=1, λ21=1, λ31=1, others=0}, θ) ({ 11 , 21 , 31 , }, )= θ111θ211θ311
2012/4/9 BNs and BDDs
Compiling BNs [1/3] 7p g [ ]
• Compiling BNsp g– MLF を圧縮し、確率計算を高速化
• Compiling BNs into d‐DNNF [Chavira & Darwiche 05]p g [ ]• Compiling BNs into ZDDs [Minato+ 07]
– 実際には BNから d‐DNNF/ZDDを直接構成実際には BN から d DNNF/ZDD を直接構成
• なぜ計算が早くなるのか?• なぜ計算が早くなるのか?– 共通項の共有
実は l l が肝– 実は local structure が肝
– 逆に local structure がないとあまり早くならない
2012/4/9 BNs and BDDs
Example 8λ
p
• ZDD for ( | { } θ)
λ11
λ12query evidence
• ZDD for p(q | {x31}, θ)– p({x31} | θ) θ111θ112
= F({λ32=0, others=1},θ)= λ11λ21λ31 θ111θ211θ311
λ21
λ22λ22
λ21
+ λ11λ22λ31 θ111θ212θ311+ λ12λ21λ31 θ112θ221θ321
θ211
λ22
θ212
λ22
θ221θ22212 21 31 112 221 321+ λ12λ22λ31 θ112θ222θ321 λ31λ31
• q を変えて何度も評価するならili の恩恵大
θ311θ321
compiling の恩恵大2012/4/9 BNs and BDDs
1
Compiling BNs [1/3] 9p g [ ]
• Compiling BNsp g– MLF を圧縮し、確率計算を高速化
• Compiling BNs into d‐DNNF [Chavira & Darwiche 05]p g [ ]• Compiling BNs into ZDDs [Minato+ 07]
– 実際には BNから d‐DNNF/ZDDを直接構成実際には BN から d DNNF/ZDD を直接構成
• なぜ計算が早くなるのか?• なぜ計算が早くなるのか?– 共通項の共有
実は l l が肝– 実は local structureが肝
– 逆に local structureがないとあまり早くならない
2012/4/9 BNs and BDDs
Compiling BNs [2/3] 10p g [ ]
• local structures in CPTs x1 x2Context‐specific independence
x || x | x =x x || x |local structures in CPTs1. θijk = 0/12 θ θ
x1 x2
x
x2 || x3 | x1 x11 x2 || x3 | x1=x12x2x1=x11 x2x1=x12
2. θijk = θij’k
local structureなし local structureあり
x3x3 x3
π3\ x3 x31 x32 x33
θ θ θ
local structure なし local structure あり
π3\ x3 x31 x32 x33
π31 θ311 θ312 θ313
π32 θ321 θ322 θ323
π31 1 0 0π32 θ321 θ322 θ323
x1=x11
π33 θ331 θ332 θ333
π34 θ341 θ342 θ343
π33 θ331 θ332 θ333πx1=x12
2012/4/9 BNs and BDDs
π34 θ341 θ342 θ343 π34
Compiling BNs [3/3] 11λ
p g [ ]• ZDD for p(q | {x31}, θ)
({ } | θ) F({λ 0 th 1} θ)
λ11
λ12
– p({x31} | θ) = F({λ32=0, others=1},θ)= λ11λ21λ31 θ111θ211θ311
+ λ λ λ θ θ θθ111θ112
+ λ11λ22λ31 θ111θ212θ311+ λ12λ21λ31 θ112θ221θ321λ λ λ θ θ θ
λ21
λ22λ22
λ21
+ λ12λ22λ31 θ112θ222θ321
θ211
λ22
θ212
λ22
θ221θ222
• local structure– θ321 = 0 θ321 = false λ31λ31
• query q θ311θ321q– q = {x11, x21} λ12=0, λ22=0
2012/4/9 BNs and BDDs1
Parameter learning for BNs [1/3] 12g [ ]
• Compiling BNs =効率的に確率計算を行うCompiling BNs 効率的に確率計算を行う
Q 同様に「効率的に確率学習」は可能か?Q. 同様に「効率的に確率学習」は可能か?
A 残念ながら 「NO!!」A. 残念ながら 「NO!!」
2012/4/9 BNs and BDDs
Parameter learning for BNs [2/3] 13g [ ]• Maximum likelihood estimation (MLE)
D { (1) (T)} 観測デ タ– D ={e(1),…,e(T)} : 観測データ
– θ* ≡ argmaxθ p(D | θ) = argmaxθΠt p(e(t) | θ)|e(t)| = N
1. D が完全データ → coun ng
| |
θijk ≡ p(xik | πij)
– Nijk ≡ ∑t δijk(e(t)), – θijk
* ∝ Nijk | (t)| N
δijk(x) ≡ 1 if {xik, πij}⊆x0 otherwise
ijk ijk
2 D が不完全データ → EM algorithm
|e(t)| < N
2. D が不完全デ タ → EM algorithm– Eijk
(m) ≡ E[Nijk]p(x | D, θ(m))( 1) ( )– θijk(m+1) ∝ Eijk
(m)
2012/4/9 BNs and BDDs
Parameter learning for BNs [3/3] 14g [ ]
1. Counting1. Counting– Nijk ≡ ∑t δijk(e(t)) 1 if {xik, πij}⊆x
0 otherwiseδijk(x)≡
2. EM algorithm– Eijk
(m) ≡ ∑t ∑x δijk(x) p(x | e(t), θ(m))= ∑t p(xik, πij | e(t), θ(m)) ∑t p(xik, πij | e , θ )
全 i,j,k,t 組に関して p(xik, πij | e(t), θ(m)) を計算
共通部分を共有しながら Eijk(m) を直接計算する!!
2012/4/9 BNs and BDDs
EM on BDDs [1/5] 15[ ]
• 共通の部分確率/期待値を共有したい共通の部分確率/期待値を共有したい
– parameter 間で共有 θijk と θijk’
id t間で共有 { }と{ }– evidence set 間で共有 {x11, x21, x31}と{x11, x21, x32}
• EM algorithm on shared BDDs [Ishihata+ 10]– D 中の各 evidence setを命題化– D 中の各 evidence set を命題化
– evidence sets を shared BDD (SBDD) で圧縮
上の動的計画法により ( ) を計算– SBDD上の動的計画法により Eijk(m) を計算
2012/4/9 BNs and BDDs
EM on BDDs [2/5] 16[ ]
• 命題化命– Aijk : p(Aijk | θ) ≡ θijk– f ≡ “e を観測した”fe ≡ e を観測した
– gik ≡ “xi = xik”h ≡ “π = π ”
Aijk の論理式で表現・確率計算可能!– hij ≡ πi = πij
論理式化
確率計算可能
• 論理式化– fe = ∧{gik | xik∈e } – gik = ∨j (hij ∧ Aijk)– hij = ∧{gi’k | xi’k∈πij}ij ∧{gi k | i k ij}
2012/4/9 BNs and BDDs
17EM on BDDs [3/5]Compiling into Shared binary decision diagrams
[ ]
x1 x2Local structures
DAG structure
x3θ31k =θ32kθ 0 θ 1
Local structures
θ331 = 0, θ332 = 1
Observationse(1)≡{x11, x21, x31}e(2)≡{x }
Observations
e( )≡{x31}e(3)≡{x32}e(4)≡{x x }
2012/4/9 BNs and BDDs
e( )≡{x11, x31}e(5)≡{x21, x31}SBDD for {e1,e2,e3,e4,e5}
EM on BDDs [4/5] 18[ ]• Forward probability F[n]
– 根から n に至る確率
– F[n] = ∑b∈{0 1}∑m∈pa(n b) p(n=b|θ)F[m][ ] ∑b∈{0,1} ∑m∈pa(n,b) p( | ) [ ]• pa(n,b) ≡ b-edge が n を指す節点の集合
• Backward probability B[n]から 1 に至る確率– n から 1 に至る確率
– B[n] ≡ ∑b∈{0,1} p(n=b|θ)B[nb] n{ }• nb ≡ n の b-child
2012/4/9 BNs and BDDs
EM on BDDs [5/5] 19[ ]
• 期待値 Eijk期 ijk– Eijk = ∑{ F[n] p(n=1|θ) B[n1] | n labeled by Aijk }
• BDD‐EM algorithm [Ishihata+ 10]1 D を表す SBDDを構築1. D を表す SBDD を構築
2. θ(0) をランダムに初期化
3 F[n] B[n] を計算3. F[n], B[n] を計算
4. Eijk(m) を計算
θ( +1) ( )n
5. θ(m+1) ∝ Eijk(m)
6. 3.-5.を収束するまで繰り返す n1
2012/4/9 BNs and BDDs
小まとめ20
• Compiling BNsを確率 算 グ 変換– BN + evidence set(s) を確率計算用のグラフに変換
– 変換されたグラフ上の DP で確率を計算/学習
• Compiling BNs のポイント– 一旦 BNを変換してしまえば元の BNは用済み旦 BN を変換してしまえば元の BN は用済み– 変換されたグラフの節点に現れるのは θijk– local structure がある時に真価を発揮
• Knuthの方法のポイントと は別の意味を持 両方ず と使う– BNと BDD は別の意味を持つ 両方ずっと使う
– BDD の節点に現れるのは xi θijk ではない– local structureを利用しない 効率的に扱えない– local structure を利用しない 効率的に扱えない
2012/4/9 BNs and BDDs
2. Bayesian trees and BDDs
Lectured by Donald E. Knuth (2011/12/08)
2012/4/9 BNs and BDDs
注意22
• 内容は Knuthの講義に準拠内容は Knuth の講義に準拠
• ただし一部記号を後の学習のために変更
2012/4/9 BNs and BDDs
Bayesian binary trees [1/3] 23y y [ ]• Bayesian binary tree (V, E)
V ≡ {x x }x1– V ≡ {x1,…,xN}
• xi takes 0 or 1 x3x2
– E ⊆{(j, k) | 1≦ j < k ≦N}• ∀i |{(j, k) ∈E | j=i}| ≦ 2
x4 x7
∀ |{(j, ) | j }|
– W(x) ≡ Π{wk(xj, xk) | (j, k)∈E }x5 x6 x8
k j k• x ≡ (x1,…,xN) x9 x10
• Example of W(x)– W(x) =w2(x1, x2)w3(x1, x3)w4(x3, x4)w5(x4, x5)w6(x4,
x6)w7(x3, x7)w8(x7, x8)w9(x8, x9)w10(x8, x10)
Bayesian binary trees [2/3] 24y y [ ]• 子、子孫、親 x1
– ch(xj) ≡ xjの子集合
• chL(xj) ≡ xj の左の子x3x2
L( j) j 左 子
• chR(xj) ≡ xj の右の子 x4 x7
– de(xj) ≡ xj の子孫
• de (x ) ≡ x の左の子孫
x5 x6 x8
• deL(xj) ≡ xj の左の子孫
• deR(xj) ≡ xj の右の子孫
x9 x10
– pa(xj) ≡ xj の親
Bayesian binary trees [3/3] 25y y [ ]
• 約束 xj約束
1. xl∈deL(xj), xr∈deR(xj) ⇒ l < r2 |d ( )| ≦ |d ( )|
j
2. |deL(xj)| ≦ |deR(xj)| xl xr
• 性質
ch( ) {} or { } or { }– ch(xj) = {} or {xj+1} or {xj+1, xk}
xj xj xjj j
xj+1
j
xj+1 xk
j+1 < k
Marginal weights [1/2] 26g g [ ]
• Weight W(x)g ( )– W(x) ≡ Π{wk(xj, xk) | (j, k)∈E }
• Marginal weight W(f)f( )∈{0 1}– f(x)∈{0,1}
– W(f) ≡ ∑{ W(x) | f(x) = 1 }– p(x) = W(x) / W(1)
• W(f) の計算量– 一般的には 2N N ≡ BBTの節点数般的には 2 N BBTの節点数
2012/4/9 BNs and BDDs
Marginal weights [2/2] 27g g [ ]• Knuthの手法
– W(f) を f を表す quasi‐BDD (QDD) を用いて計算
– 計算量は O(NM) M ≡ QDDの節点数( )– Key idea
1 sub‐weight 3 backward table1. sub weight 3. backward table2. pending children 1
x1 2 QDD(←) & BDD(↓)for f(x) = x4
x3
x2
x4 4
3
4
2012/4/9 BNs and BDDs⊥ T ⊥ Ta BBT for x1,…,x4
1. Sub‐weights [1/2] 28g [ ]
• Wi(xi:N) ≡ Π{wk(xj, xk) | (j, k)∈E, i≦j}i( i:N) { k( j, k) | (j, ) j}– 始点が i 以上の辺の重みの積
– W1(x1:N) = W(x) x11( 1:N) ( )– xi:N = (xi,…,xN)
x3x2
• Bottom‐up computation– WN(xN) = 1
x4 x7
WN(xN) 1– Wj(xj:N) =
W 1(x 1 N) if ch(x )={}
x8
Wj+1(xj+1:N) if ch(xj) {}Wj+1(xj+1:N) wj+1(xj, xj+1) if ch(xj)={xj+1}W (x ) w (x x ) w (x x ) if ch(x )={x x }Wj+1(xj+1:N) wj+1(xj, xj+1) wk(xj, xk) if ch(xj)={xj+1, xk}
1. Sub‐weights [2/2] 29g [ ]Wi(xi:N) = 始点が i 以上の辺の重みの積
W10(x10) = 1 x110( 10)W9(x9:10) = 1W ( )
1
x3x2
W8(x8:10) = w9(x8,x9) w10(x8,x10)
x4 x7w79( 8, 9) 10( 8, 10)
W7(x7:10) x5 x6 x8
w10w9
= w8(x7,x8) w9(x8,x9) w10(x8,x10)…
x9 x10
…
2. Pending children [1/3] 30xjg [ ]
• Si ≡ {xk | (j, k)∈E, j < i < k} xi
…
i { k | (j, ) , j }– Si の要素
= 自身は i より大きく 親は i より小さい節点
xk…… ∈Si
自身は i より大きく、親は i より小さい節点
• Top down computation• Top‐down computation– S1 = {}
x1
xx– Sj+1 = Sj /{xj+1} if ch(xj)={}
x3x2
x4 x7j j jSj if ch(xj)={xj+1}Sj∪{xk} if ch(xj)={xj+1, xk}
x8j { k} ( j) { j+1, k}
2. Pending children [2/3] 31g [ ]
• S1 = {} x11 {}• S2 = {x3}• S = {} x
x2Sj+1 = Sj /{xj+1} if {}Sj if {xj+1}• S3 = {}
• S4 = {x7}S { }
x3
x4
Sj if {xj+1}Sj∪{xk} if {xj+1, xk}
• S5 = {x6, x7}• S6 = {x7}
x5
x6
• S7 = {}• S8 = {}
x7
x8S8 {}• S9 = {x10}
S {}
x8
x9
• S10 = {} x10
2. Pending children [3/3] 32g [ ]• Proposition
M h l |S | ll BBT i h N d– MN ≡ the largest |Sj| over all BBTs with N nodes– MN ≦ log N x1
• Proof Mk– M0= 0, MN+1≧MN– MN+1 = max1≦k≦N/2 {max(Mk+1, MN-k)}
kk nodes
N+1 1≦k≦N/2 { ( k N k)}• Mk, MN-k ≦ MN
– MN+1 > MN ∃k{1≦k≦N/2, Mk = MN}
MN-kN-k nodes
N+1 N { , k N}∴ MN+1 ≦ MN/2 + 1
≦ MN/2n + n≦ MN/2n + n≦ log N
3. Backward table B[n] [1/3] 33[ ] [ ]• Notation
≡ f を表現する QDDの節点1
– n ≡ f を表現する QDD の節点
– nb ≡ n の b‐child (b∈{0,1})が表す
2
– fn ≡ n 以下の sub‐QDD が表す sub‐function
W ( f | )4
3
• Backward table B[n] (n のラベル = xj)– B[n] ≡ 2^|{xj}∪Sj| 行からなる表
Wj( fn | )xj, Sj⊥ T
B[n] 2 |{xj}∪Sj| 行からなる表
– B[n][xj, Sj] ≡ ∑{Wj(xj:N) | fn(x)=1, xk∈{xj}∪Sj }W( f | )
• Marginal weight and backward tables W( f | )x1
– W(f) = ∑{B[nroot][x1] | x1}
3. Backward table B[n] [2/3] 34[ ] [ ]• Bottom‐up computation
x1
x2w3
w2w1 1
22
{}
{x3}
x3
w5
w4
x4
3
44
{}
{x7}
x5
x6
w6w7 5
66
{x7, x6}
{x7}
x7
x8w9
w8 7
88
{}
{} fn(x)Wj(xj:N)
x9
x10
w10 9
1010T
{x10}
{}T
B[n][xj, Sj] ≡ ∑{Wj(xj:N) | fn(x)=1}
3. Backward table B[n] [3/3] 35[ ] [ ]• Bottom‐up computation
– B[⊥][] = 0– B[⊥][] = 0– B[ T ][] = 1– B[n][x S ] = ch(x )– B[n][xj, Sj] =B[nxj][xj+1, Sj+1] if {}∑{B[n ][x S ] w (x x ) | x } if {x }
ch(xj)
∑{B[nxj][xj+1,Sj+1] wj+1(xj,xj+1) | xj+1} if {xj+1}∑{B[nxj][xj+1,Sj+1] wj+1(xj,xj+1)wk(xj,xk) | xj+1,xk} if {xj+1, xk}
• 計算量ズ– B[n] のサイズ ≦ 2^|MN + 1| ∝ N
– B[n] の数 = QDD サイズ M– 総計算量 = O(NM)
Example [1/3] 36p [ ]
f(x) = x4
1
f(x) x4
x1S1={}
2x2S2={}
3x3S3={x4}
4x4S4={}
⊥ T
Example [2/3] x1 37p [ ]1S1={} x3
x2
x4B[1][x1] =∑{B[2][x2] w2(x1,x2) | x2 }B[1][0] B[2][0] (0 0) + B[2][1] (0 1)
S {}
3 4
B[2][ ] ∑{B[3][ ] ( ) ( ) | }
B[1][0] = B[2][0] w2(0,0) + B[2][1] w2(0,1)B[1][1] = B[2][0] w2(1,0) + B[2][1] w2(1,1)
2S2={} B[2][x2] =∑{B[3][x3,x4] w3(x2,x3)w4(x2,x4) | x3, x4}B[2][0] = w3(0,0)w4(0,1) + w3(0,1)w4(0,1)B[2][1] = w3(1,0)w4(1,1) + w3(1,1)w4(1,1)
3S3={x4} B[3][x3, x4] = B[4][x4] = x4B[3][0,0] = 0, B[3][0,1] = 1
[3][1 0] 0 [3][1 1] 1
4 B[4][1] = B[ T ][.] = 1S4={}
B[3][1,0] = 0, B[3][1,1] = 1
B[4][0] = B[⊥][.] = 04
B[ T ][ ] = 1⊥ T
B[ T ][.] = 1B[⊥][.] = 0
Example [3/3] 38p [ ]
• W(f) = ∑{B[1][x1] | x1}(f) ∑{ [ ][ 1] | 1}=B[1][0] + B[1][1]=w (0 0) w (0 0) w (0 1)=w2(0,0) w3(0,0) w4(0,1)+w2(0,0) w3(0,1) w4(0,1)
(0 1) (0 0) (0 1)+w2(0,1) w3(0,0) w4(0,1)+w2(0,1) w3(0,1) w4(0,1) f(x) = x4 を満たす重み+w2(1,0) w3(1,0) w4(1,1)+w2(1,0) w3(1,1) w4(1,1)
f( ) 4 を満 すだけ計算されてる
+w2(1,0) w3(1,1) w4(1,1)+w2(1,1) w3(1,0) w4(1,1)+ (1 1) (1 1) (1 1)+w2(1,1) w3(1,1) w4(1,1)
小まとめ39
• Knuthの方法Knuthの方法
– W(f) ≡ ∑{W(x) | f(x)=1} をQDD上のDPで計算
計算量は O(NM)– 計算量は O(NM)• N = BBTのサイズ
サイズ• M = QDDのサイズ
• Knuthの方法の特徴
BN論理式の encodingを必要としない BN 論理式の encoding を必要としない
条件付き独立性を利用しない
l l t t を効率的に扱えない local structure を効率的に扱えない
40
3. Learning Bayesian trees on BDDs
未発表なため非公開
2012/4/9 BNs and BDDs
Hidden Markov models 41f(x)=x2∧x4∧x6∧x8
1
2• HMM with binary states & symbols 2
33
HMM with binary states & symbols– x2i-1 : a hidden state (i = 1,…,N)
b d b l44
– x2i : an observed symbol
x1 x3 x5 x7 5
6
5
6x2 x4 x6 x86
77
6
88Complexity of HMMs is O(N)
max |Sj| = 1
⊥ T
jQDD size = 4N-2
Naïve Bayes models 42y
• NBM with 2 classes & K binary features 1
f(x)=x2∧x3∧x4∧x5∧x6
NBM with 2 classes & K binary features– x1 : a hidden class
i th bi f t (2≦i≦K+1)2
– xi : i‐th binary feature (2≦i≦K+1)33
x1 4
55
4条件付き独立性を利用すれば O(K)
x2 x3 x4 x5 x6
66
利用すれば O(K)
⊥ TComplexity of NBMs is O(2K)
max |Sj|= K-1
2012/4/9 BNs and BDDs
jQDD size = 2K
まとめ43
• Knuthの手法– BBT上のmarginal W(f) を QDD 上のDPで計算
– 計算量は O(NM), N = BBT size, M = QDD size算 ( ), ,
• Knuthの手法を確率学習に拡張したKnuthの手法を確率学習に拡張した– 計算量は O(NM)
• Knuthの手法は多値、多分木に拡張可能だが必ずしも効率的ではない– だが必ずしも効率的ではない…
– 条件付き独立性を積極的に利用していないのが問題• 論理による依存性と分けて考えているのが原因?• 論理による依存性と分けて考えているのが原因?
参考文献44
• [Pearl 85] Pearl, J.: “Bayesian Networks: A Model of Self‐Activated Memory for Evidental Reasoning” Proc of the 7th Conf of the CognitiveMemory for Evidental Reasoning , Proc. of the 7 Conf. of the Cognitive Science Society, 1985.
• [Chavira & Darwiche 05] Chavira, M. and Darwiche, A.: “Compiling Bayesian networks with local structures”, Proc. of the 19th Int’l Joint Conf. y ,of Artificial Intelligence, 2005.
• [Minato+ 07] Minato, S., Satoh, K., and T. Sato: “Compiling Bayesian networks by symbolic probability calculation based on Zero‐suppressed
” f h th ’l i f ifi i l lliBDDs”, Proc. of the 20th Int’l Joint Conf. on Artificial Intelligence, 2007.• [Ishihata+ 10] Ishihata, M., Sato, T. and Minato, S.: “An EM algorithm on
BDDs with order encoding for logic‐based probabilistic models”, Proc. of the 2nd Asian Conference on Machine Learning 2010the 2nd Asian Conference on Machine Learning, 2010.
• [Ishihata+ 11] Ishihata, M., Kameya, Y., Sato, T. and Minato, S.: “Compiling Bayesian networks for Parameter learning based on Shared BDDs”, Proc. of the 24th Australasian Joint Conf on Artificial Intelligence 2011the 24 Australasian Joint Conf. on Artificial Intelligence, 2011.
• [Knuth 11] http://www‐cs‐staff.stanford.edu/~uno/musings.html
2012/4/9 BNs and BDDs