Divergent large language model predictions from convergent representations in ambiguous word pairs
This study reveals that decoder-only transformers resolve lexical ambiguity by initially diverging and then partially reconverging their internal representations in late layers, creating a disconnect where semantic distinctions persist to drive distinct predictions despite becoming invisible to standard embedding similarity measures.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are trying to understand how a giant, digital brain learns to read. This brain is called a Large Language Model (LLM), and it's the technology behind the chatbots and smart assistants we use every day. To make sense of the world, these models don't just memorize words; they turn every word into a mathematical "fingerprint" called an embedding. Think of this fingerprint as a coordinate in a massive, multi-dimensional map. If two words mean similar things, their coordinates are supposed to be close together, like neighbors in a city. If they mean different things, they should be far apart.
For years, scientists have trusted this map. They believed that if you looked at the final fingerprint a model created for a word, you could tell exactly what the model thought that word meant. This idea is the backbone of many tools we use today, like search engines that find documents or apps that group similar ideas together. But there's a catch: language is tricky. Some words, like "bank," can mean a place to keep money or the side of a river. These are called ambiguous words. The big question researchers have been asking is: Does the model's final fingerprint actually show the difference between these two meanings, or does the map get blurry and confusing right at the end?
This paper takes a deep dive into that mystery by watching how three different AI models—one small, one medium, and one very large—process ambiguous words layer by layer. The researchers discovered something surprising and counterintuitive. As the models process a word like "bank," the mathematical distance between the "river" meaning and the "money" meaning actually grows wider in the middle of the network, only to shrink back together again in the final layers. It's as if the model's internal map temporarily separates the two meanings, then decides to put them back in the same neighborhood just before it speaks.
However, here is the twist: even though the final fingerprints look very similar (almost like they are back in the same neighborhood), the model's predictions are completely different. When the model is asked to guess the next word, it knows exactly which "bank" is being talked about. The study shows that the final layer holds the secret to the meaning, but it hides it in a way that standard measuring tools (like simple distance checks) can't see. The model isn't confused; it's just using a secret code in its final layer that looks like similarity but acts like difference. This suggests that relying only on the final "fingerprint" to understand what an AI thinks might be misleading, because the most important distinctions are happening in a way that looks like they've vanished, even though they are still driving the model's behavior.
The Story of the Shifting Map
To understand how this works, imagine the AI model as a team of 64 detectives (for the largest model, Qwen2.5) passing a secret note down a long line. Each detective represents a "layer" of the model. When the note says "bank," the first few detectives are just looking at the shape of the word. They don't know if it's a river or a bank yet, so their notes look almost identical.
As the note moves to the middle detectives, something magical happens. These detectives start paying attention to the context—the words before and after "bank." One detective sees "river" nearby and marks the note with a big red dot. Another sees "money" and marks it with a blue star. At this middle stage, the notes for the two meanings are as different as night and day. If you were to measure the distance between them here, they would be far apart.
But then, the note reaches the final detectives. Here is where the plot thickens. The final detectives take those distinct red dots and blue stars and fold them back into a very similar-looking note. If you were to measure the distance between the final notes for "river bank" and "money bank," they would look almost identical again. It's as if the detectives decided, "Let's make our final report look the same so we don't confuse the boss."
However, the boss (the model's output) isn't fooled. Even though the final notes look the same, the detectives have secretly encoded the difference in a way that changes the final answer. When the model predicts the next word, it doesn't say "river" for the money context, even though the final note looks like it belongs to the river.
The researchers proved this by playing a game of "switcheroo." They took the final note from the "river" context and swapped it into the "money" context. When they did this, the model completely changed its mind and started predicting words related to the river. This proved that the final layer does hold the difference, even if it looks like the two meanings have merged back together. The difference is still there, but it's hidden in the instructions for the next step, not in the shape of the note itself.
Why the Map is Misleading
This finding is a bit like a magician's trick. If you only look at the magician's hands at the end of the trick, they look empty and identical. But if you watched the whole performance, you'd see the magician was juggling two different balls the entire time. The researchers found that for ambiguous words, the "juggling" happens in the middle layers, where the meanings are clearly separated. But by the time the trick is over, the balls are hidden again, and the hands look the same.
The paper tested this on three different models: a small one called GPT-2 (117 million parameters), a medium one called Llama-3.2 (3 billion parameters), and a large one called Qwen2.5 (32 billion parameters). Despite their different sizes and architectures, they all did the same thing. They separated the meanings in the middle, then brought them back together at the end, while still knowing exactly which meaning to use.
The researchers also checked if this was just a fluke caused by the position of the words in the sentence. They swapped the order of words in sentences (like changing "The cat chased the mouse" to "The mouse chased the cat") and found that the model's behavior was still driven by the meaning, not just the word order. This confirmed that the model was truly understanding the ambiguity.
What This Means for the Future
The big takeaway is that we might have been looking at the wrong part of the map. For a long time, people have assumed that if two things look similar in the final layer of an AI, they mean the same thing. This paper suggests that's not always true. The final layer might look like a crowded room where everyone is standing close together, but if you listen to what they are saying (their predictions), you'll realize they are actually arguing about completely different topics.
This doesn't mean the AI is broken. It just means that the way it stores information is more complex than a simple distance chart. The researchers suggest that if we want to build better tools for searching or organizing information, we might need to look at the middle layers where the meanings are clearly separated, or we need to listen to what the model predicts rather than just measuring how close its fingerprints are.
The study didn't find a magic fix or a new way to build models, but it did solve a puzzle about how these models think. It showed that the "magic" of disambiguation isn't lost in the final layer; it's just hidden in plain sight, waiting for us to look at the right clues. The researchers are confident in these results because they used multiple models and different types of ambiguous words, and the pattern held up every time. It's a reminder that in the world of AI, things aren't always what they seem, and sometimes the most important differences are the ones you can't see with a ruler.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.