betaFeedback

WorksComputer Science

Why don't Graph Transformers attend to the same token?

Abstract

In large language models (LLMs), attention concentrates heavily on the first token. This 'attention sink' is believed to protect deep models against over-mixing. Even though graph transformers face a related pressure, we find that a SoTA graph transformer, GRIT, rarely forms sinks on molecules, and that it sinks less when trained on larger graphs, the opposite of the trend in LLMs. In principle, a graph can prevent sinks: we prove and show empirically that its symmetry and locality limit the attention any node can receive. On molecules, however, with distinguishable atoms and global attention, neither limit prevents sinks; what stops them lies in the model. We find that the attention scoring function is the main cause. Replacing GRIT's gated logit with a dot product raises its sink rate from 0.09 to 0.68 on identical graphs. In Graph Transformers using dot-product attention, removing the sink gives about the same error as removing a random node, while GRIT's most-attended nodes matter to its predictions. Attention sinks are therefore a property of dot-product attention rather than of Transformers. In our experiments, they form when dot-product scoring has a distinguishable node to concentrate on.

Introduction

A striking empirical property of Large Language Models (LLMs) is the attention sink ((Xiao et al., 2024)). In Transformers, an attention sink is a token that receives a large share of all attention: in Llama 3.1 405B, nearly 80% of attention heads sink on the semantically meaningless <BOS> token (sink metric of Gu et al., [12] at threshold ε=0.8\varepsilon= 0.8; Barbero et al., [2]). Far from wasting compute, sinks are thought to slow the mixing of information between tokens and so protect deep models against ‘over-mixing’ (Dong et al., [9]; Barbero et al., [1]; Di Giovanni et al., [8]; Barbero et al., [2]), and larger models and longer training contexts both bring stronger sinks (Barbero et al., [2]).

Graph Transformers face a related pressure: depth causes over-smoothing (Zhang et al., 2024), and global attention makes it worse, since softmax over ever more nodes must disperse toward uniform mixing (Veličković et al., 2025). A designated sink node might be a natural defence, yet nothing in an ordinary graph plays the role of <BOS>: a graph has no first token, and permutation equivariance forbids preferring one of two nodes the model cannot tell apart. Sinks are documented beyond causally masked LLMs, in bidirectional diffusion language models (Rulli et al., 2025), as massive activations in attentional GNNs (Bini et al., [5]), and when LLMs read serialised graphs (Guan et al., [13]); concurrent work argues that graphs lack natural sinks (Liu et al., [15]). What is missing is an account of where a sink can form on a graph at all, and of which architectural ingredient decides whether one does.

We ask whether Graph Transformers form attention sinks and, if not, what prevents them. We study GRIT (Ma et al., [16]), a state-of-the-art Graph Transformer without message passing, so attention alone mixes information between nodes. We find that GRIT rarely forms sinks on molecules, and sinks even less when trained on larger graphs (§ 2), but that swapping in dot-product attention makes it sink far more often (§ 4). We investigate two suspects. The graph itself is not the barrier: we prove three bounds on received attention, from symmetry, locality, and the spread of attention scores, and find both graph-side bounds loose on real molecules (Section 3). The attention scoring function is the main cause, as the logit swap of Figure 1 and accuracy-matched controls show (§ 4).

Figure 1. Changing only the scoring function creates a sink. Each atom of a 23-atom ZINC test molecule is shaded by the attention it receives, averaged over queries and heads at each model’s peak-sinking layer: blue below the uniform share 1/23, red above. Swapping only GRIT’s gated logit for a dot product (middle) moves attention off the other atoms and onto one, as in GraphGPS (right).

GRIT rarely forms attention sinks on molecules

Graph structure enters GRIT ([16]) through Relative Random Walk Probabilities (RRWP), which initialise a learned pair representation. GRIT scores a pair by gating the sum of query and key with that representation, passing it through a signed square root, and clipping it to [0,5][0, 5] before a scalar readout; dot-product attention instead takes the inner product of query and key, which can grow with the product of the two node norms:

zujGRIT=aTmin⁡{5,ReLU⁡(ssq⁡((qu+kj)⊙wuj)+buj)},zujdot=quTkjh,(1)z^{\mathrm{GRIT}}_{uj} = \mathbf{a}^{\mathsf{T}} \min\left\{5,\operatorname{ReLU}\left(\operatorname{ssq}\left((\mathbf{q}_u+\mathbf{k}_j)\odot\mathbf{w}_{uj}\right)+b_{uj}\right)\right\}, \qquad z^{\mathrm{dot}}_{uj} = \frac{\mathbf{q}_u^{\mathsf{T}}\mathbf{k}_j}{\sqrt{h}}, \tag*{(1)}

with ssq⁡(x)=sgn⁡(x)∣x∣\operatorname{ssq}(x)=\operatorname{sgn}(x)\sqrt{\lvert x\rvert}, wuj,bujw_{uj}, b_{uj} linear in the pair representation, and hh the head dimension. Clipping the scalar logit instead, as the official code does, gives the same sink rate (Appendix § 9). We compare against GraphGPS ([23]) with RWSE ([10]), a hybrid of message passing and dot-product attention. We train on ZINC-12k, a regression task on graphs of roughly 23 nodes, and on Peptides-func ([11]), a classification task on larger graphs, both whole and split by node count into four quartiles (mean sizes 56 to 245), each trained on 2,023 graphs at batch size 16 to remove the dataset-size confound. Our results are means with a 95% CI on the full test set over three seeds (five for GraphGPS and the quartiles).

Our central measurement is the sink score of a node, the attention it receives averaged over all queries ([2, 12]). Following Gu et al. [12], a node is a sink in a head when its sink score exceeds ϵ=0.3\epsilon=0.3, about seven times the uniform share on a 23-node graph. The sink rate is the largest fraction of heads that share one sink node, averaged over test graphs, at the peak-sinking layer.

On ZINC, GRIT’s sink rate is 0.090±0.0280.090\pm0.028: fewer than one head in ten sinks on the same node, against 0.415±0.1940.415\pm0.194 for GraphGPS and 0.950.95–1.001.00 for small language models at the same context length. GRIT stays below GraphGPS at every threshold from 0.1 to 0.8 (Appendix § 9). The trend with size also runs backwards. Language models trained on longer contexts form stronger sinks ([2]), whereas GRIT’s sink rate falls from 0.238 on the smallest Peptides-func quartile to 0.045 on the largest. As in language models, where sink tokens develop unusually large norms ([21]), GRIT’s largest squared node norm grows across layers from 2.4 to 4.8 times the squared mean norm. Nonetheless, sinks stay rare, so something in GRIT keeps large norms from attracting attention (§ 4).

What can prevent a sink

Three things can prevent a node from accumulating attention from many others at once: symmetry, since an equivariant model must treat nodes the labelled graph does not distinguish alike; locality, since nodes that attend mostly to their neighbourhood leave little attention for distant ones; and scoring range, since softmax concentrates only when logits spread far apart.

Notation. We write A∈Rn×nA \in\mathbb{R}^{n \times n} for the attention matrix of a single layer and head, with logits zuvz_{uv}, and define the sink score as sj(A)=1n∑uAujs_j(A) = \frac{1}{n}\sum_u A_{uj}. We assume permutation equivariance, i.e. A(PZ)=PA(Z)PTA(PZ) = PA(Z)P^{\mathsf{T}} for every permutation matrix PP and input ZZ containing the graph, node features and positional encodings. Let O(j)\mathcal{O}(j) be the orbit of jj under the automorphisms of ZZ (the nodes equivariant models must treat like jj), BG(j,r)B_G(j,r) the ball of radius rr around jj in shortest-path distance dGd_G, λr(A)=max⁡u∑v:dG(u,v)>rAuv\lambda_r(A) = \max_u\sum_{v:d_G(u,v)>r} A_{uv} the largest attention any query sends beyond distance rr, and Δ=max⁡u(max⁡vzuv−min⁡vzuv)\Delta= \max_u(\max_v z_{uv} - \min_v z_{uv}) the largest logit spread of any query.

Proposition 3.1 (Three bounds on received attention) Under the setup above, for every node jj and every radius rr,

sj(A)≤min⁡{1∣O(j)∣, λr(A)+(1−λr(A))∣BG(j,r)∣n, eΔeΔ+n−1}.s_j(A) \le\min\left\{\frac{1}{|\mathcal{O}(j)|},\ \lambda_r(A) + (1-\lambda_r(A))\frac{|B_G(j,r)|}{n},\ \frac{e^\Delta}{e^\Delta+n-1}\right\}.

In particular, on a vertex-transitive labelled input sj(A)=1/ns_j(A) = 1/n for every node, independently of the learned parameters, and reaching received attention ε\varepsilon requires Δ≥log⁡((n−1)ε/(1−ε))\Delta\ge\log\left((n-1)\varepsilon/(1-\varepsilon)\right).

The orbit term is the standard fact that equivariant maps are constant on orbits [19]. What we add is that every bound can be computed head by head, so we can test whether any bound is tight enough to prevent the formation of a sink (Appendix § 8). The symmetry bound is tight on symmetric graphs: every checkpoint with an equivariant positional encoding, even the dot-product models that sink heavily on molecules, spreads attention evenly across cycles of identical atoms and bonds (C8C_8 to C24C_{24}; Appendix § 8). Symmetry alone prevents the sink, whatever the architecture. Conversely, Laplacian encodings, whose eigenvector signs and bases are arbitrary [14], break equivariance, and a dot-product Transformer then puts almost all attention (0.999) on one node.

On real molecules, neither graph-side bound is tight: atoms rarely have symmetric counterparts, attention is nonlocal (median λ1≥0.91\lambda_1 \ge0.91), and the bounds rule out a sink in at most 5.1% of heads in any run. The third bound, on the spread of attention scores, does differ between architectures: GRIT clips its score elementwise, so their spread never exceeds 5∥a∥15\lVert a\rVert_1, whereas dot-product scores can grow without limit with the attended node’s norm (Proposition A.1). Yet this cap does not explain why GRIT rarely sinks: in our trained models, 5∥a∥15\lVert a\rVert_1 ranges from 2.7 to 11.7 across layers, above the spread of 2.2 a sink needs at ZINC size, and removing the clip leaves GRIT’s sink rate low (§ 4). The graph thus leaves GRIT and GraphGPS equally free to sink on the same molecules, yet their sink rates differ more than four-fold: the models themselves must decide.

The attention scoring function drives the gap

On identical ZINC graphs, GraphGPS and GRIT differ in heads, positional encoding, dropout, and message passing as well as in scoring, so we change one component at a time (Table 1). Replacing only GRIT’s logit with zdotz^{\mathrm{dot}} (labelled GRIT-dotlogit), leaving RRWP, the pair representation and the values unchanged, raises its sink rate from 0.090±0.0280.090 \pm0.028 to 0.680±0.0980.680 \pm0.098 (Figure 1), above GraphGPS’s. Removing message passing from GraphGPS does not lower its sink rate either (0.507±0.1590.507 \pm0.159). Message passing is therefore not what suppresses sinks; the scoring function is.

ArmSink rateTest MAEAblation ratio
GRIT (gated scoring, RRWP)0.090±0.0280.090 \pm0.0280.064±0.0090.064 \pm0.0092.06±0.792.06 \pm0.79
GRIT-dotlogit (dot-product logit only)0.680±0.0980.680 \pm0.0980.373±0.2240.373 \pm0.2241.22±0.431.22 \pm0.43
GRIT-blind (gated scoring, no structure)0.214±0.1430.214 \pm0.1430.542±0.0180.542 \pm0.0181.17±0.071.17 \pm0.07
GRIT-dot (dot-product scoring, no structure)0.532±0.0610.532 \pm0.0610.543±0.0060.543 \pm0.0061.15±0.121.15 \pm0.12
GRIT-dotbias (GRIT-dot + pair bias)0.521±0.0590.521 \pm0.0590.268±0.0680.268 \pm0.0681.19±0.191.19 \pm0.19
GraphGPS (GINE + dot attention)0.415±0.1940.415 \pm0.1940.072±0.0050.072 \pm0.0051.01±0.021.01 \pm0.02
GraphGPS-none (MPNN removed)0.507±0.1590.507 \pm0.1590.200±0.0170.200 \pm0.0171.11±0.091.11 \pm0.09
GraphGPS + virtual node0.559±0.1770.559 \pm0.1770.066±0.0150.066 \pm0.0151.00±0.021.00 \pm0.02
GRIT + virtual node0.095±0.0190.095 \pm0.0190.065±0.0080.065 \pm0.0081.93±1.191.93 \pm1.19

Table 1. Changing each component individually on ZINC (mean ±\pm 95% CI; all arms in Table 3). Ablation ratio: test MAE after removing all attention onto the most-attended node, divided by that for a random node.

The swap also slows training (test MAE 0.064 to 0.373), but two controls at matched accuracy show that this is not why it sinks. Without any graph structure (RRWP and bond types), GRIT’s score and a dot product reach the same accuracy (test MAE 0.542 and 0.543, labelled GRIT-bind and GRIT-dot) yet sink at rates of 0.214 and 0.532. Likewise, GraphGPS with a virtual node matches GRIT’s accuracy (0.066) yet sinks six times as often (0.559). Adding node RRWP and a bounded pair bias to GRIT-dot (labelled GRIT-dotbias) recovers over half the lost accuracy (test MAE 0.268) but leaves its sink rate unchanged (0.521). Sink formation tracks mainly the form of the score; accuracy tracks access to graph structure. Even a loss that rewards concentrated attention lifts GRIT’s sink rate only to 0.131.

Why large norms do not attract attention in GRIT. A dot-product logit grows linearly with the attended node’s hidden state, so a node with a large enough norm can claim almost all of a query’s attention (Proposition A.1). GRIT’s score instead saturates: in layers 2 to 10, at least 96% of its coordinates sit at 0 or 5, so the logit is a sum of readout weights selected by which coordinates fire, not by input magnitude. Scaling up one node’s hidden state confirms this (Table 4): doubling it makes it a sink in up to 38.8% of heads in GRIT-dotlogit but at most 0.2% in GRIT, and even a 32-fold increase reaches only 1.3%. Removing the clip (GRIT-noclamp) changes little: the model still sinks rarely (0.113), and a doubled norm makes a sink in at most 1.4% of heads, but an extreme 32×32 \times norm increase does in up to 54.0%. GRIT thus grows high-norm nodes without attending to them.

GRITGRIT-noclampGRIT-officialGRIT-dotlogitGRIT-dotGraphGPS
ρ=2\rho= 20.21.40.438.834.111.5
ρ=8\rho= 80.316.25.862.048.126.2
ρ=32\rho= 321.354.019.466.951.932.1

Table 4. % of heads in which one node, whose input is scaled by ρ\rho, becomes a sink (max over layers).

Giving the model a token to sink on. A virtual node is the graph counterpart of <BOS>: chemically empty, connected to every node, akin to vision-transformer registers (Darcet et al., [7]), and exempt from the symmetry bound, since no automorphism can move it. On the symmetric cycles of Section 3, where no real node may stand out, GraphGPS sends all of its attention to the virtual node, GRIT only about half to two-thirds on average, and inconsistently across seeds. On molecules, a virtual node leaves GRIT’s sink rate low (0.095±0.0190.095 \pm0.019), even with a logit penalty toward it (0.079±0.0270.079 \pm0.027). GraphGPS with a virtual node usually sinks onto an atom rather than onto the virtual node, and the sink’s value vector is about a tenth of the mean norm. Symmetry says where a sink may appear; the scoring function decides whether one does.

The ablation column of Table 1 shows what these sinks are worth: removing all attention to the most-attended node leaves the dot-product models’ test MAE close to that for a random node (1.00 to 1.22 times), but GRIT’s twice as high (2.06). In dot-product models the sink is thus close to a no-op, as in LLMs (Barbero et al., [2]), whereas GRIT’s most-attended nodes matter to its predictions.

Discussion

Graph Transformers based on GRIT largely do not form attention sinks on molecules, and the graph is not the reason: symmetry forbids sinks only on inputs far more regular than a molecule, and the attention we measure is too nonlocal for locality to matter. What matters most is the scoring function: GRIT’s logit barely responds to a node’s norm, and on molecules even a virtual node does not make it sink. The LLM sink therefore looks like a property of dot-product attention rather than of Transformers, consistent with sinks vanishing without softmax normalisation (Gu et al., [12]) or under an output gate (Qiu et al., [20]). Read as attentional networks over a complete graph (Bronstein et al., [6]), Transformers differ from GRIT in two ways, a first token and a dot-product score, and our experiments separate the two: on molecules, dot-product scoring sinks with or without a designated token, while GRIT’s gated scoring rarely sinks in either case. Whether sinks protect Graph Transformers against over-mixing remains open: our 10-layer models show little over-smoothing to prevent (Appendix § 9).

Our study has limits: one gated-score architecture against dot-product baselines, on molecular graphs alone, at 10 layers; several GRIT virtual-node quantities remain seed-dependent; and we measure reception rather than mixing, since a perfect sink can also be a complete mixer. Further architectures (EGT, Graphormer, SAN; Yuan et al., 2026) and non-molecular graphs come next.

Acknowledgments

I would like to thank Professor Michael Bronstein for his class on Geometric Deep Learning at the University of Oxford, where this research on Graph Transformers started as a course project.

The author acknowledges the use of resources provided by the Isambard-AI National AI Research Resource (AIRR) ([17]). Isambard-AI is operated by the University of Bristol and is funded by the UK Government’s Department for Business, Innovation, Science and Trade (DBIST) via UK Research and Innovation; and the Science and Technology Facilities Council [ST/AIRR/I-A-I/1023].

Proofs and supporting theory

Proof of Proposition 3.1

Proof. Orbit term. For an automorphism PP of the labelled input, PZ=ZPZ = Z and equivariance give A(Z)=PA(Z)P⊤A(Z) = PA(Z)P^{\top}, so with s(A)=1nA⊤1s(A) = \frac{1}{n}A^{\top}\mathbf{1} and P⊤1=1P^{\top}\mathbf{1} = \mathbf{1} we get Ps(A)=s(A)Ps(A) = s(A): the sink score is constant on every orbit. Row-stochasticity gives ∑jsj(A)=1\sum_j s_j(A) = 1, so an orbit of size mm has sj(A)≤1/ms_j(A) \le1/m, and a vertex-transitive input is one orbit of size nn, forcing sj(A)=1/ns_j(A) = 1/n.

Locality term. For u∈BG(j,r)u \in B_G(j,r), row-stochasticity gives Auj≤1A_{uj} \le1; for u∉BG(j,r)u \notin B_G(j,r), dG(u,j)>rd_G(u,j) > r gives Auj≤∑v:dG(u,v)>rAuv=ℓu(r)≤λr(A)A_{uj} \le\sum_{v:d_G(u,v)>r} A_{uv} = \ell_u^{(r)} \le\lambda_r(A). Therefore

sj(A)≤∣BG(j,r)∣+∑u∉BG(j,r)ℓu(r)n≤λr(A)+(1−λr(A))∣BG(j,r)∣n,s_j(A) \le\frac{|B_G(j,r)|+\sum_{u\notin B_G(j,r)}\ell_u^{(r)}}{n} \le\lambda_r(A) + (1-\lambda_r(A))\frac{|B_G(j,r)|}{n},

where the first inequality is the per-node form evaluated in the certificate of Appendix § 8.

Range term. Fix a query uu. For v≠jv \ne j the definition of Δ\Delta gives zuv≥zuj−Δz_{uv} \ge z_{uj}-\Delta, so Auj=ezuj∑vezuv≤ezujezuj+(n−1)ezuj−Δ=eΔeΔ+n−1A_{uj} = \frac{e^{z_{uj}}}{\sum_v e^{z_{uv}}} \le\frac{e^{z_{uj}}}{e^{z_{uj}}+(n-1)e^{z_{uj}-\Delta}} = \frac{e^\Delta}{e^\Delta+n-1}. Averaging over uu gives the same bound for sj(A)s_j(A), and eΔeΔ+n−1≥ε\frac{e^\Delta}{e^\Delta+n-1} \ge\varepsilon gives Δ≥log⁡((n−1)ε/(1−ε))\Delta\ge\log((n-1)\varepsilon/(1-\varepsilon)). Taking the minimum of the three bounds proves the proposition.

Score spread

Proposition A.1 (Bounded and unbounded score spread). For the GRIT score (1), write e^uj∈[0,5]h\widehat{e}_{uj} \in[0,5]^h for the clipped vector that a readout; hence 5∑i:ai<0ai≤zuj≤5∑i:ai>0ai5\sum_{i:a_i<0} a_i \le z_{uj} \le5\sum_{i:a_i>0} a_i and Δ≤5∥a∥1\Delta\le5\lVert a\rVert_1 whatever the node features, with the constant sharp over the box [0,5]h[0,5]^h. For dot-product scoring no such bound exists: if xjx_j is the input state of node jj and ⟨qu,WKxj⟩≠0\langle q_u,W_Kx_j\rangle\ne0 for some u≠ju \ne j, replacing xjx_j by ρxj\rho x_j makes Δ\Delta grow without bound in ρ\rho, and a bounded edge-bias term cannot restore a bound.

Proof. The clip and rectifier confine each coordinate to [0,5][0,5], and a linear functional on that box is extremised at the two sign-selected corners, whose difference is 5∑i∣ai∣5\sum_i |a_i|. For the dot product and u≠ju \ne j, only kj(ρ)=ρWKxj+bKk_j(\rho)=\rho W_K x_j+b_K moves, so zujz_{uj} is affine in ρ\rho with nonzero slope while the rest of row uu is fixed, and Δ\Delta is at least the gap between two entries of that row. □

At ε=0.3\varepsilon=0.3 a sink needs a spread of 2.24 at n=23n=23 and 4.74 at n=269n=269, against 5∥a∥1=2.745\lVert a\rVert_1=2.74 to 11.69 across the ZINC layers, so the bound is loose (Section 3).

Reception is not mixing. A sink score does not determine how much a layer mixes, the distinction that spectral and Dobrushin-type analyses of over-smoothing and attention propagation turn on [3] (Wu et al. 2023). With κ(A)=12max⁡u,t∥Au:−At:∥1\kappa(A)=\frac{1}{2}\max_{u,t}\lVert A_{u:}-A_{t:}\rVert_1 the Dobrushin coefficient, diam⁡(AY)≤κ(A)diam⁡(Y)\operatorname{diam}(AY)\le\kappa(A)\operatorname{diam}(Y) for any features YY. The identity InI_n and the uniform matrix Un=1n11⊤U_n=\frac{1}{n}\mathbf{1}\mathbf{1}^{\top} share the flat profile s=1/ns=1/n yet have κ(In)=1\kappa(I_n)=1 and κ(Un)=0\kappa(U_n)=0, while a perfect sink 1ev⊤\mathbf{1}e_v^{\top} has the maximal profile s=evs=e_v, yet κ=0\kappa=0. We therefore measure mixing separately (Appendix § 9).

Experimental details

ModelDatasetDimHeadsLayersMPNNPELREpochsBatch
GRITPeptides9644–RRWP-173e-41508
GRITZINC64810–RRWP-211e-3200032
GraphGPSZINC64410GINERWSE-281e-3150032

Table 2. Experimental hyperparameters. Peptides-func graphs are capped at 300 nodes to limit memory usage, and each quartile model is trained on 2,023 graphs of its quartile at batch size 16. All models are trained with AdamW, linear warmup, cosine annealing, and gradient clipping on a single GPU. Every other arm inherits its base model’s configuration, changing only the named component.

Arms. GRIT-dotlogit replaces zGRITz^{\mathrm{GRIT}} by zdotz^{\mathrm{dot}} in Eq. (1) and keeps everything else, including RRWP, the pair representation and the values; GRIT-noclamp removes the clip. Like the official code, GRIT-official clips the scalar logit to [−5,5][-5,5] rather than each coordinate; unlike that code, all our GRIT arms use one readout aa for every head. GRIT-blind removes node and pair RRWP and bond types; GRIT-dot is GRIT-blind with zdotz^{\mathrm{dot}} and no pair representation; GRIT-dotbias adds to GRIT-dot node RRWP and a bounded pair bias a⊤clip⁡(Weuj)a^{\top}\operatorname{clip}(W e_{uj}) in the logit. GRIT-entropy-1/2 add an attention-entropy penalty of two strengths. Virtual-node arms join one node to every atom, with the positional encoding padded or recomputed (PE rec.); GRIT + virtual node + bias adds a learned logit penalty toward it. GraphGPS-none removes the MPNN, GraphGPS-GatedGCN replaces it, and Transformer + LapPE is GraphGPS-none with sign-ambiguous Laplacian encodings (8 eigenvectors). Seeds are fixed per run, we report seed-controlled runs only, and checkpoints are best-validation.

Interventions. Sink ablation: on 500 test graphs, the most-attended node (head-averaged received attention summed over layers) has its attention column zeroed in every layer, removing that mass (Table 1) or renormalising the rows (Table 3); the control ablates a uniformly random node. Norm intervention: at layer ℓ∈{3,5,8}\ell\in\{3,5,8\} the input state of one uniformly chosen real node is multiplied by ρ\rho before that layer’s attention, on 200 test graphs, and we read that layer’s attention only. Language models: Pythia-70M/160M [4] and GPT-2 small [22] on 200 non-overlapping WikiText-2 test windows [18] of TT tokens without a BOS token, with the same sink-rate estimator.

ArmSink rateTest MAEnmax⁡jsjn\max_j s_jAbl. removedAbl. renorm.
GRIT0.090 ± 0.0280.064 ± 0.0092.6 ± 0.52.06 ± 0.791.35 ± 0.62
GRIT-dotlogit0.680 ± 0.0980.373 ± 0.22413.1 ± 3.11.22 ± 0.431.23 ± 0.46
GRIT-noclamp0.113 ± 0.0390.063 ± 0.0183.0 ± 0.21.91 ± 1.221.37 ± 0.24
GRIT-official0.084 ± 0.0370.059 ± 0.0062.5 ± 1.41.83 ± 1.141.55 ± 0.48
GRIT-blind0.214 ± 0.1430.542 ± 0.0183.6 ± 2.01.17 ± 0.071.25 ± 0.17
GRIT-dot0.532 ± 0.0610.543 ± 0.0069.4 ± 1.01.15 ± 0.121.14 ± 0.11
GRIT-dotbias0.521 ± 0.0590.268 ± 0.0689.7 ± 4.01.19 ± 0.191.20 ± 0.23
GRIT-entropy-10.131 ± 0.0270.082 ± 0.0363.4 ± 0.31.83 ± 0.481.51 ± 0.65
GRIT-entropy-20.127 ± 0.0310.089 ± 0.0103.3 ± 0.31.71 ± 0.641.41 ± 0.37
GRIT + virtual node0.095 ± 0.0190.065 ± 0.0082.7 ± 0.21.93 ± 1.191.61 ± 0.18
GRIT + virtual node + bias0.079 ± 0.0270.066 ± 0.0082.7 ± 0.42.13 ± 0.871.54 ± 0.50
GRIT + virtual node (PE rec.)0.161 ± 0.0390.177 ± 0.0343.0 ± 0.71.44 ± 0.311.47 ± 0.39
GraphGPS (GINE)0.415 ± 0.1940.072 ± 0.0056.9 ± 2.21.01 ± 0.021.00 ± 0.01
GraphGPS-GatedGCN0.410 ± 0.1190.072 ± 0.0076.0 ± 1.11.02 ± 0.021.00 ± 0.06
GraphGPS-none0.507 ± 0.1590.200 ± 0.0178.3 ± 3.31.11 ± 0.092.03 ± 2.08
Transformer + LapPE0.511 ± 0.2470.661 ± 0.0387.8 ± 3.11.00 ± 0.031.03 ± 0.07
GraphGPS + virtual node0.559 ± 0.1770.066 ± 0.0158.8 ± 1.91.00 ± 0.021.00 ± 0.02
GraphGPS + virtual node (PE rec.)0.629 ± 0.1990.086 ± 0.0099.5 ± 2.21.01 ± 0.031.01 ± 0.03

Table 3. All ZINC arms (mean ± 95% CI over three seeds, five for GraphGPS). nmax⁡jsjn\max_j s_j: attention received by the most-attended node, as a multiple of the uniform share. Ablation ratio: test MAE after removing all attention onto the most-attended node, divided by that for a random node.

Certificate and probe. For Proposition 3.1 we evaluate, on 300 test graphs per run, layer, and head, the row leakages ℓu(r)\ell_u^{(r)} and λr(A)\lambda_r(A) for r≤3r\le3, the ball volumes, the orbits via VF2 with capped enumeration (a cap only shrinks orbits, so 1/∣O(j)∣1/|\mathcal{O}(j)| stays valid), and the per-node bound Uj=min⁡{1/∣O(j)∣,min⁡r(∣BG(j,r)∣+∑u∉BG(j,r)ℓu(r))/n}U_j=\min\{1/|\mathcal{O}(j)|,\min_r(|B_G(j,r)|+\sum_{u\notin B_G(j,r)}\ell_u^{(r)})/n\}. The locality bound was never violated, and within-orbit deviation was at most 8.7×10−58.7\times10^{-5} for every equivariant-PE run except GRIT-dotbias (0.016, with 2 orbit-bound violations in total), which qualifies as an equivariance test. The probe passes cycles C8C_8–C24C_{24} of identical atoms and bonds through the checkpoints; virtual-node arms use the training-time transform, so the virtual node is a singleton orbit beside the nn cycle nodes and the two are reported separately. On the cycle probe, received attention is uniform to 7.8×10−77.8\times10^{-7} in every equivariant-PE checkpoint except GRIT-dotbias and GRIT-dotlogit, which have float32 rounding (deviation up to 0.96) and are uniform to 9.6×10−49.6\times10^{-4} in float64. Real nodes of virtual-node arms stay uniform to 2.5×10−42.5\times10^{-4}.

Additional results

Training verification. GRIT reaches test MAE 0.064 on ZINC, close to the published result [16], and test AP 0.634 on the full Peptides-func dataset (0.612 on the smallest quartile, 0.499 on the largest), below the published result; GraphGPS reaches 0.072 on ZINC. At GRIT’s 2,000-epoch budget, GRIT-dotlogit appears under-trained, with an unconverged training loss.

Sink ablations. Table 1 removes the attention onto the most-attended node outright. If each row is instead renormalised, so that this attention is spread over the other nodes, GRIT’s ablation ratio falls from 2.06 to 1.35, but every gated arm (1.25 to 1.61) stays above every dot-product arm (1.00 to 1.23) except GraphGPS-none, whose ratio varies widely across seeds (2.03; Table 3).

Thresholds and size. GRIT sinks less than each of the seven dot-product arms we swept at every threshold from ε=0.1\varepsilon= 0.1 to 0.8 (closest at ε=0.8\varepsilon= 0.8: 0.02 vs. 0.05), and the threshold-free peak share nmax⁡jsjn\max_j s_j separates gated arms (2.5 to 3.6) from dot-product arms (6.0 to 13.1) with no overlap (Table 3). On Peptides-func, GRIT’s largest sink score falls with graph size (0.135 to 0.066) while its peak share rises (7.4 to 16.1), as a score spread that does not grow with nn predicts.

Language models. With the same estimator, the three language models reach sink rates of 0.95–1.00 at T=23T = 23 and 0.39–1.00 at T=269T = 269. Compared to our experiments, these language models were trained on far longer contexts, which bring stronger sinks [2].

Virtual-node details. At the peak-sinking layer, the virtual node of GRIT + virtual node is never the most-attended node, and it almost never receives enough attention to be a sink. In GraphGPS + virtual node it is the most-attended node in 10% of graphs; when it is, its value norm is about a tenth of the mean.

Over-mixing. From first to last layer the Dirichlet energy relative to the squared feature norm grows in every arm (on average 1.13- to 5.45-fold) except GRIT + virtual node (PE rec.), where it falls to 0.71–0.92 of its input value, and the distance from consensus ∥X−1xˉ⊤∥F/∥X∥F\lVert X - \mathbf{1}\bar{x}^{\top}\rVert_F/\lVert X\rVert_F rises in every arm: at 10 layers there is little over-smoothing for a sink to prevent.

References

  1. [1]Federico Barbero, Andrea Banino, Steven Kapturowski, Dharshan Kumaran, João G. M. Araújo, Alex Vitvitskyi, Razvan Pascanu, and Petar Velicković. Transformers need glasses! Information over-squashing in language tasks. Advances in Neural Information Processing Systems, 37:98111–98142, 2024.
  2. [2]Federico Barbero, Álvaro Arroyo, Xiangming Gu, Christos Perivolaropoulos, Petar Velicković, Razvan Pascanu, and Michael Bronstein. Why do LLMs attend to the first token? In Conference on Language Modeling, 2025.arxiv.org/abs/2504.02732
  3. [3]Umberto Biccari, Qian Huang, and Enrique Zuazua. Interior interpretability with attention rollout: Contraction and propagation profiles in transformers. arXiv preprint arXiv:2607.22637, 2026.
  4. [4]Stella Biderman, Hailey Schoelkopf, Quentin Anthony, Herbie Bradley, Kyle O’Brien, Eric Hallahan, Mohammad Aflah Khan, Shivanshu Purohit, USVSN Sai Prashanth, Edward Raff, Aviya Skowron, Lintang Sutawika, and Oskar van der Wal. Pythia: A suite for analyzing large language models across training and scaling. In International Conference on Machine Learning, 2023.
  5. [5]Lorenzo Bini, Marco Sorbi, and Stéphane Marchand-Maillet. Massive activations in graph neural networks: Decoding attention for domain-dependent interpretability. arXiv preprint arXiv:2409.03463, 2024.
  6. [6]Michael M Bronstein, Joan Bruna, Taco Cohen, and Petar Velicković. Geometric deep learning: Grids, groups, graphs, geodesics, and gauges. arXiv preprint arXiv:2104.13478, 2021.
  7. [7]Timothée Darcet, Maxime Oquab, Julien Mairal, and Piotr Bojanowski. Vision transformers need registers. In International Conference on Learning Representations, 2024.arxiv.org/abs/2309.16588
  8. [8]Francesco Di Giovanni, James Rowbottom, Benjamin P Chamberlain, Thomas Markovich, and Michael M Bronstein. Understanding convolution on graphs via energies. Transactions on Machine Learning Research, 2023.
  9. [9]Yihe Dong, Jean-Baptiste Cordonnier, and Andreas Loukas. Attention is not all you need: Pure attention loses rank doubly exponentially with depth. In International Conference on Machine Learning, pages 2793–2803. PMLR, 2021.
  10. [10]Vijay Prakash Dwivedi, Anh Tuan Luu, Thomas Laurent, Yoshua Bengio, and Xavier Bresson. Graph neural networks with learnable structural and positional representations. In International Conference on Learning Representations, 2022a.
  11. [11]Vijay Prakash Dwivedi, Ladislav Rampášek, Michael Galkin, Ali Parviz, Guy Wolf, Anh Tuan Luu, and Dominique Beaini. Long range graph benchmark. Advances in Neural Information Processing Systems, 35:23226–23240, 2022b.
  12. [12]Xiangming Gu, Tianyu Pang, Chao Du, Qian Liu, Fengzhuo Zhang, Cunxiao Du, Ye Wang, and Min Lin. When attention sink emerges in language models: An empirical view. In International Conference on Learning Representations, 2025.
  13. [13]Zhong Guan, Likang Wu, Hongke Zhao, Ming He, and Jianping Fan. Attention mechanisms perspective: Exploring LLM processing of graph-structured data. In International Conference on Machine Learning, pages 20612–20639. PMLR, 2025.arxiv.org/abs/2505.02130
  14. [14]Derek Lim, Joshua Robinson, Lingxiao Zhao, Tess Smidt, Suvrit Sra, Haggai Maron, and Stefanie Jegelka. Sign and basis invariant networks for spectral graph representation learning. In International Conference on Learning Representations, 2023.
  15. [15]Yang Liu, Dongxin Guo, Tom Zheng, Siu Ming Yiu, Liam Ning, and Jikun Wu. Capacity-controlled global attention for graph transformers. arXiv preprint arXiv:2604.17324, 2026.
  16. [16]Liheng Ma, Chen Lin, Derek Lim, Adriana Romero-Soriano, Puneet K Dokania, Mark Coates, Philip Torr, and Ser-Nam Lim. Graph inductive biases in transformers without message passing. In International Conference on Machine Learning, pages 23321–23337. PMLR, 2023.
  17. [17]Simon McIntosh-Smith, Sadaf R Alam, and Christopher Woods. Isambard-AI: a leadership class supercomputer optimised specifically for artificial intelligence. arXiv preprint arXiv:2410.11199, 2024.
  18. [18]Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models. In International Conference on Learning Representations, 2017.arxiv.org/abs/1609.07843
  19. [19]Matthew Morris, Bernardo Cuenca Grau, and Ian Horrocks. Orbit-equivariant graph neural networks. In International Conference on Learning Representations, 2024.
  20. [20]Zihan Qiu, Zekun Wang, Bo Zheng, Zeyu Huang, Kaiyue Wen, Songlin Yang, Rui Men, Le Yu, Fei Huang, Suozhi Huang, Dayiheng Liu, Jingren Zhou, and Junyang Lin. Gated attention for large language models: Non-linearity, sparsity, and attention-sink-free. In Advances in Neural Information Processing Systems, 2025.
  21. [21]Enrique Queipo-de-Llano, Álvaro Arroyo, Federico Barbero, Xiaowen Dong, Michael Bronstein, Yann LeCun, and Ravid Shwartz-Ziv. Attention sinks and compression valleys in LLMs are two sides of the same coin. In International Conference on Learning Representations, 2026.
  22. [22]Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. Technical report, OpenAI, 2019.
  23. [23]Ladislav Rampášek, Michael Galkin, Vijay Prakash Dwivedi, Anh Tuan Luu, Guy Wolf, and Dominique Beaini. Recipe for a general, powerful, scalable graph transformer. Advances in Neural Information Processing Systems, 35:14501–14515, 2022.arxiv.org/abs/2205.12454

Paper details

vlnc:W_99e33c6y
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents