SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Thomas M. Sutter\*, Alain Ryser\*, Joram Liebeskind, Julia E. Vogt  
Department of Computer Science  
ETH Zurich
Partitioning a set of elements into an unknown number of mutually exclusive subsets is essential in many machine learning problems. However, assigning elements, such as samples in a dataset or neurons in a network layer, to an unknown and discrete number of subsets is inherently non-differentiable, prohibiting end-to-end gradient-based optimization of parameters. We overcome this limitation by proposing a novel two-step method for inferring partitions, which allows its usage in variational inference tasks. This new approach enables reparameterized gradients with respect to the parameters of the new random partition model. Our method works by inferring the number of elements per subset and, second, by filling these subsets in a learned order. We highlight the versatility of our general-purpose approach on three different challenging experiments: variational clustering, inference of shared and independent generative factors under weak supervision, and multitask learning.
Partitioning a set of elements into subsets is a classical mathematical problem that attracted much interest over the last few decades (Rota, 1964; Graham et al., 1989). A partition over a given set is a collection of non-overlapping subsets such that their union results in the original set. In machine learning (ML), partitioning a set of elements into different subsets is essential for many applications, such as clustering (Bishop and Svensen, 2004) or classification (De la Cruz-Mesía et al., 2007).
Random partition models (RPM, Hartigan, 1990) define a probability distribution over the space of partitions. RPMs can explicitly leverage the relationship between elements of a set, as they do not necessarily assume i.i.d. set elements. On the other hand, most existing RPMs are intractable for large datasets (MacQueen, 1967; Plackett, 1975; Pitman, 1996) and lack a reparameterization scheme, prohibiting their direct use in gradient-based optimization frameworks.
In this work, we propose the differentiable random partition model (DRPM), a fully-differentiable relaxation for RPMs that allows reparametrizable sampling. The DRPM follows a two-stage procedure: first, we model the number of elements per subset, and second, we learn an ordering of the elements with which we fill the elements into the subsets. The DRPM enables the integration of partition models into state-of-the-art ML frameworks and learning RPMs from data using stochastic optimization.
We evaluate our approach in three experiments, demonstrating the proposed DRPM's versatility and advantages. First, we apply the DRPM to a variational clustering task, highlighting how the reparametrizable sampling of partitions allows us to learn a novel kind of Variational Autoencoder (VAE, Kingma and Welling, 2014). By leveraging potential dependencies between samples in a dataset, DRPM-based clustering overcomes the simplified i.i.d. assumption of previous works, which used categorical priors (Jiang et al., 2016). In our second experiment, we demonstrate how to retrieve sets of shared and independent generative factors of paired images using the proposed DRPM. In
*Equal Contribution. Correspondence to {thomas.sutter, alain.ryser}@inf.ethz.ch
Figure 1: Illustration of the proposed DRPM method. We first sample a permutation matrix  $\pi$  and a set of subset sizes  $n$  separately in two stages. We then use  $n$  and  $\pi$  to generate the assignment matrix  $Y$ , the matrix representation of a partition  $\rho$ .
contrast to previous works (Bouchacourt et al., 2018; Hosoya, 2018; Locatello et al., 2020), which rely on strong assumptions or heuristics, the DRPM enables end-to-end inference of generative factors. Finally, we perform multitask learning (MTL) by using the DRPM as a building block in a deterministic pipeline. We show how the DRPM learns to assign subsets of network neurons to specific tasks. The DRPM can infer the subset size per task based on its difficulty, overcoming the tedious work of finding optimal loss weights (Kurin et al., 2022; Xin et al., 2022).
To summarize, we introduce the DRPM, a novel differentiable and reparametrizable relaxation of RPMs. In extensive experiments, we demonstrate the versatility of the proposed method by applying the DRPM to clustering, inference of generative factors, and multitask learning.
Random Partition Models Previous works on RPMs include product partition models (Hartigan, 1990), species sampling models (Pitman, 1996), and model-based clustering approaches (Bishop and Svensen, 2004). Further, Lee and Sang (2022) investigate the balancedness of subset sizes of RPMs. They all require tedious manual adjustment, are non-differentiable, and are, therefore, unsuitable for modern ML pipelines. A fundamental RPM application is clustering, where the goal is to partition a given dataset into different subsets, the clusters. In contrast to many existing approaches (Yang et al., 2019; Sarfraz et al., 2019; Cai et al., 2022), we consider cluster assignments as random variables, allowing us to treat clustering from a variational perspective. Previous works in variational clustering (Jiang et al., 2016; Dilokthanakul et al., 2016; Manduchi et al., 2021) implicitly define RPMs to perform clustering. They compute partitions in a variational fashion by making i.i.d. assumptions about the samples in the dataset and imposing soft assignments of the clusters to data points during training. A problem related to set partitioning is the earth mover's distance problem (EMD, Monge, 1781; Rubner et al., 2000). However, EMD aims to assign a set's elements to different subsets based on a cost function and given subset sizes. Iterative solutions to the problem exist (Sinkhorn, 1964), and various methods have recently been proposed, e.g., for document ranking (Adams and Zemel, 2011) or permutation learning (Santa Cruz et al., 2017; Mena et al., 2018; Cuturi et al., 2019).
Differentiable and Reparameterizable Discrete Distributions Following the proposition of the Gumbel-Softmax trick (GST, Jang et al., 2016; Maddison et al., 2017), interest in research around continuous relaxations for discrete distributions and non-differentiable algorithms rose. The GST enabled the reparameterization of categorical distributions and their integration into gradient-based optimization pipelines. Based on the same trick, Sutter et al. (2023) propose a differentiable formulation for the multivariate hypergeometric distribution. Multiple works on differentiable sorting procedures and permutation matrices have been proposed, e.g., Linderman et al. (2018); Prillo and Eisenschlos (2020); Petersen et al. (2021). Further, Grover et al. (2019) described the distribution over permutation matrices  $p(\pi)$  for a permutation matrix  $\pi$  using the Plackett-Luce distribution (PL, Luce, 1959; Plackett, 1975). Prillo and Eisenschlos (2020) proposed a computationally simpler variant of Grover et al. (2019). More examples of differentiable relaxations include the top- $k$  elements selection procedure (Xie and Ermon, 2019), blackbox combinatorial solvers (Pogančić et al., 2019), implicit likelihood estimations (Niepert et al., 2021), and  $k$ -subset sampling (Ahmed et al., 2022).
Set Partitions A partition  $\rho = (\mathcal{S}_1, \ldots, \mathcal{S}_K)$  of a set  $[n] = \{1, \ldots, n\}$  with  $n$  elements is a collection of  $K$  subsets  $\mathcal{S}_k \subseteq [n]$  where  $K$  is a priori unknown (Mansour and Schork, 2016). For a partition  $\rho$  to be valid, it must hold that
$$
\mathcal {S} _ {1} \cup \dots \cup \mathcal {S} _ {K} = [ n ] \quad \text {a n d} \forall k \neq l: \mathcal {S} _ {k} \cap \mathcal {S} _ {l} = \emptyset \tag {1}
$$
In other words, every element  $i \in [n]$  has to be assigned to precisely one subset  $\mathcal{S}_k$ . We denote the size of the  $k$ -th subset  $\mathcal{S}_k$  as  $n_k = |\mathcal{S}_k|$ . Alternatively, we can describe a partition  $\rho$  through an assignment matrix  $Y = [\pmb{y}_1, \dots, \pmb{y}_K]^T \in \{0, 1\}^{K \times n}$ . Every row  $\pmb{y}_k \in \{0, 1\}^{1 \times n}$  is a multi-hot vector, where  $\pmb{y}_{ki} = 1$  assigns element  $i$  to subset  $\mathcal{S}_k$ .
Within the scope of our work, we view a partition of a set of  $n$  elements as a special case of the urn model. Here, the urn contains marbles with  $n$  different colors, where each color corresponds to a subset in the partition. For each color, there are  $n$  marbles corresponding to the potential elements of their color/subset. To derive a partition, we sample  $n$  marbles without replacement from the urn and register the order in which we draw the colors. The color of the  $i$ -th marble then determines the subset to which element  $i$  corresponds. Furthermore, we can constrain the partition to only  $K$  subsets by taking an urn with only  $K$  different colors.
Probability distribution over subset sizes The multivariate non-central hypergeometric distribution (MVHG) describes sampling without replacement and allows to skew the importance of groups with an additional importance parameter  $\omega$  (Fisher, 1935; Wallenius, 1963; Chesson, 1976). The MVHG is an urn model and is described by the number of different groups  $K \in \mathbb{N}$ , the number of elements in the urn of every group  $\boldsymbol{m} = [m_1, \dots, m_K] \in \mathbb{N}^K$ , the total number of elements in the urn  $\sum_{k=1}^{K} m_k \in \mathbb{N}$ , the number of samples to draw from the urn  $n \in \mathbb{N}_0$ , and the importance factor for every group  $\omega = [\omega_1, \dots, \omega_K] \in \mathbb{R}_{0+}^K$  (Johnson, 1987). Then, the probability of sampling  $\boldsymbol{n} = \{n_1, \dots, n_K\}$ , where  $n_k$  describes the number of elements drawn from group  $K$  is
$$
p (\boldsymbol {n}; \boldsymbol {\omega}, \boldsymbol {m}) = \frac {1}{P _ {0}} \prod_ {k = 1} ^ {K} \binom {m _ {k}} {n _ {k}} \omega_ {k} ^ {n _ {k}} \tag {2}
$$
where  $P_0$  is a normalization constant. Hence, the MVHG  $p(\pmb{n};\omega,\pmb{m})$  allows us to model dependencies between different elements of a set since drawing one element from the urn influences the probability of drawing one of the remaining elements, creating interdependence between them. For the rest of the paper, we assume  $\forall m_k \in \pmb{m}: m_k = n$ . We thus use the shorthand  $p(\pmb{n};\omega)$  to denote the density of the MVHG. We refer to Appendix A.1 for more details.
Probability distribution over Permutation Matrices Let  $p(\pi)$  denote a distribution over permutation matrices  $\pi \in \{0,1\}^{n\times n}$ . A permutation matrix  $\pi$  is doubly stochastic (Marcus, 1960), meaning that its row and column vectors sum to 1. This property allows us to use  $\pi$  to describe an order over a set of  $n$  elements, where  $\pi_{ij} = 1$  means that element  $j$  is ranked at position  $i$  in the imposed order. In this work, we assume  $p(\pi)$  to be parameterized by scores  $s \in \mathbb{R}_+^n$ , where each score  $s_i$  corresponds to an element  $i$ . The order given by sorting  $s$  in decreasing order corresponds to the most likely permutation in  $p(\pi; s)$ . Sampling from  $p(\pi; s)$  can be achieved by resampling the scores as  $\tilde{s}_i = \beta \log s_i + g_i$  where  $g_i \sim Gumbel(0, \beta)$  for fixed scale  $\beta$ , and sorting them in decreasing order. Hence, resampling scores  $s$  enables the resampling of permutation matrices  $\pi$ . The probability over orderings  $p(\pi; s)$  is then given by (Thurstone, 1927; Luce, 1959; Plackett, 1975; Yellott, 1977)
$$
p (\pi ; \boldsymbol {s}) = p ((\pi \tilde {\boldsymbol {s}}) _ {1} \geq \dots \geq (\pi \tilde {\boldsymbol {s}}) _ {n}) = \frac {(\pi \boldsymbol {s}) _ {1}}{Z} \frac {(\pi \boldsymbol {s}) _ {2}}{Z - (\pi \boldsymbol {s}) _ {1}} \dots \frac {(\pi \boldsymbol {s}) _ {n}}{Z - \sum_ {j = 1} ^ {n - 1} (\pi \boldsymbol {s}) _ {j}} \tag {3}
$$
where  $\pi$  is a permutation matrix and  $Z = \sum_{i=1}^{n} s_i$ . The resulting distribution is a Plackett-Luce (PL) distribution (Luce, 1959; Plackett, 1975) if and only if the scores  $s$  are perturbed with noise drawn from Gumbel distributions with identical scales (Yellott, 1977). For more details, we refer to Appendix A.2).
4 A two-stage Approach to Random Partition Models
We propose the DRPM  $p(Y; \omega, s)$ , a differentiable and reparameterizable two-stage Random Partition Model (RPM). The proposed formulation separately infers the number of elements  $i$  per subset
$\pmb{n} \in \mathbb{N}_0^K$ , where  $\sum_{k=1}^{K} n_k = n$ , and the assignment of elements to subsets  $S_k$  by inducing an order on the  $n$  elements and filling  $S_1, \ldots, S_K$  sequentially in this order. To model the order of the elements, we use a permutation matrix  $\pi = [\pi_1, \dots, \pi_n]^T \in \{0, 1\}^{n \times n}$ , from which we infer  $Y$  by sequentially summing up rows according to  $\pmb{n}$ . Note that the doubly-stochastic property of all permutation matrices  $\pi$  ensures that the columns of  $Y$  remain one-hot vectors, assigning every element  $i$  to precisely one of the  $K$  subsets. At the same time, the  $k$ -th row of  $Y$  corresponds to an  $n_k$ -hot vector  $\pmb{y}_k$  and therefore serves as a subset selection vector, i.e.
$$
\boldsymbol {y} _ {k} = \sum_ {i = \nu_ {k} + 1} ^ {\nu_ {k} + n _ {k}} \pi_ {i}, \quad \text {w h e r e} \quad \nu_ {k} = \sum_ {\iota = 1} ^ {k - 1} n _ {\iota} \tag {4}
$$
such that  $Y = [\pmb{y}_1, \dots, \pmb{y}_K]^T$ . Additionally, Figure 1 provides an illustrative example. Note that  $K$  defines the maximum number of possible subsets, and not the effective number of non-empty subsets, because we allow  $S_k$  to be the empty set  $\emptyset$  (Mansour and Schork, 2016). We base the following Proposition 4.1 on the MVHG distribution  $p(\pmb{n}; \pmb{\omega})$  for the subset sizes  $\pmb{n}$  and the PL distribution  $p(\pi; s)$  for assigning the elements to subsets. However, the proposed two-stage approach to RPMs is not restricted to these two classes of probability distributions.
Proposition 4.1 (Two-stage Random Partition Model). Given a probability distribution over subset sizes  $p(\pmb{n};\pmb{\omega})$  with  $\pmb{n} \in \mathbb{N}_0^K$  and distribution parameters  $\pmb{\omega} \in \mathbb{R}_{+}^{K}$  and a PL probability distribution over random orderings  $p(\pi ;s)$  with  $\pi \in \{0,1\}^{n\times n}$  and distribution parameters  $s \in \mathbb{R}_{+}^{n}$ , the probability mass function  $p(Y;\pmb{\omega},\pmb{s})$  of the two-stage RPM is given by
$$
p (Y; \boldsymbol {\omega}, s) = p (\boldsymbol {y} _ {1}, \dots , \boldsymbol {y} _ {K}; \boldsymbol {\omega}, s) = p (\boldsymbol {n}; \boldsymbol {\omega}) \sum_ {\pi \in \Pi_ {Y}} p (\pi ; s) \tag {5}
$$
where  $\Pi_Y = \{\pi : \pmb{y}_k = \sum_{i = \nu_k + 1}^{\nu_k + n_k} \pmb{\pi}_i, k = 1, \dots, K\}$ , and  $\pmb{y}_k$  and  $\nu_k$  as in Equation (4).
In the following, we outline the proof of Proposition 4.1 and refer to Appendix B for a formal derivation. We calculate  $p(Y; \omega, s)$  as a probability of subsets  $p(\pmb{y}_1, \dots, \pmb{y}_K; \omega, s)$ , which we compute sequentially over subsets, i.e.
$$
p \left(\boldsymbol {y} _ {1}, \dots , \boldsymbol {y} _ {K}; \boldsymbol {\omega}, \boldsymbol {s}\right) = p \left(\boldsymbol {y} _ {1}; \boldsymbol {\omega}, \boldsymbol {s}\right) \dots p \left(\boldsymbol {y} _ {K} \mid \boldsymbol {y} _ {<   K}; \boldsymbol {\omega}, \boldsymbol {s}\right), \tag {6}
$$
where  $\pmb{y}_{< k} = [\pmb{y}_1, \dots, \pmb{y}_{k-1}]$  and
$$
p \left(\boldsymbol {y} _ {k} \mid \boldsymbol {y} _ {<   k}; \boldsymbol {\omega}, \boldsymbol {s}\right) = p \left(n _ {k} \mid n _ {<   k}; \boldsymbol {\omega}\right) \sum_ {\bar {\pi} \in \Pi_ {\boldsymbol {y} _ {k}}} p \left(\bar {\pi} \mid n _ {k}, \boldsymbol {y} _ {<   k}; \boldsymbol {s}\right), \tag {7}
$$
where  $\Pi_{\pmb{y}_k}$  in Equation (7) is the set of all subset permutations of elements  $i \in S_k$ . A subset permutation matrix  $\bar{\pi}$  represents an ordering over only  $n_k$  out of the total  $n$  elements. The probability  $p(\pmb{y}_k \mid \pmb{y}_{<k}; \pmb{\omega}, \pmb{s})$  describes the probability of a subset of a given size  $n_k$  by marginalizing over the probabilities of all subset permutations  $p(\bar{\pi} \mid n_k, \pmb{y}_{<k}; \pmb{s})$ . Hence, the sum over all  $p(\bar{\pi} \mid n_k, \pmb{y}_{<k}; \pmb{s})$  makes  $p(\pmb{y}_k \mid \pmb{y}_{<k}; \pmb{\omega}, \pmb{s})$  invariant to the ordering of elements  $i \in S_k$  (Xie and Ermon, 2019). Note that in a slight abuse of notation, we use  $p(\bar{\pi} \mid n_k, \pmb{y}_{<k}; \pmb{\omega}, \pmb{s})$  as the probability of a subset permutation  $\bar{\pi}$  given that there are  $n_k$  elements in  $S_k$  and thus  $\bar{\pi} \in \{0, 1\}^{n_k \times n}$ .
The probability of a subset permutation matrix  $p(\bar{\pi} \mid n_k, \mathbf{y}_{<k}; s)$  describes the probability of drawing the elements  $i \in S_k$  in the order defined by the subset permutation matrix  $\bar{\pi}$  given that the elements in  $S_{<k}$  are already determined. Hence, we condition on the subsets  $\mathbf{y}_{<k}$ . This property follows from Luce's choice axiom (LCA, Luce, 1959). Additionally, we condition on  $n_k$ , the size of the subset  $S_k$ . The probability of a subset permutation is given by
$$
p \left(\bar {\pi} \mid n _ {k}, \boldsymbol {y} _ {<   k}; \boldsymbol {s}\right) = \prod_ {i = 1} ^ {n _ {k}} \frac {(\bar {\pi} \boldsymbol {s}) _ {i}}{Z _ {k} - \sum_ {j = 1} ^ {i - 1} (\bar {\pi} \boldsymbol {s}) _ {j}} \tag {8}
$$
In contrast to the distribution over permutations matrices  $p(\pi; s)$  in Equation (3), we compute the product over  $n_k$  terms and have a different normalization constant  $Z_k$ , which is the sum over the scores  $s_i$  of all elements  $i \in S_k$ . Although we induce an ordering over all elements  $i$  by using a permutation matrix  $\pi$ , the probability  $p(\mathbf{y}_k \mid \mathbf{y}_{<k}; \boldsymbol{\omega}, s)$  is invariant to intra-subset orderings of elements  $i \in S_k$ . Finally, we arrive at Equation (5) by substituting Equation (7) into Equation (6),
and applying the definition of the conditional probability  $p(\pmb{n};\pmb{\omega}) = \prod_{k=1}^{K} p(n_k \mid n_{<k};\pmb{\omega})$  and by reshuffling indices  $\sum_{\pi \in \Pi_Y} p(\pi; \pmb{s}) = \prod_{k=1}^{K} \sum_{\bar{\pi} \in \Pi_{\pmb{y}_k}} p(\bar{\pi} \mid n_k, \pmb{y}_{<k}; \pmb{s})$ .
Note that in contrast to previous RPMs, which often need exponentially many distribution parameters (Plackett, 1975), the proposed two-stage approach to RPMs only needs  $(n + K)$  parameters to create an RPM for  $n$  elements: the score parameters  $s\in \mathbb{R}_+^n$  and the group importance parameters  $\omega \in \mathbb{R}_{+}^{K}$ .
Finally, to sample from the two-stage RPM of Proposition 4.1 we apply the following procedure: First sample  $\pi \sim p(\pi; s)$  and  $n \sim p(n; \omega)$ . From  $\pi$  and  $n$ , compute partition  $Y$  by summing the rows of  $\pi$  according to  $n$  as described in Equation (4) and illustrated in Figure 1.
4.1 Approximating the Probability Mass Function
The number of permutations per subset  $|\Pi_{\mathbf{y}_k}|$  scales factorially with the subset size  $n_k$ , i.e.  $|\Pi_{\mathbf{y}_k}| = n_k!$ . Consequently, the number of valid permutation matrices  $|\Pi_Y|$  is given as a function of  $\pmb{n}$ , i.e.
$$
\left| \Pi_ {Y} \right| = \prod_ {k = 1} ^ {K} \left| \Pi_ {\boldsymbol {y} _ {k}} \right| = \prod_ {k = 1} ^ {K} n _ {k}! \tag {9}
$$
Although Proposition 4.1 describes a well-defined distribution for  $p(Y; \omega, s)$ , it is in general computationally intractable due to Equation (9). In practice, we thus approximate  $p(Y; \omega, s)$  using the following Lemma.
Lemma 4.2.  $p(Y; \omega, s)$  can be upper and lower bounded as follows
$$
\forall \pi \in \Pi_ {Y}: p (\boldsymbol {n}; \boldsymbol {\omega}) p (\pi ; \boldsymbol {s}) \leq p (Y; \boldsymbol {\omega}, \boldsymbol {s}) \leq | \Pi_ {Y} | p (\boldsymbol {n}; \boldsymbol {\omega}) \max  _ {\tilde {\pi}} p (\tilde {\pi}; \boldsymbol {s}) \tag {10}
$$
We provide the proof in Appendix B. Note that from Equation (3) we see that  $\max_{\tilde{\pi}} p(\tilde{\pi}; s) = p(\pi_s; s)$ , where  $\pi_s$  is the permutation that results from sorting the unperturbed scores  $s$ .
4.2 The Differentiable Random Partition Model
To incorporate our two-stage RPM into gradient-based optimization frameworks, we require that efficient computation of gradients is possible for every step of the method. The following Lemma guarantees differentiability, allowing us to train deep neural networks with our method in an end-to-end fashion:
Lemma 4.3 (DRPM). A two-stage RPM is differentiable and reparameterizable if the distribution over subset sizes  $p(n; \omega)$  and the distribution over orderings  $p(\pi; s)$  are differentiable and reparameterizable.
We provide the proof in Appendix B. Note that Lemma 4.3 enables us to learn variational posterior approximations and priors using Stochastic Gradient Variational Bayes (SGVB, Kingma and Welling, 2014). In our experiments, we apply Lemma 4.3 using the recently proposed differentiable formulations of the MVHG (Sutter et al., 2023) and the PL distribution (Grover et al., 2019), though other choices would also be valid.
We demonstrate the versatility and effectiveness of the proposed DRPM in three different experiments. First, we propose a novel generative clustering method based on the DRPM, which we compare against state-of-the-art variational clustering methods and demonstrate its conditional generation capabilities. Then, we demonstrate how the DRPM can infer shared and independent generative factors under weak supervision. Finally, we apply the DRPM to multitask learning (MTL), where the DRPM enables an adaptive neural network architecture that partitions layers based on task difficulty<sup>2</sup>.
2We provide the code under https://github.com/thomassutter/drpm
Table 1: We compare the clustering performance of the DRPM-VC on test sets of MNIST and FMNIST between Gaussian Mixture Models (GMM), GMM in latent space (Latent GMM), and Variational Deep Embedding (VaDE). We measure performance in terms of the Normalized Mutual Information (NMI), Adjusted Rand Index (ARI), and cluster accuracy (ACC) over five seeds and put the best model in bold.
MNIST	FMNIST
NMI	ARI	ACC	NMI	ARI	ACC
GMM	0.32±0.01	0.22±0.02	0.41±0.01	0.49±0.01	0.33±0.00	0.44±0.01
LATENT GMM	0.86±0.02	0.83±0.06	0.88±0.07	0.60±0.00	0.47±0.01	0.62±0.01
VADE	0.84±0.01	0.76±0.05	0.82±0.04	0.56±0.02	0.40±0.04	0.56±0.03
DRPM-VC	0.89±0.01	0.88±0.03	0.94±0.02	0.64±0.00	0.51±0.01	0.65±0.00
Figure 2: A sample drawn from a DRPM-VC model trained on FMNIST. On top is the sampled partition with the cluster assignments, and on the bottom are generated images corresponding to the sampled assignment matrix. The DRPM-VC learns consistent clusters for different pieces of clothing and can generate new samples of each cluster with great variability.
5.1 Variational Clustering with Random Partition Models