I have two hypothesises for what is going on. I’m leaning towards 1, but very unsure.
1)
king—man + woman = queen
is true for word2vec embeddings but not in LLaMa2 7B embeddings because word2vec has much fewer embedding dimensions.
LLaMa2 7B has 4096 embedding dimensions.
This paper uses a variety of word2vec with 50, 150 and 300 embedding dimensions.
Possibly when you have thousands of embedding dimensions, these dimensions will encode lots of different connotations of these words. These connotations will probably not line up with the simple relation [king—man + woman = queen], and therefore we get [king—man + woman ≠ queen] for high dimensional embeddings.
2)
king—man + woman = queen
Isn’t true for word2vec either. If you do it with word2vec embeddings you get more or less the same result I did with LLaMa2 7B.
(As I’m writing this, I’m realising that just getting my hands on some word2vec embeddings and testing this for myself, seems much easier than to decode what the papers I found is actually saying.)
I have two hypothesises for what is going on. I’m leaning towards 1, but very unsure.
1)
king—man + woman = queen
is true for word2vec embeddings but not in LLaMa2 7B embeddings because word2vec has much fewer embedding dimensions.
LLaMa2 7B has 4096 embedding dimensions.
This paper uses a variety of word2vec with 50, 150 and 300 embedding dimensions.
Possibly when you have thousands of embedding dimensions, these dimensions will encode lots of different connotations of these words. These connotations will probably not line up with the simple relation [king—man + woman = queen], and therefore we get [king—man + woman ≠ queen] for high dimensional embeddings.
2)
king—man + woman = queen
Isn’t true for word2vec either. If you do it with word2vec embeddings you get more or less the same result I did with LLaMa2 7B.
(As I’m writing this, I’m realising that just getting my hands on some word2vec embeddings and testing this for myself, seems much easier than to decode what the papers I found is actually saying.)
It isn’t true for word2vec either. This article from 2019 describes exactly what you found: King—Man + Woman = King?.
Thanks!