Explainable Deep One-Class Classification

Philipp Liznerski, Lukas Ruff, Robert A. Vandermeulen, Billy Joe Franks, Marius Kloft, Klaus-Robert Müller

Introduction

The authors introduce Fully Convolutional Data Description (FCDD), a deep learning method for anomaly detection that is explainable by design. By using a fully convolutional architecture, the network produces a spatial heatmap where high-value pixels directly pinpoint anomalous regions in an image. This approach achieves state-of-the-art results on industrial defect datasets while exposing hidden model biases, such as the "Clever Hans" effect.

What Problem Does This Paper Address?

Deep anomaly detection (AD) models are incredibly powerful at identifying outliers in complex data like high-resolution images. However, most are "black boxes." In critical fields like manufacturing or medicine, simply knowing that an image is anomalous isn't enough—experts need to know where the anomaly is to make informed decisions.

Existing methods often rely on "post-hoc" explanations (like gradient-based saliency maps) or reconstruction errors from autoencoders. These can be noisy, lack spatial context, or fail to scale to complex datasets. The authors seek a method where the anomaly score and the explanation are mathematically and architecturally the same entity.

Methods

The core innovation is FCDD, which adapts the Deep Support Vector Data Description (DSVDD) framework into a Fully Convolutional Network (FCN).

FCDD Architecture
  1. Architecture: Unlike standard classifiers that end in fully connected layers (which destroy spatial information), FCDD uses only convolutional and pooling layers. This ensures that every pixel in the output map has a specific "receptive field" in the input image.
  2. The Objective: The model is trained to map "nominal" (normal) data close to a center point in the feature space, while pushing "anomalous" data far away. Because it is an FCN, the "distance from the center" is calculated per-pixel, creating a downsampled anomaly heatmap.
  3. Principled Upsampling: To get back to the original image resolution, the authors use a transposed convolution with a fixed Gaussian kernel. This is based on the observation that a pixel’s influence in a receptive field decays in a Gaussian manner from its center.
  4. Supervision Flexibility: FCDD works in an unsupervised mode (using synthetic "confetti noise" as anomalies) but can also incorporate a tiny number of ground-truth anomaly maps (semi-supervised) to drastically boost performance.

Key Insights and Ideas

  • Explanation as Output: In FCDD, the explanation isn't an afterthought; it is the detection mechanism. This makes the explanations more robust and less prone to the artifacts often seen in gradient-based methods.
  • The "Clever Hans" Revelation: By visualizing the heatmaps, the authors found that models trained on the PASCAL VOC "horse" class weren't actually looking at horses. Instead, they were detecting the watermarks present in the corner of many horse photos. This "Clever Hans" effect is a major risk in AI that FCDD helps unmask.
  • The Power of "A Few": One of the most striking findings was that providing the model with just five ground-truth anomaly examples during training led to a massive jump in localization accuracy.

Key Results

FCDD was evaluated across several benchmarks, including standard AD datasets (Fashion-MNIST, CIFAR-10) and MVTec-AD, a specialized manufacturing dataset containing high-resolution images of objects with real-world defects.

Qualitative results on MVTec-AD
  • MVTec-AD: FCDD set a new state-of-the-art in the unsupervised setting with a mean pixel-wise AUC of 0.92. In the semi-supervised setting (using only one anomalous sample per defect type), this rose to 0.96.
  • Standard Benchmarks: FCDD achieved competitive results (e.g., 0.95 AUC on CIFAR-10), proving that restricting the architecture to be fully convolutional for the sake of explainability does not necessarily hurt detection performance.
  • Qualitative Quality: Compared to autoencoders and gradient-based methods, FCDD produced much cleaner, more structurally accurate heatmaps that better matched the actual shapes of anomalies.

Limitations and Future Work

  • Receptive Field Trade-off: The authors noted that the size of the network's receptive field affects the "blobbiness" of the explanation. A very large receptive field can make the heatmap less precise, while a very small one might miss global context.
  • Adversarial Vulnerability: While the paper suggests FCDD might be more robust to certain attacks because the explanation is tied to the score, they leave a formal analysis of its vulnerability to adversarial perturbations for future work.
  • Hyperparameter Sensitivity: The choice of the Gaussian upsampling variance and the percentile for visualization contrast requires some empirical tuning depending on the dataset.

Summary updated

BibTeX
@inproceedings{liznerski2021explainable,
  author = {Philipp Liznerski and Lukas Ruff and Robert A. Vandermeulen and Billy Joe Franks and Marius Kloft and Klaus-Robert Müller},
  title = {{Explainable Deep One-Class Classification}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
}
Figure