Embedding map
Each word the model knows is a row of 64 numbers, learned in training, in one table that English and German share. Words the model uses in similar ways end up with similar rows. Squeezed onto a flat page, they form a map.
- English word
- German word
- in both languages
The two axes keep 10.0 % of the spread of the 64 numbers; the rest is not shown.
The nearest neighbours of “dog” (cosine similarity, all 64 numbers)
- bird · 0.70 · English word
- letter · 0.65 · English word
- man · 0.63 · English word
- teacher · 0.59 · English word
- eats · 0.56 · English word
How the map is made, and what it leaves out
A row of 64 numbers is a point in a 64-dimensional space, which no page can show. Principal component analysis finds the two directions in which the points are most spread out and draws each word by how far it lies along those two. Words close on the map may still differ in the dimensions left out, so the neighbours are measured in all 64: by cosine similarity, how much two rows point the same way (1 is the same direction, 0 unrelated).
Look up an English noun such as dog, then a verb such as sees: a noun's nearest neighbours are mostly other nouns, a verb's other verbs. The model groups words by the job they do in a sentence, not by what they mean. A word and its translation, such as dog and Hund, are not close: sharing one table does not make the model line the two languages up. The paper shares this one matrix between the English input, the German input and the output layer (section 3.4).