The Elimination Algorithm Chris Williams School of Informatics, - - PowerPoint PPT Presentation

the elimination algorithm
SMART_READER_LITE
LIVE PREVIEW

The Elimination Algorithm Chris Williams School of Informatics, - - PowerPoint PPT Presentation

The Elimination Algorithm Chris Williams School of Informatics, University of Edinburgh October 2009 1 / 14 Overview Inference in Belief Networks Elimination in an Example Network The Elimination Algorithm Evidence Potentials Graph


slide-1
SLIDE 1

The Elimination Algorithm

Chris Williams

School of Informatics, University of Edinburgh

October 2009

1 / 14

slide-2
SLIDE 2

Overview

Inference in Belief Networks Elimination in an Example Network The Elimination Algorithm Evidence Potentials Graph Elimination Reconstituted Graph Reading: Jordan chapter 3

2 / 14

slide-3
SLIDE 3

Inference in Belief Networks

Partition the random variables x into three disjoint subsets xE, xF and xR. We wish to compute the posterior p(xF|xE)

  • ver the query nodes xF

This involves conditioning on the evidence nodes xE and summing out (integrating out) the hidden nodes xR If the joint distribution is simply a huge table this is trivial: select the appropriate indices in the columns corresponding to xE, sum over the columns corresponding to xR, and renormalize the resulting table over xF But what if the distribution is represented by a directed graphical model?

3 / 14

slide-4
SLIDE 4

An Example Network

1

X

2

X

3

X X 4 X 5 X6 p(x1|x6) = p(x1, x6)/p(x6) = p(x1, x6)/

  • x′

1

p(x

1, x6)

4 / 14

slide-5
SLIDE 5

p(x1, x6) =

  • x2
  • x3
  • x4
  • x5

p(x1)p(x2|x1)p(x3|x1)p(x4|x2)p(x5|x3)p(x6|x2, x5) = p(x1)

  • x2

p(x2|x1)

  • x3

p(x3|x1)

  • x4

p(x4|x2)

  • x5

p(x5|x3)p(x6|x2, x5) = p(x1)

  • x2

p(x2|x1)

  • x3

p(x3|x1)m5(x2, x3)

  • x4

p(x4|x2) = p(x1)

  • x2

p(x2|x1)m4(x2)

  • x3

p(x3|x1)m5(x2, x3) = p(x1)

  • x2

p(x2|x1)m4(x2)m3(x1, x2) = p(x1) m2(x1) using elimination ordering (6, 5, 4, 3, 2, 1)

5 / 14

slide-6
SLIDE 6

Notes on the example

x6 means that x6 is fixed to a specific value m5(x2, x3) =

x5 p(x5|x3)p(x6|x2, x5) etc

Note that m4(x2) = 1; why? Key idea 1: push sums inside products Key idea 2: cache subexpressions

6 / 14

slide-7
SLIDE 7

Evidence Potentials

Elimination uses a book-keeping trick, evidential potentials g(xi) =

  • xi

g(xi)δ(xi, xi) This trick allows us to treat conditioning in the same way as marginalization

7 / 14

slide-8
SLIDE 8

Elimination Algorithm, part I

ELIMINATE(G,E,F) INITIALIZE(G,F) EVIDENCE(E) UPDATE(G) NORMALIZE(F) INITIALIZE(G,F)

choose an ordering O such that F appears last for each node Xi in V place potential p(xi|parentsi) on the active list end for

8 / 14

slide-9
SLIDE 9

Elimination Algorithm, part II

EVIDENCE(E)

for each i in E place potential δ(xi, xi) on the active list end for

UPDATE(G)

for each i in O find all potentials in the active list that reference xi and remove them from the active list Let φi(xTi) denote the product of these potentials Let mi(xSi) =

xi φi(xTi)

Place mi(xSi) on the active list end for

NORMALIZE(F)

p(xF|xE) ← φF(xF)/

xF φF(xF)

9 / 14

slide-10
SLIDE 10

Graph Elimination

Consider first undirected graphs with pE(x) = 1 Z

  • C

ψE

XC(xc)

where the product is over cliques Start with an elimination ordering O At each step the algorithm eliminates the next node in O, where “eliminate” means removing the node from the graph and connecting the (remaining) neighbours of the node

10 / 14

slide-11
SLIDE 11

Moralization

There is one additional complexity for directed graphs: parents may not be explicitly connected, but are involved in the same potential function Thus to think of the ELIMINATION algorithm as node removal, we must first connect all the parents of every node and drop the directions of the links: this is known as “moralization”

11 / 14

slide-12
SLIDE 12

Graphically the stages for the example are:

1

X

2

X

3

X X 4 X 5 X6

1

X

2

X

3

X X 4 X 5 X6

(b)

1

X

2

X

3

X X 4 X 5

(c)

1

X

2

X

3

X X 4

(d)

1

X

2

X

3

X (e)

1

X

2

X (f)

12 / 14

slide-13
SLIDE 13

Reconstituted Graph

The reconstituted graph is the graph whose edge set includes all the original edges as well as any new edges created during elimination In fact, the reconstituted graph is a triangulated graph, see forthcoming lecture on the junction tree algorithm. Elimination is a simple algorithm for triangulating a graph

13 / 14

slide-14
SLIDE 14

1

X

2

X

3

X X 4 X 5 X6

The reconstituted graph; X2 − X5 is added via moralization, and X2 − X3 is added when eliminating X5

14 / 14