Investigating The Functional Roles of Attention Heads in Vision Language Models: Evidence for Reasoning Modules

Yanbei Jiang, Xueqi Ma, Shu Liu, Sarah Monazam Erfani, Tongliang Liu, James Bailey, Jey Han Lau, Krista A. Ehinger

TL;DR

This paper introduces an interpretability framework demonstrating that Vision-Language Models (VLMs) organize complex multimodal reasoning into sparse, specialized attention heads, mirroring functional regions in the human brain. By introducing CogVision—a dataset that breaks down complex queries into step-by-step cognitive subquestions—the authors successfully identify, map, and manipulate these "functional heads" across multiple VLM families. Their findings reveal that these specialized heads are universal, hierarchical, and causally essential for multi-step reasoning.

What Problem Does This Paper Address?

While Vision-Language Models (VLMs) excel at multimodal benchmarks, they primarily operate as "black boxes." When a human solves a complex visual problem, different brain regions collaborate: the occipital lobe handles visual reception, the temporal lobe recalls factual knowledge, and the prefrontal cortex manages higher-order reasoning.

Figure 1: To answer a complex question, the human brain engages multiple regions, each performing distinct cognitive functions. We investigate whether specific attention heads in large vision language models play analogous functional roles in generating responses.

Prior interpretability research has identified specialized attention heads in Large Language Models (LLMs) and simple VLM tasks like visual grounding. However, how VLMs coordinate internal mechanisms during complex, multi-step reasoning remains poorly understood. This paper addresses this gap by systematically analyzing whether VLMs possess localized attention heads dedicated to specific perceptual and cognitive functions.

Methods

The authors develop a probing-based framework to detect and analyze functional specialization in VLMs:

  1. Decomposition via Chain-of-Thought (CoT): Complex questions are broken down into sequential subquestions, each isolated to a single cognitive skill.
  2. Head Feature Extraction: During model inference, attention head outputs are extracted. To isolate semantically informative content, an LLM selects the top-$k$ most important tokens from the generated answer, and their activation features are averaged.
  3. Function Probing: The authors train individual logistic regression probes (one per head, per layer, per function) to predict whether a head's activation corresponds to a correct answer for a specific target function.
  4. Causal Interventions:
  5. Negative Intervention (Masking & Patching): Suppressing a head's output by scaling it down ($\epsilon = 0.001$) or replacing its activations with random/mean activations from other functions to verify its necessity.
  6. Positive Intervention: Shifting head activations along the calculated "functional direction" to actively enhance specific capabilities during inference.

Datasets

The authors introduce CogVision, a newly constructed dataset containing 1,409 main questions and 5,744 validated subquestions. It samples diverse problems spanning logical, mathematical, and commonsense reasoning from 9 existing benchmarks: Clevr-Math, MathVision, MathVista, MMMU, ScienceQA, OKVQA, VCR, VisuLogic, and Super-Clevr.

Each subquestion in CogVision is annotated with one of eight core functions:

  • Vision-related: Low-level Visual Reception, High-level Visual Reception, Visual Knowledge Recall.
  • Language-related: Language Information Extraction & Understanding, Language Knowledge Recall, Math Reasoning, Inference, Decision-Making.

For out-of-domain downstream evaluation, the authors use OKVQA, MathVista, and VisuLogic.

Key Insights and Ideas

  • Extreme Sparsity: Functional specialization is highly localized. Fewer than 7% of all attention heads achieve high accuracy ($\ge 0.9$) across the eight cognitive functions.
  • Universal and Intrinsic Architecture: This sparse modular organization is remarkably consistent across different VLM families (Qwen, InternVL, Gemma) and model scales, proving that modular specialization is an intrinsic property of multimodal transformer training.
Figure 2: The existence of cognitive heads in Qwen2.5-VL-7B responsible for eight distinct func- tions in complex reasoning tasks. The x-axis represents the head index, while the y-axis indicates the layer index. The values denote head importance scores, capped at a cutoff of 0.60.
  • Hierarchical Organization: VLMs exhibit a clear functional hierarchy. Lower-level perceptual heads (e.g., visual reception) directly modulate and support higher-level cognitive heads (e.g., inference and decision-making).
  • Cross-Functional Overlap: While heads are specialized, they are not entirely isolated; roughly 18% of cognitive heads in Qwen2.5-VL-7B participate in more than one function, acting as integrative bridges across tasks.

Key Results

  • Causal Necessity via Masking: Gradually removing the identified cognitive heads leads to a catastrophic drop in task performance compared to removing random heads. For example, masking the top 10% of task-relevant heads drops the model's accuracy close to 0% on several reasoning tasks.
Figure 4: The performance of Qwen2.5-VL-3B after masking out top K cognitive heads vs K random heads on inference, high-level visual reception, low-level visual reception, and decion-making.
  • Performance Boosting via Positive Intervention: Steering head activations along their functional direction successfully enhances model accuracy. Positive intervention on vision knowledge recall heads in InternVL3-8B boosted its in-domain question-answering accuracy from 88.54% to 91.67%. It also yielded consistent improvements on out-of-domain benchmarks like MathVista and VisuLogic.

Limitations and Future Work

The authors acknowledge a few key limitations:

  • Predefined Taxonomy: The framework relies on eight predefined cognitive functions, which may not capture the full spectrum of emergent VLM capabilities.
  • Attention-Centric Focus: The study isolates attention heads but leaves Multi-Layer Perceptrons (MLPs) and residual stream dynamics unexplored.

Future work includes expanding this cognitive taxonomy to include finer-grained functions and developing advanced probing methods to analyze other internal architectural components of VLMs.

Summary updated

BibTeX
@misc{jiang2025investigating,
  author = {Yanbei Jiang and Xueqi Ma and Shu Liu and Sarah Monazam Erfani and Tongliang Liu and James Bailey and Jey Han Lau and Krista A. Ehinger},
  title = {{Investigating The Functional Roles of Attention Heads in Vision Language Models: Evidence for Reasoning Modules}},
  year = {2025},
  eprint = {2512.10300},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.10300},
}
Figure