From Behavioral Performance to Internal Competence: Interpreting Vision-Language Models with VLM-Lens

Hala Sheta, Eric Huang, Shuyu Wu, Ilia Alenabi, Jiajun Hong, Ryker Lin, Ruoxi Ning, Daniel Wei, Jialin Yang, Jiawei Zhou, Ziqiao Ma, Freda Shi

TL;DR

This paper introduces VLM-Lens, a unified, open-source toolkit that simplifies the extraction of intermediate representations from any layer of various vision-language models (VLMs). This enables deeper analysis of VLM internal workings beyond simple accuracy metrics, revealing systematic differences in how models represent concepts and offering a more robust way to benchmark and understand VLM capabilities.

What Problem Does This Paper Address?

Vision-language models (VLMs) are becoming increasingly powerful and are used in a wide array of applications. However, current evaluation methods primarily rely on exact-match accuracy, which can overlook crucial information embedded in the models' internal representations and may be susceptible to "shortcut learning" where models exploit superficial patterns rather than true understanding. Furthermore, the field of VLM interpretability is significantly less developed than that for text-only models. Existing tools often require extensive customization for each new VLM, lack a unified interface, and struggle to handle the diverse and sometimes conflicting library dependencies of different models. This makes it challenging to systematically analyze and understand the internal "competence" of VLMs, i.e., their underlying knowledge and reasoning processes.

Methods

VLM-Lens tackles these challenges by providing a unified, YAML-configurable interface for extracting intermediate outputs from any layer of a VLM during its forward pass. The core mechanism leverages PyTorch's hook functionality to intercept and store these internal representations. Key features include:

  • Unified Interface: Abstracts away model-specific setup and preprocessing, allowing users to specify configurations via a YAML file.
  • Model-Specific Environment Support: Manages diverse and potentially conflicting library requirements for different VLMs with easy-to-install environment setups.
  • Extensive Model Coverage: Supports a wide range of state-of-the-art VLMs (16 base models and over 30 variants) and is designed for easy extensibility to new models.
  • Standardized Output: Extracted representations are stored in a standardized SQLite database for efficient retrieval and analysis.

The toolkit is designed to integrate seamlessly with existing interpretability and analysis methods.

Datasets

The paper demonstrates VLM-Lens's utility with two analytical experiments:

  • Probing Dataset: A dataset derived from CLEVR (Johnson et al., 2017) is used. This dataset is split into five categorical categories (color, material, number, shape, size) and a boolean split, each representing primitive object attributes. For each split, 80% of the data is used for training probes and 20% for testing.
  • Concept Similarity Dataset: Inspired by the Stroop Effect, this experiment uses custom images with deliberate incongruities between lexical color terms, font colors, and background colors. Reference images for primitive color concepts were retrieved using the Google Images API.
  • System Evaluation Dataset: A subset of the MSCOCO validation set (Lin et al., 2014) with 2,690 examples is used for evaluating inference time and memory efficiency.

Key Insights and Ideas

  • Beyond Accuracy: VLM-Lens highlights that accuracy alone is insufficient for evaluating VLM competence. Models that perform well on standard benchmarks can still exhibit significant weaknesses when probed on their internal representations.
  • Layer-Specific Representations: Different layers within VLMs capture distinct types of information. For instance, later layers often encode more abstract or task-relevant features.
  • Salience of Color: The color attribute appears to be particularly salient across many VLMs, with probes trained on color information showing a significant advantage over control probes.
  • Instruction-Following Matters: Models with strong instruction-following and multimodal understanding capabilities (like Qwen2-VL, MiniCPM-0, and InternVL) tend to perform better on more complex probing tasks, especially when using later layer representations.
  • Lexical vs. Visual Color: In the Stroop-like experiment, while background color provided the strongest contrast, lexical content (the word itself) was surprisingly more prominent than font color in some models, suggesting nuanced ways VLMs process color information.
  • Color Encoding is Distributed: Color information is not captured in a single linear direction within the representation space; a sufficient number of PCA components are needed to achieve clear separation between matched and mismatched conditions.

Key Results

  • Probing Performance: The paper shows systematic differences in probing accuracy across models, layers, and splits. Models like Qwen2-VL and MiniCPM-o achieved near-perfect accuracy on many splits, demonstrating strong internal competence. Conversely, models like LLaVA-1.5-7B showed a smaller difference between main and control probes, indicating weaker internal competence.
  • Inference Time and Memory: CLIP is the fastest model due to its architecture and contrastive learning approach. InternVL, InternLM-XComposer-2.5, and MolMo are among the slowest. bfloat16 and float16 precision generally reduce memory usage, but effectiveness varies by architecture.
  • Stroop Task: VLM-Lens successfully demonstrated that VLMs encode lexical content, font color, and background color information, with background color yielding the strongest contrast.

Limitations and Future Work

  • Limited Downstream Tasks: The current VLM-Lens toolkit primarily supports probing and does not directly facilitate more complex downstream tasks like attention interpretation or neural circuit discovery.
  • No Gradient-Based Analysis: The current inference and database storage approach prevents the use of gradient-based saliency analyses such as Grad-CAM.
  • Community Contributions: The authors anticipate that users will extend the toolkit with customized functions for various tasks, and they are committed to supporting community contributions. Future work could involve integrating more advanced interpretability methods and expanding the range of supported downstream tasks.

Summary updated

BibTeX
@inproceedings{sheta2025from,
  author = {Hala Sheta and Eric Huang and Shuyu Wu and Ilia Alenabi and Jiajun Hong and Ryker Lin and Ruoxi Ning and Daniel Wei and Jialin Yang and Jiawei Zhou and Ziqiao Ma and Freda Shi},
  title = {{From Behavioral Performance to Internal Competence: Interpreting Vision-Language Models with VLM-Lens}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2025},
  url = {https://openreview.net/forum?id=r3s6U0MvXx},
}
Figure