language modelling makes sense - daniel...

66
Language Modelling Makes Sense Propagating Representations through WordNet for Full-Coverage Word Sense Disambiguation Daniel Loureiro, Alípio Jorge ACL – Florence, 31 July 2019

Upload: others

Post on 17-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Language Modelling Makes SensePropagating Representations through WordNet for

Full-Coverage Word Sense Disambiguation

Daniel Loureiro, Alípio Jorge

ACL – Florence, 31 July 2019

Page 2: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Sense Embeddings

Exploiting the latest Neural Language Models (NLMs) for sense-level

representation learning.

• Beat SOTA for Word Sense Disambiguation (WSD).

• Full WordNet in NLM-space (+100K common sense concepts).

• Concept-level analysis of NLMs.

Introduction Related Work Our Approach Performance Applications Conclusions

Page 3: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Sense Embeddings

Exploiting the latest Neural Language Models (NLMs) for sense-level

representation learning.

• Beat SOTA for English Word Sense Disambiguation (WSD).

• Full WordNet in NLM-space (+100K common sense concepts).

• Concept-level analysis of NLMs.

Introduction Related Work Our Approach Performance Applications Conclusions

Page 4: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Related Work

Introduction Related Work Our Approach Performance Applications Conclusions

Page 5: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Related Work

Bag-of-FeaturesClassifiers

(SVM)

Deep SequenceClassifiers

(BiLSTM)

Sense-level Representations

(k-NN)(over NLM reprs.)

[Iacobacci et al. (2016)][Zhong and Ng (2010)]

[Luo et al. (2018b)][Luo et al. (2018a)][Vial et al. (2018)]

[Raganato et al. (2017)]

[Peters et al. (2018)][Melamud et al. (2016)]

[Yuan et al. (2016)]

Introduction Related Work Our Approach Performance Applications Conclusions

Page 6: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Related Work

Bag-of-FeaturesClassifiers

(SVM)

Deep SequenceClassifiers

(BiLSTM)

Sense-level Representations

(k-NN)(over NLM reprs.)

[Iacobacci et al. (2016)][Zhong and Ng (2010)]

[Luo et al. (2018b)][Luo et al. (2018a)][Vial et al. (2018)]

[Raganato et al. (2017)]

[Peters et al. (2018)][Melamud et al. (2016)]

[Yuan et al. (2016)]

Introduction Related Work Our Approach Performance Applications Conclusions

Page 7: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Bag-of-Features Classifiers

It Makes Sense (IMS) [Zhong and Ng (2010)] :

• POS tags, surrounding words, local collocations.

• SVM for each word type in training.

• Fallback: Most Frequent Sense (MFS).

• Improved with word embedding features. [Iacobacci et al. (2016)]

• Still competitive (!)

Introduction Related Work Our Approach Performance Applications Conclusions

“glasses”

Page 8: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Bi-directional LSTMs (BiLSTMs):

• Better with:

• Attention (as everything else).

• Auxiliary losses. (POS, lemmas, lexnames) [Raganato et al. (2017)]

• Glosses, via co-attention mechanisms. [Luo et al. (2018)]

• Still must fallback on MFS.

• Not that much better than bag-of-features…

Deep Sequence Classifiers

[Raganato et al. (2017)]

Introduction Related Work Our Approach Performance Applications Conclusions

Page 9: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Contextual k-NN

Introduction Related Work Our Approach Performance Applications Conclusions

Matching Contextual Word Embeddings:

• Produce Sense Embeddings from NLMs (averaging).

• Sense embs. can be compared with contextual embs.

• Disambiguation = Nearest Neighbour search (1-NN).

• Sense embs. limited to annotations. MFS required.

• Promising, but early attempts.

[Ruder (2018)]

Page 10: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Our Approach

Introduction Related Work Our Approach Performance Applications Conclusions

Page 11: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Our Approach

• Expand the k-NN approach to full-coverage of WordNet.

• Matching senses becomes trivial, no MFS fallbacks needed.

• Full-set of sense embeddings in NLM-space is useful beyond WSD.

Introduction Related Work Our Approach Performance Applications Conclusions

Page 12: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Our Approach

• Expand the k-NN approach to full-coverage of WordNet.

• Matching senses becomes trivial, no MFS fallbacks needed.

• Full-set of sense embeddings in NLM-space is useful beyond WSD.

Introduction Related Work Our Approach Performance Applications Conclusions

Page 13: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Our Approach

• Expand the k-NN approach to full-coverage of WordNet.

• Matching senses becomes trivial, no MFS fallbacks needed.

• Full-set of sense embeddings in NLM-space is useful beyond WSD.

Introduction Related Work Our Approach Performance Applications Conclusions

Page 14: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Our Approach

• Expand the k-NN approach to full-coverage of WordNet.

• Matching senses becomes trivial, no MFS fallbacks needed.

• Full-set of sense embeddings in NLM-space is useful beyond WSD.

Introduction Related Work Our Approach Performance Applications Conclusions

Page 15: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Our Approach

• Expand the k-NN approach to full-coverage of WordNet.

• Matching senses becomes trivial, no MFS fallbacks needed.

• Full-set of sense embeddings in NLM-space is useful beyond WSD.

Introduction Related Work Our Approach Performance Applications Conclusions

Page 16: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Challenges

Introduction Related Work Our Approach Performance Applications Conclusions

Page 17: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Challenges

• Overcome very limited sense annotations (covers 16% senses).

• Infer missing senses correctly so that task performance improves.

• Rely only on sense embeddings, no lemma or POS features.

Introduction Related Work Our Approach Performance Applications Conclusions

Page 18: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Challenges

• Overcome very limited sense annotations (covers 16% senses).

• Infer missing senses correctly so that task performance improves.

• Rely only on sense embeddings, no lemma or POS features.

Introduction Related Work Our Approach Performance Applications Conclusions

Page 19: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Challenges

• Overcome very limited sense annotations (covers 16% senses).

• Infer missing senses correctly so that task performance improves.

• Rely only on sense embeddings, no lemma or POS features.

Introduction Related Work Our Approach Performance Applications Conclusions

Page 20: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Challenges

• Overcome very limited sense annotations (covers 16% senses).

• Infer missing senses correctly so that task performance improves.

• Rely only on sense embeddings, no lemma or POS features.

ReinforceEnrichPropagateBootstrap

Annotated Dataset WordNet Ontology WordNet Glosses Morphological Embeddings

Introduction Related Work Our Approach Performance Applications Conclusions

Page 21: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Bootstrapping Sense Embeddings

Can your insurance company aid you in reducing administrative costs ?

Would it be feasible to limit the menu in order to reduce feeding costs ?

Introduction Related Work Our Approach Performance Applications Conclusions

Page 22: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Bootstrapping Sense Embeddings

Can your insurance company aid you in reducing administrative costs ?

insurance_company%1:14:00::

aid%2:41:00::

reduce%2:30:00::

administrative%3:01:00::

cost%1:21:00::

Would it be feasible to limit the menu in order to reduce feeding costs ?

cost%1:21:00::

feasible%5:00:00:possible:00

limit%2:30:00::

menu%1:10:00::

reduce%2:30:00::

feeding%1:04:01::

Introduction Related Work Our Approach Performance Applications Conclusions

Page 23: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Bootstrapping Sense Embeddings

Can your insurance company aid you in reducing administrative costs ?

insurance_company%1:14:00::

aid%2:41:00::

reduce%2:30:00::

administrative%3:01:00::

cost%1:21:00::

Would it be feasible to limit the menu in order to reduce feeding costs ?

cost%1:21:00::

feasible%5:00:00:possible:00

limit%2:30:00::

menu%1:10:00::

reduce%2:30:00::

feeding%1:04:01::

Introduction Related Work Our Approach Performance Applications Conclusions

Page 24: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Bootstrapping Sense Embeddings

Can your insurance company aid you in reducing administrative costs ?

insurance_company%1:14:00::

aid%2:41:00::

reduce%2:30:00::

administrative%3:01:00::

cost%1:21:00::

Would it be feasible to limit the menu in order to reduce feeding costs ?

cost%1:21:00::

feasible%5:00:00:possible:00

limit%2:30:00::

menu%1:10:00::

reduce%2:30:00::

feeding%1:04:01::

Introduction Related Work Our Approach Performance Applications Conclusions

Page 25: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Bootstrapping Sense Embeddings

insurance_company%1:14:00::

aid%2:41:00::

reduce%2:30:00::

administrative%3:01:00::

cost%1:21:00::

cost%1:21:00::

feasible%5:00:00:possible:00

limit%2:30:00::

menu%1:10:00::

reduce%2:30:00::

feeding%1:04:01::

𝑐1𝑐1

𝑐1𝑐1

𝑐1

𝑐2𝑐2

𝑐2𝑐2

𝑐2𝑐2

Introduction Related Work Our Approach Performance Applications Conclusions

Page 26: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Bootstrapping Sense Embeddings

reduce%2:30:00:: cost%1:21:00::

cost%1:21:00::reduce%2:30:00::

𝑐1 𝑐1

𝑐2 𝑐2

Introduction Related Work Our Approach Performance Applications Conclusions

Page 27: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Bootstrapping Sense Embeddings

𝑣 reduce%2:30:00::reduce%2:30:00::𝑐1 reduce%2:30:00::𝑐2+

n

reduce%2:30:00::𝑐n+ +…=

𝑣 cost%1:21:00::cost%1:21:00::𝑐1 cost%1:21:00::𝑐2+

n

cost%1:21:00::𝑐n+ +…=

Introduction Related Work Our Approach Performance Applications Conclusions

Page 28: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Bootstrapping Sense Embeddings

𝑣 reduce%2:30:00::reduce%2:30:00::𝑐1 reduce%2:30:00::𝑐2+

n

reduce%2:30:00::𝑐n+ +…=

𝑣 cost%1:21:00::cost%1:21:00::𝑐1 cost%1:21:00::𝑐2+

n

cost%1:21:00::𝑐n+ +…=

Introduction Related Work Our Approach Performance Applications Conclusions

Outcome: 33,360 sense embeddings (16% coverage)

Page 29: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Propagating Sense Embeddings

WordNet’s units, synsets, represent concepts at different levels.

Introduction Related Work Our Approach Performance Applications Conclusions

Page 30: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Propagating Sense Embeddings

WordNet’s units, synsets, represent concepts at different levels.

Introduction Related Work Our Approach Performance Applications Conclusions

Sensekey Sensekey

Synset Synset

Synset

Synset

Lexname

Sensekey Sensekey

Page 31: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Propagating Sense Embeddings

WordNet’s units, synsets, represent concepts at different levels.

Introduction Related Work Our Approach Performance Applications Conclusions

kid%1:18:00:: Sensekey

child.n.01 Synset

juvenile.n.01

Synset

noun.person

Sensekey Sensekey

Page 32: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Propagating Sense Embeddings

Introduction Related Work Our Approach Performance Applications Conclusions

hamburger%1:13:01::

burger%1:13:00::

hotdog%1:18:00::

potato_chip%1:13:00::

wrap%1:13:00::

sandwich%1:13:00::

Page 33: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Propagating Sense Embeddings

Introduction Related Work Our Approach Performance Applications Conclusions

hamburger%1:13:01::

burger%1:13:00::

hotdog%1:18:00::

potato_chip%1:13:00::

wrap%1:13:00::

sandwich%1:13:00::

Page 34: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Propagating Sense Embeddings

Introduction Related Work Our Approach Performance Applications Conclusions

hamburger%1:13:01::burger%1:13:00::

burger.n.02 hotdog.n.01

sandwich.n.01

chips.n.04

noun.food

hotdog%1:18::00

potato_chip%1:13::00

wrap.n.02

wrap%1:13::00sandwich%1:13:00::

Retrieve Synsets, Relations and Categories

Page 35: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Propagating Sense Embeddings

Introduction Related Work Our Approach Performance Applications Conclusions

hamburger%1:13:01::burger%1:13:00::

burger.n.02 hotdog.n.01

sandwich.n.01

chips.n.04

noun.food

hotdog%1:18::00

potato_chip%1:13::00

wrap.n.02

wrap%1:13::00sandwich%1:13:00::

1st stage: Synset Embeddings

Page 36: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Propagating Sense Embeddings

Introduction Related Work Our Approach Performance Applications Conclusions

hamburger%1:13:01::burger%1:13:00::

burger.n.02 hotdog.n.01

sandwich.n.01

chips.n.04

noun.food

hotdog%1:18::00

potato_chip%1:13::00

wrap.n.02

wrap%1:13::00sandwich%1:13:00::

2nd Stage: Hypernym Embeddings (ind. Synsets)

Page 37: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Propagating Sense Embeddings

Introduction Related Work Our Approach Performance Applications Conclusions

hamburger%1:13:01::burger%1:13:00::

burger.n.02 hotdog.n.01

sandwich.n.01

chips.n.04

noun.food

hotdog%1:18::00

potato_chip%1:13::00

wrap.n.02

wrap%1:13::00sandwich%1:13:00::

3rd Stage: Lexname Embeddings

Page 38: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Propagating Sense Embeddings

Introduction Related Work Our Approach Performance Applications Conclusions

hamburger%1:13:01::burger%1:13:00::

burger.n.02 hotdog.n.01

sandwich.n.01

chips.n.04

noun.food

hotdog%1:18::00

potato_chip%1:13::00

wrap.n.02

wrap%1:13::00sandwich%1:13:00::

But XX != __ …

Page 39: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Enriching Sense Embeddings

Introduction Related Work Our Approach Performance Applications Conclusions

Leverage Synset Definitions and Lemmas for Differentiation

Page 40: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Enriching Sense Embeddings

Introduction Related Work Our Approach Performance Applications Conclusions

Leverage Synset Definitions and Lemmas for Differentiation

sandwich:%1:13:00:: (sandwich.n.01)Definition: two (or more) slices of bread with a filling between themLemmas: sandwich

wrap:%1:13:00:: (wrap.n.02)Definition: a sandwich in which the filling is rolled up in a soft tortillaLemmas: wrap, tortilla

Page 41: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Enriching Sense Embeddings

Introduction Related Work Our Approach Performance Applications Conclusions

Compose a new context

sandwich:%1:13:00:: (sandwich.n.01)sandwich - two (or more) slices of bread with a filling between them

wrap:%1:13:00:: (wrap.n.02)wrap, tortilla - a sandwich in which the filling is rolled up in a soft tortilla

Page 42: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Enriching Sense Embeddings

Introduction Related Work Our Approach Performance Applications Conclusions

Make the context specific to sensekey (repeat lemma)

sandwich:%1:13:00::sandwich - sandwich - two (or more) slices of bread with a filling between them

wrap%1:13:00::wrap - wrap, tortilla - a sandwich in which the filling is rolled up in a soft tortilla

Page 43: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Enriching Sense Embeddings

Introduction Related Work Our Approach Performance Applications Conclusions

Make the context specific to sensekey (repeat lemma)

sandwich:%1:13:00::sandwich - sandwich - two (or more) slices of bread with a filling between them

wrap%1:13:00::wrap - wrap, tortilla - a sandwich in which the filling is rolled up in a soft tortilla

Page 44: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Enriching Sense Embeddings

Introduction Related Work Our Approach Performance Applications Conclusions

Obtain contextual embeddings for every token

sandwich:%1:13:00::sandwich - sandwich - two (or more) slices of bread with a filling between them

wrap%1:13:00::wrap – wrap, tortilla - a sandwich in which the filling is rolled up in a soft tortilla

𝑐 𝑐 𝑐 𝑐

𝑐 𝑐

𝑐 𝑐 …

Page 45: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Enriching Sense Embeddings

Introduction Related Work Our Approach Performance Applications Conclusions

Sentence Embedding from avg. of Contextual Embeddings

sandwich:%1:13:00::sandwich - sandwich - two (or more) slices of bread with a filling between them

wrap%1:13:00::wrap - wrap - a sandwich in which the filling is rolled up in a soft tortilla

𝑣𝑑 =

𝑣𝑑 =

𝑑 = 1024

Page 46: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Enriching Sense Embeddings

Introduction Related Work Our Approach Performance Applications Conclusions

Merge Sentence Embedding with previous Sense Embedding

sandwich:%1:13:00::sandwich - sandwich - two (or more) slices of bread with a filling between them

wrap%1:13:00::wrap - wrap - a sandwich in which the filling is rolled up in a soft tortilla

𝑣𝑑 =

𝑣𝑑 =

sandwich:%1:13:00::𝑣𝑠 =

wrap:%1:13:00::𝑣𝑠 =

Page 47: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

sandwich:%1:13:00::sandwich - sandwich - two (or more) slices of bread with a filling between them

wrap%1:13:00::wrap - wrap - a sandwich in which the filling is rolled up in a soft tortilla

Merge Sentence Embedding with previous Sense Embedding

Enriching Sense Embeddings

Introduction Related Work Our Approach Performance Applications Conclusions

𝑣𝑠 =

𝑣𝑠 =

𝑑 = 2048

Page 48: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Reinforcing Sense Embeddings

Introduction Related Work Our Approach Performance Applications Conclusions

Contextual Embeddings aren’t good at preserving morphological relatedness

Page 49: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Reinforcing Sense Embeddings

Introduction Related Work Our Approach Performance Applications Conclusions

Retrieve char-ngram embeddings (static) for lemmas

sandwich:%1:13:00::

wrap%1:13:00::

𝑣𝑙 =

𝑣𝑙 =

Page 50: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Reinforcing Sense Embeddings

Introduction Related Work Our Approach Performance Applications Conclusions

Merge with previous sense embeddings

sandwich:%1:13:00::

wrap%1:13:00::

𝑣𝑙 =

𝑣𝑙 =

𝑣𝑠 =

𝑣𝑠 =

Page 51: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Reinforcing Sense Embeddings

Introduction Related Work Our Approach Performance Applications Conclusions

Merge with previous sense embeddings

sandwich:%1:13:00::

wrap%1:13:00::

𝑣𝑠 =

𝑣𝑠 =

𝑑 = 2348

Page 52: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Matching Sense Embeddings

Introduction Related Work Our Approach Performance Applications Conclusions

The glasses are in the cupboard.

Page 53: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Matching Sense Embeddings

Introduction Related Work Our Approach Performance Applications Conclusions

The glasses are in the cupboard.

Ԧ𝑐

Ԧ𝑣

Page 54: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Matching Sense Embeddings

Introduction Related Work Our Approach Performance Applications Conclusions

The glasses are in the cupboard.

Ԧ𝑐

Ԧ𝑣

Ԧ𝑐 Ԧ𝑐 Ԧ𝑣𝑣𝑡 =

Page 55: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Matching Sense Embeddings

Introduction Related Work Our Approach Performance Applications Conclusions

The glasses are in the cupboard.

Ԧ𝑐

Ԧ𝑣

Ԧ𝑐 Ԧ𝑐 Ԧ𝑣𝑣𝑡 =

𝑣𝑑 𝑣𝑙𝑣𝑠𝑣𝑑 𝑣𝑙𝑣𝑠

𝑣𝑑 𝑣𝑙𝑣𝑠spectacles%1:06:00::

glass%1:27:00::drinking_glass%1:06:00::

Page 56: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

WSD Results

Introduction Related Work Our Approach Performance Applications Conclusions

Page 57: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

WSD Results

Introduction Related Work Our Approach Performance Applications Conclusions

60

65

70

75

80

MFS IMS(Zhong andNg, 2010)

IMS + Emb.(Iacobacci et

al. 2016)

BiLSTM(Raganato et

al. 2017)

BiLSTM VR(Vial et al.

2018)

context2vec(Melamud et

al. 2016)

ELMo k-NN(Peters et al.

2018)

BERT k-NN(Adapted

Peters et al.)

LMMS-BERT(Ours)

Standard English WSD EvaluationF1 on ALL set of the WSD Evaluation Framework (Raganato et al. 2017)

Page 58: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

WSD Results

Introduction Related Work Our Approach Performance Applications Conclusions

Uninformed Sense Matching (matching +200K)Same standard but without filtering candidates by lemmas or POS

0

10

20

30

40

50

60

70

80

LMMS 1024 LMMS 2048 LMMS 2348

Page 59: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Applying Sense Embeddings

Introduction Related Work Our Approach Performance Applications Conclusions

Page 60: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

World Knowledge in NLMs

What’s BERT thinking about when he reads?

Introduction Related Work Our Approach Performance Applications Conclusions

Page 61: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

World Knowledge in NLMs

Introduction Related Work Our Approach Performance Applications Conclusions

[E1] played [E2] in [E3]

Page 62: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Checking for Biases in NLMs

Putting BERT on the spot

Introduction Related Work Our Approach Performance Applications Conclusions

Page 63: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Checking for Biases in NLMs

Introduction Related Work Our Approach Performance Applications Conclusions

𝑏𝑖𝑎𝑠 𝑠 = 𝑠𝑖𝑚 Ԧ𝑣𝑚𝑎𝑛𝑛1 , Ԧ𝑣𝑠 − 𝑠𝑖𝑚( Ԧ𝑣𝑤𝑜𝑚𝑎𝑛𝑛

1 , Ԧ𝑣𝑠)

Page 64: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Conclusion

• Powerful NLMs allow for a simple k-NN to perform really well for WSD.

• NLMs are improving very rapidly, progress in WSD should follow.

• Sense embeddings from NLMs are useful not only for WSD, but also for NLM inspection, and other probing or downstream tasks.

Introduction Related Work Our Approach Performance Applications Conclusions

Page 65: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Future Work

• Pipeline Improvements: Better NLMs, sentence embeddings, char embeddings, use of WN, etc..

• Multilingual Sense Embeddings.

• Semi-supervised Refinement.

• Formalize inspection (probing task), other applications.

Introduction Related Work Our Approach Performance Applications Conclusions

Page 66: Language Modelling Makes Sense - Daniel Loureirodanlou.github.io/files/slides/lmms_acl19_slides.pdf · It Makes Sense (IMS) [Zhong and Ng (2010)] : •POS tags, surrounding words,

Thanks

Introduction Related Work Our Approach Performance Applications Conclusions

Code and Sense Embeddings:github.com/danlou/LMMS

@[email protected]