| ▲ | lblock 4 hours ago | |
Isn't the whole linear operations thing not really true and even less so now in embeddings from transformer based models? I remember reading a blog about this but cannot find it anymore. This is the closest thing i could find now: https://mikexcohen.substack.com/p/king-man-woman-queen-is-fa... | ||
| ▲ | wongarsu 3 hours ago | parent | next [-] | |
I just tried it on qwen3-embedding:8b with a little vibe-coded 100 line script that does the obvious linear math and compares the result to the embeddings of a couple of candidate words using cosine similarity, and it did prefer the expected words. Same 22 candidates for both questions king - man + woman ≈ queen (0.8510)
Berlin - Germany + France ≈ Paris (0.8786)
Sure, 0.85 is not an exact match so things are not exactly linear, and if I dump an entire dictionary in there it might be worse, but the idea very much worksEdit: after running a 100k wordlist through qwen3-embedding:0.6b, the closest matches are:
So clearly throwing a dictionary at it doesn't break it, the closest matches are still the expected ones. The next closest matches got a lot more interesting too, for example the four closest matches for london – england + france are (in order) paris, strasbourg, bordeaux, marseilles | ||
| ▲ | mjhay 3 hours ago | parent | prev [-] | |
Very much so. It was a little less untrue with older word embedding models* but that kind of semantic linearity never was a thing in practice. Word embedding models try to embed semantically similar words close to each other, but that does not imply linearity at all. *with transformer models, it is pretty much not even wrong. | ||