“基礎”からのBayesian Nonparametrics-点過程と機械学習の数理-
description
Transcript of “基礎”からのBayesian Nonparametrics-点過程と機械学習の数理-
“基礎”からの Bayesian Nonparametrics
-点過程と機械学習の数理-
東京大学 情報基盤センター 助教
佐藤一誠
1 数理助教の会 2012.12.13
• 点過程のBayesian Nonparametrics (BN) を扱う (i.e. Gaussian Processは扱わない) • 初期のBNの基礎を紹介
(応用分野では必要はないが、理解しておいて損はない話。特にベイズではフビニの定理が重要)
• サンプリング方法、 変分ベイズ法等はほとんど扱わない。応用の話もほとんど扱わない。
(注)原著の雰囲気をそのままお届けするために、英語
と日本語が混じっています。決して、専門用語の日本語化に失敗しているわけではありません。
2
Let (X,B) be a measure space
where B is the Borel σ-algebra on X.
Let random variables xi ∈X ( i=1,2,…) be defined.
Random measure φ is a B-valued random element
defined by, for any A ∈B,
Random Measure
n
i
i AxA1
)()( 加算無限和でも良い
and is also called a point process.
XXX processと言った場合には、確率変数列 XXX measureと言った場合には、個々の(B値)確率変数について言及していると思えばよい
3
A random measure φ is a completely random
measure if , for any finite collection A1, A2…, An
of disjoint sets, the random variables
φ(A1), φ(A2)…,φ(An) are independent.
Ex. Counting measure: N
is a completely random measure
if, for any finite collection A1… An
of disjoint sets ,
N(A1)… N(An) are independent
A1 A2
A3
N(A1)=4
N(A2)=3
N(A3)=2
Completely Random Measure (CRM) [Kingman,1967]
4
Poisson Process (PP)
λ is a measure from the measurable sets of X to R+,
called intensive function.
N is generated from PP with λ, i.e., N~PP(dN | λ),
if, for any measurable set A ⊂ X,
N(A)~Poison(λ(A)).
N(・) is a completely random measure given by
n
i
i AxAN1
)()(
,where n~Poisson(λ(X)).
次、図 あります
CRMの 代表例
5
N(A) ~Poisson(λ(A))
λ
A
λ(A)
6
Let N be a Poisson random measure over X, i.e.,
N ~ PP(dN | λ).
Let K+ is the family of positive functions on X.
The Laplace transform of N is given by
Laplace Transform of PP
Kf,
確率過程について調べたい時は、Laplace Transform! では、一般のCRMもLaplace Transformで調べてみよう
⇒ Levy-Khintchine Representation Theorem
)|()()(exp][ dNPPdxNxffLN
)()1(exp )( dxe xf
この形を覚えておく!
7
Levy-Ito Decomposition of CRM
),()( dtAtNA
Levy process is a stochastic process with independent increments and is decomposed into
two parts:
1. continuous part: Brownian motion with drift
2. discrete part: positive pure-jump process
※Levy-Ito Decomposition of Levy Process
[Kingman,1967]
discrete part のみ
Let φ be a CRM.
There is N~PP(dN|ν) on X×[0,∞) such that
8
Levy-Khintchine Representation of CRM
The Levy-Khinchine representation of CRM φ is
),0(
)( ),()1(exp][A
ztAz dtdxeeE
is a levy measure on X×[0,∞). ),( dtdx
Levy measureをIntensive functionとする
X×[0,∞)上のPPと見なせる
[Kingman,1967]
これは結局
Laplace transform
9
各種CRMを特徴付けるものは、Levy measureだとわかったということは、Levy measureをいろいろ変えれば 確率過程が作れちゃう(⇒論文書けちゃ・・・)
Gamma process:
dtetdxHdtdxt01
0)(),(
Beta process:
dtttdxHdtdx11
00)1()(),(
Inverse Gaussian process:
dtetdxHdtdxt
2/)(),( 02/3
0
etc…
Base measure over X
10
Completely Random Measure
Poisson Process
Gamma Process
Dirichlet Process
Chinese Restaurant Process
Stick-Breaking Process Pitman-Yor Process
Beta Process
Indian Buffet Process
Machine Learningでは 階層化や派生モデル
も加わり亜種が爆発的に・・・
Inverse Gaussian Process
正規化
Levy measure Levy measure Levy measure
Sampling可能 構成可能
構成可能
構成可能 CRP,SBPでみるとパラメータ1つ追加
※まだまだたくさん あります
Levy process
離散部分
11
Sampling可能
Sampling可能
H is a base probability measure over X and
α0 is concentration parameter.
G is generated from ΓP with α0H , i.e., G~ ΓP(α0H)
if , for any measurable set A ⊂ X,
G(A)~Gamma (α0H (A),1).
G(・) is a completely random measure given by
,
1
)(i
ii xwG
where ~Gamma(α0H (X),1) .
1i
iw
Gamma Process (ΓP)
12
Levy measure on X×[0,∞):
dtetdxHdtdxt01
0)(),(
Gamma Process (ΓP)
Gamma(α0,1) α0: Concentration Parameter
[0,∞)
X
Intensive functionをv (Levy measure) とするX×[0,∞)上の
N~PPを用いて
G~ΓPを生成する
Base measure over X
13
G~ΓP (α0H)
Levy measure on X×[0,∞):
dtetdxHdtdxt01
0)(),(
Gamma Process (ΓP)
Gamma(α0,1) α0: Concentration Parameter
[0,∞)
X
X×[0,∞)上のPP
に従う点を
加算無限個生成
Base measure over X
14
G~ΓP (α0H)
Levy measure on X×[0,∞):
dtetdxHdtdxt01
0)(),(
Gamma Process (ΓP)
Gamma(α0,1) α0: Concentration Parameter
[0,∞)
X
iw
ix
縦軸を横軸の点 の重みとすれば・・・
Base measure over X
15
G~ΓP (α0H)
Levy measure on X×[0,∞):
dtetdxHdtdxt01
0)(),(
Gamma Process (ΓP)
Base measure over X
Gamma(α0,1) α0: Concentration Parameter
X
1
)(i
ii xwG
G~ΓP (α0H)
(再掲)Levy-Ito Decom.
16
),()( dtAtNAG
tをwに置き換えると
わかりやすい
ベイズの定理の復習
事後分布 尤度 事前分布
Gamma Process (ΓP)の事後分布
を求めたい となる
)()|}({}){|( xpxypyxp ii
⇒ フビニの定理を基に導出 他の確率過程でもほぼ同様のロジック (i.e., 新しい確率過程で事後分布を求めるなら 大抵、フビニの定理を基にすればよい)
Bayesの人は当然
17
Fubini’s Theorem (フビニの定理)
• 多変数の期待値などに伴う積分順序に関する定理
• 簡単に言えば積分順序の交換(逐次積分)を可能にする定理
• 様々な状況での証明がある 入門書としては、『測度から確率へ』(佐藤坦)などに幾つか証明がある つまり、 1つの定理で、どんな確率過程でも事後分布が求まる魔法の定理ではない(各自がんばる)
e.g., 非負確率変数の場合の逐次平均可能など
18
Fubini-type disintegration for ΓP
Let h be any non-negative function over γ and x,
and
)()|P(),()|P()(),( dxdxhddxxh x
[Lo+,1978,1982,1989]
)|P(~ d , α=α0H.
xが与えられた下での
γの事後分布
hの一般化
)()|P()()]([ dxddxdxE 19
Fubini-type disintegration for ΓP [Lo+,1978,1982,1989]
hの一般化
)()()|P(),(
)()|P()(),(
)|P()(),(
21
2
1
2
1
12
2
1
2
1
1
1
dxdxdxh
dxddxxh
ddxxh
x
i
x
i
i
x
i
i
i
ii
i
2
1
)(),(i
ii dxxh の場合(注: dx1, dx2の多重積分)
[Fubini’s theorem]
[Fubini’s theorem]
※dx1, dx2の積分順序によらない 20
)()|P(),(
)|P()(),(
1
1
111
1
i
n
i
i
j
x
n
i
x
n
i
i
n
i
ii
dxdxh
ddxxh
ji
Fubini-type disintegration for ΓP [Lo+,1978,1982,1989]
hの一般化
n
i
ii dxxh1
)(),( の場合
x1 …, xnが与えられた元での
γの事後分布 ここに注目!
21
)()(1
1
1
1 i
n
i
i
j
xn dxxxfj
dx1 …, dxnの積分を近似
⇒ x1 …, xnをサンプリングする
※
)()()()(1
1
3
2
1
21 1 n
n
i
x
i
xx dxdxdxdxii
)()( 0 dxHdx
からのサンプリング )(~~11 dxx
22
)()(1
1
1
1 i
n
i
i
j
xn dxxxfj
)()()()(1
1
3
2
1
21 1 n
n
i
x
i
xx dxdxdxdxii
からのサンプリング
dx1 …, dxnの積分を近似
⇒ x1 …, xnをサンプリングする
※ )()( 0 dxHdx
)(~~11 dxx
)(~~2~2 1
dxx x
23
)()(1
1
1
1 i
n
i
i
j
xn dxxxfj
)()()()(1
1
3
2
1
21 1 n
n
i
x
i
xx dxdxdxdxii
)(~~11 dxx
)(~~2~2 1
dxx x
)(~~3
2
1
~3 dxxi
xi
からのサンプリング
dx1 …, dxnの積分を近似
⇒ x1 …, xnをサンプリングする
※ )()( 0 dxHdx
24
)()(1
1
1
1 i
n
i
i
j
xn dxxxfj
)()()()(1
1
3
2
1
21 1 n
n
i
x
i
xx dxdxdxdxii
からのサンプリング
1)(,)( 0 XXix なので正規化して考えると
)(1
1)(
1~
1
100
0n
n
i
xnn dxn
dxHn
xi
dx1 …, dxnの積分を近似
⇒ x1 …, xnをサンプリングする
※ )()( 0 dxHdx
)(~~11 dxx
)(~~2~2 1
dxx x
)(~~3
2
1
~3 dxxi
xi
25
Restaurant Representation
)(1
1)(
1~
1
100
0n
n
i
xnn dxn
dxHn
xi
2x
4x30
0
3
2
0
3
1
0
)2(
2 xx
)1(
1 xx 3x
1x1 2 3 )(~ 4
1
4 dxHxx
)1(
3 xx
?4 x
新しいxがサンプリングされる確率 既出のxがサンプリングされる確率
1x1
テーブル
客
26
Normalized Gamma Process (NΓP)
X
)(1
Xwi
i
11
i
iw となるように正規化
)(~)(/ 0HDPXG
)|P())(/()|P()( 00 HdrXGfHdGDGf
[Kingman1975,Lo+1989]
DP: Dirichlet Process [Ferguson1973]
i.e., for any integrable function f
加算 無限 和が1
27
)(/ XG P~P,~ DG のとき in distribution,
)(~ 0HP
H is a base probability measure over X and
α0 is concentration parameter.
G is generated from DP with α0H , i.e., G~ DP(α0H)
if , for any finite set of measurable partitions
A1∪A2 ∪ … ∪ Ak = X,
(G(A1),G(A2),…, G(Ak) )
~Dir (α0H(A1), α0H(A2),…, α0H(Ak) ).
G(・) is a obtained by
, .
1
)(i
ii xwG 11
i
iw
Dirichlet Process (DP)
(※)CRM ではない
[Ferguson1973]
28
Fubini-type disintegration for DP [Ferguson1973]
歴史的にはΓPよりも
古いことに注意
Let h be any non-negative function over G and x,
and )|P(~ dGDG , α=α0H.
)(
)()|P(),()|P()(),(
X
dxdGDGxhdGDdxGGxh x
xが与えられた下での
Gの事後分布
29
n
i
i
i
j
xn
i
x
n
i
i
n
i
ii
iX
dx
dGDGxh
dGDdxGGxh
j
i
1
1
1
11
1
1)(
)(
)|P(),(
)|P()(),(
n
i
ii dxGGxh1
)(),( の場合
x1 …, xnが与えられた元での
Gの事後分布
Fubini-type disintegration for DP [Ferguson1973]
1)(,)( 0 XXix
x1 …, xnのサンプリングは
ΓPと同じ(というかΓP がDPと同じ)
はじめから正規化されている
30
Let h be any non-negative function over γ and x,
and
)(
)()|P(
)(,
)|P()(
)(
)(,
X
dxd
Xxh
dX
dx
Xxh
x
)|P(~ d , α=α0H.
[Lo+1989]
Fubini-type disintegration for NΓP
31
DPと同じ形
)(/ XG in distributionは簡単に示せる これを使えば
Proof:
)(
)()|P(
)(,
)()(
1)|P(
)(,
)()|P()(
1
)(,
)|P()(
)(
)(,
)|P(
X
dxd
Xxh
dxX
EdX
xh
dxdXX
xh
dX
dx
Xxh
x
dx
x
x
[Fubini’s theorem]
[Fubini’s theorem]
[Lo+1989]
Fubini-type disintegration for NΓP
32
次で説明
xexxp
1
)(),;(
Laplace transform: )1(][ veE vx
Gamma distribution:
If α is also a gamma random variable with shape
parameter γ+n and unit scale, i.e., α~Gamma(γ+n,1)
then,
1
)1(
)(1
E
)(
)(1
nE
n
Note that when n=1,
33
次で説明
dxex
dxex
dxp
x
x
0
1
0
1
0
)(
11
)(1
),;(1
If α~Gamma(γ,1) then,
dxexEE x
0
1
)(
11
dxeEx x
0
1 ][)(
1
)(
)(
)1()(
1
0
1
dxxx
[Fubini’s theorem]
[Laplace transform]
34
γ⇒ γ+n β⇒ n
とすれば
応用例:無限混合モデル
)()|()|( dGypGyp
)|( 1yp)|( 2yp )|( 3yp
1)(
dG加算無限個
)( 3G
1
)()|(i
ii Gyp
無限混合モデル
)|()|()|( :1:1 nn ydGpGypyyp
ベイズ予測分布:
35
Completely Random Measure
Poisson Process
Gamma Process
Dirichlet Process
Chinese Restaurant Process
Stick-Breaking Process Pitman-Yor Process
Beta Process
Indian Buffet Process
Machine Learningでは 階層化や派生モデル
も加わり亜種が爆発的に・・・
Inverse Gaussian Process
正規化
Levy measure Levy measure Levy measure
Sampling可能 構成可能
構成可能
Sampling可能
構成可能 CRP,SBPでみるとパラメータ1つ追加
Sampling可能
※まだまだたくさん あります
Levy process
離散部分
36
今回の話