[D] How does word2vec model encodes similarity
I am confused about why word2vec learns similarities or how does it learn?
In word2vec, in the skipgram model, we want to maximize the p(context | word), let’s say I have the following sentence:
- I want a job
- I want a cake
Most pair of words are gonna be similar, except for the following ones:
Words for “job” in a window size=2
(job, a)
(job, want)
Words for “cake” in a window size=2
(cake, a)
(cake, want)
Since the structure of the sentence is the same except the nouns job and cake, would the skipgram model learn that job is similar to cake?
Does sentence structure affect the quality of embeddings? I guess this is one of the reasons that these models need to be trained in a huge corpus.
The model is only learning the surrounding words, how can it say, as stated in the original paper, that queen is similar to king? Is it because both have the same surrounding words?
submitted by /u/cuenta4384
[link] [comments]