Auditing Visualizations: Transparency Methods Struggle to Detect Anomalous Behavior

Jean-Stanislas Denain, Jacob SteinhardtarXiv 2022

Abstract

Model visualizations provide information that outputs alone might miss. But can we trust that model visualizations reflect model behavior? For instance, can they diagnose abnormal behavior such as planted backdoors or overregularization? To evaluate visualization methods, we test whether they assign different visualizations to anomalously trained models and normal models. We find that while existing methods can detect models with starkly anomalous behavior, they struggle to identify more subtle anomalies. Moreover, they often fail to recognize the inputs that induce anomalous behavior, e.g. images containing a spurious cue. These results reveal blind spots and limitations of some popular model visualizations. By introducing a novel evaluation framework for visualizations, our work paves the way for developing more reliable model transparency methods in the future.

Introduction

As deep learning models are increasingly deployed in high-stakes environments, the need for reliable model auditing becomes critical. A model might achieve high validation accuracy while remaining fundamentally flawed—perhaps by relying on spurious cues (like watermarks) or containing malicious backdoors. To uncover these hidden behaviors, researchers often turn to transparency methods, or visualizations, to interpret what a model is "looking at."

However, a significant question remains: do these visualizations faithfully track a model's internal logic? This research introduces a "counterauditing" framework to evaluate the efficacy of transparency methods. By intentionally planting specific "bugs" or anomalies in models, the authors test whether popular visualization techniques can actually help a human or an automated system detect and localize these failures.

Methodology: The Counterauditing Pipeline

The study proposes a systematic evaluation pipeline designed to quantify how well visualizations distinguish between normal and anomalous model behavior.

The three-step evaluation pipeline: (1) training reference and anomalous models, (2) generating visualizations for an input x, and (3) embedding and comparing these visualizations to detect anomalies.

1. Model Preparation

The researchers first established a baseline by training a set of "normal" ResNet-50 models on ImageNet using different random seeds. They then created 24 anomalous models across seven categories, ranging from "stark" anomalies (like adversarial training or randomized smoothing) to "subtle" ones (like models trained on blurred faces, missing specific classes, or containing pixel-trigger backdoors).

2. Generating and Comparing Visualizations

For a given input image, visualizations were generated for both the buggy and reference models using five popular methods: Guided Backpropagation, Integrated Gradients, Grad-CAM, Guided Grad-CAM, and Caricatures (a feature visualization technique). These visualizations were then embedded into a semantic feature space (using AlexNet features) to calculate an Anomaly Score based on the LPIPS distance from the reference set.

3. Evaluation Tasks

The framework evaluates methods on two primary tasks:

  • Detection: Can the method identify if a model is anomalous overall compared to the reference set?
  • Localization: Can the method identify the specific inputs that trigger anomalous behavior (e.g., distinguishing a backdoored image from a clean one)?

Key Results and Insights

The "Stark vs. Subtle" Divide

The evaluation revealed a sharp performance drop-off based on the severity of the anomaly. All tested methods achieved 100% detection for "stark" anomalies, such as randomized smoothing, where the model's fundamental processing is altered across all inputs.

Visualizations for normal and anomalous models (randomized smoothing with varying σ) using (a) Guided Backpropagation, (b) Grad-CAM, and (c) Caricatures. The anomaly score A increases with the severity of the anomaly.

However, for "subtle" anomalies—those that only affect a small subset of inputs or represent more realistic training flaws—the detection rate plummeted to near 0% for almost every method. For example, models trained with missing classes or on obfuscated faces were indistinguishable from normal models through the lens of these visualizations.

The Localization Failure

Even when a method successfully detected that a model was anomalous, it often failed the localization task. In many cases, the AUROC for localization was near 0.5, meaning the visualizations were no better than random chance at pointing to the specific input causing the weirdness. Most methods could not consistently distinguish between a normal image and one containing a spurious cue that the model was known to be using for its prediction.

Feature Attribution vs. Feature Visualization

Interestingly, feature attribution methods (pixel-based highlighting) generally outperformed feature visualization (synthesizing "ideal" inputs) at localizing backdoors. This is likely because attribution methods are inherently designed to highlight specific spatial regions, whereas feature visualizations like Caricatures provide a more global view of what a neuron or layer represents.

Conclusion and Future Directions

The findings suggest that the intuitive appeal of "pretty pictures" in model transparency can be deceptive. A visualization that looks sensible to a human does not necessarily provide a reliable audit of a model's actual decision-making process, especially for subtle, high-stakes failures like backdoors.

Future work in transparency should move beyond simply looking for differences from a reference set and toward "specification-based" auditing—checking if a model's internal logic violates specific safety, fairness, or robustness rules. Additionally, expanding this framework to other modalities like Natural Language Processing is essential to understand the broader limitations of current transparency tools.

Summary updated

BibTeX
@misc{denain2022auditing,
  author = {Jean-Stanislas Denain and Jacob Steinhardt},
  title = {{Auditing Visualizations: Transparency Methods Struggle to Detect Anomalous Behavior}},
  year = {2022},
  eprint = {2206.13498},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2206.13498},
}
Figure