Re:King – man + woman is queen; but why?
by rm999 on Saturday January 07, 2017 @05:41PM
(#13347099)
You may already know this part, but for anyone who doesn't know: vector space models very often use cosine distance to make comparisons, instead of Euclidean distance. In this model, you can visualize your vectors as points on a unit hypersphere, where the distance between two vectors is how far apart they are on the sphere. x+y finds the point between them, x-y finds the point between x and the antipode of y (or, perhaps more intuitively, pushes x away from y). 2*x doesn't have any additional meaning (it's the same as x). But x+2y is the equivalent of finding a point that is proportionally closer to y than x (I think this is 2 times as close to y than x, but I didn't do the math). edit: to be clear this paragraph is very hand-wavy on the math, and is just meant to create an accurate-enough visual.
My intuition of why things like king + man - woman work is because the points in the vector space model happen to create a well-behaving manifold with smooth meaning changes. It's not very principled, but it does work.
I wrote a series of blog posts with a coworker about doing this with music:
Instead of mixing nouns and adjectives, we do things like mixing songs and artists and radio stations etc. In the second post we show how Nirvana - Kurt Cobain + Female Vocalist works remarkably well. I've studied empirically why this worked, and the best I could come up with is that the high dimensional space we created had a very dense set of points in the region of popular western music that led to a smooth manifold.
My intuition of why things like king + man - woman work is because the points in the vector space model happen to create a well-behaving manifold with smooth meaning changes. It's not very principled, but it does work.
I wrote a series of blog posts with a coworker about doing this with music:
https://tech.iheart.com/mapping-the-world-of-music-using-mac...
https://tech.iheart.com/mapping-the-world-of-music-using-mac...
Instead of mixing nouns and adjectives, we do things like mixing songs and artists and radio stations etc. In the second post we show how Nirvana - Kurt Cobain + Female Vocalist works remarkably well. I've studied empirically why this worked, and the best I could come up with is that the high dimensional space we created had a very dense set of points in the region of popular western music that led to a smooth manifold.