A Multimodal Automated Interpretability Agent

Tamar Rott Shaham, Sarah Schwettmann, Franklin Wang, Achyuta Rajaram, Evan Hernandez, Jacob Andreas, Antonio Torralba

Abstract

Understanding the internal logic of deep neural networks remains a significant challenge, often requiring labor-intensive manual analysis. We present MAIA, an agentic framework that leverages vision-language models (VLMs) to autonomously conduct interpretability experiments. Unlike static labeling methods, MAIA iteratively generates and edits images to test causal hypotheses about neuron behavior. Our results demonstrate that MAIA produces descriptions comparable to human experts, identifies systematic biases, and enables model auditing by pinpointing neurons reliant on spurious correlations.

Introduction

Deep learning models are frequently described as "black boxes," where the internal representations that drive decision-making are opaque to human observers. While existing tools can visualize activations or identify dataset exemplars, moving from visual inspection to a rigorous scientific explanation is a slow and expensive process. Traditional automated interpretability methods often suffer from two primary flaws: they are non-interactive, providing only a single-pass label, and they lack precision because they characterize behavior based on limited, static datasets.

This paper introduces the Multimodal Automated Interpretability Agent (MAIA), a system designed to perform causal interventions. By actively "poking and prodding" a model with new, synthetic data, MAIA can determine precisely which features trigger specific neural responses, moving beyond simple correlation to causal understanding.

The MAIA Framework

MAIA is built on a GPT-4V backbone and operates as an autonomous experimentalist. The agent interacts with the target model and its environment through two primary interfaces:

1. System API

This API allows MAIA to "instrument" a target model (such as ResNet, DINO, or CLIP). The agent can query specific neurons to retrieve activation values and generate "masked" images that highlight the specific pixels the neuron is prioritizing.

2. Tool API

MAIA composes Python programs to execute a suite of sophisticated tools:

  • dataset_exemplars: Identifies top-activating real-world images from ImageNet.
  • text2image: Utilizes DALL-E 3 or Stable Diffusion to synthesize novel test cases.
  • edit_images: Employs Instruct-Pix2Pix for targeted modifications (e.g., "remove the bowtie from the dog") to isolate variables.
  • describe_images & summarize_images: Uses a separate VLM instance to provide impartial descriptions of results, acting as a safeguard against the agent's internal confirmation bias.

MAIA follows an iterative scientific loop: it observes initial data, forms a hypothesis, writes a script to test that hypothesis with synthetic images, observes the results via the impartial observer, and refines its conclusion.

Experimental Methodology

The researchers evaluated MAIA across diverse architectures, including ResNet-152 (supervised), DINO (self-supervised ViT), and CLIP (multimodal). To provide objective scoring, the authors developed a novel benchmark of 85 "synthetic vision neurons" with ground-truth selectivity (e.g., "stripes" or "dog on a leash") created using Grounded DINO and Segment Anything Model (SAM). Additionally, the system was tested on the Spawrious dataset to evaluate its ability to handle spurious correlations, such as specific dog breeds consistently appearing against specific backgrounds.

Key Insights

Interpretability as Experimental Science

A core contribution of this work is the shift from labeling to experimentation. By generating out-of-distribution images—such as a horse with antelope horns—MAIA can distinguish between a "horse detector" and a "horn detector" in a way that static datasets cannot. This allows for a much higher degree of granularity in neuron characterization.

The Multi-Agent "Impartial Observer"

To prevent the agent from falling into confirmation bias (seeing only what it expects to see), the framework utilizes a separate VLM instance to describe experimental results. This "blind" observer ensures that the agent’s final summary is grounded in objective visual evidence rather than its own prior hypotheses.

Model Auditing and Surgery

MAIA is not merely a descriptive tool; it is an actionable auditing system. The authors demonstrated that MAIA could identify neurons relying on spurious background features. By "editing" the model—specifically, by removing these biased neurons—the researchers significantly improved model accuracy on shifted test data.

Results

  • Predictive Accuracy: In evaluations where neuron labels were used to predict activations on unseen data, MAIA significantly outperformed MILAN, a state-of-the-art non-interactive baseline.
  • Human-Level Performance: In a Two-Alternative Forced Choice (2AFC) test, human judges preferred MAIA’s descriptions over MILAN’s 73% of the time. Furthermore, MAIA's descriptions were found to be on par with those generated by human experts using the same toolset.
  • Robustness Improvements: On the Spawrious dataset, using MAIA to select robust neurons for a final classifier improved test accuracy from 73.1% to 83.7%, surpassing standard regularization techniques.
  • Bias Discovery: MAIA successfully identified that a "Tench" (fish) classifier was actually biased toward images of people holding fish in fishing contexts, rather than the fish itself.

Limitations and Future Work

While MAIA represents a significant step forward, it remains dependent on the reliability of its underlying tools. If the image generator or editor fails to follow instructions accurately, the agent may draw incorrect conclusions. Additionally, while MAIA handles individual neurons effectively, explaining complex sub-circuits or entire network behaviors remains a challenge for current LLM reasoning capabilities. Future work will focus on scaling these reasoning capabilities and improving the precision of the synthetic generation tools to allow for even more nuanced model auditing.

Summary updated

BibTeX
@inproceedings{shaham2024multimodal,
  author = {Tamar Rott Shaham and Sarah Schwettmann and Franklin Wang and Achyuta Rajaram and Evan Hernandez and Jacob Andreas and Antonio Torralba},
  title = {{A Multimodal Automated Interpretability Agent}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=mDw42ZanmE},
}
Figure