Computer Science Artificial Intelligence & Data Natural Language Processing

Queen Was Only Ever the Second-Best Answer

When researchers ran the math without excluding the input words, the closest vector to 'king minus man plus woman' was king itself

S.J. Nam 8 min read
Queen Was Only Ever the Second-Best Answer

The Equation That Wasn't Quite What We Thought

Ask anyone who has taken a passing interest in artificial intelligence to name one fact about how machines understand language, and they will likely reach for the same four words: king minus man plus woman equals queen. It is the single most repeated demonstration in the history of natural language processing, the equation that supposedly proves a computer can grasp the abstract idea of royalty and gender just by crunching numbers. There's just one problem. When researchers Malvina Nissim, Rik van Noord, and Rob van der Goot actually ran the arithmetic without help in 2020, they found something the decade of retellings had quietly skipped over:
Nissim et al. (2020) found that the closest vector to King -Man + Woman is actually King; Queen is the second closest.

Not queen. King. The most famous "proof" that word embeddings understand meaning turns out to require a thumb on the scale.

That single fact should reorganize how we talk about embeddings — not as evidence that AI has learned what words mean, but as evidence of something narrower, stranger, and in some ways more consequential: embeddings are a record of where words tend to sit relative to each other in enormous piles of text, and we have spent a decade mistaking proximity for comprehension.

The Parlor Trick That Built an Industry

The story begins in 2013, when Tomas Mikolov and colleagues at Google released word2vec, a strikingly simple way to turn every word in a vocabulary into a list of a few hundred numbers.
Mikolov purposefully stripped down the architecture, removing non-linear hidden layers and implementing the entire model in optimized C code, which yielded remarkable scalability, enabling the model to train on enormous quantities of text in minutes rather than weeks.
That efficiency was the real innovation. But what made word2vec famous wasn't speed — it was a party trick Mikolov's team showed off in a companion paper:
an analogy task for evaluating the vector space representation of words, based on the intuition that "king" relates to "man" the way "queen" relates to "woman," answerable by performing algebraic operations on word representations.
The test set behind this claim wasn't small either —
it contained five types of semantic questions, 8,869 in total, and nine types of syntactic questions, 10,675 in total.
The idea spread with astonishing speed. By one count,
word embeddings became an active area of research, with over 26,000 papers published since 2013
, and the king-queen equation became the field's unofficial mascot, reproduced in textbooks, keynote slides, and breathless magazine features.

The Asterisk Nobody Mentions

Here is what those slides almost never say.
In the original computation, the input words themselves are excluded when the algorithm searches for the nearest neighbor; if they aren't excluded, the actual answer to king minus man plus woman is king.
In other words, the equation only "works" because the method is forbidden from giving the boring, technically correct answer. Left to its own devices, the vector arithmetic tells you that a king with the "man" subtracted and "woman" added is still, mathematically, most similar to being a king. Queen is a very close second — but second is not what a decade of pop-science retellings implied.

This isn't a gotcha about one paper. It's a window into what these systems are actually doing. Embeddings are built on the distributional hypothesis — the old linguistic idea that words appearing in similar contexts tend to have related meanings. Word2vec operationalizes this crudely but effectively: it slides a window across billions of words and nudges each word's numeric vector toward the vectors of its neighbors. Feed it enough text and words like "king" and "queen" end up near each other in the resulting space not because the model has any concept of monarchy, but because those words keep appearing near similar surrounding words — "throne," "crown," "reign," "palace." The geometry is real. The vectors do cluster in ways that mirror human categories astonishingly often. But the mechanism generating that geometry is statistical adjacency, not understanding, and the difference matters most exactly when the statistics of our text reflect something we'd rather they didn't.

Stereotypes Have Coordinates

That's precisely what a landmark 2016 paper found. Researchers Tolga Bolukbasi, Kai-Wei Chang, James Zou, Venkatesh Saligrama, and Adam Kalai discovered that the same arithmetic trick used to produce "king minus man plus woman equals queen" also produces "man is to computer programmer as woman is to homemaker" — and worse. Their opening line is blunt:
the blind application of machine learning runs the risk of amplifying biases present in data, and word embeddings face exactly this danger.
Because these vectors are trained on whatever text humans happen to have written — news archives, web crawls, decades of published prose — they absorb the associations baked into that text, including the ones society has spent generations trying to unlearn. Debiasing techniques exist and have improved, but they treat a symptom. The underlying model still has no concept of "programmer" as a gender-neutral occupation; it only has a coordinate shaped by how often "programmer" and "he" showed up near each other in the training corpus. The bias isn't a bug injected by careless engineers. It is the method working exactly as designed, on data that was never neutral to begin with.

From Google's Basement to Everyone's Search Bar

If the 2013-era version of this story were a curiosity confined to research papers, it would matter less. It isn't. The core idea — represent meaning as position, measure relatedness as distance — has scaled into the plumbing of the current AI boom. GPT-3 represents each token as a vector with
12,288 dimensions, far larger than word2vec's original few hundred, multiplied against a vocabulary of 50,257 tokens
before any reasoning happens. OpenAI's current embedding model goes further still:
text-embedding-3-large creates embeddings with up to 3,072 dimensions
, and thanks to a technique called Matryoshka representation learning,
developers can shrink that down to as few as 1,024 dimensions for storage-constrained systems, trading some accuracy for a smaller vector
. This is no longer academic. Embeddings now power the retrieval step in most production AI systems — the process where a chatbot searches a private document store for the passages "closest" to your question before answering it.
A 2024 State of Generative AI in the Enterprise report from Menlo Ventures found that retrieval-augmented generation now dominates 51 percent of enterprise AI implementations, up from 31 percent a year earlier
, and the databases built to store and search these vectors have become their own industry:
the global vector database market is projected to rise from roughly $2.65 billion in 2025 to nearly $8.95 billion by 2030
.

Every one of those systems inherits the same assumption the king-queen equation quietly smuggled in: that nearness in vector space is a reliable stand-in for relevance in meaning. Most of the time it is close enough to be useful. But "close enough" is doing a lot of unexamined work when a hospital's AI assistant retrieves the "most similar" clinical note, or a hiring tool ranks resumes by proximity to a job description, or a legal research tool decides which precedent is "closest" to your case. The failures in these systems rarely look like obvious errors. They look like confident, plausible, wrong answers — because the vector that was nearest was never guaranteed to be the vector that was right.

What We're Actually Trusting

None of this means embeddings are a con. They are one of the more genuinely useful mathematical tricks to come out of machine learning, and the fact that "queen" shows up as the second-closest answer, not the fifth or the five-hundredth, is itself remarkable. But the gap between second-closest and first-place-if-you-don't-cheat is exactly the gap between what embeddings do and what we've told ourselves they do for over a decade. They compress the statistics of how humans have used words — biases, blind spots, historical accidents, and all — into geometry, and then we ask that geometry to stand in for judgment.

The honest version of the pitch is less thrilling than the equation on the slide: an embedding doesn't know that a queen is a king's counterpart. It knows that in millions of sentences, "queen" kept showing up where "king" might have been, with a few coordinates shifted. Whether that's close enough to call understanding is the question the industry keeps answering by default, one vector search at a time, rather than on purpose.

References