Manuscript Offprint
arXiv:2611.00653Regularized Wasserstein Distance for Discrete Generative Modeling and Clustering Analysis
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
In this paper, we formulate clustering analysis as discrete generative modeling. Specifically, when the generator is restricted to a finite candidate space, the generated samples naturally emerge as the most representative prototypes of the underlying data distribution. To model such a discrete candidate space, we employ a Discrete Distribution Network (DDN). However, DDN suffers from unstable training due to its hard nearest-neighbor selection. To stabilize training and encourage geometric consistency, we replace DDN's loss between images with regularized Wasserstein distance between the empirical distributions of real and generated images. The resulting framework, termed Discrete Generative Clustering (DGC), offers four notable advantages: 1) the learned cluster centers are directly interpretable, as they are realistic synthetic samples; 2) the inference cost scales logarithmically with the number of clusters, i.e., , making the method scalable to extremely large ; 3) the regularized Wasserstein distance provides a smooth and well-behaved optimization objective that facilitates stable convergence, whereas DDN's loss tends to converge to poor local optima; and 4) DGC replaces DDN's nearest-neighbor selection with random-neighbor selection, which avoids the density shift problem during multi-step forward. Extensive experiments on several benchmarks demonstrate the effectiveness and desirable properties of DGC. The code is publicly available at GitHub.
*Corresponding author.
Email address: senmaoy@gmail.com, feiliu@scut.edu.cn, davidzhang@zjnu.edu.cn, everygreen870@gmail.com, junzhang@ieee.org, zhonglong@zjnu.edu.cn
Keywords: Clustering Analysis, Generative Modeling, Regularized Wasserstein Distance
1. Introduction
Clustering analysis is a fundamental task in unsupervised learning, aiming to partition data into meaningful groups without label supervision [1; 2; 3; 4; 5; 6; 7]. It plays a critical role in image segmentation, bioinformatics, anomaly detection, and exploratory data analysis. Despite decades of research, traditional clustering methods still suffer from several inherent limitations. Partition-based algorithms like K-Means [8] require a predefined number of clusters and are highly sensitive to initialization. Model-based approaches such as Gaussian Mixture Models (GMM) [9] assume specific parametric forms and become computationally expensive as grows. Hierarchical methods incur complexity [10], and density-based methods like DBSCAN [11; 12] are sensitive to hyperparameter choices. Moreover, many of these methods yield cluster centers that are abstract mathematical constructs, lacking direct physical interpretability [13].
In recent years, generative models [14; 15; 16; 17] have demonstrated remarkable capability in modeling complex data distributions, providing new paradigms for tasks such as image segmentation, image classification, and object detection. For clustering analysis, existing models [3; 18; 19] invert the generative process to extract unsupervised deep feature representations. However, the clustering step is still accomplished by conventional methods such as K-means and GMM. These generation-based cluster models do not further explore the intrinsic relationship between clustering and generation.
To connect clustering analysis and generative modeling, this paper introduces Discrete Generative Clustering (DGC). As depicted in Figure 1, the core idea is to generate a set of candidate samples that faithfully represent the entire dataset. We first discretize generative modeling via a hard selection operation proposed by Discrete Distribution
Network [20]. To preserve global geometric fidelity, we minimize the regularized Wasserstein distance [21; 22] between the distribution of generated

Figure 1: Clustering analysis is a special case of generative modeling.
candidates and the real data distribution. The regularized Wasserstein distance is differentiable and computationally efficient and better preserves the underlying manifold structure than DDN's image-wise loss. Finally, each data point is assigned to its nearest prototype according to the tree structure of DDN.
The proposed Discrete Generative Clustering offers several notable advantages. First, it provides interpretability, as the cluster centers are actual samples generated from the underlying data distribution, rather than abstract latent parameters. DGC provides a probabilistic interpretation of image clustering, grounded in generative modeling. Second, it exhibits high computational efficiency, with a complexity of , which remains tractable for extremely large numbers of clusters. Third, it ensures optimization stability: the regularized Wasserstein distance defines a smooth and well-behaved optimization objective, in contrast to DDN's original -based loss functions that are prone to falling into local optima. Fourth, DGC is free of DDN's density shift problem caused by multi-step nearest-neighbor selection in training. Such training bias will accumulate when the number of DDN layers grow. Extensive experimental results demonstrate that DGC achieves competitive clustering performance while yielding visually interpretable cluster centers. Ablation studies further substantiate the individual contribution of each component. To facilitate reproducibility, the source code is made publicly available.
2.1. Regularized Wasserstein Distance
Optimal transport (OT) provides a principled framework for comparing probability distributions by quantifying the minimal cost required to transform one distribution into another. Among OT metrics, the Wasserstein distance is particularly well-suited for generative modeling, as it preserves the geometric structure between distributions even when their supports are disjoint. However, computing the exact Wasserstein distance is computationally prohibitive for large-scale problems, since solving the associated linear program incurs a cost that is cubic in the sample size.
To mitigate this limitation, entropic regularization was introduced in [21]. Let p and q denote the empirical distributions of real samples and generated samples, respectively. The regularized Wasserstein distance is defined as
where is the regularization parameter, and is the ground-cost function representing the cost of transporting a unit mass from to . The entropic term renders the optimization problem strictly convex, thereby enabling efficient computation via the Sinkhorn–Knopp matrix scaling algorithm. Consequently, the regularized Wasserstein distance is also referred to as the Sinkhorn–Knopp loss. Moreover, the Sinkhorn–Knopp iterations are fully differentiable, allowing end-to-end backpropagation through the transport plan. These properties make the regularized Wasserstein distance an ideal loss function for training deep generative models, providing a smooth, robust, and computationally tractable alternative to the exact Wasserstein distance.
2.2. Discrete Distribution Networks
The DDN model consists of layers of Discrete Distribution Layers. For a given layer , denoted as , the input is the selected sample from the previous layer, . The layer generates new samples, , from which we select the sample that is closest to the current training sample , along with its corresponding index . The loss for this layer is then computed only on the selected sample .
3. Regularized Wasserstein Distance for Generative Modeling and Clustering
To generate geometrically consistent prototypes, we first minimize the regularized Wasserstein distance between real and generated samples. Then, we discretize this generative model to enforce a discrete sample space. Finally, data points are assigned to the nearest prototypes according to the tree structure of DDN.
3.1. Continuous Generative Modeling with Regularized Wasserstein Distance
Generative modeling is achieved by training a neural network generator to minimize the regularized Wasserstein distance between the real and generated distributions. Let be a latent variable drawn from a fixed prior (e.g., a standard Gaussian), and let denote the generated sample. Given a mini-batch of real samples and generated samples with , the generator is trained by minimizing the regularized Wasserstein distance between the two empirical measures:
where is defined as in equation 1. With SGD training, is able to synthesize reasonable images.
3.2. Discrete Generative Modeling with Regularized Wasserstein Distance
To enforce a discrete sample space, we discretize it using a Discrete Distribution Network.

Figure 2: Illustration of the proposed Discrete Generative Clustering (DGC) framework. The purple components denote the generative modeling module, while the blue components correspond to the clustering module.
Network Architecture. As illustrated in Figure 2, our model consists of sequentially connected sub-networks . The first sub-network takes a fixed position embedding as input. For , the -th sub-network receives the output of the previous sub-network and generates a set of candidate outputs:
Every output of the model is selected from the candidates of the sub-network according to a stochastic hard selection rule described below:
This stochastic selection confers generative diversity upon the model while preserving the advantages of the multi-candidate architecture learned during training. Empirically, we observe that random sampling maintains the quality of individual candidates and introduces beneficial variability, thereby mitigating the mode collapse often seen in deterministic and greedy selection schemes.
Objective. During training, we aim to align the distribution of generated outputs with the target data distribution. Given a mini-batch target images and a set of candidates produced by the sub-network , the training objective is the regularized Wasserstein distance between these two empirical measures. The regularized optimal transport cost at layer is:
The overall training objective aggregates the losses across all stages:
where denotes the trainable parameters of the entire network. This multilevel objective ensures that every sub-network learns to produce progressively refined representations, while the final stage aligns the generated distribution with the target distribution at the most fine-grained level. Unlike the original DDN, DGC avoids two drawbacks: (i) its learning objective keeps every candidate involved in optimization, preventing candidates from becoming dead and ensuring all branches remain well-trained; (ii) it replaces hard nearest-neighbor assignment with stochastic candidate selection, thereby avoiding the density shift problem during generation. This issue is analogous to the bias caused by sequential softmax sampling in auto-regressive models.
3.3. Unsupervised Clustering Analysis
When the number of candidates is set to a small value, the proposed generative model naturally performs unsupervised clustering. The
Table 1: Summary of datasets used in experiments. Original size refers to the native resolution.
| Dataset | Samples | Original size | Classes |
|---|---|---|---|
| MNIST | 70,000 | 10 | |
| Fashion-MNIST | 70,000 | 10 | |
| CIFAR-10 | 60,000 | 10 | |
| COIL20 | 1,440 | 20 |
intuition is that the generative modeling objective compresses the semantic information of the data distribution into a limited set of representative prototypes. These prototypes serve as cluster centroids in the data space.
In the clustering setting, real target images are available for matching. For each stage and each target sample , we first select from the candidate set produced by the candidate closest to :
This selection is repeated across the entire DDN tree, assigning each target image to a centroid at every stage; the corresponding index is denoted by .
4. Experiments
In this section, we present the experimental setup, quantitative and qualitative results, ablation studies, and additional analyses to validate the effectiveness of our proposed method.
4.1. Experimental Setup
Datasets. We evaluate the proposed method on four benchmark datasets: MNIST [23], Fashion-MNIST [24], CIFAR-10 [25], and COIL20 [26]. Table 1 summarizes the number of samples, original image resolutions, and class numbers. To ensure a fair comparison, all images are resized to pixels before being fed into the network, except for COIL20, which is resized to pixels. Unless otherwise stated, no data augmentation is applied, and raw pixel values are adopted as input features.
Implementation Details. The architecture of our method is detailed in Section 3. The generator is a cascade of stacked discrete distribution blocks. Each DDN adopts a U-Net-style encoder–decoder with instance normalization and SiLU activations. For example, we use a two layer DDN with on the MNIST dataset. The first DDN receives an initial spatial embedding; each subsequent DDN takes the feature map produced by its predecessor, which is projected and fused into the first encoder block via a residual addition. The decoder outputs a tensor of size , which is reshaped into candidate reconstructions. Each candidate is passed through a shared output head consisting of a convolution followed by a tanh activation. During training, the candidates are compared with the target image under the regularized Wasserstein distance, and the whole model is optimized end-to-end with Adam [27] at a learning rate of . Our implementation is publicly available on GitHub.
4.2. Clustering Results
We evaluate clustering performance using clustering accuracy (ACC) and normalized mutual information (NMI). ACC is obtained by aligning predicted cluster assignments with ground-truth labels via the Hungarian algorithm, while NMI quantifies the normalized mutual information shared between the two labelings. We first compare DGC with classical methods, including K-means, Gaussian Mixture Models (GMM), Hierarchical Clustering (HC), DBSCAN, and Spectral Clustering (SC). Then we compare DGC with recent generative-model-based methods, including VaDE[19], ClusterGAN[3], GAN-EM[28], VaGAN[29] and ClusterDDPM[18].
As shown in Table 2, DGC consistently outperforms all classical baselines on every dataset. On MNIST, DGC achieves 62.14% ACC, a relative improvement of 11.4% over the strongest baseline SC (55.80%), and also attains the best NMI (0.622), surpassing SC by 0.104. On COIL20, DGC reaches 51.09% ACC, exceeding SC by 0.84 points. The improvements on Fashion-MNIST and CIFAR-10 are consistent as well, where DGC attains the highest ACC and NMI among classical methods.
To further assess DGC against recent generative-model-based clustering methods, we apply DGC as a secondary clustering module on the feature representations produced by ClusterGAN, resulting in the variant DGC + ClusterGAN. All generative baselines are evaluated under the same protocol for fairness. In particular, we re-implemented ClusterDDPM based on their official code. The original paper reports approximately 97.67% accuracy
Table 2: Clustering performance comparison.
| Method | MNIST | F-MNIST | CIFAR-10 | COIL20 | ||||
|---|---|---|---|---|---|---|---|---|
| ACC | NMI | ACC | NMI | ACC | NMI | ACC | NMI | |
| Classical clustering vs. DGC | ||||||||
| K-means | 53.24 | 0.499 | 51.08 | 0.392 | 23.60 | 0.102 | 47.33 | 0.480 |
| GMM | 53.72 | 0.501 | 52.34 | 0.409 | 21.47 | 0.113 | 48.16 | 0.477 |
| HC | 52.10 | 0.485 | 49.75 | 0.378 | 20.12 | 0.095 | 46.20 | 0.465 |
| DBSCAN | 48.33 | 0.452 | 45.60 | 0.341 | 18.45 | 0.088 | 42.11 | 0.430 |
| SC | 55.80 | 0.518 | 53.90 | 0.421 | 25.30 | 0.121 | 50.25 | 0.492 |
| DGC | 62.14 | 0.627 | 54.81 | 0.428 | 25.38 | 0.138 | 51.09 | 0.511 |
| Generative-model-based clustering vs. DGC | ||||||||
| VaDE | 94.46 | 0.891 | 62.87 | 0.611 | 26.65 | 0.151 | 75.48 | 0.779 |
| ClusterGAN | 95.00 | 0.890 | 63.00 | 0.640 | 28.12 | 0.156 | 77.00 | 0.811 |
| GAN-EM | 94.93 | 0.899 | 63.57 | 0.642 | 23.14 | 0.110 | 74.03 | 0.833 |
| VaGAN | 95.75 | 0.901 | 66.95 | 0.671 | 30.20 | 0.172 | 81.67 | 0.868 |
| ClusterDDPM | 94.73 | 0.912 | 67.50 | 0.642 | 28.90 | 0.160 | 78.80 | 0.850 |
| DGC+ClusterGAN | 96.42 | 0.925 | 68.33 | 0.652 | 29.15 | 0.165 | 80.05 | 0.879 |
on MNIST, while our reproduced result is 94.73% under the same setting. As shown in Table 2, DGC+ClusterGAN achieves the best ACC and NMI on MNIST (96.42% and 0.925) and Fashion-MNIST (68.33% and 0.652), and achieves the best NMI on COIL20 (0.879). These results demonstrate that DGC serves as an effective and general clustering module that can be integrated with different generative models, providing robust improvements over their original clustering performance.
4.3. Qualitative Analysis
Cluster Center Visualization. Unlike traditional methods that produce abstract centroid parameters, our cluster centers are actual generated samples from the data distribution. Figure 3 compares the cluster centers produced by different algorithms. Notably, we do not apply any data normalization; the raw pixel values are used directly. Our method generates more meaningful and visually interpretable centers.
Table 3: Prototype quality comparison on MNIST. All prototypes are compared with the real class-wise means over 60,000 training samples resized to 32 × 32. PSNR is computed with a peak value of 2 under [-1,1] normalization. Cos. wins / MSE wins report the number of digits (out of 10) on which each method achieves the best per-digit cosine similarity / MSE.
| Method | Cos.↑ | MSE↓ | PSNR (dB)↑ | Cos. wins | MSE wins |
|---|---|---|---|---|---|
| K-Means | 0.9695 | 0.0438 | 19.60 | 3 | 2 |
| GMM | 0.9743 | 0.0349 | 20.59 | 2 | 3 |
| DDN | 0.9844 | 0.0233 | 22.35 | 5 | 5 |
To verify whether the prototypes produced by DDN are statistically representative, we compare them with the real class-wise means on MNIST. As reported in Table 3, DDN achieves the best average cosine similarity (0.9844), the lowest MSE (0.0233), and the highest PSNR (22.35 dB) among all prototype estimators. Moreover, DDN attains the best per-digit cosine similarity on 5 of 10 digits and the best per-digit MSE on 5 of 10 digits. In contrast, K-Means suffers from a catastrophic outlier on digit 9 (cosine similarity of 0.853 and MSE of 0.2061), and GMM degrades notably on digits 4–5. These results indicate that generative prototypes are not only closer to the true class means on average but also more stable across categories, making them more reliable for nearest-prototype assignment in clustering.
t-SNE Visualization. Figure 4 visualizes the embedding spaces of different methods on MNIST. The t-SNE visualization on MNIST compares the embedding spaces of different clustering methods. The ground-truth labels form clear and well-separated clusters. In contrast, K-means and GMM produce heavily overlapping clusters with ambiguous boundaries, especially between similar digits. Our method yields compact, distinctly separated clusters that closely match the ground-truth structure, demonstrating that it learns more discriminative feature representations and preserves the data manifold better than traditional baselines.
Generation Results. Our model generates diverse samples by randomly selecting among the K candidates. Figure 5 shows continuous and discrete generation results on MNIST and FFHQ. The discrete outputs maintain high visual quality while exhibiting diversity, which demonstrates the generation

Figure 3: Comparison of cluster centers. Prototypes: Class mean, DDN, K-Means and GMM (columns = matched digit 0–9).

(a) Ground truth
(b) K-means
(c) GMM
(d) Ours
Figure 4: t-SNE visualization on MNIST. Colors indicate ground-truth digit classes. Our method yields more separated clusters.
ability of DDN with the regularized Wasserstein distance.
Effect of Candidate Number K. We investigate the impact of the number of candidate prototypes K on the generative quality. As visualized in Fig. 6, directly increasing K within a small range (e.g., ) leads to noticeable improvements in the clarity and diversity of the generated digit images. However, naively enlarging K beyond 10 introduces significant computational overhead. To address this, we adopt a tree-structured multi-layer DDN to organize the candidates, which effectively scales up K (up to ) while strictly guaranteeing the clustering efficiency of . With this hierarchical design, larger K values provide a richer prototype hypothesis space, enabling the model to capture finer data distributions and generate much clearer, more realistic, and separated digit prototypes compared to the baseline methods.

(a) Continuous (MNIST)

(b) Discrete (MNIST)

(c) Continuous (FFHQ)

(d) Discrete (FFHQ)
Figure 5: Generated samples. Continuous results are obtained by interpolation; discrete results are randomly selected candidates.
As shown in Fig. 7, we evaluate the runtime efficiency with respect to the number of candidates K on the MNIST dataset. The results demonstrate that for small values of ( ), the runtime remains nearly constant at approximately 5.5 min, which reflects the fixed baseline overhead of the process.
As increases to and beyond, the runtime begins to rise. Notably, when plotted against on a logarithmic scale, the measured runtime curve aligns almost perfectly with the theoretical reference line. This strong agreement visually verifies that our method achieves an time complexity for large candidate sets. Even at , the total time consumption is only 23.9 min, further confirming the high scalability and efficiency of the proposed approach.

Figure 6: Visualization of generation results with different candidate numbers K on the MNIST dataset. When , we use a single-layer DDN with the corresponding K. When K > 10, we use DDN layers.
4.4. Ablation Studies
Effect of Network Width. We further examine the sensitivity of DGC to the network width , i.e., the number of channels in the convolutional layers. Specifically, we vary while keeping all other hyperparameters fixed. As shown in Table 4, the clustering accuracy (ACC) remains largely stable across different widths: increasing from 4 to 32 improves the ACC by only 1.34 percentage points on MNIST, and by less than 0.6 points on Fashion-MNIST, CIFAR-10, and COIL20. Notably, even the compact network with already achieves competitive clustering performance, suggesting that the clustering objective relies primarily on the discriminative information captured by the learned prototypes rather than on the capacity of the network. In contrast, the visual quality of the generated samples improves noticeably with larger : a wider network provides a richer hypoth-

Figure 7: Time consumption of different number of cluster K on the MNIST dataset.
esis space and models finer details of the data distribution, yielding clearer and more realistic prototypes. We therefore adopt as the default configuration to balance clustering performance and generative fidelity.
Effect of regularized Wasserstein distance. We further ablate the effect of Sinkhorn-Knopp loss in Table 4. DDN baseline with SPLIT-AND-PRUNE represents the original DDN's results and DDN baseline without Sinkhorn-Knopp loss removes SPLIT-AND-PRUNE operation and Chain Dropout from DNN.
First, we compare DGC with the original DDN baseline with SPLIT-AND-PRUNE (row (b)). DGC consistently outperforms this baseline, e.g., 62.14% vs. 54.20% ACC on MNIST, 54.81% vs. 47.80% on Fashion-MNIST, 25.38% vs. 22.20% on CIFAR-10, and 51.09% vs. 44.40% on COIL20, confirming the benefit of our Sinkhorn-based objective and the hierarchical candidate selection. Removing the Wasserstein distance term (row (c)) causes a catastrophic degradation across all datasets. On MNIST, the ACC drops from 62.14% to 11.50%, which is essentially random guessing, and similar collapses are observed on Fashion-MNIST (14.20%), CIFAR-10 (10.80%), and COIL20 (6.50%, whose random baseline is 5%). This confirms that without
Table 4: Ablation study on network width , Sinkhorn–Knopp loss presence, and weight .
| Config | MNIST | F-MNIST | CIFAR-10 | COIL20 | ||||
|---|---|---|---|---|---|---|---|---|
| ACC | NMI | ACC | NMI | ACC | NMI | ACC | NMI | |
| (a) Effect of network width (with ) | ||||||||
| 4 | 60.80 | 0.612 | 54.30 | 0.421 | 25.00 | 0.132 | 50.60 | 0.496 |
| 8 | 61.00 | 0.621 | 54.60 | 0.430 | 25.10 | 0.134 | 50.87 | 0.503 |
| 16 | 61.20 | 0.624 | 54.70 | 0.427 | 25.30 | 0.137 | 51.00 | 0.508 |
| 32 | 62.14 | 0.627 | 54.81 | 0.428 | 25.38 | 0.138 | 51.09 | 0.511 |
| (b) DDN baseline with SPLIT-AND-PRUNE | ||||||||
| 32 | 54.20 | 0.542 | 47.80 | 0.371 | 22.20 | 0.122 | 44.40 | 0.454 |
| (c) DDN baseline without Sinkhorn–Knopp loss | ||||||||
| 32 | 11.50 | 0.051 | 14.20 | 0.092 | 10.80 | 0.021 | 6.50 | 0.031 |
| (d) Sensitivity to Sinkhorn–Knopp loss weight (at ) | ||||||||
| 0.01 | 55.20 | 0.453 | 49.30 | 0.342 | 21.40 | 0.091 | 45.10 | 0.407 |
| 0.05 | 59.80 | 0.558 | 52.60 | 0.394 | 23.90 | 0.125 | 49.20 | 0.478 |
| 0.10 | 62.14 | 0.627 | 54.81 | 0.430 | 25.38 | 0.140 | 51.09 | 0.511 |
| 0.50 | 36.90 | 0.282 | 32.40 | 0.223 | 13.10 | 0.042 | 29.80 | 0.292 |
an optimal-transport-based geometric constraint, the generated prototypes fail to align with the true data distribution and clustering degenerates into trivial solutions.
The weight of the regularized Wasserstein distance plays a critical role. At , the performance is markedly lower (e.g., 55.20% ACC on MNIST). This is because a small weakens the entropic regularization and makes the Sinkhorn–Knopp iteration converge very slowly; with the iteration number truncated at 30, the approximation error becomes non-negligible, and the computed regularized Wasserstein distance no longer reflects the true transport cost. As increases to 0.05, the accuracy improves substantially (59.80% on MNIST), and the best results are obtained at .

(a) Mean squared loss

(b) Sinkhorn-Knopp loss
Figure 8: Training loss comparison of mean squared loss and Sinkhorn-Knopp loss.
(62.14% on MNIST), where the regularized Wasserstein distance is accurately approximated within 30 iterations while still preserving sufficient geometric structure. However, when is too large, e.g., , the entropy regularization dominates the transport cost and the regularized Wasserstein distance gradually deviates from the true earth mover's distance. Consequently, the geometric information is no longer faithfully preserved, and the ACC drops sharply to 36.90% on MNIST, with analogous declines on the other datasets. These results demonstrate that should be chosen in a moderate range to balance the approximation accuracy of the Sinkhorn iteration and the geometric fidelity of the optimal transport objective.
Convergence Analysis. Figure 8 compares the training loss curves of DDN's loss and the proposed regularized Wasserstein distance. In contrast to adversarial training, which often suffers from instability and oscillations, our method converges smoothly without severe fluctuations. This desirable behavior can be attributed to the strict convexity of the entropy-regularized optimal transport problem with respect to the transport plan, which yields well-behaved gradients throughout training. The loss prones to getting trapped in poor local optima, as reflected by a loss curve that plateaus early with little subsequent improvement. With the regularized Wasserstein distance, the loss decreases steadily and reaches a good solution, exhibiting only minor fluctuations typical of stochastic optimization.
5. Related Work
Our proposed DGC shares conceptual similarities with several classic clustering paradigms, yet differs fundamentally in both formulation and practical behavior.
K-means. K-means seeks to partition data into K clusters by minimizing the within-cluster variance [8]. While intuitive, it is sensitive to initialization, requires a fixed K, and operates on raw feature space without learning representations. DGC, in contrast, learns the cluster centers end-to-end via a deep neural network. Moreover, DGC optimizes a regularized Wasserstein distance objective that preserves global geometric structure [21; 30], in contrast to the squared Euclidean distance used in K-means, whose non-convex objective provides no guarantee of reaching a global optimum.
Self-Organizing Maps. SOM is a neural network-based clustering method that preserves topological structure by mapping high-dimensional data onto a low-dimensional grid [31]. Both SOM and DGC share a similar objective: they try to assign each data point to its nearest prototype. However, DGC offers several advantages. First, its tree-structured architecture enables efficient inference with complexity, whereas SOM typically requires scanning all prototypes ( ). Second, SOM focuses on preserving local topology (neighborhood relationships), while DGC aims to produce cluster centers that are the most representative samples from the data distribution, offering clearer interpretability. Third, DGC leverages a deep neural network to learn the underlying data structure automatically, avoiding hand-crafted rules for handling nearby node similarity.
Clustering with Generative Models. A number of recent studies have sought to connect generative modeling with clustering. ClusterGAN [3] and ClusterDDPM [18], for instance, adopt a two-stage pipeline in which a generative model first learns unsupervised deep representations of the data, and a conventional clustering algorithm such as K-means or GMM is then applied to the extracted features. While effective in practice, these methods treat the generative model merely as a feature extractor and do not exploit the structural relationship between the generation process and the clustering objective. In a different line of work, optimal transport has been introduced into clustering as a distance measure [32; 2; 33]; however, these approaches employ Wasserstein distance purely as a metric for comparing clusters, rather than as a distribution fitting criterion. Consequently, existing methods generally regard generation and clustering as two independent tasks. The former aims to model the global data distribution for realistic sampling, while the latter seeks representative centers for data partitioning. In this paper, we argue that c lustering can be naturally formulated as a constrained generative modeling problem.
References
[1] B. S. Everitt, S. Landau, M. Leese, D. Stahl, Cluster Analysis, 5th Edition, John Wiley & Sons, 2011.
[2] E. Del Barrio, J. A. Cuesta-Albertos, C. Matrán, J. M. Mayo-Íscar, Robust clustering tools based on optimal transportation, Statistics and Computing 29 (1) (2019) 139–160.
[3] S. Mukherjee, H. Asnani, E. Lin, S. Kannan, Clustergan: Latent space clustering in generative adversarial networks, in: Proceedings of the AAAI conference on artificial intelligence, Vol. 33, 2019, pp. 4610–4617.
[4] M. Ester, H.-P. Kriegel, J. Sander, X. Xu, A density-based algorithm for discovering clusters in large spatial databases with noise, in: Proceedings of the 2nd International Conference on Knowledge Discovery and Data Mining (KDD), AAAI Press, 1996, pp. 226–231.
[5] H. Jiang, W. Ma, Y. Luo, X. Duan, J. Zhang, Covariance-driven consistency and mmd complementarity with hybrid graph for multi-view clustering, Neural Networks 205 (2027) 109382.
[6] S. Peng, Y. Yuan, X. Yang, Z. Yang, F. Nie, Hierarchical feature based dual contrastive multiview clustering, Neural Networks 205 (2027) 109372.
[7] J. Qiu, Y. Ye, L. Peng, D. Yang, J. Xian, M.-F. Leung, H. Che, C. Liu, Self-supervised semantic graph propagation for multi-view clustering, Neural Networks 202 (2026) 108973.
[8] S. P. Lloyd, Least squares quantization in pcm, IEEE Transactions on Information Theory 28 (2) (1982) 129–137.
[9] C. M. Bishop, Pattern Recognition and Machine Learning, Springer, 2006.
[10] D. Müllner, Modern hierarchical, agglomerative clustering algorithms, arXiv preprint arXiv:1109.2378 (2011).
[11] M. Ester, H.-P. Kriegel, J. Sander, X. Xu, A density-based algorithm for discovering clusters in large spatial databases with noise, in: Proceedings of the Second International Conference on Knowledge Discovery and Data Mining (KDD '96), 1996, pp. 226–231.
[12] Y. Liu, J. Mi, H. Wang, An efficient spectral clustering algorithm based on adaptive granular ball anchors, Pattern Recognition (2026) 114747.
[13] I. Guyon, U. Von Luxburg, R. C. Williamson, Clustering: Science or art?, in: Proceedings of ICML Workshop on Unsupervised and Transfer Learning, 2012, pp. 65–79.
[14] J. Ho, A. Jain, P. Abbeel, Denoising diffusion probabilistic models, Advances in Neural Information Processing Systems 33 (2020).
[15] Y. Song, S. Ermon, Generative modeling by estimating gradients of the data distribution, in: H. M. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. B. Fox, R. Garnett (Eds.), Advances in Neural Information Processing Systems, 2019, pp. 11895–11907.
[16] Y. Song, J. Sohl-Dickstein, D. P. Kingma, A. Kumar, S. Ermon, B. Poole, Score-based generative modeling through stochastic differential equations, in: 9th International Conference on Learning Representations, ICLR, OpenReview.net, 2021.
[17] A. Hyvärinen, Estimation of non-normalized statistical models by score matching, Journal of Machine Learning Research 6 (Apr) (2005) 695–709.
[18] J. Yan, J. Liu, Z.-y. Zhang, Clusterddpm: an em clustering framework with denoising diffusion probabilistic models, Information Sciences (2025) 122518.
[19] Z. Jiang, Y. Zheng, H. Tan, B. Tang, H. Zhou, Variational deep embedding: An unsupervised and generative approach to clustering, in:
Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence, IJCAI 2017, Melbourne, Australia, August 19-25, 2017, ijcai.org, 2017, pp. 1965–1972.
[20] L. Yang, Discrete distribution networks, in: International Conference on Learning Representations, Vol. 2025, 2025, pp. 60698–60721.
[21] M. Cuturi, Sinkhorn distances: Lightspeed computation of optimal transportation distances, in: Advances in Neural Information Processing Systems (NeurIPS) 26, Curran Associates, Inc., 2013, pp. 2292–2300.
[22] X. Qian, G. Cabanes, P. Rastin, M. A. Guidani, G. Marrakchi, M. Clausel, N. Grozavu, Incremental clustering based on wasserstein distance between histogram models, Pattern Recognition 162 (2025) 111414.
[23] Y. LeCun, L. Bottou, Y. Bengio, P. Haffner, Gradient-based learning applied to document recognition, Proceedings of the IEEE 86 (11) (1998) 2278–2324.
[24] H. Xiao, K. Rasul, R. Vollgraf, Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms, arXiv preprint arXiv:1708.07747 (2017).
[25] A. Krizhevsky, G. Hinton, et al., Learning multiple layers of features from tiny images (2009).
[26] S. A. Nene, S. K. Nayar, H. Murase, Columbia object image library (coil-20), Tech. Rep. CUCS-005-96, Columbia University, Department of Computer Science (1996).
[27] D. P. Kingma, J. Ba, Adam: A method for stochastic optimization, arXiv preprint arXiv:1412.6980 (2014).
[28] W. Zhao, S. Wang, Z. Xie, J. Shi, C. Xu, GAN-EM: GAN based EM learning framework, in: S. Kraus (Ed.), Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI 2019, Macao, China, August 10-16, 2019, ijcai.org, 2019, pp. 4404–4411.
[29] L. Yang, W. Fan, N. Bouguila, Clustering analysis via deep generative models with mixture models, IEEE Trans. Neural Networks Learn. Syst. 33 (1) (2022) 340–350.
[30] A. Genevay, G. Peyré, M. Cuturi, Learning generative models with sinkhorn divergences, in: Proceedings of the 21st International Conference on Artificial Intelligence and Statistics (AISTATS), Vol. 84, PMLR, 2018, pp. 1608–1617.
[31] T. Kohonen, The self-organizing map, Proceedings of the IEEE 78 (9) (1990) 1464–1480.
[32] S. Chakraborty, D. Paul, S. Das, Hierarchical clustering with optimal transport, Statistics & Probability Letters 163 (2020) 108781.
[33] C. Laclau, I. Redko, B. Matei, Y. Bennani, V. Brault, Co-clustering through optimal transport, in: Proceedings of the 34th International Conference on Machine Learning (ICML), Vol. 70, PMLR, 2017, pp. 1955–1964.