The standard Transformer architecture operates on a fundamental assumption: each layer must act as an independent feature extractor. In a model with dozens of layers, every individual block projects its own unique queries ($Q$), keys ($K$), and values ($V$), computing a dense attention matrix via a softmax-normalized dot product. This design implies that the semantic and spatial relationships between tokens change completely at every step of the network's depth.
However, empirical analysis of trained models reveals a different reality. Adjacent and deep layers often "look" at the exact same tokens, generating nearly identical attention distributions. This phenomenon—cross-layer attention redundancy—suggests that deep Transformers spend a massive amount of compute recalculating relationships they have already established. By understanding why this redundancy occurs, we can design architectures that calculate attention once and reuse it across layers, drastically slashing inference latency and memory footprints without sacrificing accuracy.
Quantifying the Redundancy
How do we know that layers are repeating each other's work? Researchers have mapped the functional overlap across Transformer layers using statistical distance metrics. For instance, Yuchen Bian et al. in On Attention Redundancy: A Comprehensive Study utilized Jensen-Shannon distance and distance correlation to evaluate attention maps across layers. They discovered that attention redundancy is surprisingly task-agnostic and phase-independent; the same heads remain redundant whether a model is processing complex text or random gibberish.
This similarity follows a highly predictable structural pattern across the network's depth. In Linearly-evolved Transformer for Pan-sharpening, Junming Hou et al. demonstrated high cosine similarity between attention maps across successive stages of deep networks. Rather than evolving continuously, attention patterns tend to reach a saturation point. As Danilo Vasconcellos Vargas observes in Beyond KV Caching: Shared Attention for Efficient LLMs, attention distributions become isotropic—highly uniform and stable—in the middle-to-late layers of large language models.
Why Redundancy Emerges
To understand why attention stabilizes, we must look at the mechanics of deep networks. Two primary drivers force consecutive layers to produce similar attention maps:
- Residual Smoothness: The ubiquitous use of skip connections means that the input to Layer $N+1$ is heavily dominated by the output of Layer $N$. This architectural constraint forces a smooth gradient flow and representation shift. As Yifei Zhang et al. argue in CrossSpectra: Exploiting Cross-Layer Smoothness for Parameter-Efficient Fine-Tuning, treating layers as entirely independent blocks ignores this inherent mathematical smoothness.
- Representation Over-Smoothing: In deep networks, token representations naturally begin to converge. Han Shi et al. proved in Revisiting Over-smoothing in BERT from the Perspective of Graph that Layer Normalization acts as a driver for over-smoothing, causing token vectors in later stages to become highly similar. Because the underlying vectors stabilize, computing new $Q$ and $K$ projections yields diminishing returns, producing virtually identical attention matrices.
Mechanisms for Attention Sharing
If deep layers naturally replicate each other's attention distributions, we can bypass the expensive $Q \times K^T$ matrix multiplication and the subsequent softmax operation in "lazy" layers. Several strategies have emerged to exploit this insight.
Direct Weight and Map Sharing
The most straightforward approach is to calculate an attention map once and recycle it. In Sharing Attention Weights for Fast Transformer, Tong Xiao et al. introduced Shared Attention Networks (SAN), which share attention parameters across adjacent layers to consolidate computations.
This concept is equally powerful in computer vision. In Efficient Attention-Sharing Information Distillation Transformer for Lightweight Single Image Super-Resolution, Karam Park et al. demonstrated that calculating a spatial affinity matrix in an initial layer and sharing it across subsequent blocks eliminates redundant floating-point operations while preserving high-fidelity image reconstruction.
Attention Inheritance with Residual Updates
Rather than keeping shared attention completely static, models can inherit a base attention map and apply lightweight modifications. Jiedong Zhuang et al. leveraged this in ST3: Accelerating Multimodal Large Language Model by Spatial-Temporal Visual Token Trimming, allowing designated layers to skip query and key distributions entirely by inheriting them from preceding layers.
To maintain representational flexibility during this inheritance, Jianzong Wang et al. proposed a residual update mechanism in EfficientASR: Speech Recognition Network Compression via Attention Redundancy and Chunk-Level FFN Optimization. By adding a residual connection to the inherited attention scores, the model integrates historical attention patterns with new, layer-specific information, allowing the attention map to evolve gradually without being recomputed from scratch.
Standard Layer N: In -> [Compute Q, K] -> [Q × K] -> Softmax -> Attention Map N
Standard Layer N+1: In -> [Compute Q, K] -> [Q × K] -> Softmax -> Attention Map N+1 (Redundant!)
Inheritance: Layer N Map ----------> [ Residual Update ] -> Attention Map N+1
Multi-Layer Key-Value Sharing
While techniques like Multi-Query Attention (MQA) reduce memory by sharing Key-Value (KV) heads within a single layer, cross-layer redundancy allows us to extend this sharing vertically. In MLKV: Multi-Layer Key-Value Heads for Memory Efficient Transformer Decoding, Zayd Muhammad Kawakibi Zuhri et al. introduced a framework that shares KV heads across multiple successive layers. This approach treats entire groups of layers as a unified key-value memory, drastically shrinking the KV cache size during inference.
Exploiting Coherence Across Heads and Tokens
The underlying principle of cross-layer redundancy also extends to token selection and head coordination. In long-context scenarios, computing sparse attention independently at each layer is highly inefficient.
Lijie Yang et al. addressed this in TidalDecode: Fast and Accurate LLM Decoding with Position Persistent Sparse Attention by identifying "spatial coherence"—the tendency for different layers to attend to the exact same token positions. By profiling token importance at a few anchor layers, they reuse those selection paths across the rest of the network.
Similarly, this spatial consistency exists across parallel attention heads within the same layer. As Hua Wu demonstrated in ProxyAttn: Guided Sparse Attention via Representative Heads, attention heads in deep layers often focus on identical token sets, differing primarily in their individual sparsity levels. A single representative attention map can therefore serve as a proxy to guide the computation for an entire group of heads.
By shifting our view of Transformers from a sequence of isolated operations to a continuous, smoothing system, cross-layer attention sharing eliminates structural waste. Reusing and inheriting attention maps allows deep models to maintain their representational capacity while operating at a fraction of the computational and memory cost.
Key Foundational Work
Sharing Attention Weights for Fast Transformer (2019) — contributed 3 concept elements to this direction.
Attention in Convolutional LSTM for Gesture Recognition (2018) — contributed 2 concept elements to this direction.
Efficient Training of BERT by Progressively Stacking (2019) — contributed 1 concept elements to this direction.