Data-Adaptive Mahalanobis Metric Learning for Cross-Head Attention in Transformers
In this paper, we propose Data-Adaptive Mahalanobis Cross-Head Attention (DAMCHA), a simple and effective attention mechanism that generalizes Multi-Head Attention (MHA) through the lens of metric learning.
ProofPaper ↗
Key points
- Standard MHA implicitly learns a static, head-wise Euclidean similarity corresponding to the diagonal blocks of a unified cross-head metric matrix, discarding all off-diagonal interactions across heads.
- First, it learns the full cross-head metric matrix, inducing a Mahalanobis-like similarity that explicitly captures inter-head interactions beyond the restricted block-diagonal structure of MHA.
- We further introduce principled regularization strategies, most notably stack-wise parameter sharing, to ensure computational efficiency and stable optimization.
- Extensive experiments demonstrate that DAMCHA-based Transformers consistently outperform competing baselines across a range of benchmark tasks.
Sources (1)
- [1]Data-Adaptive Mahalanobis Metric Learning for Cross-Head Attention in TransformersarXiv (AI, ML, NLP, CV, robotics, multi-agent) · Oct 9, 09:11 AM
In this paper, we propose Data-Adaptive Mahalanobis Cross-Head Attention (DAMCHA), a simple and effective attention mechanism that generalizes Multi-Head Attention (MHA) through the lens of metric learning.
Standard MHA implicitly learns a static, head-wise Euclidean similarity corresponding to the diagonal blocks of a unified cross-head metric matrix, discarding all off-diagonal interactions across heads.
Extractive summary: sentences quoted from the sources.
Before this
- Oct 9, 2026BenCoDiC: A Large-Scale Contextual Cyberbullying Corpus for Bengali Political News Discourse FULL VERSION
- Oct 9, 2026Qwen/Qwen-Image-2.1-Turbo
- Oct 9, 2026Introducing Clef-omni with full multimodality, plus a faster Clef and a cheaper Clef-flash
- Oct 9, 2026AD-SRF: Attack-Defense Semantic Reinforcement for Multi-Modal Image Fusion
- Oct 8, 2026Kernelized Parameter Sensitivity Atlases for Amortized Conditional Interpretability
- Oct 7, 2026[AINews] Claude Haiku 5.5 — better than GPT-6 Luna at the same pricing