Minimum Bayes Risk SFPLODD September 24, 2013 Some - - PowerPoint PPT Presentation

minimum bayes risk
SMART_READER_LITE
LIVE PREVIEW

Minimum Bayes Risk SFPLODD September 24, 2013 Some - - PowerPoint PPT Presentation

Minimum Bayes Risk SFPLODD September 24, 2013 Some Things You Know How to decode by finding the single best global structure Lots of ways


slide-1
SLIDE 1

Minimum ¡Bayes ¡Risk ¡

SFPLODD ¡ September ¡24, ¡2013 ¡

slide-2
SLIDE 2

Some ¡Things ¡You ¡Know ¡

  • How ¡to ¡decode ¡by ¡finding ¡the ¡single ¡best ¡

global ¡structure ¡

– Lots ¡of ¡ways ¡to ¡think ¡about ¡the ¡algorithms ¡

  • How ¡to ¡find ¡posterior ¡marginals ¡for ¡

“parts” ¡(a.k.a. ¡“cliques”), ¡if ¡we ¡interpret ¡ scoring ¡probabilisQcally ¡

slide-3
SLIDE 3

A ¡Different ¡View ¡of ¡Decoding ¡

  • Cost ¡(someQmes ¡called ¡“loss”): ¡ ¡a ¡funcQon ¡that ¡

tells ¡how ¡bad ¡every ¡guess ¡y ¡is, ¡given ¡every ¡correct ¡ answer ¡y*: ¡ cost ¡: ¡Val(Y) ¡× ¡Val(Y) ¡→ ¡[0, ¡∞) ¡

  • Risk: ¡ ¡pretend ¡Y* ¡is ¡random ¡and ¡distributed ¡

according ¡to ¡your ¡model ¡distribuQon; ¡risk ¡is ¡the ¡ expectaQon ¡of ¡cost, ¡for ¡a ¡given ¡y: ¡ risk: ¡Val(Y) ¡→ ¡[0, ¡∞) ¡

  • MBR ¡decoding: ¡ ¡pick ¡the ¡y ¡that ¡minimizes ¡risk. ¡

arg min

y

X

y∗∈Y

p(y∗ | x) × cost(y, y∗)

slide-4
SLIDE 4

DerivaQon ¡

min

y Ep(x,Y ∗)[cost(y, Y ∗)] = min y

X

y∗∈Y

p(x, y∗) × cost(y, y∗) = min

y

X

y∗∈Y

p(x) × p(y∗ | x) × cost(y, y∗) = p(x) × min

y

X

y∗∈Y

p(y∗ | x) × cost(y, y∗)

slide-5
SLIDE 5

Example ¡1: ¡ ¡Posterior ¡Decoding ¡

  • model: ¡ ¡sequence ¡labeling ¡with ¡bigram ¡label ¡factors ¡
  • cost(y, ¡y*): ¡ ¡number ¡of ¡tokens ¡you ¡mislabeled ¡

(someQmes ¡called ¡“Hamming” ¡cost) ¡

  • risk(y): ¡ ¡expected ¡number ¡of ¡mislabeled ¡tokens ¡in ¡y ¡

¡ ¡ ¡ ¡

X

y∗

p(y∗ | x)

n

X

i=1

1{yi 6= y∗

i } = Ep(Y ∗|x)

" n X

i=1

1{yi 6= Y ∗

i }

# =

n

X

i=1

Ep(Y ∗|x)[1{yi 6= Y ∗

i }]

=

n

X

i=1

  • 1 Ep(Y ∗|x)[1{yi = Y ∗

i }]

slide-6
SLIDE 6

Example ¡2: ¡ ¡0-­‑1 ¡cost ¡

  • model: ¡ ¡anything ¡
  • cost(y, ¡y*): ¡ ¡0 ¡if ¡y ¡= ¡y*, ¡1 ¡otherwise ¡
  • risk(y): ¡ ¡1 ¡– ¡p(y ¡| ¡x) ¡

¡

slide-7
SLIDE 7

Example ¡2: ¡ ¡0-­‑1 ¡cost ¡

  • model: ¡ ¡anything ¡
  • cost(y, ¡y*): ¡ ¡0 ¡if ¡y ¡= ¡y*, ¡1 ¡otherwise ¡
  • risk(y): ¡ ¡1 ¡– ¡p(y ¡| ¡x) ¡

¡

slide-8
SLIDE 8

Example ¡3: ¡ ¡Maximum ¡Expected ¡Recall ¡ (Goodman, ¡1996) ¡

  • model: ¡ ¡PCFG ¡
  • cost(y, ¡y*) ¡= ¡number ¡of ¡labeled ¡spans ¡in ¡y* ¡

that ¡are ¡not ¡in ¡y ¡

  • risk(y) ¡= ¡sum ¡of ¡ ¡

(1 ¡-­‑ ¡posterior ¡probability ¡of ¡a ¡labeled ¡span) ¡

slide-9
SLIDE 9

Example ¡4: ¡ ¡WeighQng ¡Different ¡BIO ¡ Errors ¡

  • model: ¡ ¡BIO ¡
  • cost: ¡ ¡different ¡costs ¡for ¡recall, ¡precision, ¡and ¡

boundary ¡errors: ¡

correct: ¡ B-­‑B ¡ B-­‑I ¡ B-­‑O ¡ I-­‑B ¡ I-­‑I ¡ I-­‑O ¡ O-­‑B ¡ O-­‑O ¡ B-­‑B ¡ split ¡

  • prec. ¡

split ¡

  • prec. ¡
  • prec. ¡

B-­‑I ¡ merge ¡

  • bound. ¡

merge ¡

  • bound. ¡
  • bound. ¡
  • bound. ¡

B-­‑O ¡ recall ¡ recall ¡ recall ¡

  • bound. ¡

recall ¡ I-­‑B ¡ split ¡

  • prec. ¡

split ¡

  • prec. ¡
  • prec. ¡

I-­‑I ¡ merge ¡

  • bound. ¡

merge ¡

  • bound. ¡
  • bound. ¡
  • bound. ¡

I-­‑O ¡ recall ¡ recall ¡ recall ¡

  • bound. ¡

recall ¡ O-­‑B ¡

  • prec. ¡
  • prec. ¡
  • bound. ¡
  • prec. ¡
  • prec. ¡

O-­‑O ¡ recall ¡ recall ¡ recall ¡ recall ¡

slide-10
SLIDE 10

General ¡MBR ¡Algorithm ¡

Assump4on: ¡ ¡cost ¡factors ¡locally ¡into ¡parts ¡

  • 1. Calculate ¡posterior ¡distribuQon ¡for ¡each ¡part ¡

(generalized ¡inside ¡algorithm) ¡

  • 2. If ¡parts ¡don’t ¡overlap, ¡pick ¡local ¡argmax ¡for ¡

each ¡part. ¡

  • 3. Otherwise, ¡decode ¡with ¡a ¡model ¡that ¡

defines: ¡

¯ fj,π(π0) = −localcost(π, π0) ¯ wj,π = p(part j = π | x)

slide-11
SLIDE 11

Pop ¡Quiz ¡

Can ¡you ¡think ¡of ¡a ¡cost ¡funcQon ¡such ¡that ¡ minimum ¡Bayes ¡risk ¡decoding ¡can’t ¡be ¡done ¡in ¡ polynomial ¡Qme? ¡