๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

Statistics/Probabilistic Graphical Model

๋ฒ ์ด์ง€์•ˆ ๋„คํŠธ์›Œํฌ(Bayesian network) (3)

๋ณธ ํฌ์ŠคํŒ…์€ ์นด์ด์ŠคํŠธ ๋ฌธ์ผ์ฒ  ๊ต์ˆ˜๋‹˜์˜ ์ธ๊ณต์ง€๋Šฅ ๋ฐ ๊ธฐ๊ณ„ํ•™์Šต ๊ฐœ๋ก  2์˜ ๋ฒ ์ด์ง€์•ˆ ๋„คํŠธ์›Œํฌ(Bayesian network) ๊ฐ•์˜ ๋‚ด์šฉ์„ ์ •๋ฆฌํ•œ ๊ฒƒ์ด๋‹ค.

 

๋‹ค๋ฃฐ ๋‚ด์šฉ์€ ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค.

 

1. Potential functions

2. Absorption in clique graph

3. Example of belief propagation

 

1. Potential functions

 

 

โ–ท Potential function์€ ์ž ์žฌ์ ์œผ๋กœ ํ™•๋ฅ ์ด ๋˜๋Š” ํ•จ์ˆ˜๋กœ์จ, ์•„์ง ํ™•๋ฅ ์˜ ์กฐ๊ฑด์„ ๋งŒ์กฑํ•˜๊ธฐ์— ์ถฉ๋ถ„ํ•˜์ง€ ์•Š์€ ํ•จ์ˆ˜๋ฅผ ์˜๋ฏธํ•œ๋‹ค. ์ด ํ•จ์ˆ˜๋Š” Belief propagation์„ ํ†ตํ•ด ํ™•๋ฅ ๋กœ์จ ๋ฐ”๋€Œ๊ฒŒ ๋œ๋‹ค. ์ด์— ๋Œ€ํ•œ ๋‚ด์šฉ์€ ์ดํ›„์— ๋‹ค๋ฃจ๊ธฐ๋กœ ํ•˜๊ฒ ๋‹ค.

 

โ–ท ์œ„์˜ ์˜ˆ๋Š” Potential function์„ ์„ค๋ช…ํ•˜๊ธฐ ์‰ฝ๊ฒŒ ๋‚˜ํƒ€๋‚ธ ๋ฒ ์ด์ง€์•ˆ ๋„คํŠธ์›Œํฌ๋กœ Clique์™€ Separator๋กœ ๋‚˜ํƒ€๋‚  ์ˆ˜ ์žˆ๋‹ค. Clique๋Š” ํ•ด๋‹น ๋…ธ๋“œ ๊ฐ„์˜ Fully conencted๋˜์–ด ์žˆ๋Š” ์ƒํƒœ๋ฅผ ์˜๋ฏธํ•˜๊ณ , Separator์€ ์—ฐ๊ฒฐ๋œ Clique๊ฐ€ ๊ณตํ†ต์œผ๋กœ ๊ฐ€์ง€๊ณ  ์žˆ๋Š” ๋…ธ๋“œ๋ฅผ ์˜๋ฏธํ•œ๋‹ค. ์ฆ‰, ์ด Separator์„ ํ†ตํ•ด Clique๊ฐ€ ์—ฐ๊ฒฐ๋œ๋‹ค.

 

โ–ท Clique์™€ Separator์„ psi์™€ phi๋ฅผ ํ†ตํ•ด Potential function์œผ๋กœ ์ •์˜ํ•˜์ž. ๋ฒ ์ด์ง€์•ˆ ๋„คํŠธ์›Œํฌ์˜ Full joint distribution์„ ๊ตฌํ•˜๊ธฐ ์œ„ํ•ด ๋ชจ๋“  Clique์˜ Potential function์˜ ๊ณฑ์— ๋ชจ๋“  Separator์˜ Potential function์˜ ๊ณฑ์„ ๋‚˜๋ˆˆ ๊ฒฝ์šฐ๋กœ ์ •์˜ํ•˜์ž. 

 

โ–ท Clique์™€ Separator๋กœ ์ •์˜๋œ Full joint distribution์„ ์‹ค์ œ Factorization๋œ ๊ฒฐ๊ณผ์™€ ๋™์ผํ•˜๊ฒŒ ๋˜๋„๋ก Potential function์„ ์ •์˜ํ•˜์—ฌ ์ค€๋‹ค. ์œ„์˜ ์Šฌ๋ผ์ด๋“œ์—์„œ๋Š” ๋‘ ๊ฐ€์ง€ ๋ฐฉ๋ฒ•์œผ๋กœ ์ •ํ•˜์˜€๋Š”๋ฐ, ์ฒซ ๋ฒˆ์งธ ๋ฐฉ๋ฒ•์€ Clique์˜ Potential function์„ Conditional distribution์œผ๋กœ ์ •ํ•˜์˜€๊ณ , ๋‘ ๋ฒˆ์งธ ๋ฐฉ๋ฒ•์€ Joint distribution์œผ๋กœ ์ •ํ•˜์˜€๋‹ค. Separator์˜ Potential function์„ ๊ณ ๋ คํ•˜์˜€์„ ๋•Œ, ๋‘ ๋ฒˆ์งธ ๋ฐฉ๋ฒ•์ด ๋” ํ•ฉ๋ฆฌ์ ์ธ ๊ฒƒ์ฒ˜๋Ÿผ ๋ณด์ธ๋‹ค. ํ•˜์ง€๋งŒ ์‹ค์ œ๋กœ ๊ฐ€์ง€๊ณ  ์žˆ๋Š” ์ •๋ณด๋Š” Conditional distribution์— ๋Œ€ํ•œ ์ •๋ณด์ด๊ณ , ์ด๋ฅผ ์ด์šฉํ•˜์—ฌ ๋‘ ๋ฒˆ์งธ ๋ฐฉ๋ฒ•์— ์ ์šฉํ•˜๊ธฐ๋Š” ์‰ฝ์ง€ ์•Š๋‹ค.

 

2. Absorption in clique graph

 

 

โ–ท ๋งŒ์•ฝ A์˜ ๋ฐ์ดํ„ฐ๊ฐ€ ์ถ”๊ฐ€๋˜์–ด Update๋œ๋‹ค๋ฉด, psi(A, B)์˜ Marginalization์„ ํ†ตํ•ด ์–ป์–ด์ง€๋Š” phi(B)๋„ ๋ฐ”๋€Œ๊ฒŒ ๋  ๊ฒƒ์ด๋‹ค. ๋ฐ”๋€ phi(B)๋ฅผ ํ†ตํ•ด psi(B, C)๋„ ๋ฐ”๋€Œ๊ฒŒ ๋œ๋‹ค. ๋ฐ”๋€ psi(B, C)๋Š” ๋‹ค์Œ separator์„ Updateํ•˜๋Š”๋ฐ ์ ์šฉ๋˜๋ฉฐ, ์ด๋Ÿฌํ•œ ๊ณผ์ •์˜ ๋ฐ˜๋ณต์„ ํ†ตํ•ด ์ถ”๊ฐ€๋œ A์˜ ๋ฐ์ดํ„ฐ์— ๋Œ€ํ•œ Belief propagation์ด ์ง„ํ–‰๋œ๋‹ค. ์ด ๋ฐฉ๋ฒ•์„ Absorption rule์ด๋ผ๊ณ  ํ•œ๋‹ค.

 

โ–ท Back propagation์„ ํ†ตํ•ด ๋ฐ”๋€ Clique ๊ฐ„์˜ Potential functions์˜ Local consistency๊ฐ€ ์„ฑ๋ฆฝํ•œ๋‹ค๋Š” ๊ฒƒ์„ ์œ„์˜ ์Šฌ๋ผ์ด๋“œ์˜ ์ฆ๋ช… ๊ณผ์ •์„ ํ†ตํ•ด ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค. ์ด๋Š” Absorption rule์˜ ์ ์šฉ์ด ๋๋‚œ ๋’ค์˜ ๋ฒ ์ด์ง€์•ˆ ๋„คํŠธ์›Œํฌ์˜ Global consisency๋ฅผ ๋ณด์žฅํ•œ๋‹ค.

 

3. Example of belief propagation

 

 

โ–ท ์œ„์˜ ์Šฌ๋ผ์ด๋“œ์˜ ์˜ˆ๋Š” ์•ž์˜ Potential functions ์Šฌ๋ผ์ด๋“œ์˜ ์ฒซ ๋ฒˆ์งธ ๋ฐฉ๋ฒ•์œผ๋กœ Potential function์„ Set upํ•˜์—ฌ Belief propagation์ด ์ง„ํ–‰๋˜๋Š” ๊ณผ์ •์„ ๋ณด์—ฌ์ค€ ๊ฒƒ์ด๋‹ค. ๊ทธ ์ด์œ ๋Š” ๊ฐ ๋…ธ๋“œ์—์„œ ์–ป์„ ์ˆ˜ ์žˆ๋Š” ํ™•๋ฅ ์€ ์–ธ๊ธ‰ํ–ˆ๋””์‹œํ”ผ Conditional distribution์ด๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค.

 

โ–ท ์ฒซ ๋ฒˆ์งธ ์˜ˆ์‹œ๋Š” ์ •๋ณด๊ฐ€ ์ฃผ์–ด์ง€์ง€ ์•Š์•˜์„ ๋•Œ์˜ P(b)๋ฅผ ๊ตฌํ•˜๋Š” ๊ณผ์ •์ด๋‹ค. 1๋กœ Set up๋˜์—ˆ๋˜ phi(b)๊ฐ€ Belif propagation์„ ํ†ตํ•ด P(b)๋กœ ๋ฐ”๋€ ๊ฒƒ์„ ์•Œ ์ˆ˜ ์žˆ๋‹ค. ํ•œ ๋ฒˆ๋” Belif propagation์„ ์ง„ํ–‰ํ•˜์—ฌ๋„, ๊ฒฐ๊ณผ๋Š” P(b)๋กœ ๋˜‘๊ฐ™์ด ๋‚˜์˜จ๋‹ค. ์ฆ‰, Local consistency๊ฐ€ ์„ฑ๋ฆฝํ•˜๊ฒŒ ๋œ๋‹ค.

 

โ–ท ๋‘ ๋ฒˆ์งธ ์˜ˆ์‹œ๋Š” a์™€ c์— ๋Œ€ํ•œ ์ •๋ณด๊ฐ€ ์ฃผ์–ด์กŒ์„ ๋•Œ, Most probableํ•œ b์˜ ํ™•๋ฅ ์„ ๊ตฌํ•˜๋Š” ๊ณผ์ •์ด๋‹ค. ์ฒซ ๋ฒˆ์งธ ์˜ˆ์™€ ๋‹ค๋ฅธ ์ ์€ ์ƒˆ๋กœ์šด Potential function์ธ delta๋ฅผ ์ •์˜ํ•˜์—ฌ ๊ตฌํ•œ๋‹ค๋Š” ๊ฒƒ์ด๋‹ค. ๋‘ ๋ฒˆ์˜ Belif propagation์„ ํ†ตํ•ด phi(b)๊ฐ€ ์ˆ˜๋ ดํ•˜๋Š” ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๊ณ , phi(b)๋Š” ๋ชจ๋‘ Conditional distribution์œผ๋กœ์จ ๋ชจ๋‘ ์‰ฝ๊ฒŒ ๊ตฌํ•  ์ˆ˜ ์žˆ๋Š” ์ •๋ณด๋“ค๋กœ ์ด๋ฃจ์–ด์ ธ ์žˆ๋‹ค. ๋”ฐ๋ผ์„œ ๋ณด๋‹ค ํšจ์œจ์ ์œผ๋กœ ๊ณ„์‚ฐ์„ ํ•  ์ˆ˜ ์žˆ๋‹ค.

 


Reference:

"(๊ธฐ๊ณ„ ํ•™์Šต, Machine Learning) Week 7 Bayesian Network | Lecture 8 Potential Function and Clique Graph," AAILab Kaist, www.youtube.com/watch?v=qLNasCCwb7w.

"(๊ธฐ๊ณ„ ํ•™์Šต, Machine Learning) Week 7 Bayesian Network | Lecture 9 Potential Function and Clique Graph," AAILab Kaist, www.youtube.com/watch?v=_AAvi6QuE64.