A Concept-Based Explainability Framework for Large Multimodal Models

Jayneel Parekh, Pegah Khayatan, Mustafa Shukor, Alasdair Newson, Matthieu Cord

TL;DR

Large Multimodal Models (LMMs) are powerful but notoriously opaque. This paper introduces CoX-LMM, a novel explainability framework that uses dictionary learning to extract "multimodal concepts" from the internal representations of LMMs. By grounding these concepts simultaneously in both text and vision, the authors reveal how these models internally structure and align complex multimodal information.

Introduction

While deep neural networks have grown incredibly capable, their internal decision-making processes remain largely a "black box." This is especially true for Large Multimodal Models (LMMs)—like LLaVA or Flamingo—which combine visual encoders with Large Language Models (LLMs) to perform tasks such as image captioning and visual question answering.

Most existing interpretability research focuses either on vision-only models (like CNNs) or text-only LLMs. LMMs, however, operate in a blended space. The authors tackle the challenge of decoding the internal representations of LMMs to understand how they process, fuse, and represent visual and textual information together.

The CoX-LMM Methodology

The authors propose CoX-LMM (Concept eXplainability for LMMs), a dictionary-learning approach designed specifically for multimodal architectures.

Overview of the CoX-LMM framework

Here is how the framework operates:

  1. Representation Extraction: For a specific target word (e.g., "Dog"), the researchers collect the internal "residual stream" representations from the deep layers of the LMM across thousands of images where the model predicts that word.
  2. Dictionary Learning via Semi-NMF: They stack these representations into a matrix and decompose it using Semi-Non-negative Matrix Factorization (Semi-NMF). Standard NMF requires all positive numbers, which doesn't work for neural network residual streams that contain mixed values. Semi-NMF allows the input data to have mixed values but forces the concept activations to be non-negative. This encourages the model to learn interpretable, additive features. The resulting basis vectors act as a dictionary of "concepts."
  3. Multimodal Grounding: This is the core novelty. Each extracted concept is grounded in both modalities:
  4. Visually: They find the input images that maximally activate the concept.
  5. Textually: They project the concept vector through the LLM's unembedding layer (similar to the "Logit Lens" technique) to find the most highly associated words in the vocabulary.

Experimental Setup

The primary dataset used for training the concept dictionaries and evaluating the framework is the COCO dataset (using the standard Karpathy split for image captioning). The authors extract representations for common object tokens like "Dog", "Bus", "Train", "Cat", "Baby", "Car", "Cake", and "Bear".

Key Insights and Findings

  • Concepts are inherently multimodal: The extracted concept vectors don't just represent abstract math; they align coherently across vision and text. For example, a single concept for "Dog" might strongly activate on images of puppies and simultaneously decode to text tokens like "small", "tiny", and "puppy". Another might activate on images of dogs running and decode to "playing" or "running".
  • Multimodal understanding emerges late in the network: By analyzing different layers of the LLM, the authors found that this coherent multimodal grounding doesn't appear immediately. It only strongly emerges in the deeper layers of the network (around layers 20-25 out of 32). This suggests that early layers process raw, unaligned features, while later layers build fused semantic concepts.
  • Semi-NMF hits the sweet spot for interpretability: Compared to Principal Component Analysis (PCA) or K-Means clustering, Semi-NMF provides the best balance. It extracts concepts that are both highly meaningful (correlating well with the images) and disentangled (having low overlap in vocabulary between different concepts).

Quantitative Results

  • The authors evaluated the correspondence between the visual grounding (top activating images) and textual grounding (top decoded words) using CLIPScore and BERTScore.
  • For the token "Dog" on the DePALM model, the Semi-NMF concepts achieved a top-1 CLIPScore of 0.610, significantly outperforming random word baselines (0.519) and simple clustering (0.546).
  • Semi-NMF maintained a low concept overlap score (e.g., 0.086 for "Dog"), meaning the dictionary learns distinct, diverse features (like "hot dog", "black dog", "running dog") rather than redundant ones. K-Means, by contrast, had a massive overlap of 0.501.
  • The framework proved generalizable, showing consistent results across different architectures, including DePALM (which uses a frozen LLM) and LLaVA-v1.5 (which uses a fine-tuned LLM).

Limitations and Future Directions

  • Token-Specific Dictionaries: Currently, a separate dictionary must be learned for each specific token (e.g., one for "Dog", one for "Cat"). Future work could explore learning global dictionaries that share concepts across multiple tokens.
  • Scope of Tasks: The evaluation heavily focuses on image captioning models. Applying this to other LMM tasks (like complex reasoning or instruction following) remains an open area.
  • Grounding Techniques: The methods for visual and textual grounding are relatively straightforward. The authors suggest that using more advanced techniques, like Tuned Lens for text or better spatial localization (saliency maps) for images, could yield even richer interpretations.
  • Metric Imperfections: Automated metrics like CLIPScore and BERTScore are useful for validation but are imperfect proxies for human-perceived semantic alignment.

Summary updated

BibTeX
@inproceedings{parekh2024concept,
  author = {Jayneel Parekh and Pegah KHAYATAN and Mustafa Shukor and Alasdair Newson and Matthieu Cord},
  title = {{A Concept-Based Explainability Framework for Large Multimodal Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=MvjLRFntW6},
}
Figure