Word2Vec puts each word on a map of company
1 month ago
Cat and kitten barely share letters. A chatbot still treats those two words as the same request. ChatGPT and Claude read a sentence as numbered pieces. Those pieces are numbered slots. Slot forty-seven and slot one thousand nine hundred three sit equally far apart as numbers. Cat can sit in one slot. Kitten can sit in the other. The numbers carry no closeness.
Ask about this presentation
Chapters
0:00Cat and kitten sit equally far apart
0:23Words that keep the same company
0:51A 2013 Google paper learned each place
1:38King minus man plus woman
2:18Paris minus France plus Italy
2:50The full analogy test hit 53.3%
3:31Table 8’s showcase would score about 60%
4:15Slot forty-seven and slot 1903 now sit as pins
Show transcriptHide transcript
Cat and kitten barely share letters. A chatbot still treats those two words as the same request. ChatGPT and Claude read a sentence as numbered pieces. Those pieces are numbered slots. Slot forty-seven and slot one thousand nine hundred three sit equally far apart as numbers. Cat can sit in one slot. Kitten can sit in the other. The numbers carry no closeness.
Treat each word as a pin on a city map. The streets are company. Company means who shows up next to whom. Cat drops on the map. Kitten drops nearby. Car drops far away. Cat and kitten keep the same neighbors. Car keeps different neighbors. The numbered chips become pins. Slot forty-seven is now a place. Slot one thousand nine hundred three is now a place. The letters of cat and kitten barely overlap. The pins sit close. A chatbot can treat those two spellings as related.
A 2013 Google paper learned those places by guessing neighbors. The paper is called Word2Vec. Mikolov, Chen, Corrado, and Dean wrote Word2Vec. Those authors trained on Google News. Google News held about six billion words. The word list was capped at the million most common words. Each word became a list of numbers. That list is a place on the map. Researchers call that list an embedding. Two guessing games taught the places. Look at the neighbors and guess the middle word. Or look at the middle word and guess the neighbors. On this grid, a window of neighbors sits around cat. One game looks at that window and guesses cat. The other game looks at cat and guesses the window. Either game pushes cat toward kitten. Words that keep the same company end up near each other.
King, man, and woman already sit on this map. King sits near man. Queen sits near woman. Take the pin for king. Subtract the place for man. Add the place for woman. The walk lands at a new spot on the map. The computer searches the rest of the pins for the closest other pin. The search skips king, man, and woman. Those three pins started the walk. The closest leftover pin is queen. Each kind of pair has its own step on the map. The step from man to woman is one of those steps. Add that step to king. The new spot sits near queen. Mikolov, Yih, and Zweig wrote this walk in a second 2013 paper. Those authors say the walk lands very close to queen.
The same walk moves cities. A gallery in the Word2Vec paper, printed as Table 8, shows the city walks. Paris sits near France. Rome sits near Italy. Tokyo sits near Japan. The country-to-capital step is the same kind of reusable step as the man-to-woman step. Start at Paris. Subtract the place for France. Add the place for Italy. The closest other pin is Rome. Start at Paris. Subtract the place for France. Add the place for Japan. The closest other pin is Tokyo. The same arrow walks new cities.
The computer takes the closest other pin as the answer. Word2Vec ran that search on an analogy test. An analogy test asks for the missing fourth word. King minus man plus woman is one of those questions. Queen is the missing word. One run used three hundred numbers per word. That run trained on seven hundred eighty-three million words of Google News. That run scored fifty-three point three percent of the questions. Fifty point zero percent of the meaning questions hit the exact word. Fifty-five point nine percent of the grammar questions hit the exact word. The test counted a hit only when the closest pin was the exact word. Synonyms counted as misses.
This picture is roughly right. Here is where the picture breaks. Table 8 is a showcase. Mikolov, Chen, Corrado, and Dean say those showcase rows would score only about sixty percent if the test demands the exact word. Fifty-three point three percent measured the full analogy test. About sixty percent is how Table 8's showcase rows would score under the same exact-word rule. The same gallery walks big minus bigger plus small. The closest pin is larger. The map stores one pin per spelling. Bank is one spelling. Rivers and money share that one pin. Bank is a teaching example of that design. Today's chat models still drop a pin on each piece. Those models learn the pin while they guess the next piece.
Slot forty-seven and slot one thousand nine hundred three started as numbered pieces. Those pieces now sit as pins with neighbors. A word is a pin on a map of company. Company means who shows up next to whom. The finished map holds every pin from the earlier slides. Cat sits near kitten. Car sits far away. King sits with man, woman, and queen. Paris sits with France, Italy, Rome, Japan, and Tokyo. Bank sits as one pin. Word2Vec learned those places by guessing neighbors on Google News. King minus man plus woman lands near queen. Paris minus France plus Italy lands near Rome. The computer takes the closest other pin. The search skips the pins that started the walk. Each spelling gets one pin. Today's chat models still drop a pin on each piece. Those models learn the pin while they guess the next piece. How a model decides which earlier pins matter is the next Foundations lesson.
Up next
5:34RAG has an AI look up passages before it answers
@plain-english-ai · 4 weeks ago
5:24Knowledge distillation copies a teacher model’s wrong guesses
@plain-english-ai · 1 month ago
5:46LoRA fine-tunes GPT-3 by training 4.7 million new numbers
@plain-english-ai · 1 month ago
5:49RLHF taught GPT-3 to reply using rankings from about 40 people
@plain-english-ai · 1 month ago
5:57GPT-3 learned to write by guessing the next piece 300 billion times
@plain-english-ai · 1 month ago
5:36ChatGPT uses attention to work out what “its” points to
@plain-english-ai · 1 month ago
5:54Training GPT-3 cost 900 billion times one piece of an answer
@plain-english-ai · 1 month ago
5:50What a context window actually holds
@plain-english-ai · 1 month ago
5:18Why AI reads in tokens, not words
@plain-english-ai · 1 month ago
3:17Why chatbots make things up — and why more data doesn't fix it
@plain-english-ai · 2 months ago