Abstract
Standard Transformer architectures often suffer from "head redundancy," where multiple attention heads focus on overlapping information, limiting model capacity. We present Cascaded Head-colliding Attention (CODA), which re-frames Multi-Head Attention (MHA) as a probabilistic latent variable model. By introducing an "explaining-away" mechanism through hierarchical dependencies across layers, CODA encourages heads to specialize and capture complementary features. Experimental results across language modeling and machine translation benchmarks demonstrate that CODA consistently outperforms vanilla Transformers with negligible parameter overhead.
Introduction
The Multi-Head Attention (MHA) mechanism is central to the success of the Transformer architecture, theoretically allowing models to attend to diverse linguistic features simultaneously. However, empirical studies reveal significant redundancy: many heads often attend to identical regions, failing to utilize the model's full capacity. This redundancy stems from the independent parallel processing of heads in standard MHA. CODA addresses this by enabling heads to "see" each other's work, forcing them to seek out novel information.
Methodology: The Collider Perspective
CODA shifts MHA from a deterministic function to a probabilistic framework. In graphical models, a "collider" occurs when independent variables influence a single observation. By treating attention heads as latent variables that collide to produce an output, CODA invokes the "explaining-away" effect: if one head successfully explains a portion of the data, the necessity for other heads to explain that same portion decreases.
To implement this efficiently, CODA uses a hierarchical variational distribution where attention patterns at layer $l$ are conditioned on those from layer $l-1$. This is achieved via "Cascaded Connections"—small, two-layer MLPs that fuse attention logits from the previous layer and inject them into the current one. This addition is extremely parameter-efficient, typically adding only 0.01% to 0.02% to the total parameter count.
Key Insights and Scaling
A significant finding is how CODA handles head scaling. In vanilla Transformers, increasing the number of heads while maintaining a constant parameter count often degrades performance as individual heads become weaker and more redundant. In contrast, CODA's interactive framework allows it to benefit from more heads, as each additional head is incentivized to find unique information.
Visual analysis using Jensen-Shannon Divergence (JSD) confirms this diversity. CODA exhibits significantly higher JSD between heads compared to standard models, indicating that the "explaining-away" mechanism effectively drives head specialization.
Experimental Results
CODA was evaluated on Wikitext-103, WMT14 EN-DE, and IWSLT14 DE-EN.
- Language Modeling: On Wikitext-103, CODA improved perplexity by 0.6 points, outperforming baselines with significantly larger context windows.
- Machine Translation: CODA achieved gains of 0.6 BLEU on WMT14 EN-DE and a substantial 1.1 BLEU on IWSLT14 DE-EN.
These improvements come with minimal computational cost; for instance, the IWSLT model required only 0.03% additional parameters.
Conclusion
CODA demonstrates that simple hierarchical dependencies between layers can significantly mitigate head redundancy in Transformers. By moving toward a probabilistic framework where heads interact, models can achieve better specialization and higher performance without substantial increases in complexity. Future work may explore intra-layer interactions and more expressive data-driven priors to further enhance attention diversity.
Summary updated