IG-Lens: Exact Additive Probability Attribution Across Transformer Layers via Telescoping Integrated Gradients
This paper introduces IG-Lens, a novel method that achieves exact, additive probability attribution across transformer layers by applying telescoping Integrated Gradients along a single path, thereby overcoming the nonlinearity and bias limitations of existing logit-based or non-additive readout tools while ensuring completeness without discretization error.
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 a large language model (like the one powering this chat) as a multi-story factory where a raw idea enters at the bottom and a finished product (a predicted word) comes out at the top.
For a long time, researchers have tried to answer a simple question: "At exactly which floor of this factory does the decision to say 'Hanoi' actually get made?"
Existing tools have tried to answer this, but they've been like bad accountants:
- Some tools look at each floor and guess how "confident" the factory is, but their guesses don't add up to 100%. It's like saying Floor 1 is 40% sure, Floor 2 is 60% sure, and Floor 3 is 80% sure—totaling 180%, which makes no sense.
- Other tools look at the raw numbers (logits) before they are turned into percentages. But turning raw numbers into probabilities is like baking a cake; you can't just add up the flour and eggs separately and expect to get the weight of the finished cake. The "baking" (the math called softmax) changes everything.
- A third group of tools tries to measure the work done on each floor, but they measure each floor against a different starting point, so their numbers don't stack up to tell you the total work done.
Enter IG-Lens: The Perfect Accountant
The paper introduces IG-Lens, a new method that acts like a perfect accountant for this factory. It solves the problem by using a "telescoping" trick (think of a collapsible telescope that extends and retracts).
Here is how it works in simple terms:
1. The "One-Time Snapshot" Rule
Instead of letting the word travel all the way through the whole factory and getting mixed up with other words at every turn, IG-Lens takes a "snapshot" of the word's state at specific floors. It then asks: "If we took the state from Floor 10 and ran it through just the final 'finishing' machine (the part that turns raw data into a probability), what would the result be?"
2. The Telescoping Sum
IG-Lens breaks the journey into segments (e.g., Floor 10 to 11, 11 to 12, etc.).
- It calculates the probability of the word at Floor 10.
- It calculates the probability at Floor 11.
- The difference between them is the exact amount of work done on that specific segment.
- Because it measures the change at every step, when you add up all the changes from the bottom to the top, they perfectly equal the total change from start to finish. There is no missing math, no "baking error," and no rounding issues.
3. The "Prediction-Aware" Filter
Most methods look at how much the numbers wiggle (gradients) to guess importance. But sometimes numbers wiggle a lot without actually changing the final decision.
IG-Lens is smarter. It only credits a floor with work if the actual probability of the word changed. If the numbers wiggle but the prediction stays the same, IG-Lens ignores that wiggle. It's like a manager who only pays workers for the days they actually finished a task, not just for days they were busy moving boxes around.
Why This Matters (According to the Paper)
- It's Exact: Unlike previous tools that give you an approximation, IG-Lens guarantees that if you sum up the contributions of every layer, you get exactly the final probability. It's mathematically perfect (down to the limits of computer math).
- It Finds the "Onset": It can tell you the exact layer where the model "decided" on a word. For example, it might show that for the word "capital," the decision was mostly made by layer 12, but for "Hanoi," the decision happened much later, around layer 15 or 16.
- It's Honest About Limits: The paper admits a trade-off. Because IG-Lens looks at the "snapshot" of a word at a specific layer, it doesn't count the work that layer might do later as the word travels up to the top. It measures: "How much did this layer contribute to the final answer, given where we started?" rather than "What was the total effect of this layer on the whole system?"
The Bottom Line
IG-Lens is a new way to look inside AI models that finally answers the question, "When did the model decide?" with a mathematically perfect "receipt" that adds up to 100%. It doesn't guess; it calculates the exact change in probability layer by layer, filtering out the noise to show you exactly where the decision happened.
The authors plan to test this by "breaking" the model at the layers IG-Lens identifies to see if the model actually stops working correctly there, which would prove the method is finding the real decision points.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.