Introduction
Understanding the decision-making processes of deep neural networks is a persistent challenge due to their immense size, complexity, and opaque internal states. This paper introduces Testing with Concept Activation Vectors (TCAV), a novel interpretability method that explains neural network decisions using high-level, human-understandable concepts (like "stripes" or "gender") rather than low-level features (like individual pixels). By leveraging directional derivatives in a model's internal activation space, TCAV allows users to quantitatively test how important custom concepts are to a model's predictions globally, all without needing to modify or retrain the underlying network.
The Limitations of Feature Attribution
Most traditional interpretability methods for deep learning, such as saliency maps, suffer from two major limitations:
- Low-Level Explanations: They operate on low-level input features, such as highlighting which pixels were most important for classifying a specific image. This does not map well to human reasoning; humans think in high-level concepts, not RGB values.
- Local Scope: They typically provide local explanations, meaning they only explain one specific prediction at a time. To understand if a model generally relies on the concept of "stripes" to identify "zebras," a human would have to manually review thousands of individual saliency maps.
Furthermore, users cannot easily test hypotheses about concepts the model wasn't explicitly trained on. If you want to know if an image classifier is biased by gender or race, traditional feature attribution methods struggle to provide a straightforward, quantitative answer.
Methods: Bridging Latent Space and Human Concepts
The authors bridge the gap between a model's complex internal state and human-interpretable concepts using Concept Activation Vectors (CAVs) and the TCAV testing framework.
- Defining Concepts with Examples: A user defines a concept simply by gathering a small set of examples (e.g., 30 images of striped textures) and a corresponding set of random negative examples.
- Learning the CAV: These images are passed through the trained network. At a chosen internal layer, the authors train a simple linear classifier to separate the activations of the concept images from the random images. The vector orthogonal to this decision boundary is the CAV—it represents the "direction" of that concept in the network's latent space.
- Directional Derivatives: To determine how much a concept matters for a specific class (e.g., "zebra"), TCAV calculates the directional derivative of the class prediction probability with respect to the CAV. If moving the internal activations toward the "stripe" direction increases the probability of "zebra," the concept is deemed important.
- The TCAV Score: The final TCAV score is a global metric: it represents the fraction of inputs for a given class whose predictions are positively influenced by the concept.
- Statistical Significance: To ensure the network didn't just learn a meaningless random vector, TCAV is run multiple times with different random negative sets. A rigorous t-test is then applied to filter out spurious concepts.
Experimental Setup and Datasets
The researchers tested TCAV across several domains using pre-trained models like GoogleNet and Inception V3. Concept datasets were built using images from ImageNet, the Broden dataset, and custom images scraped from search engines (e.g., images of dumbbells, textures, or colors).
To rigorously validate the method, they created a controlled "Ground Truth" dataset consisting of images of cabs, cucumbers, and zebras overlaid with text captions. The captions had varying levels of noise (0% to 100% mismatch with the image) to test whether models were looking at the image features or simply reading the text. They also applied TCAV to a real-world medical dataset of retinal fundus images used to train a model for predicting Diabetic Retinopathy (DR) grading.
Key Insights and Results
Global, Plug-and-Play Interpretability
TCAV allows anyone to test custom hypotheses on a frozen, pre-trained model. Concepts do not need to be defined during training. A user can simply provide 30 images of a new concept and quantitatively ask the model if that concept influences its predictions.
Saliency Maps Can Be Misleading
In the controlled experiment where the authors knew whether the model was relying on an image or a text caption, saliency maps completely failed to communicate this reliance to humans. In a 50-person human study, users looking at saliency maps guessed the correct important feature only 52% of the time—barely better than random chance. Conversely, the TCAV score perfectly tracked the ground truth: when the model relied on the image, the image TCAV score was high; when it relied on the text, the text TCAV score was high.
Discovering Hidden Biases
TCAV successfully quantified known but previously unmeasured biases in popular networks. For example, it proved that the prediction of "ping-pong ball" in Inception V3 was highly dependent on a specific race concept, and the "apron" class was heavily influenced by the "female" concept.
Debugging Medical AI
When applied to the Diabetic Retinopathy model, TCAV revealed why the model was over-predicting mild (level 1) cases as moderate (level 2). TCAV showed the model was incorrectly relying heavily on the concept of aneurysms (HMA)—a feature that doctors know is actually more indicative of level 2. This provided domain experts with actionable, clinical insight into the model's failure modes.
Limitations and Future Work
TCAV relies on the assumption that human concepts are linearly separable in the network's internal activation space. It also requires the user to manually curate a clean set of examples for every concept they want to test, which can be time-consuming.
Future work suggests applying TCAV to non-image domains like audio, video, and sequential data. The authors also propose using TCAV to identify and defend against adversarial examples. A highly promising future direction is developing methods to automatically discover and surface these concepts, rather than requiring humans to guess and provide examples a priori.
Summary updated