Upload
ouyang-tony
View
3.963
Download
2
Embed Size (px)
Citation preview
Factor Graph ,Sum-Product Algorithm
A Mini Demo
TonyOuyang, ACM Honored Class
2009 Spring
• Graphical Model
• Factor Graph
02
• Graphical Model– Graph Theory + Probability
• Factor Graph– a function of several variables can be factored
into a product of "smaller" functions.
g(x,y)=xy+x g(x,y)=f1(x)f2(y)f1(x)=xf2(y)=y+1.
• Very general
• Simplify problem• Many efficient algorithms
Why are factor graphuseful ?
– Demo (with a “sum-product-algorithm heart”)
– @ http://www.endora.ch/factor.html
A closer look
• Message Passing Algorithm
• Marginal Functions• Sum-Product Algorithm
• Constraints & Indicator Functions
Msg Passing Algorithm• e.g. Counting Problem
– Naïve mode : large amount of msgs, long distance ...
– Msg passing mode : simple info handling, only care about adjacent people
Reference : Information Theory, Inference, and_Learning Algorithms, chp16
Msg Passing Algorithm con't• More complicated case ...
Msg Passing Algorithm con't• Path counting , a familiar case
# How many such paths are there from A to B?
# If a random path from A to B is selected, what is the probability that it passes through a particular node in the grid?
Reference : Bishop, chp8
Why efficient ?
# global -> local
# interchange summation & production
# reuse !
* fact : dynamic programming
• Back to example– Constraints and Indicator Functions– What's the factor ? (against random variable)
"no pressure" = "pump switched off" OR "pump defect".
define the function f1 :f1(np,pso,pd) = 1 if the constraint is satisfied, and f1(np,pso,pd) = 0 otherwise.
i.e. f1(np,pso,pd)=1 if [np pso pd] is [F F F], [T F T], [F T T] or [T T T], 0 other four conditions
samely, "no pressure" = "pump not working" OR "slide-valve closed" OR "pipe leaks", we get f2
finaly, global function g = f1*f2
02• A Brief Introduction to Graphical Models and
Bayesian Networks– http://www.cs.ubc.ca/~murphyk/Bayes/bnintro.ht
ml#appl
• Factor graph applied in decoding, software demos– http://moser.cm.nctu.edu.tw/html/index.html
• A Noble paper about factor graph & sum-product-algorithm– http://www.psi.toronto.edu/pubs/2001/frey2001factor.pdf
More Online Resources ...