TL;DR
Visual-TCAV bridges the gap between pixel-level saliency maps and high-level concept explanations for CNNs. By pairing Concept Activation Vectors (CAVs) with a layer-wise generalization of Integrated Gradients, it produces spatial heatmaps showing where a concept is detected alongside scalar attribution scores showing how much that concept drives a specific classification.
What Problem Does This Paper Address?
Current explainability techniques for deep computer vision models generally fall into two disconnected categories:
- Saliency methods (e.g., Grad-CAM, Integrated Gradients) highlight which pixels or spatial regions influenced a prediction, but they cannot explain what high-level semantic features (e.g., texture, shape, color) the model relied on within those regions.
- Concept-based methods (e.g., TCAV) evaluate whether high-level human concepts (like "stripes" or "dimples") influence a model's decisions globally. However, standard TCAV only checks gradient directions (signs, not magnitudes), cannot localize concepts in individual input images, and cannot quantify concept attribution for single predictions.
Visual-TCAV provides both spatial localization and quantitative attribution for user-defined concepts on any unmodified, pre-trained CNN.
Methods
Visual-TCAV operates on intermediate convolutional feature maps through a three-step pipeline:
[Concept Examples] ──> Difference of Means + GAP ──> Pooled-CAV
│
[Input Feature Maps] ──x── [Pooled-CAV Weights] ─────────┴─> Concept Map (Spatial Mask)
│ │
└──> Integrated Gradients (w.r.t. Feature Maps) ──x──────┘──> Concept Attribution
- Pooled-CAV Generation: Rather than training an SVM, the authors compute a Concept Activation Vector using the Difference of Means between concept activations and random activations, then apply Global Average Pooling (GAP) across spatial dimensions. This yields a 1D vector where each entry reflects a channel’s correlation with the concept.
- Concept Map ($M^c$): Analogous to Grad-CAM, the Pooled-CAV entries serve as weights in a linear combination of the input image's feature maps, passed through a ReLU to retain only positive evidence. The resulting heatmap is normalized against an ideal concept scale factor derived from the exemplar set.
- Concept Attribution: To compute how much the concept drives the target class logit, the authors run Integrated Gradients (IG, 300 steps) directly with respect to intermediate activations rather than input pixels. The channel attributions are weighted by the normalized Pooled-CAV, and the Concept Map is applied as an element-wise spatial mask. Summing these values gives a localized, bounded attribution metric.
Datasets
- Pretrained Architectures: GoogLeNet, InceptionV3, VGG16, and ResNet50V2 trained on ImageNet.
- Concept Libraries:
- Textures sourced from the Describable Textures Dataset (DTD) (e.g., striped, waffled, chequered).
- Synthetic concept sets generated via text prompts using Stable Diffusion v1.5 (e.g., pews, fresco, arches, brass).
- Web-scraped photo sets (minimum 30 concept images + 500 negative random images per concept).
- Controlled Validation Benchmark: A custom dataset using three classes (cucumber, taxi, zebra) injected with colored letter tags at varying dataset corruption ratios (0%, 25%, 50%, 75%, and 100%) to establish an explicit ground truth for whether models prioritize the semantic entity or the shortcut tag.
Key Insights and Ideas
- Gradient magnitude matters: TCAV counts only positive directional derivatives. Visual-TCAV incorporates magnitude via Integrated Gradients, allowing it to differentiate between concepts that are merely detected versus those that heavily sway classification logits.
- Disentangling co-located concepts: Two concepts (e.g., "stripes" and "fur") may occupy identical spatial coordinates on a zebra. Saliency maps conflate them; Visual-TCAV isolates each concept's attribution by filtering through concept-specific channels.
- Receptive field vs. decision depth trade-off: Accurate concept localization maps appear primarily in earlier-to-mid convolutional layers (where receptive fields remain spatially localized), whereas numerical attributions peak at the deepest convolutional layers adjacent to the classification head.
Key Results
- Controlled Ground Truth Validation: On the poisoned tag benchmark with swapped test tags, Visual-TCAV attributions tightly mirrored model accuracy shifts. For the 100% tagged model, Visual-TCAV correctly assigned near-zero attribution to the "Z" tag on zebras—revealing that the CNN learned a shortcut rule relying purely on the absence of taxi ("T") and cucumber ("C") tags. Standard TCAV scores failed to capture these proportional shifts, maintaining near-identical scores across 25%–100% tag rates.
- Computational Efficiency: Generating local explanations across 7 layers and 300 IG steps takes under 1 minute on an RTX 4060 Ti GPU. Global explanations (200 images) take 5–20 minutes and remain roughly constant regardless of how many concepts are evaluated concurrently.
Limitations and Future Work
- Positive-Only Attribution: The formulation currently restricts attention to positive attributions and positive logits via ReLU gating, omitting suppressive or negative concept influences.
- IG Path Noise: Integrating gradients along a linear baseline path can accumulate gradient noise, occasionally underestimating attribution magnitude.
- Reliance on Exemplar Quality: CAV generation depends on clean exemplar images; noisy web sets or artifacts in diffusion-generated concepts can degrade the vectors without careful filtering.
Summary updated