Contribution Weights: A Geometrical Analysis of Self-Attention Transformers

Harry Jake Cunningham, Nicola Muca Cirone
5/29/2026
cs.LGcs.AI
transformer-attention

No confident code implementation found for this paper.

Abstract

Analyzing attention weights has become a standard approach for interpreting the information flow of Large Language Models (LLMs). However, this approach has significant limitations as it neglects the geometric properties of the value vectors being aggregated.

Show full abstract

To address this gap, we introduce \emph{Contribution Weights}, a projection-based metric that quantifies a token's influence by accounting for it's attention weight, value magnitude, and directional alignment with the layer output. We demonstrate that contribution weights provide a more faithful measure of token importance, consistently outperforming attention-based metrics in identifying semantically critical tokens across different decoder-only models, tasks, and datasets. Further, our metric enables novel mechanistic analysis of \emph{attention sinks}. While previous work characterized sinks as passive repositories for excess attention, we reveal they serve an active functional role, suppressing information through a convex relationship between sink rate and output norm, stabilizing representations by opposing the semantic drift of low-confidence tokens.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{cunningham2026contribution,
  title  = {Contribution Weights: A Geometrical Analysis of Self-Attention Transformers},
  author = {Harry Jake Cunningham and Nicola Muca Cirone},
  year   = {2026},
  eprint = {2606.07604},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2606.07604v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2606.07604.svg)](https://codeofpaper.com/paper/2606.07604)

Discussion