Linguis'c Structured Sparsity in Text Categoriza'on Dani - - PowerPoint PPT Presentation

linguis c structured sparsity in text categoriza on
SMART_READER_LITE
LIVE PREVIEW

Linguis'c Structured Sparsity in Text Categoriza'on Dani - - PowerPoint PPT Presentation

Linguis'c Structured Sparsity in Text Categoriza'on Dani Yogatama and Noah A. Smith Language Technologies Ins'tute Carnegie Mellon University


slide-1
SLIDE 1

Linguis'c ¡Structured ¡Sparsity ¡ ¡ in ¡Text ¡Categoriza'on ¡

Dani ¡Yogatama ¡and ¡Noah ¡A. ¡Smith ¡ Language ¡Technologies ¡Ins'tute ¡ Carnegie ¡Mellon ¡University ¡ {dyogatama,nasmith}@cs.cmu.edu

slide-2
SLIDE 2

Dani ¡Yogatama ¡ ¡ ¡

slide-3
SLIDE 3

Summary ¡

  • Words ¡of ¡a ¡feather ¡(should) ¡flock ¡

together ¡

  • Idea: ¡ ¡use ¡linguis'c ¡structure ¡to ¡

define ¡feathers ¡(flocks) ¡instead ¡of ¡ features ¡

  • Math: ¡ ¡sparse ¡group ¡lasso ¡regulariza'on ¡
  • Results: ¡ ¡text ¡classifica'on ¡(sen'ment, ¡forecas'ng, ¡topic) ¡
slide-4
SLIDE 4

Text ¡Classifica'on ¡

this film is one big joke : you have all the basics elements

  • f romance ( love at first sight , great

passion , etc . ) and gangster flicks ( brutality , dagerous machinations , the mysterious don , etc. ) , but it is all done with the crudest humor . it ’ s the kind of thing you either like viserally and immediately ” get ” or you don ’ t . that is a matter of taste and expectations . i enjoyed it and it took me back to the mid80s , when nicolson and turner were in their primes . the acting is very good , if a bit

  • bviously tongue - in - cheek .
slide-5
SLIDE 5

Bag ¡of ¡Words ¡

this film is one big joke : you have all the basics elements

  • f romance ( love at first sight , great

passion , etc . ) and gangster flicks ( brutality , dagerous machinations , the mysterious don , etc. ) , but it is all done with the crudest humor . it ’ s the kind of thing you either like viserally and immediately ” get ” or you don ’ t . that is a matter of taste and expectations . i enjoyed it and it took me back to the mid80s , when nicolson and turner were in their primes . the acting is very good , if a bit

  • bviously tongue - in - cheek .

1 acting 1 at 1 back 1 basics 1 big 1 bit 1 brutality 1 but 1 cheek 1 crudest 1 dagerous … 6 the …

slide-6
SLIDE 6

Bag ¡of ¡Words ¡

1 acting 1 at 1 back 1 basics 1 big 1 bit 1 brutality 1 but 1 cheek 1 crudest 1 dagerous … 6 the …

slide-7
SLIDE 7

Linear ¡Classifier ¡

wacting wat wback wbasics wbig wbit wbrutality wbut wcheek wcrudest wdagerous … wthe …

. ¡

sign (f(document) · w)

ˆ y

1 acting 1 at 1 back 1 basics 1 big 1 bit 1 brutality 1 but 1 cheek 1 crudest 1 dagerous … 6 the …

slide-8
SLIDE 8

Text ¡is ¡Not ¡a ¡Bag ¡of ¡Words! ¡

  • Sentences ¡
  • Phrases ¡
  • Fine-­‑grained ¡

syntac'c ¡ classes ¡

  • Thema'c ¡

topics ¡ ¡

(and ¡many ¡more!) ¡

this film is one big joke : you have all the basics elements

  • f romance ( love at first sight , great

passion , etc . ) and gangster flicks ( brutality , dagerous machinations , the mysterious don , etc. ) , but it is all done with the crudest humor . it ’ s the kind of thing you either like viserally and immediately ” get ” or you don ’ t . that is a matter of taste and expectations . i enjoyed it and it took me back to the mid80s , when nicolson and turner were in their primes . the acting is very good , if a bit

  • bviously tongue - in - cheek .
slide-9
SLIDE 9

Text ¡is ¡Not ¡a ¡Bag ¡of ¡Words! ¡

  • Sentences ¡
  • Phrases ¡
  • Fine-­‑grained ¡

syntac'c ¡ classes ¡

  • Thema'c ¡

topics ¡ ¡

(and ¡many ¡more!) ¡

this film is one big joke : you have all the basics elements

  • f romance ( love at first sight , great

passion , etc . ) and gangster flicks ( brutality , dagerous machinations , the mysterious don , etc. ) , but it is all done with the crudest humor . it ’ s the kind of thing you either like viserally and immediately ” get ” or you don ’ t . that is a matter of taste and expectations . i enjoyed it and it took me back to the mid80s , when nicolson and turner were in their primes . the acting is very good , if a bit

  • bviously tongue - in - cheek .
slide-10
SLIDE 10

Text ¡is ¡Not ¡a ¡Bag ¡of ¡Words! ¡

  • Sentences ¡
  • Phrases ¡
  • Fine-­‑grained ¡

syntac'c ¡ classes ¡

  • Thema'c ¡

topics ¡ ¡

(and ¡many ¡more!) ¡

this film is one big joke : you have all the basics elements

  • f romance ( love at first sight , great

passion , etc . ) and gangster flicks ( brutality , dagerous machinations , the mysterious don , etc. ) , but it is all done with the crudest humor . it ’ s the kind of thing you either like viserally and immediately ” get ” or you don ’ t . that is a matter of taste and expectations . i enjoyed it and it took me back to the mid80s , when nicolson and turner were in their primes . the acting is very good , if a bit

  • bviously tongue - in - cheek .
slide-11
SLIDE 11

Text ¡is ¡Not ¡a ¡Bag ¡of ¡Words! ¡

  • Sentences ¡
  • Phrases ¡
  • Fine-­‑grained ¡

syntac'c ¡ classes ¡

  • Thema'c ¡

topics ¡ ¡

(and ¡many ¡more!) ¡

this film is one big joke : you have all the basics elements

  • f romance ( love at first sight , great

passion , etc . ) and gangster flicks ( brutality , dagerous machinations , the mysterious don , etc. ) , but it is all done with the crudest humor . it ’ s the kind of thing you either like viserally and immediately ” get ” or you don ’ t . that is a matter of taste and expectations . i enjoyed it and it took me back to the mid80s , when nicolson and turner were in their primes . the acting is very good , if a bit

  • bviously tongue - in - cheek .
slide-12
SLIDE 12

Learning ¡the ¡Weights ¡w

“fit ¡the ¡data” ¡

(e.g., ¡log-­‑likelihood ¡of ¡yn ¡given ¡dn, ¡ hinge ¡loss, ¡...) ¡

¡ “generalize” ¡ (e.g., ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡) ¡

ˆ w = arg min

w N

X

n=1

L(f(dn), yn; w) + R(w)

λkwk2

2

λkwk1

slide-13
SLIDE 13

Group ¡Lasso ¡(Yuan ¡& ¡Lin ¡‘06) ¡

group ¡1 ¡ group ¡2 ¡ group ¡3 ¡ w1 w2 w3 no ¡sparsity ¡ classic ¡sparsity ¡ group ¡sparsity ¡

R(w) = X

g

λgkwgk2

slide-14
SLIDE 14

Group ¡Lasso ¡(Yuan ¡& ¡Lin ¡‘06) ¡

R(w) = X

g

λgkwgk2 In ¡NLP: ¡

  • chunking ¡and ¡parsing ¡(Mar'ns ¡et ¡al., ¡2011) ¡
  • language ¡modeling ¡(Nelakan' ¡et ¡al., ¡2013) ¡

group ¡sparsity ¡

slide-15
SLIDE 15

Learning ¡the ¡Weights ¡w ¡

ˆ w = arg min

w N

X

n=1

L(f(dn), yn; w) + R(w)

slide-16
SLIDE 16

Learning ¡the ¡Weights ¡w ¡

ˆ w = arg min

w N

X

n=1

L(f(dn), yn; w) + R(w)

ˆ w = arg min

w N

X

n=1

L(f(dn), yn; w) s.t. R(w) ≤ τ

“Tikhonov” ¡regulariza'on ¡ “Ivanov” ¡regulariza'on ¡

slide-17
SLIDE 17

Lasso ¡vs. ¡Group ¡Lasso ¡

R(w) = |w1| + |w2| + |w3|

〈w1, w2〉 w3

Mar'ns ¡et ¡al., ¡EACL ¡2014 ¡tutorial ¡on ¡structured ¡sparsity ¡in ¡NLP ¡ L

ˆ w = arg min

w N

X

n=1

L(f(dn), yn; w) s.t. R(w) ≤ τ

slide-18
SLIDE 18

Lasso ¡vs. ¡Group ¡Lasso ¡

R(w) = |w1| + |w2| + |w3| R(w) = ||〈w1, w2〉||2 + |w3|

〈w1, w2〉 w3 〈w1, w2〉 w3

Mar'ns ¡et ¡al., ¡EACL ¡2014 ¡tutorial ¡on ¡structured ¡sparsity ¡in ¡NLP ¡ L L L L

slide-19
SLIDE 19

Whence ¡Groups? ¡

Back ¡to ¡NLP ¡... ¡

slide-20
SLIDE 20

Sentence ¡Regularizer ¡

  • Every ¡sentence ¡s ¡in ¡every ¡document ¡n ¡gets ¡a ¡group. ¡
  • If ¡wn,s ¡can ¡be ¡driven ¡to ¡zero, ¡that ¡means ¡the ¡

sentence ¡is ¡irrelevant ¡to ¡the ¡task. ¡

  • Many ¡overlapping ¡groups! ¡

R(w) =

N

X

n=1 Sn

X

s=1

λn,skwn,sk2

Yogatama ¡and ¡Smith ¡(ICML ¡2014) ¡

slide-21
SLIDE 21

Group ¡for ¡Sentence ¡1 ¡

this film is one big joke : you have all the basics elements

  • f romance ( love at first sight , great

passion , etc . ) and gangster flicks ( brutality , dagerous machinations , the mysterious don , etc. ) , but it is all done with the crudest humor . it ’ s the kind of thing you either like viserally and immediately ” get ” or you don ’ t . that is a matter of taste and expectations . i enjoyed it and it took me back to the mid80s , when nicolson and turner were in their primes . the acting is very good , if a bit

  • bviously tongue - in - cheek .

1 acting 1 at 1 back 1 basics 1 big 1 bit 1 brutality 1 but 1 cheek 1 crudest 1 dagerous … 6 the …

slide-22
SLIDE 22

Group ¡for ¡Sentence ¡5 ¡

this film is one big joke : you have all the basics elements

  • f romance ( love at first sight , great

passion , etc . ) and gangster flicks ( brutality , dagerous machinations , the mysterious don , etc. ) , but it is all done with the crudest humor . it ’ s the kind of thing you either like viserally and immediately ” get ” or you don ’ t . that is a matter of taste and expectations . i enjoyed it and it took me back to the mid80s , when nicolson and turner were in their primes . the acting is very good , if a bit

  • bviously tongue - in - cheek .

1 acting 1 at 1 back 1 basics 1 big 1 bit 1 brutality 1 but 1 cheek 1 crudest 1 dagerous … 6 the …

slide-23
SLIDE 23

More ¡Linguis'c ¡Structure ¡Regularizers ¡

  • Parse ¡tree ¡regularizer ¡

¡ ¡ ¡ ¡ ¡

groups ¡ 1 ¡ 2 ¡ 3 ¡ 4 ¡ 5 ¡ 6 ¡ 7 ¡ 8 ¡ 9 ¡ the ¡ ✓ ¡ ✓ ¡ ✓ ¡ actors ¡ ✓ ¡ ✓ ¡ ✓ ¡ are ¡ ✓ ¡ ✓ ¡ ✓ ¡ ✓ ¡ fantas'c ¡ ✓ ¡ ✓ ¡ ✓ ¡ ✓ ¡ . ¡ ✓ ¡ ✓ ¡ ✓ ¡ words/features ¡

slide-24
SLIDE 24

More ¡Linguis'c ¡Structure ¡Regularizers ¡

  • Parse ¡tree ¡regularizer ¡

¡ ¡ ¡ ¡ ¡

  • Each ¡of ¡5,000 ¡hierarchical ¡Brown ¡clusters ¡

groups ¡ 1 ¡ 2 ¡ 3 ¡ 4 ¡ 5 ¡ 6 ¡ 7 ¡ 8 ¡ 9 ¡ the ¡ ✓ ¡ ✓ ¡ ✓ ¡ actors ¡ ✓ ¡ ✓ ¡ ✓ ¡ are ¡ ✓ ¡ ✓ ¡ ✓ ¡ ✓ ¡ fantas'c ¡ ✓ ¡ ✓ ¡ ✓ ¡ ✓ ¡ . ¡ ✓ ¡ ✓ ¡ ✓ ¡ words/features ¡

slide-25
SLIDE 25

More ¡Linguis'c ¡Structure ¡Regularizers ¡

  • Parse ¡tree ¡regularizer ¡

¡ ¡ ¡ ¡ ¡

  • Each ¡of ¡5,000 ¡hierarchical ¡Brown ¡clusters ¡
  • Top ¡ten ¡words ¡in ¡each ¡of ¡1,000 ¡LDA ¡topics ¡

groups ¡ 1 ¡ 2 ¡ 3 ¡ 4 ¡ 5 ¡ 6 ¡ 7 ¡ 8 ¡ 9 ¡ the ¡ ✓ ¡ ✓ ¡ ✓ ¡ actors ¡ ✓ ¡ ✓ ¡ ✓ ¡ are ¡ ✓ ¡ ✓ ¡ ✓ ¡ ✓ ¡ fantas'c ¡ ✓ ¡ ✓ ¡ ✓ ¡ ✓ ¡ . ¡ ✓ ¡ ✓ ¡ ✓ ¡ words/features ¡

slide-26
SLIDE 26

Sparse ¡Group ¡Lasso ¡

min

w R(w) + λkwk1 + N

X

n=1

L(f(dn), yn; w)

slide-27
SLIDE 27

Op'miza'on ¡

min

w R(w) + λkwk1 + N

X

n=1

L(f(dn), yn; w)

slide-28
SLIDE 28

Op'miza'on ¡

min

w,v R(v) + λkwk1 + N

X

n=1

L(f(dn), yn; w) s.t. v = Mw min

w,v R(v) + λkwk1 + N

X

n=1

L(f(dn), yn; w) + u · (v Mw) + ρ 2kv Mwk2

2

separate ¡w ¡from ¡“copies” ¡v, ¡ constraint ¡forces ¡agreement ¡

min

w R(w) + λkwk1 + N

X

n=1

L(f(dn), yn; w)

slide-29
SLIDE 29

Op'miza'on ¡

min

w,v R(v) + λkwk1 + N

X

n=1

L(f(dn), yn; w) s.t. v = Mw min

w,v R(v) + λkwk1 + N

X

n=1

L(f(dn), yn; w) + u · (v Mw) + ρ 2kv Mwk2

2

separate ¡w ¡from ¡“copies” ¡v, ¡ constraint ¡forces ¡agreement ¡

slide-30
SLIDE 30

Op'miza'on ¡

min

w,v R(v) + λkwk1 + N

X

n=1

L(f(dn), yn; w) s.t. v = Mw

separate ¡w ¡from ¡“copies” ¡v, ¡ constraint ¡forces ¡agreement ¡

“augmented ¡Lagrangian” ¡

min

w,v max u

R(v) + λkwk1 +

N

X

n=1

L(f(dn), yn; w) + u · (v Mw) + ρ 2kv Mwk2

2

slide-31
SLIDE 31

Op'miza'on ¡

min

w,v R(v) + λkwk1 + N

X

n=1

L(f(dn), yn; w) s.t. v = Mw

ADMM: ¡ Alterna'ng ¡ Direc'ons ¡

alterna'ng, ¡blockwise ¡updates ¡of ¡w ¡and ¡v

Method ¡of ¡ Mul'pliers ¡

a ¡“faster” ¡version ¡of ¡dual ¡ascent ¡for ¡solving ¡the ¡ augmented ¡Lagrangian ¡(Hestenes ¡’69; ¡Powell ¡’69) ¡ (Glowinski ¡& ¡Marroco ¡‘75; ¡Gabay ¡& ¡Mercier ¡’76) ¡

separate ¡w ¡from ¡“copies” ¡v, ¡ constraint ¡forces ¡agreement ¡

min

w,v max u

R(v) + λkwk1 +

N

X

n=1

L(f(dn), yn; w) + u · (v Mw) + ρ 2kv Mwk2

2

slide-32
SLIDE 32

“Blockwise” ¡Updates ¡

w ¡update ¡≈ ¡loss ¡minimiza'on ¡with ¡elas'c ¡net ¡regulariza'on ¡(Zou ¡& ¡Has'e ¡’05) ¡ constant ¡

min

w,v max u

R(v) + λkwk1 +

N

X

n=1

L(f(dn), yn; w) + u · (v Mw) + ρ 2kv Mwk2

2

slide-33
SLIDE 33

“Blockwise” ¡Updates ¡

zn,s = Md,sw ud,s ρ vn,s =    if kzn,sk2  τ kzn,sk2 τ kzn,sk2 zn,s

  • therwise

v ¡updates: ¡ ¡proximal ¡operator ¡for ¡each ¡group: ¡

min

w,v max u

R(v) + λkwk1 +

N

X

n=1

L(f(dn), yn; w) + u · (v Mw) + ρ 2kv Mwk2

2

slide-34
SLIDE 34

“Blockwise” ¡Updates ¡

simple ¡dual ¡update ¡u ¡

min

w,v max u

R(v) + λkwk1 +

N

X

n=1

L(f(dn), yn; w) + u · (v Mw) + ρ 2kv Mwk2

2

slide-35
SLIDE 35

Implica'ons ¡

  • Group ¡sparsity ¡and ¡strong ¡sparsity ¡
  • Model ¡class ¡is ¡s'll ¡a ¡(fast) ¡bag ¡of ¡words ¡... ¡ ¡

but ¡somehow ¡“informed” ¡by ¡structure ¡

  • Learning ¡is ¡more ¡expensive ¡... ¡but ¡s'll ¡convex ¡
  • A ¡new ¡kind ¡of ¡interpretability ¡... ¡
slide-36
SLIDE 36

this film is one big joke : you have all the basics elements

  • f romance ( love at first sight , great

passion , etc . ) and gangster flicks ( brutality , dagerous machinations , the mysterious don , etc. ) , but it is all done with the crudest humor . it ’ s the kind of thing you either like viserally and immediately ” get ” or you don ’ t . that is a matter of taste and expectations . i enjoyed it and it took me back to the mid80s , when nicolson and turner were in their primes . the acting is very good , if a bit

  • bviously tongue - in - cheek .

1.52 ¡ 1.02 ¡ 1.01 ¡ 1.01 ¡ 1.00 ¡

p(y = 1 | d) p(y = 1 | d \ s)

slide-37
SLIDE 37

Classifica'on ¡Experiments ¡

  • L: ¡ ¡Bag ¡of ¡words ¡logis'c ¡regression ¡
  • Baselines: ¡ ¡m.f.c., ¡lasso, ¡ridge, ¡elas'c ¡
  • Eight ¡datasets ¡

¡

slide-38
SLIDE 38

Sen'ment ¡

50 ¡ 55 ¡ 60 ¡ 65 ¡ 70 ¡ 75 ¡ 80 ¡ 85 ¡ Movies ¡(Socher ¡et ¡al., ¡2013) ¡ Votes ¡(Thomas ¡et ¡al., ¡2006) ¡ m.f.c. ¡ lasso ¡ ridge ¡ elas'c ¡ ¡ ¡ ¡ sentence ¡ parse ¡ Brown ¡ LDA ¡

baselines ¡

* ¡* ¡ * ¡* ¡

slide-39
SLIDE 39

Forecas'ng ¡

50 ¡ 55 ¡ 60 ¡ 65 ¡ 70 ¡ 75 ¡ 80 ¡ 85 ¡ 90 ¡ Science ¡(Yogatama ¡et ¡al., ¡2011) ¡ Bills ¡(Yano ¡et ¡al., ¡2012) ¡ m.f.c. ¡ lasso ¡ ridge ¡ elas'c ¡ ¡ ¡ ¡ sentence ¡ parse ¡ Brown ¡ LDA ¡

baselines ¡

* ¡* ¡* ¡* ¡ ¡

slide-40
SLIDE 40

20 ¡Newsgroups ¡Binary ¡Tasks ¡

50 ¡ 55 ¡ 60 ¡ 65 ¡ 70 ¡ 75 ¡ 80 ¡ 85 ¡ 90 ¡ 95 ¡ 100 ¡

Science ¡(med/space) ¡ Sports ¡(baseball/ hockey) ¡ Religion ¡(atheism/ chris'an) ¡ Computer ¡(pc/mac) ¡

m.f.c. ¡ lasso ¡ ridge ¡ elas'c ¡ ¡ ¡ ¡ sentence ¡ parse ¡ Brown ¡ LDA ¡

baselines ¡

**** ¡ **** ¡ **** ¡ **** ¡

slide-41
SLIDE 41

Brown ¡as ¡features ¡or ¡regularizer? ¡

50 ¡ 55 ¡ 60 ¡ 65 ¡ 70 ¡ 75 ¡ 80 ¡ 85 ¡ 90 ¡ 95 ¡ 100 ¡ Science ¡ Sports ¡ Religion ¡ Computer ¡ best ¡baseline ¡ lasso ¡+ ¡Brown ¡ ridge ¡+ ¡Brown ¡ elas'c ¡+ ¡Brown ¡

  • ur ¡Brown ¡regularizer ¡

add ¡ features ¡

slide-42
SLIDE 42

LDA ¡as ¡features ¡or ¡regularizer? ¡

80 ¡ 82 ¡ 84 ¡ 86 ¡ 88 ¡ 90 ¡ 92 ¡ 94 ¡ 96 ¡ 98 ¡ 100 ¡ Science ¡ Sports ¡ Religion ¡ Computer ¡ best ¡baseline ¡ lasso ¡+ ¡LDA ¡ ridge ¡+ ¡LDA ¡ elas'c ¡+ ¡LDA ¡

  • ur ¡LDA ¡regularizer ¡

add ¡ features ¡

slide-43
SLIDE 43

Summary ¡

  • Words ¡of ¡a ¡feather ¡(should) ¡flock ¡

together ¡

  • Idea: ¡ ¡use ¡linguis'c ¡structure ¡to ¡

define ¡feathers ¡(flocks) ¡instead ¡of ¡ features ¡

  • Math: ¡ ¡sparse ¡group ¡lasso ¡regulariza'on ¡
  • Results: ¡ ¡text ¡classifica'on ¡(topics, ¡sen'ment, ¡forecas'ng) ¡

¡ ¡ Acknowledgments: ¡ ¡Google, ¡IARPA, ¡Piosburgh ¡Supercompu'ng ¡Center ¡