Introduction
While Vision-Language Models (VLMs) leverage Large Language Models (LLMs) as their core reasoning engines, the exact mechanism by which these models process visual inputs remains largely opaque. Modern "adapter-style" VLMs, such as LLaVA, operate by dividing an image into patches, processing them through a vision encoder like CLIP, and using a small adapter network to map them into "soft prompts." These visual prompts are then fed into a frozen, pre-trained LLM alongside standard text.
Although the mechanistic interpretability community has made significant strides in understanding how LLMs process text, a massive "modality gap" exists for images. Do visual tokens behave like text tokens? Is information about a specific object smeared across the entire image representation, hidden in global "register" tokens, or localized to the exact patches where the object appears? Furthermore, how does the LLM extract this visual information to answer a user's prompt? This paper cracks open the black box to answer these foundational questions, revealing that object information is spatially localized, naturally evolves into interpretable text concepts, and is extracted directly to the final token for predictions.
Methods
The authors investigate the inner workings of LLaVA 1.5 (with validations on LLaVA-Phi and Qwen2-VL) using three primary interpretability techniques:
- Token Ablation: To determine where object information resides, specific visual tokens are swapped with a "mean" visual token (calculated from ImageNet). The study tests ablating object-specific tokens, surrounding buffer tokens, high-gradient tokens, and global register tokens to observe which removals cause the model to fail at object identification.
- Logit Lens: Applying a classic LLM technique to images, the authors take the hidden state of a visual token at intermediate layers and project it into the text vocabulary space. This reveals whether the model internally translates visual patches into human-readable text concepts.
- Attention Knockout: To trace information flow, attention connections between specific groups of tokens are artificially blocked across different layers (e.g., preventing the final text token from attending to the object's visual tokens), and the impact on accuracy is measured.
Datasets
The experiments rely on three distinct datasets:
- Filtered COCO Detection: 4,318 images filtered for simplicity (single object instances, specific size ranges) and controlled for hallucinations to ensure the model relies on visual data rather than context clues.
- Curated VQA Dataset: A custom set of 100 images with unambiguous object-identification questions, used specifically for attention knockout experiments.
- ImageNet Validation Split: 50,000 images used solely to compute the "average" visual token embedding for ablation studies.
Key Insights and Results
Spatial Localization Wins
The LLM does not simply rely on global background tokens to identify image contents; information is highly localized. To blind the model to an object, one must ablate the specific tokens corresponding to its spatial coordinates.
- Result: Removing object tokens (plus a 1-token adjacent buffer) caused massive performance drops in LLaVA 1.5: a 71.8% drop in generative description accuracy and an 86.7% drop in VQA accuracy. This impact far exceeded that of ablating random tokens or tokens identified by gradient-based attribution methods.
The Logit Lens Works on Images
Arguably the most surprising finding is that in the middle-to-late layers, the LLM forces visual tokens into its native text vocabulary space, despite being fine-tuned on visual question-answering rather than next-token prediction for images.
- Result: Using the logit lens, the authors found that an average of 23.7% of object patch tokens map directly to the correct text class token in the vocabulary. This alignment peaks late in the network (around layer 25 out of 33 for LLaVA 1.5).
Direct Extraction over Summarization
Previous work hypothesized that VLMs might summarize the entire image into the very last visual token before generating text. This paper refutes that notion for object identification tasks. Instead, the final text token directly attends to the specific object tokens in the mid-to-late layers to extract the answer.
- Result: Blocking attention from object tokens to the final token position in mid-to-late layers severely degrades performance. Conversely, blocking attention from all visual tokens to the last row of visual tokens had almost zero impact, proving the model bypasses any final "summarization" step.
Limitations and Future Work
The authors note that because the study focuses heavily on adapter-style VLMs, these findings might not perfectly generalize to natively multimodal architectures. Additionally, the experiments are restricted to relatively simple object identification tasks, which may not capture the full complexity of multi-step visual reasoning.
Looking forward, these insights offer exciting practical applications. For instance, researchers could extract "free" coarse segmentation maps using the logit lens, or actively tweak attention weights during inference to force the model to focus on specific objects, thereby reducing VLM hallucinations.
Summary updated