MultiViz: Towards Visualizing and Understanding Multimodal Models

Paul Pu Liang, Yiwei Lyu, Gunjan Chhablani, Nihal Jain, Zihao Deng, Xingbo Wang, Louis-Philippe Morency, Ruslan Salakhutdinov

TL;DR

MultiViz is a comprehensive visualization toolkit that scaffolds the "black box" of multimodal model interpretability into four distinct stages: unimodal importance, cross-modal interactions, internal representations, and final prediction logic. By providing a modular, human-in-the-loop framework, it enables researchers to not only understand model behavior but also perform precise error analysis and uncover deep-seated implementation bugs in popular machine learning libraries.

What Problem Does This Paper Address?

Multimodal models—which integrate diverse data sources like text, images, and audio—are becoming ubiquitous in fields ranging from healthcare to robotics. However, these models are typically deep neural networks (like Transformers) that act as "black boxes."

While we have tools to see which pixels in an image or words in a sentence are "important," we lack a unified way to see the flow of information. Specifically, it is difficult to determine how different modalities interact (e.g., how the word "bird" relates to a specific region of an image), how these interactions form internal concepts, and how those concepts are weighted to produce a final decision. Without this transparency, it is nearly impossible for stakeholders to trust these models or debug them effectively when they fail.

Methods

The authors propose scaffolding multimodal interpretability into four complementary stages, as illustrated in Figure 1:

Figure 1: Left: We scaffold the problem of multimodal interpretability and propose MULTIVIZ, a comprehensive analysis method encompassing a set of fine-grained analysis stages: (1) unimodal importance identifies the contributions of each modality, (2) cross-modal interactions uncover how different modalities relate with each other and the types of new information possibly discovered as a result of these relationships, (3) multimodal representations study how unimodal and cross-modal interactions are represented in decision-level features, and (4) multimodal prediction studies how these features are composed to make a prediction. Right: We visualize multimodal representations through local and global analysis. Given an input datapoint, local analysis visualizes the unimodal and cross-modal interactions that activate a feature. Global analysis informs the user of similar datapoints that also maximally activate that feature, and is useful in assigning human-interpretable concepts to features by looking at similarly activated input regions (e.g., the concept of color).
  1. Unimodal Importance (U): Identifies how much each individual modality contributes to a prediction using standard feature attribution methods like LIME or integrated gradients.
  2. Cross-modal Interactions (C): Uncovers how modalities relate. A key technical contribution here is the use of second-order gradients to isolate non-additive interactions. By taking the gradient of the model with respect to a specific word and then taking the gradient of that result with respect to image pixels, the authors can highlight exactly which parts of an image interact with that specific word (see Figure 2/5).
  3. Multimodal Representations (R): Studies how these interactions are represented in the model's penultimate layer. This involves Local Analysis (what activates a feature in a specific instance) and Global Analysis (retrieving other data points that activate the same feature to assign it a human-interpretable concept like "color" or "material").
  4. Multimodal Prediction (P): Approximates the final decision layer using a sparse linear model. This tells the user which internal "concept" neurons are actually driving the final classification and by how much.
Figure 2: Examples of cross-modal interactions discovered by our proposed second-order gradient approach: first taking a gradient of model f with respect to an input word (e.g., x1 = birds), before taking a second-order gradient with respect to all image pixels (highlighted in green) or bounding boxes (in red boxes) x2 indeed results in all birds in the image being highlighted.

Datasets

The authors evaluated MultiViz across 8 models and 6 real-world tasks:

  • Multimodal Fusion: CMU-MOSEI (sentiment/emotion), MM-IMDb (movie genre classification), and MIMIC-III (healthcare mortality/ICD-9 coding).
  • Multimodal Retrieval: Flickr-30k (image-caption matching).
  • Question Answering (QA): CLEVR (synthetic reasoning) and VQA 2.0 (real-world image QA).

Key Insights and Ideas

  • Scaffolding is Essential: The paper demonstrates that interpretability isn't a single "score." By breaking the process into stages, users can pinpoint exactly where a model fails—whether it's a failure in perception, interaction, or reasoning.
  • Efficiency of Second-Order Gradients: Their proposed method for finding cross-modal interactions is significantly faster than previous state-of-the-art methods (like DIME), which often required thousands of model passes.
  • Global Context Defines Features: A single "important" region in one image might be ambiguous. By looking at the top-$k$ images that activate a specific neuron (Global Analysis), humans can consistently and confidently assign labels to previously uninterpretable features.
  • Interpretability Enables Debugging: The tool isn't just for passive observation; the authors show it can be used in an active learning loop to select targeted data that fixes specific model weaknesses.

Key Results

  • Model Simulation: In a human study, users were asked to predict a model's output based only on visualizations. Users with access to all four MultiViz stages achieved 81.7% accuracy on VQA 2.0, compared to just 55% for those with only unimodal information.
  • Real-World Bug Discovery: Using MultiViz, the authors investigated why a pretrained LXMERT model consistently failed on the color "blue." They traced the error to the prediction stage and discovered a bug in the popular Hugging Face implementation: the image preprocessing was swapping RGB and BGR channels.
  • Performance Correlation: The authors found that a model's ability to capture cross-modal alignments (as measured by MultiViz) correlates strongly with its final task performance, suggesting that "better" models are indeed learning more sophisticated interactions.

Limitations and Future Work

  • Class Sparsity: For tasks with thousands of possible answers (like VQA), the sparse linear model in the Prediction stage can struggle to find relevant neurons for very rare answer choices.
  • Architecture Requirements: The current framework requires models to have categorical outputs and be differentiable. It does not yet support neuro-symbolic models that use discrete, non-differentiable reasoning steps.
  • Future Directions: The team plans to integrate more complex prediction interpreters (like decision trees) and expand the toolkit to support multimodal translation tasks (e.g., image captioning) where the output is a sequence rather than a single label.

Summary updated

BibTeX
@inproceedings{liang2023multiviz,
  author = {Paul Pu Liang and Yiwei Lyu and Gunjan Chhablani and Nihal Jain and Zihao Deng and Xingbo Wang and Louis-Philippe Morency and Ruslan Salakhutdinov},
  title = {{MultiViz: Towards Visualizing and Understanding Multimodal Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=i2_TvOFmEml},
}
Figure