Mind the Heads: Topological Representation Alignment for Multimodal LLMs

Davide Caffagni, Alberto Compagnoni, Federico Melis, Sara Sarto, Pier Luigi Dovesi +3 more
6/22/2026
cs.CVcs.AIcs.CL

No official code found. Best implementation: aimagelab/HeRA (4 stars, last commit 2026-06-17).

Abstract

Representation alignment has emerged as an effective approach to improve Multimodal Large Language Models (MLLMs) by regularizing their internal representations toward those of an external vision encoder. However, existing methods typically align a fixed layer of the language backbone, overlooking the fine-grained structure of Transformer models. In this work, we propose Head-Wise Representation Alignment (HeRA), a method that enforces cross-modal alignment at the level of individual attention heads. Our approach is grounded in the Platonic Representation Hypothesis, focusing on preserving the topological structure of representations (i.e., their local neighborhood relationships) across modalities. Following the Mutual K-Nearest Neighbor (MKNN) alignment metric, we introduce a contrastive objective that acts as a differentiable proxy for matching local structures. HeRA applies this objective during multimodal training to specific attention heads in the LLM, selected by their alignment score according to the MKNN metric. Counterintuitively, we find that aligning the least aligned heads yields the largest gains. Extensive evaluations across multiple MLLMs and 18 benchmarks demonstrate that HeRA consistently improves performance on challenging vision-centric tasks and serves as an effective regularizer against visual hallucinations by naturally curbing the over-reliance on linguistic priors. Our code is publicly released.

View on arXivView PDF

Code Implementations(1)

aimagelab/HeRACommunity61%

Mind the Heads: Topological Representation Alignment for Multimodal LLMs

40May 8, 20264 months ago

Similar Papers

Cite this paper

@article{caffagni2026mind,
  title  = {Mind the Heads: Topological Representation Alignment for Multimodal LLMs},
  author = {Davide Caffagni and Alberto Compagnoni and Federico Melis and Sara Sarto and Pier Luigi Dovesi and Mark Granroth-Wilding and Marcella Cornia and Lorenzo Baraldi},
  year   = {2026},
  eprint = {2606.23885},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2606.23885v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2606.23885.svg)](https://codeofpaper.com/paper/2606.23885)

Discussion