Probability Distribu.ons on Structured Objects September - - PowerPoint PPT Presentation

probability distribu ons on structured objects
SMART_READER_LITE
LIVE PREVIEW

Probability Distribu.ons on Structured Objects September - - PowerPoint PPT Presentation

Probability Distribu.ons on Structured Objects September 17, 2013 Reminder HW1 is due at 11:59pm tonight There was some ambiguity in this assignment


slide-1
SLIDE 1

Probability ¡Distribu.ons ¡on ¡ Structured ¡Objects ¡

September ¡17, ¡2013 ¡

slide-2
SLIDE 2

Reminder ¡

  • HW1 ¡is ¡due ¡at ¡11:59pm ¡tonight ¡
  • There ¡was ¡some ¡ambiguity ¡in ¡this ¡assignment ¡
  • The ¡TAs ¡gave ¡a ¡lot ¡of ¡help, ¡but ¡in ¡general, ¡

learning ¡to ¡work ¡from ¡incomplete ¡specs ¡is ¡ important ¡

slide-3
SLIDE 3

Probability ¡Outline ¡

  • Why ¡probability? ¡
  • Probability ¡review ¡
  • Mul.nomials ¡vs. ¡exponen.al ¡parameteriza.on ¡
  • Locally ¡vs. ¡globally ¡normalized ¡models ¡& ¡

par..on ¡func.ons ¡

  • Examples ¡
slide-4
SLIDE 4

Why ¡Probability? ¡

  • Probability ¡formalizes ¡

– The ¡concept ¡of ¡models ¡ – The ¡concept ¡of ¡data ¡ – The ¡concept ¡of ¡learning ¡ – The ¡concept ¡of ¡predic0on ¡(inference) ¡

Probability is expectation founded upon partial knowledge.

slide-5
SLIDE 5

Why ¡Probability? ¡

  • What ¡might ¡we ¡have ¡par.al ¡knowledge ¡

about? ¡

– The ¡state ¡of ¡the ¡world ¡(test ¡data) ¡ – The ¡reliability ¡of ¡our ¡training ¡data ¡ – The ¡correctness ¡of ¡our ¡model ¡ – The ¡values ¡of ¡our ¡parameters ¡

p(x | partial knowledge)

slide-6
SLIDE 6

What ¡is ¡a ¡Probability? ¡

  • Limi0ng ¡(rela0ve) ¡frequency ¡of ¡events ¡

– in ¡repeated ¡(iden.cal) ¡experiments ¡

  • Degree ¡of ¡belief ¡

– Subjec.ve ¡concep.on ¡ – 40% ¡chance ¡of ¡rain ¡tomorrow ¡in ¡PiXsburgh ¡

  • Viewpoint ¡affects ¡

– interpreta.on ¡ – not ¡rules ¡of ¡probability ¡calculus ¡themselves ¡

slide-7
SLIDE 7

Discrete ¡Distribu.ons ¡

x1 x2

Sample ¡space ¡

Discrete ¡distribu.on: ¡ ¡ ¡ ¡ ¡ ¡ ¡is ¡finite ¡or ¡countable, ¡ but ¡no ¡bigger ¡ ¡ Ω

slide-8
SLIDE 8

Discrete ¡Distribu.ons ¡

∀ x ∈ Ω, f(x) ∈ [0, 1] X

x∈Ω

f(x) = 1 An ¡event ¡is ¡a ¡subset ¡(maybe ¡one ¡element) ¡

  • f ¡the ¡sample ¡space, ¡ ¡E ⊆ Ω

P(E) = X

x∈E

f(x)

Probability ¡mass ¡func.on ¡

slide-9
SLIDE 9

Random ¡Variables ¡

A ¡random ¡variable ¡is ¡a ¡func.on ¡from ¡a ¡random ¡event ¡ from ¡a ¡set ¡of ¡possible ¡outcomes ¡( ¡ ¡ ¡) ¡and ¡a ¡probability ¡ distribu.on ¡( ¡ ¡), ¡a ¡func.on ¡from ¡outcomes ¡to ¡ probabili.es. ¡

Ω ρ X(ω) = ω ρX(x) = (

1 6

if x = 1, 2, 3, 4, 5, 6

  • therwise

Ω = {1, 2, 3, 4, 5, 6}

slide-10
SLIDE 10

Random ¡Variables ¡

A ¡random ¡variable ¡is ¡a ¡func.on ¡from ¡a ¡random ¡event ¡ from ¡a ¡set ¡of ¡possible ¡outcomes ¡( ¡ ¡ ¡) ¡and ¡a ¡probability ¡ distribu.on ¡( ¡ ¡), ¡a ¡func.on ¡from ¡outcomes ¡to ¡ probabili.es. ¡

Ω ρ Ω = {1, 2, 3, 4, 5, 6} ρY (y) = (

1 2

if y = 0, 1

  • therwise

Y (ω) = ( if ω ∈ {2, 4, 6} 1

  • therwise
slide-11
SLIDE 11

Sampling ¡Nota.on ¡

Random variable Distribution Parameter

x = 4 × z + 1.7 y ∼ Distribution(θ)

Variable Expression

slide-12
SLIDE 12

Sampling ¡Nota.on ¡

Random variable Distribution Parameter

x = 4 × z + 1.7 y ∼ Distribution(θ)

slide-13
SLIDE 13

Sampling ¡Nota.on ¡

x = 4 × z + 1.7 y ∼ Distribution(θ)

y0 = y × x

Random variable

slide-14
SLIDE 14

Joint ¡Probability ¡

  • Probability ¡over ¡mul.ple ¡event ¡types ¡
  • Tool ¡for ¡reasoning ¡about ¡dependent ¡

(correlated) ¡events ¡

A ¡joint ¡probability ¡distribu0on ¡is ¡a ¡probability ¡ distribu.on ¡over ¡r.v.’s ¡with ¡the ¡following ¡form: ¡

Z = X(ω) Y (ω)

  • X

x∈X,y∈Y

ρZ ✓ x y ◆ = 1 ρZ ✓ x y ◆ ≥ 0 ∀x ∈ X, y ∈ Y

slide-15
SLIDE 15

Joint ¡Probability ¡

  • Probability ¡over ¡mul.ple ¡event ¡types ¡
  • Tool ¡for ¡reasoning ¡about ¡dependent ¡

(correlated) ¡events ¡

A ¡joint ¡probability ¡distribu0on ¡is ¡a ¡probability ¡ distribu.on ¡over ¡r.v.’s ¡with ¡the ¡following ¡form: ¡

Z = X(ω) Y (ω)

  • X

x∈X,y∈Y

ρZ ✓ x y ◆ = 1 ρZ ✓ x y ◆ ≥ 0 ∀x ∈ X, y ∈ Y

Words ¡ Tags ¡

slide-16
SLIDE 16

Joint ¡Probability ¡

  • Probability ¡over ¡mul.ple ¡event ¡types ¡
  • Tool ¡for ¡reasoning ¡about ¡dependent ¡

(correlated) ¡events ¡

A ¡joint ¡probability ¡distribu0on ¡is ¡a ¡probability ¡ distribu.on ¡over ¡r.v.’s ¡with ¡the ¡following ¡form: ¡

Z = X(ω) Y (ω)

  • X

x∈X,y∈Y

ρZ ✓ x y ◆ = 1 ρZ ✓ x y ◆ ≥ 0 ∀x ∈ X, y ∈ Y

Words ¡ Trees ¡

slide-17
SLIDE 17

Joint ¡Probability ¡

  • Probability ¡over ¡mul.ple ¡event ¡types ¡
  • Tool ¡for ¡reasoning ¡about ¡dependent ¡

(correlated) ¡events ¡

A ¡joint ¡probability ¡distribu0on ¡is ¡a ¡probability ¡ distribu.on ¡over ¡r.v.’s ¡with ¡the ¡following ¡form: ¡

Z = X(ω) Y (ω)

  • X

x∈X,y∈Y

ρZ ✓ x y ◆ = 1 ρZ ✓ x y ◆ ≥ 0 ∀x ∈ X, y ∈ Y

DNA ¡sequence ¡ Proteins ¡

slide-18
SLIDE 18

X(ω) = ω Ω = {1, 2, 3, 4, 5, 6}

slide-19
SLIDE 19

X(ω) = ω Ω = {1, 2, 3, 4, 5, 6}

Ω = {(1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6), (5, 1), (5, 2), (5, 3), (5, 4), (5, 5), (5, 6), (6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6), } X(ω) = ω1 Y (ω) = ω2 ρX,Y (x, y) = (

1 36

if (x, y) ∈ Ω

  • therwise
slide-20
SLIDE 20

X(ω) = ω Ω = {1, 2, 3, 4, 5, 6}

Ω = {(1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6), (5, 1), (5, 2), (5, 3), (5, 4), (5, 5), (5, 6), (6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6), } X(ω) = ω1 Y (ω) = ω2 ρX,Y (x, y) = (

x+y 252

if (x, y) ∈ Ω

  • therwise
slide-21
SLIDE 21

Marginal ¡Probability ¡

p(X = x, Y = y) = ρX,Y (x, y) p(X = x) = X

y02Y

p(X = x, Y = y0) p(Y = y) = X

x02X

p(X = x0, Y = y)

Ω = {(1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6), (5, 1), (5, 2), (5, 3), (5, 4), (5, 5), (5, 6), (6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6), }

p(X = 4) = X

y02[1,6]

p(X = 4, Y = y0)

p(Y = 3) = X

x02[1,6]

p(X = x0, Y = 3)

slide-22
SLIDE 22

Marginal ¡Probability ¡

Sample ¡space ¡

(NN, cat) (NN, sloth) (JJ, fuzzy) (RB, quickly) (NN, book) (VB, book)

slide-23
SLIDE 23

Marginal ¡Probability ¡

Sample ¡space ¡

(NN, cat) (NN, sloth) (JJ, fuzzy) (RB, quickly) (NN, book) (VB, book) (NN, ·) p(t = NN)

slide-24
SLIDE 24

Marginal ¡Probability ¡

Sample ¡space ¡

(NN, cat) (NN, sloth) (JJ, fuzzy) (RB, quickly) (NN, book) (VB, book) p(w = book)

slide-25
SLIDE 25

Marginal ¡Probability ¡

Sample ¡space ¡

(NN, cat) (NN, sloth) (JJ, fuzzy) (RB, quickly) (NN, book) (VB, book)

slide-26
SLIDE 26

Marginal ¡Probabili.es ¡

  • In ¡a ¡joint ¡model ¡of ¡word ¡and ¡tag ¡sequences ¡

p(w,t) ¡

– The ¡probability ¡of ¡a ¡word ¡sequence ¡p(w) ¡ – The ¡probability ¡of ¡a ¡tag ¡sequence ¡p(t) ¡ – The ¡probability ¡of ¡a ¡word ¡sequence ¡with ¡the ¡word ¡ “cat” ¡somewhere ¡in ¡it ¡ – The ¡probability ¡of ¡a ¡tag ¡sequence ¡containing ¡three ¡ verbs ¡in ¡a ¡row ¡

slide-27
SLIDE 27

Condi.onal ¡Probability ¡

The ¡condi0onal ¡probability ¡is ¡defined ¡as ¡follows: ¡

p(X = x | Y = y) = p(X = x, Y = y) p(Y = y) = joint probability marginal

p(Y = y) 6= 0

This ¡assumes ¡

p(x | y)p(y) = p(x, y) = p(y | x)p(x)

We ¡can ¡construct ¡joint ¡probability ¡distribu.ons ¡out ¡of ¡ condi.onal ¡distribu.ons: ¡

slide-28
SLIDE 28

Condi.onal ¡Probability ¡Distribu.ons ¡

The ¡condi0onal ¡probability ¡distribu0on ¡of ¡a ¡variable ¡X ¡ given ¡a ¡variable ¡Y ¡has ¡the ¡following ¡proper.es: ¡

∀ y ∈ Y, X

x∈X

p(X = x | Y = y) = 1

slide-29
SLIDE 29

Condi.onal ¡Probability ¡

Sample ¡space ¡

(NN, cat) (NN, sloth) (JJ, fuzzy) (RB, quickly) (NN, book) (VB, book)

slide-30
SLIDE 30

Condi.onal ¡Probability ¡

Sample ¡space ¡

(NN, cat) (NN, sloth) (JJ, fuzzy) (RB, quickly) (NN, book) (VB, book) p(· | w = book)

slide-31
SLIDE 31

Condi.onal ¡Probabili.es ¡

  • In ¡a ¡joint ¡model ¡of ¡word ¡and ¡tag ¡sequences ¡

p(w,t) ¡

– The ¡probability ¡of ¡a ¡tag ¡sequence ¡given ¡a ¡word ¡ sequence ¡p(t ¡| ¡w) ¡ – The ¡probability ¡of ¡a ¡word ¡sequence ¡given ¡a ¡tag ¡ sequence ¡p(w ¡| ¡t) ¡

slide-32
SLIDE 32

Joint ¡and ¡Marginal ¡Probabili.es ¡

  • In ¡a ¡joint ¡model ¡of ¡word ¡and ¡tag ¡sequences ¡

p(w,t) ¡

– The ¡probability ¡that ¡the ¡3rd ¡tag ¡is ¡VERB, ¡given ¡ w ¡= ¡“Time ¡flies ¡like ¡an ¡arrow” ¡ p(t3 ¡= ¡VERB| ¡w ¡= ¡Time ¡flies ¡like ¡an ¡arrow) ¡ ¡ – The ¡probability ¡that ¡the ¡3rd ¡word ¡is ¡like, ¡given ¡ w ¡= ¡“Time ¡flies ¡_____ ¡an ¡arrow”, ¡t3 ¡= ¡VERB ¡ p(t3 ¡= ¡like ¡| ¡w ¡= ¡Time ¡flies ¡____ ¡an ¡arrow, ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡t3 ¡= ¡VERB) ¡ ¡

slide-33
SLIDE 33

Chain ¡Rule ¡

p(a, b, c, d, . . .) =p(a)× p(b | a)× p(c | a, b)× p(d | a, b, c)× . . .

slide-34
SLIDE 34

Bayes ¡Rule ¡

p(x | y) = p(y | x)p(x) p(y) ✓ = p(y | x)p(x) P

x0 p(y | x0)p(x0)

◆ p(x | y)p(y) = p(y | x)p(x)

Posterior Likelihood Prior Evidence

slide-35
SLIDE 35

Independence ¡

Two ¡r.v.’s ¡are ¡independent ¡iff ¡

p(X = x, Y = y) = p(X = x) × p(Y = y)

Equivalently ¡(prove ¡with ¡def. ¡of ¡cond. ¡prob.) ¡

p(X = x | Y = y) = p(X = x)

Alterna.vely, ¡

p(Y = y | X = x) = p(Y = y)

slide-36
SLIDE 36

Condi.onal ¡Independence ¡

Two ¡equivalent ¡statements ¡of ¡condi.onal ¡independence: ¡

p(a, c | b) = p(a | b)p(c | b)

and: ¡

p(a | b, c) = p(a | b)

“If ¡I ¡know ¡B, ¡then ¡C ¡doesn’t ¡tell ¡me ¡about ¡A” ¡

p(a | b, c) = p(a | b) p(a, b, c) = p(a | b, c)p(b, c) = p(a | b, c)p(b | c)p(c)

slide-37
SLIDE 37

Condi.onal ¡Independence ¡

Two ¡equivalent ¡statements ¡of ¡condi.onal ¡independence: ¡

p(a, c | b) = p(a | b)p(c | b)

and: ¡

p(a | b, c) = p(a | b)

“If ¡I ¡know ¡B, ¡then ¡C ¡doesn’t ¡tell ¡me ¡about ¡A” ¡

p(a | b, c) = p(a | b) p(a, b, c) = p(a | b, c)p(b, c) = p(a | b, c)p(b | c)p(c) = p(a | b)p(b | c)p(c)

slide-38
SLIDE 38

Condi.onal ¡Independence ¡

  • Useful ¡thing ¡to ¡assume ¡when ¡designing ¡

models ¡

– Limit ¡the ¡variables ¡that ¡influence ¡distribu.ons ¡ – Classical ¡example: ¡Markov ¡assump.on ¡

  • Ques.ons ¡

– Does ¡condi.onal ¡independence ¡imply ¡marginal ¡ independence? ¡ – Does ¡marginal ¡independence ¡imply ¡condi.onal ¡ independence? ¡

slide-39
SLIDE 39

Expected ¡Values ¡

Ep(X=x) [f(x)] . = X

x∈X

p(X = x) × f(x) p(X = y) = Ep(X=x) [Ix=y] H(X) = Ep(X=x)[− log2 x] Some ¡special ¡expecta.ons: ¡

slide-40
SLIDE 40

Categorical ¡(Mul.nomial) ¡Distribu.ons ¡

  • Generalized ¡model ¡of ¡a ¡di ¡to ¡k ¡dimensions ¡
  • Op.on ¡1: ¡Parameters ¡lie ¡on ¡the ¡k-­‑simplex ¡

∆k = ( (θ1, θ2, . . . , θk)

  • k

X

i=1

θi = 1 ∧ θi ≥ 0 ∀ i ∈ [0, k] )

θ1 θ2

slide-41
SLIDE 41

Log-­‑linear ¡Parameteriza.on ¡

Feature ¡vector ¡func.on ¡ Weight ¡vector ¡ Assump.on: ¡Z ¡converges ¡

p(x) = exp w>f(x) Z where Z = X

x02X

exp w>f(x)

slide-42
SLIDE 42

Categorical ¡(Mul.nomial) ¡Distribu.ons ¡

  • “Naïve” ¡parameteriza.on ¡

– k ¡outcomes, ¡k(-­‑1) ¡independent ¡parameters ¡ – Model ¡as ¡tables ¡of ¡(condi.onal) ¡probabili.es ¡ – MLE ¡es.ma.on ¡(given ¡fully ¡observed ¡data) ¡is ¡easy ¡

  • Log-­‑linear ¡parameteriza.on ¡

– k ¡outcomes, ¡n, ¡possibly ¡overlapping ¡parameters ¡

  • Share ¡sta.s.cal ¡strength ¡across ¡“related” ¡events ¡
  • How ¡are ¡elements ¡related? ¡Depends ¡how ¡you ¡define ¡f ¡
slide-43
SLIDE 43

Locally ¡Normalized ¡Models ¡

  • Structure ¡as ¡the ¡result ¡of ¡a ¡discrete ¡0me ¡

branching ¡process ¡

– Start ¡in ¡a ¡known ¡ini.al ¡state, ¡carry ¡out ¡stochas.c ¡ steps ¡(parameterized ¡using ¡mul.nomials) ¡un.l ¡some ¡ termina.on ¡condi.on ¡is ¡met ¡ – Steps ¡are ¡(condi.onally) ¡independent ¡of ¡one ¡another: ¡ probabili.es ¡mul.ply ¡ – Total ¡probability ¡is ¡the ¡probability ¡of ¡the ¡steps ¡

  • Usually ¡for ¡joint ¡(genera.ve) ¡models ¡

– not ¡always ¡though ¡(see ¡Appendix ¡D.2) ¡

slide-44
SLIDE 44

S ¡ 1.0 ¡

slide-45
SLIDE 45

S ¡ NP ¡ VP ¡ 1.0 ¡x ¡p(NP ¡VP ¡| ¡S) ¡

slide-46
SLIDE 46

S ¡ NP ¡ VP ¡ JJ ¡ NN ¡ 1.0 ¡x ¡p(NP ¡VP ¡| ¡S) ¡ x ¡p(JJ ¡NN ¡| ¡NP) ¡

slide-47
SLIDE 47

S ¡ NP ¡ VP ¡ JJ ¡ NN ¡ V ¡ 1.0 ¡x ¡p(NP ¡VP ¡| ¡S) ¡ x ¡p(JJ ¡NN ¡| ¡NP) ¡ x ¡p(V ¡| ¡VP) ¡

slide-48
SLIDE 48

S ¡ NP ¡ VP ¡ JJ ¡ NN ¡ V ¡ angry ¡ 1.0 ¡x ¡p(NP ¡VP ¡| ¡S) ¡ x ¡p(JJ ¡NN ¡| ¡NP) ¡ x ¡p(V ¡| ¡VP) ¡ x ¡p(angry ¡| ¡JJ) ¡

slide-49
SLIDE 49

S ¡ NP ¡ VP ¡ JJ ¡ NN ¡ V ¡ angry ¡ dogs ¡ 1.0 ¡x ¡p(NP ¡VP ¡| ¡S) ¡ x ¡p(JJ ¡NN ¡| ¡NP) ¡ x ¡p(V ¡| ¡VP) ¡ x ¡p(angry ¡| ¡JJ) ¡ x ¡p(dogs ¡| ¡NN) ¡

slide-50
SLIDE 50

S ¡ NP ¡ VP ¡ 1.0 ¡x ¡p(NP ¡VP ¡| ¡S) ¡ x ¡p(JJ ¡NN ¡| ¡NP) ¡ x ¡p(V ¡| ¡VP) ¡ x ¡p(angry ¡| ¡JJ) ¡ x ¡p(dogs ¡| ¡NN) ¡ x ¡p(bark ¡| ¡V) ¡ ¡ JJ ¡ NN ¡ V ¡ angry ¡ dogs ¡ bark ¡

p(τ, x) = Y

r∈G

p(r | G)f(r∈τ)

slide-51
SLIDE 51

S ¡ NP ¡ VP ¡ 1.0 ¡x ¡p(NP ¡VP ¡| ¡S) ¡ x ¡p(JJ ¡NN ¡| ¡NP) ¡ x ¡p(V ¡| ¡VP) ¡ x ¡p(angry ¡| ¡JJ) ¡ x ¡p(dogs ¡| ¡NN) ¡ x ¡p(bark ¡| ¡V) ¡ ¡ JJ ¡ NN ¡ V ¡ angry ¡ dogs ¡ bark ¡

slide-52
SLIDE 52

S ¡ 1.0 ¡

Here’s ¡an ¡alterna9ve ¡way ¡of ¡building ¡a ¡tree ¡and ¡string: ¡

slide-53
SLIDE 53

S ¡ 1.0 ¡x ¡p(2 ¡kids ¡| ¡S) ¡ ¡

Here’s ¡an ¡alterna9ve ¡way ¡of ¡building ¡a ¡tree ¡and ¡string: ¡

slide-54
SLIDE 54

S ¡ 1.0 ¡x ¡p(2 ¡kids ¡| ¡S) ¡ x ¡p(NP ¡| ¡S, ¡n=1, ¡total=2) ¡ NP ¡

Here’s ¡an ¡alterna9ve ¡way ¡of ¡building ¡a ¡tree ¡and ¡string: ¡

slide-55
SLIDE 55

S ¡ 1.0 ¡x ¡p(2 ¡kids ¡| ¡S) ¡ x ¡p(NP ¡| ¡S, ¡n=1, ¡total=2) ¡ x ¡p(VP ¡| ¡S, ¡n=2, ¡total=2) ¡ NP ¡ VP ¡

Here’s ¡an ¡alterna9ve ¡way ¡of ¡building ¡a ¡tree ¡and ¡string: ¡

slide-56
SLIDE 56

S ¡ 1.0 ¡x ¡p(2 ¡kids ¡| ¡S) ¡ x ¡p(NP ¡| ¡S, ¡n=1, ¡total=2) ¡ x ¡p(VP ¡| ¡S, ¡n=2, ¡total=2) ¡ x ¡p(1 ¡kid ¡| ¡VP) ¡ NP ¡ VP ¡

Here’s ¡an ¡alterna9ve ¡way ¡of ¡building ¡a ¡tree ¡and ¡string: ¡

slide-57
SLIDE 57

S ¡ 1.0 ¡x ¡p(2 ¡kids ¡| ¡S) ¡ x ¡p(NP ¡| ¡S, ¡n=1, ¡total=2) ¡ x ¡p(VP ¡| ¡S, ¡n=2, ¡total=2) ¡ x ¡p(1 ¡kid ¡| ¡VP) ¡ NP ¡ VP ¡

Here’s ¡an ¡alterna9ve ¡way ¡of ¡building ¡a ¡tree ¡and ¡string: ¡

. . . . . .

slide-58
SLIDE 58

S ¡ 1.0 ¡x ¡p(2 ¡kids ¡| ¡S) ¡ x ¡p(NP ¡| ¡S, ¡n=1, ¡total=2) ¡ x ¡p(VP ¡| ¡S, ¡n=2, ¡total=2) ¡ x ¡p(1 ¡kid ¡| ¡VP) ¡ NP ¡ VP ¡

Here’s ¡an ¡alterna9ve ¡way ¡of ¡building ¡a ¡tree ¡and ¡string: ¡

. . . . . .

slide-59
SLIDE 59

S ¡ 1.0 ¡x ¡p(2 ¡kids ¡| ¡S) ¡ x ¡p(NP ¡| ¡S, ¡n=1, ¡total=2) ¡ x ¡p(VP ¡| ¡S, ¡n=2, ¡total=2) ¡ x ¡p(1 ¡kid ¡| ¡VP) ¡ x ¡p(1 ¡kid ¡| ¡VP, ¡S) ¡ NP ¡ VP ¡

Here’s ¡an ¡alterna9ve ¡way ¡of ¡building ¡a ¡tree ¡and ¡string: ¡

. . . . . .

slide-60
SLIDE 60

Choosing ¡a ¡Model ¡

  • Independence ¡is ¡a ¡property ¡of ¡distribu.ons ¡

– Look ¡at ¡distribu.ons ¡in ¡the ¡wild, ¡figure ¡out ¡what ¡ independence ¡assump.ons ¡hold ¡

  • Dependence ¡makes ¡modeling ¡more ¡expensive ¡

– How ¡big ¡does ¡your ¡CKY ¡chart ¡have ¡to ¡be ¡if ¡you ¡ have ¡“grandparent” ¡annota.on? ¡

slide-61
SLIDE 61

Parameteriza.on ¡

  • For ¡each ¡step ¡in ¡the ¡branching ¡process ¡

– We ¡have ¡a ¡mul.nomial ¡distribu.on ¡ – We ¡can ¡use ¡independent ¡parameters ¡(on ¡simplex) ¡ – We ¡can ¡use ¡log-­‑linear ¡models ¡

  • “Locally ¡normalized ¡model” ¡(cf. ¡Appendix ¡D.2) ¡
  • Z ¡is ¡“local” ¡to ¡the ¡decision ¡being ¡made ¡
slide-62
SLIDE 62

Globally ¡Normalized ¡Models ¡

  • Extension ¡of ¡the ¡exponen.al ¡parameteriza.on ¡

to ¡structured ¡output ¡spaces ¡

p(x) = exp w>F(x) Z where Z = X

x02X

exp w>F(x0)

slide-63
SLIDE 63

Condi.onal ¡Random ¡Fields ¡

Z(x) = X

y02Yx

exp w>F(x)

p(y | x) = exp w>F(x) Z(x)

slide-64
SLIDE 64

Condi.onal ¡Random ¡Fields ¡

Z(x) = X

y02Yx

exp w>F(x)

Decoding ¡is ¡nice: ¡

y⇤ = arg max

y2Yx

exp w>F(x) Z(x) = arg max

y2Yx exp w>F(x)

= arg max

y2Yx w>F(x)

p(y | x) = exp w>F(x) Z(x) , y)

, y)

, y) , y) , y)

slide-65
SLIDE 65

Condi.onal ¡Random ¡Fields ¡

JJ ¡

NNS ¡

V ¡

angry ¡

dogs ¡ bark ¡

F(x, y) = X

C∈G

f(C)

slide-66
SLIDE 66

Comparison ¡of ¡Feature-­‑Based ¡Models ¡

  • Locally ¡Normalized ¡Models ¡

– Good ¡joint ¡models ¡ – Easy ¡to ¡training ¡ – Downside: ¡decoding ¡can ¡be ¡expensive ¡

  • Globally ¡Normalized ¡Models ¡

– Very ¡popular ¡condi.onal ¡models ¡(CRFs) ¡ – Challenge: ¡compu.ng ¡Z ¡/ ¡training ¡ – Advantage: ¡decoding ¡can ¡be ¡cheap ¡