Weighted sparse simplex representation: a unified framework for subspace clustering, constrained clustering, and active learning

Spectral-based subspace clustering methods have proved successful in many challenging applications such as gene sequencing, image recognition, and motion segmentation. In this work, we first propose a novel spectral-based subspace clustering algorithm that seeks to represent each point as a sparse convex combination of a few nearby points. We then extend the algorithm to a constrained clustering and active learning framework. Our motivation for developing such a framework stems from the fact that typically either a small amount of labelled data are available in advance; or it is possible to label some points at a cost. The latter scenario is typically encountered in the process of validating a cluster assignment. Extensive experiments on simulated and real datasets show that the proposed approach is effective and competitive with state-of-the-art methods.

ing (McWilliams and Montana 2014), cancer genomics (Yeoh et al. 2002), face clustering (Elhamifar and Vidal 2013), motion segmentation (Rao et al. 2010), and text mining (Peng et al. 2018). The problem of simultaneously estimating the linear subspace corresponding to each cluster, and assigning each point to the closest subspace is known as subspace clustering (Vidal 2011). In the data mining literature, this problem has also been referred to as correlation clustering (Kriegel et al. 2009), but we refrain from using this terminology here. It is important to note that in data mining the term "subspace clustering" has been used to refer to a number of distinct high-dimensional clustering problems (Kriegel et al. 2009). 1 A formal definition of the problem we consider as well as a brief overview of existing methods is provided in Sect. 2.
Spectral methods for subspace clustering have demonstrated excellent performance in numerous real-world applications (Liu et al. 2012;Elhamifar and Vidal 2013;Huang et al. 2015;Li et al. 2017). These methods construct an affinity matrix for spectral clustering by solving an optimisation problem that aims to approximate each point through a linear combination of other points from the same subspace. In this paper, we first propose a method called Weighted Sparse Simplex Representation (WSSR). Our method is based on the Sparse Simplex Representation (SSR) of Huang et al. (2013), in which each point is approximated through a convex combination of other points. This method was not proposed as a subspace clustering method, but rather as a method for modelling the brain anatomical and genetic networks. We modify SSR to ensure that each point is approximated through a sparse convex combination of nearby neighbours, and thus obtain an algorithm that is effective for the subspace clustering problem.
Due to the complete lack of labelled data, clustering methods rarely achieve perfect performance. For this reason, in real-world applications, clustering models are rarely immediately accepted and acted upon. Instead, they undergo one or more rounds of "validation", which commonly involves domain experts assessing whether the model is sensible. A generic description of the information generated during validation is to assume that domain experts assess whether the assignment of a (small) subset of the originally unlabelled data is sensible. To be accepted the clustering model needs to be consistent with this information. In this paper, we assume that this external (side) information can be translated to labels. To accommodate the existence of label information, we consider constrained subspace clustering (Basu et al. 2008). An even more interesting problem arises if the learning algorithm can select the points that experts consider during validation. An effective active learning strategy is highly beneficial not only because it minimises the cost of obtaining labels, but also because producing a valid clustering in as few iterations of the validation process as possible improves user confidence in the model. We therefore discuss an active learning strategy that is designed to query the labels of points so as to maximise the overall quality of the subspace clustering model. In particular, we draw on the work of Peng and Pavlidis (2019) to select informative points to label for subspace clustering. The label information is subsequently incorporated in a constrained clustering formulation that combines WSSR and constrained K -subspace clustering. The resulting cluster assignment is guaranteed to satisfy all the constraints arising from the set of labelled data.
The rest of this paper is organised as follows. In Sect. 2, we discuss some relevant existing literature in the areas of subspace clustering, constrained clustering, and active learning. In Sect. 3, we propose the problem formulation of WSSR, discuss its properties, and present an approach for solving the problem. We develop an integrated active learning and constrained clustering framework in Sect. 4. The experimental results are organised in three sections. First, in Sect. 5, we use synthetic data to evaluate the performance of WSSR under various configurations of the subspace clustering problem. Next, we consider real datasets to assess the comparative performance of our proposed method in the completely unsupervised setting (Sect. 6), as well as in the constrained clustering with active learning settings (Sect. 7). The paper ends with concluding remarks and future research directions in Sect. 8.

Related work
The linear subspace clustering problem can be defined as follows. A collection of N data points X = {x i } N i=1 ⊂ R P is drawn from a union of K linear subspaces {S k } K k=1 with added noise. Each subspace can be defined as, where V k ∈ R P×d k , with 1 ≤ d k < P, is a matrix whose columns constitute a basis for S k , and y ∈ R d k is the representation of x in terms of the columns of V k . The goal of subspace clustering is to find the number of subspaces K ; the subspace dimensions {d k } K k=1 ; a basis {V k } K k=1 for each subspace; and finally the assignments of the points in X to clusters. A natural formulation of this problem is as the minimisation of the reconstruction error, K -subspace clustering (KSC) (Bradley and Mangasarian 2000) is an iterative algorithm to solve the problem in (2). Like the classical K -means clustering, KSC alternates between estimating the subspace bases (for a fixed cluster assignment), and assigning points to clusters (for a fixed set of bases). However, iterative algorithms are very sensitive to initialisation and most often converge to poor local minima (Lipor and Balzano 2017).
Currently the most effective approach to subspace clustering is through spectralbased methods (Lu et al. 2012;Elhamifar and Vidal 2013;Hu et al. 2014;You et al. 2016). Spectral-based methods consist of two steps: first an affinity matrix is estimated, and then normalised spectral clustering (Ng et al. 2002) is applied to this affinity matrix. The affinity matrix is constructed by exploiting the self-expressive property: any x i ∈ S k can be expressed as a linear combination of d k other points from S k . Thus, for each x i ∈ X they first solve a convex optimisation problem of the form, where is a matrix whose columns correspond to the points in X \{x i }; and ρ > 0 is a penalty parameter. The first term in the objective function quantifies the error of approximating x i through X −i β i . The penalty (regularisation) term is included to promote solutions in which β i j is small (and ideally zero) if x j belongs to a different subspace than x i . After solving the problem in (3) for each x i ∈ X , the affinity matrix is typically defined as Least Squares Regression (LSR) (Lu et al. 2012) uses the L 2 -norm for both the approximation error, and the regularisation term ( p = q = 2). Smooth Representation Clustering (SMR) (Hu et al. 2014) also uses the L 2 -norm on the approximation error, while the penalty term is given by L 1/2 β i 2 2 in which L a positive definite Laplacian matrix constructed from pairwise similarities. The main advantage of using the L 2 -norm is that the optimisation problem has a closed-form solution. However the resulting coefficient vectors are dense and hence the affinity matrix contains connections between points from different subspaces. The most prominent spectral-based subspace clustering algorithm is Sparse Subspace Clustering (SSC) (Elhamifar and Vidal 2013). In its most general formulation, SSC accommodates the possibility that points from each subspace are contaminated by both noise and sparse outlying entries. In SSC, β i is the solution to the following problem, SSC therefore decomposes the approximation error into two components (η i and z i ), which are measured with different norms. Following the success of SSC, several variants have been proposed, including SSC with Orthogonal Matching Pursuit (SSC-OMP) (You et al. 2016), Structured Sparse Subspace Clustering (S3C) (Li et al. 2017), and Affine Sparse Subspace Clustering (ASSC) (Li et al. 2018a). The method most closely connected to our approach is SSR, proposed by Huang et al. (2013) for the modelling of brain networks. SSR solves the problem in (3) using p = 2 and q = 1 with the additional constraint that the coefficient vector has to lie in the (N − 1)-dimensional unit simplex β i ∈ N −1 = {β ∈ R N −1 | β ≥ 0, β T 1 = 1}. Since SSR approximates x i through a convex combination of other points, the coefficients have a probabilistic interpretation. However, SSR induces no regularisation since β i 1 = 1 for all β i ∈ N −1 , hence coefficient vectors are dense.
We next provide a short overview of clustering with external information, called constrained clustering (Basu et al. 2008), and active learning. Due to space limitations, we only mention the work that is most closely related to our problem. In constrained clustering, the external information can be either in the form of class labels or as pairwise "must-link" and "cannot-link" constraints. Spectral methods for constrained clustering incorporate this information by modifying the affinity matrix. Constrained Spectral Partitioning (CSP) (Wang and Davidson 2010) introduces a pairwise constraint matrix and solves a modified normalised cut spectral clustering problem. Partition Level Constrained Clustering (PLCC) (Liu et al. 2018) forms a pairwise constraint matrix through a side information matrix which is included as a penalty term into the normalised cut objective. Constrained Structured Sparse Subspace Clustering (CS3C) (Li et al. 2017) is specifically designed for subspace clustering. CS3C incorporates a side information matrix that encodes the pairwise constraints into the formulation of S3C. The algorithm alternates between solving for the coefficient matrix and solving for the cluster labels. Constrained clustering algorithms that rely exclusively on modifying the affinity matrix cannot guarantee that all the constraints will be satisfied. CS3C+ (Li et al. 2018b) is an extension of CS3C that applies constrained Kmeans algorithm (Wagstaff et al. 2001) within the spectral clustering stage, to ensure constraints are satisfied.
In active learning the algorithm controls the choice of points for which external information is obtained. The majority of active learning techniques are designed for supervised methods, and little research has considered the problem of active learning for subspace clustering Balzano 2015, 2017;Peng and Pavlidis 2019). Lipor and Balzano (2015) propose two active strategies. The first queries the point(s) with the largest reconstruction error to its allocated subspace. The second queries the point(s) that is maximally equidistant to its two closest subspaces. Lipor and Balzano (2017) extend the second strategy for spectral clustering by setting the affinity of "must-link" and "cannot-link" pairs of points to one and zero, respectively. Both strategies by Lipor and Balzano (2015) are effective in identifying mislabelled points. However, correctly assigning these points is not guaranteed to maximally improve the accuracy of the estimated subspaces, hence the overall quality of the clustering. Peng and Pavlidis (2019) propose an active learning strategy for sequentially querying point(s) to maximise the decrease of the overall reconstruction error in (2).

Weighted sparse simplex representation
In this section, we describe the proposed spectral-based subspace clustering method, called Weighted Sparse Simplex Representation (WSSR). In this description, we assume that no labelled data is available. The constrained clustering version described in the next section accommodates the case of having a subset of labelled observations at the start of the learning process.
Let d i j ≥ 0 denote a measure of dissimilarity between x i , x j ∈ X , and I the set of indices of all points in X {x i } with finite dissimilarity to x i , that is In WSSR, the coefficient vector for each x i ∈ X is the solution to the following convex optimisation problem, where ρ, ξ > 0 are penalty parameters,X I ∈ R P×|I | is a matrix whose columns are the scaled versions of the points in X I , and D I = diag(d I ) is a diagonal matrix of finite pairwise dissimilarities between x i and the points in X I . We first outline our motivation for the choice of penalty function, and then discuss the definition ofX I and the choice of d i j in the next paragraph. The use of both an L 1 and an L 2 -norm in (5) is motivated by the elastic net formulation (Zou and Hastie 2005). The L 1 -norm penalty promotes solutions in which coefficients of dissimilar points are zero. The L 2 -norm penalty encourages what is known as the grouping effect: if a group of points induces a similar approximation error, then either all points in the group are represented in β i , or none is. This is desirable for subspace clustering, because the points in such a group should belong to the same subspace. In this case, if this subspace is different from the one x i belongs to, then all points should be assigned a coefficient of zero.
If instead the group of points are from the same subspace as x i , then it is beneficial to connect x i to all of them, because this increases the probability that points from each subspace will belong to a single connected component of the graph defined by the affinity matrix A. Spectral subspace clustering algorithms commonly normalise the points in X to have unit L 2 -norm prior to estimating the coefficient vectors (Elhamifar and Vidal 2013;You et al. 2016). The simple example in Fig. 1 illustrates that this normalisation tends to increase cluster separability. In the following, we denotex i = x i / x i 2 . However, projecting the data onto the unit sphere has important implications for the WSSR problem. In (5) we want the two conflicting objectives of minimising the approximation error and selecting a few nearby points to be separate. Figure 2 contains an example that shows that this is not true after projecting onto the unit sphere. In Fig. 2, the point closest tox i on the unit sphere isx 1 . The direction ofx i can be perfectly approximated by a convex combination ofx 1 andx 2 , but all convex combinations αx 1 + (1 − α)x 2 with α ∈ (0, 1) have an L 2 -norm less than one. Since the cardinality of β i affects the length of the approximation, it affects both the penalty term and the approximation error. A simple solution to address this problem is to scale every point x j with j ∈ I such thatx i j = t i j x j lies on the hyperplane perpendicular to the unit sphere atx i ,x i j ∈ {x ∈ R P |x Tx i = 1}. Note that this implies that if x T j x i < 0, then t i j is negative. An inspection of Fig. 1 suggests that this is sensible. An appropriate measure of pairwise dissimilarity given the aforementioned preprocessing steps is the inverse absolute cosine similarity, Since d i j is infinite when x T j x i = 0, such points could never be assigned a non-zero coefficient, therefore they are excluded fromX I .  We now return to the optimisation problem in (5). Due to the constraint β i ∈ |I| and the fact that d I > 0, D I β i 1 = d T I β i . This implies that the objective function is a quadratic, and the minimisation problem in (5) is equivalent to the one below, For any ξ > 0, the above objective function is guaranteed to be strictly convex, therefore WSSR corresponds to a Quadratic Programme (QP). The choice of ρ in (7) is critical to obtain an affinity matrix that accurately captures the cluster structure. The ridge penalty parameter, ξ , is typically assigned a small value, e.g. 10 −4 (Gaines et al. 2018). For "large" ρ, the optimal solution assigns a coefficient of one to the nearest neighbour ofx i and all other coefficients are zero. This is clearly undesirable. Setting this parameter is complicated by the fact that an appropriate choice of ρ differs for eachx i . Lemma 1 is a result which can be used to obtain a lower bound on ρ such that the solution of (7) is the "nearest neighbour" approximation. The proof of this lemma, as well as a second lemma which establishes its geometric interpretation can be found in Appendix B. ( j) i denote the j-th nearest neighbour ofx i . Assume thatx (1) i is unique and thatx (1) i =x i . We also assume that the pairwise dissimilarities satisfy:

Lemma 1 Let ( j) denote the index of the j-th nearest neighbour ofx i , andx
Note that our definition of pairwise dissimilarities satisfies the requirements of the lemma. The proof uses directional derivatives and the convexity of the objective function. In effect, Lemma 1 states that there are cases in which the nearest-neighbour approximation is optimal for all ρ > 0. This occurs when it is possible to define a hyperplane that containsx (1) i , the nearest neighbour ofx i , and separates the column vectors inX I fromx i . In all other cases, there exists a positive value of ρ such that β i has cardinality greater than one.
We close this section by outlining a simple proximal gradient descent algorithm (Parikh and Boyd 2014) that is faster for large instances of the problem than standard QP solvers. To this end, we first express (7) as an unconstrained minimisation problem through the use of an indicator function, where f (β i ) is the quadratic function in Eq. (7), and 1 |I| (β i ) is zero for β i ∈ |I| and infinity otherwise. At each iteration, proximal gradient descent updates β t i by projecting onto the unit simplex a step of the standard gradient descent, where η t is the step size at iteration t. Projecting onto |I| can be achieved via a simple algorithm with complexity O (|I| log (|I|)) (Wang and Carreira-Perpinán 2013).

Active learning and constrained clustering
In this section, we describe the process of identifying informative points to query (active learning), and then updating the clustering model to accommodate the most recent labels (constrained clustering). The constrained clustering algorithm described in this section can also be used if the labels for a subset of points were available at the start of the learning process. We adopt the active learning strategy of Peng and Pavlidis (2019), that queries the points whose labelling information is expected to induce the largest decrease in the reconstruction error function (defined in (2)). Let U ⊆ {1, . . . , N } denote the set of indices of the unlabelled points, and L ⊆ {1, . . . , N } denote the set of indices of labelled points. Furthermore, let {c i } N i=1 denote the cluster assignment of each point, and {l i } i∈L the class labels for the labelled points. To quantify the expected decrease in the reconstruction error after obtaining the label of x i with i ∈ U, we estimate two quantities. The first is the decrease in the reconstruction error that can be achieved if x i is removed from its currently assigned cluster c i . This is measured by the function where V c i is a matrix containing a basis for cluster c i . The second is the increase in the reconstruction error due to the addition of x i to a different cluster c i . This is measured by the function U 2 (x i , V c i ). To estimate U 2 we assume that c i is the cluster that is the second nearest to x i in terms of reconstruction error. This assumption is not guaranteed to hold but it is valid in the vast majority of cases. According to Peng and Pavlidis (2019), the most informative point to query is defined as, The difficulty in calculating U 1 (x i , V c i ) and U 2 (x i , V c i ) is that one needs to account for the fact that a change in the cluster assignment of x i affects both V c i and V c i . Recall that (irrespective of the choice of the clustering algorithm), the basis V k for each cluster (subspace) k is computed by performing Principal Component Analysis (PCA) on the set of points assigned to this cluster. The advantage of the approach proposed by Peng and Pavlidis (2019) is that this is recognised, and a computationally efficient method to approximate U 1 and U 2 is proposed. In particular, using perturbation results for PCA (Critchley 1985), a first-order approximation of the changes in where N k is the number of points in cluster k). Once the labels of the queried points are obtained we proceed to the constrained clustering stage in which we update the cluster assignment to accommodate the new information. The first step in our approach modifies pairwise dissimilarities between points in a manner similar to the work of Li et al. (2017). Specifically, for each x i ∈ X we update all pairwise dissimilarities d i j ∈ d I according to, The first fraction is the dissimilarity measure in the absence of any label information as defined in (6). If the labels of both x i and x j are known and they are different then the dissimilarity is first scaled by e and a constant α ∈ [0, 1] is added. If l i = l j , then the original dissimilarity is scaled by e −1 . If the label of either x i or x j is unknown then no scaling is applied, but if in the previous step the two points were assigned to different clusters then their dissimilarity is increased by α. The term α quantifies the confidence of the algorithm in the previous cluster assignment. A simple and effective heuristic is to assign α equal to the proportion of labelled data. After updating pairwise dissimilarities through (10) we update the coefficient vectors for each point by solving the problem in (7). The resulting affinity matrix is the input to the normalised spectral clustering of Ng et al. (2002). This cluster assignment is not guaranteed to satisfy all the constraints. To ensure constraint satisfaction, we use this cluster assignment as the initialisation for the K -Subspace Clustering with Constraints (KSCC) algorithm (Peng and Pavlidis 2019). KSCC is an iterative algorithm to solve the following optimisation problem, where P(K ) is the set of all permutations of the cluster indices {1, . . . , K }; while each permutation P ∈ P(K ) is a vector P = (P 1 , . . . , P K ) whose k-th element, P k , indicates the cluster label associated with class k. The first term in (11) is the reconstruction error for the unlabelled points. The second term quantifies the reconstruction error for the labelled / queried points. To estimate this, we first need to match each cluster label to a unique class label. Each permutation P ∈ P(K ) of the set {1, . . . , K } represents a unique matching of cluster to class labels. According to (11), for every class k = 1, . . . , K , the reconstruction error of the labelled points of this class, {x j : j ∈ L, l j = k}, is computed by projecting them onto the linear subspace (cluster) defined by the basis V P k . By minimising over all possible permutations P ∈ P(K ), we identify the matching of cluster to class labels that achieves the smallest overall reconstruction error for the labelled points, subject to the constraint that labelled points from each class are assigned to a unique cluster. This is an instance of the minimum weight perfect matching problem, and can be solved by the Hungarian algorithm (Kuhn 1955) in O(K 3 ). Note that by design the minimisation problem is always feasible irrespective of the composition of the set L.
KSCC is an iterative algorithm that monotonically reduces the value of the objective function. It therefore converges to the local minimum of (11) whose region of attraction contains the initial cluster assignment. The computational complexity of KSCC is the same as that of KSC, namely O(min{N k P 2 , N 2 k P}). We summarise the active learning and constrained clustering framework in procedural form in Algorithm 1. We refer to this extended version of WSSR as WSSR+.

Algorithm 1: Active Learning and Constrained Clustering with WSSR (WSSR+)
Input : WSSR-related parameters; Sets of 'must-link' and 'cannot-link' constraints: S M , S C ; Penalty parameter: α; Number of points to query in each iteration: b % Active learning -Query the b most informative point according to (9) % Constraint incorporation For x ∈ X : 1. Compute the updated weight vector d according to (10) 2. Normalise and stretch each column vector in X 3. Solve the WSSR problem in (5) to obtain the coefficient vector β End -Combine all βs to obtain the coefficient matrix B ∈ R N ×N -Apply normalised cut spectral clustering (Ng et al. 2002) to the data affinity matrix % Constraint satisfaction -Enforce the constraint information using KSCC (Peng and Pavlidis 2019) and obtain the updated cluster labels

Experiments on synthetic data
In this section, we conduct experiments on synthetic data to evaluate the performance of WSSR under various settings. We compare to the following state-of-the-art spectralbased subspace clustering methods: SSC (Elhamifar and Vidal (Hu et al. 2014). In the set of competing algorithms, we also include SSR (Huang et al. 2013) to allow us to assess the extent to which WSSR improves performance over this algorithm. The purpose of using synthetic data is to evaluate the impact on clustering accuracy of (a) the angles between the linear subspaces (clusters); (b) the noise level; and (c) the subspace dimensionality. 2

Parameter settings
We first report the parameter settings for all the algorithms considered. These settings are used in all the experiments reported in this paper. In WSSR, to estimate the coefficient vector for each point in the optimisation problem in (7) we consider only 10-nearest neighbourhoods (rather than all the (N − 1) points in the dataset). The L 1 and L 2 penalty parameters are set to be ρ = 10 −2 and ξ = 10 −4 , respectively. Both SSC and S3C have the settings of linear subspace and no outliers. For SSC, the penalty parameters ρ η and ρ z in (4) are computed as ρ η = α η /μ η and ρ z = α z /μ z , where the αs are user-specified and the μs are data dependent as computed according to (14) in Elhamifar and Vidal (2013). We use the default parameter values of α η = α z = 20. There is a hard and a soft version of S3C. We use the soft version with all its default parameter settings, as Li et al. (2017) report that this yields better clustering results. ASSC shares the same algorithmic implementation as SSC, except that the affine subspace setting is used. We set the maximum number of non-zero coefficients in SSC-OMP to ten to be consistent with the corresponding setting in WSSR. The OMP algorithm involves a termination threshold, which is set to 10 −6 .
Unlike the previously discussed methods, LSR and SMR yield dense coefficient vectors. There are two versions of LSR, called LSR1 and LSR2. The first solves the LSR problem without allowing self-representation, that is all diagonal entries in the coefficient matrix are forced to be zero. In LSR2, this constraint is absent. We use LSR1 as Lu et al. (2012) report that it performs better in practice. Furthermore, by not allowing self-representation, LSR1 is directly comparable with all the other methods. There are also two different versions of SMR, called SMR-J1 and SMR-J2. These differ in how the affinity matrix, A, is constructed from the coefficient matrix, B. SMR-J1 defines A as in (12). We therefore use SMR-J1 as this is how all other methods define the affinity matrix. Finally, we set the SMR-J1 nearest neighbour parameter to ten to be consistent with the corresponding settings in WSSR and SSC-OMP, while all other parameter values are set to their default settings (Hu et al. 2014).

Varying angles between subspaces
In this set of experiments, we generate data from two 5-dimensional subspaces embedded in a 50-dimensional space. Each cluster contains 200 data points drawn from one of the subspaces. In addition, additive Gaussian noise with standard deviation σ = 0.001 is added to the data uniformly. We vary the angles between the two subspaces θ between 10 and 60 degrees. The smaller the angle between two subspaces, the more difficult the clustering problem is. We evaluate the performance of various algorithms under each setting using clustering accuracy, and the performance results are reported in Table 1. The best performance results are highlighted in bold, and the second best performance results are underlined.
A general trend across almost all methods is that accuracy increases as the angle between the two subspaces increases. WSSR achieves the best performance in all scenarios. Even when the angle between the two subspaces is only 10 degrees it achieves an accuracy close to 0.95, while for angles greater or equal to 30 degrees clustering accuracy is perfect. This can be attributed to the small standard deviation of the noise term, and as we discuss in the next subsection, performance deteriorates when σ increases. However the accuracy of most other methods, including SSC and several of its variants, is much lower, despite very little noise. S3C is the strongest competitor and achieves the second best performance in effectively all scenarios.

Varying noise levels
Next, we explore the effect of various noise levels on cluster performance. Data are generated from five linear subspaces (clusters). Each subspace contains 200 data points that lie in a 5-dimensional subspace within an ambient space of dimension 50. Gaus-  Table 2 Accuracy of various subspace clustering algorithms on synthetic data with varying noise levels.
The first column is not highlighted as all methods have perfect cluster performance in the noise-free scenario sian noise, ε ∼ N (0, σ 2 I P ), is added to the full-dimensional data. Table 2 presents clustering accuracy of the different algorithms for σ ∈ [0, 0.5].
It is worth noting that all methods enjoy perfect clustering accuracy in the noise-free scenario. The accuracy scores for all methods decrease as the noise variance increases, although the speed and magnitude of the performance degradation differs markedly. WSSR enjoys the best performance among all competing methods for all values of σ , and furthermore its performance degrades much more gradually as σ increases. It is also the only method that maintains an accuracy of over 0.9 for σ up to 0.4. It is worth noting that the performance of SSC-based methods (SSC, S3C, ASSC, SSC-OMP) degrades rapidly with increasing levels of noise. Indeed, all these methods have accuracy scores substantially less than 0.5 for σ = 0.5. In comparison, WSSR, LSR, and SMR, which use the Frobenius norm on the error matrix, or the L 2 -norm on the reconstruction error, exhibit better performance.

Varying subspace dimensions
In this subsection we investigate the impact of the subspace dimensionality, d, on performance, under a fixed ambient space dimensionality, P. In this set of experiments, we fix the ambient space dimension to P = 100, and allow d to increase from ten to 45. All experiments involve data from five d-dimensional linear subspaces. As before Gaussian noise with σ = 0.5 is added to the data. Table 3 reports the performance of the considered methods. The table shows that for the lowest values of d all considered methods perform relatively poorly. As d increases performance initially improves, but as we approach the maximum value of this parameter accuracy deteriorates. This happens because the combination of a relatively high variance for the noise term, and increasing d cause higher overlap among clusters. WSSR achieves very good relative performance especially for the lower values of d. For d ≥ 30 LSR1 is the best performing method. Even for the higher values of d, however, WSSR achieves the best accuracy among the methods that estimate a sparse coefficient vector (with one exception for d = 40, where WSSR achieves an accuracy of 0.925, while S3C has an accuracy of 0.926). WSSR is affected by the higher cluster overlap, because it becomes increasingly likely that some of the 10-NNs of each point belong to different clusters. This can be overcome by increasing the number of NNs, but for consistency we use the same value, k = 10, throughout all the experiments in this paper.

Experiments on real data
In this section, we use real datasets to assess the comparative performance of WSSR on a range of real-world datasets including the MNIST database (LeCun et al. 1998), three Cancer gene datasets, and the Hopkins155 motion segmentation database.

MNIST data
The MNIST handwritten digits database contains greyscale images of handwritten digits from 0 to 9 (LeCun et al. 1998), and has been widely used in the machine learning literature to benchmark the performance of supervised and unsupervised learning methods. In the context of subspace clustering, You et al. (2016) used this dataset to demonstrate the effectiveness of SSC-OMP. The original MNIST database contains 60,000 points in P = 3472 dimensions. The data is organised in ten clusters, with each cluster correspoding to a different digit. We adopt the experimental design proposed by You et al. (2016) and conduct two sets of experiments. The first aims to investigate the effect of the number of clusters, K , on performance. To this end, we randomly select K ∈ {2, 3, 5, 8, 10} clusters out of the ten digits, and from each chosen cluster (digit) we sample uniformly at random 100 points. The data is then projected onto the first 200 principal components. The rationale for projecting onto 200 dimensions is that when K = 2 we obtain a sample of size 200, and the maximum dimensionality of the subspace spanned by these vectors is 200. The second set of experiments proposed by You et al. (2016), is designed to investigate the effect of the number of data points per cluster, N k , on performance. In these experiments K = 10, while N k ∈ {50, 100, 500, 1000, 2000} points are selected uniformly at random from each cluster (digit). As before, the data is first projected onto the first 200 principal components, and then clustering is applied. For every choice of K (first setup) and N k (second setup) we sample 20 datasets and apply the considered clustering algorithms on each of them. Table 4 reports the median and standard deviation of clustering accuracy for the first set of experiments in which K varies. WSSR always achieves the highest median performance and lowest standard deviation, while the improvement it achieves over competing methods increases as the clustering problem becomes more difficult (K increases). Note that WSSR achieves a substantial improvement over SSR, which is the worst performing method for K ≥ 5. Most of the competing algorithms achieve excellent accuracy for the smaller values of K , but their performance deteriorates considerably as K increases. SSC and S3C exhibit very similar performance, with SSC achieving slightly higher median accuracy. SSC-OMP appears to have a clear advantage over the other SSC-based methods for larger K . ASSC performs similarly to SSC-OMP in this dataset. LSR compares unfavourably with most other methods, both in terms of median performance, and in terms of performance variability especially for small K . Table 5 reports the results for the second set of experiments where K is always ten, while N k , the number of points per cluster, varies. Note that for the largest N k values the experiments with SSC, S3C, and SMR did not finish their 20 replications within 24 hours. We report those as dashed lines in Table 5. For all considered methods, as N k increases median accuracy improves, while performance variability decreases (with the exception of SSC-OMP). WSSR achieves the highest median accuracy across all settings, and exhibits the least performance variability. SSC-OMP is the algorithm with the second highest median performance when N k = 50, 100, while for larger N k values SMR is second best.
All our experiments on the MNIST database were performed on a cloud computing machine with four CPU cores and 8 GB of RAM. All the algorithms were implemented in MATLAB. Figure 3 illustrates computational times in log-scale for the considered algorithms for each of the two sets of experiments on the MNIST dataset. Both figures indicate that S3C is the most computationally intensive method. SSC and ASSC have similar computational times because they are based on the same optimisation framework. The most computationally efficient methods are SSC-OMP and LSR. SSC-OMP is the SSC variant that is most suitable for large-scale problems, while LSR admits a closed-form solution. For smaller problem sizes, the computational time for WSSR is comparable to that of SSC and ASSC, but the comparison becomes more favourable to WSSR for larger values of N k and K .

Gene expression datasets
Gene expression data have been shown to exhibit a grouping structure, in which each subtype of gene expression forms a different linear subspace (McWilliams and Montana 2014). The following three datasets have been previously adopted to demonstrate the effectiveness of subspace clustering: St. Jude Leukemia, Lung Cancer, and Novartis BPLC (Li et al. 2018b). A summary of their basic characteristics is provided in Table 6. Table 7 reports the performance of all clustering algorithms on these datasets. WSSR achieves the best performance on the St. Jude Leukemia and Novartis BPLS datasets, while on the Lung Cancer dataset it achieves an accuracy in excess of 0.9. Its performance on the last dataset is 5.7% lower compared to the best performing algorithm (S3C) and 0.5% lower compared to the second best (ASSC). In these gene expression datasets SSC-based methods performed well, while the performance of LSR and SMR was considerably lower.

Hopkins155 motion segmentation data
A fundamental problem in computer vision is to infer structures and movements of three-dimensional objects from a video sequence. Video sequences often contain multiple objects moving independently in a scene, captured from a potentially moving  Fig. 4 Performance of subspace clustering methods on Hopkins155 database camera. Thus, an important initial step in the analysis of video sequences is the motion segmentation problem: Given a set of feature points that are tracked through a sequence of video frames, cluster the trajectories of those points according to different motions (Rao et al. 2010). Using the affine camera model, this problem can be cast as the problem of segmenting samples drawn from multiple linear subspaces.
The Hopkins155 motion segmentation database (Tron and Vidal 2007), which contains 155 video sequences, has been widely used in computer vision to benchmark subspace clustering algorithms. Figure 4 presents boxplots of accuracy across the 155 datasets, for all the considered algorithms. LSR achieves the highest median accuracy and overall the most stable performance. ASSC also exhibits a very high median accuracy and stable performance. WSSR achieves the second highest median accuracy (higher than ASSC) but its performance is more variable compared to LSR and ASSC. Moreover, it performs relatively poorly on specific datasets. With the exception of ASSC other SSC variants achieve a median performance considerably lower than WSSR, and exhibit similar variability. The same is true of SMR and SSR.

Constrained clustering with active learning
In this section, we assess the performance of the constrained clustering with active learning framework, WSSR+, introduced in Sect. 4. In the previous subsection, we saw that WSSR achieved low accuracy on specific video sequences of the Hopkins155 motion segmentation dataset. In this section, we select the sequences on which WSSR did not produce perfect performance, to assess the benefits of incorporating label information through WSSR+.
We compare WSSR+ to three state-of-the-art constrained clustering methods: PLCC (Liu et al. 2018), CSP (Wang et al. 2014), and LCVQE (Pelleg and Baras 2007). PLCC has one tuning parameter λ that controls the weight assigned to the constrained information. We use the default setting of λ = 10 4 , as it is the recommended default setting by the authors of Liu et al. (2018). CSP and LCVQE do not involve any user-specified parameter. Note that all three algorithms describe how to incorporate label information into a clustering model. Thus they can be used in conjunction with any clustering algorithm. To ensure a fair comparison, we always use WSSR as the underlying clustering algorithm and select the queried points through the active learning strategy of Peng and Pavlidis (2019). The latter choice is made because Hopkins155 datasets are known to exhibit subspace clustering structure. Figure 5 presents boxplots of the clustering accuracy with respect to the proportion of labelled data, which ranges between zero and 0.5. When this proportion is zero, there are no constraints due to labelled data, and hence the corresponding four boxplots illustrate the clustering accuracy of WSSR on the selected datasets. (This is the reason that these four boxplots are identical.) We include the case of no labels because a natural benchmark for any constrained clustering algorithm is its performance relative to the fully unsupervised problem. As the first four boxplots in Fig. 5 show, WSSR achieves a median accuracy close to 0.85, but on some datasets accuracy is lower than 0.5. Figure 5 shows that on these datasets incorporating label information through CSP and PLCC initially degrades performance. In fact it is not until the proportion of labelled data reaches 0.4 and 0.5 that the performance of CSP and PLCC (respectively) is not worse than in the fully unsupervised case. WSSR+ and LCVQE improve performance, both in terms of the median and the interquartile range, as the proportion of labelled data increases. When the proportion of labelled data is higher or equal to 0.3, WSSR+ clearly outperforms LCVQE, especially in terms of performance variability. Note that the high variability in performance across all methods when the proportion of labelled data is small is due to the diverse range of datasets considered, rather than an inherent performance variability of the considered constrained clustering algorithms.

Conclusions and future work
In this work, we proposed a subspace clustering method called Weighted Sparse Simplex Representation (WSSR), which relies on estimating an affinity matrix by approximating each data point as a sparse convex combination of nearby points. We derived a lemma that provides a lower bound that can be used to select the critical penalty parameter, that controls the degree of sparsity. Extensive experimental results show that WSSR is competitive with state-of-the-art subspace clustering methods. We extended WSSR to the problem of constrained clustering, to accommodate cases where external information about the actual assignment of some points is available. Our constrained clustering approach combines the strengths of spectral-based methods, and constrained K -subspace clustering to ensure that the resulting clustering is accurate, and consistent with the label information. We also discussed an appropriate active learning strategy that aims to query points whose label information can maximally improve the quality of the overall subspace clustering model. Experiments on motion segmentation datasets, in which the unsupervised WSSR algorithm does not perform well, document the effectiveness of the proposed approach in incorporating label information.
In this work we focused on subspace clustering. For this problem, the inverse cosine similarity is a natural proximity measure after projecting the data onto the unit sphere. It would be interesting to explore other affinity measures that can potentially be used to capture data from manifolds. The proposed approach was developed under the assumption that the label information is always correct. This assumption can be violated in certain applications. A challenging future research direction is to design methods that can accommodate uncertainty in the validity of the observed labels, especially when the proportion of labelled data is small. also like to thank the associate editor and two anonymous reviewers for comments that helped us improve the paper substantially.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

A KKT conditions for optimality
In this section, we derive the Karush-Kuhn-Tucker (KKT) conditions for our proposed WSSR problem formulation. For any optimisation problem with differentiable objective and constraint functions for which strong duality holds, the KKT conditions are necessary and sufficient conditions for obtaining the optimal solution (Boyd and Vandenberghe 2004).
Firstly, the stationarity condition in the KKT conditions states that when optimality is achieved, the derivative of the Lagrangian with respect to β i is zero. The Lagrangian L β i ; λ i , μ i associated with the WSSR problem in (5) can be expressed as in which λ i is a scalar and μ i is a vector of non-negative Lagrange multipliers. Thus, the stationarity condition gives the following which can be simplified to Since all diagonal entries in D I are positive, the matrix X T IX I + ξ D T I D I is full rank thus invertible.
Secondly, the KKT conditions state that any primal optimal β i must satisfy both the equality and inequality constraints in (5). In addition, any dual optimal λ i and μ i must satisfy the dual feasibility constraint μ i ≥ 0. Thirdly, the KKT conditions state that μ i j β i j = 0 for all j ∈ I for any primal optimal β i and dual optimal μ i when strong duality holds. This is called the complementary slackness condition. To put everything together, when strong duality holds, any primal optimal β i and any dual optimal λ i and μ i must satisfy the following KKT conditions: Equality constraint: β T i 1 = 1, Inequality constraint: β i ≥ 0, Dual feasibility: μ i ≥ 0, Complementary slackness: μ i j β i j = 0, ∀ j ∈ I.

B Necessary and sufficient conditions for the trivial solution
In Sects. B.1 and B.2, we investigate the necessary and sufficient conditions under which the trivial solution is obtained. That is, only the most similar point is chosen and has coefficient one.

B.1 Necessary condition for the trivial solution
Consider the WSSR problem formulation in (5) for a given x ∈ X , which we restate below: Without loss of generality, we assume thatX I = x (1) ,x (2) , . . . ,x (|I|) wherê x (k) (k ∈ {1, 2, . . . , |I|}) is the k-th nearest neighbour ofx i that lies on the perpendicular hyperplane ofx i . Similarly Let β i denote the optimal solution to (16), we establish the necessary condition for the trivial solution that β i ∞ = 1 in Proposition 1.

Proposition 1 Assume the nearest neighbour ofx
Proof To establish the above claim, it suffices to show that the directional derivative of the objective function at e 1 is positive for all feasible directions in the unit simplex |I| . Without causing confusion, we drop the subscript i in the following proof for ease of notation. Let us denote the objective function value in (16) as f (β), then the derivative of the objective function is The directional derivative of f at point β in the direction e j is given by ∇ f (β) T e j for j ∈ {1, 2, . . . , |I|}. To ensure that the directional derivative of f at e 1 towards any feasible direction (that is any direction that retains β within the unit simplex |I| ) is positive, it suffices to ensure that The above condition holds if the following holds (17) is obtained by combining the above inequality with the requirement that ρ ≥ 0.

B.2 Sufficient condition for the trivial solution
Next, we show that (19) is a sufficient condition for the trivial solution β i = e 1 .
then the solution to (16) is given by β i = e 1 . In addition, if for all j ∈ {2, . . . , |I|} we have then the solution to (16) The last line from above means that the directional derivative at e 1 towards any other feasible direction within the unit simplex (N −1) is positive. Thus the solution to (16) is given by β = e 1 . For the second part of the proposition, we first provide a geometric interpretation in Fig. 6 for the meaning of the statement.
In Fig. 6,x i is the point to be approximated andx (1) i is its nearest neighbour on the unit sphere. The bold black line is the perpendicular hyperplane of Assume that all points apart fromx i andx (1) i lie on one side of the hyperplane H, opposite the side to whichx i resides in. That is, x We can see that H is a supporting hyperplane for conv(X \ {x i }). Consider for an arbitrary point y = Y β ∈ conv(X \ {x i }), we have Fig. 6 A geometric interpretation for when the trivial solution is obtained That is, all points apart fromx i andx (1) i lie on one side of the supporting hyperplane In this case, any linear combination of the column vectors in Y would be further away fromx i than usingx (1) i itself as the approximation. Therefore, the proposition says if x . . , |I|}, then the trivial solution can be obtained for any ρ > 0.

C Experiments on USPS
In this subsection, we evaluate the performance of different subspace clustering methods on the USPS digits data (Hull 1994). USPS is another widely used benchmark dataset, which has been used to demonstrate the effectiveness of subspace clustering methods (Hu et al. 2014;Yang et al. 2019). USPS consists of 9298 images of handwritten digits that range from 0 to 9, and each image contains 16×16 pixels. We follow the exact same experimental settings as in Hu et al. (2014), which uses the first 100 images from each digit.
We investigate the performance of various algorithms under varying number of clusters K . All experiments are conducted for 20 replications, and we report both the median and standard deviation of the clustering accuracy in Table 8. For K from 2 to 8, we randomly sample data from K digits. Therefore the variability in the cluster performance comes from both the variability in the subset of the data, and the variability of the corresponding algorithm. For K = 10, we use the same dataset with 1000 images across all replications. In this case, the standard deviation reflects only the variability of the algorithms. SSC, S3C, and ASSC exhibit similar performance for all values of K . On the USPS dataset, the performance of these methods degrades much more as K increases compared to the MNIST dataset. Performance variability is also higher for K = 2, 3 as evinced by the higher values of the reported standard deviations. SSC-OMP performs worse than the previous three SSC variants in every case. LSR fails to achieve high accuracy across all settings, and is it also characterised by a much higher performance variability when K is small. SSR, SMR and FGNSC have excellent performance when K is small. However, their performance decreases with the increase of K , though the performance degrade more gradually for SMR and FGNSC than the previously discussed methods. WSSR is the best performing method on this dataset. It manages to achieve median accuracy that is close to perfect, and very small performance variability for all values of K .

D WSSR+ experiments on MNIST data
In this section, we assess the performance of the proposed framework for constrained clustering in two cases. First, when a random subset of labelled points is available at the outset; and second, when active learning is used to select which points to label. We use the MNIST dataset from Sect. 6.1, and consider different values of K . For the constrained clustering problem, for each dataset and for different values of K , we obtain the labels of a proportion p ∈ {0.1, 0.2, 0.3} of randomly selected points. We compare the performance of WSSR+ to that of Partition Level Constrained Clustering (PLCC) (Liu et al. 2018), Constrained Spectral Partitioning (CSP) (Wang et al. 2014), and LCVQE (Pelleg and Baras 2007). The initial affinity matrix for all methods is produced by WSSR. Various proportions of side information are obtained via active learning (AL) and random sampling (RS) To ensure a fair comparison, the same initial affinity matrix is used in all three constrained clustering algorithms. In particular the initial affinity matrix is the one produced by WSSR. PLCC involves one tuning parameter, λ, which controls the weight assigned on the side information. Although in Liu et al. (2018) it is recommended to set λ to be above 10,000 for stable performance, we found that in our experiments this is a poor choice. Instead we sampled 20 random values for λ in the range (0,1) and chose the one that produced the highest clustering accuracy. CSP involves no tuning parameters.
The experimental results of varying levels of side information are reported in Table 9. For these cases, we would like to inspect whether various constrained clustering algorithms retain this performance after additional labelling information becomes available. The columns titled "AL" and "RS" correspond to the scenarios where the labelled points are obtained through the active learning (AL) strategy in Sect. 4 and random sampling (RS) respectively. For the random sampling scenario, we replicate the experiment 20 times for varying proportions of labelled points and report the median performance. A comparison of this active learning strategy to those proposed by Balzano (2015, 2017) is provided in Peng and Pavlidis (2019).
When K is in the range [2, 5], WSSR (without any side information) produces perfect clustering results. In these scenarios, WSSR+ accommodates the label information for all values of p% without degrading accuracy on the rest of the data. This is not always the case for the competing methods, especially as K increases. The performance of the competing methods are considerably improved if the labelled points are chosen through the active learning strategy of Peng and Pavlidis (2019) compared to random sampling. The performance difference between the constrained version of WSSR+ and the other constrained clustering algorithms becomes more pronounced when K = 8, 10. Furthermore, the performance of the competing methods are not monotonically increasing as the proportion of labelled points increases.