Source-linked AI summary
The Communication Map of a Transformer
Richard Zhe Wang
TL;DR
Mechanistic interpretability lacked a transformer-wide account of which components can communicate and through which subspaces. This paper constructs a weight-based map using one coupling coefficient across 18 connection classes, then finds induction-related structure in head communities and a shared two-dimensional subspace. Deleting that subspace destroys 82–96% of induction capability across six models.
Problem
Prior analyses typically began with known behaviors and traced a handful of components, leaving full transformer-wide communication patterns largely unanswered.
Method
The authors compute a coupling coefficient from reader and writer weight matrices for every eligible pair, covering 18 connection classes and supporting graph and subspace interventions.
Results
The map recovers induction and IOI structure in head communities, while deleting a pooled two-dimensional stream subspace destroys 82–96% of induction capability across six models.
Takeaways & Limitations
Weight geometry can identify transformer-wide communication structure and intervention targets associated with in-context copying.
Takeaways & Limitations
The map captures potential weight-based connectivity rather than input-dependent communication, and the applications focus on in-context copying and sub-10B models.
Abstract
from arXiv · showhide
The components of a transformer communicate by writing to and reading from a shared residual stream, and mechanistic interpretability has mapped these connections by hand, one circuit at a time. We present the communication map, which charts every potential communication channel in a language model from weights alone, generalizing the composition score of Elhage et al. (2021) into a single coupling coefficient covering all 18 connection classes, from entire attention head circuits to single neurons. The census of all candidate channels, from $6.3\times10^{8}$ in GPT-2 to $1.3\times10^{11}$ in Pythia-6.9B, finds that 70-89% of head pairs are oriented far from chance, some coupled strongly and others actively avoiding each other. The full map costs 15 seconds for GPT-2 and 11 minutes for Pythia-6.9B on one consumer GPU. Two applications demonstrate the utility of the map. In Application 1, the strongest head-to-head couplings recover the known induction circuits blind and group them into communities, and ablating one such community destroys the model's in-context copying. In Application 2, pooling every head's coupling coefficients identifies a distinct two-dimensional stream subspace, whose deletion abolishes the induction capability in six models up to Pythia-6.9B. This subspace is different from those identified by either activation PCA or outlier dimensions. We release the map, the statistical machinery, and the intervention suite.
1 INTRODUCTION
The paper builds a transformer-wide communication map from weight geometry to address questions that prior mechanistic-interpretability work examined only circuit by circuit. It generalizes composition scores across connection types and demonstrates the map through head communities and an induction-critical subspace.
- Motivation: Prior work traced known behaviors backward to a handful of components, leaving full transformer-wide communication maps largely unavailable.The paper frames unanswered questions about component interactions, long-range communication, subnetworks, and shared versus private subspaces.
- Motivation: The residual stream provides a shared medium whose subspaces encode potential writer–reader communication directly in model weights.A writer in one layer can communicate with a reader several layers later when their directions align closely.
- Contribution: The map scores every eligible writer–reader pair with one coupling coefficient, covering all 18 connection classes from full head circuits to rank-one neurons.The authors map GPT-2 and Pythia models, then use the resulting graph for two ablation-based applications.
- Application 1: One strongest-coupling head community contains all five induction heads and most of the IOI circuit; ablating it destroys 93.8% of in-context copying.The community-level intervention reveals machinery that single-head identification can miss.
- Application 2: Pooling head couplings identifies a two-dimensional stream subspace whose deletion destroys 82–96% of induction capability across six models.The result spans models from 124M to 6.9B parameters.
- Release: The authors release the communication map, statistical machinery, and intervention suite with fixed seeds and one-command reproduction.
2 BACKGROUND AND RELATED WORK
Transformers communicate through additive writes to and linear reads from a shared residual stream, whose geometry supports many component-specific channels. Earlier work studied selected circuits or activation patterns, whereas this paper extends weight-based analysis across components and connection classes.
- Residual stream: At each layer, attention heads and MLP neurons read from and write to the shared residual stream, with readers’ inputs decomposing into identifiable writer contributions.
- Residual stream: The communication map treats aligned writer and reader subspaces as potential edges, including connections to token, positional, and unembedding interface matrices.
- Prior circuit analyses: Prior composition analyses defined K-, Q-, and V-composition channels for tracing head-to-head communication and supported studies of induction and IOI circuits.
- Prior circuit analyses: MLP neurons are rank-one readers and writers, so neuron-level work asks what neurons represent while this map asks whom they communicate with.
- Related approaches: Activation-based studies discover circuits, perform interventions, ablate heads, and characterize traffic, but differ from this weight-geometry approach.
- Related approaches: Compared with the closest weight-geometry work, this map includes MLPs, retains singular-value channel gains, and tests individual pairs rather than only top affinities.
3 THE COMMUNICATION MAP: THE COUPLING COEFFICIENT AND THE CENSUS
The communication map assigns a coupling coefficient to every causally eligible writer–reader pair and evaluates these scores against chance or empirical nulls. The census reveals strong and avoidant head orientations and substantial neuron-to-neuron alignment.
- Map construction: Every ordered, causally eligible writer–reader pair receives one coupling coefficient, forming the full-transformer communication graph.
- Coupling coefficient: The coupling coefficient generalizes composition scores to arbitrary writer–reader matrices, from d×d head circuits to rank-one neurons, on a common scale.For head pairs, it is exactly the earlier composition score.
- Coupling coefficient: The coefficient weights alignment between reader and writer principal directions by their singular-value contributions, so weak transmission or reception suppresses a channel.
- Statistical census: Under Haar rotation, E[C^2] = 1/d exactly, providing a shared chance baseline across connection classes; the coefficient is rotation-invariant and bounded by [0, 1].
- Statistical census: The map spans seven models across GPT-2, GPT-Neo, and Pythia, using closed-form rotation-null moments and efficient d_head-wide products.The full map costs 15 seconds for GPT-2 small and 11 minutes for Pythia-6.9B on one consumer GPU.
- Census results: In GPT-2 small, 89% of K-composition head pairs deviate beyond two standard deviations from chance: 55% super-coupled and 34% avoidant.The same broad pattern replicates across all seven mapped models.
- Census results: V-composition is more avoidant than super-coupled in GPT-2 small, at 65% versus 25%, with active suppression observed at every mapped scale.
- Census results: GPT-2 small contains 140,927 neuron pairs with |cos| ≥0.2, despite a null expectation of only 14, showing direct neuron-to-neuron wires.It contains 78,861 pairs with |cos| ≥0.23, where the null expectation is essentially zero.
4 APPLICATION 1: HEAD-TO-HEAD COMMUNITIES
The strongest statistically selected head couplings form long-range communities that recover known induction and IOI circuits. Ablating the induction-concentrated community removes nearly all in-context copying capability.
- Head graph: 1,051 of 28,512 candidate head edges are selected at FDR q = 0.05 under the coupling coefficient C.Each ordered head pair has three separately tested channels: K-, Q-, and V-composition.
- Head communities: The five Louvain communities are vertical across model depth, with no community spanning fewer than eight of GPT-2’s twelve layers.The partition is stable across ten Louvain seeds.
- Head communities: The median writer-to-reader separation is five layers versus four for eligible pairs, and wired-pair rates roughly double with distance.These results indicate that head communication is long-range rather than predominantly between adjacent layers.
- Head communities: The green 30-head community contains all five induction heads and two of three IOI name-mover heads in all ten seeds.The previous-token head L4H11 is the top-ranked K-composition writer into every induction head.
- Community ablation: 93.8% of GPT-2 small’s induction gain is destroyed by freezing the full thirty-head community, versus a 2.5% median for matched random controls.Across six models, the effect reaches 97.1% against a 1.0% control median at Pythia-2.8B.
- Community ablation: The five behaviorally identified induction heads account for only 60.8% of induction gain, leaving redundant machinery that single-head identification misses.The community captures additional functionally relevant members that are individually near-inert.
5 APPLICATION 2: INDUCTION-CRITICAL SUBSPACE
RW-PCA pools weight-based reader–writer couplings to identify a two-dimensional, position-specific residual-stream subspace. Deleting it consistently removes most induction capability across six models while identifying directions distinct from activation-PCA and outlier baselines.
- Reader–writer PCA: RW-PCA identifies global communication bands by eigendecomposing pooled coupling structure from attention-head reader and writer matrices.The method applies eigendecomposition to model weights rather than sampled activations and excludes MLP neurons in this analysis.
- Selecting induction-critical bands: The two induction-critical bands are selected from the ten leading global bands by positional specificity relative to token coupling.The selection favors directions that carry positional signals while minimizing content-carrying directions.
- Induction-critical subspace deletion: The deletion protocol projects out the two-dimensional subspace at every layer input and before final unembedding, then measures induction gain.For orthonormal V, the residual activation is replaced by x−V V^T x.
- Distinct directions: RW-PCA identifies at least one principal direction absent from both baselines in every model, while the baselines nearly coincide on five of six models.RW-PCA’s second principal cosine against either baseline never exceeds 0.35 and is usually below 0.1.
- Deletion outcomes: 82–96% of induction gain is destroyed across all six models when the RW-PCA directions are deleted.Random two-dimensional subspace deletions have zero or near-zero effects across the six models.
- Deletion outcomes: In Pythia-6.9B, deleting 2 of 4,096 dimensions destroys 89.5% of induction, compared with 84.5% for activation PCA and 36.5% for rogue dimensions.The deleted subspace is only 0.05% of the residual stream width.
6 CONCLUSION
The paper builds a weight-based communication map covering transformer components and uses it to identify shared communication structure across models. Its applications find head communities and induction-critical residual-stream bands, while the authors note important scope limits.
- 6 CONCLUSION: The map covers every head, neuron, and eligible communication channel using weight-matrix geometry, with findings replicated across six models up to Pythia-6.9B.The released work maps potential communication throughout entire transformers rather than starting from a known behavior.
- 6 CONCLUSION: Head-to-head analysis finds vertical communities spanning model depth, with induction and IOI circuits concentrated in one community.Ablating one such community destroys 93.8% of the model’s in-context copying.
- 6 CONCLUSION: Pooling head couplings identifies global residual-stream communication bands, including two bands forming an induction-critical subspace.Deleting this subspace abolishes induction capability across the reported model set.
- 6 CONCLUSION: The map charts potential connectivity from weights alone, not input-specific communication, because attention-pattern routing remains invisible.The applications validate structures against in-context copying, while neuron wires, other communities, larger scales, and feature-level maps remain open areas.
A.4 NULLS
The null framework calibrates coupling scores against random orientations while accounting for matrix rank and singular-value structure. Exact moments support large-scale censuses, and neuron-level tails reveal many more strong alignments than chance predicts.
- A.4 NULLS: Under Haar rotation, the universal chance level is E[C^2] = 1/d for any reader and writer singular values.This fixes the null mean but not its variance or shape.
- A.4 NULLS: Null dispersion depends on singular values: equal singular values produce no fluctuation, whereas rank-one pairs follow a squared-cosine law.Rank-one nulls therefore use the Beta distribution and exceedance counts rather than z-tail assumptions.
- A.4 NULLS: Among 622,854,144 neuron-pair draws, chance expects 0.07 pairs beyond |cos| = 0.23 and 4 × 10^-41 beyond 0.5.The corresponding maximum has median 0.217 and 95th percentile 0.231.
- A.4 NULLS: A sampled rank-64 head-pair null has mean 0.02, SD 1.00, and skew +0.20, while the trained pair scores z = 15.7.The same figure places a perfectly orthogonal pair at z = −36, showing that below-chance head couplings are reachable.
- A.4 NULLS: For higher-rank pairs, exact first two moments yield z-scores without approximating the null distribution.On GPT-2, the closed-form census reproduces a 500-rotation Monte Carlo census to a tenth of a percentage point on every fraction.
B COMPUTING THE MAP: ALGORITHMS AND REPRODUCIBILITY
The map’s algorithms preprocess LayerNorm-adjusted weights, represent each component through reusable Gram matrices, and score causally eligible reader–writer pairs with collapsed trace computations. This makes the full map computationally tractable while preserving a specific input-dependent limitation.
- B.1 WEIGHT PREPROCESSING: LAYERNORM FOLDING: LayerNorm folding absorbs its fixed rescaling and centering into reading matrices, while its constant shift folds into sublayer biases.After preprocessing, the remaining input dependence is the scalar gain 1/σ(x).
- B.1 WEIGHT PREPROCESSING: LAYERNORM FOLDING: Writing matrices are centered along the stream dimension so their norms and couplings measure only components that readers can receive.All couplings are computed exactly on the folded and centered weights.
- B.1 WEIGHT PREPROCESSING: LAYERNORM FOLDING: Input-dependent LayerNorm gain leaves incoming-edge rankings unchanged for a fixed reader but introduces per-hop uncertainty into chained path strengths.The map therefore supports geometric connectivity analysis without fully determining input-specific path magnitude.
- B COMPUTING THE MAP: ALGORITHMS AND REPRODUCIBILITY: Each component contributes reusable Gram matrices and circuit factors, including WQK for query-key interactions and WOV for the head’s write operator.Neuron read and write vectors are unit-normalized, while interface matrices supply embedding, positional, and unembedding components.
- B COMPUTING THE MAP: ALGORITHMS AND REPRODUCIBILITY: Every causally eligible edge is scored as C^2 = tr(GH)/(tr G · tr H) using collapsed dhead-wide forms rather than full d × d products.The same scoring procedure applies across the map’s reader and writer classes, with masks determining eligibility.
B.3 FULL-RANK PAIRS, FACTORED TRACES THROUGH THE INNER GRAMS
The paper computes coupling coefficients efficiently across full-rank, mixed, and rank-one reader–writer pairs by factoring calculations through cached low-dimensional or materialized Gram objects. This enables the large candidate census without forming dense composed operators.
- Full-rank pairs: Every head-to-head coefficient uses cached dhead-wide factors and batched operations over all ordered head pairs.The inner-Gram stacks are computed once per model and reused across pairs.
- Full-rank pairs: 2 × 10^11 multiply-adds replace about 10^13 operations for all three GPT-2 head-to-head channels.At Pythia-6.9B, the factored route costs about 2 × 10^14 operations versus about 10^17 naively.
- Mixed-rank pairs: For head–neuron pairs, rank-one neuron Grams reduce the score to a small quadratic form evaluated against all neurons in a batch.The head-to-neuron pass costs about 2 × 10^9 multiply-adds per head and stores no object larger than Nt × dhead.
- Rank-one pairs: Neuron-to-head computation mirrors head-to-neuron computation, while interface-matrix–neuron pairs use materialized Grams and exact rotation null distributions for rank-one readers.The neuron-to-neuron score is the normalized absolute cosine between reader and writer vectors, despite as many as 1.3 × 10^11 candidate pairs.
- Connection classes: The 18 connection classes are scored under causal masks, with head{K,Q,V} rows representing three separately scored channels over shared head pairs.The class definitions include reader–writer pairing, causal eligibility, and candidate-count formulas.
C APPLICATION 1: SELECTION AND THE COMMUNITY ABLATION
The selection standard calibrates candidate edges by connection class and layer separation, using robust empirical null distributions matched to each stratum. Robust fitting is necessary because signal tails can otherwise distort the null and remove many genuine edges.
- The selection standard: Two coordinates define each stratum: connection class and writer–reader layer separation.Different pair geometries and depth separations receive distinct calibration groups.
- The selection standard: Each stratum receives its own empirical null distribution, median, and MADN, so edges are judged against chance for their own pair type and distance.The method accounts for depth-dependent changes in residual-stream geometry.
- The empirical null: 3% is the agreement between empirical and theoretical spread for neuron–neuron pairs.For rank-one pairs the empirical and theoretical null distributions coincide, whereas subspace pairs require empirical calibration.
- Why robust estimators: Up to 5× inflation of the estimated null spread and removal of 61% of head–head edges occur when ordinary means and standard deviations replace robust estimators.Signal in the tail corrupts its own null distribution under the naive fit.
C.2 THE COMMUNITY ABLATION
The community ablation tests whether weight-derived head communities support in-context copying, using induction gain and matched random controls. Results show distributed, redundant support: removing all five behavioral induction heads alone does not abolish the capability, while the full community has a much larger effect.
- Protocol: 12.40 nats is the clean induction gain measured between random-token blocks and their immediate copies.The readout is averaged over 32 prompts, each containing a 128-token random block followed by a copy.
- Non-additivity: The whole community destroys more induction gain than its component effects sum to, consistent with redundant backup machinery inside the map-defined boundary.The nested decomposition tests the five induction heads, additional heads, and the full community.
- Ablation mechanics: Mean-ablation replaces each head’s input-dependent value summary with its corpus mean while preserving a constant write to the residual stream.Controls are matched in size and per-layer head counts, and the reference corpus matches the readout distribution.
- Cross-model protocol: The cross-model decomposition spans six models, three families, and both positional schemes, but Pythia-6.9B is absent because of a hardware RAM constraint.Each model uses its own selected head graph and the unified ablation pipeline.
- Cross-model observations: 3.6%–63.7% of induction gain is destroyed by ablating the five behavioral induction heads across models, so those heads alone never abolish copying.The larger models show the strongest compensation.
- Cross-model observations: 97.1% specificity against a 1.0% control median is observed for the Pythia-2.8B community ablation.GPT-2-large instead shows a 108.5% effect with a +4.8-nat natural-text loss increase, while GPT-Neo controls reach 86.8%.
C.3 ADDITIONAL RESULTS
The additional results detail how global coupling bands and positional information are selected, while reporting wired-pair statistics and recovered induction-head edges.
- Layer-separation profile: Wired head pairs are ordered writer–reader pairs selected when at least one of three channels passes the coupling criterion.Eligible pairs require the writer to be in a strictly earlier layer; selection uses FDR q = 0.05.
- The recovered induction edges: The recovered induction edges include L5H1, L5H5, L6H9, L7H2, and L7H10, with coupling coefficients C from 0.087 to 0.103.Their reported z statistics range from 5.6 to 6.3, with q values from 9×10^-9 to 6×10^-7.
- Selecting top global bands: The pooled coupling matrix ranks global bands by eigenvalues, with each leading eigenvector representing a direction capturing coupling across the transformer.Unit-trace Gram contributions ensure each factor contributes one vote, and eigenvalues partition the total coupling budget.
- Selecting top global bands: The eigenvalues decay smoothly without a privileged cutoff, so the ten leading bands are screened as candidates for selection.Figure 5 reports this behavior for GPT-2 small.
- Positional matrix: For rotary models, positional information is reconstructed from residual-stream activations using random-token sequences because no positional embedding matrix directly writes positions into the stream.Averaging cancels token content while retaining systematic position-dependent variation.
D.3 ROBUSTNESS
Robustness tests show that positional-band selection is stable across sample sizes, while simple eigenvalue ranking is substantially less effective for induction deletion.
- Selection robustness: 46% of the induction gain is destroyed by deleting the two leading eigendirections, compared with 95.8% using PosRatio on Pythia-160m.The comparison supports selecting bands using positional versus token coupling rather than eigenvalues alone.
- Positional reconstruction robustness: Every sample-size run selected the identical pair of top induction-critical directions, with positional couplings at least 125× chance for selected bands.No unselected band exceeded 28× chance across 4–128 sequences and three seeds per size.
- Scope boundary: GPT-Neo-125M is excluded because random two-dimensional deletions already destroy 60–98% of its induction gain.This makes the effect of a targeted two-dimensional deletion unmeasurable for that model.