Neural Networks for Natural Language Processing Alexandre Allauzen - - PowerPoint PPT Presentation

neural networks for natural language processing
SMART_READER_LITE
LIVE PREVIEW

Neural Networks for Natural Language Processing Alexandre Allauzen - - PowerPoint PPT Presentation

Neural Networks for Natural Language Processing Alexandre Allauzen Universit e Paris-Sud / LIMSI-CNRS 19/01/2017 A. Allauzen (Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 1 / 46 Introduction Outline 1 Introduction 2 The language


slide-1
SLIDE 1

Neural Networks for Natural Language Processing

Alexandre Allauzen

Universit´ e Paris-Sud / LIMSI-CNRS

19/01/2017

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 1 / 46

slide-2
SLIDE 2

Introduction

Outline

1 Introduction 2 The language modeling and tagging tasks 3 Neural network language model 4 Character based model sequence tagging 5 Conclusion

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 2 / 46

slide-3
SLIDE 3

Introduction

“Successful” applications of Natural Language Processing (NLP)

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 3 / 46

slide-4
SLIDE 4

Introduction

“Successful” applications of Natural Language Processing (NLP)

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 3 / 46

slide-5
SLIDE 5

Introduction

“Successful” applications of Natural Language Processing (NLP)

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 3 / 46

slide-6
SLIDE 6

Introduction

Some NLP tasks

Spam detection

Let’s&go&to&Agra!& Buy$V1AGRA$…$

Part of Speech (POS) tagging Colorless'''green'''ideas'''sleep'''furiously ADJ'''''''ADJ''''''NOUN''VERB'''''ADV Coreference resolution Carter'told'Mubarak'he'shouldn’t'run'again Syntactic Parsing I see him with a telescope Word Sense Disambiguation I need new batteries for my mouse Machine Translation

13… The 13th Shanghai Film festival ...

Paraphrase

XYZ'acquired'ABC'yesterday ABC'has'been'taken'over'by'XYZ

Summarization The Dow Jones is up The S&P 500 jumped Housing price rose Economy is good Dialog / Question Answering

Where is a Bug's life playing ? Sept Parnassien at 7:30

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 4 / 46

slide-7
SLIDE 7

Introduction

Ambiguous, noisy and with great variability

Why NLP is so hard ?

Named entities and Idioms Where is A Bug’s Life playing (...) Let It Be was recorded (...) Push the daisies lose face Neologism unfriend, retweet, bromance, +1, ... Non-canonical language Great job @justinbieber! Were SOO PROUD of what youve done! U taught us 2 #neversaynever & you yourself should never give up either World knowledge Mary and Sue are sisters Mary and Sue are mothers

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 5 / 46

slide-8
SLIDE 8

Introduction

Ambiguous, noisy and with great variability

Why NLP is so hard ?

Named entities and Idioms Where is A Bug’s Life playing (...) Let It Be was recorded (...) Push the daisies lose face Neologism unfriend, retweet, bromance, +1, ... Non-canonical language Great job @justinbieber! Were SOO PROUD of what youve done! U taught us 2 #neversaynever & you yourself should never give up either World knowledge Mary and Sue are sisters Mary and Sue are mothers Hospitals are Sued by 7 Foot Doctors Kids Make Nutritious Snacks Iraqi Head Seeks Arms

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 5 / 46

slide-9
SLIDE 9

Introduction

Statistical NLP

A very successful approach, indeed

From Peter Norvig (http://norvig.com/chomsky.html) Search engines: 100% of major players are trained and probabilistic. Speech recognition: 100% of major systems ... Machine translation: 100% of top competitors ... Question answering: the IBM Watson system ...

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 6 / 46

slide-10
SLIDE 10

Introduction

Statistical NLP

A very successful approach, indeed

From Peter Norvig (http://norvig.com/chomsky.html) Search engines: 100% of major players are trained and probabilistic. Speech recognition: 100% of major systems ... Machine translation: 100% of top competitors ... Question answering: the IBM Watson system ... Today, add neural network/deep-learning

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 6 / 46

slide-11
SLIDE 11

Introduction

Statistical NLP

A very successful approach, indeed

From Peter Norvig (http://norvig.com/chomsky.html) Search engines: 100% of major players are trained and probabilistic. Speech recognition: 100% of major systems ... Machine translation: 100% of top competitors ... Question answering: the IBM Watson system ... Today, add neural network/deep-learning Statistical NLP ? Using statistical techniques to infer structures from text based on statistical language modeling.

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 6 / 46

slide-12
SLIDE 12

Introduction

Statistical NLP - a (very) brief history

1970 -1983: Early success in speech reocgnition Hidden Markov models for acoustic modeling The first notion of language modeling as a Makov Chain 1983 - : Dominance of empiricism and statistical methods Incorporate probabilities for most language processing Use large corpora for training and evaluation 2003 - : Neural networks As a component at the beginning ... to end-to-end systems today

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 7 / 46

slide-13
SLIDE 13

Introduction

NLP: Statistical issues

Data sparsity in high dimension For most of NLP tasks: model structured data with very peculiar and sparse distributions with a large set of possible outcomes Ambiguity and variability The context is essential. Language is difficult to “interpret”, even for human → Learning to efficiently represent language data → Neural networks have renewed the research perspectives

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 8 / 46

slide-14
SLIDE 14

Introduction

Is it so important ?

It is decisive !

Machine translation issue : Opinion mining and Stock prediction

  • A. Hathaway vs Berkshire Hathaway
  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 9 / 46

slide-15
SLIDE 15

Introduction

Outline

1 Introduction 2 The language modeling and tagging tasks 3 Neural network language model 4 Character based model sequence tagging 5 Conclusion

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 10 / 46

slide-16
SLIDE 16

The language modeling and tagging tasks

Outline

1 Introduction 2 The language modeling and tagging tasks 3 Neural network language model 4 Character based model sequence tagging 5 Conclusion

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 11 / 46

slide-17
SLIDE 17

The language modeling and tagging tasks

n-gram language model

Applications Automatic Speech Recognition, Machine Translation, OCR, ... The goal Estimate the (non-zero) probability of a word sequence for a given vocabulary n-gram assumption P(w1:L) =

L

  • i=1

P(wi|wi−n+1:i−1), ∀i, wi ∈ V

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 12 / 46

slide-18
SLIDE 18

The language modeling and tagging tasks

Discrete n-gram model (conventional)

A word given its context

n = 4: P(wi = ?| wi−3, wi−2, wi−1

  • context

) time goes by

  • context

→ ?

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 13 / 46

slide-19
SLIDE 19

The language modeling and tagging tasks

Discrete n-gram model (conventional)

A word given its context

n = 4: P(wi = ?| wi−3, wi−2, wi−1

  • context

) time goes by

  • context

→ ? the vocabulary: fastly slowly

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 13 / 46

slide-20
SLIDE 20

The language modeling and tagging tasks

Discrete n-gram model (conventional)

A word given its context

n = 4: P(wi = ?| wi−3, wi−2, wi−1

  • context

) time goes by

  • context

→ ? the vocabulary: fastly slowly P(?|time goes by) θthe θfastly θslowly

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 13 / 46

slide-21
SLIDE 21

The language modeling and tagging tasks

Discrete n-gram model (conventional)

A word given its context

n = 4: P(wi = ?| wi−3, wi−2, wi−1

  • context

) time goes by

  • context

→ ? the vocabulary: fastly slowly P(?|time goes by) θthe θfastly θslowly |V|

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 13 / 46

slide-22
SLIDE 22

The language modeling and tagging tasks

Discrete n-gram model (conventional)

A word given its context

n = 4: P(wi = ?| wi−3, wi−2, wi−1

  • context

) time goes by

  • context

→ ? the vocabulary: fastly slowly P(?|time goes by) θthe θfastly θslowly |V| |V|4 parameters, Maximum Likelihood Estimate

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 13 / 46

slide-23
SLIDE 23

The language modeling and tagging tasks

The Zipf law (for French)

frequency ∝ 1/rank

200 400 600 800 1000 1200 1 2 3 4 5 6 1e7

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 14 / 46

slide-24
SLIDE 24

The language modeling and tagging tasks

The Zipf law (for French)

frequency ∝ 1/rank

100 101 102 103 104 105 106 107 Rank 100 101 102 103 104 105 106 107 108 de la l' des que ne même place enfants recherche cent prévues cherchent prestigieuse reconnaisse stimulants mélopée Hirano Rainville Kande

Zipf law

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 14 / 46

slide-25
SLIDE 25

The language modeling and tagging tasks

The Zipf law (for French)

frequency ∝ 1/rank

100 101 102 103 104 105 106 107 Rank 100 101 102 103 104 105 106 107 108 de la l' des que ne même place enfants recherche cent prévues cherchent prestigieuse reconnaisse stimulants mélopée Hirano Rainville Kande

Zipf law

Bures-sur-Yvette,133096

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 14 / 46

slide-26
SLIDE 26

The language modeling and tagging tasks

The Zipf law (for English)

100 101 102 103 104 105 106 107 Rank 100 101 102 103 104 105 106 107 108 109 the to and for as we government day leader series competition combined torture critically Eileen USGA Radin Vebacom hyperinflationary emitirá

Zipf law

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 15 / 46

slide-27
SLIDE 27

The language modeling and tagging tasks

The Zipf law (for English)

100 101 102 103 104 105 106 107 Rank 100 101 102 103 104 105 106 107 108 109 the to and for as we government day leader series competition combined torture critically Eileen USGA Radin Vebacom hyperinflationary emitirá

Zipf law

Bures-sur-Yvette,1859467

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 15 / 46

slide-28
SLIDE 28

The language modeling and tagging tasks

Consequences

Large vocabulary For many applications, |V| ∝ 105 or 106 but most of the words quite never occur. For n-gram model, it is even worse Most of n-grams never occur. ⇒ a restricted context (n = 4, 5 at most) With 7 billions of running English words and |V| = 200 000: 200 0004 ≈ 1.6 × 1021 possible 4-grams, Hardly 1 billion observed Most of them just once Some conventional remedies Increase the amount of data Smoothing methods (Chen and Goodman1998)

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 16 / 46

slide-29
SLIDE 29

The language modeling and tagging tasks

Lack of generalization - 1

A word given its context

n = 4: time goes by

  • context

→ ? the vocabulary: P(?|time goes by): θthe θfastly θslowly fastly slowly For each context, a multinomial distribution A word in its context = one parameter to learn

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 17 / 46

slide-30
SLIDE 30

The language modeling and tagging tasks

Lack of generalization - 1

A word given its context

n = 4: time goes by

  • context

→ ? the vocabulary: P(?|time goes by): θthe θfastly θslowly fastly slowly θfastly θslowly For each context, a multinomial distribution A word in its context = one parameter to learn No parameter tying between words ⇒ No knowledge sharing

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 17 / 46

slide-31
SLIDE 31

The language modeling and tagging tasks

Lack of generalization - 2

and for different contexts

time goes by θtime goes by = train goes by θtrain goes by = Each distribution is independant of the others

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 18 / 46

slide-32
SLIDE 32

The language modeling and tagging tasks

Sequence tagging

w = wL

1 = w1, w2, ..., wL

t = tL

1 = t1, t2, ..., tL

Example : Part-of-Speech (POS) tagging Sentence POS-tags Er PPER-case=nom|@gender=masc|number=sg|person=3 f¨ urchtet VVFIN-mood=ind|number=sg|person=3|tense=pres noch ADV Schlimmeres NN-case=acc|gender=neut|number=sg . $.

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 19 / 46

slide-33
SLIDE 33

The language modeling and tagging tasks

Conditional Random Fields (CRF)

Linear chain

P(t|w) = 1 Z(w)

L

  • i=1

exp

  • θ, φ(ti, ti−1, w)
  • =

1 Z(w)

L

  • i=1

exp

  • θu, φu(ti, w) + θb, φb(ti, ti−1, w)
  • ti−1

ti ti+1 wi−1 wi wi+1

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 20 / 46

slide-34
SLIDE 34

The language modeling and tagging tasks

Conditional Random Fields (CRF)

Linear chain

P(t|w) = 1 Z(w)

L

  • i=1

exp

  • θ, φ(ti, ti−1, w)
  • =

1 Z(w)

L

  • i=1

exp

  • θu, φu(ti, w) + θb, φb(ti, ti−1, w)
  • The basic feature template with binary indicators:

φu(ti, w) = φu(ti, wi) = I

  • wi ∧ ti
  • φb(ti, ti−1, w) = φb(ti, ti−1) = I
  • ti−1 ∧ ti
  • ...

A hand-crafted word representation : θu ← → φu(ti, wi) θu,ti ← → φu,ti(wi)

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 20 / 46

slide-35
SLIDE 35

The language modeling and tagging tasks

Word representation in CRF

Word representation may include: surface form

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 21 / 46

slide-36
SLIDE 36

The language modeling and tagging tasks

Word representation in CRF

Word representation may include: surface form wi → xi =

slowly apparently

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 21 / 46

slide-37
SLIDE 37

The language modeling and tagging tasks

Word representation in CRF

Word representation may include: surface form prefix suffix ... wi → xi =

slowly apparently suffix:ing suffix:ly prefix:slow

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 21 / 46

slide-38
SLIDE 38

The language modeling and tagging tasks

Word vectors

A word is described by a feature vector: its representation or embedding The goal address the sparsity issue a better generalization

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 22 / 46

slide-39
SLIDE 39

The language modeling and tagging tasks

Word vectors

A word is described by a feature vector: its representation or embedding The goal address the sparsity issue a better generalization Drawbacks “expertise” is required and dedicated to the task, the language, the domain, ... in practice, relies on linguistic resources

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 22 / 46

slide-40
SLIDE 40

Neural network language model

Outline

1 Introduction 2 The language modeling and tagging tasks 3 Neural network language model 4 Character based model sequence tagging 5 Conclusion

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 23 / 46

slide-41
SLIDE 41

Neural network language model

Estimate n-gram probabilities in a continuous space

Introduced in (Bengio and Ducharme2001; Bengio et al.2003) and applied to speech recognition and machine translation in (Schwenk and Gauvain2002). In a nutshell

1 associate each word with a continuous feature vector 2 express the probability function of a word sequence in terms of the

feature vectors of these words

3 learn simultaneously the feature vectors and the parameters of that

probability function.

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 24 / 46

slide-42
SLIDE 42

Neural network language model

Estimate n-gram probabilities in a continuous space

Introduced in (Bengio and Ducharme2001; Bengio et al.2003) and applied to speech recognition and machine translation in (Schwenk and Gauvain2002). In a nutshell

1 associate each word with a continuous feature vector 2 express the probability function of a word sequence in terms of the

feature vectors of these words

3 learn simultaneously the feature vectors and the parameters of that

probability function. Why should it work ? ”similar” words are expected to have a similar feature vectors the probability function is a smooth function of these feature values ⇒ a small change in the features will induce a small change in the probability

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 24 / 46

slide-43
SLIDE 43

Neural network language model

Project a words into a continuous space

The vocabulary is a neural network layer

1

w |V|: vocabulary size

A neural network layer represents a vector of values,

  • ne neuron per value
  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 25 / 46

slide-44
SLIDE 44

Neural network language model

Project a words into a continuous space

The vocabulary is a neural network layer Word continuous representation: add a second layer fully connected

1

w R v

The connection between two layers is a matrix

  • peration

The matrix R contains all the connection weights v is a continuous vector

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 25 / 46

slide-45
SLIDE 45

Neural network language model

Project a words into a continuous space

The vocabulary is a neural network layer Word continuous representation: add a second layer fully connected For a 4-gram, the history is a sequence of 3 words

1

R wi-1 vi-1

1

R wi-2 vi-2

1

R wi-3 vi-3 shared projection space

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 25 / 46

slide-46
SLIDE 46

Neural network language model

Project a words into a continuous space

The vocabulary is a neural network layer Word continuous representation: add a second layer fully connected For a 4-gram, the history is a sequence of 3 words Merge these three vectors to derive a single vector for the history

1

R wi-1 vi-1

1

R wi-2 vi-2

1

R wi-3 vi-3 shared projection space

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 25 / 46

slide-47
SLIDE 47

Neural network language model

Estimate the n-gram probability

The program Given the history expressed as a feature vector : v

wi-1 wi-2 wi-3 R R R W W vh ho shared projection space context layer

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 26 / 46

slide-48
SLIDE 48

Neural network language model

Estimate the n-gram probability

The program Given the history expressed as a feature vector : v Create a feature vector for the word to be predicted: h = f(Wvhv)

wi-1 wi-2 wi-3 R R R W W vh ho shared projection space hidden layer: tanh activation

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 26 / 46

slide-49
SLIDE 49

Neural network language model

Estimate the n-gram probability

The program Given the history expressed as a feature vector : v Create a feature vector for the word to be predicted: h = f(Wvhv) Estimate probabilities for all words given the history:

  • = f(Whoh)

P(w|wi−n+1:i−1) = exp(owi)

  • w∈V exp(owi)

wi-1 wi-2 wi-3 R R R W W vh ho prediction space

  • utput layer

(softmax) shared projection space

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 26 / 46

slide-50
SLIDE 50

Neural network language model

Early assessment

Key points The projection in continuous spaces → reduces the sparsity issues Learn simultaneously the projection and the prediction: (R, Wvh, Who)

wi-1 wi-2 wi-3 R R R W W vh ho Probability estimation based

  • n the similarity

among the feature vectors

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 27 / 46

slide-51
SLIDE 51

Neural network language model

Early assessment

Key points The projection in continuous spaces → reduces the sparsity issues Learn simultaneously the projection and the prediction: (R, Wvh, Who) Complexity issues The input vocabulary can be as large as we want. Increasing the order of n does not increase the complexity. The problem is the output vocabulary size.

wi-1 wi-2 wi-3 R R R W W vh ho Matrix multiplication 500 x |V|

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 27 / 46

slide-52
SLIDE 52

Neural network language model

A solution : class-based language model

Main ideas As proposed by (Mnih and Hinton2008): Represent the vocabulary as a clustering tree (Brown et al.1992). Predict the path in this clustering tree.

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 28 / 46

slide-53
SLIDE 53

Neural network language model

A solution : class-based language model

Main ideas As proposed by (Mnih and Hinton2008): Represent the vocabulary as a clustering tree (Brown et al.1992). Predict the path in this clustering tree. Word clustering Put each word w with a single root class c1(w) Split these word classes in sub-classes (c2(w)) and so on.

C1(w)

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 28 / 46

slide-54
SLIDE 54

Neural network language model

A solution : class-based language model

Main ideas As proposed by (Mnih and Hinton2008): Represent the vocabulary as a clustering tree (Brown et al.1992). Predict the path in this clustering tree. Word clustering Put each word w with a single root class c1(w) Split these word classes in sub-classes (c2(w)) and so on. C1(w) C2(w)

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 28 / 46

slide-55
SLIDE 55

Neural network language model

A solution : class-based language model

Main ideas As proposed by (Mnih and Hinton2008): Represent the vocabulary as a clustering tree (Brown et al.1992). Predict the path in this clustering tree. Word clustering Put each word w with a single root class c1(w) Split these word classes in sub-classes (c2(w)) and so on.

C1(w) C2(w) C3(w)

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 28 / 46

slide-56
SLIDE 56

Neural network language model

Word probabilities

C1(w) C2(w) C3(w) P(wi|h) = P(c1(wi)|h)

D

  • d=2

P(cd(wi)|h, c1:d−1) c1:D(wi) = c1, . . . , cD : path for the word wi in the clustering tree, D : depth of the tree, cd(wi): (sub-)class, cD(wi): leaf.

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 29 / 46

slide-57
SLIDE 57

Neural network language model

The SOUL language model

A solution for large vocabulary NLP tasks (Le et al.2011)

wi-1 wi-2 wi-3 R R R W W ih ho

C1(w)

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 30 / 46

slide-58
SLIDE 58

Neural network language model

The SOUL language model

A solution for large vocabulary NLP tasks (Le et al.2011)

wi-1 wi-2 wi-3 R R R W ih

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 30 / 46

slide-59
SLIDE 59

Neural network language model

The SOUL language model

A solution for large vocabulary NLP tasks (Le et al.2011)

wi-1 wi-2 wi-3 R R R W ih

C1(w) C2(w) C3(w)

P(wi|h) = P(c1(wi)|h)

D

Y

d=2

P(cd(wi)|h, c1:d−1)

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 30 / 46

slide-60
SLIDE 60

Neural network language model

Experimental results

For automatic speech recognition On Mandarin Chinese and Arabic data (GALE) Significant improvements over state of the art systems. For machine translation WMT International evaluation campaign on european language pairs best results for French-English in 2010 and 2011. Extension to translation modeling (Le et al.2012) Best results for French-English in 2012, 2013 and 2015.

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 31 / 46

slide-61
SLIDE 61

Character based model sequence tagging

Outline

1 Introduction 2 The language modeling and tagging tasks 3 Neural network language model 4 Character based model sequence tagging 5 Conclusion

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 32 / 46

slide-62
SLIDE 62

Character based model sequence tagging

Motivations

For morphologically-rich and non-canonical languages Very productive word formation processes ⇒ generate a proliferation of word forms. Freundschaftsbezeigungen, g¨

unt¨ ulenebilir ↔ MYL, AFAIK, cul8r Consequences Morphologically-rich and under-resourced language processing Social Media implies fast change in the language use → An evolving vocabulary with new compound tokens, abbreviations, ... Tokens decipherment/encoding

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 33 / 46

slide-63
SLIDE 63

Character based model sequence tagging

Ex: German POS-Tagging

The Task The TIGER corpus defines a POS-tagging task with very rich tagset (around 600 tags) State of the art results (Mueller et al.2013) A second order CRF with an intensive feature engineering to describe the morphology Deep Net approach (Santos and Zadrozny2014) A lot of information about words can be leveraged from subword features. ⇒ Learn to infer a word representation from the character level ⇒ Make these representations aware of the context (sentence level)

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 34 / 46

slide-64
SLIDE 64

Character based model sequence tagging

A training example

Sentence POS-tags Er PPER-case=nom|@gender=masc|number=sg|person=3 f¨ urchtet VVFIN-mood=ind|number=sg|person=3|tense=pres noch ADV Schlimmeres NN-case=acc|gender=neut|number=sg . $.

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 35 / 46

slide-65
SLIDE 65

Character based model sequence tagging

Recurrent network

Interlude

xt yt ht W vh W ho W hh A dynamic system, at time t: maintains a hidden representation, the internal state: ht Updated with the observation of xt and the previous state ht−1 The prediction yt depends on the internal state (ht) xt comes from word embeddings The same parameter set is shared across time steps

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 36 / 46

slide-66
SLIDE 66

Character based model sequence tagging

Recurrent network

Unfolding the structure: a deep-network

<s> Er f¨ urchtet noch ... PPER VVFIN ... R W vh W vh W ho W hh

At each step t Read the word wt → xt from R Update the hidden state ht = f(W vhxt + Whhht−1) The tag at t can be predicted from ht: yt = g(W hoht) g is the softmax function over the tagset

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 37 / 46

slide-67
SLIDE 67

Character based model sequence tagging

Training recurrent model

Training algorithm Back-Propagation through time (Rumelhart et al.1986; Mikolov et al.2011): for each step t

compute the loss gradient Back-Propagation through the unfolded structure

Inference Cannot be easily integrated to conventional approaches (ASR, SMT, ... ) Well suited for sequence tagging ht represent the word wt in its left context A powerful device for end-to-end system Known issues Vanishing gradient → LSTM Long-term memory → Bi-recurrent network

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 38 / 46

slide-68
SLIDE 68

Character based model sequence tagging

Bi-recurrent network

Unfolding the structure: a deep-network

<s> Er f¨ urchtet noch ... R R − → W vh ← − W vh − → W hh ← − W hh

At each step t, from left to right wt → xt − → h t = f(− → W vhxt + − → W hh − → h t−1) At each step t, from right to left wt → xt ← − h t = f(← − W vhxt + ← − W hh ← − h t−1) For the prediction : yt = g(W ho[− → h t; − → h t]) [− → h t; ← − h t] is a contextual representation of wt

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 39 / 46

slide-69
SLIDE 69

Character based model sequence tagging

From characters to word representation

A word is a sequence of characters ! Sequence representation Recurrent network (Elman1990; Mikolov et al.2011) Convolutional network + pooling (Kalchbrenner et al.2014; Santos and Zadrozny2014) Convolutional net + pooling

f ä h r t # #

Char embeddings

word representation

A convolution net is applied at each position In 1-D, it mixes the inputs within a window (represent the local context) Max-pooling reduces this sequence in one vector

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 40 / 46

slide-70
SLIDE 70

Character based model sequence tagging

Putting all together

(Labeau et al.2015)

A unified model that can Infer word representation from the character level which takes sentence level information into account Make sequence prediction Training Maximize the conditional log-likelihood of the tag sequence given the word sequence Optimization with AdaGrad (Duchi et al.2011) Results This model achieves state of the art performance without any feature engineering

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 41 / 46

slide-71
SLIDE 71

Conclusion

Outline

1 Introduction 2 The language modeling and tagging tasks 3 Neural network language model 4 Character based model sequence tagging 5 Conclusion

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 42 / 46

slide-72
SLIDE 72

Conclusion

Summary

Neural Networks : how to efficiently represent language data To address the sparsity issue To deal with large (output) vocabulary To handle different kinds of contexts Ongoing work End-to-end neural system for complexe tasks: Automatic speech recognition Machine translation Summarization, ....

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 43 / 46

slide-73
SLIDE 73

Conclusion

World Wide NLP

Everyone does not speak like the Wall Street Journal

All the other languages Access to resources is very uneven and patchy: → under-resourced languages → different morphological, syntactical and semantical properties Freundschaftsbezeigungen, g¨

unt¨ ulenebilir Cultural heritage and digital humanities Allow users to communicate in their native language Preserve the language diversity Language studies

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 44 / 46

slide-74
SLIDE 74

Conclusion

User generated content

User generated content URaQT ;-) I<3U BFF CUL8R 4evER !!! Social Media implies fast change in the language use and writting style Spontaneous and noisy → An evolving vocabulary with new compound tokens, abbreviations, ... Challenges Learning to decipher new texts NLP is not “context free” Linked-data processing (image, video, speech and sounds)

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 45 / 46

slide-75
SLIDE 75

Conclusion

Thank you for your attention

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 46 / 46

slide-76
SLIDE 76

Conclusion

Yoshua Bengio and R´ ejean Ducharme. 2001. A neural probabilistic language model. In Advances in Neural Information Processing Systems (NIPS), volume 13. Morgan Kaufmann. Yoshua Bengio, R´ ejean Ducharme, Pascal Vincent, and Christian Janvin. 2003. A neural probabilistic language model. Journal of Machine Learning Research, 3:1137–1155. Peter F. Brown, Peter V. deSouza, Robert L. Mercer, Vincent J. Della Pietra, and Jenifer C. Lai. 1992. Class-based n-gram models of natural language. Computational Linguistics, 18(4):467–479. Stanley F. Chen and Joshua T. Goodman. 1998. An empirical study of smoothing techniques for language modeling. Technical Report TR-10-98, Computer Science Group, Harvard University. John Duchi, Elad Hazan, and Yoram Singer. 2011.

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 46 / 46

slide-77
SLIDE 77

Conclusion

Adaptive subgradient methods for online learning and stochastic optimization.

  • J. Mach. Learn. Res., 12:2121–2159, July.

Jeffrey L. Elman. 1990. Finding structure in time. Cognitive Science, 14(2):179–211. Nal Kalchbrenner, Edward Grefenstette, and Phil Blunsom. 2014. A convolutional neural network for modelling sentences. In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 655–665, Baltimore, Maryland, June. Association for Computational Linguistics. Matthieu Labeau, Kevin L¨

  • ser, and Alexandre Allauzen.

2015. Non-lexical neural architecture for fine-grained pos tagging. In Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 232–237, Lisbon, Portugal, September. Association for Computational Linguistics. Hai-Son Le, Ilya Oparin, Alexandre Allauzen, Jean-Luc Gauvain, and Fran¸ cois Yvon. 2011. Structured output layer neural network language model.

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 46 / 46

slide-78
SLIDE 78

Conclusion

In Proceedings of ICASSP, pages 5524–5527. Hai-Son Le, Alexandre Allauzen, and Fran¸ cois Yvon. 2012. Continuous space translation models with neural networks. In Proceedings of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT), pages 39–48, Montr´ eal, Canada, June. Association for Computational Linguistics. Tomas Mikolov, Stefan Kombrink, Lukas Burget, Jan Cernock´ y, and Sanjeev Khudanpur. 2011. Extensions of recurrent neural network language model. In Proceedings of ICASSP, pages 5528–5531. Andriy Mnih and Geoffrey E Hinton. 2008. A scalable hierarchical distributed language model. In D. Koller, D. Schuurmans, Y. Bengio, and L. Bottou, editors, Advances in Neural Information Processing Systems 21, volume 21, pages 1081–1088. Thomas Mueller, Helmut Schmid, and Hinrich Sch¨ utze. 2013. Efficient higher-order CRFs for morphological tagging.

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 46 / 46

slide-79
SLIDE 79

Conclusion

In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pages 322–332, Seattle, Washington, USA, October. Association for Computational Linguistics.

  • D. E. Rumelhart, G. E. Hinton, and R. J. Williams.

1986. Parallel distributed processing: explorations in the microstructure of cognition, vol. 1. chapter Learning internal representations by error propagation, pages 318–362. MIT Press, Cambridge, MA, USA. Cicero D. Santos and Bianca Zadrozny. 2014. Learning character-level representations for part-of-speech tagging. In Tony Jebara and Eric P. Xing, editors, Proceedings of the 31st International Conference on Machine Learning (ICML-14), pages 1818–1826. JMLR Workshop and Conference Proceedings. Holger Schwenk and Jean-Luc Gauvain. 2002. Connectionist Language Modeling for Large Vocabulary Continuous Speech Recognition. In Proceedings of ICASSP, pages 765–768, Orlando, May.

  • A. Allauzen

(Univ. Paris-Sud/LIMSI) NNet & NLP 19/01/2017 46 / 46