Interactive Analysis of CNN Robustness

Stefan Sietzen, Mathias Lechner, Judy Borowski, Ramin Hasani, Manuela Waldner

TL;DR

The authors introduce Perturber, a web-based interactive tool that allows researchers to probe the robustness of Convolutional Neural Networks (CNNs) in real-time. By manipulating 3D scenes—changing lighting, texture, pose, and background—users can instantly observe how internal neuron activations and final classifications shift, revealing hidden vulnerabilities that standard batch testing might miss.

What Problem Does This Paper Address?

While CNNs often achieve superhuman accuracy on standard datasets, they are notoriously "brittle." A slight change in lighting, a different background, or a specific texture can cause a model to fail spectacularly, even when the object remains perfectly clear to a human.

The challenge for researchers is that investigating these failures is typically a slow, offline process. Setting up experiments to test specific perturbations (like "how does rotation affect the model?") requires generating large datasets and running batch inferences, which hinders the ability to build a quick, intuitive understanding of a model's "mental model." The authors aim to turn this into an interactive, "playground-like" experience.

Methods

The core of the paper is the Perturber interface, built using Three.js for 3D rendering and TensorFlow.js for client-side model inference.

The Perturber interface allows users to manipulate 3D scenes (A) via sliders (C) and observe real-time changes in neuron activations (E) and class predictions (F).

Key technical features include:

  • 3D Scene Manipulation: Unlike static image datasets, Perturber uses 3D models (dogs, cats, vehicles). This allows researchers to "disentangle" variables—for example, changing an object's shape while keeping its texture identical, or vice versa.
  • Rich Perturbation Suite: The tool supports over 20 types of modifications, including geometry (rotation/zoom), lighting, background swaps, object morphing, frequency filtering (Laplacian decomposition), and even real-time adversarial attacks (PGD).
  • White-Box Visualization: It doesn't just show the final prediction. It visualizes feature maps (what specific neurons are looking for) and activation maps (where those neurons are firing on the current input) in real-time.
  • Model Comparison: Users can compare a "standard" model side-by-side with "robust" versions, such as those trained on Stylized-ImageNet or via adversarial training.

Datasets

The tool primarily uses Inception-V1 models trained on ImageNet. To evaluate robustness, the authors compared the standard model against:

  1. Stylized-ImageNet: A version of ImageNet where textures are replaced with artistic styles to force the model to focus on shape.
  2. Adversarially Trained Models: Models trained to resist small, intentional pixel perturbations.

For quantitative validation of user observations, they also used the Background Challenge dataset (natural images with adversarial backgrounds) and a custom synthetic dataset of 112 rendered views (varying yaw, pitch, and distance).

Key Insights and Ideas

  • The Texture Bias is Dominant: One of the most striking "aha" moments occurs when removing the texture from a 3D dog model. The standard model immediately misclassifies the smooth, grey shape as a "piggy bank," while the shape-biased (Stylized-ImageNet) model correctly identifies it as a dog.
Removing texture causes the standard model to see a "piggy bank," while the robust model maintains its "dog" classification.
  • Adversarial Training has a "Background" Cost: A surprising finding from the case studies was that adversarially trained models—designed to be more robust—actually became more sensitive to background changes and rotations than standard models.
  • Morphing as a Discovery Tool: By interactively morphing a dog into a cat, researchers could find the exact "tipping point" where the model's internal logic shifted, a task that is nearly impossible with static image sets.
Morphing between a dog and a cat along texture and shape dimensions to find classification thresholds.

Key Results

The authors validated their interactive findings with quantitative experiments:

  • Background Sensitivity: In the "Background Challenge," the adversarially trained model achieved only 12.3% accuracy under background variations, significantly worse than the standard model's 22.3%.
  • Rotation Instability: Using a "fluctuation score" to measure prediction stability during camera rotation, the authors found that adversarially trained models were significantly more unstable (higher fluctuation) across three out of four 3D objects tested.
  • Performance: Despite the complexity, the tool maintains interactive frame rates (up to 40 FPS on high-end GPUs) by running entirely in the browser, enabling the "fluid feedback loop" necessary for exploration.

Limitations and Future Work

  • Model Architecture: The current implementation is tailored to Inception-V1. While conceptually general, adapting it to newer architectures (like Vision Transformers) would require significant pre-computation of feature visualizations.
  • The "Needle in a Haystack" Problem: With thousands of neurons, it is difficult for users to find which ones are "relevant" to a specific perturbation. The authors suggest future work on automated guidance to highlight neurons that change the most.
  • Beyond Classification: The authors hope to extend the tool to encoder-decoder architectures used for tasks like semantic segmentation or image-to-image translation.

Summary updated

BibTeX
@article{sietzen2021interactive,
  author = {Stefan Sietzen and Mathias Lechner and Judy Borowski and Ramin Hasani and Manuela Waldner},
  title = {{Interactive Analysis of CNN Robustness}},
  journal = {Computer Graphics Forum},
  year = {2021},
  doi = {10.1111/cgf.14418},
}
Figure