This is an interactive experiment with word embeddings and word-vector arithmetic: representing words as points in a high-dimensional space, then seeing what happens when you add or subtract their vectors. The public calculator uses a small set of hand-assigned coordinates to make the idea visible; the research explores learned embeddings.
The question is irresistible: what happens if you subtract one word from another, then add a third? The familiar Word2Vec example is king − man + woman ≈ queen. In some learned word-vector spaces, that calculation points toward queen. I wanted a place where I could play with the idea and see where it stopped making sense.
How word-vector arithmetic works
A word vector is a list of numbers representing a word. To calculate with it, you add and subtract those numbers, then look for candidate words pointing in a similar direction. The arithmetic is ordinary vector arithmetic. Interpreting the result depends on how the representations were made, which words are available as answers, and the relationship you hoped to express.
Try a country-and-capital analogy
The public browser calculator uses a vocabulary and semantic coordinates assigned by hand. Features such as royalty, country, and profession make the steps visible. Try Paris − France + Italy: removing the France coordinate and adding Italy points to Rome in this toy. A successful example shows what follows from those chosen coordinates. It does not demonstrate that a model discovered the relationship from language, or that the same operation will work on an unfamiliar word.
What changes with learned embeddings?
The separate research work tests learned embeddings on public analogy datasets, including Google's analogy questions and BATS. One important distinction is the answer pool. Choosing among a short list of candidates is an easier setting than searching a broad vocabulary. The report keeps those evaluations separate and checks methods on held-out examples. It also separates genuine chains of relationships from adding and subtracting the same term, which simply cancels out.
The results are mixed in useful ways. Scoring that takes the intended relationship into account improves some tested settings, but improvements do not consistently carry across benchmarks. Changing how a word is presented to a model can help one evaluation and hurt another. A model that performs well at retrieving related text is not automatically a better word-arithmetic model.
Why the nearest word can still be wrong
There are also limits beyond the score. A word can have several meanings, and the model's geometry need not match the interpretation I have in mind. A nearest result is still only the nearest available result; the calculator can return something even when the equation has no satisfying answer. I treat it as a way to inspect a representation and its assumptions.
That leaves plenty to explore: which relationships behave consistently, when examples help, and when the honest output should be uncertainty. The toy makes the operation approachable. The research asks how much of that intuition survives a harder test.