**1. Introduction **

Traditional distance based clustering algorithms such as K-Means perform poorly on high dimensional data because of curse of dimensionality[1]. A common approach to cluster such data is to assume that even though their ambient dimensionality is high, their intrinsic dimensionality is much lower. As an example, consider the dataset of images of faces of different people. Although each face image consists of many pixels, they can be described by much lesser parameters that correspond to the image capturing process. These low dimension representations of data are known as subspaces. Typically, real world data comes from a union of subspaces, and the problem of subspace clustering is to cluster the data into multiple subspaces and find low dimensional subspace that fit each group of points. In this post, we take a look at some of the subspace clustering algorithms that have become popular in recent times. We consider one of them – greedy subspace clustering in detail. We show that under certain conditions, the algorithm guarantees exact clustering.

**2. Problem Formulation **

We are given , a set of data points in . We assume that the points lie on or near a union of subspaces . Each subspace is of dimension where . Moreover, each subspace is described by a set of vectors that span the subspace. The goal is to recover the subspaces and segment the points according to these subspaces.

**3. Algorithms **

A common approach to subspace clustering can be described in two steps:

- For each data point, find the points that are likely to lie on the subspace as that of the point in question.
- Given the above segmentation of points, find the subspaces that contain these groups of points.

We discuss here very briefly some of the algorithms that follow the above approach:

**K-subspace:**This is an iterative algorithm in which given an initial segmentation, we use classical PCA to determine the subspace for each group. Then, given the subspace, we reassign the points to the nearest subspace. The algorithm then alternates between the two steps, much like K-means algorithm. The number of subspaces and subspace dimension need to be known beforehand.**Mixture of Probabilistic PCA:**This assumes that each data point on the subspaces is generated from a probabilistic PCA model. Each subspace is characterized by its PPCA model parameters, along with a mixing probability that determines how likely is a point to come from that subspace. The algorithm then uses Expectation Maximization algorithm to alternate between model estimation and data segmentation.**Locally Linear Manifold Clustering:**The algorithm expresses each data point as an affine combination of its neighboring points. The neighbors are determined based on Eucledian distance. However, a point and its nearest neighbors may not always be in the same subspace.**Sparse Subspace Clustering:**Similar to above, the algorithm expresses each data point as an affine combination of other points. However the neighbors need not be the nearest points. Instead, each data point is written as the sparse affine or linear combination of all other points. It can be shown that under certain conditions, the sparse combination can only be achieved if and only if all these points lie on the same subspace. The algorithm constructs an affinity matrix based on the sparse representation, and then uses spectral clustering to determine the clusters.**Low Rank Representation:**This is similar to sparse subspace clustering with a difference that instead of finding the sparse representation, we seek low rank representations. However, since minimizing the rank is NP-hard, the LRR algorithm finds that representation of data which has the lowest nuclear norm.

**4. Greedy Subspace Clustering **

In this post, we discuss a practical algorithm for subspace clustering, called Greedy Subspace Clustering and establish guarantees for it. The Greedy Subspace Clustering algorithm is a collection of two algorithms corresponding to the two steps listed in section 3. To determine the neighbors of the points, we use the Nearest Subspace Neighbor (NSN) algorithm. To recover the subspaces using the segmentation, we use Greedy Subspace Recovery (GSR) algorithm.

** 4.1. Nearest Subspace Neighbor **

The NSN algorithm provides a greedy approach to determine the points that are most likely to be on the same subspace. The idea is to maintain a collection of the neighbor points found so far. At any time step, the point most likely to be the neighbor is the one that is closest to the subspace spanned by the current neighbor points. The algorithm is described below:

**Input: **, a set of data points in ; Number of required neighbors ; Maximum subspace dimension

**Output: **A neighborhood matrix

- Normalize the magnitudes of each data point.
for all

- For each data point :
- Initialize a set of neighbor points , initially containing the point itself.

- Until the set of neighbor points contains the number of required neighbors , iteratively add the point that is closest to the current subspace. To do this, we determine the projection of all the points that are not yet the neighbors, onto the subspace spanned by the current neighbors. We add the point with the maximum projection to the set of current neighbors. The projection of a point on subspace is calculated as:
**for****do**:**if****then**:(subspace so far)

**end if****end for** - Lastly, set the entry in the neighborhood matrix for point as:

- Initialize a set of neighbor points , initially containing the point itself.

Although the naive implementation of the algorithm is costly, using a few tricks, the running time of the algorithm can be brought down to . This running time is much lower than that of convex optimization based methods such as Sparse subspace clustering or Low rank representation.

** 4.2. Greedy Subspace Recovery **

The GSR algorithm is used to determine whether the neighbors of a point returned by the NSN algorithm are indeed correct or not, i.e. if they span a true subspace. The intuition behind this algorithm is that if the neighbors span a true subspace, then there must be many other points that should lie on that span. To that effect, the algorithm constructs subspaces for each point using the neighborhood matrix returned by NSN. At each time step, it picks the current best subspace estimate. The best subspace estimate is the one which has the most number of points on or near it. This is repeated until subspaces are picked. The algorithm is described below:

**Input: **, a set of data points in ; A neighborhood matrix ; Error bound

**Output: **Estimated subspaces . Estimated Labels

- Normalize the magnitudes of each data point.
for all

- Construct subspace for each point using their neighbors:
is used to denote the -dimensional subspaces of the vector set of the neighbors. Essentially, it is the first left singular vectors of the matrix with columns as the vectors in the set. This forms our estimate of the subspace spanned by a point and its neighbors.

- We start with a set which initially contains all the points.
- In the subsequent steps, we iterate through all the points in the set . We pick the best subspace as the one that has the maximum number of points on or near it. We count a point as being on or near the subspace if . In the next iteration, we remove the points on the subspace that was picked from the set and repeat until we have picked subspaces.
**while****do**:**end while** - Lastly, we label the points according to their subspace, i.e. a point gets the label of the subspace it is closest to:

The algorithm guarantees exact recovery of the subspace, if for each subspace we have at least one point with all its correct neighbors in the neighborhood matrix.

**5. Theoretical Guarantees **

For simplification, the authors assume that all the subspaces have the same dimension , and have the same number of points on or near them, . The authors establish theoretical guarantees for two standard noiseless models- i) Fully random model and ii) Semi-random model. We consider here the fully random model. The analysis for the other model is similar.

** Guarantee under Fully Random Model **

A fully random model is the one in which the subspaces are drawn uniformly at random in iid fashion, and the points are also generated randomly in iid fashion. We have the following theorem:

Theorem 1Let there be subspaces, each of dimension , generated under fully random model and each subspace has points on it. Further, let be polynomial in . If, for any constants and , :

then NSN+GSR (with K==d) clusters the points exactly with probability at least .

Exact recovery can only take place if the subspaces are “easy” to cluster. The two conditions in the theorem are formally related to the difficulty of the clustering problem. The first condition implies that the number of points lying on a subspace should be high enough so that they look like belonging to a cluster. This is required for NSN to find the correct neighbors. The second condition says that the dimension of the subspaces should be significantly lesser than the ambient dimensionality. Intuitively, if many subspaces have high dimension, then it becomes difficult to distinguish between them. The condition, however is dependent upon n. As one keeps increasing n, the number of points start becoming dense on the subspace, and they become easier to identify.

We observe that both the conditions are in accordance with our intuition. The authors note that these conditions are weaker than the ones for algorithms such as SSC. We show here a proof sketch of the theorem before formally proving it.

**Proof Sketch: ** First we show that GSR clusters the points exactly with probability one if NSN finds the correct neighbors. This is based on the statistical property of the fully random model. Next we show that NSN does indeed find the correct neighbors. Since the analysis is independent of the subspaces, we only consider the subspace . Furthermore, we focus on only one point on the subspace (labeled as ), and prove that NSN finds correct neighbors for this point under the conditions listed in (1). We say that NSN collects a correct neighbor if at every step the uncollected points that are on subspace are closer to the subspace constructed by NSN at that step, than the points on different subspaces. Mathematically:

for every . Since it is difficult to analyze (2) as the terms are inter dependent, we make use of an Oracle algorithm (similar to NSN but easier to analyze). Then we user lemmas on bounds on order statistics of random projections to find lower bound the projection length of correct points and upper bound the projection length of incorrect points. Finally, we show that the maximum length of projection of incorrect points is smaller than the minimum length of projection of correct points under certain conditions.

**Proof: **The proof of the theorem consists of the following steps:

**Step One**

The first step is to show that **GSR clusters the points exactly** if NSN computes correct neighbors.

- The fully random model has the property that the probability of a point lying on any dimensional subspace in , apart from the true subspaces is 0. Hence we can claim that amongst all possible dimensional subspaces in , the true subspaces are ones that contain the most number of points on or near them.
- Hence, it follows that for each subspace, if we have a point that has correct neighbors on the same subspace, then the subspace is almost surely one of the true subspace and will be picked by GSR.
- All that is left to do is for NSN to find at least correct neighbors for each point and GSR will then recover the true subspaces and cluster the points exactly.

**Step Two**

Next we need to prove that NSN does indeed find the correct neighbors. Essentially, we need to show that the conditions in (1) lead to (2) with high probability. We will follow the arguments stated in the proof sketch and construct an Oracle algorithm that is easier to analyze. The Oracle algorithm knows the true label of each data point, and returns either Success or Failure depending upon the outcome of NSN. In other words, the algorithm returns Failure if and only if NSN picks an incorrect neighbor for .

**1. Oracle Algorithm for **

**Input: **, a set of data points in ; Number of required neighbors ; Maximum subspace dimension

**Output: **SUCCESS or FAILURE of NSN

- Initialize a set of neighbor points , initially containing the point itself.

- Until the set of neighbor points contains the number of required neighbors , the algorithm determines the point that is closest to the current subspace , from amongst the points that are on the subspace . The algorithm also determines the point closest to the current subspace from amongst the points not on the subspace . If the latter is more closer to than the former, algorithm raises FAILURE, and SUCCESS otherwise. We add to the set .

**for** **do**:

(subspace so far)

**if** **then**:

Return FAILURE

**end if**

**end for**

Return SUCCESS

We note that Oracle returns FAILURE if and only if NSN fails. Hence, it is perfectly valid to analyze the success condition of Oracle algorithm which is:

2. In this step , we establish **lower bound on the projection of correct points**. First, note that in order to compute , one can store subspace in the form of a matrix whose columns form an orthonormal basis for . Then . So, let be a matrix whose columns form orthonormal basis for . Further, let be such that columns of form orthogonal basis for . Then:

Hence is the quantity we need to establish the bounds on. Since it is difficult to analyze this quantity because of the interdependent terms in it, we analyze another quantity that is stochastically dominated by but easier to analyze. A quantity stochastically dominates quantity if the probability that is greater than is larger than the probability that is greater than for any non zero constant . We choose that quantity to be which is defined as the largest norm of the projections onto a -dimensional subspace of iid uniform random vectors sampled from a – dimensional unit ball . We have the following lemma on stochastic domination:

Lemma 2stochastically dominates , i.e.,

for any

Using the above lemma, we can instead establish lower bound on and that would lower bound as well. We use the following lemma on order statistics of random projections to establish bounds on .

Lemma 3Let be iid points drawn randomly and uniformly from a -dimensional unit ball . Further, let be the largest value of \{ where . We have the following bounds on :

- Let the rows of A be orthonormal to each other. For any , and , if
then we have:

with probability

- For any k*d matrix A,

Before we apply the lemma to lower bound , we need to show that the condition (3) in the lemma is satisfied by our model. From the first condition in (1) with , we have:

and also

We use the above conditions and the fact that for , stochastically dominates , together with lemma 2(a) and union bound to establish the following lower bound:

simultaneously with probability .

3. Next, we establish **upper bounds on the projection of incorrect points**. Using the same arguments as in above step, we can write as , which is the quantity that we need to bound. From lemma 2(b), we have the upper bound on this as:

Using the fact that and , we can write the above inequality as:

Using union bound, the above holds true for every with probability .

4. In the final step, we need to show that (6) (7) for every :

By manipulation of terms and using the fact that is polynomial in , it can be shown that the above condition is equivalent to (1).

** References **

- Aggarwal, Charu C., Alexander Hinneburg, and Daniel A. Keim. “On the surprising behavior of distance metrics in high dimensional spaces.” ICDT. Vol. 1. 2001.
- Park, Dohyung, Constantine Caramanis, and Sujay Sanghavi. “Greedy subspace clustering.” Advances in Neural Information Processing Systems. 2014.
- Elhamifar, Ehsan, and René Vidal. “Sparse subspace clustering.” Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on. IEEE, 2009.
- Soltanolkotabi, Mahdi, Ehsan Elhamifar, and Emmanuel J. Candes. “Robust subspace clustering.” The Annals of Statistics 42.2 (2014): 669-699.
- Liu, Guangcan, Zhouchen Lin, and Yong Yu. “Robust subspace segmentation by low-rank representation.” Proceedings of the 27th international conference on machine learning (ICML-10). 2010.