Show HN: King – Man + Woman = ?

(kingminusman.com)

27 points | by Gooblebrai 10 hours ago

2 comments

  • vunderba 8 hours ago
    Nice job. Given that this is kind of a "trivia" game I think there might be cases where it breaks down since there's been some recent research showing that many of the vector analogies used about a decade ago with Word2Vec - specifically the classic “king minus man plus woman equals queen” were somewhat cherry-picked and don't necessarily prove that cosine similarity always reflects real semantic structure.
    • Gooblebrai 3 hours ago
      Thanks! When developing this made sure that the "math" works out, by doing the operations on actual embeddings, so it actually holds!
    • Affric 6 hours ago
      Do you have a link? Is it really just a concept we don't have a word for?
      • vunderba 5 hours ago
        So there have been a couple of papers on this that I think are pretty popular: “Issues in Evaluating Semantic Spaces Using Word Analogies” [1] and “The Problems of Analogical Reasoning with Word Vectors.” [2]

        I think they’re both worth a look into how word embeddings aren't always a straight-forward 1:1 correspondence between semantic relationships and cosine similarity.

        [1] - https://aclanthology.org/W16-2503.pdf

        [2] - https://aclanthology.org/S17-1017.pdf

        • srean 4 hours ago
          Vector space of a few hundred dimensions is just too limiting.

          It assumes that any difference vector, for example, (woman - man) can be applied to any word to yield a meaningful word. This is not true for language.

          What would for instance be

          Woman - man + thirsty ?

          There are other problems: do you want to make (sister - brother) parallel to (woman - man) or do you want to make (sister-in-law - brother) parallel to (woman - man). I Euclidean geometry, there is only one line through a point along a parallel. This is restrictive for language.

          There are many approaches one can take to try to handle this problem. One computer science'y way would be to define 'typed' additions that disallows addition when the result is non-sensical. Distinguish between affine points and displacements.

          Another way which is closer to my taste is to consider the set of words not to be embedded in a vector space but in a non-Euclidean manifold. Here in order to execute an addition you have to ensure that you stay on the manifold -- use a manifold compliant motion.

          There are many ways to model this, parallel transport is just one option. In any case, some words would be at the boundary of the manifold such that displacements in certain directions are illegal.

          There is another problem with using vector spaces of a few hundred dimensions -- in this model, directions are relations. For example (woman - man) is analogous to the relation FEMALEOF.

          In a k dimensional vector space there can be only k independent relationships between any pair of words. In k we have to capture all sorts of relationships that can occur between any two names or words. CAPITALOF, FATHEROF, MOTHEROF, SPOUSEOF, GREENOF, YOUNGOF, OLDOF, EMPLOYEEOF.

          The total number of independent relationships possible between words of a language with finitely many words is necessarily finite, but can definitely be larger than a few thousand.

  • gsoff 7 hours ago
    it's cool. but i think you should add a restart button. i understand the game has 10 rounds a day, but after you finish them, it only shows the result. since it remembers your progress with a cookie, you keep seeing the result when you visit the site again that day. that can feel a bit weird to most people.