← AI HoodmanNo. 005 · Embeddings
Word2Vec
How did the model learn coffee and tea are similar?
01of 08
Use the arrows, swipe or the arrow keys to turn the slides. Click a slide to read it page by page.How did the model learn coffee and tea are similar?




![Slide 5 of 8: Skip-gram model: Two tables, one row per word. Center table Context table Used when a word is the center Used when a word is a neighbor tea [0.7, 0.2, 0.5] morning [0.5, 0.0, 0.6] coffee [0.8, 0.1, 0.5] hot [0.9, 0.3, 0.4] car [-0.4, 0.9, 0.0] giraffe [-0.6, 0.7, -0.2] Both tables start as random numbers. Training fills them in. Pair (coffee, hot): dot product of the two rows coffee 0.8 0.1 0.5 hot 0.9 0.3 0.4 Multiply 0.72 0.03 0.20 Add up 0.72 + 0.03 + 0.20 = 0.95 Each training pair from the window is one dot product.](/posts/005/05.webp)


