inference in graphical models
play

Inference in Graphical Models Henrik I. Christensen Robotics & - PowerPoint PPT Presentation

Introduction Inference Factor Graphs Sum-Product Max-Sum P Inference in Graphical Models Henrik I. Christensen Robotics & Intelligent Machines @ GT Georgia Institute of Technology, Atlanta, GA 30332-0280 hic@cc.gatech.edu Henrik I.


  1. Introduction Inference Factor Graphs Sum-Product Max-Sum P Inference in Graphical Models Henrik I. Christensen Robotics & Intelligent Machines @ GT Georgia Institute of Technology, Atlanta, GA 30332-0280 hic@cc.gatech.edu Henrik I. Christensen (RIM@GT) Graphical Inference 1 / 38

  2. Introduction Inference Factor Graphs Sum-Product Max-Sum P Outline Introduction 1 Inference 2 Factor Graphs 3 Sum-Product Algorithm 4 The Max-Sum Algorithm 5 Summary 6 Henrik I. Christensen (RIM@GT) Graphical Inference 2 / 38

  3. Introduction Inference Factor Graphs Sum-Product Max-Sum P Introduction Last time we discussed the structure and basics of graphical models Structure of graphs and decomposition of probabilities We have them both in directed and undirected versions Excellent tool for modelling of many robotics related problems such as: SLAM, Gesture Recognition, ... How do we perform inference in these networks? How do perform these operations efficiently? Henrik I. Christensen (RIM@GT) Graphical Inference 3 / 38

  4. Introduction Inference Factor Graphs Sum-Product Max-Sum P Outline Introduction 1 Inference 2 Factor Graphs 3 Sum-Product Algorithm 4 The Max-Sum Algorithm 5 Summary 6 Henrik I. Christensen (RIM@GT) Graphical Inference 4 / 38

  5. Introduction Inference Factor Graphs Sum-Product Max-Sum P Inference in graphical models Consider inference of p ( x , y ) we can formulate this as p ( x , y ) = p ( x | y ) p ( y ) = p ( y | x ) p ( x ) We can further marginalize � p ( y | x ′ ) p ( x ′ ) p ( y ) = x ′ Using Bayes Rule we can reverse the inference p ( x | y ) = p ( y | x ) p ( x ) p ( y ) Helpful as mechanisms for inference Henrik I. Christensen (RIM@GT) Graphical Inference 5 / 38

  6. Introduction Inference Factor Graphs Sum-Product Max-Sum P Inference in graphical models x x x y y y (a) (b) (c) Henrik I. Christensen (RIM@GT) Graphical Inference 6 / 38

  7. Introduction Inference Factor Graphs Sum-Product Max-Sum P Inference on a chain x 1 x 2 x N − 1 x N p ( x ) = 1 Z ψ 1 , 2 ( x 1 , x 2 ) ψ 2 , 3 ( x 2 , x 3 ) · · · ψ N − 1 , N ( x N − 1 , x N ) � � � � p ( x n ) = · · · p ( x ) x 1 x n − 1 x n +1 x N Henrik I. Christensen (RIM@GT) Graphical Inference 7 / 38

  8. Introduction Inference Factor Graphs Sum-Product Max-Sum P Inference on a chain µ α ( x n − 1 ) µ α ( x n ) µ β ( x n ) µ β ( x n +1 ) x 1 x n − 1 x n x n +1 x N  � �� 1 � p ( x n ) = ψ n − 1 , n ( x n − 1 , x n ) · · · ψ 1 , 2 ( x 1 , x 2 )  Z x n − 1 x 1 � �� � µ a ( x n ) �� �� �� ψ n , n +1 ( x n , x n +1 ) · · · ψ N − 1 , N ( x N − 1 , x N ) x n +1 x N � �� � µ b ( x n ) Henrik I. Christensen (RIM@GT) Graphical Inference 8 / 38

  9. Introduction Inference Factor Graphs Sum-Product Max-Sum P Inference on a chain µ α ( x n − 1 ) µ α ( x n ) µ β ( x n ) µ β ( x n +1 ) x 1 x n − 1 x n x n +1 x N �� � � µ a ( x n ) = ψ n − 1 , n ( x n − 1 , x n ) · · · ψ 1 , 2 ( x 1 , x 2 ) x n − 1 x 1 � = ψ n − 1 , n ( x n − 1 , x n ) µ a ( x n − 1 ) x n − 1 �� � � µ b ( x n ) = ψ n , n +1 ( x n , x n +1 ) · · · ψ N − 1 , N ( x N − 1 , x N ) x n +1 x N � = ψ n , n +1 ( x n , x n +1 ) µ b ( x n +1 x n +1 Henrik I. Christensen (RIM@GT) Graphical Inference 9 / 38

  10. Introduction Inference Factor Graphs Sum-Product Max-Sum P Inference on a chain µ α ( x n − 1 ) µ α ( x n ) µ β ( x n ) µ β ( x n +1 ) x 1 x n − 1 x n x n +1 x N µ a ( x 2 ) = � µ b ( x N − 1 ) = � x 1 ψ 1 , 2 ( x 1 , x 2 ) x N ψ N − 1 , N ( x N − 1 , x n ) � Z = µ a ( x n ) µ b ( x n ) x n Henrik I. Christensen (RIM@GT) Graphical Inference 10 / 38

  11. Introduction Inference Factor Graphs Sum-Product Max-Sum P Inference on a chain To compute local marginals Compute and store forward messages µ a ( x n ) Compute and store backward messages µ b ( x n ) Compute Z at all nodes Compute p ( x n ) = 1 Z µ a ( x n ) µ b ( x n ) for all variables Henrik I. Christensen (RIM@GT) Graphical Inference 11 / 38

  12. Introduction Inference Factor Graphs Sum-Product Max-Sum P Inference in trees Undirected Tree Directed Tree Directed Polytree Henrik I. Christensen (RIM@GT) Graphical Inference 12 / 38

  13. Introduction Inference Factor Graphs Sum-Product Max-Sum P Outline Introduction 1 Inference 2 Factor Graphs 3 Sum-Product Algorithm 4 The Max-Sum Algorithm 5 Summary 6 Henrik I. Christensen (RIM@GT) Graphical Inference 13 / 38

  14. Introduction Inference Factor Graphs Sum-Product Max-Sum P Factor Graphs x 1 x 2 x 3 f a f b f c f d p ( x ) = f a ( x 1 , x 2 ) f b ( x 1 , x 2 ) f c ( x 2 , x 3 ) f d ( x 3 ) � p ( x ) = f s ( x s ) s Henrik I. Christensen (RIM@GT) Graphical Inference 14 / 38

  15. Introduction Inference Factor Graphs Sum-Product Max-Sum P Factor Graphs from Directed Graphs x 1 x 2 x 1 x 2 x 1 x 2 f f c f a f b x 3 x 3 x 3 p ( x ) = p ( x 1 ) p ( x 2 ) f ( x 1 , x 2 , x 3 ) = f a ( x 1 ) = p ( x 1 ) p ( x 3 | x 1 , x 2 ) p ( x 1 ) p ( x 2 ) p ( x 3 | x 1 , x 2 ) f b ( x 2 ) = p ( x 2 ) f c ( x 1 , x 2 , x 3 ) = p ( x 3 | x 2 , x 1 ) Henrik I. Christensen (RIM@GT) Graphical Inference 15 / 38

  16. Introduction Inference Factor Graphs Sum-Product Max-Sum P Factor Graphs from Undirected Graphs x 1 x 2 x 1 x 2 x 1 x 2 f f a f b x 3 x 3 x 3 ψ ( x 1 , x 2 , x 3 ) f ( x 1 , x 2 , x 3 ) f a ( x 1 , x 2 , x 3 ) f b ( x 2 , x 3 ) = ψ ( x 1 , x 2 , x 3 ) = ψ ( x 1 , x 2 , x 3 ) Henrik I. Christensen (RIM@GT) Graphical Inference 16 / 38

  17. Introduction Inference Factor Graphs Sum-Product Max-Sum P Outline Introduction 1 Inference 2 Factor Graphs 3 Sum-Product Algorithm 4 The Max-Sum Algorithm 5 Summary 6 Henrik I. Christensen (RIM@GT) Graphical Inference 17 / 38

  18. Introduction Inference Factor Graphs Sum-Product Max-Sum P The Sum-Product Algorithm Objective exact, efficient algorithm for computing marginals make allow multiple marginals to be computed efficiently Key Idea The distributive Law ab + ac = a ( b + c ) Henrik I. Christensen (RIM@GT) Graphical Inference 18 / 38

  19. Introduction Inference Factor Graphs Sum-Product Max-Sum P The Sum-Product Algorithm µ f s → x ( x ) F s ( x, X s ) f s x � p ( x ) = p ( x ) x \ x � p ( x ) = F s ( x , X s ) s ∈ Ne ( x ) Henrik I. Christensen (RIM@GT) Graphical Inference 19 / 38

  20. Introduction Inference Factor Graphs Sum-Product Max-Sum P The Sum-Product Algorithm µ f s → x ( x ) F s ( x, X s ) f s x   � � �  = p ( x ) = F s ( x , X s ) µ f s → x ( x ) s ∈ Ne ( x ) X s s ∈ Ne ( x ) � µ f s → x ( x ) = F s ( x , X s ) X s Henrik I. Christensen (RIM@GT) Graphical Inference 20 / 38

  21. Introduction Inference Factor Graphs Sum-Product Max-Sum P The Sum-Product Algorithm x M µ x M → f s ( x M ) f s x µ f s → x ( x ) x m G m ( x m , X sm ) F s ( x , X s ) = f s ( x , x 1 , ..., x M ) G 1 ( x 1 , X s 1 ) . . . G M ( x M , X sM ) Henrik I. Christensen (RIM@GT) Graphical Inference 21 / 38

  22. Introduction Inference Factor Graphs Sum-Product Max-Sum P The Sum-Product Algorithm x M µ x M → f s ( x M ) f s x µ f s → x ( x ) x m G m ( x m , X sm )   � � � � µ f s → x ( x ) = · · · f s ( x , x 1 , ..., x M ) G m ( x m , X sm )  x 1 x M m ∈ Ne ( f s ) \ x X sm � � � = · · · f s ( x , x 1 , ..., x M ) µ x m → f s ( x m ) x 1 x M m ∈ Ne ( f s ) \ x Henrik I. Christensen (RIM@GT) Graphical Inference 22 / 38

  23. Introduction Inference Factor Graphs Sum-Product Max-Sum P The Sum-Product Algorithm x M µ x M → f s ( x M ) f s x µ f s → x ( x ) x m G m ( x m , X sm ) � � � µ x m → f s ( x m ) G m ( x m , X sm ) = F l ( x m , X lm ) X sm X sm l ∈ Ne ( x m ) \ f s � = µ f l → x m ( x m ) l ∈ Ne ( x m ) \ f s Henrik I. Christensen (RIM@GT) Graphical Inference 23 / 38

  24. Introduction Inference Factor Graphs Sum-Product Max-Sum P The Sum-Product Algorithm Initialization For variable nodes µ x → f ( x ) = 1 x f For factor nodes µ f → x ( x ) = f ( x ) x f Henrik I. Christensen (RIM@GT) Graphical Inference 24 / 38

  25. Introduction Inference Factor Graphs Sum-Product Max-Sum P The Sum-Product Algorithm To compute local marginals Pick an arbitrary node as root Compute and propagate msgs from leafs to root (store msgs) Compute and propagate msgs from root to leaf nodes (store msgs) Compute products of received msgs and normalize as required Propagate up the tree and down again to compute all marginals (as needed) Henrik I. Christensen (RIM@GT) Graphical Inference 25 / 38

  26. Introduction Inference Factor Graphs Sum-Product Max-Sum P Outline Introduction 1 Inference 2 Factor Graphs 3 Sum-Product Algorithm 4 The Max-Sum Algorithm 5 Summary 6 Henrik I. Christensen (RIM@GT) Graphical Inference 26 / 38

  27. Introduction Inference Factor Graphs Sum-Product Max-Sum P The Max-Sum Algorithm Objective find value x max that maximizes p(x) compute the value of p ( x max ) the method should be efficient Observation In general max marginals � = joint extremum Henrik I. Christensen (RIM@GT) Graphical Inference 27 / 38

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