max-sum exact inference

17
Daphne Koller MAP Max-Sum Exact Inference Probabilistic Graphical Models Inference

Upload: dorjan

Post on 23-Jan-2016

32 views

Category:

Documents


0 download

DESCRIPTION

Inference. Probabilistic Graphical Models. MAP. Max-Sum Exact Inference. Product  Summation. E. A. B. C. D. Max-Sum Elimination in Chains. X. Factor Summation. Factor Maximization. E. A. B. C. D. Max-Sum Elimination in Chains. X. X. E. A. B. C. D. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Max-Sum  Exact Inference

Daphne Koller

MAP

Max-Sum Exact Inference

ProbabilisticGraphicalModels

Inference

Page 2: Max-Sum  Exact Inference

Daphne Koller

Product Summation a1 b1 8

a1 b2 1

a2 b1 0.5

a2 b2 2

a1 b1 3

a1 b2 0

a2 b1 -1

a2 b2 1

Page 3: Max-Sum  Exact Inference

Daphne Koller

Max-Sum Elimination in Chains

A B C ED

),(),(),(),(maxmaxmaxmax 4321 EDDCCBBAABCD

X

),(max),(),(),(maxmaxmax 1432 BAEDDCCB ABCD

)(),(),(),(maxmaxmax 1432 BEDDCCBBCD

Page 4: Max-Sum  Exact Inference

Daphne Koller

a1 b1 3

a1 b2 0

a2 b1 -1

a2 b2 1

b1 c1 4

b1 c2 1.5

b2 c1 0.2

b2 c2 2

a1 b1 c1 3+4=7

a1 b1 c2 3+1.5=4.5

a1 b2 c1 0+0.2=0.2

a1 b2 c2 0+2=2

a2 b1 c1 -1+4=3

a2 b1 c2 -1+1.5=0.5

a2 b2 c1 1+0.2=1.2

a2 b2 c2 1+2=3

Factor Summation

Page 5: Max-Sum  Exact Inference

Daphne Koller

Factor Maximization

a1 b1 c1 7

a1 b1 c2 4.5

a1 b2 c1 0.2

a1 b2 c2 2

a2 b1 c1 3

a2 b1 c2 0.5

a2 b2 c1 1.2

a2 b2 c2 3

a1 c1 7

a1 c2 4.5

a2 c1 3

a2 c2 3

Page 6: Max-Sum  Exact Inference

Daphne Koller

Max-Sum Elimination in Chains

A B C EDX X )(),(),(),(maxmaxmax 1432 BEDDCCBBCD

)(),(max),(),(maxmax 1243 BCBEDDC BCD

)(),(),(maxmax 243 CEDDCCD

Page 7: Max-Sum  Exact Inference

Daphne Koller

Max-Sum Elimination in Chains

A B C EDX X )(),(),(maxmax 243 CEDDCCD

X X

)(),(max 34 DEDD

)(4 E )(4 e

Page 8: Max-Sum  Exact Inference

Daphne Koller

Max-Sum in Clique TreesA B C ED

1:A,B

2: B,C

3: C,D

4: D,E

B C D

23(C) = 212max B

12(B) =

1max A

34(D) = 323max C

32(C) = 343max D

43(D) =

4max E21(B) =

232max C

Page 9: Max-Sum  Exact Inference

Daphne Koller

Convergence of Message Passing

1:A,B

2: B,C

3: C,D

4: D,E

B C D

23(C) = 212max B

12(B) =

1max A

34(D) = 323max C

32(C) = 343max D

43(D) =

4max E21(B) =

232max C

• Once Ci receives a final message from all neighbors except Cj, then ij is also final (will never change)

• Messages from leaves are immediately final

Page 10: Max-Sum  Exact Inference

Daphne Koller

Simple ExampleA B C

a1 b1 3

a1 b2 0

a2 b1 -1

a2 b2 1

b1 c1 4

b1 c2 1.5

b2 c1 0.2

b2 c2 2

a1 b1 c1 3+4=7

a1 b1 c2 3+1.5=4.5

a1 b2 c1 0+0.2=0.2

a1 b2 c2 0+2=2

a2 b1 c1 -1+4=3

a2 b1 c2 -1+1.5=0.5

a2 b2 c1 1+0.2=1.2

a2 b2 c2 1+2=3

Page 11: Max-Sum  Exact Inference

Daphne Koller

Simple Examplea1 b1 3

a1 b2 0

a2 b1 -1

a2 b2 1

b1 3

b2 1

b1 c1 4

b1 c2 1.5

b2 c1 0.2

b2 c2 2

1:A,B

2: B,C

B

b1 c1 4+3=7

b1 c2 1.5+3=4.5

b2 c1 0.2+1=1.2

b2 c2 2+1=3

b1 4

b2 2

a1 b1 3+4=7

a1 b2 0+2=2

a2 b1

-1+4=3

a2 b2 1+2=3

Page 12: Max-Sum  Exact Inference

Daphne Koller

Max-Sum BP at Convergence

• Each clique contains max-marginal

• Cliques are necessarily calibrated– Agree on sepsets

b1 c1 4+3=7

b1 c2 1.5+3=4.5

b2 c1 0.2+1=1.2

b2 c2 2+1=3

a1 b1 3+4=7

a1 b2 0+2=2

a2 b1

-1+4=3

a2 b2 1+2=3

Page 13: Max-Sum  Exact Inference

Daphne Koller

Decoding a MAP Assignment• Easy if MAP assignment is unique

– Single maximizing assignment at each clique– Whose value is the value of the MAP assignment– Due to calibration, choices at all cliques must agree

a1 b1 c1 7

a1 b1 c2 4.5

a1 b2 c1 0.2

a1 b2 c2 2

a2 b1 c1 3

a2 b1 c2 0.5

a2 b2 c1 1.2

a2 b2 c2 3

b1 c1 4+3=7

b1 c2 1.5+3=4.5

b2 c1 0.2+1=1.2

b2 c2 2+1=3

a1 b1 3+4=7

a1 b2 0+2=2

a2 b1

-1+4=3

a2 b2 1+2=3

Page 14: Max-Sum  Exact Inference

Daphne Koller

Decoding a MAP assignment• If MAP assignment is not unique, we may

have multiple choices at some cliques• Arbitrary tie-breaking may not produce a

MAP assignment

b1 c1 2

b1 c2 1

b2 c1 1

b2 c2 2

a1 b1 2

a1 b2 1

a2 b1 1

a2 b2 2

Page 15: Max-Sum  Exact Inference

Daphne Koller

Decoding a MAP assignment• If MAP assignment is not unique, we may

have multiple choices at some cliques• Arbitrary tie-breaking may not produce a

MAP assignment• Two options:– Slightly perturb parameters to make MAP unique– Use traceback procedure that incrementally

builds a MAP assignment, one variable at a time

Page 16: Max-Sum  Exact Inference

Daphne Koller

Summary• The same clique tree algorithm used for

sum-product can be used for max-sum• Result is a max-marginal at each clique C:– For each assignment c to C, what is the score of

the best completion to c

• Decoding the MAP assignment– If MAP assignment is unique, max-marginals

allow easy decoding– Otherwise, some additional effort is required

Page 17: Max-Sum  Exact Inference

Daphne Koller

END END END