message passing belief propagation
play

Message Passing/Belief Propagation CMSC 691 UMBC Markov Random - PowerPoint PPT Presentation

Message Passing/Belief Propagation CMSC 691 UMBC Markov Random Fields: Undirected Graphs clique : subset of nodes, where nodes are pairwise connected maximal clique : a clique that cannot add a node and remain a clique 1 , 2 ,


  1. Message Passing/Belief Propagation CMSC 691 UMBC

  2. Markov Random Fields: Undirected Graphs clique : subset of nodes, where nodes are pairwise connected maximal clique : a clique that cannot add a node and remain a clique π‘ž 𝑦 1 , 𝑦 2 , 𝑦 3 , … , 𝑦 𝑂 = 1 π‘Ž ΰ·‘ πœ” 𝐷 𝑦 𝑑 𝐷 variables part Q : What restrictions should we of the clique C place on the potentials πœ” 𝐷 ? global normalization maximal potential function (not A : πœ” 𝐷 β‰₯ 0 (or πœ” 𝐷 > 0 ) cliques necessarily a probability!)

  3. Terminology: Potential Functions π‘ž 𝑦 1 , 𝑦 2 , 𝑦 3 , … , 𝑦 𝑂 = 1 π‘Ž ΰ·‘ πœ” 𝐷 𝑦 𝑑 𝐷 energy function (for clique C) (get the total energy of a configuration by summing the individual energy functions) πœ” 𝐷 𝑦 𝑑 = exp βˆ’πΉ(𝑦 𝐷 ) Boltzmann distribution

  4. MRFs as Factor Graphs Undirected graphs: G=(V,E) that represents π‘ž(π‘Œ 1 , … , π‘Œ 𝑂 ) Factor graph of p : Bipartite graph of evidence nodes X, factor nodes F, and edges T Evidence nodes X are the random variables Factor nodes F take values associated with the potential functions Edges show what variables are used in which factors

  5. MRFs as Factor Graphs Undirected graphs: G=(V,E) that X represents π‘ž(π‘Œ 1 , … , π‘Œ 𝑂 ) Factor graph of p : Bipartite graph of evidence nodes X, Y Z factor nodes F, and edges T Evidence nodes X are the random variables X Factor nodes F take values associated with the potential functions Y Z Edges show what variables are used in which factors

  6. Outline Message Passing: Graphical Model Inference Example: Linear Chain CRF

  7. Two Problems for Undirected Models π‘ž 𝑦 1 , 𝑦 2 , 𝑦 3 , … , 𝑦 𝑂 = 1 π‘Ž ΰ·‘ πœ” 𝐷 𝑦 𝑑 𝐷 Finding the normalizer Computing the marginals Sum over all variable combinations, with the x n coordinate fixed π‘Ž π‘œ (𝑀) = ෍ ΰ·‘ πœ” 𝑑 (𝑦 𝑑 ) π‘Ž = ෍ ΰ·‘ πœ” 𝑑 (𝑦 𝑑 ) 𝑦:𝑦 π‘œ =𝑀 𝑑 𝑦 𝑑 Example: 3 variables, fix the 2 nd dimension π‘Ž 2 (𝑀) = ෍ ෍ ΰ·‘ πœ” 𝑑 (𝑦 = 𝑦 1 , 𝑀, 𝑦 3 ) 𝑦 1 𝑦 3 𝑑

  8. Two Problems for Undirected Models π‘ž 𝑦 1 , 𝑦 2 , 𝑦 3 , … , 𝑦 𝑂 = 1 π‘Ž ΰ·‘ πœ” 𝐷 𝑦 𝑑 𝐷 Finding the normalizer Computing the marginals Sum over all variable combinations, with the x n coordinate fixed π‘Ž π‘œ (𝑀) = ෍ ΰ·‘ πœ” 𝑑 (𝑦 𝑑 ) π‘Ž = ෍ ΰ·‘ πœ” 𝑑 (𝑦 𝑑 ) 𝑦:𝑦 π‘œ =𝑀 𝑑 𝑦 𝑑 Example: 3 Q : Why are these difficult? variables, fix the 2 nd dimension A : Many different combinations π‘Ž 2 (𝑀) = ෍ ෍ ΰ·‘ πœ” 𝑑 (𝑦 = 𝑦 1 , 𝑀, 𝑦 3 ) 𝑦 1 𝑦 3 𝑑

  9. Message Passing: Count the Soldiers If you are the front soldier in the line, say the number β€˜one’ to the soldier behind you. If you are the rearmost soldier in the line, say the number β€˜one’ to the soldier in front of you. If a soldier ahead of or behind you says a number to you, add one to it, and say the new number to the soldier on the other side ITILA, Ch 16

  10. Message Passing: Count the Soldiers If you are the front soldier in the line, say the number β€˜one’ to the soldier behind you. If you are the rearmost soldier in the line, say the number β€˜one’ to the soldier in front of you. If a soldier ahead of or behind you says a number to you, add one to it, and say the new number to the soldier on the other side ITILA, Ch 16

  11. Message Passing: Count the Soldiers If you are the front soldier in the line, say the number β€˜one’ to the soldier behind you. If you are the rearmost soldier in the line, say the number β€˜one’ to the soldier in front of you. If a soldier ahead of or behind you says a number to you, add one to it, and say the new number to the soldier on the other side ITILA, Ch 16

  12. Message Passing: Count the Soldiers If you are the front soldier in the line, say the number β€˜one’ to the soldier behind you. If you are the rearmost soldier in the line, say the number β€˜one’ to the soldier in front of you. If a soldier ahead of or behind you says a number to you, add one to it, and say the new number to the soldier on the other side ITILA, Ch 16

  13. Sum-Product Algorithm Main idea: message passing An exact inference algorithm for tree-like graphs Belief propagation (forward-backward for HMMs) is a special case

  14. Sum-Product definition of π‘ž 𝑦 𝑗 = 𝑀 = ෍ π‘ž 𝑦 1 , 𝑦 2 , … , 𝑦 𝑗 , … , 𝑦 𝑂 marginal 𝑦:𝑦 𝑗 =𝑀 … …

  15. Sum-Product definition of π‘ž 𝑦 𝑗 = 𝑀 = ෍ π‘ž 𝑦 1 , 𝑦 2 , … , 𝑦 𝑗 , … , 𝑦 𝑂 marginal 𝑦:𝑦 𝑗 =𝑀 main idea : use bipartite nature of graph to efficiently compute the marginals … … The factor nodes can act as filters

  16. Sum-Product definition of π‘ž 𝑦 𝑗 = 𝑀 = ෍ π‘ž 𝑦 1 , 𝑦 2 , … , 𝑦 𝑗 , … , 𝑦 𝑂 marginal 𝑦:𝑦 𝑗 =𝑀 main idea : use bipartite nature of graph to efficiently compute the marginals 𝑠 𝑛 2 β†’π‘œ … … 𝑠 𝑛 1 β†’π‘œ 𝑠 𝑛 3 β†’π‘œ 𝑠 π‘›β†’π‘œ is a message from factor node m to evidence node n

  17. Sum-Product Ο‚ 𝑔 𝑠 𝑔→𝑦 𝑗 (𝑦 𝑗 = 𝑀) alternative π‘ž 𝑦 𝑗 = 𝑀 = 𝑔→𝑦 𝑗 (𝑦 𝑗 = π‘₯) ∝ ΰ·‘ 𝑠 𝑔→𝑦 𝑗 (𝑦 𝑗 ) marginal Οƒ π‘₯ Ο‚ 𝑔 𝑠 computation 𝑔 main idea : use bipartite nature of graph to efficiently compute the marginals 𝑠 𝑛 2 β†’π‘œ … … 𝑠 𝑛 1 β†’π‘œ 𝑠 𝑛 3 β†’π‘œ 𝑠 π‘›β†’π‘œ is a message from factor node m to evidence node n

  18. Sum-Product π‘Ÿ π‘œβ†’π‘œ is a message from evidence node n to factor node m π‘Ÿ π‘œβ†’ 𝑛 2 𝑠 𝑛 2 β†’π‘œ π‘Ÿ π‘œβ†’ 𝑛 1 … π‘Ÿ π‘œβ†’ 𝑛 3 … 𝑠 𝑛 1 β†’π‘œ 𝑠 𝑛 3 β†’π‘œ 𝑠 π‘›β†’π‘œ is a message from factor node m to evidence node n

  19. Sum-Product From variables to factors m n aggregates information π‘Ÿ π‘œβ†’π‘› 𝑦 π‘œ = from the rest of its graph via its neighbors n

  20. Sum-Product From variables to factors m π‘Ÿ π‘œβ†’π‘› 𝑦 π‘œ = ΰ·‘ 𝑠 𝑛 β€² β†’π‘œ 𝑦 π‘œ 𝑛 β€² βˆˆπ‘(π‘œ)\𝑛 n set of factors in which variable n participates default value of 1 if empty product

  21. Sum-Product From variables to factors m π‘Ÿ π‘œβ†’π‘› 𝑦 π‘œ = ΰ·‘ 𝑠 𝑛 β€² β†’π‘œ 𝑦 π‘œ 𝑛 β€² βˆˆπ‘(π‘œ)\𝑛 n set of factors in which variable n participates default value of 1 if From factors to variables empty product m m aggregates information 𝑠 π‘›β†’π‘œ 𝑦 π‘œ = from the rest of its graph via its neighbors n

  22. Sum-Product From variables to factors m π‘Ÿ π‘œβ†’π‘› 𝑦 π‘œ = ΰ·‘ 𝑠 𝑛 β€² β†’π‘œ 𝑦 π‘œ 𝑛 β€² βˆˆπ‘(π‘œ)\𝑛 n set of factors in which variable n participates default value of 1 if From factors to variables empty product m m aggregates information from the 𝑠 π‘›β†’π‘œ 𝑦 π‘œ = rest of its graph via its neighbors But these neighbors are R.V.s n that take on different values

  23. Sum-Product From variables to factors m π‘Ÿ π‘œβ†’π‘› 𝑦 π‘œ = ΰ·‘ 𝑠 𝑛 β€² β†’π‘œ 𝑦 π‘œ 𝑛 β€² βˆˆπ‘(π‘œ)\𝑛 n set of factors in which variable n participates default value of 1 if From factors to variables empty product 1. sum over configuration of m variables for the m th factor, 𝑠 π‘›β†’π‘œ 𝑦 π‘œ = with variable n fixed 2. aggregate info those other n variables provide about the rest of the graph

  24. Sum-Product From variables to factors m π‘Ÿ π‘œβ†’π‘› 𝑦 π‘œ = ΰ·‘ 𝑠 𝑛 β€² β†’π‘œ 𝑦 π‘œ 𝑛 β€² βˆˆπ‘(π‘œ)\𝑛 n set of factors in which variable n participates default value of 1 if From factors to variables empty product 𝑠 π‘›β†’π‘œ 𝑦 π‘œ m = ෍ 𝑔 𝑛 𝒙 𝑛 ΰ·‘ π‘Ÿ π‘œ β€² →𝑛 (𝑦 π‘œβ€² ) π‘œ β€² βˆˆπ‘‚(𝑛)\π‘œ 𝒙 𝑛 \π‘œ n 1. sum over configuration of 2. aggregate info those variables for the m th factor, other variables provide with variable n fixed about the rest of the graph

  25. Sum-Product From variables to factors m π‘Ÿ π‘œβ†’π‘› 𝑦 π‘œ = ΰ·‘ 𝑠 𝑛 β€² β†’π‘œ 𝑦 π‘œ 𝑛 β€² βˆˆπ‘(π‘œ)\𝑛 n set of factors in which variable n participates default value of 1 if From factors to variables empty product 𝑠 π‘›β†’π‘œ 𝑦 π‘œ m = ෍ 𝑔 𝑛 𝒙 𝑛 ΰ·‘ π‘Ÿ π‘œ β€² →𝑛 (𝑦 π‘œβ€² ) π‘œ β€² βˆˆπ‘‚(𝑛)\π‘œ 𝒙 𝑛 \π‘œ n sum over configuration of set of variables that the variables for the m th factor, m th factor depends on with variable n fixed

  26. Meaning of the Computed Values From variables to factors 𝑦 π‘œ telling factor m the π‘Ÿ π‘œβ†’π‘› 𝑦 π‘œ = ΰ·‘ 𝑠 𝑛 β€² β†’π‘œ 𝑦 π‘œ β€œgoodness” for the rest of 𝑛 β€² βˆˆπ‘(π‘œ)\𝑛 the graph if 𝑦 π‘œ has a particular value From factors to variables 𝑠 π‘›β†’π‘œ 𝑦 π‘œ factor m telling 𝑦 π‘œ the β€œgoodness” for the rest of = ෍ 𝑔 𝑛 𝒙 𝑛 ΰ·‘ π‘Ÿ π‘œ β€² →𝑛 (𝑦 π‘œβ€² ) the graph if 𝑦 π‘œ has a π‘œ β€² βˆˆπ‘‚(𝑛)\π‘œ 𝒙 𝑛 \π‘œ particular value

  27. From Messages to Variable Beliefs m 1 m 2 𝑠 𝑛 1 β†’π‘œ 𝑦 π‘œ tells 𝑦 π‘œ 𝑠 𝑛 2 β†’π‘œ 𝑦 π‘œ tells 𝑦 π‘œ the β€œgoodness” from the β€œgoodness” from m 1 ’s perspective if 𝑦 π‘œ m 2 ’s perspective if 𝑦 π‘œ has a particular value has a particular value n

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend