Explaining Deep Neural Networks using Unsupervised Clustering

Yu-Han Liu, Sercan Ö. ArikarXiv 2020

Abstract

Deep Neural Networks (DNNs) are often criticized for being "black boxes" due to their complex internal structures. This paper presents a novel framework for interpreting DNN decisions by distilling internal activations into unsupervised clusters. By mapping these clusters to human-understandable concepts across multiple layers, the proposed surrogate model provides customizable explanations that significantly enhance user trust and model transparency.

Introduction

While DNNs achieve state-of-the-art performance in various tasks, their lack of interpretability remains a significant barrier to deployment in high-stakes domains. Current Explainability (XAI) methods, such as saliency maps or final-layer nearest-neighbor searches, often fail to capture the hierarchical nature of feature extraction in deep models. Early layers typically detect low-level features like edges and textures, while deeper layers identify high-level semantic concepts. This research addresses the gap in multi-level explanation, providing a systematic way to show users what a model sees at every stage of its reasoning process.

Methodology

The proposed method utilizes a surrogate model distillation approach to create an interpretable "shadow" of the original black-box DNN. The process involves four key steps:

  1. Activation Extraction: High-dimensional activations are extracted from selected early, middle, and late layers (e.g., blocks in a ResNet) of the pre-trained model.
  2. Unsupervised Clustering: Deep Embedded Clustering (DEC) is applied to these activations to identify "fine-grained latent clusters" representing internal model concepts.
  3. Surrogate Mapping: A simple mapping is established between these clusters and final output labels based on training data statistics.
  4. Weighted Aggregation: The final explanation is generated by a weighted average of these layer-wise surrogate models. This allows users to "tune" the explanation—for example, a doctor might prioritize low-level texture similarities in medical imaging, while an engineer might focus on high-level object categories.
Overview of the proposed framework, showing the baseline model, the surrogate model with clustering, and the generation of similar examples.

Experimental Results

The framework was evaluated on CIFAR-10, CIFAR-100, and a real-world Magnetic Tile Defect dataset. Key findings include:

  • High Fidelity: The surrogate model achieved 92.3% fidelity to a ResNet-56 baseline on CIFAR-10, indicating it accurately mimics the original model's logic despite its simpler structure.
  • Human Interpretability: In user studies on CIFAR-100, participants preferred the "similar images" identified by this method over standard nearest-neighbor approaches (130 votes vs. 56).
  • Enhanced Trust: In industrial defect detection, providing surrogate-based evidence increased user trust scores from 2.59 to 3.91 on a 5-point scale.
  • Concept Discovery: The clustering often discovers "sub-label concepts" that are more granular than the original labels, such as distinguishing between different poses or parts of an object (e.g., horse heads vs. horses in profile).
Comparison of similar examples retrieved using different layer weights, demonstrating how the explanation can be customized to emphasize different levels of abstraction.

Discussion and Conclusion

By drawing on the "fast vs. slow thinking" analogy from behavioral economics, this framework captures both immediate pattern recognition (low-level features) and logical conceptualization (high-level features). While the method is robust, future work should address the manual nature of layer selection and the computational overhead of training clustering models for extremely large architectures. Overall, this framework represents a significant step toward making deep learning models more transparent and trustworthy for end-users by providing evidence-based, multi-level explanations.

Summary updated

BibTeX
@misc{liu2020explaining,
  author = {Yu-Han Liu and Sercan Ö. Arik},
  title = {{Explaining Deep Neural Networks using Unsupervised Clustering}},
  year = {2020},
  eprint = {2007.07477},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2007.07477},
}
Figure