k -M EDIAN C LUSTERING VIA M ETRIC E MBEDDING : T OWARDS B ETTER I NITIALIZATION WITH P RIVACY
Anonymous authors
Paper under double-blind review
A BSTRACT
In clustering algorithms, the choice of initial centers is crucial for the quality of the learned clusters.
We propose a new initialization scheme for the k -median problem in the general metric space (e.g., discrete space induced by graphs), based on the construction of metric embedding tree structure of the data.
From the tree, we propose a novel and efﬁcient search algorithm for good initial centers that can be used subsequently for the local search algorithm.
Our method, named the HST initialization, can also be easily extended to the setting of differential privacy (DP) to generate private initial centers.
Theoretically, the initial centers from HST initialization can achieve lower error than those from another popular initialization method, k -median++, in the non-DP setting.
Moreover, with privacy constraint, we show that the error of applying DP local search followed by our private HST initialization improves previous results, and approaches the known lower bound within a small factor.
Empirically, experiments are conducted to demonstrate the effectiveness of our methods.
I NTRODUCTION
Clustering is an important problem in unsupervised learning that has been widely used in social network analysis, sensor networks, etc.
(Punj & Stewart, 1983; Dhillon & Modha, 2001; Banerjee et al., 2005; Abbasi & Younis, 2007).
The goal of clustering is to partition a set of data points into clusters such that items in the same cluster are expected to be similar, while items in different clusters should be different.
This is concretely measured by the sum of distances (or squared distances) between each point to its nearest cluster center.
One conventional notion to evaluate a clustering algorithms is: with high probability, cost ( C, D ) ≤ γOPT k ( D ) + ξ, where C is the centers output by the algorithm and cost ( C, D ) is some cost function deﬁned for
C on the dataset D .
OPT k ( D ) is the cost of optimal (oracle) k -median solution on D .
When everything is clear from context, we will use OPT for short.
Here, γ is called multiplicative error and ξ is called additive error .
Alternatively, we may also use the notion of expected cost.
Two popularly studied clustering problems are 1) the k -median problem, and 2) the k -means problem.
The origin of k -median dates back to the 1970’s (e.g., Kaufman et al.
(1977)), where one tries to ﬁnd the best location of facilities that minimizes the cost measured by the distance between clients and facilities.
Formally, given a set of points D and a distance measure, the goal is to ﬁnd k center points minimizing the sum of absolute distances of each sample point to its nearest center.
In k -means, the objective is to minimize the sum of squared distances instead.
There are two popular clustering algorithms.
One heuristic is the Lloyd’s algorithm (Lloyd, 1982), which is built upon an iterative distortion minimization approach.
In most cases, this method can only be applied to numerical data, typically in the Euclidean space.
Clustering in general metric spaces (discrete spaces) is also important and useful when dealing with, for example, the graph data, where Lloyd’s method is no longer applicable.
A more broadly applicable approach, the local search method (Kanungo et al., 2002; Arya et al., 2004), has also been widely studied.
It iteratively ﬁnds the optimal swap between the center set and non-center data points to keep lowering the cost.
Local search can achieve a constant approximation ratio ( γ = O (1) ) to the optimal solution for k -median (Arya et al., 2004).
Initialization of cluster centers.
It is well-known that the performance of clustering can be highly sensitive to initialization.
If clustering starts with good initial centers (i.e., with small approximation error), the algorithm may use fewer iterations to ﬁnd a better solution.
The k -median++ algorithm (Arthur & Vassilvitskii, 2007) iteratively selects k data points as initial centers, favoring distant points in a probabilistic way (see Appendix A for more details).
Intuitively, the initial centers tend to be well spread over the data points (i.e., over different clusters).
The produced initial center is proved to have O (log k ) multiplicative error.
Followup works of k -means++ further improved its efﬁciency and scalability, e.g., Bahmani et al.
; Bachem et al.
; Lattanzi & Sohler (2019).
In this work, we propose a new initialization framework based on metric embedding methods, with comparable approximation error and running time as k -median++.
Importantly, our initialization scheme can be conveniently combined with the notion of differential privacy.
Clustering with Differential Privacy.
The concept of differential privacy (Dwork, 2006; McSherry & Talwar, 2007) has been popular to rigorously deﬁne and resolve the problem of keeping useful information for model learning, while protecting privacy for each individual.
Private k -means problem has been widely studied, e.g., Feldman et al.
Nock et al.
; Feldman et al.
(2017), mostly in the Euclidean space.
The paper (Balcan et al., 2017) considered identifying a good candidate set (in a private manner) of centers before applying private local search, which yields O (log 3 n ) multiplicative error and O (( k 2 + d ) log 5 n ) additive error.
Later on, the Euclidean k -means errors are further improved to γ =
O (1) and ξ =
O ( k 1 .
· d 0 .
+ k 1 . 5 ) by Stemmer & Kaplan (2018), with more advanced candidate set selection.
Huang & Liu (2018) gave an optimal algorithm in terms of minimizing Wasserstein distance under some data separability condition.
For private k -median clustering, Feldman et al.
(2009) considered the problem in high dimensional
Euclidean space.
However, it is rather difﬁcult to extend their analysis to more general metrics in discrete spaces (e.g., on graphs).
The strategy of Balcan et al.
(2017) to form a candidate center set could as well be adopted to k -median, which leads to O (log 3 / 2 n ) multiplicative error and
O (( k 2 + d ) log 3 n ) additive error in high dimensional Euclidean space.
Gupta et al.
(2010) proposed a private method for the classical local search heuristic in discrete space, which applies to both kmedians and k -means.
In order to cast privacy on each swapping step, the authors applied the exponential mechanism of McSherry & Talwar (2007).
Their method produced an (cid:15) -differentially private solution with cost 6 OPT + O ( (cid:52) k 2 log 2 n/(cid:15) ) , where (cid:52) is the diameter of point set.
The main contributions of this work include :
• We introduce Hierarchically Well-Separated Tree (HST), a metric embedding tree structure, to the k -median clustering problem.
Once the HST is constructed using the data samples, we provide an efﬁcient sampling strategy to select the initial center set, with an approximation factor O (log min { k, (cid:52)} ) in the non-private setting, which is O (log min { k, d } ) when (cid:52) = O ( d ) (e.g., bounded data).
This improves the O (log k ) error of k -means/median++ in e.g., the lower dimensional Euclidean space.
• The main strength of our HST initialization method is that it could be effectively adapted to differential privacy (DP). The so-called DP-HST algorithm is (cid:15) -DP
and outputs initial centers with O (log n ) multiplicative error and O ( (cid:15) − 1 (cid:52) k 2 log 2 n ) additive error.
Moreover, running DP-local search starting from this initialization gives O (1) multiplicative error and O ( (cid:15) − 1 (cid:52)
k 2 (log log n ) log n ) additive error, which improves previous results towards the well-known lower bound O ( (cid:15) − 1 (cid:52) k log( n/k )) on the additive error (Gupta et al., 2010) within a small O ( k log log n ) factor.
To our knowledge, this is the ﬁrst center initialization method with differential privacy guarantee and improved error rate in general metrics.
• We conduct experiments on simulated and real-world datasets to demonstrate the effectiveness of our methods.
In both non-private and private settings, our proposed HST-based approach achieves smaller cost at initialization than k -median++, which may also lead to improvements in the ﬁnal clustering quality. Our private algorithm can also save computational costs by reaching a good solution with fewer iterations
P RELIMINARIES
Deﬁnition 2.1 (Differential Privacy (DP) (Dwork, 2006)) .
If for any two adjacent data sets D and
D (cid:48) with symmetric difference of size one, for any O ⊂ Range ( A ) , an algorithm A satisﬁes
[Equation]
then algorithm A is said to be (cid:15) -differentially private.
Intuitively, differential privacy requires that after removing any observation, the output of D (cid:48) should not be too different from that of the original dataset D .
Smaller (cid:15) indicates stronger privacy, which, however, usually sacriﬁces utility.
Thus, one of the central topics in differential privacy literature is to balance the utility-privacy trade-off.
To achieve DP, it is common to introduce noise to the data or the algorithm output.
The Laplace mechanism adds Laplace( η ( f ) /(cid:15) ) noise to the output, which is known to achieve (cid:15) -DP.
The exponential mechanism is also a tool for many DP algorithms.
Let O be the set of feasible outputs.
The utility function q : D ×
O
→ R is what we aim to maximize.
The exponential mechanism outputs an element o ∈ O with probability P
[ A ( D ) =
o ] ∝ exp( (cid:15)q ( D,o ) 2 η ( q ) ) , where D is the input dataset and η ( f ) = sup | D − D (cid:48)
| =1 | f
( D ) − f
( D (cid:48) ) | is the sensitivity of f .
Both mechanisms will be used in the design of our proposed DP approach.
k -Median Clustering.
Following the framework of Arya et al.
; Gupta et al.
(2010), the problem of k -median clustering (DP and non-DP) studied in our paper is stated as below.
Deﬁnition 2.2 ( k -median) .
Given a universe point set U and a metric ρ : U × U → R , let D ⊆
U be a set of demand points.
The goal of DP k -median is to pick F ⊆ U with | F | = k to minimize
Private k -median: cost
[Equation]
(cid:88)
[Equation]
min
[Equation]
F [Equation] [Equation] At the same time, the output F is required to be (cid:15) -differentially private to D .
For standard nonprivate k -median, we assume U = D
and minimize k
[Equation]
We may drop “ F ” and use “ cost ( D ) ” or “ cost ( U ) ” if there is no risk of ambiguity.
To better understand the DP clustering problem, we provide an real-world example as follows.
Example 2.1.
Consider U to be the universe of all users in a social network (e.g., Twitter).
Each user (account) is public, but also has some private information that can only be seen by the data holder.
Let D be users grouped by some information that might be set as private.
Suppose a third party plans to collaborate with the most inﬂuential users in D for e.g., commercial purposes, thus requesting the cluster centers of D .
In this case, we need a strategy to safely release the centers, while protecting the individuals in D from being identiﬁed (since the membership of D is private).
The local search procedure for k -median proposed by Arya et al.
(2004) is summarized in Algorithm 1.
First we randomly pick k points in U as the initial centers.
In each iteration, we search over all x ∈ F and y ∈ U , and do the swap F ← F − { x } + { y } such that F − { x } + { y } improves the cost of F the most (if more than factor (1 − α/k ) where α > 0 is a hyper-parameter).
We repeat the procedure until no such swap exists.
Arya et al.
(2004) showed that the output centers F achievesapproximation error to the optimal solution, i.e., cost ( F ) ≤ 5 OPT .
Initialization while ∃
F, y U s.t cost ( F − { x } + { y } ) ≤ ( −
) do Select
F i × ( D F i ) with arg min ,y { cost F − { x } + { y } ) }
Swap operation: F ← F − { x } + { y }
Output: Center set F
I NITIALIZATION VIA H IERARCHICALLY W ELL -S EPARATED T REE (HST)
In this section, we propose our new initialization scheme for k -median clustering, and provide our analysis in the non-private case solving (2).
The idea is based on the metric embedding theory.
We will start with an introduction to the main tool used in our approach. Level Level
[Figure] 3. H IERARCHICALLY W ELL -S EPARATED T REE (HST)
In this paper, for an L -level tree, we will count levels in descending order down the tree.
That is, the root is level L , and its children form level L − 1 , and etc.
We use h v to denote the level of v , and n i be the number of nodes at level i .
The Hierarchically Well-Separated Tree (HST) is based on the padded decompositions of a general metric space in a hierarchical manner (Fakcharoenphol et al., 2004).
Let ( U, ρ ) be a metric space with | U | = n , and we will refer to this metric space without speciﬁc clariﬁcation.
A β –padded decomposition of U is a probabilistic distribution of partitions of U such that the diameter of each cluster U i ∈
U is at most β , i.e., ρ ( u, v ) ≤ β , ∀ u, v ∈ U i , i = 1 , ..., k .
Based on the this, we will adopt the standard 2-HST for our algorithm design.
Deﬁnition 3.1.
Assume the smallest distance between u, v ∈ U is 1, and (cid:52) = max u,v ∈ U ρ ( u, v ) .
A 2-Hierarchically Well-Separated Tree (2-HST) is an edge-weighted rooted tree T , such that an edge between any pair of two nodes of level i − 1 and level i has length at most (cid:52) /
2 L − i .
We brieﬂy describe the construction of 2-HST, and place the detailed algorithm in Algorithm 7 in the Appendix A. We
ﬁrst ﬁnd
a padded decomposition P L
= { P L, 1 , ..., P L,n L } of U with parameter β
=
(cid:52) / 2 .
The center of each partition in P L,j serves as a root node in level L .
Then, we re-do a padded decomposition for each partition P L,j , to ﬁnd sub-partitions with diameter β
= (cid:52) / 4 , and set the corresponding centers as the nodes in level L − 1 , and so on.
Each partition at level i is obtained with β =
(cid:52) /
2 L − i .
This process proceeds until a node has a single point, or a pre-speciﬁed tree depth is reached.
In Figure 1, we provide an example of L = 3 -level 2-HST (left panel), along with its underlying padded decompositions (right panel).
HST induces a tree metric, which will be related to the general metric in our analysis.
It is worth mentioning that, there are polynomial time algorithms for computing an exact k-median solution in the tree metric (Tamir (1996); Shah (2003)).
However, the dynamic programming algorithms have high complexity ( O ( kn 2 ) and O ( k 2 nh ) where h is at least O (log n ) , respectively), making them unsuitable to serve the purpose of fast initialization.
Moreover, it is unknown how to apply them effectively to the private case.
Hence, next, we propose a novel tree search algorithm that is very efﬁcient, produces a O (1) approximation error in the tree metric, and can be extended to DP easily.
3. HST I NITIALIZATION A LGORITHM
Let L = log ∆ and suppose T is a level- L 2-HST in ( U, ρ ) , where for simplicity we assume L is an integer.
For a node v at level i , we use T ( v ) to denote the subtree rooted at v .
Let N v =
| T ( v ) | be the number of data points in T ( v ) .
The sampling strategy for initial centers is presented in Algorithm 2, which has two phases: subtree search and leaf search.
Subtree search.
The ﬁrst step is to identify the subtrees that contain the k centers.
To begin with, k initial centers C 1 are picked from T who have the largest score ( v ) =
N ( v ) · 2 h v .
This is intuitive, since to get a good clustering, we typically want the ball surrounding each center to include more data points.
Next, we do a screening over C 1 : if there is any ancestor-descendant pair of nodes, we remove the ancestor from C 1 .
If the current size of C 1 is smaller than k , we repeat the process until k centers are chosen (we do not re-select nodes in C 1 and their ancestors).
This way, C 1 contains k
Input: U , (cid:52) , k
Initialization: L = log (cid:52) , C 0 = ∅ , C 1 = ∅
Call Algorithm 7 to build a level- L 2-HST T based on input U for each node v in T do
N v ← | U ∩ T ( v ) | score ( v ) ← N v · 2 h v while | C 1 | < k do
Add top ( k − | C 1 | ) nodes with highest score in T to Cfor each v ∈ C 1 do
C 1 = C 1 \ { v } , if ∃ v (cid:48)
∈ C 1 that v (cid:48) is a descendant of v
C 0 = FIND-LEAF
( T, C 1 )
Output: Initial center set C 0 ⊆
U
Algorithm
Input: T , C
Initialization: C 0 = ∅ for each node v in C 1 do while v is not a leaf node do v ← arg w max { N w , w ∈ ch ( v ) } , where ch ( v ) denotes the children nodes of v
Add v to C
Output: Initial center set C 0 ⊆
U root nodes of k disjoint subtrees.
For any node w with T ( w ) ∩ C 1 = ∅ and a node v ∈ C 1 , if w is not an ancestor of v , then score ( w ) ≤ score ( v ) .
Leaf search.
After we ﬁnd C 1 the set of k subtrees, the next step is to ﬁnd the center in each subtree using Algorithm 3 (“FIND-LEAF”).
We employ a greedy search strategy, by ﬁnding the child node with largest score level by level, until a leaf is found. This approach is intuitive since the diameter of the partition ball exponentially decays with the level. Therefore, we are in a sense focusing more and more on the region with higher density (i.e., with more data points). The time complexity is given as below, considering the Euclidean space as an example.
Proposition 3.1 (Complexity) .
Algorithm 2 takes O ( dn log n ) time in the Euclidean space.
Remark 3.1.
The complexity of HST initialization is in general comparable to the O ( dnk ) of kmedian++.
Our algorithm would be faster if k , the number of centers, is larger.
See Appendix B for a numerical comparison of the running time.
3. A PPROXIMATION E RROR OF HST I NITIALIZATION
Firstly, we show that the initial center set produced by Algorithm 2 is already a good approximation to the optimal k -median solution.
Let ρ T ( x, y )
=
d T ( x, y ) denote the “2-HST metric” between x and y in the 2-HST T , where d T ( x, y ) is the tree distance between nodes x and y in T .
In 2-HST, by Deﬁnition 3.1 and (cid:52) = 2 L , in the analysis we assume equivalently that the edge weight of the i -th level 2 i − 1 .
The crucial step of our analysis is to examine the approximation error in terms of the 2-HST metric, after which the error can be easily adapted to the general metrics by Lemma 3.2.
Lemma 3.2.
(Bartal, 1996).
In a metric space ( U, ρ ) with | U | = n and diameter (cid:52) , it holds that
E [ ρ T ( x, y )]
= O (min { log n, log (cid:52)} )
ρ ( x, y ) .
In R d , E [ ρ T ( x, y )]
= O ( d ) ρ ( x, y ) .
Recall C 0 , C 1 from Algorithm 2.
We deﬁne cost
[Equation]
(3) cost
[Equation]
[Equation]
For simplicity, we will use cost Tk (cid:48)
( U ) to denote cost
Tk (cid:48)
( U, C 1 ) .
Here, OPT Tk (5) is the cost of the global optimal solution with 2-HST metric.
The last equality in (5) holds because the optimal centers set can always located in k disjoint subtrees, as each leaf only contain one point.
(3) is the k -median cost with 2-HST metric of the output C 0 of Algorithm 2.
(4) is the oracle cost after the subtrees are chosen.
That is, it represents the optimal cost to pick one center from each subtree in
C 1 .
Firstly, we bound the approximation error of the subtree search process.
Lemma 3.3 (Subtree search) .
cost Tk (cid:48) ( U ) ≤ 5 OPT Tk ( U ) .
Next, we show that the greedy leaf search (Algorithm 3) only has constant extra multiplicative error.
Lemma 3.4 (Leaf search) .
cost Tk ( U ) ≤ 2 cost Tk (cid:48) ( U ) .
Combining Lemma 3.3 and Lemma 3.4, we have the next Theorem.
Theorem 3.5 (2-HST error) .
Running Algorithm 2, we have cost Tk ( U ) ≤ 10 OPT Tk ( U ) .
Thus, HST-initialization produces an O (1) approximation to OPT in the 2-HST metric.
Deﬁne cost k ( U ) as (2) for our HST centers, and the optimal cost w.r.t.
ρ as
[Equation]
We have the following result in the general metric space based on Lemma 3.2.
Theorem 3.6.
Running Algorithm 2 gives E [ cost k ( U )]
=
O (min { log n, log (cid:52)} )
OPT k ( U ) .
Remark 3.2.
In the Euclidean space, Makarychev et al.
(2019) proved O (log k ) random projections sufﬁce for k -median to achieve O (1) error.
Thus, if (cid:52) =
O ( d ) (e.g., bounded data), by Lemma 3.2, there exists an algorithm with HST initialization that achieves O (log(min { d, k } )) error, which is better than O (log k ) of k -median++ when d is small.
NDP-HST Local Search.
We can apply standard local search starting from the HST initialization in Algorithm 1.
We call it the NDP-HST (“NDP” stands for “Non-Differentially Private”) method, with the following guarantee.
Theorem 3.7.
NDP-HST achieves O (1) approximation in expected O
( k log min { log n, log (cid:52)} ) number of iterations for input in general metric space.
Before ending this section, we remark that HST initialization and the analysis can be extended to k -means clustering analogously (see Appendix D).
In a general metric space, E [ cost km ( U )] = O (min { log n, log (cid:52)} ) 2 OPT km ( U ) where cost km ( U ) is the optimal k -means cost.
HST I NITIALIZATION WITH D IFFERENTIAL P RIVACY
In this section, we consider private HST initialization method.
Recall in this setting, U is the universe of data points, and D ⊂ U is a demand set that needs to be clustered with privacy.
Since U is public, running initialization algorithms on U would preserve the privacy of D .
Yet, this might be too expensive, and in many cases one would probably want to incorporate some information about D in the initialization, since D could be a very imbalanced subset of U .
For example, D may only contain data points from one cluster, out of tens of clusters in U .
In this case, initialization on U is likely to pick initial centers in multiple clusters, which would not be helpful for clustering on D .
Next, we show how our HST initialization can be easily combined with differential privacy that at the same time contains information about the demand set D , leading to improved approximation error (Theorem 4.3) and empirical clustering performance (Section 5).
Again, suppose T is an L = log (cid:52) -level 2-HST of universe U in a general metric space.
Denote
N v = | T ( v )
∩ D | for a node point v .
Our private HST initialization is similar to the non-private
Algorithm 2.
To gain privacy, we perturb N v by adding i.i.d.
Laplace noise:
[Equation]
Input: U, D , (cid:52) , k , (cid:15)
Build a level- L 2-HST T based on input U for each node v in T do
N v ← | D ∩ T ( v ) | ˆ N v ← N v + Lap (2 ( L − h v ) /(cid:15) ) score ( v ) ← ˆ N ( v ) · 2 h v
Based on ˆ N v , apply the same strategy as Algorithm 2: ﬁnd C 1 ; C 0 = FIND-LEAF
( C 1 ) Output: Private initial center set C 0 ⊆ U where Lap (2 ( L − h v ) /(cid:15) ) is a Laplace random number with rate 2 ( L − h v ) /(cid:15) .
We will use the perturbed ˆ N v for node sampling instead of the true value N v , as described in Algorithm 4.
The DP guarantee of this initialization scheme is straightforward by the composition of the Laplace mechanisms.
Theorem 4.1.
Algorithm 4 is (cid:15) -differentially private.
Proof.
For each level i , the subtrees T ( v, i ) are disjoint to each other.
The privacy used in i -th level is (cid:15)/ 2 ( L − i ) , and the total privacy is (cid:80) i (cid:15)/ 2 ( L − i ) < (cid:15) .
We now consider the approximation error.
As the structure of the analysis is similar to the non-DP case, we present the main result here and defer the detailed proofs to Appendix C.
Theorem 4.2.
Algorithm 4 outputs an initial center set such that
[Equation]
DP-HST Local Search.
Similarly, we can use private HST initialization to improve the performance of private k -median local search, which is presented in Algorithm 5.
After initialization, the DP local search procedure follows Gupta et al.
(2010) using the exponential mechanism.
-HST local search
Input: U , demand points D ⊆ U , parameter k, (cid:15) , T
Initialization: F 1 the private initial centers generated by Algorithm 4 with privacy (cid:15)/
Set parameter (cid:15) (cid:48)
=
(cid:15) 2 (cid:52) ( T +1) for i
= 1 to T do
Select ( x
, y ) ∈
F i × ( V \ F i ) with prob.
proportional to exp( − (cid:15) (cid:48) ×
( cost ( F i −{ x } + { y } ))
Let F i +1 ← F i − { x } + { y }
Select j from { 1 , 2 , ..., T + 1 } with probability proportional to exp( − (cid:15) (cid:48)
× cost ( F j ))
Output: F = F j the private center set
Theorem 4.3.
Algorithm 5 achieves (cid:15) -differential privacy.
The output centers admit cost k ( D ) ≤ 6 OPT k
( D ) + O ( (cid:15) − 1 k 2 (cid:52) (log log n ) log n ) with probability (1 − 1 /poly ( n )) , with T =
O ( k log log n ) iterations.
The DP local search with random initialization (Gupta et al., 2010) has 6 multiplicative error and
O ( (cid:15) − 1 (cid:52) k 2 log 2 n ) additive error.
Our result improves the log n term to log log n in the additive error.
Meanwhile, the number of iterations needed is improved from T
= O ( k log n ) to O ( k log log n ) (see Appendix B for an empirical justiﬁcation).
Notably, it has been shown in Gupta et al.
that for k -median problem, the lower bounds on the multiplicative and additive error of any (cid:15) -DP algorithm are O (1) and O ( (cid:15) − 1 (cid:52) k log( n/k )) , respectively.
Our result matches the lower bound on the multiplicative error, and the additive error is only worse than the bound by a factor of O ( k log log n ) which is typically small in many cases.
Thus, our private HST initialization method pushes the approximation error of private local search closer to the lower bound.
To our knowledge, Theorem 4. is the ﬁrst result in literature to improve the error of DP local search in general metric space.
E XPERIMENTS
We numerically test the proposed methods on two problems—clustering in an Euclidean space and on a graph.
Our results show that the proposed HST initialization can improve the performance of using k -median++ initialization in both non-private and private clustering tasks.
5. D ATASETS AND A LGORITHMS
Discrete Euclidean space.
Following Balcan et al.
, we test k -median clustering on the
MNIST hand-written digit dataset (LeCun et al., 1998) with 10 natural clusters (digit 0 to 9).
We set U as 10000 randomly chosen data points.
We choose the demand set D using two strategies: 1) “balance”, where we randomly choose 500 samples from U ; 2) “imbalance”, where D containsrandom samples from U only from digit “0” and “8” (two clusters).
We note that, the imbalanced D is a very practical setting in real-world scenarios, where data are typically not uniformly distributed.
On this dataset, we test clustering with both l 1 and l 2 distance as the underlying metric.
Metric space induced by graph.
Random graphs have been widely considered in testing k -median methods (Balcan et al., 2013; Todo et al., 2019).
The construction of graphs follows a similar approach as the synthetic pmedinfo graphs provided by the popular OR-Library (Beasley, 1990).
The metric ρ for this experiment is the shortest (weighted) path distance on graph.
To generate a size n graph, we ﬁrst randomly split the nodes into 10 clusters.
Within each cluster, each pair of nodes is connected with probability 0 .
2 and weight drawn from standard uniform distribution.
For each pair of clusters, we randomly connect some nodes from each cluster, with weights following uniform [0 .
5 , r ] .
A larger r makes the graph more separable, i.e., clusters are farther from each other (see Appendix B for example graphs).
We present two cases: r = 1 and r = 100 .
For this task, U has 3000 nodes, and the private set D is chosen using similar “balanced” and “imbalanced” scheme as described above.
In the imbalanced case, we choose D randomly from only two clusters.
Algorithms.
We compare the following clustering algorithms in both non-DP and DP setting.
• NDP-rand: Local search on D with random initialization (Algorithm 1).
• NDP-kmedian++: Algorithm 1 with k -median++ initialization.
• NDP-HST: Algorithm 1 with HST initialization, as described in Section 3.
• DP-rand:
Standard private local search algorithm (Gupta et al., 2010), which is Algorithm 5 with initial centers randomly chosen from U .
• DP-kmedian++: Algorithm 5 with k -median++ initialization run on U .
• DP-HST: Private local search with HST-initialization (Algorithm 5).
For non-private tasks, we set L = 6 .
For private clustering, we use L = 8 .
For non-DP methods, we set α = 10 − 3 in Algorithm 1 and the maximum number of iterations as 20.
To examine the quality of initialization as well as the ﬁnal centers, We report both the cost at initialization and the cost of the ﬁnal output.
For DP methods, we run the algorithms for T =steps and report the results with (cid:15)
= 1 .
We test k ∈ { 2 , 5 , 10 , 15 , 20 } .
The average cost over T iterations is reported for more robustness.
All results are averaged over 10 independent repetitions.
5. R ESULTS
The results on MNIST dataset are given in Figure 2 for l 1 (left two columns) and l 2 (right two columns) metric.
The comparisons are similar in both cases.
• We see that the initial centers generated by HST has lower k -median cost than k -median++ and random initialization, for both non-DP and DP setting, and for both balanced and imbalanced demand set D .
This conﬁrms that the proposed HST initialization is more powerful than k -median++ in ﬁnding good initial centers.
• From the ﬁnal k -median cost plots, we also observe lower cost of HST approaches in DP clustering.
In the non-DP case, the curves overlap, which means despite that HST offers better initial centers, local search can always ﬁnd a good solution eventually. [Figure]
[Figure] • The advantage of HST in both initial and ﬁnal cost is more signiﬁcant when D is an imbalanced subset of U .
As mentioned before, this is because our HST initialization approach also privately incorporates the information of D .
The set of results on the graph dataset is reported in Figure
[Figure]
which gives us similar conclusion.
In all cases, our proposed HST method ﬁnds better initial centers with smaller cost than k -median++.
In terms of the ﬁnal clustering output, HST again considerably outperforms k -median++ in the private and imbalanced D setting, for both r = 100 (highly separable graph) and r = 1 (less separable graph).
The improvement of HST over k -median++ is especially signiﬁcant in the harder tasks when r
= 1 , i
[Figure]
e., the clusters are nearly mixed up
[Figure]
C ONCLUSION
In this paper
[Figure]
we propose a new initialization framework for the k -median problem in general discrete metric space.
Our approach is called HST, which leverages tools from metric embedding theory.
Our novel tree search approach has comparable efﬁciency and cost to k -median++ initialization.
Moreover, we propose differentially private (DP) HST center initialization algorithm, which adapts to the private demand point set, leading to better clustering performance.
When combined with subsequent DP local search heuristic, our algorithm is able to improve the addition error of prior works, which is close to the theoretical lower bound within a small factor.
Experiments with Euclidean metrics and graph metrics verify the effectiveness of our methods.
In the paper, we compared our HST initialization mainly with another (perhaps most well-known) initialization algorithm for clustering, the k -median++ (Arthur & Vassilvitskii, 2007). For reference, we present the concrete procedures in Algorithm 6. Here, the function D ( u, C ) is the shortest distance from a data point u to the closest (center) point in set C .
Arthur & Vassilvitskii (2007) showed that the output centers C by k -median++ achieves O (log k ) approximation error, in O ( dnk ) time.
Algorithm
Input: Data points U , number of centers k
Set C =
Randomly pick a point c 1 in U and set C
= C ∪ { c 1 } for i = 2 to k do
Select c i = u ∈ U with probability
[Equation]
[Figure]
[Equation]
C = C ∪ { c
[Equation]
Output: k -median++ initial center set C
A
C ONSTRUCTING A 2-HST
As presented in Algorithm 7, the construction starts by applying a permutation π on U , such that in following steps the points are picked in a random sequence.
We ﬁrst ﬁnd a padded decomposition
P L = { P L, 1 , ..., P L,n L } of U with parameter β
=
(cid:52) / 2 .
The center of each partition in P L,j serves as a root node in level L .
Then, we re-do a padded decomposition for each partition P L,j , to ﬁnd sub-partitions with diameter β
= (cid:52) / 4 , and set the corresponding centers as the nodes in level L − 1 , and so on.
Each partition at level i is obtained with β =
(cid:52) /
2 L − i .
This process proceeds until a node has a single point, or a pre-speciﬁed tree depth is reached.
In Figure 1, we provide an example of L = 3 -level 2-HST (left panel), along with its underlying padded decompositions (right panel).
Algorithm
Randomly pick a point in U as the root node of T
Let r = (cid:52) /
Apply a permutation π on U //
so points will be chosen in a random sequence for each v ∈ U do
Set C v =
[ v ] for each u ∈ U do
Add u ∈ U to C v if d ( v, u ) ≤ r and u / ∈ (cid:83) v (cid:48) (cid:54) =
v C v (cid:48)
Set the non-empty clusters
C v as the children nodes of T for each non-empty cluster C v do
Run 2-HST ( C v , L − 1) to extend the tree T ; stop until L levels or reaching a leaf node Output: 2-HST T
B M ORE E XPERIMENTS B. E XAMPLES OF G RAPH D ATA
In Figure 4, we plot two example graphs (subgraphs of 50 nodes) with r = 100 and r = 1 . When r = 100 , the graph is highly separable (i.e., clusters are far from each other). When r = 1 , the clusters are harder to be distinguished from each other. [Figure]
. R UNNING T IME C OMPARISON WITH k - MEDIAN ++
In Proposition 3.1, we show that our HST initialization algorithm admits O ( dn log n ) complexity when considering the Euclidean space. With a smart implementation of Algorithm 6 where each data point tracks its distance to the current closest candidate center in C , k -median++ has O ( dnk ) running time. Therefore, the running time of our algorithm is in general comparable to k -median++.
Our method would run faster if k = Ω(log n ) .
In Figure 5, we plot the empirical running time of HST initialization against k -median++, on MNIST dataset with l 2 distance (similar comparison holds for l 1 ).
From the left subﬁgure, we see that k -median++ becomes slower with increasing k , and our method is more efﬁcient when k > 20 .
In the right panel, we observe that the running time of both methods increases with larger sample size n .
Our HST algorithm has a slightly faster increasing rate, which is predicted by the complexity comparison ( n log n v.s. n ).
However, this difference in log n factor would not be too signiﬁcant unless the sample size is extremely large.
Overall, our numerical results suggest that in general, the proposed HST initialization would have similar efﬁciency as k -median++ in common practical scenarios.
[Figure]
B. I MPROVED I TERATION C OST OF DP-HST
In Theorem 4.3, we show that under differential privacy constraints, the proposed DP-HST (Algorithm 5) improves both the approximation error and the number of iterations required to ﬁnd a good solution of classical DP local search (Gupta et al., 2010).
In this section, we provide some numerical results to justify the theory.
First, we need to properly measure the iteration cost of DP local search.
This is because, unlike the non-private clustering, the k -median cost after each iteration in DP local search is not decreasing monotonically, due to the probabilistic exponential mechanism.
To this end, for the cost sequence with length T = 20 , we compute its moving average sequence with window size 5 .
Attaining the minimal value of the moving average indicates that the algorithm has found a “local optimum”, i.e., it has reached a “neighborhood” of solutions with small clustering cost.
Thus, we use the number of iterations to reach such local optimum as the measure of iteration cost.
The results are provided in
Figure 6.
We see that on all the tasks (MNIST with l 1 and l 2 distance, and graph dataset with r =and r = 100 ), DP-HST has signiﬁcantly smaller iterations cost.
In Figure 7, we further report the k -median cost of the best solution in T iterations found by each DP algorithm.
We see that DP-HST again provide the smallest cost.
This additional set of experiments again validates the claims of
Theorem 4.3, that DP-HST is able to found better initial centers in fewer iterations.
[Figure]
i t e r a t i on s t
o m i n c o s t
[Figure]
i t e r a t i on s t
o m i n c o s t
[Figure] [Figure] C P ROOFS The following composition result of differential privacy will be used in our proof.
Theorem C.1 (Composition Theorem (Dwork, 2006)) .
If Algorithms A 1 , A 2 , ..., A m are (cid:15) 1 , (cid:15) 2 , ..., (cid:15) m differentially private respectively, then the union ( A 1 ( D ) , A 2 ( D ) , ...,
A m ( D )) is (cid:80) mi =1 (cid:15)
i -DP.
C. P ROOF OF L EMMA 3.
Proof.
Consider the intermediate output of Algorithm 2, C 1 = { v 1 , v 2 , ..., v k } , which is the set of roots of the minimal subtrees each containing exactly one output center C 0 .
Suppose one of the optimal “root set” that minimizes (4) is C ∗ 1 = { v (cid:48) 1 , v (cid:48) 2 , ..., v (cid:48) k } .
If C 1 = C ∗ 1 , the proof is done.
Thus, we prove the case for C 1 (cid:54) =
C ∗ 1 .
Note that T ( v ) , v ∈ C 1 are disjoint subtrees.
We have the following reasoning.
• Case 1: for some i, j (cid:48) , v i is a descendant node of v (cid:48)
j .
Since the optimal center point f ∗ is a leaf node by the deﬁnition of (4), we know that there must exist one child node of v (cid:48)
j that expands a subtree which contains f ∗ .
Therefore, we can always replace v (cid:48)
j by one of its child nodes.
Hence, we can assume that v i is not a descendant of v (cid:48)
j .
Note that, we have score ( v (cid:48) j ) ≤ score ( v i ) if v (cid:48) j / ∈ C ∗ 1 ∩ C 1 .
Algorithm 2 sorts all the nodes based on cost value, and it would have more priority to pick v (cid:48)
j than v i if score ( v (cid:48) j ) > score ( v i ) and v i is not a child node of v (cid:48)
j . • Case 2: for some i, j (cid:48) , v (cid:48)
j is a descendant of v i .
In this case, optimal center point f ∗ , which is a leaf of T ( v i ) , must also be a leaf node of T ( v (cid:48) j ) .
We can simply replace C 1 with the swap C 1 \ { v i } + { v (cid:48) j } which does not change cost Tk (cid:48) ( U ) .
Hence, we can assume that v (cid:48)
j is not a descendant of v i .
• Case 3:
Otherwise.
By the construction of C 1 , we know that score ( v (cid:48) j ) ≤ min { score ( v i ) , i = 1 , ..., k } when v (cid:48)
j ∈ C ∗ 1 \ C 1 .
Consider the swap between C 1 and C ∗ 1 .
By the deﬁnition of tree distance, we have OPT Tk ( U ) ≥ (cid:80) v i ∈ C 1 \ C ∗ 1 N v
i 2 h vi , since { T ( v i ) , v i ∈ C 1 \ C ∗ 1 } does not contain any center of the optimal solution determined by C ∗ 1 (which is also the optimal “root set” for OPT Tk ( U ) ).
Thus, we only need to consider Case 3.
Let us consider the optimal clustering with center set be
C ∗ =
{ c ∗ 1 , c ∗ 2 , ..., c ∗ k } (each center c ∗ j is a leaf of subtree whose root be c (cid:48) j ), and S (cid:48)
j be the leaves assigned to c ∗ j .
Let S
j denote the set of leaves in S (cid:48)
j whose distance to c ∗ j is strictly smaller than its distance to any centers in C 1 .
Let P j denote the union of paths between leaves of S j to its closest center in C 1 .
Let v (cid:48)(cid:48)
j be the nodes in P j with highest level satisfying T ( v (cid:48)(cid:48)
j ) ∩ C 1 = ∅ .
The score of v (cid:48)(cid:48)
j is
[Equation] N ( v [Equation] j ) .
That means the swap with a center v (cid:48)
j into C 1 can only reduce 4 · 2 h v (cid:48)(cid:48)
j N ( v (cid:48)(cid:48) j ) to cost Tk (cid:48)
( U ) (the tree distance between any leaf in S j and its closest center in C 1 is at most 4 · 2 h v (cid:48)(cid:48) j ).
We just use v (cid:48)
j to represent v (cid:48)(cid:48) j for later part of this proof for simplicity.
By our reasoning, summing all the swaps over C ∗ 1 \ C 1 gives
[Equation]
Also, based on our discussion on Case 1, it holds that
[Equation]
Summing them together, we have cost T k (cid:48)
( U ) ≤ {+
+} OPT T k ( U ) .
C. P ROOF OF L EMMA 3.
Proof.
Since the subtrees in C 1 are disjoint, it sufﬁces to consider one subtree with root v .
With a little abuse of notation, let cost T 1 (cid:48)
( v, U ) denote the optimal k -median cost within the point set T ( v ) with one center in 2-HST:
[Equation]
which is the optimal cost within the subtree.
Suppose v has more than one children u, w, ... , otherwise the optimal center is clear.
Suppose the optimal solution of cost T 1 (cid:48) ( v, U ) chooses a leaf node in T ( u ) , and our HST initialization algorithm picks a leaf of T ( w ) .
If u = w , then HST chooses the optimal one where the argument holds trivially.
Thus, we consider u (cid:54) =
w .
We have the following two observations:
• Since one needs to pick a leaf of T ( u ) to minimize cost T 1 (cid:48) ( v, U ) , we have cost T 1 (cid:48) ( v, U ) ≥ (cid:80) x ∈ ch ( v ) ,x (cid:54) =
u N x · 2 h x where ch ( u ) denotes the children nodes of u . • By our greedy strategy, cost T 1 ( v, U ) ≤ (cid:80) x ∈ ch ( u ) N x · 2 h x ≤ cost T 1 (cid:48) ( v, U ) + N u · 2 h u .
Since h u = h w , we have
[Equation]
since our algorithm picks subtree roots with highest scores.
Then we have cost T 1 ( v, U ) ≤ cost T 1 (cid:48)
( v, U ) + N w · 2 h w ≤ 2 cost T 1 (cid:48) ( v, U ) .
Since the subtrees in C 1 are disjoint, the union of centers for OPT T 1 ( v, U ) , v ∈ C 1 forms the optimal centers with size k .
Note that, for any data point p ∈
U \ C 1 , the tree distance ρ T ( p, f ) for ∀ f
that is a leaf node of T ( v ) , v ∈ C 1 is the same.
That is, the choice of leaf in T ( v ) as the center does not affect the k -median cost under 2-HST metric.
Therefore, union bound over k subtree costs completes the proof.
C. P ROOF OF P ROPOSITION 3.
Proof.
It is known that the 2-HST can be constructed in O ( dn log n ) (Bartal, 1996).
The subtree search in Algorithm 2 involves at most sorting all the nodes in the HST based on the score, which takes O ( nlogn ) .
We use a priority queue to store the nodes in C 1 .
When we insert a new node v into queue, its parent node (if existing in the queue) would be removed from the queue.
The number of nodes is O ( n ) and each operation (insertion, deletion) in a priority queue based on score has
O (log n ) complexity.
Lastly, the total time to obtain C 0 is O ( n ) , as the FIND-LEAF only requires a top down scan in k disjoint subtrees of T .
Summing parts together proves the claim.
Similarly, we prove the error in general metric by ﬁrst analyzing the error in 2-HST metric.
Then the result follows from Lemma 3.2.
Let cost Tk ( D ) , cost Tk (cid:48)
( D ) and OPT Tk ( D ) be deﬁned analogously to (3), (4) and (5), where “ y ∈ U ” in the summation is changed into “ y ∈ D ” since D is the demand set.
That is,
[Equation]
We have the following.
Lemma C.2.
cost T k ( D ) ≤ 10 OPT T k
( D ) + 10 ck(cid:15) − 1 (cid:52) log n with probability 1 − 4 k/n c .
Proof.
The result follows by combining the following Lemma C.4, Lemma C.5, and applying union bound.
Lemma C.3.
For any node v in T , with probability 1 − 1 /n c , | ˆ N v · [Equation] v [Equation]
N
[Equation] [Equation] − [Equation]
log n . Proof. Since ˆ N v = N v + Lap (2 ( L − h v ) / 2 /(cid:15) ) , we have
[Equation]
As L = log (cid:52) , we have
[Equation]
Hence, for some constant c > 0 ,
[Equation]
Lemma C.4 (DP Subtree Search) .
With probability 1 − 2 k/n c , cost T k (cid:48) [Equation] D
[Equation] k [Equation] D ) + 4 ck(cid:15) − 1 (cid:52) log n .
Proof.
The proof is similar to that of Lemma 3.3.
Consider the intermediate output of Algorithm 2,
C 1 = { v 1 , v 2 , ..., v k } , which is the set of roots of the minimal disjoint subtrees each containing exactly one output center C 0 .
Suppose one of the optimal “root set” that minimizes (4) is C ∗ 1 = { v (cid:48) 1 , v (cid:48) 2 , ..., v (cid:48) k } .
Assume C 1 (cid:54) =
C ∗ 1 .
By the same argument as the proof of Lemma 3.3, we consider for some i, j such that v i (cid:54) = v (cid:48)
j , where v i is not a descendent of v (cid:48)
j and v (cid:48)
j is either a descendent of v i .
By the construction of C 1 , we know that score ( v (cid:48) j ) ≤ min { score ( v i ) , i = 1 , ..., k } when v (cid:48)
j ∈ C ∗ 1 \ C 1 .
Consider the swap between C 1 and C ∗ 1 .
By the deﬁnition of tree distance, we have
OPT Tk ( U ) ≥ (cid:80) v i ∈ C 1 \ C ∗ 1 N v
i 2 h vi , since { T ( v i ) , v i ∈ C 1 \ C ∗ 1 } does not contain any center of the optimal solution determined by C ∗ 1 (which is also the optimal “root set” for OPT Tk ).
Let us consider the optimal clustering with center set be C ∗ =
{ c ∗ 1 , c ∗ 2 , ..., c ∗ k } (each center c ∗ j is a leaf of subtree whose root be c (cid:48) j ), and S (cid:48)
j be the leaves assigned to c ∗ j .
Let S
j denote the set of leaves in S (cid:48)
j whose distance to c ∗ j is strictly smaller than its distance to any centers in C 1 .
Let P j denote the union of paths between leaves of S j to its closest center in C 1 .
Let v (cid:48)(cid:48)
j be the nodes in P j with highest level satisfying T ( v (cid:48)(cid:48)
j ) ∩ C 1 = ∅ .
The score of v (cid:48)(cid:48)
j is 2 h v (cid:48)(cid:48)
j N ( v (cid:48)(cid:48) j ) .
That means the swap with a center v (cid:48)
j into C 1 can only reduce 4 · 2 h v (cid:48)(cid:48)
j N ( v (cid:48)(cid:48) j ) to cost Tk (cid:48)
( U ) (the tree distance between any leaf in S j and its closest center in C 1 is at most 4 · 2 h v (cid:48)(cid:48) j ).
We just use v (cid:48)
j to represent v (cid:48)(cid:48) j for later part of this proof for simplicity.
Summing all the swaps over C ∗ 1 \ C 1 , we obtain cost T
[Equation]
OPT
[Equation]
N [Equation] Applying union bound with Lemma C.3, with probability 1 − 2 /n c , we have
[Equation]
Consequently, we have with probability, 1 − 2 k/n c ,
[Equation]
Lemma C.5 (DP Leaf Search) .
With probability 1 − 2 k/n c , Algorithm 4 produces initial centers with cost T k ( D ) ≤ 2 cost T k (cid:48)
( D ) + 2 ck(cid:15) − 1 (cid:52) log n .
Proof.
The proof strategy follows Lemma 3.4.
We ﬁrst consider one subtree with root v .
Let cost T 1 (cid:48) ( v, U ) denote the optimal k -median cost within the point set T ( v ) with one center in 2-HST:
[Equation]
Suppose v has more than one children u, w, ... , and the optimal solution of cost T 1 (cid:48) ( v, U ) chooses a leaf node in T ( u ) , and our HST initialization algorithm picks a leaf of T ( w ) .
If u = w , then HST chooses the optimal one where the argument holds trivially.
Thus, we consider u (cid:54) =
w .
We have the following two observations:
• Since one needs to pick a leaf of T ( u ) to minimize cost T 1 (cid:48) ( v, U ) , we have cost T 1 (cid:48) ( v, U ) ≥ (cid:80) x ∈ ch ( v ) ,x (cid:54) =
u N x · 2 h x where ch ( u ) denotes the children nodes of u . • By our greedy strategy, cost T 1 ( v, U ) ≤ (cid:80) x ∈ ch ( u ) N x · 2 h x ≤ cost [Equation] (cid:48) ( v, U ) + N u · 2 h u .
As h u = h w , leveraging Lemma C.3, with probability 1 − 2 /n c ,
[Equation]
since our algorithm picks subtree roots with highest scores.
Then we have cost T 1 ( v, D ) ≤ cost [Equation]
log n ≤ 2 cost Tk (cid:48) ( v, D ) + 2 c(cid:15) − 1 (cid:52) log n with high probability.
Lastly, applying union bound over the disjoint k subtrees gives the desired result.
C. P ROOF OF T HEOREM 4.
Proof.
The privacy analysis is straightforward, by using the composition theorem (Theorem C.1).
Since the sensitivity of cost ( · ) is (cid:52) , in each swap iteration the privacy budget is (cid:15)/ 2( T + 1) .
Also, we spend another (cid:15)/ 2( T + 1) privacy for picking a output.
Hence, the total privacy is (cid:15)/ 2 for local search.
Algorithm 4 takes (cid:15)/ 2 DP budget for initialization, so the total privacy is (cid:15) .
The analysis of the approximation error follows from Gupta et al.
(2010), where the initial cost is reduced by our private HST method.
We need the following two lemmas.
Lemma C.6 (Gupta et al.
Assume the solution to the optimal utility is unique.
For any output o ∈ O of 2 (cid:52) (cid:15) -DP exponential mechanism on dataset D , it holds for ∀ t > 0 that
[Equation]
where | O | is the size of the output set.
Lemma C.7 (Arya et al.
For any set F ⊆ D with | F | = k , there exists some swap ( x, y ) such that the local search method admits cost
[Equation]
From Lemma C.7, we know that when cost k ( F i , D ) > 6 OPT ( D ) , there exists a swap ( x, y ) s.t. cost k ( F i − { x } + { y } ,
[Equation]
At each iteration, there are at most n 2 possible outputs (i.e., possible swaps), i.e., | O | = n 2 .
Using
Lemma C.6 with t = 2 log n , for ∀ i ,
[Equation]
where cost k ( F ∗ i +1 , D ) is the minimum cost among iteration 1 , 2 , ..., t + 1 .
Hence, we have that as long as cost ( F i , D ) > 6 OPT ( D ) + 24 k log n (cid:15) (cid:48) , the improvement in cost is at least by a factor of (1 − 16 k ) .
By Theorem 4.2, we have cost k ( F 1 , D ) ≤ C (log n )(6 OPT ( D )+6 k (cid:52) log n/(cid:15) ) for some constant C > 0 .
Let T =
Ck log log n .
We have that
E [ cost ( F i , D )] ≤
[Equation]
OPT (
[Equation]
[Equation]
k(cid:15)
[Equation] 1 (cid:52) [Equation] Therefore, with probability at least (1 − T/n 2 ) , there exists an i < =
T s.t. cost ( F i , D ) ≤ 6 OPT ( D ) + 24 k log n (cid:15) (cid:48) .
Then by using the Lemma C.7, one will pick an F j with additional additive error 4 ln n/(cid:15) (cid:48) to the min { cost ( F j , D ) , j = 1 , 2 , ..., T } with probability 1 − 1 /n 2 .
Consequently, we know that the expected additive error is
[Equation]
with probability 1 − 1 /poly ( n ) .
D E XTEND HST I NITIALIZATION TO k -M EANS
Naturally, our HST method can also be applied to k -means clustering problem.
In this section, we extend the HST to k -means and provide some brief analysis similar to k -median.
We present the analysis in the non-private case, which can then be easily adapted to the private case.
Deﬁne the following costs for k -means.
[Equation]
For simplicity, we will use cost Tkm (cid:48)
( U ) to denote cost Tkm (cid:48)
( U, C 1 ) if everything is clear from context.
Here, OPT Tkm (14) is the cost of the global optimal solution with 2-HST metric.
Lemma D.1 (Subtree search) .
cost Tkm (cid:48)
( U ) ≤ 17 OPT Tkm ( U ) .
Proof.
The analysis is similar with the proof of Lemma 3.3.
Thus, we mainly highlight the difference.
Let us just use some notations the same as in Lemma 3.3 here.
Let us consider the clustering with center set be C ∗ =
{ c ∗ 1 , c ∗ 2 , ..., c ∗ k } (each center c ∗ j is a leaf of subtree whose root be c (cid:48) j ), and
S (cid:48)
j be the leaves assigned to c ∗ j in optimal k-means clustering in tree metric.
Let S j denote the set of leaves in S (cid:48)
j whose distance to c ∗ j is strictly smaller than its distance to any centers in C 1 .
Let P j denote the union of paths between leaves of S j to its closest center in C 1 .
Let v (cid:48)(cid:48)
j be the nodes in
P j with highest level satisfying T ( v (cid:48)(cid:48) j ) ∩ C 1 = ∅ .
The score of v (cid:48)(cid:48)
j is 2 h [Equation]
j N ( v (cid:48)(cid:48) j ) .
That means the swap with a center v (cid:48)
j into C 1 can only reduce (4 · 2 h v (cid:48)(cid:48) j ) 2 N ( v (cid:48)(cid:48) j ) to cost Tkm (cid:48)
( U ) .
We just use v (cid:48)
j to represent v (cid:48)(cid:48) j for later part of this proof for simplicity.
By our reasoning, summing all the swaps over
C ∗ 1 \ C 1 gives
[Equation]
Also, based on our discussion on Case 1, it holds that
[Equation]
Summing them together, we have cost T km (cid:48) ( U ) ≤ 17 OPT T km ( U ) .
Next, we show that the greedy leaf search strategy (Algorithm 3) only leads to an extra multiplicative error of 2.
Lemma D.2 (Leaf search) .
cost Tkm ( U ) ≤ 2 cost Tkm (cid:48)
( U ) .
Proof.
Since the subtrees in C 1 are disjoint, it sufﬁces to consider one subtree with root v .
With a little abuse of notation, let cost T 1 (cid:48)
( v, U ) denote the optimal k -means cost within the point set T ( v ) with one center in 2-HST:
[Equation]
which is the optimal cost within the subtree.
Suppose v has more than one children u, w, ... , otherwise the optimal center is clear.
Suppose the optimal solution of cost T 1 (cid:48) ( v, U ) chooses a leaf node in T ( u ) , and our HST initialization algorithm picks a leaf of T ( w ) .
If u = w , then HST chooses the optimal one where the argument holds trivially.
Thus, we consider u (cid:54) =
w .
We have the following two observations:
• Since one needs to pick a leaf of T ( u ) to minimize cost T 1 (cid:48) ( v, U ) , we have cost T 1 (cid:48) ( v, U ) ≥ (cid:80) x ∈ ch ( v ) ,x (cid:54) =
u N x · (2 h x ) 2 where ch ( u ) denotes the children nodes of
u . • By our greedy strategy, cost T 1 ( v, U ) ≤ (cid:80) x ∈ ch ( u ) N x · (2 h x ) 2 ≤ cost T 1 (cid:48) ( v, U )+ N u · (2 h u ) 2 .
Since h u = h w , we have
[Equation]
since our algorithm picks subtree roots with highest scores.
Then we have cost T 1 ( v, U ) ≤ cost T 1 (cid:48)
( v, U ) + N w · (2 h w ) 2 ≤ 2 cost T 1 (cid:48) ( v, U ) .
Since the subtrees in C 1 are disjoint, the union of centers for OPT T 1 ( v, U ) , v ∈ C 1 forms the optimal centers with size k .
Note that, for any data point p ∈
U \ C 1 , the tree distance ρ T ( p, f ) for ∀ f
that is a leaf node of T ( v ) , v ∈ C 1 is the same.
That is, the choice of leaf in T ( v ) as the center does not affect the k -median cost under 2-HST metric.
Therefore, union bound over k subtree costs completes the proof.
We are ready to state the error bound for our proposed HST initialization (Algorithm 2), which is a natural combination of Lemma D.1 and Lemma D.2.
Theorem D.3 (HST initialization) .
cost Tkm ( U ) ≤ 34 OPT Tkm ( U ) .
We have the following result based on Lemma 3.2.
Theorem D.4.
In a general metric space,
[Equation]