DMDIntel: Interpreting Large Language Models via Dynamic Mode Decomposition
This paper introduces DMDIntel, a novel interpretability framework that leverages dynamic mode decomposition to decompose LLM hidden states into prominent modes and rank input tokens, demonstrating superior performance over state-of-the-art attribution methods like PCA, integrated gradients, and SHAP across multiple datasets and model families.
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 watching a magician pull a rabbit out of a hat. You see the hat, you see the rabbit, but the magic happens in the split second between the two, hidden inside the magician's sleeves. For a long time, Artificial Intelligence (AI) has been that magician. We give it a sentence, and it gives us an answer, but nobody really knows how it decided that answer. The AI is a "black box," and scientists are desperate to peek inside to see which words the computer actually cared about. This field is called "interpretability." To understand the new paper, you first need to know two things: how AI reads text and how we usually try to peek inside.
AI models, specifically the ones called "Large Language Models" (LLMs), don't read words like we do. Instead, they turn every word into a long list of numbers (a vector) and pass them through a series of layers, like a relay race. At each layer, the numbers change slightly, mixing the meaning of the current word with the words that came before it. By the end of the race, the model has a final set of numbers that decide the answer. Usually, to figure out which words mattered, scientists use tools that look at the "static" state of the model—like taking a single photo of the relay race and guessing who was running the fastest. But this paper suggests that looking at a single photo misses the whole story. It argues that we should watch the movie of the race, looking at how the numbers evolve from one step to the next, because the secret to the AI's thinking is in that movement.
Enter DMDINTEL, a new method introduced by Amogh Joshi and his team from IIT Kharagpur and the University of Manchester. Think of the AI's internal processing not as a static list of numbers, but as a flowing river. As the AI reads a sentence, the "water" (the hidden information) ripples and changes shape with every new word. The researchers used a mathematical tool called Dynamic Mode Decomposition (DMD)—originally invented to study how water swirls in fluid mechanics—to map these ripples.
Here is how their "river" analogy works in practice: When the AI reads a sentence, the hidden states of the words create a complex, swirling pattern. DMDINTEL breaks this pattern down into a few simple, repeating "modes" or shapes, much like how a complex wave in the ocean can be described as a combination of a few basic wave shapes. The team found that by watching how these shapes grow, shrink, or oscillate as the AI reads the sentence, they could identify which words were the "drivers" of the final decision. They treated the AI as a dynamical system, meaning they looked at the change between one word and the next, rather than just the word itself.
The researchers tested this idea on three different families of AI models (Llama, Qwen, and Mistral) and three different tasks: figuring out if a review is positive or negative, spotting fake news, and detecting hateful speech. They compared their "river movie" method against the old "static photo" methods, which include techniques like Integrated Gradients, SHAP, and Principal Component Analysis (PCA).
The results suggest that DMDINTEL is a much better detective. In their experiments, the new method consistently found the most important words (the "ground truth") more often than the other methods. For example, when the AI was deciding if a review was negative, DMDINTEL correctly ranked words like "trash" and "unable" as the top drivers, whereas other methods sometimes got distracted by less important words like "scheduled" or "conference." The paper shows that by looking at the evolution of the AI's thoughts, DMDINTEL captures the logic of the sentence better. It suggests that the AI's reasoning isn't just about the words sitting still; it's about how the meaning flows and transforms as the sentence is built.
However, the authors are careful to note that this isn't a magic bullet for every AI problem. Their method works best when the AI is just reading a sentence and giving a simple answer (like a classification task). They admit that if the AI starts writing a long story or translating a whole book word-by-word, the math gets tricky because the AI starts feeding its own new words back into the system. But for the specific job of explaining why an AI labeled a sentence as "hate speech" or "fake news," this new way of watching the numbers dance suggests a clearer, more accurate picture of the machine's mind.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.