← Latest papers
🤖 AI

Technical Manual for a Toolkit for Measuring Contextual Individuation in Transformer Language Models

This paper presents a technical manual for an open-source toolkit designed to measure how transformer language models individuate word senses across different contexts using "bridge forms," detailing the methodology, design choices, and failure modes of the pipeline without reporting empirical results.

Original authors: José Luciano Verçosa Marques, Frederico Jorge Heitmann, Daniel Omar Perez, Marcelo Vinicius de Paula, Tárcio André dos Santos Barros

Published 2026-09-07✓ Author reviewed
📖 7 min read🧠 Deep dive

Original authors: José Luciano Verçosa Marques, Frederico Jorge Heitmann, Daniel Omar Perez, Marcelo Vinicius de Paula, Tárcio André dos Santos Barros

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 by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

In the world of modern artificial intelligence, computers have learned to read and write by studying vast libraries of human text. For a long time, these machines understood words the way a dictionary might: as static entries with a single, fixed meaning. If a computer saw the word "bank," it would assign it one specific identity, regardless of whether the sentence was about a river or a financial institution. This approach worked well enough for basic tasks, but it missed a fundamental truth of human language: meaning is fluid. We understand a word not just by what it is, but by where it appears. A new generation of AI models, known as transformer language models, was built on the idea that they could capture this fluidity. They were designed to change their understanding of a word depending on the company it keeps in a sentence. But while these models are widely believed to be good at this, proving it cleanly has been difficult. Most evidence comes from watching how well the models perform on specific tests, which tells us they are useful, but not necessarily how they organize the words inside their own minds.

A team of researchers at the University of Campinas in Brazil has built a specialized toolkit to look directly inside these machines and see how they handle words with multiple meanings. They did not ask the computer to guess a definition or solve a puzzle. Instead, they created a controlled experiment to watch how the machine's internal representation of a word shifts as the context changes. Their work does not claim to have solved the mystery of how AI understands language, nor does it report a specific discovery about how a particular model behaves. Rather, it provides a rigorous, repeatable instrument, a set of tools and methods, that allows other scientists to ask this question with precision. The researchers have designed a method to fix the word itself and only change the world it appears in, creating a way to isolate the exact moment a machine separates one meaning from another, should such a separation exist.

The core of their method relies on a concept they call a "bridge form." Imagine a single word, like "current," which can mean the flow of electricity, a financial account, or the movement of ocean water. In a standard dictionary, these are three different definitions. In the researchers' experiment, they treat "current" as a single, unchanging object that travels through three different worlds. They gather sentences containing the word "current" from Wikipedia articles about physics, economics, and geography. Because the word is spelled exactly the same way in every sentence, the computer's initial understanding of it is identical. The researchers then feed these sentences into the AI model and watch what happens as the information travels deeper into the machine's layers.

The key insight is that if the model truly understands context, the internal picture of the word "current" should look different when it is surrounded by words about money compared to when it is surrounded by words about rivers. In the first few layers of the model, the word remains the same, just as it is in the dictionary. But as the information moves deeper, the researchers look to see if the "electricity" version of the word drifts away from the "money" version in the model's internal space. To measure this drift, they use a statistical tool that calculates how far apart groups of points are. If the points representing the physics sentences cluster tightly together and stay far away from the points representing the economics sentences, it would prove the model has successfully separated the meanings based on context.

The researchers designed their toolkit to avoid common traps that have misled previous studies. One major pitfall is looking at the final result of a model's processing and assuming that is the only place where meaning exists. Some earlier studies suggested that models might separate meanings in the middle layers and then bring them back together at the end. To catch this, the new toolkit checks every single layer of the model, not just the last one. Another potential error is trying to compare too many meanings at once. If a researcher tries to measure the separation between three or four different meanings simultaneously, the math can become distorted, making unrelated groups look closer or farther apart than they really are. The researchers solved this by comparing only two meanings at a time, ensuring that the measurement is clean and direct.

They also addressed the issue of how the computer sees the words. Modern AI does not read words as whole units; it breaks them down into smaller pieces. Sometimes, the same word can be split differently depending on where it appears in a sentence. To ensure they were measuring the right thing, the researchers used a precise method to locate the exact piece of the word they were interested in, matching it to the original text character by character. This guarantees that they are tracking the same word instance across all the different contexts, without any confusion caused by how the machine breaks the text apart.

The toolkit produces two types of visual evidence to help researchers understand the results. First, it creates a map of the word's position in the model's mind at the very beginning and at the very end. By using a shared frame of reference for these maps, researchers can see if the word has moved or stayed put. Second, it generates a graph that shows how the separation between meanings changes as the information moves through the layers of the model. This graph acts like a heartbeat monitor for the word's meaning, showing exactly where the model starts to distinguish between the different senses.

This work is significant because it offers a way to test the internal mechanics of AI without relying on the model's final output. Instead of asking, "Did the model get the right answer?", the researchers ask, "Did the model organize its own thoughts correctly?" The toolkit is designed to be used by anyone who wants to study how different types of AI models handle language. It works with various model architectures, from those that read text in both directions to those that read it only from left to right. By providing a standard way to measure this phenomenon, the researchers hope to enable a new wave of studies that can compare models fairly and understand the limits of their linguistic abilities.

The authors are careful to note that their toolkit documents an instrument, not a finding. They do not claim that their specific tests have revealed a universal truth about how all AI models work, nor do they present or interpret the empirical outcomes of running the toolkit on any specific model or word set. The results of running this toolkit depend on the specific model being tested and the specific words chosen. What the researchers have provided is an instrument, not a claim. They have built a bridge between the abstract idea of "contextual understanding" and a concrete, measurable reality. By holding the word constant and varying the world around it, they have created a clear window into how these complex machines learn to distinguish between the river and the bank.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →