acceptodds
Under review as a conference paper at ICLR 2027

Attention Invariants: Weight-Space Interpretability Without a Forward Pass

Abstract

Attention heads in transformers can be characterized through basis-invariant quantities from weights alone, without any data or forward pass. We derive two invariants of the QK sector: , which measures a head's positional capacity, and , the definiteness of the symmetric part of its QK form. We prove a necessity condition on positional computation. A head with cannot depend on relative position, so positional function requires , a structural constraint we find is obeyed without exception across every model. On five models from four architecture families (Qwen2.5-1.5B/7B, Mistral-7B, Llama-3.1-8B, Gemma-2-2B), and separate three canonical head types (induction, duplicate-token, previous-token) in distinct regions of a two-dimensional plane. We show that a logistic regression trained on separates every head type pair at ROC-AUC , and unsupervised clustering recovers the types at – purity. Transferring to a different architecture, we obtain a median of balanced accuracy ( of pairs ). As an application, we apply YaRN only to the top heads by , arriving at better results than a standard uniform application.

Primary area:
interpretability and explainable AI
Keywords:
Mechanistic Interpretability, Invariants, Weight-space Analysis, RoPE, Attention Heads

Reviews

Among:
Shape:
1234this paper, Top 49%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.33 over 3 reviews, above 51% of the others.
Reviewer_cJEMOpenReview ↗
Rating
2(+1)
Confidence
3
Informativeness
1
Presentation
2
Soundness
2
Read review
Paper summary

This paper introduces two scalar quantities, \rho and \alpha, which are derived from the solely from the query-key weights of RoPE-based attention. The authors interpret ρ as positional capacity and α as the definiteness of content matching. The results show separation of three canonical tasks, induction-heads, duplicate-token, and previous-token, across five language models, together with cross-model transfer and a selective RoPE-scaling application.

Critical strengths
  • The scalar quantities are independent of the activations, and depend only on the weights of the attention-heads. Much of mechanistic interpretability relies on carefully designed inputs, forward passes, activation inspection, or interventions, and this complementary parameter-space approach is interesting.
  • The authors evaluate five models spanning four architecture families, rather than demonstrating the method on a single transformer, and the empirical consistencies well validated.
  • I liked the unsupervised clustering experiment and an attempt to connect the proposed descriptors to an actionable inference-time modification.
Critical weaknesses
  • The theoretical presentation needs to be improved. Since most results are focused on RoPE based architectures, complete mathematical definitions need to be provided. Other notation like SO(2)^{d/2}, and important quantities like G, P etc. need to be properly defined before using directly in equations.
  • The paper contains errors in its theoretical derivations. Equation (5) assumes that the squared Frobenius norm of a sum of matrices equals the sum of their squared norms, ignoring cross-terms, which is incorrect. Furthermore, Proposition 1 only establishes that \rho=0 eliminates positional dependence at the sampled offsets D, not at all relative positions. The stronger claim that positional computation necessarily requires \rho>0 is therefore not established for the paper's definition of \rho.
  • Similarly, the claimed forbidden region of near-zero \rho needs more explanation or a quantitative theorem.
  • The majority of attention heads in Figure 1 belong to the "other" category, which is excluded from the primary classification evaluation. The method is therefore evaluated on a relatively small, selected subset of the model's heads. Its usefulness for general-purpose head characterization is less clear.
  • The paper does not adequately compare against existing weight-based head-characterization methods, conventional QK similarity measures, spectral statistics, RoPE-frequency features, or simple architectural baselines such as layer index. Without these comparisons, it is difficult to determine whether the proposed invariants provide genuinely new information beyond QK geometry.
  • Although the authors demonstrate correlations between (\rho,\alpha) and three behavioral head types, these observations do not establish that the invariants causally determine head functionality. For example, a positive-semidefinite symmetric QK component does not necessarily imply duplicate-token detection, and induction behavior can depend on interactions between multiple attention heads and the value-output pathway.
Questions for authors

Please see weaknesses above.

1 comment
AuthorsOpenReview ↗

Reply to Reviewer cJEM

We thank the reviewer for the thoughtful review. We answer the six weaknesses in order.

  1. We define WQ,WK∈Rdh×dW_Q, W_K \in \mathbb{R}^{d_h \times d}, R(Δ)R(\Delta), GQK(Δ)=WQ⊤R(Δ)WKG_{QK}(\Delta) = W_Q^\top R(\Delta) W_K, P(Δ)=GQK(Δ)−GQK(0)P(\Delta) = G_{QK}(\Delta) - G_{QK}(0) and the symmetry group before first use. The group is (C∗)dh/2(\mathbb{C}^*)^{d_h/2} (per-plane rotation with reciprocal rescaling of WQW_Q and WKW_K), which contains the SO(2)dh/2SO(2)^{d_h/2} of the paper. Since ρ\rho and α\alpha are functions of GQKG_{QK}, they are invariant under all of it. No number changes.

  2. Eq. 5 is wrong and we remove Eq. 5. You are also right that Proposition 1 holds on the sampled offsets D\mathcal{D}, for fixed inputs. We state it that way and add a bound: for every Δ∈D\Delta \in \mathcal{D}, ∣xi⊤P(Δ)xj∣≤∣D∣ρ∥GQK(0)∥F∥xi∥∥xj∥.|x_i^\top P(\Delta) x_j| \le \sqrt{|\mathcal{D}| \rho} \lVert G_{QK}(0)\rVert_F \lVert x_i\rVert \lVert x_j\rVert. So ρ>0\rho > 0 is necessary for a head to compute relative position through its own RoPE pathway on D\mathcal{D}. We do not claim other offsets, or position that reaches a head through its inputs.

  3. The bound is the quantitative statement, and we drop "forbidden region" and "without exception". Table 2 is an empirical separation among labeled heads, not a theorem: previous-token floors are 0.270.27 to 0.740.74, the smallest ρ\rho over all heads is 0.0040.004 to 0.0240.024, and the floor is that class's own minimum.

  4. Yes, most heads are unlabeled and excluded from the supervised evaluation. We claim only that the three labeled types occupy the same relative regions across five models, not general-purpose head characterization. We state this in the limitations.

  5. A comparison:

FeaturesPairwise AUCTransfer (median)
Layer index (5 models)0.300.30 to 0.880.880.500.50 (0/200/20 pairs ≥0.87\ge 0.87)
log⁡∥GQK(0)∥F\log\lVert G_{QK}(0)\rVert_F, stable rank, high-frequency energy (3 models)0.130.13 to 1.001.00n/a
(ρ,α)(\rho, \alpha) (5 models)0.970.97 to 1.001.000.940.94 (16/20≥0.8716/20 \ge 0.87)

High-frequency energy is strong on the positional pairs, as expected for a proxy of ρ\rho. On the content pair (induction vs. duplicate) no baseline exceeds 0.920.92 on the 3 models, against 0.980.98 to 1.001.00 for (ρ,α)(\rho, \alpha). We did not run published methods and we did not find a directly comparable method (they were either VO, or plane specific).

  1. The evidence is associational, and ρ,α\rho, \alpha describe what the QK geometry permits. Induction involves several heads and the OV pathway, which a QK-only invariant does not see. We have not ablated heads chosen by (ρ,α)(\rho, \alpha). We add this to the limitations.
Reviewer_MZKEOpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

The paper defines two scalars from the query and key weights of RoPE attention heads. ρ\rho is the average squared Frobenius norm of the positional perturbation P(Δ)=WQ⊤[R(Δ)−I]WKP(\Delta) = W_Q^\top [R(\Delta) - I] W_K over offsets Δ∈{1,2,4,… }\Delta \in \{1, 2, 4, \dots\}, normalized by the static term ∥WQ⊤WK∥2\|W_Q^\top W_K\|^2; α\alpha is the signed definiteness of the symmetric part of the static term. Proposition 1 states that ρ=0\rho = 0 implies the attention logit does not depend on relative position. On five models (Qwen2.5-1.5B/7B, Mistral-7B, Llama-3.1-8B, Gemma-2-2B), heads labeled induction, duplicate-token or previous-token by a repeated-random-token probe separate in the (ρ,α)(\rho, \alpha) plane, with pairwise ROC-AUC ≥0.97\geq 0.97 and median 0.94 balanced accuracy when a classifier is transferred across models. The paper then presents a "necessity law" (low-ρ\rho region forbidden to positional heads) and a preliminary application that applies YaRN only to the top 50% of heads by ρ\rho.

Critical strengths
  1. Two cheap weight-only coordinates recover a consistent layout of three canonical head types across architectures. Figure 1 and Table 3 show induction, duplicate-token and previous-token heads in the same relative regions in five models from four families, and a classifier fitted on one model transfers to others at median balanced accuracy 0.94 (16 of 20 pairs ≥0.87\geq 0.87). The complementarity is shown rather than assumed: Table 1 reports that ρ\rho alone separates induction from duplicate heads poorly (AUC 0.20 to 0.71) and α\alpha alone separates induction from previous-token heads poorly (Table 1 lists 0.33 to 0.91 for this pair, whereas the text of Section 5.1 says 0.33 to 0.96), while both together give ROC-AUC ≥0.97\geq 0.97 on every pair, as stated in the abstract. This is a concrete sign that the two coordinates carry different information.

  2. The authors scope several of their own claims honestly. Section 5.1 states that the results concern how labeled types sit relative to one another and do not assert that a region contains only heads of one type, Appendix D varies the labeling threshold from 0.20 to 0.35, and Appendix E lists the class sizes (6 to 27 heads per class). This makes the evidence checkable, which is what lets me identify the concerns below.

Critical weaknesses
  1. Equation (5) does not follow from Equation (4), and it is not stated which one the reported ρ\rho uses. Section 3.2 writes P(Δ)P(\Delta) as a sum over frequency planes and then replaces the squared Frobenius norm of the sum by the sum of the squared norms of the planes. In general ∥∑kPk∥F2=∑k∥Pk∥F2+2∑k<l⟨Pk,Pl⟩F\Big\Vert \sum_k P_k \Big\Vert_F^2 = \sum_k \Vert P_k \Vert_F^2 + 2 \sum_{k \lt l} \langle P_k, P_l \rangle_F. Orthogonal RoPE planes in head space do not make the projected matrices WQ⊤[Rk(Δ)−Ik]WKW_Q^\top [R_k(\Delta) - I_k] W_K orthogonal in residual space, and no assumption removing the cross terms is given. A small numerical check with random weights (head dimension 8, residual dimension 24, offsets Δ∈{1,2,4,…,1024}\Delta \in \lbrace 1, 2, 4, \dots, 1024 \rbrace) shows the two expressions differ. On full-rank Gaussian weights the gap is small (mean relative gap 0.020), but for rank-1 heads the ratio of the sum-of-planes value to the full-norm value has a 10th to 90th percentile range of 0.58 to 2.32, and when planes read and write the same residual directions it is 0.26 (my own simulation, not a number from the paper), so how large the error is for trained heads is an empirical question. Because Section 3.2 presents additive per-frequency attribution as a property of the main invariant and Appendix B repeats it, and because every table uses ρ\rho, the authors need to say which formula was computed. If Equation (4) was used, only the statement needs correcting; if Equation (5) was used, ρ\rho, Tables 1 to 3 and the YaRN head selection need recomputing. This can be checked directly from the existing weights. There is also a smaller inconsistency: Section 3.1 states R(i)⊤R(j)=R(−Δ)R(i)^\top R(j) = R(-\Delta) but Equation (1) writes GQK(Δ)=WQ⊤R(Δ)WKG_{QK}(\Delta) = W_Q^\top R(\Delta) W_K.

  2. The "necessity law" is stronger than Proposition 1 and is contradicted or unsupported in three places. The abstract and conclusion say that positional function requires ρ>0\rho > 0 and that this is "obeyed without exception". (i) Proposition 1 shows that at ρ=0\rho = 0 the logit is independent of Δ\Delta for fixed residual vectors xix_i and xjx_j. It says nothing about heads whose inputs already carry position, and Haviv et al. (2022) and Kazemnejad et al. (2023) show that causal transformers can recover absolute and relative position without explicit positional encodings, so a head with ρ=0\rho = 0 can still produce position-dependent attention through its inputs; the sentence "positional function … cannot exist" (Section 3.2) is therefore too strong. (ii) The proposition omits attention biases. The Qwen2.5 technical report states that the architecture uses QKV bias, so for at least the two Qwen2.5 models the logit is (WQxi+bQ)⊤R(Δ)(WKxj+bK)(W_Q x_i + b_Q)^\top R(\Delta) (W_K x_j + b_K), which contains Δ\Delta-dependent terms that the weights-only GQKG_{QK} ignores; ρ=0\rho = 0 would then not imply Δ\Delta-independence, and ρ\rho can understate positional capacity. The paper never mentions bias. Treating the bias as an extra input coordinate (appending 11 to xx and the bias to each projection) makes Proposition 1 and ρ\rho well defined again. (iii) Table 2 defines the floor as the minimum ρ\rho among the labeled previous-token heads, so no previous-token head lies below it by construction, and each floor rests on 7 to 27 heads (Table 6). The informative fact in Table 2 is the other direction: Table 2 reports 54% of Mistral-7B heads and 88% of Llama-3.1-8B heads below the floor, so 46% and 12% of heads lie at or above it, compared with 12 and 7 labeled previous-token heads out of 1024 heads per model (Table 6). Section 5.2 should be presented as an empirical separation among labeled heads, or the stronger statement needs additional assumptions and a bound.

Questions for authors
  1. Which expression is implemented for ρ\rho, the full perturbation norm in Equation (4) or the sum of per-plane norms in Equation (5)? If Equation (5) was used, do Tables 1 to 3 and the 50% head split in Section 6 change after recomputation with Equation (4)?
  2. How are the query and key biases of the two Qwen2.5 models treated? Do the results for those models change if the biases are included through an augmented input coordinate?
  3. Is the intended theorem limited to direct RoPE dependence at fixed residual inputs and sampled offsets? If so, can the abstract, Section 3.2 and the conclusion be revised accordingly, and can the "at or near zero" and "forbidden region" wording be dropped or backed by a bound?
  4. Table 4 evaluates perplexity at lengths 512 and 4096 with a 4×4\times scale factor. Qwen2.5 is trained to 32,768 tokens (Qwen2.5 technical report), so 4096 lies inside its native context. On Qwen2.5-1.5B long-context perplexity, ρ\rho-targeted YaRN recovers only 0.13 of the 1.99-point increase caused by uniform YaRN (11.72 for uniform YaRN versus 11.59 targeted, against a baseline of 9.73), so this may be mainly a measurement of damage from rescaling that was not needed. What are the native windows, and are results available at lengths beyond them together with a control that applies YaRN to a random half of the heads?
1 comment
AuthorsOpenReview ↗

Reply to Reviewer MZKE

Thank you for the thoughtful review.

  1. Which formula was computed? Eq. 4, the full norm. Eq. 5 is never evaluated. We remove Eq. 5.

  2. QK bias in Qwen2.5. You are right, and the augmented weight is the correct approach. Two terms of the biased logit are independent of both Δ\Delta and the key. The softmax shift removes them, so the denominator of ρ\rho must exclude them (we drop the b_K column). Pairwise AUC on Qwen-1.5B / 7B:

Definitioni/di/pd/p
Submitted (ρ, α), bias ignored1.00 / 0.981.00 / 1.001.00 / 1.00
Bias-augmented, gain-folded, full denominator*0.59 / 0.850.99 / 0.970.89 / 0.71
Bias-augmented, shift-quotiented, gain-folded0.98 / 0.921.00 / 0.991.00 / 0.99

The bias-ignoring definition already separates Qwen heads, so the bias-aware ρ\rho makes Proposition 1 exact for biased heads. It is not an empirical improvement.

  1. On scope. Yes, the result concerns direct RoPE dependence, at fixed residual inputs and sampled offsets D\mathcal{D}. We revise the abstract, §3.2 and the conclusion to say so, and drop "cannot exist", "forbidden region" and "without exception". "At or near zero" is backed by a bound, as for every Δ∈D\Delta\in\mathcal{D},

∣xi⊤P(Δ) xj∣≤∣D∣ρ∥GQK(0)∥F∥xi∥∥xj∥,|x_i^\top P(\Delta)\,x_j| \le \sqrt{|\mathcal{D}| \rho}\|G_{QK}(0)\|_F \|x_i\| \|x_j\|,

so the position-dependent logit vanishes with ρ\rho. Table 2 remains an empirical separation among labeled heads, not a consequence of the bound. The floor is their own minimum, so the informative fact is its gap to the all-head minimum (0.270.27–0.740.74 vs. 0.0040.004–0.0240.024), and ρ>0\rho>0 is necessary, not sufficient.

  1. On Yarn. Both points are correct, and we ran the controls and decided to remove this application.
Reviewer_CuDgOpenReview ↗
Rating
3
Confidence
2
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The work proposes two scalars ρ\rho and α\alpha that are invariants defined on the query and key weights of the attention heads that capture positional capacity and query-key matrix definiteness, respectively. Empirically, these two scalars are jointly shown to predict the specialization of the attention heads. These results are shown to be valid for five different LLMs from five different families.

Critical strengths
  1. The proposal of the two invariants and their strong association with the types of attention heads is quite interesting and insightful.
  2. The association of the invariants with the attention head types is cross-model transferable.
  3. The empirical results strongly indicate an association between low ρ\rho and lack of positional consideration.
Critical weaknesses
  1. Is eqn 5 correct? Are the Pk(Δ)P_k(\Delta)s really orthogonal causing the cross terms to be 0 ? This would be needed for eqn. 5 to be valid. They might be near orthogonal though, as RkR_k are orthogonal.
  2. The application of attention head selection with YaRN is not quite convincing, as admitted by the authors themselves.
Questions for authors
  1. The cross terms in the expansion of the ρ\rho term in eqn 4 are not considered and shown to be zero. Any empirical evidence showing them to be nearly orthogonal?
1 comment
AuthorsOpenReview ↗

Reply to Reviewer CuDg

Thank you for the positive reading and the precise question.

  1. Are the cross terms zero? No. We remove Eq. 5 and keep only the exact definition. Unfortunately this survived the final screening for the submission. It is not used anywhere.

  2. Regarding YaRN. We agree it is the weak point. We remove the application claim rather than defend it. The contribution, the weight-only invariants, their separability and cross-model transfer, and the scoped ρ>0\rho > 0 condition, does not depend on it.

Comments on the paper

1 comment
AuthorsOpenReview ↗

General response

We thank the reviewers for the thoughtful reviews.

  1. Tables 1-3 use the submitted ρ\rho and α\alpha, computed on raw weights. A better definition uses the effective weights the network applies (RMSNorm gain folded in and, for Qwen, QK bias included). On the models we checked it ranks heads almost identically, and we report it as a refinement.

  2. Eq. 5 is a text error that survived screening. The code never uses this result and was already identified as incomplete. We remove this equation.

  3. Layer index transfers across models at a median 0.50 (chance 0.33), against 0.94 for the invariants.

  4. Proposition 1 can be restated precisely with a bound. We know ρ>0\rho > 0 is a necessary condition for a head to compute relative position through its own RoPE pathway. We withdraw the "law" and "without exception" wording.

  5. QK bias, RMSNorm gain and offset sign are analyzed. They refine the definition. They do not change the headline results.

  6. We decided to drop the YaRN application. With the requested controls, selecting heads by invariants shows the relationship is more complicated than initially thought.

What remains is the paper's core: two weight-only coordinates that recover the same layout of three head types across five models and transfer between architectures. We state throughout that they measure capacity, not usage.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.