mlsanityData to 14 Oct 2026

Data-Adaptive Mahalanobis Metric Learning for Cross-Head Attention in Transformers

arXiv 2610.13261 ↗First posted 9 Oct 2026cs.LGcited by 0

Not on the map. Why?

Abstract (arXiv)

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. DAMCHA addresses this limitation via two key innovations. 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. Second, it parameterizes the metric matrix as an input-dependent function, enabling the attention geometry to dynamically adapt to the intrinsic manifold structure of the data rather than remaining fixed after training. We further introduce principled regularization strategies, most notably stack-wise parameter sharing, to ensure computational efficiency and stable optimization. DAMCHA serves as a drop-in replacement for MHA and its variants in various Transformer architectures, delivering superior expressive power and learning performance with comparable or reduced computational overhead. Extensive experiments demonstrate that DAMCHA-based Transformers consistently outperform competing baselines across a range of benchmark tasks. Code is available at https://github.com/erwinmsmith/DAMCHA.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 23 of its 42 references that are in the map. First posted on arXiv 9 Oct 2026.

Builds on

23 of 42 references.

References · 23

  1. 2017Attention Is All You Needcited by 60,361
  2. 2021Transformers in Vision: A Surveycited by 1,013
  3. 2019Are Sixteen Heads Really Better than One?cited by 816
  4. 2018Bilinear Attention Networkscited by 280
  5. 2019An Attentive Survey of Attention Modelscited by 124
  6. 2019Attention in Natural Language Processingcited by 101
  7. 2020Low-Rank Bottleneck in Multi-head Attention Modelscited by 89
  8. 2025Time-VLM: Exploring Multimodal Vision-Language Models for Augmented Time Series Forecastingcited by 63
  9. 2020Talking-Heads Attentioncited by 62
  10. 2020Multi-Head Attention: Collaborate Instead of Concatenatecited by 60
  11. 2022Mixture of Attention Heads: Selecting Attention Heads Per Tokencited by 60
  12. 2024Talking Heads: Understanding Inter-layer Communication in Transformer Language Modelscited by 41
11 more
  1. 2017Latent Relational Metric Learning via Memory-based Attention for Collaborative Rankingcited by 39
  2. 2023How Does Attention Work in Vision Transformers? A Visual Analytics Attemptcited by 30
  3. 2021Multi-head or Single-head? An Empirical Comparison for Transformer Trainingcited by 16
  4. 2018Deep Metric Learning by Online Soft Mining and Class-Aware Attentioncited by 13
  5. 2025GMAR: Gradient-Driven Multi-Head Attention Rollout for Vision Transformer Interpretabilitycited by 11
  6. 2024Improving Transformers with Dynamically Composable Multi-Head Attentioncited by 10
  7. 2019Attention Control with Metric Learning Alignment for Image Set-based Recognitioncited by 3
  8. 2024Towards understanding how attention mechanism works in deep learningcited by 3
  9. 2025Gateformer: Advancing Multivariate Time Series Forecasting through Temporal and Variate-Wise Attention with Gated Representationscited by 3
  10. 2026Why Loss Re-weighting Works If You Stop Early: Training Dynamics of Unconstrained Featurescited by 2
  11. 2026Multi-Head Low-Rank Attentioncited by 2

Built on by

Not cited yet.