On the Local Structure of Stable Clustering Instances

Vincent Cohen-Addad, Chris Schwiegelshohn

Introduction

Clustering is a fundamental, routinely-used approach to extract information from datasets. Given a dataset and the most important features of the data, a clustering is a partition of the data such that data elements in the same part have common features. The problem of computing a clustering has received a considerable amount of attention in both practice and theory.

The variety of contexts in which clustering problems arise makes the problem of computing a “good” clustering hard to define formally. From a theoretician’s perspective, clustering problems are often modeled by an objective function we wish to optimize (e.g., the famous kk-median or kk-means objective functions). This modeling step is both needed and crucial since it provides a framework to quantitatively compare algorithms. Unfortunately, the most popular objectives for clustering, like the kk-median and kk-means objectives, are hard to approximate, even when restricted to Euclidean spaces.

This view is generally not shared by practitioners. Indeed, clustering is often used as a preprocessing step to simplify and speed up subsequent analysis, even if this analysis admits polynomial time algorithms. If the clustering itself is of independent interest, there are many heuristics with good running times and results on real-world inputs.

This induces a gap between theory and practice. On the one hand, the algorithms that are efficient in practice cannot be proven to achieve good approximation to the kk-median and kk-means objectives in the worst-case. Since approximation ratios are one of the main methods to evaluate algorithms, theory predicts that determining a good clustering is a difficult task. On the other hand, the best theoretical algorithms turn out to be noncompetitive in applications because they are designed to handle “unrealistically” hard instances with little importance for practitioners. To bridge the gap between theory and practice, it is necessary to go beyond the worst-case analysis by, for example, characterizing and focusing on inputs that arise in practice.

Several approaches have been proposed to bridge the gap between theory and practice. For example, researchers have considered the average-case scenario (e.g., ) where the running time of an algorithm is analyzed with respect to some probability distribution over the set of all inputs. Smooth analysis (e.g., ) is another celebrated approach that analyzes the running time of an algorithm with respect to worst-case inputs subject to small random perturbations.

Another successful approach, the one we take in this paper, consists in focusing on structured inputs. In a seminal paper, Ostrovsky, Rabani, Schulman, and Swamy introduced the idea that inputs that come from practice induce a ground-truth or a meaningful clustering. They argued that an input II contains a meaningful clustering into kk clusters if the optimal kk-median cost of a clustering using kk centers, say OPTk(I)\text{OPT}_{k}(I), is much smaller than the optimal cost of a clustering using k−1k-1 centers OPTk−1(I)\text{OPT}_{k-1}(I). This is also motivated by the elbow methodThe elbow-method consists in running an (approximation) algorithm for an incrementally increasing number of clusters until the cost drops significantly. (see Section 7 for more details) used by practitioners to define the number of clusters. More formally, an instance II of kk-median or kk-means satisfies the α\alpha-ORSS property if OPTk(I)/OPTk−1(I)≤α\text{OPT}_{k}(I)/\text{OPT}_{k-1}(I)\leq\alpha.

α\alpha-ORSS inputs exhibit interesting properties. The popular kk-means++++ algorithm (also known as the D2D^{2}-sampling technique) achieves an O(1)O(1)-approximation for these inputs For worst-case inputs, the kk-means++++ achieves an O(log⁡k)O(\log k)-approximation ratio .. The condition is also robust with respect to noisy perturbations of the data set. ORSS-stability also implies several other conditions aiming to capture well-clusterable instances. Thus, the inputs satisfying the ORSS property arguably share some properties with the real-world inputs. In this paper, we also provide experimental results supporting this claim, see Appendix C.

These results have opened new research directions and raised several questions. For example:

Is it possible to obtain similar results for more general classes of inputs?

How does the parameter α\alpha impact the approximation guarantee and running time?

Is it possible to prove good performance guarantees for other popular heuristics?

How close to the “ground-truth” clustering are the approximate clusterings?

We now review the most relevant work in connection to the above open questions, see Sections 2 for other related work.

Awasthi, Blum and Sheffet have tackled the first two questions by introducing the notion of distribution stable instances. Distribution stable instances are a generalization of the ORSS instances (in other words, any instance satisfying the ORSS property is distribution stable). They also introduced a new algorithm tailored for distribution stable instances that achieves a (1+ε)(1+\varepsilon)-approximation for α\alpha-ORSS inputs (and more generally α\alpha-distribution stable instances) in time nO(1/εα)n^{O(1/\varepsilon\alpha)}. This was the first algorithm whose approximation guarantee was independent from the parameter α\alpha for α\alpha-ORSS inputs.

Spectral Separability (Def. 6.1)

Kumar and Kannan tackled the first and third questions by introducing the proximity condition In this paper, we work with a slightly more general condition called spectral separability but the motivations behind the two conditions are similar.. This condition also generalizes the ORSS condition. It is motivated by the goal of learning a distribution mixture in a dd-dimensional Euclidean space. Quoting , the message of their paper can loosely be stated as:

If the projection of any data point onto the line joining its cluster center to any other cluster center is γk\gamma k times standard deviations closer to its own center than the other center, then we can cluster correctly in polynomial time.

In addition, they have made a significant step toward understanding the success of the classic kk-means by showing that it achieves a 1+O(1/γ)1+O(1/\gamma)-approximation for instances that satisfy the proximity condition.

Perturbation Resilience (Def. 5.1)

In a seminal work, Bilu and Linial introduced a new condition to capture real-world instances. They argue that the optimal solution of a real-world instance is often much better than any other solution and so, a slight perturbation of the instance does not lead to a different optimal solution. Perturbation-resilient instances have been studied in various contexts (see e.g., ). For clustering problems, an instance is said to be α\alpha-perturbation resilient if an adversary can change the distances between pairs of elements by a factor at most α\alpha and the optimal solution remains the same. Recently, Angelidakis, Makarychev, and Makarychev have given a polynomial-time algorithm for solving 22-perturbation-resilient instancesWe note that it is NP-hard to recover the optimal clustering of a <2<2-perturbation-resilient instance . . Balcan and Liang have tackled the third question by showing that a classic algorithm for hierarchical clustering can solve 1+21+\sqrt{2}-perturbation-resilient instances. This very interesting result leaves open the question as whether classic algorithms for (“flat”) clustering could also be proven to be efficient for perturbation-resilient instances.

Main Open Questions

Previous work has made important steps toward bridging the gap between theory and practice for clustering problems. However, we still do not have a complete understanding of the properties of “well-structured” inputs, nor do we know why the algorithms used in practice perform so well. Some of the most important open questions are the following:

Do the different definitions of well-structured input have common properties?

Do heuristics used in practice have strong approximation ratios for well-structured inputs?

Do heuristics used in practice recover the “ground-truth” clustering on well-structured inputs?

2 Our Results: A unified approach via Local Search

We make a significant step toward answering the above open questions. We show that the classic Local Search heuristic (see Algorithm 1), that has found widespread application in practice (see Section 2), achieves good approximation guarantees for distribution-stable, spectrally-separable, and perturbation-resilient instances (see Theorems 4.2, 5.2, 6.2).

More concretely, we show that Local Search is a polynomial-time approximation scheme (PTAS) for both distribution-stable and spectrally-separableAssuming a standard preprocessing step consisting of a projection onto a subspace of lower dimension. instances. In the case of distribution stability, we also answer the above open question by showing that most of the structure of the optimal underlying clustering is recovered by the algorithm. Furthermore, our results hold even when only a δ\delta fraction (for any constant δ>0\delta>0) of the points of each optimal cluster satisfies the β\beta-distribution-stability property.

For γ\gamma-perturbation-resilient instances, we show that if γ>3\gamma>3 then any solution is the optimal solution if it cannot be improved by adding or removing 2γ2\gamma centers. We also show that the analysis is essentially tight.

These results show that well-structured inputs have the property that the local optima are close both qualitatively (in terms of structure) and quantitatively (in terms of objective value) to the global “ground-truth” optimum. These results make a significant step toward explaining the success of Local Search approaches for solving clustering problems in practice.

3 Organization of the Paper

Section 2 provides a more detailed review of previous work on worst-case approximation algorithms and Local Search. Further comments on stability conditions not covered in the introduction can be found in Section 7 at the end of the paper. Section 3 introduces preliminaries and notation. Section 4 is dedicated to distribution-stable instances, Section 5 to perturbation-resilient instances, and Section 6 to spectrally-separated instances. All the missing proofs can be found in the appendix.

Related Work

The problems we study are NP-hard: kk-median and kk-means are already NP-hard in the Euclidean plane (see Meggido and Supowit , Mahajan et al. , and Dasgupta and Freud ). In terms of hardness of approximation, both problems are APX-hard, even in the Euclidean setting when both kk and dd are part of the input (see Guha and Khuller , Jain et al. , Guruswami et al. , and Awasthi et al. ). On the positive side, constant factor approximations are known in metric space for both kk-median and kk-means (see ). For Euclidean spaces we have a PTAS for both problems, either assuming dd fixed and kk arbitrary , or assuming kk fixed and dd arbitrary .

Local Search

Local Search is an all-purpose heuristic that may be applied to any problem, see Aarts and Lenstra for a general introduction. For clustering, there exists a large body of bicriteria approximations for kk-median and kk-means . Arya et al. showed that Local Search with a neighborhood size of 1/ε1/\varepsilon gives a 3+2ε3+2\varepsilon approximation to kk-median, see also . Kanungo et al. proved an approximation ratio of 9+ε9+\varepsilon for kk-means clustering by Local Search, which was until very recently the best known algorithm with a polynomial running time in metric and Euclidean spaces.They combined Local Search with techniques from Matousek for kk-means clustering in Euclidean spaces. The running time of the algorithm as stated incurs an additional factor of ε−d\varepsilon^{-d} due to the use of Matousek’s approximate centroid set. Using standard techniques (see e.g. Section B of this paper), a fully polynomial running time in nn, dd, and kk is also possible without sacrificing approximation guarantees. Recently, Local Search with an appropriate neighborhood size was shown to be a PTAS for kk-means and kk-median in certain restricted metrics including constant dimensional Euclidean space . Due to its simplicity, Local Search is also a popular subroutine for clustering tasks in various more specialized computational models . For more theoretical clustering papers using Local Search, we refer to .

Local Search is also often used for clustering in more applied areas of computer science (e.g., ). Indeed, the use of Local Search with a neighborhood of size 11 for clustering was first proposed by Tüzün and Burke , see also Ghosh for a more efficient version of the same approach. Due the ease by which it may be implemented, Local Search has become one of the most commonly used heuristics for clustering and facility location, see Ardjmand . Nevertheless, high running times is one of the biggest drawbacks of Local Search compared to other approaches, though a number of papers have engineered it to become surprisingly competitive, see Frahling and Sohler , Kanungo et al. , and Sun .

Definitions and Notations

The problem we consider in this work is the following slightly more general version of the kk-means and kk-median problems.

The clustering of AA induced by SS is the partition of AA into subsets C={C1,…Ck}C=\{C_{1},\ldots C_{k}\} such that Ci={x∈A ∣ ci=argmin c∈Scost(x,c)}C_{i}=\{x\in A~{}|~{}c_{i}=\underset{c\in S}{\text{argmin }}\text{cost}(x,c)\} (breaking ties arbitrarily).

The well known kk-median and kk-means problems correspond to the special cases cost(a,c)=dist(a,c)\text{cost}(a,c)=\text{dist}(a,c) and cost(a,c)=dist(a,c)2\text{cost}(a,c)=\text{dist}(a,c)^{2} respectively. Throughout the rest of this paper, let OPT denote the value of an optimal solution. To give slightly simpler proofs for β\beta-distribution-stable and α\alpha-perturbation-resilient instances, we will assume that cost(a,b)=dist(a,b)\text{cost}(a,b)=\text{dist}(a,b). If cost(a,b)=dist(a,b)p\text{cost}(a,b)=\text{dist}(a,b)^{p}, then α\alpha depends exponentially on the pp for perturbation resilience. For distribution stability, we still have a PTAS by introducing a dependency in 1/εO(p)1/\varepsilon^{O(p)} in the neighborhood size of the algorithm. The analysis is unchanged save for various applications of the following lemma at different steps of the proof.

Let p≥0p\geq 0 and 1/2>ε>01/2>\varepsilon>0. For any a,b,c∈A∪Fa,b,c\in A\cup F, we have cost(a,b)≤(1+ε)pcost(a,c)+cost(c,b)(1+1/ε)p\text{cost}(a,b)\leq(1+\varepsilon)^{p}\text{cost}(a,c)+\text{cost}(c,b)(1+1/\varepsilon)^{p}.

Distribution Stability

We work with the notion of β,δ\beta,\delta-distribution stability which generalizes β\beta-distribution stability. This extends our result to datasets that exhibit a slightly weaker structure than the β\beta-distribution stability. Namely, the β,δ\beta,\delta-distribution stability only requires that for each cluster of the optimal solution, most of the points satisfy the β\beta-distribution stability condition.

Let (A,F,cost,k)(A,F,\text{cost},k) be an instance of kk-clustering where A∪FA\cup F lie in a metric space and let S∗={c1∗,…,ck∗}⊆FS^{*}=\{c^{*}_{1},\ldots,c^{*}_{k}\}\subseteq F be a set of centers and C∗={C1∗,…,Ck∗}C^{*}=\{C^{*}_{1},\ldots,C^{*}_{k}\} be the clustering induced by S∗S^{*}. Further, let β>0\beta>0 and 0≤δ≤10\leq\delta\leq 1. Then the pair (A,F,cost,k),(C∗,S∗)(A,F,\text{cost},k),(C^{*},S^{*}) is a (β,δ)(\beta,\delta)-distribution stable instance if, for any ii, there exists a set Δi⊆Ci∗\Delta_{i}\subseteq C^{*}_{i} such that ∣Δi∣≥(1−δ)∣Ci∗∣|\Delta_{i}|\geq(1-\delta)|C^{*}_{i}| and for any x∈Δix\in\Delta_{i}, for any j≠ij\neq i,

where cost(x,cj∗)\text{cost}(x,c^{*}_{j}) is the cost of assigning xx to cj∗c^{*}_{j}.

For any instance (A,F,cost,k)(A,F,\text{cost},k) that is (β,δ)(\beta,\delta)-distribution stable, we refer to (C∗,S∗)(C^{*},S^{*}) as a (β,δ)(\beta,\delta)-clustering of the instance. We show the following theorem for the kk-median problem. For the kk-clustering problem with parameter pp, the constant η\eta becomes a function of pp.

Let p>0p>0, β>0\beta>0, and ε<min⁡(1−δ,1/3)\varepsilon<\min(1-\delta,1/3). For a (β,δ)(\beta,\delta)-stable instance with (β,δ)(\beta,\delta) clustering (C∗,S∗)(C^{*},S^{*}) and an absolute constant η\eta, the cost of the solution output by Local Search(4ε−3β−1+O(ε−2β−1))(4\varepsilon^{-3}\beta^{-1}+O(\varepsilon^{-2}\beta^{-1})) (Algorithm 1) is at most (1+ηε)cost(C∗)(1+\eta\varepsilon)\text{cost}(C^{*}).

Moreover, let L={L1,…,Lk}L=\{L_{1},\ldots,L_{k}\} denote the clusters of the solution output by Local Search(4ε−3β−1+O(ε−2β−1))(4\varepsilon^{-3}\beta^{-1}+O(\varepsilon^{-2}\beta^{-1})). If δ=0\delta=0 (i.e.: the instance is simply β\beta-distribution-stable), there exists a bijection ϕ:L↦C∗\phi:L\mapsto C^{*} such that for at least m=k−O(ε−3β−1)m=k-O(\varepsilon^{-3}\beta^{-1}) clusters L1′,…,Lm′⊆LL^{\prime}_{1},\ldots,L^{\prime}_{m}\subseteq L, the following two statements hold.

At least a (1−ε)(1-\varepsilon) fraction of IRiε2∩Ci∗\text{IR}^{\varepsilon^{2}}_{i}\cap C^{*}_{i} are served by a unique center L(i)\mathcal{L}(i) in solution L\mathcal{L}.

The total number of clients p∈⋃j≠iCj∗p\in\bigcup_{j\neq i}C^{*}_{j} served by L(i)\mathcal{L}(i) in L\mathcal{L} is at most ε∣IRiε2∩Ci∗∣\varepsilon|\text{IR}^{\varepsilon^{2}}_{i}\cap C^{*}_{i}|.

We first give a high-level description of the analysis. Assume for simplicity that all the optimal clusters cost less than an ε3\varepsilon^{3} fraction of the total cost of the optimal solution. Combining this assumption with the β\beta-distribution-stability property, one can show that the centers and points close to the center are far away from each other. Thus, guided by the objective function, the local search algorithm identifies most of these centers. In addition, we can show that for most of these good centers the corresponding cluster in the local solution is very similar to the optimal cluster (see Figure 1). In total, only very few clusters (a function of ε\varepsilon and β\beta) of the optimal solution are not present in the local solution. We conclude our proof by using local optimality. Our proof includes a few ingredients from such as the notion of inner-ring (we work with a slightly more general definition) and distinguishes between cheap and expensive clusters. Nevertheless our analysis is slightly stronger as we consider a significantly weaker stability condition and can not only analyze the cost of the solution of the algorithm, but also the structure of its clusters.

For any ε0\varepsilon_{0}, we define the inner ring of cluster ii, IRiε0\text{IR}^{\varepsilon_{0}}_{i}, as the set of x∈A∪Fx\in A\cup F such that dist(x,ci∗)≤ε0βOPT/∣Ci∗∣\text{dist}(x,c^{*}_{i})\leq\varepsilon_{0}\beta{\text{OPT}}/{|C^{*}_{i}|}.

We say that cluster ii is cheap if ∑x∈Ci∗gx≤ε3βOPT\sum_{x\in C^{*}_{i}}g_{x}\leq\varepsilon^{3}\beta\text{OPT}, and expensive otherwise. We aim at proving the following structural lemma.

There exists a set of clusters Z∗⊆C∗Z^{*}\subseteq C^{*} of size at most 2ε−3β−1+O(ε−2β−1)2\varepsilon^{-3}\beta^{-1}+O(\varepsilon^{-2}\beta^{-1}) such that for any cluster Ci∗∈C∗−Z∗C^{*}_{i}\in C^{*}-Z^{*}, we have the following properties

At least a (1−ε)(1-\varepsilon) fraction of IRiε2∩Ci∗\text{IR}^{\varepsilon^{2}}_{i}\cap C^{*}_{i} are served by a unique center L(i)\mathcal{L}(i) in solution L\mathcal{L}.

The total number of clients p∈⋃j≠iΔjp\in\bigcup_{j\neq i}\Delta_{j} served by L(i)\mathcal{L}(i) in L\mathcal{L} is at most ε∣IRiε2∩Ci∗∣\varepsilon|\text{IR}^{\varepsilon^{2}}_{i}\cap C^{*}_{i}|.

See Fig 1 for a typical cluster of C∗−Z∗C^{*}-Z^{*}. We start with the following lemma which generalizes Fact 4.1 in .

Let Ci∗C^{*}_{i} be a cheap cluster. For any ε0\varepsilon_{0}, we have ∣IRiε0∩Ci∗∣>(1−ε3/ε0)∣Ci∗∣|\text{IR}^{\varepsilon_{0}}_{i}\cap C_{i}^{*}|>(1-{\varepsilon^{3}}/{\varepsilon_{0}})|C^{*}_{i}|.

We then prove that the inner rings of cheap clusters are disjoint for δ+ε3ε0<1\delta+\frac{\varepsilon^{3}}{\varepsilon_{0}}<1 and ε0<13\varepsilon_{0}<\frac{1}{3}.

Let δ+ε3ε0<1\delta+\frac{\varepsilon^{3}}{\varepsilon_{0}}<1 and ε0<13\varepsilon_{0}<\frac{1}{3}. If Ci∗≠Cj∗C^{*}_{i}\neq C^{*}_{j} are cheap clusters, then IRiε0∩IRjε0=∅\text{IR}^{\varepsilon_{0}}_{i}\cap\text{IR}^{\varepsilon_{0}}_{j}=\emptyset.

For each cheap cluster Ci∗C^{*}_{i}, let L(i)\mathcal{L}(i) denote a center of L\mathcal{L} that belongs to IRiε\text{IR}^{\varepsilon}_{i} if there exists exactly such center and remain undefined otherwise. By Lemma 4.6, L(i)≠L(j)\mathcal{L}(i)\neq\mathcal{L}(j) for i≠ji\neq j.

Let ε<13\varepsilon<\frac{1}{3}. Let C∗−Z1C^{*}-Z_{1} denote the set of clusters Ci∗C^{*}_{i} that are cheap, such that L(i)\mathcal{L}(i) is defined and such that at least (1−ε)∣IRiε2∩Ci∗∣(1-\varepsilon)|\text{IR}^{\varepsilon^{2}}_{i}\cap C_{i}^{*}| clients of IRiε2∩Ci∗\text{IR}^{\varepsilon^{2}}_{i}\cap C_{i}^{*} are served in L\mathcal{L} by L(i)\mathcal{L}(i). Then ∣Z1∣≤(2ε−3+11.25⋅ε−2+22.5⋅ε−1)β−1|Z_{1}|\leq(2\varepsilon^{-3}+11.25\cdot\varepsilon^{-2}+22.5\cdot\varepsilon^{-1})\beta^{-1}.

There are five different types of clusters in C∗C^{*}:

k2k_{2} cheap clusters with no center of L\mathcal{L} belonging to IRiε\text{IR}^{\varepsilon}_{i}

k3k_{3} cheap clusters with at least two centers of L\mathcal{L} belonging to IRiε\text{IR}^{\varepsilon}_{i}

k4k_{4} cheap clusters with L(i)\mathcal{L}(i) being defined and less than (1−ε)∣IRiε2∩Ci∗∣(1-\varepsilon)|\text{IR}^{\varepsilon^{2}}_{i}\cap C_{i}^{*}| clients of IRiε2∩Ci∗\text{IR}^{\varepsilon^{2}}_{i}\cap C_{i}^{*} are served in L\mathcal{L} by L(i)\mathcal{L}(i)

k5k_{5} cheap clusters with L(i)\mathcal{L}(i) being defined and at least (1−ε)∣IRiε2∩Ci∗∣(1-\varepsilon)|\text{IR}^{\varepsilon^{2}}_{i}\cap C_{i}^{*}| clients of IRiε2∩Ci∗\text{IR}^{\varepsilon^{2}}_{i}\cap C_{i}^{*} are served in L\mathcal{L} by L(i)\mathcal{L}(i)

The definition of cheap clusters immediately yields k1≤ε−3β−1k_{1}\leq\varepsilon^{-3}\beta^{-1}.

Since L\mathcal{L} and C∗C^{*} both have kk clusters and the inner rings of cheap clusters are disjoint (Lemma 4.6), we have c1k1+c3k3+k4+k5=k1+k2+k3+k4+k5=∣Z1∣+k5=kc_{1}k_{1}+c_{3}k_{3}+k_{4}+k_{5}=k_{1}+k_{2}+k_{3}+k_{4}+k_{5}=|Z_{1}|+k_{5}=k with c1≥0c_{1}\geq 0 and c3≥2c_{3}\geq 2 resulting in k3≤(c3−1)k3=(1−c1)k1+k2≤k1+k2k_{3}\leq(c_{3}-1)k_{3}=(1-c_{1})k_{1}+k_{2}\leq k_{1}+k_{2}.

Before bounding k2k_{2} and k4k_{4}, we discuss the impact of a cheap cluster Ci∗C^{*}_{i} with at least a pp fraction of the clients of IRiε2∩Ci∗\text{IR}^{\varepsilon^{2}}_{i}\cap C_{i}^{*} being served in L\mathcal{L} by some centers that are not in IRiε\text{IR}^{\varepsilon}_{i}. By the triangular inequality, the cost for any client xx of this pp fraction is at least (ε−ε2)βcost(C∗)/∣Ci∗∣(\varepsilon-\varepsilon^{2})\beta\text{cost}(C^{*})/|C^{*}_{i}|. Then the total cost of all clients of this pp fraction in L\mathcal{L} is at least p∣IRiε2∩Ci∗∣(1−ε)εβcost(C∗)/∣Ci∗∣p|\text{IR}^{\varepsilon^{2}}_{i}\cap C_{i}^{*}|(1-\varepsilon)\varepsilon\beta\text{cost}(C^{*})/|C^{*}_{i}|. By Lemma 4.5, substituting ∣IRiε2∩Ci∗∣|\text{IR}^{\varepsilon^{2}}_{i}\cap C^{*}_{i}| yields for this total cost

To determine k2k_{2}, we must use p=1p=1 while we have p>εp>\varepsilon for k4k_{4}. Therefore, the total costs of all clients of the k2k_{2} and the k4k_{4} clusters in L\mathcal{L} are at least k2(1−ε)2εβcost(C∗)k_{2}(1-\varepsilon)^{2}\varepsilon\beta\text{cost}(C^{*}) and k4(1−ε)2ε2βcost(C∗)k_{4}(1-\varepsilon)^{2}\varepsilon^{2}\beta\text{cost}(C^{*}), respectively.

Now, since cost(L)≤5OPT≤5cost(C∗)\text{cost}(\mathcal{L})\leq 5\text{OPT}\leq 5\text{cost}(C^{*}), we have (k2+k4ε)εβ≤5/(1−ε)2≤45/4(k_{2}+k_{4}\varepsilon)\varepsilon\beta\leq 5/(1-\varepsilon)^{2}\leq 45/4.

Therefore, we have ∣Z1∣=k1+k2+k3+k4≤2k1+2k2+k4≤(2ε−3+11.25⋅ε−2+22.5⋅ε−1)β−1|Z_{1}|=k_{1}+k_{2}+k_{3}+k_{4}\leq 2k_{1}+2k_{2}+k_{4}\leq(2\varepsilon^{-3}+11.25\cdot\varepsilon^{-2}+22.5\cdot\varepsilon^{-1})\beta^{-1}. ∎

We continue with the following lemma, whose proof relies on similar arguments.

There exists a set Z2⊆C∗−Z1Z_{2}\subseteq C^{*}-Z_{1} of size at most 11.25ε−1β−111.25\varepsilon^{-1}\beta^{-1} such that for any cluster Cj∗∈C∗−Z2C^{*}_{j}\in C^{*}-Z_{2}, the total number of clients x∈⋃i≠jΔix\in\bigcup_{i\neq j}\Delta_{i}, that are served by L(j)\mathcal{L}(j) in L\mathcal{L} is at most ε∣IRiε2∩Ci∗∣\varepsilon|\text{IR}^{\varepsilon^{2}}_{i}\cap C_{i}^{*}|.

Therefore, the proof of Lemma 4.4 follows from combining Lemmas 4.7 and 4.8.

We now turn to the analysis of the cost of L\mathcal{L}. Let C(Z∗)=⋃Ci∗∈Z∗Ci∗C(Z^{*})=\bigcup_{C^{*}_{i}\in Z^{*}}C^{*}_{i}. For any cluster Ci∗∈C∗−Z∗C^{*}_{i}\in C^{*}-Z^{*}, let L(i)\mathcal{L}(i) be the unique center of L\mathcal{L} that serves at least (1−ε)∣IRiε2∩Ci∗∣>(1−ε)2∣Ci∣(1-\varepsilon)|\text{IR}^{\varepsilon^{2}}_{i}\cap C_{i}^{*}|>(1-\varepsilon)^{2}|C_{i}| clients of IRiε2∩Ci∗\text{IR}^{\varepsilon^{2}}_{i}\cap C^{*}_{i}, see Lemmas 4.4 and 4.5. Let L^=⋃Ci∗∈C∗−Z∗L(i)\widehat{\mathcal{L}}=\bigcup_{C^{*}_{i}\in C^{*}-Z^{*}}\mathcal{L}(i) and define A^\widehat{A} to be the set of clients that are served in solution L\mathcal{L} by centers of L^\widehat{\mathcal{L}}. Finally, let A(L(i))A(\mathcal{L}(i)) be the set of clients that are served by L(i)\mathcal{L}(i) in solution L\mathcal{L}. Observe that the A(L(i))A(\mathcal{L}(i)) partition A^\widehat{A}.

Consider the following mixed solution M=L^∪{ci∗ ∣ Ci∗∈Z∗}\mathcal{M}=\widehat{\mathcal{L}}\cup\{c_{i}^{*}~{}|~{}C_{i}^{*}\in Z^{*}\}. We start by bounding the cost of M\mathcal{M}. For any client x∈A^x\in\widehat{A}, the center that serves it in L\mathcal{L} belongs to M\mathcal{M}. Thus its cost in M\mathcal{M} is at most lxl_{x}. Now, for any client x∈C(Z∗)x\in C(Z^{*}), the center that serves it in C∗C^{*} is in M\mathcal{M}, so its cost in M\mathcal{M} is at most gxg_{x}.

Finally, we evaluate the cost of the clients in A−(A^∪C(Z∗))A-(\widehat{A}\cup C(Z^{*})). Consider such a client xx and let Ci∗C^{*}_{i} be the cluster it belongs to in solution C∗C^{*}. Since Ci∗∈C∗−Z∗C^{*}_{i}\in C^{*}-Z^{*}, L(i)\mathcal{L}(i) is defined and we have L(i)∈L^⊆M\mathcal{L}(i)\in\widehat{\mathcal{L}}\subseteq\mathcal{M}. Hence, the cost of xx in M\mathcal{M} is at most cost(x,L(i))\text{cost}(x,\mathcal{L}(i)). Observe that by the triangular inequality, cost(x,L(i))≤cost(x,ci∗)+cost(ci∗,L(i))=gx+cost(ci∗,L(i))\text{cost}(x,\mathcal{L}(i))\leq\text{cost}(x,c^{*}_{i})+\text{cost}(c^{*}_{i},\mathcal{L}(i))=g_{x}+\text{cost}(c^{*}_{i},\mathcal{L}(i)).

Now consider a client x′∈IRiε2∩Ci∗∩A(L(i))x^{\prime}\in\text{IR}_{i}^{\varepsilon^{2}}\cap C^{*}_{i}\cap A(\mathcal{L}(i)). By the triangular inequality, we have cost(ci∗,L(i))≤cost(ci∗,x′)+cost(x′,L(i))=gx′+lx′\text{cost}(c^{*}_{i},\mathcal{L}(i))\leq\text{cost}(c^{*}_{i},x^{\prime})+\text{cost}(x^{\prime},\mathcal{L}(i))=g_{x^{\prime}}+l_{x^{\prime}}. Hence,

It follows that assigning the clients of Ci∗∩(A−A^)C^{*}_{i}\cap(A-\widehat{A}) to L(i)\mathcal{L}(i) induces a cost of at most

Due to Lemma 4.4, we have ∣IRiε2∩Ci∗∩A(L(i))∣≥(1−ε)⋅∣IRiε2∩Ci∗∣|\text{IR}_{i}^{\varepsilon^{2}}\cap C^{*}_{i}\cap A(\mathcal{L}(i))|\geq(1-\varepsilon)\cdot|\text{IR}_{i}^{\varepsilon^{2}}\cap C^{*}_{i}| and ∣(IRiε2∩Ci∗)∩(A−A^)∣≤ε⋅∣IRiε2∩Ci∗∣|(\text{IR}_{i}^{\varepsilon^{2}}\cap C_{i}^{*})\cap(A-\widehat{A})|\leq\varepsilon\cdot|\text{IR}_{i}^{\varepsilon^{2}}\cap C_{i}^{*}|. Further, ∣(Ci∗−IRiε2)∩(A−A^)∣≤∣(Ci∗−IRiε2)∣=∣Ci∗∣−∣IRiε2∩Ci∗∣|(C_{i}^{*}-\text{IR}_{i}^{\varepsilon^{2}})\cap(A-\widehat{A})|\leq|(C_{i}^{*}-\text{IR}_{i}^{\varepsilon^{2}})|=|C^{*}_{i}|-|\text{IR}_{i}^{\varepsilon^{2}}\cap C^{*}_{i}|. Combining these three bounds, we have

where the inequality in (1) follows from Lemma 4.5.

Summing over all clusters Ci∗∈C∗−Z∗C^{*}_{i}\in C^{*}-Z^{*}, we obtain that the cost in M\mathcal{M} for the clients in (A−A^)∩Ci∗(A-\widehat{A})\cap C^{*}_{i} is less than

By Lemmas 4.7 and 4.8, we have ∣M−L∣+∣L−M∣=2⋅∣Z∗∣≤(4ε−3+O(ε−2))β−1|\mathcal{M}-\mathcal{L}|+|\mathcal{L}-\mathcal{M}|=2\cdot|Z^{*}|\leq(4\varepsilon^{-3}+O(\varepsilon^{-2}))\beta^{-1}. By selecting the neighborhood size of Local Search (Algorithm 1) to be greater than this value, we have (1−ε/n)⋅cost(L)≤cost(M)(1-\varepsilon/n)\cdot\text{cost}(\mathcal{L})\leq\text{cost}(\mathcal{M}). Therefore, combining the above observations, we have

By simple transformations, we then obtain

We now turn to evaluate the cost for the clients that are in A^−C(Z∗)\widehat{A}-C(Z^{*}). For any cluster Ci∗∈C∗−C(Z∗)C^{*}_{i}\in C^{*}-C(Z^{*}) and for any x∈Ci∗−A(L(i))x\in C^{*}_{i}-A(\mathcal{L}(i)) define Reassign(x)\text{Reassign}(x) to be the cost of xx with respect to the center in L(i)\mathcal{L}(i). Note that there exists only one center of L\mathcal{L} in IRiεIR^{\varepsilon}_{i} for any cluster Ci∗∈C∗−C(Z∗)C^{*}_{i}\in C^{*}-C(Z^{*}). Before going deeper in the analysis, we need the following lemma.

For any Ci∗∈C∗−C(Z∗)C^{*}_{i}\in C^{*}-C(Z^{*}), we have

We now partition the clients of cluster Ci∗∈C∗−Z∗C^{*}_{i}\in C^{*}-Z^{*}. For any ii, let BiB_{i} be the set of clients of Ci∗C^{*}_{i} that are served in solution L\mathcal{L} by a center L(j)\mathcal{L}(j) for some j≠ij\neq i and Cj∗∈C∗−Z∗C^{*}_{j}\in C^{*}-Z^{*}. Moreover, let Di=(A(L(i))∩(⋃j≠iBj))D_{i}=(A(\mathcal{L}(i))\cap(\bigcup_{j\neq i}B_{j})). Finally, define Ei=(Ci∗∩A^)−⋃j≠iDjE_{i}=(C^{*}_{i}\cap\widehat{A})-\bigcup_{j\neq i}D_{j}.

Let Ci∗C^{*}_{i} be a cluster in C∗−Z∗C^{*}-Z^{*}. Define the solution Mi=L−{L(i)}∪{ci∗}\mathcal{M}^{i}=\mathcal{L}-\{\mathcal{L}(i)\}\cup\{c^{*}_{i}\} and denote by mxim^{i}_{x} the cost of client xx in solution Mi\mathcal{M}^{i}. Then

We can thus prove the following lemma, which concludes the proof.

The proof of Theorem 4.2 follows from (1) summing the equations from Lemmas 4.9 and 4.12 and (2) Lemma 4.4. The comparison of the structure of the local solution to the structure of C∗C^{*} is an immediate corollary of Lemma 4.4.

Perturbation Resilience

We first give the definition of α\alpha-perturbation-resilient instances.

Let I=(A,F,cost,k)I=(A,F,\text{cost},k) be an instance for the kk-clustering problem. For α≥1\alpha\geq 1, II is α\alpha-perturbation-resilient if there exists a unique optimal set of centers C∗={c1∗,…,ck∗}C^{*}=\{c^{*}_{1},\ldots,c^{*}_{k}\} and for any instance I′=(A,F,cost′,k,p)I^{\prime}=(A,F,\text{cost}^{\prime},k,p), such that

the unique optimal set of centers is C∗={c1∗,…,ck∗}C^{*}=\{c^{*}_{1},\ldots,c^{*}_{k}\}.

For ease of exposition, we assume that cost(a,b)=dist(a,b)\text{cost}(a,b)=\text{dist}(a,b) (i.e., we work with the kk-median problem). Given solution S0S_{0}, we say that S0S_{0} is 1/ε1/\varepsilon-locally optimal if any solution S1S_{1} such that ∣S0−S1∣+∣S1−S0∣≤2/ε|S_{0}-S_{1}|+|S_{1}-S_{0}|\leq 2/\varepsilon has at least cost(S0)\text{cost}(S_{0}).

Let α>3\alpha>3. For any instance of the kk-median problem that is α\alpha-perturbation-resilient, any 2(α−3)−12(\alpha-3)^{-1}-locally optimal solution is the optimal set of centers {c1∗,…,ck∗}\{c^{*}_{1},\ldots,c^{*}_{k}\}.

Moreover, define lcl_{c} to be the cost for client cc in solution L\mathcal{L} and gcg_{c} to be its cost in the optimal solution C∗C^{*}. Finally, for any sets of centers SS and S0⊂SS_{0}\subset S, define NS(S0)N_{S}(S_{0}) to be the set of clients served by a center of S0S_{0} in solution SS, i.e.: NS(S0)={x∣∃s∈S0,dist(x,s)=min⁡s′∈Sdist(x,s′)}N_{S}(S_{0})=\{x\mid\exists s\in S_{0},\text{dist}(x,s)=\min_{s^{\prime}\in S}\text{dist}(x,s^{\prime})\}.

The proof of Theorem 5.2 relies on the following theorem of particular interest.

We first show how Theorem 5.3 allows us to prove Theorem 5.2.

On the other hand, the cost of L\mathcal{L} in I′I^{\prime} is the same as in II. By Theorem 5.3

Thus the cost of L\mathcal{L} in I′I^{\prime} is at most

Therefore, we have that the cost of L\mathcal{L} is at most the cost of C∗C^{*} in I′I^{\prime} and so by definition of α\alpha-perturbation-resilience, we have that the clustering {c1∗,…,ck∗}\{c^{*}_{1},\ldots,c^{*}_{k}\} is the unique optimal solution in I′I^{\prime}. Therefore L=C∗\mathcal{L}=C^{*} and the Theorem follows. ∎

For any client cc, Reassignc≤lc+2gc\text{Reassign}_{c}\leq l_{c}+2g_{c}.

The following lemma follows from the definition of the pairs.

Now, observe that the solution MM differs from L\mathcal{L} by at most 2/ε2/\varepsilon centers. Thus, by 1/ε1/\varepsilon-local optimality we have cost(L)≤cost(M)\text{cost}(\mathcal{L})\leq\text{cost}(M). Summing over all clients and simplifying, we obtain

The lemma follows by combining with Lemma 5.4. ∎

We now analyze the cost of the clients served by a center of L\mathcal{L} that has degree greater than ε−1\varepsilon^{-1} in Γ\Gamma. The argument is very similar.

Thus, summing over all clients cc, we have by local optimality

By Lemma 5.4, combining Equations 5 and 3 and averaging over all centers of L^\hat{L} we have

We now sum the equations of Lemmas 5.6 and 5.7 over all pairs and obtain

Additionally, we show that the analysis is tight (up to a (1+ε)(1+\varepsilon) factor):

For any ε>0\varepsilon>0, there exists an infinite family of 3−ε3-\varepsilon-perturbation-resilient instances such that for any constant ε>0\varepsilon>0, there exists a locally optimal solution that has cost at least 3OPT3\text{OPT}.

What remains to be shown is that LL is locally optimal. Assume that we swap out ss centers. Due to symmetry, we can consider the solution {Oi∣i∈[s]}∪{Li∣i∈[k]−[s]}\{O_{i}|i\in[s]\}\cup\{L_{i}|i\in[k]-[s]\}. Each of centers {Oi∣i∈[s]}\{O_{i}|i\in[s]\} serve kk clients with a cost of k⋅s⋅(1+ε/3)k\cdot s\cdot(1+\varepsilon/3). The remaining clients are served by {Li∣i∈[k]−[s]}\{L_{i}|i\in[k]-[s]\}, as 5+2ε/3<7+ε/35+2\varepsilon/3<7+\varepsilon/3. The cost amounts to s⋅(k−s)⋅5+2ε/3s\cdot(k-s)\cdot 5+2\varepsilon/3 for the clients that get reassigned and (k−s)2⋅3(k-s)^{2}\cdot 3 for the remaining clients. Combining these three figures gives us a cost of k2⋅3+ksε−s2⋅(2+2ε/3)>k2⋅3+ksε+s2⋅3k^{2}\cdot 3+ks\varepsilon-s^{2}\cdot(2+2\varepsilon/3)>k^{2}\cdot 3+ks\varepsilon+s^{2}\cdot 3. For k>3sεk>\frac{3s}{\varepsilon}, this is greater than k23k^{2}3, the cost of LL. ∎

Spectral Separability

In this section we will study the spectral separability condition for the Euclidean kk-means problem.

Nowadays, a standard preprocessing step in Euclidean kk-means clustering is to project onto the subspace spanned by the rank kk-approximation. Indeed, this is the first step of the algorithm by Kumar and Kannan (see Algorithm 2).

In general, projecting onto the best rank kk subspace and computing a constant approximation on the projection results in a constant approximation in the original space. Kumar and Kannan and later Awasthi and Sheffet gave tighter bounds if the spectral separation is large enough. Our algorithm omits steps 3 and 4. Instead, we project onto slightly more dimensions and subsequently use Local Search as the constant factor approximation in step 2. To utilize Local Search, we further require a candidate set of solutions, which is described in Section B. For pseudocode, we refer to Algorithm 3. Our main result is to show that, given spectral separability, this algorithm is PTAS for kk-means (Theorem 6.2).

The best rank kk approximation min⁡rank(X)=k∣∣A−X∣∣F\underset{\text{rank}(X)=k}{\min}||A-X||_{F} is given via Ak=UkΣVT=UΣkVT=UΣVkTA_{k}=U_{k}\Sigma V^{T}=U\Sigma_{k}V^{T}=U\Sigma V_{k}^{T}, where UkU_{k}, Σk\Sigma_{k} and VkTV_{k}^{T} consist of the first kk columns of UU, Σ\Sigma and VTV^{T}, respectively, and are zero otherwise. The best rank kk approximation also minimizes the spectral norm, that is ∣∣A−Ak∣∣2=σk+1||A-A_{k}||_{2}=\sigma_{k+1} is minimal among all matrices of rank kk. The following fact is well known throughout kk-means literature and will be used frequently throughout this section.

Let AA be a set of points in Euclidean space and denote by c(A)=1∣A∣∑x∈Axc(A)=\frac{1}{|A|}\sum_{x\in A}x the centroid of AA. Then the 11-means cost of any candidate center cc can be decomposed via

We first restate the separation condition.

Let AA be a set of points and let {C1,…Ck}\{C_{1},\ldots C_{k}\} be a clustering of AA with centers {c1,…ck}\{c_{1},\ldots c_{k}\}. Denote by CC an n×dn\times d matrix such that Ci=argmin j∈{1,…,k}∣∣Ai−cj∣∣2C_{i}=\underset{j\in\{1,\ldots,k\}}{\text{argmin }}||A_{i}-c_{j}||^{2}. Then {C1,…Ck}\{C_{1},\ldots C_{k}\} is γ\gamma spectrally separated, if for any pair of centers cic_{i} and cjc_{j} the following condition holds:

The following crucial lemma relates spectral separation and distribution stability.

For a point set AA, let C={C1,…,Ck}C=\{C_{1},\ldots,C_{k}\} be an optimal clustering with centers S={c1,…,ck}S=\{c_{1},\ldots,c_{k}\} associated clustering matrix XX that is at least γ⋅k\gamma\cdot\sqrt{k} spectrally separated, where γ>3\gamma>3. For ε>0\varepsilon>0, let AmA_{m} be the best rank m=k/εm=k/\varepsilon approximation of AA. Then there exists a clustering K={C1′,…C2′}K=\{C_{1}^{\prime},\ldots C_{2}^{\prime}\} and a set of centers SkS_{k}, such that

the cost of clustering AmA_{m} with centers SkS_{k} via the assignment of KK is less than ∣∣Am−XXTAm∣∣F2||A_{m}-XX^{T}A_{m}||_{F}^{2} and

(K,Sk)(K,S_{k}) is Ω((γ−3)2⋅ε)\Omega((\gamma-3)^{2}\cdot\varepsilon)-distribution stable.

We note that this lemma would also allow us to use the PTAS of Awasthi et al. . Before giving the proof, we outline how Lemma 6.5 helps us prove Theorem 6.2. We first notice that if the rank of AA is of order kk, then elementary bounds on matrix norm show that spectral separability implies distribution stability. We aim to combine this observation with the following theorem due to Cohen et al. . Informally, it states that for every rank kk approximation, (an in particular for every constrained rank kk approximation such as kk-means clustering), projecting to the best rank k/εk/\varepsilon subspace is cost-preserving.

The combination of the low rank case and this theorem is not trivial as points may be closer to a wrong center after projecting, see also Figure 2. Lemma 6.5 determines the existence of a clustering whose cost for the projected points AmA_{m} is at most the cost of C∗C^{*}. Moreover, this clustering has constant distribution stability as well which, combined with the results from Section B, allows us to use Local Search. Given that we can find a clustering with cost at most (1+ε)⋅∣∣Am−XXTAm∣∣F2(1+\varepsilon)\cdot||A_{m}-XX^{T}A_{m}||_{F}^{2}, Theorem 6.6 implies that we will have a (1+ε)2(1+\varepsilon)^{2}-approximation overall.

To prove the lemma, we will require the following steps:

A lower bound on the distance of the projected centers ∣∣ciVmVmT−cjVmVmT∣∣≈∣∣ci−cj∣∣||c_{i}V_{m}V_{m}^{T}-c_{j}V_{m}V_{m}^{T}||\approx||c_{i}-c_{j}||.

Find a clustering KK with centers Sm∗={c1VmVmT,…,ck∗VmVmT}S_{m}^{*}=\{c_{1}V_{m}V_{m}^{T},\ldots,c_{k}^{*}V_{m}V_{m}^{T}\} of AmA_{m} with cost less than ∣∣Am−XXTAm∣∣F2||A_{m}-XX^{T}A_{m}||_{F}^{2}.

Show that in a well-defined sense, KK and C∗C^{*} agree on a large fraction of points.

For any point x∈Kix\in K_{i}, show that the distance of xx to any center not associated with KiK_{i} is large.

For a point set AA, let C={C1,…Ck}C=\{C_{1},\ldots C_{k}\} be a clustering with associated clustering matrix XX and let A′A^{\prime} and A′′A^{\prime\prime} be optimal low rank approximations where without loss of generality k≤rank(A′)<rank(A′′)k\leq\text{rank}(A^{\prime})<\text{rank}(A^{\prime\prime}). Then for each cluster CiC_{i}

By Fact 6.3 ∣Ci∣⋅∣∣1∣Ci∣∑j∈Ci(Ai′′−Ai′)∣∣22|C_{i}|\cdot||\frac{1}{|C_{i}|}\sum_{j\in C_{i}}(A_{i}^{\prime\prime}-A_{i}^{\prime})||_{2}^{2} is, for a set of point indexes CiC_{i}, the cost of moving the centroid of the cluster computed on A′′A^{\prime\prime} to the centroid of the cluster computed on A′A^{\prime}. For a clustering matrix XX, ∣∣XXTA′−XXTA′∣∣F2||XX^{T}A^{\prime}-XX^{T}A^{\prime}||_{F}^{2} is the sum of squared distances of moving the centroids computed on the point set A′′A^{\prime\prime} to the centroids computed on A′A^{\prime}. We then have

For any point pp associated with some row of AA, let pm=pVmVmTp^{m}=pV_{m}V_{m}^{T} be the corresponding row in AmA_{m}. Similarly, for some cluster CiC_{i}, denote the center in AA by cic_{i} and the center in AmA_{m} by cimc_{i}^{m}. Extend these notion analogously for projections pkp^{k} and cikc_{i}^{k} to the span of the best rank kk approximation AkA_{k}.

where the second inequality follows from Lemma 6.7.

In the following, let Δi=k∣Ci∣∣∣A−XXTA∣∣2\Delta_{i}=\frac{\sqrt{k}}{\sqrt{|C_{i}|}}||A-XX^{T}A||_{2}. We will now construct our target clustering KK. Note that we require this clustering (and its properties) only for the analysis. We distinguish between the following three cases.

These points remain assigned to cimc_{i}^{m}. The distance between pmp_{m} and a different center cjmc_{j}^{m} is at least 12∣∣cim−cjm∣∣≥γ−12ε(Δi+Δj)\frac{1}{2}||c_{i}^{m}-c_{j}^{m}||\geq\frac{\gamma-1}{2}\varepsilon(\Delta_{i}+\Delta_{j}) due to Equation 5.

These points will get reassigned to their closest center.

The distance between pmp_{m} and a different center cjmc_{j}^{m} is at least 12∣∣cim−cjm∣∣≥γ−12ε(Δi+Δj)\frac{1}{2}||c_{i}^{m}-c_{j}^{m}||\geq\frac{\gamma-1}{2}\varepsilon(\Delta_{i}+\Delta_{j}) due to Equation 5.

We assign pmp^{m} to cimc^{m}_{i} at the cost of a slightly weaker movement bound on the distance between pmp^{m} and cjmc^{m}_{j}. Due to orthogonality of VV, we have for m>km>k, (Vm−Vk)TVk=VkT(Vm−Vk)=0(V_{m}-V_{k})^{T}V_{k}=V_{k}^{T}(V_{m}-V_{k})=0. Hence VmVmTVk=VmVkTVk+Vm(Vm−Vk)TVk=VkVkTVk+(Vm−Vk)VkTVk=VkVkTVk=VkV_{m}V_{m}^{T}V_{k}=V_{m}V_{k}^{T}V_{k}+V_{m}(V_{m}-V_{k})^{T}V_{k}=V_{k}V_{k}^{T}V_{k}+(V_{m}-V_{k})V_{k}^{T}V_{k}=V_{k}V_{k}^{T}V_{k}=V_{k}. Then pk=pVkVkT=pVmVmTVkVkT=pmVkVkTp^{k}=pV_{k}V_{k}^{T}=pV_{m}V_{m}^{T}V_{k}V_{k}^{T}=p_{m}V_{k}V_{k}^{T}.

Further, ∣∣pk−cjk∣∣≥12∣∣cjk−cik∣∣≥γ−12(Δi+Δj)||p^{k}-c_{j}^{k}||\geq\frac{1}{2}||c_{j}^{k}-c_{i}^{k}||\geq\frac{\gamma-1}{2}(\Delta_{i}+\Delta_{j}) due to Equation 5. Then the distance between pmp_{m} and a different center cjmc_{j}^{m}

where the equality follows from orthogonality and the second to last inequality follows from Lemma 6.7.

Now, given the centers {c1m,…ckm}\{c_{1}^{m},\ldots c_{k}^{m}\}, we obtain a center matrix MKM_{K} where the iith row of MKM_{K} is the center according to the assignment of above. Since both clusterings use the same centers but KK improves locally on the assignments, we have ∣∣Am−MK∣∣F2≤∣∣Am−XXTAm∣∣F2||A_{m}-M_{K}||_{F}^{2}\leq||A_{m}-XX^{T}A_{m}||_{F}^{2}, which proves the first statement of the lemma. Additionally, due to the fact that Am−XXTAmA_{m}-XX^{T}A_{m} has rank m=k/εm=k/\varepsilon, we have

To ensure stability, we will show that for each element of KK there exists an element of CC, such that both clusters agree on a large fraction of points. This can be proven by using techniques from Awasthi and Sheffet (Theorem 3.1) and Kumar and Kannan (Theorem 5.4), which we repeat for completeness.

Let K={C1′,…Ck′}K=\{C_{1}^{\prime},\ldots C_{k}^{\prime}\} and C={C1,…Ck}C=\{C_{1},\ldots C_{k}\} be defined as above. Then there exists a bijection b:C→Kb:C\rightarrow K such that for any i∈{i,…,k}i\in\{i,\ldots,k\}

Denote by Ti→jT_{i\rightarrow j} the set of points from CiC_{i} such that ∣∣cik−pk∣∣>∣∣cjk−pk∣∣||c^{k}_{i}-p^{k}||>||c^{k}_{j}-p^{k}||. We first note that ∣∣Ak−XXTA∣∣F2≤2k⋅∣∣Ak−XXTA∣∣22≤2k⋅(∣∣A−Ak∣∣2+∣∣A−XXTA∣∣2)2≤8k⋅∣∣A−XXTA∣∣22≤8⋅∣Ci∣⋅Δi2||A_{k}-XX^{T}A||_{F}^{2}\leq 2k\cdot||A_{k}-XX^{T}A||_{2}^{2}\leq 2k\cdot\left(||A-A_{k}||_{2}+||A-XX^{T}A||_{2}\right)^{2}\leq 8k\cdot||A-XX^{T}A||_{2}^{2}\leq 8\cdot|C_{i}|\cdot\Delta_{i}^{2} for any i∈{1,…,k}i\in\{1,\ldots,k\}. The distance ∣∣pk−cik∣∣≥12∣∣cik−cjk∣∣≥γ−12⋅(1Ci+1∣Cj∣)k∣∣A−XXTA∣∣22||p^{k}-c_{i}^{k}||\geq\frac{1}{2}||c^{k}_{i}-c_{j}^{k}||\geq\frac{\gamma-1}{2}\cdot\left(\frac{1}{\sqrt{C_{i}}}+\frac{1}{\sqrt{|C_{j}|}}\right)\sqrt{k}||A-XX^{T}A||_{2}^{2}. Assigning these points to cikc^{k}_{i}, we can bound the total number of points added to and subtracted from cluster CjC_{j} by observing

Therefore, the cluster sizes are up to some multiplicative factor of (1±32(γ−1)2)\left(1\pm\frac{32}{(\gamma-1)^{2}}\right) identical. ∎

We now have for each point pm∈Ci′p^{m}\in C_{i}^{\prime} a minimum cost of

where the first inequality holds due to Case 3, the second inequality holds due to Lemma 6.8 and the last inequality follows from γ>3\gamma>3 and Equation 6. This ensures that the distribution stability condition is satisfied. ∎

Any (1+ε)(1+\varepsilon)-approximation will not in general agree with a target clustering. To see this consider two clusters: (1) with mean on the origin and (2) with mean δ\delta on the the first axis and on all other coordinates. We generate points via a multivariate Gaussian distribution with an identity covariance matrix centered on the mean of each cluster. If we generate enough points, the instance will have constant spectral separability. However, if δ\delta is small and the dimension large enough, an optimal 11-clustering will approximate the kk-means objective.

A Brief Survey on Stability Conditions

There are two general aims that shape the definitions of stability conditions. First, we want the objective function to be appropriate. For instance, if the data is generated by mixture of Gaussians, the kk-means objective will be more appropriate than the kk-median objective. Secondly, we assume that there exists some ground truth, i.e. a correct assignment of points into clusters. Our objective is to recover this ground truth as well as possible. These aims are not mutually exclusive. For instance, an ideal objective function will allow us to recover the ground truth. We refer to Figure 3 for a visual overview of stability conditions and their relationships.

Given that an algorithm optimized with respect to some objective function, it is natural to define a stability condition as a property the optimum clustering is required to have.

Assume that we want to cluster a data set with respect to the kk-means objective, but have not decided on the number of clusters. A simple way of determining the ”correct” value of kk is to run a kk-means algorithm for k{1,2,…m}k\{1,2,\ldots m\} until the objective value decreases only marginally (using mm centers). At this point, we set k=m−1k=m-1. The reasoning behind this method, commonly known as the elbow-method is that we do not gain much information by using mm instead of m−1m-1 clusters, so we should favor the simpler model. Contrariwise, this implies that we did gain information going from m−2m-2 to m−1m-1 and, in particular, that the m−2m-2-means cost was considerably larger than the m−1m-1-means cost.

Ostrovsky et al. considered whether such discrepancies in the cost also allow us to solve the kk-means problem more efficiently, see also Schulman for an earlier condition for two clusters and the irreducibility condition by Kumar et al. . Specifically, they assumed that the optimal kk-means clustering has only an ε2\varepsilon^{2}-fraction of the cost of the optimal (k−1)(k-1)-means clustering. For such cost separated instances, the popular D2D^{2}-sampling technique has an improved performance compared to the worst-case O(log⁡k)O(\log k)-approximation ratio . Awasthi et al. showed that if an instance is cost-stable, it also admits a PTAS. In fact, they also showed that the weaker condition β\beta-stability is sufficient. β\beta-stability states that the cost of assigning a point of cluster CiC_{i} to another cluster CjC_{j} costs at least β\beta times the total cost divided by the size of cluster CiC_{i}. Despite its focus on the properties of the optimum, β\beta-stability has many connections to target-clustering (see below). Nowadays, the cost-stable property is one of the strongest stability conditions, implying both distribution stability and spectral separability (see below). It is nevertheless the arguably most intuitive stability condition.

Perturbation Resilience

The other main optimum-based stability condition is perturbation resilience. It was originally considered for the weighted max-cut problem by Bilu et al. . There, the optimum max cut is said to be α\alpha-perturbation resilient, if it remains the optimum even if we multiply any edge weight up to a factor of α>1\alpha>1. This notion naturally extends to metric clustering problems, where, given a n×nn\times n distance matrix, the optimum clustering is α\alpha-perturbation resilient if it remains optimal if we multiply entries by a factor α\alpha. Perturbation resilience has some similarity to smoothed analysis (see Arthur et al. for work on kk-means). Both smoothed analysis and perturbation stability aim to study a smaller, more interesting part of the instance space as opposed to worst case analysis that covers the entire space. Perturbation resilience assumes that the optimum clustering stands out among any alternative clustering and measures the degree by which it stands out via α\alpha. Smooth analysis is motivated by considering a problem after applying a random perturbation, which for example accounts for measurement errors.

Perturbation resilience is unique among the considered stability conditions in that we aim to recover the optimum solution, as opposed to finding a good (1+ε)(1+\varepsilon) approximation. Awasthi et al. showed that 33-perturbation resilience is sufficient to find the optimum kk-median clustering, which was further improved by Balcan and Liang to 1+21+\sqrt{2} These results also holds for a slightly more general condition called the center proximity condition. and finally to 2 by Angelidakis et al. . Ben-David and Reyzin showed that recovering the optimal clustering is NP-hard if the instance is less than 22-perturbation resilient. Balcan et al. gave an algorithm that optimally solves symmetric and asymmetric kk-center on 22-perturbation resilient instances. Recently, Angelidakis et al. gave an algorithm that determines the optimum cluster for almost all used center-based clustering if the instance is 22-perturbation resilient .

2 Target-Based Stability

The notion of finding a target clustering is more prevalent in machine learning than minimizing an objective function. Though optimizing an objective value plays an important part in this line of research, our ultimate goal is to find a clustering CC that is close to the target clustering C∗C^{*}. The distance between two clusterings is the fraction of points where CC and C∗C^{*} disagree when considering an optimal matching of clusters in CC to clusters in C∗C^{*}.

When the points are generated from some (unknown) mixture model, we are also given an implicit target clustering. As a result, much work has focused on finding such clusterings using probabilistic assumptions, see, for instance, . We would like to highlight two conditions that make no probabilistic assumptions and have a particular emphasis on the kk-means and kk-median objective functions.

The first assumption is that finding the target clustering is related to optimizing the kk-means objective function. In the simplest case, the target clustering coincides with the optimum kk-means clustering, but this a strong assumption that Balcan et al. avoid. Instead they consider instances where any clustering with cost within a factor cc of the optimum has a distance at most ε\varepsilon to the target clustering, a condition they call (c,ε)(c,\varepsilon)-approximation stability. Balcan et al. then showed that this condition is sufficient to both bypass worst-case lower bounds for the approximation factor, and to find a clustering with distance O(ε)O(\varepsilon) from the target clustering. The condition was extended to account for the presence of noisy data by Balcan et al. . This approach was improved for other min-sum clustering objectives such as correlation clustering by Balcan and Braverman . For constant cc, (c,ε)(c,\varepsilon) approximation stability also implies the β\beta-stability condition of Awasthi et al. with constant β\beta, if the target clusters are greater than εn\varepsilon n.

Spectral Separability

Another condition that relates target clustering recovery via the kk-means objective was introduced by Kumar and Kannan . In order to give an intuitive explanation, consider a mixture model consisting of kk centers. If the mixture is in a low-dimensional space, and assuming that we have, for instance, approximation stability with respect to the kk-means objective, we could simply use the algorithm by Balcan et al. . If the mixture has many additional dimensions, the previous conditions have scaling issues, as the kk-means cost may increase with each dimension, even if many of the additional dimensions mostly contain noise. The notion behind the spectral separability condition is that if the means of the mixture are well-separated in the subspace containing their centers, it should be possible to determine the mixture even with the added noise.

Slightly more formally, Kumar and Kannan state that a point satisfies a proximity condition if the projection of a point onto the line connecting its cluster center to another cluster center is Ω(k)\Omega(k) standard deviations closer to its own center than to the other. The standard deviations are scaled with respect to the spectral norm of the matrix in which the iith row is the difference vector between the iith point and its cluster mean. Given that all but an ε\varepsilon-fraction of points satisfy the proximity condition, Kumar and Kannan gave an algorithm that computes a clustering with distance O(ε)O(\varepsilon) to the target. They also show that their condition is (much) weaker than the cost-stability condition by Ostrovsky et al. and discuss some implications of cost-stability on approximation factors. Awasthi and Sheffet later showed that Ω(k)\Omega(\sqrt{k}) standard deviations are sufficient to recover most of the results by Kumar and Kannan.

Acknowledgments

The authors thank their dedicated advisor for this project: Claire Mathieu. Without her, this collaboration would not have been possible.

The second author acknowledges the support by Deutsche Forschungsgemeinschaft within the Collaborative Research Center SFB 876, project A2, and the Google Focused Award on Web Algorithmics for Large-scale Data Analysis.

Appendix

Appendix A (β,δ)𝛽𝛿(\beta,\delta)-Stability

Let Ci∗C^{*}_{i} be a cheap cluster. For any ε0\varepsilon_{0}, we have ∣IRiε0∩Ci∗∣>(1−ε3/ε0)∣Ci∗∣|\text{IR}^{\varepsilon_{0}}_{i}\cap C_{i}^{*}|>(1-{\varepsilon^{3}}/{\varepsilon_{0}})|C^{*}_{i}|.

Observe that each client that is not in IRiε0IR^{\varepsilon_{0}}_{i} is at a distance larger than ε0βcost(C∗)/∣Ci∗∣\varepsilon_{0}\beta\text{cost}(C^{*})/|C^{*}_{i}| from ci∗c^{*}_{i}. Since Ci∗C^{*}_{i} is cheap, the total cost of the clients in Ci∗=(IRiε0∩Ci∗)∪(Ci∗−IRiε0)C^{*}_{i}=(\text{IR}^{\varepsilon_{0}}_{i}\cap C_{i}^{*})\cup(C^{*}_{i}-\text{IR}^{\varepsilon_{0}}_{i}) is at most ε3βcost(C∗)\varepsilon^{3}\beta\text{cost}(C^{*}) and in particular, the total cost of the clients in Ci∗−IRiε0C^{*}_{i}-\text{IR}^{\varepsilon_{0}}_{i} does not exceed ε3βcost(C∗)\varepsilon^{3}\beta\text{cost}(C^{*}). Therefore, the total number of such clients is at most ε3βcost(C∗)/(ε0βcost(C∗)/∣Ci∗∣)=ε3∣Ci∗∣/ε0\varepsilon^{3}\beta\text{cost}(C^{*})/(\varepsilon_{0}\beta\text{cost}(C^{*})/|C^{*}_{i}|)=\varepsilon^{3}|C^{*}_{i}|/\varepsilon_{0}. ∎

Let δ+ε3ε0<1\delta+\frac{\varepsilon^{3}}{\varepsilon_{0}}<1. If Ci∗≠Cj∗C^{*}_{i}\neq C^{*}_{j} are cheap clusters, then IRiε0∩IRjε0=∅\text{IR}^{\varepsilon_{0}}_{i}\cap\text{IR}^{\varepsilon_{0}}_{j}=\emptyset.

Assume that the claim is not true and consider a client x∈IRiε0∩IRjε0x\in\text{IR}^{\varepsilon_{0}}_{i}\cap\text{IR}^{\varepsilon_{0}}_{j}. Without loss of generality assume ∣Ci∗∣≥∣Cj∗∣|C^{*}_{i}|\geq|C^{*}_{j}|. By the triangular inequality, we have cost(cj∗,ci∗)≤cost(cj∗,x)+cost(x,ci∗)≤ε0βcost(C∗)/∣Cj∗∣+ε0βcost(C∗)/∣Ci∗∣≤2ε0βcost(C∗)/∣Cj∗∣\text{cost}(c^{*}_{j},c^{*}_{i})\leq\text{cost}(c^{*}_{j},x)+\text{cost}(x,c^{*}_{i})\leq\varepsilon_{0}\beta\text{cost}(C^{*})/|C^{*}_{j}|+\varepsilon_{0}\beta\text{cost}(C^{*})/|C^{*}_{i}|\leq 2\varepsilon_{0}\beta\text{cost}(C^{*})/|C^{*}_{j}|. Since the instance is (β,δ)(\beta,\delta)-distribution stable with respect to (C∗,S∗)(C^{*},S^{*}) and due to Lemma 4.5, we have ∣Δi∣+∣IRiε0∩Ci∗∣>(1−δ)∣Ci∗∣+(1−ε3/ε0)∣Ci∗∣=(2−δ−ε3/ε0)∣Ci∗∣|\Delta_{i}|+|\text{IR}^{\varepsilon_{0}}_{i}\cap C_{i}^{*}|>(1-\delta)|C^{*}_{i}|+(1-{\varepsilon^{3}}/{\varepsilon_{0}})|C^{*}_{i}|=(2-\delta-{\varepsilon^{3}}/{\varepsilon_{0}})|C^{*}_{i}|. For δ+ε3/ε0<1\delta+{\varepsilon^{3}}/{\varepsilon_{0}}<1, there exists a client x′∈IRiε0∩Δix^{\prime}\in\text{IR}^{\varepsilon_{0}}_{i}\cap\Delta_{i}. Thus, we have cost(x′,cj∗)≤cost(x′,ci∗)+cost(cj∗,ci∗)≤3ε0βcost(C∗)/∣Cj∗∣<βcost(C∗)/∣Cj∗∣\text{cost}(x^{\prime},c^{*}_{j})\leq\text{cost}(x^{\prime},c^{*}_{i})+\text{cost}(c^{*}_{j},c^{*}_{i})\leq 3\varepsilon_{0}\beta\text{cost}(C^{*})/|C^{*}_{j}|<\beta\text{cost}(C^{*})/|C^{*}_{j}|. Since x′x^{\prime} is in Δi\Delta_{i}, we have cost(x′,cj∗)≥βcost(C∗)/∣Cj∗∣\text{cost}(x^{\prime},c^{*}_{j})\geq\beta\text{cost}(C^{*})/|C^{*}_{j}| resulting in a contradiction. ∎

There exists a set Z2⊆C∗−Z1Z_{2}\subseteq C^{*}-Z_{1} of size at most 11.25ε−1β−111.25\varepsilon^{-1}\beta^{-1} such that for any cluster Cj∗∈C∗−Z2C^{*}_{j}\in C^{*}-Z_{2}, the total number of clients x∈⋃i≠jΔix\in\bigcup_{i\neq j}\Delta_{i}, that are served by L(j)\mathcal{L}(j) in L\mathcal{L}, is at most ε∣IRiε2∩Ci∗∣\varepsilon|\text{IR}^{\varepsilon^{2}}_{i}\cap C_{i}^{*}|.

Consider a cheap cluster Cj∗∈C∗−Z1C^{*}_{j}\in C^{*}-Z_{1} such that the total number of clients x∈Δix\in\Delta_{i} for i≠ji\neq j, that are served by L(j)\mathcal{L}(j) in L\mathcal{L}, is greater than ε∣IRjε2∩Cj∗∣\varepsilon|\text{IR}^{\varepsilon^{2}}_{j}\cap C^{*}_{j}|. By the triangular inequality and the definition of (β,δ)(\beta,\delta)-stability, the total cost for each x∈Δix\in\Delta_{i} with i≠ji\neq j served by L(j)\mathcal{L}(j) is at least (1−ε)βcost(C∗)/∣Cj∗∣(1-\varepsilon)\beta\text{cost}(C^{*})/|C^{*}_{j}|. Since there are at least ε∣IRjε2∩Cj∗∣\varepsilon|\text{IR}^{\varepsilon^{2}}_{j}\cap C^{*}_{j}| such clients, their total cost is at least ε∣IRjε2∩Cj∗∣(1−ε)βcost(C∗)/∣Cj∗∣\varepsilon|\text{IR}^{\varepsilon^{2}}_{j}\cap C^{*}_{j}|(1-\varepsilon)\beta\text{cost}(C^{*})/|C^{*}_{j}|. By Lemma 4.5, this total cost is at least

Recall that by , L\mathcal{L} is a 5-approximation and so there exist at most 11.25⋅ε−1β−111.25\cdot\varepsilon^{-1}\beta^{-1} such clusters. ∎

Let Ci∗C^{*}_{i} be a cluster in C∗−Z∗C^{*}-Z^{*}. Define the solution Mi=L−{L(i)}∪{ci∗}\mathcal{M}^{i}=\mathcal{L}-\{\mathcal{L}(i)\}\cup\{c^{*}_{i}\} and denote by mxim^{i}_{x} the cost of client xx in solution Mi\mathcal{M}^{i}. Then

Consider a client x∈Ci∗−A(L(i))x\in C^{*}_{i}-A(\mathcal{L}(i)). By the triangular inequality, we have Reassign(x)=cost(x,L(i))≤cost(x,ci∗)+cost(ci∗,L(i))=gx+cost(ci∗,L(i))\text{Reassign}(x)=\text{cost}(x,\mathcal{L}(i))\leq\text{cost}(x,c^{*}_{i})+\text{cost}(c^{*}_{i},\mathcal{L}(i))=g_{x}+\text{cost}(c^{*}_{i},\mathcal{L}(i)). Then,

Now consider the clients in Ci∗∩A(L(i))C^{*}_{i}\cap A(\mathcal{L}(i)). By the triangular inequality, we have cost(ci∗,L(i))≤cost(ci∗,x′)+cost(x′,L(i))≤gx+lx\text{cost}(c^{*}_{i},\mathcal{L}(i))\leq\text{cost}(c^{*}_{i},x^{\prime})+\text{cost}(x^{\prime},\mathcal{L}(i))\leq g_{x}+l_{x}. Therefore,

We now bound ∣Ci∗−A(L(i))∣∣Ci∗∩A(L(i))∣\frac{|C^{*}_{i}-A(\mathcal{L}(i))|}{|C^{*}_{i}\cap A(\mathcal{L}(i))|}. Due to Lemma 4.5, we have ∣IRiε2∩Ci∗∣≥(1−ε)∣Ci∗∣|\text{IR}_{i}^{\varepsilon^{2}}\cap C^{*}_{i}|\geq(1-\varepsilon)|C^{*}_{i}| and due to Lemma 4.4, we have ∣IRiε2∩Ci∗∩A(L(i))∣≥(1−ε)∣IRiε2∩Ci∗∣|\text{IR}_{i}^{\varepsilon^{2}}\cap C^{*}_{i}\cap A(\mathcal{L}(i))|\geq(1-\varepsilon)|\text{IR}_{i}^{\varepsilon^{2}}\cap C^{*}_{i}|. Therefore ∣Ci∗∩A(L(i))∣≥(1−ε)2∣Ci∗∣|C^{*}_{i}\cap A(\mathcal{L}(i))|\geq(1-\varepsilon)^{2}|C^{*}_{i}| and ∣Ci∗−A(L(i))∣≤(1−(1−ε)2)∣Ci∗∣≤2ε∣Ci∗∣|C^{*}_{i}-A(\mathcal{L}(i))|\leq(1-(1-\varepsilon)^{2})|C^{*}_{i}|\leq 2\varepsilon|C^{*}_{i}|, yielding ∣Ci∗−A(L(i))∣∣Ci∗∩A(L(i))∣≤2ε(1−ε)2\frac{|C^{*}_{i}-A(\mathcal{L}(i))|}{|C^{*}_{i}\cap A(\mathcal{L}(i))|}\leq\frac{2\varepsilon}{(1-\varepsilon)^{2}}.

Let Ci∗C^{*}_{i} be a cluster in C∗−Z∗C^{*}-Z^{*}. Define the solution Mi=L−{L(i)}∪{ci∗}\mathcal{M}^{i}=\mathcal{L}-\{\mathcal{L}(i)\}\cup\{c^{*}_{i}\} and denote by mcim^{i}_{c} the cost of client cc in solution Mi\mathcal{M}^{i}. Then

For any client x∈A−A(L(i))x\in A-A(\mathcal{L}(i)), the center that serves it in L\mathcal{L} belongs to Mi\mathcal{M}^{i}. Thus its cost is at most lxl_{x}. Moreover, observe that any client x∈Ei⊆Ci∗x\in E_{i}\subseteq C^{*}_{i} can now be served by ci∗c^{*}_{i}, and so its cost is at most gxg_{x}. For each client x∈Dix\in D_{i}, we bound its cost by Reassign(x)\text{Reassign}(x) since all the centers of L\mathcal{L} except for L(i)\mathcal{L}(i) are in Mi\mathcal{M}^{i} and x∈Bj∗⊆Cj∗∈C∗−C(Z∗)x\in B^{*}_{j}\subseteq C^{*}_{j}\in C^{*}-C(Z^{*}).

Now, we bound the cost of a client x∈A(L(i))−(Ei∪Di)⊆A(L(i))x\in A(\mathcal{L}(i))-(E_{i}\cup D_{i})\subseteq A(\mathcal{L}(i)). The closest center in Mi\mathcal{M}^{i} for a client x′∈A(L(i))x^{\prime}\in A(\mathcal{L}(i)) is not farther than ci∗c^{*}_{i}. By the triangular inequality, the cost of such client x′x^{\prime} is at most cost(x′,ci∗)≤cost(x′,L(i))+cost(L(i),ci∗)=lx′+cost(L(i),ci∗)\text{cost}(x^{\prime},c^{*}_{i})\leq\text{cost}(x^{\prime},\mathcal{L}(i))+\text{cost}(\mathcal{L}(i),c^{*}_{i})=l_{x^{\prime}}+\text{cost}(\mathcal{L}(i),c^{*}_{i}), and so

Now, observe that, for any client x∈∣A(L(i))∩Ei∣x\in|A(\mathcal{L}(i))\cap E_{i}|, by the triangular inequality, we have cost(L(i),ci∗)≤cost(L(i),x)+cost(x,ci∗)=lx+gx\text{cost}(\mathcal{L}(i),c^{*}_{i})\leq\text{cost}(\mathcal{L}(i),x)+\text{cost}(x,c^{*}_{i})=l_{x}+g_{x}. Therefore,

We now remark that since EiE_{i} is in C∗−Z∗C^{*}-Z^{*}, we have by Lemmas 4.7 and 4.8, ∣A(L(i))−Ei∣≤ε⋅∣IRiε2∩Ci∗∣|A(\mathcal{L}(i))-E_{i}|\leq\varepsilon\cdot|IR^{\varepsilon^{2}}_{i}\cap C^{*}_{i}| and (1−ε)⋅∣IRiε2∩Ci∗∣≤∣A(L(i))∩Ei∣(1-\varepsilon)\cdot|IR^{\varepsilon^{2}}_{i}\cap C^{*}_{i}|\leq|A(\mathcal{L}(i))\cap E_{i}|. Thus, combining with Equation 9 yields the lemma. ∎

We consider a cluster Ci∗C^{*}_{i} in C∗−Z∗C^{*}-Z^{*} and the solution Mi=L−{L(i)}∪{ci∗}\mathcal{M}^{i}=\mathcal{L}-\{\mathcal{L}(i)\}\cup\{c^{*}_{i}\}. Observe that Mi\mathcal{M}^{i} and L\mathcal{L} only differ by L(i)\mathcal{L}(i) and ci∗c^{*}_{i}. Therefore, by local optimality we have (1−εn)⋅cost(Li)≤cost(Mi)(1-\frac{\varepsilon}{n})\cdot\text{cost}(\mathcal{L}_{i})\leq\text{cost}(\mathcal{M}^{i}). Then Lemma 4.11 yields

We now apply this analysis to each cluster Ci∗∈C∗−Z∗C^{*}_{i}\in C^{*}-Z^{*}. Summing over all clusters Ci∗C^{*}_{i}, we obtain,

By Lemma 4.10 and the definition of EiE_{i},

Therefore, −εn⋅cost(L)+∑x∈A^−C(Z∗)lx≤∑x∈A^−C(Z∗)gx+3ε(1−ε)2⋅(cost(L)+cost(C∗)).\displaystyle-\frac{\varepsilon}{n}\cdot\text{cost}(\mathcal{L})+\sum_{x\in\widehat{A}-C(Z^{*})}l_{x}\leq\sum_{x\in\widehat{A}-C(Z^{*})}g_{x}+\frac{3\varepsilon}{(1-\varepsilon)^{2}}\cdot(\text{cost}(\mathcal{L})+\text{cost}(C^{*})). ∎

Appendix B Euclidean Distribution Stability

In this section we show how to reduce the Euclidean problem to the discrete version. Our analysis is focused on the kk-means problem, however we note that the discretization works for all values of cost=distp\text{cost}=\text{dist}^{p}, where the dependency on pp grows exponentially. For constant pp, we obtain polynomial sized candidate solution sets in polynomial time. For kk-means itself, we could alternatively combine Matousek’s approximate centroid set with the Johnson Lindenstrauss lemma and avoid the following construction; however this would only work for optimal distribution stable clusterings and the proof Theorem 6.2 requires it to hold for non-optimal clusterings as well.

First, we describe a discretization procedure. It will be important to us that the candidate solution preserves (1) the cost of any given set of centers and (2) distribution stability.

For a set of points PP, a set of points Nε\mathcal{N}_{\varepsilon} is an ε\varepsilon-net of PP if for every point x∈Px\in P there exists some point y∈Nεy\in\mathcal{N}_{\varepsilon} with ∣∣x−y∣∣≤ε||x-y||\leq\varepsilon. It is well known that for unit Euclidean ball of dimension dd, there exists an ε\varepsilon-net of cardinality (1+2/ε)d(1+2/\varepsilon)^{d}, see for instance Pisier , though in this case the proof is non-constructive. Constructive methods yield slightly worse, but asymptotically similar bounds of the form ε−O(d)\varepsilon^{-O(d)}, see for instance Chazelle for an extensive overview on how to construct such nets. Note that having constructed an ε\varepsilon-net for the unit sphere, we also have an ε⋅r\varepsilon\cdot r-net for any sphere with radius rr. The following lemma shows that a sufficiently small ε\varepsilon-net preserves distribution stability. Again for ease of exposition, we only give the proof for p=1p=1, and assuming we can construct an appropriate ε\varepsilon-net, but similar results also hold for (k,p)(k,p) clustering as long as pp is constant.

Let AA be a set of nn points in dd-dimensional Euclidean space and let β,ε>0\beta,\varepsilon>0 with min⁡(β,ε)>2η>0\min(\beta,\varepsilon)>2\eta>0 be constants. Suppose there exists a clustering C={C1,…,Ck}C=\{C_{1},\ldots,C_{k}\} with centers S={c1,…ck}S=\{c_{1},\ldots c_{k}\} such that

cost(C,S)=∑i=1k∑x∈Ci∣∣x−ci∣∣\text{cost}(C,S)=\sum_{i=1}^{k}\sum_{x\in C_{i}}||x-c_{i}|| is a constant approximation to the optimum clustering and

Then there exists a discretization DD of the solution space such that there exists a subset S′={c1′,…ck′}⊂DS^{\prime}=\{c_{1}^{\prime},\ldots c_{k}^{\prime}\}\subset D of size kk with

∑i=1k∑x∈Ci∣∣x−ci′∣∣≤(1+ε)⋅cost(C,S)\sum_{i=1}^{k}\sum_{x\in C_{i}}||x-c_{i}^{\prime}||\leq(1+\varepsilon)\cdot\text{cost}(C,S) and

CC with centers S′S^{\prime} is β/2\beta/2-distribution stable.

The discretization consists of O(n⋅log⁡n⋅ηd+2)O(n\cdot\log n\cdot\eta^{d+2}) many points.

Now for each ci∈Sc_{i}\in S, set ci′=argmin q∈D∣∣q−ci∣∣c_{i}^{\prime}=\underset{q\in D}{\text{argmin }}||q-c_{i}||. We will show that S′={c1′,…ck′}S^{\prime}=\{c_{1}^{\prime},\ldots c_{k}^{\prime}\} satisfies the two conditions of the lemma.

For (1), we first consider the points pp with ∣∣p−ci∣∣≤ε/8⋅OPTn||p-c_{i}||\leq\varepsilon/8\cdot\frac{\text{OPT}}{n}. Then there exists a ci′c_{i}^{\prime} such that ∣∣p−ci′∣∣≤(η/8+ε/8)OPTn≤ε/4OPTn||p-c_{i}^{\prime}||\leq(\eta/8+\varepsilon/8)\frac{\text{OPT}}{n}\leq\varepsilon/4\frac{\text{OPT}}{n} and summing up over all such points, we have a total contribution to the objective value of at most ε/4⋅OPT\varepsilon/4\cdot\text{OPT}.

To show (2), let us consider some point p∉Cjp\notin C_{j} with ∣∣p−cj∣∣>β⋅OPT∣Cj∣||p-c_{j}||>\beta\cdot\frac{\text{OPT}}{|C_{j}|}. Since β⋅OPT∣Cj∣≥2η⋅OPTn\beta\cdot\frac{\text{OPT}}{|C_{j}|}\geq 2\eta\cdot\frac{\text{OPT}}{n}, there exists a point qq and an i∈{0,…t}i\in\{0,\ldots t\} such that β/8⋅(1+η)i⋅OPTn≤∣∣ci−q∣∣≤β/8⋅(1+η)i+1⋅OPTn\beta/8\cdot(1+\eta)^{i}\cdot\frac{\text{OPT}}{n}\leq||c_{i}-q||\leq\beta/8\cdot(1+\eta)^{i+1}\cdot\frac{\text{OPT}}{n}. Then ∣∣cj′−cj∣∣≤β⋅(1+η)i+1⋅OPTn||c_{j}^{\prime}-c_{j}||\leq\beta\cdot(1+\eta)^{i+1}\cdot\frac{\text{OPT}}{n}. Similarly to above, the point cj′c_{j}^{\prime} satisfies ∣∣p−cj′∣∣≥∣∣p−cj∣∣−∣∣cj−cj′∣∣≥β⋅OPT∣Cj∣−β/8(1+η)⋅OPTn≥(1−1/4)β⋅OPT∣Cj∣>β/2⋅OPT∣Cj∣||p-c_{j}^{\prime}||\geq||p-c_{j}||-||c_{j}-c_{j}^{\prime}||\geq\beta\cdot\frac{\text{OPT}}{|C_{j}|}-\beta/8(1+\eta)\cdot\frac{\text{OPT}}{n}\geq(1-1/4)\beta\cdot\frac{\text{OPT}}{|C_{j}|}>\beta/2\cdot\frac{\text{OPT}}{|C_{j}|}. ∎

To reduce the dependency on the dimension, we combine this statement with the seminal theorem originally due to Johnson and Lindenstrauss .

It is easy to see that Johnson-Lindenstrauss type embeddings preserve the Euclidean kk-means cost of any clustering, as the cost of any clustering can be written in terms of pairwise distances (see also Fact 6.3 in Section 6). Since the distribution over linear maps F\mathcal{F} can be chosen obliviously with respect to the points, this extends to distribution stability of a set of kk candidate centers as well.

Combining Lemmas B.2 and B.1 gives us the following corollary.

Let AA be a set of points in dd-dimensional Euclidean space with a clustering C={C1,…Ck}C=\{C_{1},\ldots C_{k}\} and centers S={c1,…ck}S=\{c_{1},\ldots c_{k}\} such that CC is β\beta-perturbation stable. Then there exists a (A,F,∣∣⋅∣∣2,k)(A,F,||\cdot||^{2},k)-clustering instance with clients AA, npoly(ε−1)n^{\text{poly}(\varepsilon^{-1}}) centers FF and a subset S′⊂F∪AS^{\prime}\subset F\cup A of kk centers such that CC and S′S^{\prime} is O(β)O(\beta) stable and the cost of clustering AA with S′S^{\prime} is at most (1+ε)(1+\varepsilon) times the cost of clustering AA with SS.

This procedure can be adapted to work for general powers of cost functions. For Lemma B.1, we simply rescale η\eta. The Johnson-Lindenstrauss lemma can also be applied in these settings, at a slightly worse target dimension of O((p+1)2log⁡((p+1)/ε)ε−3log⁡n)O((p+1)^{2}\log((p+1)/\varepsilon)\varepsilon^{-3}\log n), see Kerber and Raghvendra .

Appendix C Experimental Results

In this section, we discuss the empirical applicability of stability as a model to capture real-world data. Theorem 4.2 states that local search with neighborhood of size nΩ(ε−3β−1)n^{\Omega(\varepsilon^{-3}\beta^{-1})} returns a solution of cost at most (1+ε)OPT(1+\varepsilon)\text{OPT}. Thus, we ask the following question.

For which values of β\beta are the random and real instances β\beta-distribution-stable?

We focus on the kk-means objective and we consider real-world and random instances with ground truth clustering and study under which conditions the value of the solution induced by the ground truth clustering is close to the value of the optimal clustering with respect to the kk-means objective. Our aim is to determine (a range of) values of β\beta for which various data sets satisfy distribution stability.

The machines used for the experiments have a processor Intel(R) Core(TM) i73770 CPU, 3.40GHz with four cores and a total virtual memory of 8GB running on an Ubuntu 12.04.5 LTS operating system. We implemented the Algorithms in C++ and Python. The C++ compiler is g++ 4.6.3. Our experiments always used Local Search with a neighborhood of size 11. At each step, the neighborhood of the current solution was explored in parallel: 8 threads were created by a Python script and each of them correspond to a C++ subprocess that explores a 1/8 fraction of the space of the neighboring solutions. The best neighboring solution found by the 8 threads was taken for the next step. For Lloyd’s algorithm we use the C++ implementation by Kanungo et al. available online.

To determine the stability parameter β\beta, we also required a lower bound on the cost. This was done via a linear relaxation describe in Algorithm 4. The LP for the linear program was generated via a Python script and solved using the solver CPLEX. The average ratio between our upper bound given via Local Search and lower bounds given via Algorithm 4 is 1.15 and the variance for the value of the optimal fractional solution that is less than 0.5%0.5\% of the value of the optimal solution. Therefore, our estimate of β\beta is quite accurate.

C.1 Real Data

In this section, we focus on four classic real-world datasets with ground truth clustering: abalone, digits, iris, and movement_libras. abalone, iris, and movement_libras have been used in various works (see for example) and are available online at the UCI Machine learning repository .

The abalone dataset consists of 8 physical characteristics of all the individuals of a population of abalones. Each abalone corresponds to a point in a 8-dimensional Euclidean space. The ground truth clustering consists in partitioning the points according to the age of the abalones.

The digits dataset consists of 8px-by-8px images of handwritten digits from the standard machine learning library scikit-learn . Each image is associated to a point in a 64-dimensional Euclidean space where each pixel corresponds to a coordinate. The ground truth clustering consists in partitioning the points according to the number depicted in their corresponding images.

The iris dataset consists of the sepal and petal lengths and widths of all the individuals of a population of iris plant containing 3 different types of iris plant. Each plant is associated to a point in 4-dimensional Euclidean space. The ground truth clustering consists in partitioning the points according to the type of iris plant of the corresponding individual.

The Movement_libras dataset consists of a set of instances of 15 hand movements in LIBRASLIBRAS is the official Brazilian sign language. Each instance is a curve that is mapped in a representation with 90 numeric values representing the coordinates of the movements. The ground truth clustering consists in partitioning the points according to the type of the movement they correspond to.

Table 1 shows the properties of the four instances.

For the Abalone and Movement_libras instances, the values of an optimal solution is much smaller than the value of the ground truth clustering. Therefore the kk-means objective function might not be ideal as a recovery mechanism. Since Local Search optimizes with respect to the kk-means objective, the clustering output by Local Search is far from the ground truth clustering for those instances: the percentage of points correctly classified by Algorithm 1 is at most 17%17\% for the Abalone instance and at most 39%39\% for the Movement_libras instance. For the Digits and Iris instances the value of the ground truth clustering is at most 1.15 times the optimal value. In those cases, the number of points correctly classified is much higher: 90%90\% for the Iris instance and 76.2%76.2\% for the Digits instance.

The experiments also show that the β\beta-distribution-stability condition is satisfied for β>0.06\beta>0.06 for the Digits, Iris and Movement_libras instances. This shows that the β\beta-distribution-stability condition captures the structure of some famous real-world instances for which the kk-means objective is meaningful for finding the optimal clusters. We thus make the following observations.

If the value of the ground truth clustering is close to the value of the optimal solution, then one can expect the instance satisfy the β\beta-distribution stability property for some constant β\beta.

If the value of the ground truth clustering is close to the value of the optimal solution, then one can expect both clusterings to agree on a large fraction of points.

Finally, observe that for those instances the value of an optimal solution to the fractional relaxation of the linear program is very close to the optimal value of an optimal integral solution (since the cost of the integral solution is smaller than the cost returned by Algorithm 1). This suggests that the fractional relaxation (Algorithm 4) might have a small integrality gap for real-world instances.

We believe that it would be interesting to study the integrality gap of the classic LP relaxation for the kk-median and kk-means problems under the stability assumption (for example β\beta-distribution stability).

C.2 Data generated from a mixture of k𝑘k Gaussians

The synthetic data was generated via a Python script using numpy. The instances consist of 1000 points generated from a mixture of kk Gaussians with the same variance σ\sigma lying in dd-dimensional space, where d∈{5,10,50}d\in\{5,10,50\} and k∈{5,50,100}k\in\{5,50,100\}. We generate 100 instances for all possible combinations of the parameters. The means of the kk Gaussians are chosen uniformly and independently at random in \mathdsQd∩(0,1)d\mathds{Q}^{d}\cap(0,1)^{d}. The ground truth clustering is the family of sets of points generated by the same Gaussian. We compare the value of the ground truth clustering to the optimal value clustering.

The results are presented in Figures 4 and 5. We observe that when the variance σ\sigma is large, the ratio between the average value of the ground truth clustering and the average value of the optimal clustering becomes more important. Indeed, the ground truth clusters start to overlap, allowing to improve the objective value by defining slightly different clusters. Therefore, the use of the kk-means or kk-median objectives for modeling the recovery problem is not suitable anymore. In these cases, since Local Search optimizes the solution with respect to the current cost, the clustering output by local search is very different from the ground truth clustering. We thus identify instances for which the kk-means objective is meaningful and so, Local Search is a relevant heuristic. This motivates the following defintion.

We say that a variance σ^\hat{\sigma} is relevant if, for the kk-means instances generated with variance σ^\hat{\sigma} the ratio between the average value of the ground truth clustering and the optimal clustering is less than 1.05.

We summarize in Table 2 the relevant variances observed.

We consider the β\beta-distribution-stability condition and ask whether the instances generated from a relevant variance satisfy this condition for constant values of β\beta. We remark that β\beta can take arbitrarily small values.

We thus identify relevant variances (see Table 2) for each pair k,dk,d, such that optimizing the kk-means objective in a dd-dimensional instances generated from a relevant variance corresponds to finding the underlying clusters.

We now study the β\beta-distribution-stability condition for random instances generated from a mixture of kk Gaussians. The results are depicted in Figures 7 and 6.

We observe that for random instances that are not generated from a relevant variance, the instances are β\beta-distribution-stable for very small values of β\beta (e.g., β<1e−07\beta<1e-07). We also make the following observation.

Instances generated using relevant variances satisfy the β\beta-distribution-stability condition for β>0.001\beta>0.001.

We remark that the number of dimensions is constant here and that having more dimensions might incur slightly different values for β\beta. It would be interesting to study this dependency in a new study.

References