Abstract
Two principles: the complementary principle and the consensus principle are widely acknowledged in the literature of multi-view learning. However, the current design of multi-head self-attention, an instance of multi-view learning, prioritizes the complementarity while ignoring the consensus. To address this problem, we propose an enhanced multi-head self-attention (EMHA). First, to satisfy the complementary principle, EMHA removes the one-to-one mapping constraint among queries and keys in multiple subspaces and allows each query to attend to multiple keys. On top of that, we develop a method to fully encourage consensus among heads by introducing two interaction models, namely inner-subspace interaction and cross-subspace interaction. Extensive experiments on a wide range of language tasks (e.g., machine translation, abstractive summarization and grammar correction, language modeling), show its superiority, with a very modest increase in model size.
Introduction
In standard Transformers, Multi-Head Self-Attention (MHSA) is designed to capture different "views" of the data in parallel. This follows the complementary principle of multi-view learning: each head should ideally learn something unique. However, current designs often ignore the consensus principle, which suggests that multiple views should also agree on the underlying structure of the data to minimize error rates.
Existing research often treats high similarity between heads as "attention redundancy" to be eliminated. EIT challenges this by suggesting that fostering interaction and consensus between heads—much like a group of experts discussing a problem to reach a common conclusion—actually leads to higher-quality representations and more robust models.
Methods
The authors propose Enhanced Multi-Head Attention (EMHA), which consists of three primary innovations:
- Many-to-Many (M2M) Mapping Scheme: In standard MHSA, each query attends to one specific key. M2M removes this constraint, allowing each query to interact with all $M$ keys in a bipartite graph style. This generates $M^2$ initial attention maps, providing a rich pool of information without the "low-bottleneck" issues typically seen when simply adding more heads.
- Dual Enhanced Interaction: To distill these $M^2$ maps back into $M$ high-quality maps, the paper introduces two hierarchical modules:
- Inner-Subspace Interaction (ISI): Uses group convolutions to model relationships between attention maps generated by the same query.
- Cross-Subspace Interaction (CSI): Uses standard convolutions to model collaboration across different queries.
- Efficient EIT (E-EIT): Recognizing that group convolutions can be slow in practice, the authors developed a simplified version that uses single-layer operations to maintain performance while significantly reducing training latency.
Experimental Results
The researchers evaluated EIT across a diverse set of benchmarks including Machine Translation (WMT’14 En-De, WMT’16 En-Ro), Grammar Error Correction (CoNLL), Abstractive Summarization (CNN/DailyMail), and Language Modeling (WikiText-103).
On WMT’14 En-De, EIT-base achieved 28.00 BLEU, outperforming the vanilla Transformer (27.13) and several recent variants like Talking-Head and Refiner. EIT also reached 41.62 ROUGE-1 on CNN/DailyMail, a significant jump over the baseline (40.84). Beyond NLP, the model showed strong generalizability on the ABIDE fMRI dataset for automatic disease diagnosis, achieving an 82.9 AUROC for autism spectrum disorder classification.
Discussion and Insights
- The Consensus Paradox: While EIT heads show higher cosine similarity (more consensus) than standard Transformers, the actual features they learn have lower token correlation. This means the heads are agreeing on more precise, distinct patterns rather than just being redundant.
- Robustness to Pruning: Because the model encourages consensus, it becomes much more robust to head pruning. EIT-48L maintained a BLEU score of 21.12 even after 87.5% of its heads were pruned, whereas a standard Transformer's performance collapsed to 1.86.
- Efficiency: The E-EIT variant delivers these gains with only a ~5-10% increase in memory consumption and training costs compared to the baseline, making it viable for industrial applications.
Conclusion
EIT introduces a novel multi-head self-attention mechanism that balances diversity with consensus. By using a many-to-many mapping scheme and hierarchical subspace interactions, EIT achieves state-of-the-art performance across multiple domains with minimal overhead. While computational efficiency of group convolutions remains a minor bottleneck, the model's robustness and representational quality mark a significant step forward for Transformer architectures.
Summary updated