Mind the Heads: Topological Representation Alignment for Multimodal LLMs

Davide Caffagni, Alberto Compagnoni, Federico Melis, Sara Sarto, Pier Luigi Dovesi, Mark Granroth-Wilding, Marcella Cornia, Lorenzo Baraldi

TL;DR

The paper introduces Head-Wise Representation Alignment (HeRA), a method that enhances Multimodal Large Language Models (MLLMs) by surgically aligning the local topological structure of individual attention heads with a vision encoder. Counterintuitively, the authors find that targeting and aligning the least visually aligned heads yields the most significant performance gains. This fine-grained regularization boosts visual reasoning and curbs hallucinations without degrading the model's core language capabilities.

What Problem Does This Paper Address?

While Multimodal Large Language Models (MLLMs) excel at general conversation, they frequently stumble on foundational visual tasks like counting objects, identifying spatial relationships, and avoiding visual hallucinations. A popular remedy is representation alignment—regularizing the LLM's internal representations during training to match those of a high-quality, external vision encoder (acting as a teacher).

However, existing alignment methods suffer from two main flaws:

  1. Coarse Granularity: They typically target a single, hard-coded layer of the language model (e.g., the middle layer), completely ignoring the fine-grained, specialized structure of Transformer attention heads.
  2. Rigid Feature Matching: They force strict, point-wise feature matching between text and vision spaces. This rigid constraint often conflicts with the language model's pre-trained text priors, leading to a degradation in reasoning capabilities.

HeRA addresses these issues by shifting the focus from global layer matching to local, head-wise topological alignment.

Figure 1: Standard representation alignment imposes strict vision-language feature matching (left), while HeRA (center) matches cross-modal local neighbors, leading to superior VQA results (right).

Methods

HeRA is grounded in the Platonic Representation Hypothesis (PRH), which posits that models trained on different modalities naturally converge toward structurally similar latent spaces, particularly at a local level (i.e., semantically similar inputs share similar neighborhood relationships).

The method operates in three distinct phases:

  1. Diagnostic Ranking: Before multimodal training, the authors use the Mutual K-Nearest Neighbor (MKNN) metric to measure the alignment between the textual representations of individual attention heads and a teacher vision encoder (like DINOv2). This creates a baseline ranking of all attention heads from best to worst aligned.
  2. Targeted Selection: Instead of aligning all heads or the best ones, HeRA selects a small subset (typically $m=5$) of the least aligned heads.
  3. Topological Contrastive Learning: During training, a multi-target variant of the InfoNCE loss is applied specifically to these misaligned heads. Instead of forcing the head's features to exactly match the vision features, this loss ensures that the text representations share the same local neighborhood structure as the corresponding images in the teacher's vision space.
Figure 2: Overview of HeRA. Alongside the standard language modeling objective (LLM), HeRA employs a contrastive loss (LHeRA) to pull representations from selected LLM attention heads closer to their k-nearest neighbors (Top-k), computed in the latent space of a frozen teacher vision encoder.

The final training objective gracefully balances standard language modeling loss ($\mathcal{L}_{\text{LM}}$) with the head-wise alignment loss ($\mathcal{L}_{\text{HeRA}}$).

Datasets

  • Head Selection / Calibration: A subset of 1,000 highly detailed image-caption samples from the GranD dataset.
  • Training: Follows the standard two-stage LLaVA-1.5 pipeline (558k image-caption pairs for projector pre-training; LLaVA-Instruct-665k for visual instruction tuning). They also evaluate on an 83k-sample split from FineVision for state-of-the-art backbones like Qwen3-VL-4B.
  • Evaluation: Comprehensive testing across 18 benchmarks from the Cambrian suite, spanning four categories: General (GQA, POPE, MME, MMBench, SEED-Bench), Knowledge (ScienceQA, MMMU, MathVista, AI2D), OCR (ChartQA, OCRBench, TextVQA, VizWiz), and Vision-Centric (MMVP, RealWorldQA, Blink, V*, CVBench).
  • Hallucination Benchmarks: CHAIR-MSCOCO, AMBER, and HallusionBench.

Key Insights and Ideas

  • Fix What is Broken: Counterintuitively, forcing alignment on already well-aligned heads provides no downstream benefits. Aligning the least aligned heads acts as a powerful regularizer, bringing the lagging components into the multimodal fold while leaving the rest of the network undisturbed.
  • Local Neighborhoods > Global Geometry: Preserving local neighborhood structures (topological alignment) provides a flexible, differentiable proxy for cross-modal consistency without forcing rigid distance constraints that disrupt language generation.
  • Atomic Interventions Prevent Interference: By operating at the level of individual attention heads rather than entire layers, HeRA minimizes catastrophic interference with the LLM's pre-trained linguistic and reasoning priors.

Key Results

The authors evaluated HeRA across multiple LLM families (Vicuna, LLaMA3, Qwen2.5, Qwen3) ranging from 3B to 14B parameters:

  • Vision-Centric Boost: HeRA consistently drove up performance on demanding visual perception tasks. For example, it delivered a +3.6 point average increase on vision benchmarks for Qwen3-8B and a +3.4 point increase for Qwen2.5-14B.
  • Preserved Language Priors: Across General, Knowledge, and OCR categories, models trained with HeRA maintained or improved their scores, proving that head-level intervention protects core language capabilities.
  • Hallucination Mitigation: On the AMBER and CHAIR benchmarks, HeRA significantly lowered object hallucination rates. It successfully curbed the model's tendency to over-rely on language priors, forcing it to pay closer attention to the actual visual tokens.
  • Superiority Over Competitors: HeRA outperformed alternative representation alignment strategies (such as ROSS, VIRAL, and JARVIS) on demanding vision-centric benchmarks.

Limitations and Future Work

While HeRA marks a significant step forward, the authors note a few limitations:

  • Fine-Grained Visual Failures: Despite overall improvements, the model can still struggle in highly cluttered scenes, with ambiguous shapes/materials, or when counting very small instances.
  • Framework Constraints: The extensive ablations were primarily conducted within the LLaVA framework to remain computationally tractable.

Future Directions: Exploring dynamic head selection during training or scaling this topological alignment approach to natively multimodal, frontier proprietary architectures.

Summary updated

BibTeX
@inproceedings{caffagni2026mind,
  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},
  title = {{Mind the Heads: Topological Representation Alignment for Multimodal LLMs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=RBeMQGtXpJ},
}
Figure