580 likes | 592 Views
Explore the comparison between neural embeddings and explicit representations, uncover the magic of vector arithmetic in revealing analogies, and learn about the unique properties of neural embeddings. Dive into the intricacies of linguistic regularities and their impact on word representations.
E N D
Linguistic Regularities in Sparse and Explicit Word Representations Omer Levy Yoav Goldberg Bar-Ilan University Israel
Papers in ACL 2014* * Sampling error: +/- 100%
Neural Embeddings • Dense vectors • Each dimension is a latent feature • Common software package: word2vec • “Magic” king man woman queen (analogies)
Explicit Representations (Distributional) • Sparse vectors • Each dimension is an explicit context • Common association metric: PMI, PPMI • Does the same “magic” work for explicit representations too? • Baroni et al. (2014) showed that embeddings outperform explicit, but…
Questions • Are analogies unique to neural embeddings? Compare neural embeddings with explicit representations • Why does vector arithmetic reveal analogies? Unravel the mystery behind neural embeddings and their “magic”
Mikolov et al. (2013a,b,c) • Neural embeddings have interesting geometries
Mikolov et al. (2013a,b,c) • Neural embeddings have interesting geometries • These patterns capture “relational similarities” • Can be used to solve analogies: man is to woman as king is to queen
Mikolov et al. (2013a,b,c) • Neural embeddings have interesting geometries • These patterns capture “relational similarities” • Can be used to solve analogies: is to as is to • Can be recovered by “simple” vector arithmetic:
Mikolov et al. (2013a,b,c) • Neural embeddings have interesting geometries • These patterns capture “relational similarities” • Can be used to solve analogies: is to as is to • With simple vector arithmetic:
Mikolov et al. (2013a,b,c) king man woman queen
Mikolov et al. (2013a,b,c) Tokyo Japan France Paris
Mikolov et al. (2013a,b,c) best good strong strongest
Mikolov et al. (2013a,b,c) best good strong strongest vectors in
Are analogies unique to neural embeddings? • Experiment: compare embeddings to explicit representations
Are analogies unique to neural embeddings? • Experiment: compare embeddings to explicit representations
Are analogies unique to neural embeddings? • Experiment: compare embeddings to explicit representations • Learn different representations from the samecorpus:
Are analogies unique to neural embeddings? • Experiment: compare embeddings to explicit representations • Learn different representations from the samecorpus: • Evaluate with the samerecovery method:
Analogy Datasets • 4 words per analogy: is to as is to • Given 3 words: is to as is to • Guess the best suiting from the entire vocabulary • Excluding the question words • MSR:8000 syntactic analogies • Google:19,000 syntactic and semantic analogies
Embedding vs Explicit (Round 1) Many analogies recovered by explicit, but many more by embedding.
Why does vector arithmetic reveal analogies? • We wish to find the closest to • This is done with cosine similarity: Problem: one similarity might dominate the rest.
Why does vector arithmetic reveal analogies? • We wish to find the closest to
Why does vector arithmetic reveal analogies? • We wish to find the closest to • This is done with cosine similarity:
Why does vector arithmetic reveal analogies? • We wish to find the closest to • This is done with cosine similarity:
Why does vector arithmetic reveal analogies? • We wish to find the closest to • This is done with cosine similarity: vector arithmetic similarity arithmetic
Why does vector arithmetic reveal analogies? • We wish to find the closest to • This is done with cosine similarity: vector arithmetic similarity arithmetic
Why does vector arithmetic reveal analogies? • We wish to find the closest to • This is done with cosine similarity: vector arithmetic similarityarithmetic
Why does vector arithmetic reveal analogies? • We wish to find the closest to • This is done with cosine similarity: vector arithmetic similarityarithmetic royal? female?
What does each similarity term mean? • Observe the joint features with explicit representations!
Let’s look at some mistakes… England London Baghdad ?
Let’s look at some mistakes… England London Baghdad Iraq
Let’s look at some mistakes… England London Baghdad Mosul?
The Additive Objective • Problem: one similarity might dominate the rest • Much more prevalent in explicit representation • Might explain why explicit underperformed
How can we do better? • Instead of adding similarities, multiply them!
How can we do better? • Instead of adding similarities, multiply them!