Contribution Weights: A Geometrical Analysis of Self-Attention Transformers
This paper introduces "Contribution Weights," a projection-based metric that improves upon traditional attention weights by incorporating value vector geometry to more accurately identify semantically critical tokens and reveals that attention sinks actively suppress information to stabilize model representations.
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
The Big Problem: The "Loud Voice" vs. The "Real Impact"
Imagine a large group of people trying to decide on a final decision (the AI's output). In a standard Large Language Model (LLM), there is a mechanism called Self-Attention. You can think of this as a voting system where every person (token) in the conversation gets to shout out how much they want to influence the final decision.
For a long time, researchers thought that whoever shouted the loudest (had the highest attention weight) was the most important person. If a token got 90% of the "shout volume," everyone assumed it was doing 90% of the work.
The paper argues this is wrong.
The authors say that just because someone is shouting loudly doesn't mean they are actually moving the needle. Imagine a person shouting very loudly, but they are shouting in the wrong direction or they are holding a very light object. Even if they shout the loudest, they might actually be pulling the group in the opposite direction of where the group wants to go, or their contribution might be so weak it barely registers.
The New Solution: "Contribution Weights"
To fix this, the authors invented a new metric called Contribution Weights.
Think of it like this: Instead of just measuring how loud a person is shouting, Contribution Weights measure three things at once:
- Volume: How much attention did they get? (The shout).
- Strength: How heavy is the object they are holding? (The magnitude of the value vector).
- Direction: Are they pushing the group in the right direction, or are they pushing against the flow? (The directional alignment).
The Analogy of the Rowboat:
Imagine a team of people rowing a boat.
- Old Method (Attention Weights): You look at who is rowing the hardest (highest effort). You assume the hardest rower is the most important.
- New Method (Contribution Weights): You look at who is actually moving the boat forward.
- If Person A is rowing hard (high attention) but is rowing backwards (negative alignment), they are actually slowing the boat down.
- If Person B is rowing moderately but is rowing perfectly in sync with the boat's direction, they are doing the real work.
The paper shows that the "Contribution Weight" metric is much better at identifying who is actually helping the boat move forward.
The Big Discovery: The "Sink" Tokens
The paper focuses heavily on a weird phenomenon called Attention Sinks.
In many AI models, the very first token of a sentence (like a "Start" button or a special symbol) gets a massive amount of attention. It gets all the "shout volume." For years, researchers thought this token was just a passive sponge, soaking up all the extra attention so the other tokens could focus. They thought it was a "trash can" for attention.
The paper flips this story on its head.
Using their new "Contribution Weight" tool, the authors discovered that these "Sink" tokens are not passive sponges. They are active saboteurs (in a good way!).
- The Geometry: The first token is holding a very light object (low magnitude) and is facing the opposite direction of everyone else (negative alignment).
- The Effect: Because it is facing the opposite way, it acts like a brake. It cancels out the "noise" created by weak, confused signals from other parts of the sentence.
- The Result: Without this "brake," the boat would drift off course due to the accumulated noise of many small, weak rowers. The Sink token actively suppresses this drift to keep the boat stable.
The authors found that if you remove this "Sink" token, the boat (the AI) actually gets worse at making sense of the sentence, even though the Sink token seemed to be doing "nothing" according to the old metrics.
What They Tested
To prove their point, the authors did a "surgery" on the AI models:
- They took different models (like LLaMA, Mistral, etc.).
- They tried to remove the "most important" tokens based on the old method (Attention) and the new method (Contribution).
- The Result: When they removed tokens based on the old method, the AI's performance crashed immediately. When they removed tokens based on the new method, the AI kept working perfectly for much longer.
This proved that the new method correctly identified which tokens were actually doing the heavy lifting and which ones were just "loud" but useless.
Summary
- The Mistake: We used to think "Loud Attention = Important."
- The Fix: We now know "Important = Loud Attention + Strong Object + Correct Direction."
- The Surprise: The "Start" token, which gets all the attention, isn't just a passive placeholder. It's an active stabilizer that pushes against the noise to keep the AI's thinking clear.
The paper concludes that to truly understand how AI thinks, we can't just look at who is shouting the loudest; we have to look at the geometry of how they are pushing the conversation forward.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.