Analogies Explained
Towards Understanding Word Embeddings
Carl Allen, Tim Hospedales June 13 2019
School of Informatics, University of Edinburgh
Analogies Explained Towards Understanding Word Embeddings Carl - - PowerPoint PPT Presentation
Analogies Explained Towards Understanding Word Embeddings Carl Allen, Tim Hospedales June 13 2019 School of Informatics, University of Edinburgh The Problem: linking semantics to geometry from: man is to king as woman is to queen
School of Informatics, University of Edinburgh
1
1
woman king queen man permitting auxiliary royal crown sol reign princess lord prince wK − wM + wW
1
w1 w2 w3 wn target words (E) c1 c2 c3 cn context words (E) . . . . . .
p wi cj p wi p cj
2
w1 w2 w3 wn target words (E) c1 c2 c3 cn context words (E) . . . . . .
p wi cj p wi p cj
2
w1 w2 w3 wn target words (E) c1 c2 c3 cn context words (E) . . . . . .
i cj ≈ log p(wi,cj) p(wi)p(cj) − log k
2
w1 w2 w3 wn target words (E) c1 c2 c3 cn context words (E) . . . . . .
i cj ≈ log p(wi,cj) p(wi)p(cj) − log k
2
3
3
3
3
3
3
4
PMIi ≈ w⊤
i C
5
w1 wn
w n is (element-wise) small:
w
j p cj w p cj
6
w1 wn
W,w∗
j
p(cj|W) , cj ∈E †Inspired by Gittens et al. (2017) 6
w j
paraphrase error
j
conditional independence error
independence error
wi
w
7
w j
paraphrase error
j
conditional independence error
independence error
wi
w
7
w j
paraphrase error
j
conditional independence error
independence error
wi
w
7
w j
paraphrase error
j
conditional independence error
independence error
wi
w
7
j
paraphrase error
j
conditional independence error
independence error
wi
w
7
j
paraphrase error
j
conditional independence error
independence error
wi∈ W
W,w∗ + σ W − τ W1
7
wi∈ W
W,w∗ + σ W − τ W1
w1 wn
wi
wi
8
wi∈ W
W,w∗ + σ W − τ W1
w1 wn
wi
wi
8
wi∈ W
W,w∗ + σ W − τ W1
w1 wn
wi∈ W∗
wi∈ W
W,W∗ + σ W − σ W∗ − (τ W − τ W∗)1
8
wi∈ W∗
wi∈ W
W,W∗ + σ W − σ W∗ − (τ W − τ W∗)1
net dependence error 9
wi∈ W∗
wi∈ W
W,W∗ + σ W − σ W∗ − (τ W − τ W∗)1
net dependence error 9
wi∈ W∗
wi∈ W
W,W∗ + σ W − σ W∗ − (τ W − τ W∗)1
W − σ W∗ − (τ W − τ W ∗)1
9
dependence error
PMIi ≈ w⊤
i C
10
+royal
P
P
11
+royal
P
P
11
+royal
+W+ +W−
P
11
+royal
+W+ +W−
+W+ −W−
11
+W+ −W−
12
+W+ −W−
12
+W+ −W−
12
P
P
13
+W+ −W−
+W+ −W−
13
+W+ −W−
+W+ −W−
13
+king −man
+king −man
14
dependence error
PMIi ≈ w⊤
i C
15
16
ρ , σ ,τ
16
ρ , σ ,τ
woman king queen man permitting auxiliary royal crown sol reign princess lord prince wK − wM + wW
16
17