Artificial Intelligence · Chapter 7

High-Dimensional Vector Embeddings

How Meaning Becomes Geometry Inside a Thousand-Dimensional Space

To a digital processor, the ASCII characters spelling c-a-t and f-e-l-i-n-e share no more mathematical similarity than c-a-t and t-r-a-c-t-o-r. If words are stored as arbitrary integer identification numbers in a lookup table, a statistical model cannot transfer anything it learns about feeding a cat to a sentence about feeding a feline. For machine intelligence to generalize across language, images, audio, or biological sequences, discrete symbols must be converted into continuous coordinates where shared meaning corresponds to geometric proximity.

The theoretical key to that conversion came not from computer science, but from mid-century English linguistics. In a 1957 paper, British linguist John Rupert Firth observed that you do not need a dictionary definition to deduce what a word means if you can observe every sentence in which it appears alongside other words. Firth summarized this distributional hypothesis in his famous maxim that a word is known by the company it keeps across surrounding text.

In 2013, Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean at Google turned Firth's linguistic rule into a fast geometric algorithm called Word2Vec. They initialized every word in a vocabulary with a random vector of three hundred floating-point numbers. They then trained a shallow network on billions of words from news articles to predict surrounding context words within a sliding window. Whenever two words such as coffee and tea repeatedly appeared near context words like cup, pour, hot, and morning, gradient descent pulled their three-hundred-dimensional coordinate vectors closer together in cosine angle.

Vector v(King) Subtract v(Man) Royalty Axis Δr Royalty Axis Δr Add v(Woman) Nearest v(Queen)
FIG. 7.1 — Linear relational offset in embedding space where the gender vector maps King minus Man plus Woman to Queen.

When Mikolov and his colleagues inspected the resulting coordinate space, they discovered that the geometry encoded far more than simple synonym clusters. It organized abstract concepts along parallel linear directions. Subtracting the vector for Man from the vector for King isolated a displacement vector representing pure royalty. Adding the vector for Woman to that displacement landed closest in the entire vocabulary to the vector for Queen. The exact same linear vector arithmetic solved capital cities (v(Paris) - v(France) + v(Japan) ≈ v(Tokyo)) and verb tenses (v(Walking) - v(Walk) + v(Swim) ≈ v(Swimming)). Nobody had labeled gender, geography, or grammar in the training corpus; the geometry emerged purely from statistical co-occurrence.

Modern foundation models expand these static word coordinates into dynamic contextual embeddings spanning four thousand to sixteen thousand dimensions. As a token passes up through Transformer layers, self-attention shifts the vector for a polysemous word like bank toward either financial coordinates or river-shore coordinates depending on the surrounding clause. Multimodal systems project image patches, audio spectrograms, and text into the exact same embedding space, so a photo of a golden retriever lands next to the French phrase un chien doré.

High-dimensional spaces also obey a geometric rule that defies three-dimensional human intuition, a phenomenon interpretability researcher Chris Olah and his colleagues call superposition. By the Johnson-Lindenstrauss lemma of high-dimensional geometry, if you relax strict ninety-degree orthogonality by just one degree, the number of nearly perpendicular directions you can pack into an $n$-dimensional space grows exponentially with $n$. Because real-world concepts are sparse—rarely active all at the same moment—a hidden layer with four thousand neurons can store hundreds of thousands of distinct features as almost-orthogonal vectors without catastrophic interference. In three-dimensional room space you can place at most three mutually perpendicular axes at ninety degrees, but in a four-thousand-dimensional embedding space you can pack millions of directions that all sit between eighty-nine and ninety-one degrees apart.