Year: 2021

Abstract:
Given a union of non-linear manifolds, non-linear subspace clustering or manifold clustering aims to cluster data points based on manifold structures and also learn to parameterize each manifold as a linear subspace in a feature space. Deep neural networks have the potential to achieve this goal under highly non-linear settings given their large capacity and flexibility. We argue that achieving manifold clustering with neural networks requires two essential ingredients: a domain-specific constraint that ensures the identification of the manifolds, and a learning algorithm for embedding each manifold to a linear subspace in the feature space. This work shows that many constraints can be implemented by data augmentation. For subspace feature learning, Maximum Coding Rate Reduction (MCR) objective can be used. Putting them together yields Neural Manifold Clustering and Embedding (NMCE), a novel method for general purpose manifold clustering, which significantly outperforms autoencoder-based deep subspace clustering and achieve state-of-the-art performance on several important benchmarks. Further, on more challenging natural image datasets, NMCE can also outperform other algorithms specifically designed for clustering. Qualitatively, we demonstrate that NMCE learns a meaningful and interpretable feature space. As the formulation of NMCE is closely related to several important Self-supervised learning (SSL) methods, we believe this work can help us build a deeper understanding on SSL representation learning.

text: Given a union of non-linear manifolds, non-linear subspace clustering or manifold clustering aims to cluster data points based on manifold structures and also learn to parameterize each manifold as a linear subspace in a feature space. Deep neural networks have the potential to achieve this goal under highly non-linear settings given their large capacity and flexibility. We argue that achieving manifold clustering with neural networks requires two essential ingredients: a domain-specific constraint that ensures the identification of the manifolds, and a learning algorithm for embedding each manifold to a linear subspace in the feature space. This work shows that many constraints can be implemented by data augmentation. For subspace feature learning, Maximum Coding Rate Reduction (MCR2) objective can be used. Putting them together yields Neural Manifold Clustering and Embedding (NMCE), a novel method for general purpose manifold clustering, which significantly outperforms autoencoder-based deep subspace clustering and achieve state-of-the-art performance on several important benchmarks. Further, on more challenging natural image datasets, NMCE can also outperform other algorithms specifically designed for clustering. Qualitatively, we demonstrate that NMCE learns a meaningful and interpretable feature space. As the formulation of NMCE is closely related to several important Self-supervised learning (SSL) methods, we believe this work can help us build a deeper understanding on SSL representation learning.

heading: 1 INTRODUCTION
text: Here we investigate unsupervised representation learning, which aims to learn structures (features) from data without the use of any label. If the data lie in a linear subspace, the linear subspace can be extracted by Principal Component Analysis (PCA) (Jolliffe, 1986), one of the most basic forms of unsupervised learning. When the data occupy a union of several linear subspaces, subspace clustering (SC) (Vidal et al., 2016) is needed to cluster each data point to a subspace as well as estimating the parameters of each subspace. Here we are concerned with even more challenging scenarios, when data points come from a union of several non-linear low-dimensional manifolds. In such scenarios, the clustering problem can be formulated as follows (Elhamifar & Vidal, 2011):
Task 1. Manifold Clustering and Embedding: Given that the data points come from a union of lowdimensional manifolds, we shall segment the data points based on their corresponding manifolds, and obtain a low-dimensional embedding for each manifold.
Various methods have been developed to solve this problem (Abdolali & Gillis, 2021), but it is still an open question how to use neural networks effectively in manifold clustering problems (Haeffele et al., 2020). In this paper, we propose neural manifold clustering and embedding (NMCE) that follows three principles: 1) The clustering and representation should respect a domain-specific constraint, e.g. local neighborhoods, local linear interpolation or data augmentation invariances. 2) The embedding of a particular manifold shall not collapse. 3) The embedding of identified manifolds shall be linearized and separated, i.e. they occupy different linear subspaces. We achieve 1) using data augmentations, and achieve 2) and 3) with the subspace feature learning algorithm maximal coding rate reduction (MCR2) objective (Yu et al., 2020). This work make the following specific contributions:
1. We combine data augmentation with MCR2 to yield a novel algorithm for general purpose manifold clustering and embedding (NMCE). We also discuss connections between the algorithm and self-supervised contrastive learning.
2. We demonstrate that NMCE achieves state-of-the-art performance on standard subspace clustering benchmarks, and can outperform the best clustering algorithms on more challenging high-dimensional image datasets like CIFAR-10 and CIFAR-20. Further, empirical evaluation suggests that our algorithm also learns a meaningful feature space.

heading: 2 RELATED WORK
text: Manifold Learning. In classical manifold learning, the goal is to map the manifold-structured data points to a low-dimensional representation space such that the manifold structure is preserved. There are two key ingredients: 1) Choosing a geometric property from the original data space to be preserved. For example, the local euclidean neighborhood (Belkin & Niyogi, 2003), or linear interpolation by neighboring data points (Roweis & Saul, 2000). 2) The embedding should not collapse to a trivial solution. To avoid the trivial solution, the variance of the embedding space is typically constrained in spectral-based manifold learning methods.
Manifold Clustering and Embedding. When the data should be modeled as a union of several manifolds, manifold clustering is needed in addition to manifold learning. When these manifolds are linear, subspace clustering algorithms (Ma et al., 2007; Elhamifar & Vidal, 2013; Vidal et al., 2016) can be used. When they are non-linear, manifold clustering and embedding methods were proposed. They generally divide into 3 categories (Abdolali & Gillis, 2021): 1. Locality preserving. 2. Kernel based. 3. Neural Network based. Locality preserving techniques implicitly make the assumption that the manifolds are smooth, and are sampled densely (Souvenir & Pless, 2005; Elhamifar & Vidal, 2011; Chen et al., 2018). Additionally, smoothness assumption can be employed (Gong et al., 2012). Our method generalizes those techniques by realizing them with geometrical constraints. The success of kernel based techniques depends strongly on the suitability of the underlying kernel, and generally requires a representation of the data in a space with higher dimension than the data space (Patel & Vidal, 2014). Deep subspace clustering methods, such as Ji et al. (2017); Zhang et al. (2019); Zhou et al. (2018) jointly perform linear subspace clustering and representation of the data, and has the potential to handle high dimensional data effectively. However, it has been shown that most performance gains obtained by those methods should be attributed to an ad-hoc post-processing step applied to the self-expression matrix. Using neural networks only provide a very marginal gain compared to clustering the raw data directly using linear SC (Haeffele et al., 2020). Our work differs from those techniques mainly in two aspects: i) While most of the previous methods were generative (autoencoders, GANs), our loss function is defined in the latent embedding space and is best understood as a contrastive method. ii) While previous methods use self-expression based SC to guide feature learning, ours uses MCR2 to learn the subspace features. Recently, some deep SC techniques also applied data augmentation (Sun et al., 2019; Abavisani et al., 2020). However, in those works, data augmentation played a complementary role of improving the performance. In our method, data augmentation plays a central role for enabling the identification of the clusters.
Self-Supervised Representation Learning. Recently, self-supervised representation learning achieved tremendous success with deep neural networks. Similar to manifold clustering and embedding, there are also two essential ingredients: 1) Data augmentations are used to define the domain-specific invariance. 2) The latent representation should not collapse. The second requirement can be achieved either by contrastive learning (Chen et al., 2020), momentum encoder (He et al., 2020; Grill et al., 2020) or siamese network structure (Chen & He, 2021). More directly related to our work is Tao et al. (2021), which proposed feature orthogonalization and decorrelation, alongside contrastive learning. Recently, variance regularization along was also successfully used to achieve principle 2) (Zbontar et al., 2021; Bardes et al., 2021), attaining state-of-the-art SSL representation performance. Part of our method, the total coding rate (TCR) objective achieves a similar effect, see discussion in Appendix A.6. However, beyond self-supervised features, our algorithm additionally show strong clustering performance, and directly learns a meaningful latent space. The simultaneous manifold clustering and embedding in NMCE is also related to online deep clustering (Caron et al., 2018; 2020) method. Also notable is Deshmukh et al. (2021), where the concept of population consistency is closely related to the constraint functional we discussed.
Clustering with Data Augmentation Our method use data augmentation to ensure correct clustering of the training data. Although not explicitly pointed out, this is also the case for other clustering techniques (Shen et al., 2021; Tsai et al., 2020; Li et al., 2021). Our understanding of data augmentation is also consistent to works that specifically study the success of data augmentations (HaoChen et al., 2021; von Kügelgen et al., 2021).

heading: 3 NEURAL MANIFOLD CLUSTERING AND EMBEDDING

heading: 3.1 PROBLEM SETUP
text: Let’s assume data points xi ∈ Rd are sampled from a union ⋃n j=1 Xj of manifolds X1,X2, ...,Xn. 1 As stated in Task 1, the goal of manifold clustering and embedding is to assign each data point to the corresponding manifold (clustering), as well as learning a coordinate for each manifold (manifold learning). To achieve this goal, we use neural network f , which learns to map a data point x to the feature embedding z ∈ Rdemb and the cluster assignment c ∈ [1, n], i.e. z, c = f(x). The cluster assignment shall be equal to the ground-truth manifold assignment,2 z should parameterize the coordinates of the corresponding manifold Xc.
To make the feature space easier to work with, one can enforce the additional separability requirement that for any Xj ,Xk and j 6= k, the feature vectors are perpendicular, Zj ⊥ Zk. Here Zj denotes the embedding feature vectors of data points in Xj, and we define perpendicular between two sets in the following fashion: If Z̃j ⊆ Zj , Z̃k ⊆ Zk such that ∀zj ∈ Z̃j , zk ∈ Z̃k, we have zj · zk 6= 0, then either Z̃j or Z̃k has zero measure.
In the following, we first argue that to make clustering possible with a neural network, one should define the additional geometric constraint that makes the manifold clusters identifiable. Second, we discuss how to implement the required geometric constraints and combine them with a recently proposed joint clustering and subspace learning algorithm MCR2 (Yu et al., 2020) to achieve neural manifold clustering and embeddng (NMCE).

heading: 3.2 CLUSTERING ALWAYS INVOLVES IMPLICIT ASSUMPTIONS
text: Even the simplest clustering algorithms rely on implicit assumptions. For example, in k-means clustering, the implicit assumption is that the clusters in the original data space are continuous in terms of L2 distance. For Linear SC, the assumption is that data points are co-linear within each cluster. If a neural network is trained on example data to learn a cluster assignment function
1We do not consider topological issues here and assume that all of them are homeomorphic to Rdi for some di
2Up to a permutation since the training is unsupervised.
c = f(x), the resulting clustering will be arbitrary and not resemble the solution of k-means or linear SC clustering. This is because neural networks are flexible and no constraint is imposed on the clustering function to force the result to respect the geometry of the original data. One example of this is shown in Figure 1 left panel, where a deep clustering method outputs a rather arbitrary clustering for the double spiral data.
To make the clusters learnable for a neural network, one needs to introduce constraints explicitly. In the example in Figure 1, one can easily reason that, to be able to separate the two spirals from each other, the clustering function needs to ensure that all close neighbors of a point from the data distribution are assigned to the same cluster, essentially the same assumption implicitly made in locality-based manifold clustering algorithms (Abdolali & Gillis, 2021). We formalize the notion of constraints to a constraint functional D(f) (for a specific data distribution) that has the following property: All cluster assignment functions f that makes D attain its minimum value (assumed to be 0) and also cluster data points to the ground truth number of clusters will correctly cluster all data points. For example, we can construct a functional D that takes value D = 0 for all clustering functions that satisfy the locality constraint on the dataset, and D > 0 otherwise. This notion of constraint function is completely general. For example, linear subspace clustering is recovered if the constraint function take value 0 if and only if the found clusters are linear subspace.
In practice, one usually cannot optimize the neural network clustering function f subject to D = 0, since the correct solution would have to be found at initialization. A more practical way to use the constraint function is to use the relaxed objective with weighting λ:
L(f) = Lclst(f) + λ ∗D(f) (1) where Lclst is some objective function that will force f to cluster the dataset. With a suitable λ, optimizing this objective leads to learning of the correct clusters, by the assumption above. To achieve manifold clustering, one just needs to find the appropriate constraint functional.

heading: 3.3 SUBSPACE FEATURE LEARNING WITH MAXIMUM CODING RATE REDUCTION
text: Having introduced explicit constraints for learning the manifold clustering with neural networks, we still need a concrete algorithm for learning a linear subspace-structured representation given the clustering (manifold learning). Fortunately, the recently proposed principle of Maximum Coding Rate Reduction (MCR2) (Yu et al., 2020) provides a principled learning objective for this purpose. We denote the dataset (union of all manifolds) by X, and random variable that represent distribution on each manifold Xi byXi. For a certain encoderZ = f(X ) (without clustering output), z ∈ Rdemb , the Gaussian coding rate function is defined to be:
R(Z, ) = 1 2 logdet(I + demb 2 cov(Z)) (2)
where cov denotes the covariance matrix function for a vector random variable: cov(Z) = Ep(z)[zz
T ]. This function is approximately the Shannon coding rate of a multivariate Gaussian distribution given average distortion (Cover, 1999), and can be motivated by a ball-packing argument. However, we focus on its geometric implication and do not discuss the information-theoretic aspect further. Readers interested to the full introduction of this objective can refer to the original papers (Yu et al., 2020; Ma et al., 2007).
Suppose for now that we are also given the cluster assignment function c(x) that outputs the manifold index c(x) = i for x ∈ Xi. We can then calculate the average coding rate for a particular cluster i as R(Zi, ), where Zi = f(Xi). The MCR2 principle states that, to learn a subspace-structured representation, one needs to optimize f by maximizing the difference between the coding rate of all of Z and the sum of coding rate for each cluster Zi:
∆R(Z, c, ) = R(Z, )− n∑
i=1
R(Zi, ) (3)
It has been shown that MCR2 guarantees the perpendicularity requirement in the problem setup above. Theorem A.6 in Yu et al. (2020) states that under the assumption that rank(Zi) is bounded, and the coding error is sufficiently low, maximizing the MCR2 objective guarantees that Zi ⊥ Zj for any i 6= j, and the rank of each Zi is as large as possible. For full details and proof, see Yu et al. (2020).

heading: 3.4 NEURAL MANIFOLD CLUSTERING AND EMBEDDING
text: The MCR2 principle can be extended to the case where the labeling function c(x) is not given, but is instead learned jointly by optimizing the MCR2 objective. In this case, we fuse the clustering function into f : z, c = f(x), note that now Zi depends on f implicitly. However, as discussed earlier, one will not be able to find the correct clusters by using MCR2 alone, as it is unconstrained in the data space. An additional constraint term D(f) has to be included to make the clusters identifiable. This leads to the Neural Manifold Clustering and Embedding (NMCE) objective:
LNMCE(f, ) = n∑ i=1 R(Zi, )−R(Z, ) + λD(f) (4)
It is possible to replace the MCR2 objective in (4) by any other objective for subspace feature learning, however, this generalization is left for future work. Given a suitable constraint functional D, the NMCE objective will guide the neural network to cluster the manifold correctly and also learn the subspace-structured feature, thus achieving manifold clustering and embedding. We explain in the next section how D can be practically implemented.

heading: 3.5 IMPLEMENTING CONSTRAINTS VIA DATA AUGMENTATION
text: Here we propose a simple method to implement various very useful constraints. The proposed method uses data augmentations, a very common technique in machine learning, and enforce two conditions on the clustering and embedding function f : 1. Augmented data points generated from the same point should belong to the same cluster. 2. The learnt feature embedding of augmented data points should be similar if they are generated from the same point. We use T (x) to represent a random augmentation of x: c, z = f(T (x)), c′, z′ = f(T ′(x)), then D(f) = Ep(x)sim(z, z′). Here, sim is a function that measures similarity between latent representations, for example cosine similarity, or L2 distance. The requirements c = c′ can be enforced by using average of c and c′ to assign z and z′ to clusters during training.
For the double spiral example, the augmentation is simply to add a small amount of Gaussian noise to data points. This will have the effect of forcing neighboring points in the data manifold to also be neighbors in the feature space and be assigned to the same cluster. The result of using this constraint in the NMCE objective can be seen in Figure 1 middle and right panel. For more difficult datasets like images, one needs to add augmentations to constrain the clustering in the desired way. The quality of clustering is typically measured by how well it correspond to the underlying content information (object class). Therefore, we need augmentations that perturbs style information (color, textures and background) but preserves content information, so that the clustering will be based on content but not style. Fortunately, extensive research in self-supervised contrastive learning has empirically found augmentations that achieves that very effectively (Chen et al., 2020; von Kügelgen et al., 2021).

heading: 3.6 MULTISTAGE TRAINING AND RELATIONSHIP TO SELF-SUPERVISED CONTRASTIVE LEARNING
text: In practice, we find that for all but the simplest toy experiments it is difficult to optimize the full NMCE objective (Eq. 4) from scratch. This is because the clusters are incorrectly assigned at the start of training, and the sum in Eq 4 effectively cancels out the total coding rate term R(Z, ). To achieve good performance, it is critical to achieve high total coding rate, and high similarity between augmented samples in the feature space. We thus resort to a multistage training procedure, with the first stage always being optimizing the following objective:
LTCR(f, ) = −R(Z, ) + λD(f) (5)
We call this the Total Coding Rate (TCR) objective, which is a novel self-supervised learning objective by itself. Through simple arguments (Appendix A.6) one can see that this objective encourages the covariance matrix of Z to be diagonal. Along with a similarity constraint between augmented samples, this objective turns out to asymptotically achieve the same goal as VICReg (Bardes et al., 2021) and BarlowTwins (Zbontar et al., 2021). We discuss this further in Appendix A.6.
After training with the TCR objective, we found that usually the feature Z already possess approximate subspace structure. For simple tasks, the features can be directly clustered with standard linear SC techniques such as EnSC (You et al., 2016). For more difficult tasks, we found that the full NMCE objective performs much better.

heading: 4 RESULTS
text: We provide code to reproduce the double spiral toy example in the supplementary material, the full code will be released upon publication.
For the synthetic experiments, a MLP backbone is used as backbone and two linear last layers are used to produce feature and cluster logits output, ELU is used as the activation function. For all image datasets, standard ResNet with ReLU activation and various sizes is used as the backbone. After the global average pooling layer, one linear layer with 4096 output units, batch normalization and ReLU activation is used. After this layer, two linear heads are used to produce feature and cluster logits outputs. The number of clusters used is always equal to the ground truth. For all experiments, two augmented samples, or ”views”, are used for each data sample in a batch. Gumbel-Softmax (Jang et al., 2016) is used when the cluster assignment is learned. Similar to Yu et al. (2020), feature vectors are always normalized to the unit sphere. The constraint term D is always cosine similarity between two augmented samples. Cluster assignment probabilities and feature vectors are averaged between augmentations before sending into the NMCE loss. The regularization strength λ is always determined empirically. Hyper-parameters and further details are available in the Appendix B.

heading: 4.1 SYNTHETIC AND IMAGE DATASETS
text: For the toy example in Figure 1, data augmentation is simply adding a small amount of noise, and full NMCE objective is directly used, the clustering output is jointly learned.
To verify the NMCE objective, we perform synthetic experiment by clustering a mixture of manifold-structured data generated by passing Gaussian noise through two randomly initialized MLPs. Small Gaussian noise data augmentation is used to enforce the locality constraint. A two stage training process is used, the first stage uses TCR objective while the second stage uses full NMCE objective. Much like the toy experiment, the result is consistent with our interpretation, see Appendix A.1 for results and details.
To compare NMCE with other subspace clustering methods, we apply it to COIL20 (Nene et al., 1996a) and COIL100 (Nene et al., 1996b), both are standard datasets commonly used in SC literature. They consist of images of objects taken on a rotating stage in 5 degree intervals. COIL20 has 20 objects with total of 1440 images, and COIL100 has 100 objects with total of 7200 images. Images are gray-scaled and down-sampled by 2x. For COIL20, a 18-layer ResNet with 32 filters are used as the backbone, the feature dimension is 40. For COIL100, and 10-layer ResNet with 32 filters is used, and feature dimension is 200. We determined the best augmentation policy for this experiment by manual experimentation on COIL20, and the same policy is applied to COIL100. Details on the searched policy can be found in Appendix B. For this experiment, we use EnSC (You et al., 2016) to cluster features learned with TCR objective. We found this procedure already performs strongly, and full NMCE objective is not necessary.
We compare with classical baseline such as Sparse Subspace Clustering (SSC) (Elhamifar & Vidal, 2013) as well as recent deep SC techniques including KSSC(Patel & Vidal, 2014), AE+EDSC(Ji et al., 2014), DSC(Ji et al., 2017), S2ConvSCN(Zhang et al., 2019) and MLRDSC-DA(Abavisani
et al., 2020). As can be seen in Table 1, our method achieves a perfect result of 0.0 error rate for COIL20, and error rate of 11.53 for COIL100, substantially outperforming previous state of the art of 1.79 and 20.67 error rate. This indicates that NMCE can truly leverage the non-linear processing capability of deep networks, unlike previous deep SC methods, which only marginally outperform linear SC on the pixel space (Haeffele et al., 2020).

heading: 4.2 SELF-SUPERVISED LEARNING AND CLUSTERING OF NATURAL IMAGES
text: Recently, unsupervised clustering has been extended to more challenging image datasets such as CIFAR-10, CIFAR-20 (Krizhevsky et al., 2009) and STL-10 (Coates et al., 2011). The original MCR2 paper (Yu et al., 2020) also performed those experiments, but they used augmentation in a very different way (See Appendix A.2 for a discussion). The CIFAR-10 experiment used 50000 images from the training set, CIFAR-20 used 50000 images from training set of CIFAR-100 with 20 coarse labels. The STL-10 experiment used 13000 labeled images from original train and test set. ImageNet-10 and ImagetNet-Dogs used 13000 and 19500 images subset from ImageNet, respectively (Li et al., 2021). We use ResNet-18 as the backbone to compare with MCR2, and use ResNet-34 as the backbone to compare with other clustering methods. In both cases, the feature dimension is 128. Standard image augmentations for self-supervised learning is used (Chen et al., 2020).

heading: 4.2.1 TRAINING STRATEGY, SUPERVISED EVALUATION
text: Here we use a three stage training procedure: 1. Train with TCR objective. 2. Reinitialize the last linear projection layer and add a cluster assignment layer. Then, freeze parameters in the backbone network and train the two new layers with full NMCE objective. 3. Fine tune the entire network with NMCE objective.
As discussed earlier, the first stage is very similar to self-supervised contrastive learning. Therefore, we study features learned at this stage with supervised evaluation, the result with ResNet-34 is listed in Table 2. To evaluate the learned features, we use SVM, kNN and a Nearest Subspace classifier (NearSub). We use SVM instead of linear evaluation training because we find that it is more stable and insensitive to particular parameter settings. Here we compare three types of features, Proj: 128d output of the projector head. Pre-feature: 4096d output of the linear layer after backbone. Pool: the 2048d feature from the last average pooling layer. We find that averaging features obtained from images processed by training augmentations improves the result. Therefore we also compare performance in this setting and denote it by 16avg, as 16 augmentations are used per image. Images from both training and test set are augmented. As can be seen from the table, without augmentation, SVM using the projector head feature gives the best accuracy. This is surprising, as most self-supervised learning techniques effectively use Pool features because the performance obtained with Proj features is poor. When averaging is used, a SVM with Pool feature becomes the best performer, however, SVM and kNN with Proj feature also achieve very high accuracy. In Appendix, we further compared Proj and Pool features using SVM in cases where limited labeled data are available. In such cases, Proj feature significantly outperform Pool feature, showing that the TCR objective encourages learning of meaningful feature in the latent space – unlike other algorithms, where the gap between performance of Pool and Proj features can be very large (Chen et al., 2020).

heading: 4.2.2 CLUSTERING PERFORMANCE
text: We compare clustering performance of NMCE after all 3 stages of training to other techniques. Due to space limits, we only compare with important baseline methods as well as highest performing deep learning based techniques, rather than being fully comprehensive. For a more complete list of methods, see for example Shen et al. (2021). We follow the convention in the field and use clustering Accuracy (ACC), Normalized Mutual Information (NMI), and Adjusted Rand Score (ARI) as metrics. For definitions, see Yu et al. (2020), for example. We list results in Table 3, Kmeans(MacQueen et al., 1967) and Spectral clustering(Ng et al., 2002) results were adopted from Zhang et al. (2021) and Shen et al. (2021), we always selected the best result. For deep learning based techniques, we compare our ResNet-34 results with CC(Li et al., 2021), CRLC(Do et al., 2021), MiCE(Tsai et al., 2020), TCC(Shen et al., 2021), ConCURL(Deshmukh et al., 2021), and IDFD(Tao et al., 2021). We did not include Park et al. (2021) or Kinakh et al. (2021) since the former is a post processing step, and the later uses a special network architecture. We also separately compare ResNet-18 result with features learned by MCR2 (MCR2-CTRL to be precise, see Appendix A.2) and clustered by EnSC(You et al., 2016), ESC(You et al., 2018) or SENet(Zhang et al., 2021). They are denoted by MCR2-EnSC, MCR2-ESC and MCR2-SENet, respectively. For
MCR2-EnSC, we adopt the result from Yu et al. (2020), since the result is higher and include all 3 datasets, MCR2-ESC and MCR2-SENet results are from Zhang et al. (2021).
Compared with the result from MCR2, our method achieved a substantial gain in all metrics considered. For example, the accuracy is improved by more than 6% on CIFAR-10, and by 9% on CIFAR-20. This shows that we used data augmentation in a much more effective way than original MCR2. Our method can also outperform previous techniques which were specifically optimized for clustering, this happens on most CIFAR-10 and CIFAR-20 metrics, for example.
In the experiments above, stage 1 learns pre-features that are approximately subspace-structured, and stage 2 can be seen as performing subspace clustering on the pre-feature output, as MCR2 was originally a subspace clustering objective (Ma et al., 2007). For CIFAR and STL-10 experiments, fine tuning the entire network with the NMCE objective (stage 3) improves performance by a small but significant amount, see Appendix A.3). Features learned from stage 1 of the training can also be directly clustered by methods like EnSC, but the results were rather poor for the image dataset. It seems that NMCE is a more robust way to cluster the learned features for the image experiments.
After all 3 training stages, one can visualize the structure of each subspace by performing PCA and displaying the training examples that have the highest cosine similarity to each of the principle components. In Figure 2 we show this for 4 out of 10 clusters of CIFAR-10. As can be seen, principle components in each cluster correspond to semantically meaningful sub-clusters. For example, the first row in ”dog” cluster are mostly close-ups of white dogs. This shows that after training with the full NMCE objective, samples are clustered based on content similarity in the latent space, instead of being distributed uniformly on the hyper-sphere, as training with just the TCR objective or other selfsupervised learning methods would encourage Wang & Isola (2020); Durrant & Leontidis (2021); Zbontar et al. (2021); Bardes et al. (2021); Zimmermann et al. (2021).

heading: 5 DISCUSSION
text: In this paper we proposed a general method for manifold clustering and embedding with neural networks. It consists of adding geometric constraint to make the clusters identifiable, then performing clustering and subspace feature learning. In the special case where the constraint is implemented by data-augmentation, we discussed its relationship to self-supervised learning and demonstrated its competitive performance on several important benchmarks.
In the future, it is possible to extend this method beyond data augmentation to other type of constraint functions, or improves its performance using a stronger subspace feature learning algorithm.

heading: A ADDITIONAL RESULTS AND DISCUSSIONS

heading: A.1 SYNTHETIC EXPERIMENT
text: We verify the proposed manifold clustering and embedding algorithm by a simple synthetic experiment. Ground truth data from a union of two manifolds with dimension 3 and 6 is generated by passing 3d and 6d iid. Gaussian noise through two randomly initialized neural networks with Leaky-ReLU activation function (negative part slop 0.2). Data augmentation is Gaussian noise with manitude 0.1. Training used two stages, the first stage used only TCR objective, the second stage with full NMCE objective.
Two situations are examined. One where the random neural network also has randomly initialized biases, which will cause the two manifold to be far apart, making locality constraint implemented by noise augmentation sufficient for identifying the manifolds. Another situation is when bias is not used, the two manifolds then intersect at 0, where the density is rather high. This makes the manifolds not identifiable with only locality constraint.
Results are listed in Table A.1. As can be seen, when the clusters are identifiable, NMCE is able to correctly cluster the data points, as well as learn latent features that is perpendicular between different clusters. At the same time, the feature is not collapsed within each cluster, since if so the average cosine similarity within cluster would be 1. When the clusters are not identifiable, they cannot be learned correctly.
A.2 RELATIONSHIP TO SELF-SUPERVISED LEARNING WITH MCR2
The original paper (Yu et al., 2020) performed self-supervised learning using MCR2 objective without any additional term. Their method treats different augmentations of the same image as a selflabeled subspace. They used large number of augmentations (50) of each image, with only 20 images in each batch. The performance of this method is rather poor, which is expected based on our understanding. In this case, augmented images will form a subspace with certain dimension in the feature space, thus large amount of information about augmentations will be preserved in the latent space. Clustering can then utilize style information and not respect class information.
To improve performance, a variant called MCR2-CTRL is developed, where the total coding rate term is down-scaled. This variant performs significantly better, and is also used in our comparison. This result is also expected, since decreasing the subspace term effectively contract different augmentations of the same image in the feature space, making the feature better respect the constraint needed for correct clustering. However, since the total coding rate is not high in this case, the feature is not diverse enough to achieve good performance.

heading: A.3 FINE-TUNING BACKBONE WITH NMCE OBJECTIVE
text: For CIFAR-10, CIFAR-20 and STL-10 experiments, the first training stage already learns very strong self-supervised features, which is then clustered into subspaces in the second stage with backbone network frozen. The clustering performance is already quite good after this stage. In the third stage, the backbone is fine-tuned, which further improves clustering performance. In Table A.2, we show
the effect of fine-tuning backbone network on CIFAR-10 and CIFAR-20 experiment with ResNet18. As can be seen, fine-tuning produces a small but noticeable gain in clustering performance for all metrics and both datasets. This indicates that using the full NMCE objective can improve performance. If the optimization issue can be resolved, and the entire network is trained with the NMCE objective from scratch, the performance may be further improved.

heading: A.4 COMPARE POOL AND PROJ FEATURE ON LOW DATA CLASSIFICATION
text: Here we compare SVM accuracy of Pool and Proj features from CIFAR-10 ResNet-18 experiment. The feature averaged over 16 augmentations. The accuracy is plotted as a function of the number of labeled training samples used, see Figure A.1.
As can be seen, Proj feature clearly outperforms Pool feature when few labeled examples are available. This makes Proj feature much more useful than Pool feature, since labeled examples are often scarce real applications.
Note that what shown here is obviously not the optimal way to use labeled example, if one further leverage the clustering information, accuracy should reach 90 with only 10 labeled examples.

heading: A.5 EFFECT OF LAMBDA PARAMETER
text: Here we study the effect of λ parameter that balances the constraint and subspace feature learning term. CIFAR-10 self-supervised accuracy with SVM and kNN evaluation on Proj feature is listed in Table A.3. As can be seen, the accuracy is reasonable in a range of λ spanning more than 3x low to high, indicating that the quality of the learned feature is not very sensitive to this parameter.

heading: A.6 UNDERSTANDING THE FEATURE SPACE
text: Here we show that the TCR objective used in the first stage in our training procedure for CIFAR and STL-10 datasets theoretically achieve the same result as the recently proposed VICReg (Bardes et al., 2021) and BarlowTwins(Zbontar et al., 2021), both are self-supervised learning algorithms. The optimization target of the two techniques are both making the covariance matrix of latent vector Z approach the diagonal matrix. The first stage training using TCR essentially achieves the same result. To see this, we note the following property of the coding rate function (Kang et al., 2015): For any Z ∈ Rm×d:
logdet(I + ZTZ) = min(m,d)∑ i=1 log(1 + σ2i ) (6)
Where σi is the ith singular value of Z. Additionally, we have: ∑min(m,d) i=1 σ 2 i = ||Z||2F, which follows easily from ||Z||2F = tr(ZTZ). Since the function log(1 + x) is concave, the optimization problem maxx1,x2,...,xn ∑n i=1 log(1+xi) given ∑n i=1 xi = C reaches maxima when all x are equal to each other. Since we normalize the row of Z, ||Z||2F = m, optimization of Equation 6 result in solution with uniform singular value, which is equivalent to diagonal covariance.
We could not successfully reproduce VICReg in our setup due to the large amount of hyperparameters that needs to be tuned. Therefore we resort to the open-source library solo-learn (da Costa et al., 2021), which provided VICReg implementation. Running the provided script for VICReg produced accuracy of 91.61% on CIFAR-10. We also implemented TCR objective in sololearn library. Running TCR obtained accuracy of 92.1%. All hyper-parameters and augmentations are the same as VICReg, except batch size is 1024 instead of 256, projection dimension is 64 instead of 2048. Larger batch size or smaller projection dimension didn’t work for VICReg, so we stayed with the original parameters.
The covariance matrices of learned feature for SimCLR, VICReg and TCR computed over entire training set are visualized in Figure A.2. For VICReg, first 128 dimension is visualized out of 2048. As can be seen, the diagonal structure is visible in SimCLR feature space, TCR feature space is the closest to diagonal matrix. VICReg feature space is also quite close to diagonal, but the off-diagonal terms seems noisier. Additionally, we plot normalized singular values for VICReg projection space in Figure A.4. This can be compared to TCR and SimCLR singular values in Figure A.3 a). As can be seen, TCR achieves flatter singular value distributions than VICReg, neither SimCLR or VICReg are close to full rank in projection space.
We demonstrate subspace structure of feature space after clustering with full NMCE objective by plotting singular values of each learned subspace in Figure A.3 b). Each subspace found are around rank 10. In all other panels of Figure A.3, we display samples whose feature vector has the highest cosine similarity to the top 10 principle components of each subspace. One can see that most principle components represent a interpretable sub-cluster within each class (even if the sub-cluster is of a different class than the cluster). Same as in Figure 2, feature vectors calculated by averaging 16 augmented images are used.

heading: B EXPERIMENTAL DETAILS
text: We list hyper-parameters for each experiment in Table B.1.

heading: B.1 TOY AND SYNTHETIC EXPERIMENTS
text: The toy dataset consists of double spiral with radius approximately equal to 15 and Gaussian noise magnitude of 0.05, samples are generated online for each batch. Data augmentation is Gaussian noise with magnitude 0.05.
B.2 COIL-20 AND COIL-100
The augmentation policy we found with manual search on COIL20 is (all are from torchvision transforms): 1. Random Horizontal Flip with p = 0.5. 2. RandomPerspective with magnitude 0.3 and p = 0.6 3. ColorJitter with manitude (0.8, 0.8, 0.8, 0.2), always applied. The entire dataset is passed as a single batch.

heading: B.3 CIFAR-10, CIFAR-20, STL-10, IMAGENET-10 AND IMAGENET-DOGS
text: For CIFAR-10 and CIFAR-20, we use standard ResNet-18 and ResNet-34 with 64 input filters. The first layer uses 3x3 kernel, and and no max pooling is used. For other experiments, we use standard ResNet-18 and ResNet-34 with 5x5 first layer kernel and max pooling. For COIL-20 and COIL-100 experiment, 32 input filters is used, and the ResNet-10 is obtained by reducing number of blocks in each stage in ResNet-18 to 1. For full details, see our code release.
For CIFAR-10, CIFAR-20, STL-10, ImageNet-10 and ImageNet-Dogs experiments, we used LARS optimizer (You et al., 2017), with base batch size 256, for other experiments we used Adam. We note that stage 2 and 3 in the 3 stage training process is quite sensitive to weight decay, a careful search of this parameter is usually required for good performance.

heading: B.4 COMPUTATIONAL COST
text: All experiments involving ResNet-34 requires 8 GPUs, others can be done in 1 GPU.
Our objective doesn’t add significant computational burden compared to neural-networks involved. The covariance matrix is computed within a batch. For a batch of latent feature vectors with shape [B, d], where B is batch size and d is latent dimension. We first compute the covariance matrix with shape [d, d], with O(B2d) cost. Then the log determinant of this matrix is calculated, which we assume has O(d3) cost. The O(B2) scaling with respect to batch size is the same as most contrastive learning method such as SimCLR, which is known to scale to very large batch size.

Review summaries:
Authors developed a method and training procedure for manifold clustering problems. The proposed solution inspired from information theoretic methods namely maximum rate reduction. Authors also support their claims with empirical results.

This work proposed a general manifold clustering algorithm called Neural Manifold Clustering and Embedding (NMCE), which utilize Maximum Coding Rate Reduction (MCR2 ) as the objective function and data augmentation to enforce constrains.    In the implementation stage, given that even the toy experiment is difficult to optimize with the full NMCE objective, a multistage training procedure is applied with the first stage actually trying to optimize the Total Coding Rate (TCR), which is another kind of self-supervised learning objective claimed in this paper.   On synthetic and real-world datasets COIL20, COIL100, CIFAR-10, CIFAR-20 and STL-10, NMCE achieved comparable and sometimes better results, compared to baseline methods or some alternative manifold clustering methods listed in the paper.