Explaining classifiers by constructing familiar concepts

Johannes Schneider, Michalis Vlachos

Abstract

Deep neural networks are often criticized for their lack of interpretability, typically offering saliency maps that indicate pixel importance without conceptual context. We present ClaDec (Classifier-Decoder), a framework designed to bridge the gap between a model's latent representations and human-understandable visual concepts. By appending a decoder to specific layers of a frozen, pre-trained classifier, we reconstruct inputs to visualize the features the model deems essential for its decision-making process. Through a comparative analysis with a reference autoencoder, we demonstrate that ClaDec effectively isolates the information filtered by the classifier, such as texture or fine detail, in favor of prototypical class features. Our results across MNIST, Fashion-MNIST, and CIFAR-100 show that these reconstructions not only provide intuitive explanations for non-experts but also maintain high fidelity to the classifier's internal logic.

Introduction

Understanding the internal logic of deep learning models remains a significant challenge in artificial intelligence. Most explainability (XAI) tools, such as GradCAM, generate saliency maps—heatmaps that highlight influential pixels. While useful, these maps are limited in their ability to convey what specific concepts (e.g., color, shape, texture) the model is utilizing. Interpreting the activations of thousands of individual neurons is similarly impractical for human auditors.

Comparison of various XAI techniques, positioning the proposed reconstruction method as a way to explain decisions via synthesized input.

This paper seeks to bridge the gap between high-dimensional latent spaces and the conceptual world of humans by forcing models to "draw" what they see. The proposed method, ClaDec, translates incomprehensible neural activations back into familiar visual concepts, allowing for a more nuanced audit of the model's decision-making process.

Methods: The ClaDec Architecture

The core innovation is the ClaDec (Classifier-Decoder) architecture. The process involves four primary components:

  1. The Encoder: A pre-trained classifier (e.g., VGG or ResNet) with frozen weights serves as the encoder.
  2. The Decoder: A decoder is attached to a specific layer of the classifier, trained to reconstruct the original input image from that layer's activations.
  3. The Reference (RefAE): To distinguish between decoder artifacts and actual information loss in the classifier, a "Reference Autoencoder" (RefAE) with an identical architecture is trained solely for reconstruction.
  4. The Comparison: By comparing the original image ($X$), the RefAE reconstruction ($\hat{X}_R$), and the ClaDec reconstruction ($\hat{X}_E$), researchers can identify exactly what the classifier has filtered out.
The ClaDec architecture (top) vs. the Reference Autoencoder (bottom). Comparing the two reconstructions reveals what the classifier filters out.

The authors also introduce a trade-off parameter ($\alpha$) by adding a classification loss to the decoder's training. This allows the output to be tuned for either higher "comprehensibility" (visual realism) or higher "fidelity" (accurate representation of the classifier's focus).

Key Insights and Results

The researchers evaluated ClaDec on MNIST, Fashion-MNIST, and CIFAR-100 benchmarks, yielding several key insights:

  • Information Filtering: As data progresses through deeper layers, reconstructions become increasingly "prototypical." For instance, a handbag with a unique texture might be reconstructed as a generic, smooth shape, indicating the network is abstracting "handbag-ness" while discarding individual variations.
  • Fidelity Sanity Check: To ensure ClaDec captures relevant information, a new model was trained on the reconstructed images. Despite being blurrier to human eyes, the evaluation model achieved higher accuracy when trained on ClaDec outputs compared to RefAE outputs. This confirms that ClaDec specifically preserves features necessary for classification.
  • Occlusion Sensitivity: ClaDec outperformed GradCAM in identifying truly irrelevant image regions. Occluding areas deemed "least relevant" by ClaDec resulted in significantly higher classifier accuracy retention than those identified by GradCAM.
  • User Interpretability: A user study confirmed that non-experts could accurately identify which concepts the AI ignored or prioritized simply by viewing the reconstructions.

Discussion and Limitations

While ClaDec offers a powerful new lens for XAI, it faces certain limitations. The method requires a representative dataset to train the decoder, which may be a barrier for niche applications. Additionally, it is computationally more expensive than gradient-based methods, as it requires training a separate decoder for each layer of interest. Future work may leverage pre-trained generative models, such as GANs or Diffusion models, to produce even higher-quality, more familiar reconstructions.

Source: Schneider, J., & Vlachos, M. (2023). Explaining classifiers by constructing familiar concepts. Machine Learning, 112, 4167–4200. https://doi.org/10.1007/s10994-022-06157-0

Summary updated

BibTeX
@article{schneider2023explaining,
  author = {Johannes Schneider and Michalis Vlachos},
  title = {{Explaining classifiers by constructing familiar concepts}},
  journal = {Machine Learning},
  year = {2023},
  doi = {10.1007/s10994-022-06157-0},
}
Figure