NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

From Clustering to Cluster Explanations via Neural Networks

Jacob R. Kauffmann, Malte Esders, Lukas Ruff, Grégoire Montavon, Wojciech Samek, Klaus-Robert Müller · DOI

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, the 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.

The Transparency Gap in Unsupervised Learning

While clustering is a cornerstone of unsupervised learning for discovering hidden structures in data, it has long suffered from a "black box" problem. We can see that a data point was assigned to a specific cluster, but we rarely know why. Existing XAI techniques have focused almost exclusively on supervised classifiers. When researchers do try to explain clusters, they often rely on "surrogates" (like training a decision tree to mimic the clusterer), which can be unfaithful to the original model.

The challenge is to create a method that is faithful to the actual clustering logic, efficient enough to avoid expensive retraining, and versatile across different data modalities like text and images.

The NEON Framework: Neuralization-Propagation

To address these challenges, we introduce NEON (Neuralization-Propagation). This framework brings XAI to the world of unsupervised clustering through a two-step procedure:

  1. Neuralization: We demonstrate that the decision functions of various clustering algorithms—including k-means, kernel k-means, and deep clustering—can be mathematically rewritten as functionally equivalent neural networks. For instance, a standard k-means model can be represented as a two-layer network consisting of a linear layer followed by a "min-pooling" layer.
  2. Propagation: Once the model is in neural network form, we apply Layer-wise Relevance Propagation (LRP). This technique takes the "evidence" for a cluster assignment at the output layer and redistributes it backward through the network until it reaches the input features (e.g., specific pixels or words).
The NEON framework: (a) standard cluster assignment vs. (b) the neuralization and LRP propagation process for feature attribution.

Crucially, this process requires no retraining. It simply reinterprets the existing cluster centroids and parameters as weights in a neural network, allowing for explanations in a single forward-backward pass.

Experimental Validation

NEON was validated across a diverse array of benchmarks, including tabular data (UCI Repository), text (20 Newsgroups), and high-dimensional images (PASCAL VOC 2007, STL-10).

Key results include:

  • Quantitative Superiority: In "pixel-flipping" experiments, where features are removed based on their explained importance, NEON consistently achieved higher Area Under the Curve (AUC) scores than baselines like Sensitivity Analysis or Integrated Gradients.
  • Semantic Alignment: On the PASCAL VOC dataset, the heatmaps generated by NEON showed a high cosine similarity to human-annotated segmentation masks, proving the explanations align with real-world objects.
  • Efficiency: NEON produces an explanation in a single pass, making it highly scalable compared to perturbation-based methods like LIME or SHAP.

Deep Insights and Semantic Structure

The "aha moment" of this research is realizing that distance-based clustering is essentially a specific type of neural network architecture. This bridge allows us to port a decade of XAI research into the unsupervised domain.

Visualization of cluster decision boundaries (Voronoi partitions) and the soft assignment contours that the neuralized model approximates.

Furthermore, NEON shows that even when a cluster doesn't match human labels (low ARI scores), it might be capturing a perfectly valid, hidden concept. For example, it can reveal if a model is clustering documents by specific terminology rather than the intended topic, or how a CNN progressively builds complex concepts like "fur" or "texture" in its deeper layers.

Conclusion and Future Directions

While NEON currently covers k-means and its variants, future work aims to extend this to models like DBSCAN or spectral clustering, potentially using kernel k-means surrogates as an intermediate step. We envision NEON being integrated into interactive "human-in-the-loop" tools, allowing researchers to explore complex datasets with immediate, feature-level feedback on why the AI is grouping data in a certain way.

Summary updated

BibTeX
@article{kauffmann2022from,
  author = {Jacob R. Kauffmann and Malte Esders and Lukas Ruff and Grégoire Montavon and Wojciech Samek and Klaus-Robert Müller},
  title = {{From Clustering to Cluster Explanations via Neural Networks}},
  journal = {IEEE Transactions on Neural Networks and Learning Systems},
  year = {2022},
  doi = {10.1109/tnnls.2022.3185901},
}
Figure