Abstract
A recent trend in machine learning has been to enrich learned models with the ability to explain their own predictions. The emerging field of Explainable AI (XAI) has so far mainly focused on supervised learning, in particular, deep neural network classifiers. In many practical problems however, label information is not given and the goal is instead to discover the underlying structure of the data, for example, its clusters. While powerful methods exist for extracting the cluster structure in data, they typically do not answer the question why a certain data point has been assigned to a given cluster. We propose a new framework that can, for the first time, explain cluster assignments in terms of input features in an efficient and reliable manner. It is based on the novel insight that clustering models can be rewritten as neural networks - or 'neuralized'. Cluster predictions of the obtained networks can then be quickly and accurately attributed to the input features. Several showcases demonstrate the ability of our method to assess the quality of learned clusters and to extract novel insights from the analyzed data and representations.
Introduction: The "Black Box" of Unsupervised Learning
Clustering is a cornerstone of unsupervised learning, yet it has long suffered from a lack of interpretability. While we can observe that a group of data points has been clustered together, we often lack the means to understand why. In high-dimensional spaces, such as image or genomic data, simply examining a cluster centroid is insufficient to identify which specific features were decisive for a particular assignment.
Most existing Explainable AI (XAI) tools are tailored for supervised classifiers. Applying these to clustering is non-trivial because clustering decisions are often based on relative distances rather than simple logit outputs. To bridge this gap, we introduce the NEON (Neuralization-Propagation) framework, a systematic approach to explaining individual cluster assignments in terms of their input features.
The NEON Framework
The NEON framework operates via a two-step procedure that transforms unsupervised models into a format compatible with deep learning XAI tools.
- Neuralization: We demonstrate that a broad range of clustering models—including k-means, kernel k-means, and deep clustering—can be rewritten as functionally equivalent neural networks without any retraining. For example, a standard k-means model is equivalent to a two-layer network consisting of a linear layer (representing distances to centroids) followed by a min-pooling layer.
- Propagation: Once the model is "neuralized," we apply a modified version of Layer-wise Relevance Propagation (LRP). By introducing a "min-take-most" (MTM) strategy to handle the competition between clusters, the relevance of an assignment flows backward through the network layers to the input features, creating a heatmap of importance.
Theoretical Insights: Clustering as a Network
A profound insight of this work is that clustering is not a fundamentally different mathematical entity than a neural network; it is simply a specific architecture. By identifying this equivalence, the entire toolbox of deep learning XAI becomes available for unsupervised learning.
This perspective allows researchers to move beyond simple "purity" metrics (how well clusters match labels). NEON can reveal if a cluster is based on meaningful shared features that labels might ignore, or if the model has relied on dataset artifacts—a phenomenon known as the "Clever Hans" effect. Furthermore, by applying NEON to different layers of a deep network (like VGG-16), we can observe how the model's "understanding" evolves from simple edges to complex semantic concepts.
Experimental Results
The framework was evaluated across diverse datasets, including tabular data (UCI), text (20newsgroups), and images (STL-10, PASCAL VOC):
- Quantitative Superiority: Using an "Area Under the Curve" (AUC) metric based on feature-flipping, NEON consistently outperformed baselines like Integrated Gradients and Sensitivity Analysis.
- Deep Clustering Validation: NEON was successfully applied to state-of-the-art deep clustering models (SCAN), proving its efficacy for modern, complex architectures.
- Object Localization: In PASCAL VOC experiments, NEON's importance heatmaps showed high similarity to human-annotated segmentation masks, proving that the generated explanations correspond to real-world objects.
Conclusion
NEON provides a generic blueprint for making clustering models transparent. While future work is needed to extend this to density-based or hierarchical clustering, the current framework already allows for deeper insights into unsupervised representations and provides a path toward human-in-the-loop curation of cluster boundaries.
Summary updated