b

DiscoverSearch
About
My stuff
How to Solve Fair kk-Center in Massive Data Models
2020·arXiv
Abstract
Abstract

Fueled by massive data, important decision making is being automated with the help of algorithms, therefore, fairness in algorithms has become an especially important research topic. In this work, we design new streaming and distributed algorithms for the fair k-center problem that models fair data summarization. The streaming and distributed models of computation have an attractive feature of being able to handle massive data sets that do not ft into main memory. Our main contributions are: (a) the frst distributed algorithm; which has provably constant approximation ratio and is extremely parallelizable, and (b) a two-pass streaming algorithm with a provable approximation guarantee matching the best known algorithm (which is not a streaming algorithm). Our algorithms have the advantages of being easy to implement in practice, being fast with linear running times, having very small working memory and communication, and outperforming existing algorithms on several real and synthetic data sets. To complement our distributed algorithm, we also give a hardness result for natural distributed algorithms, which holds for even the special case of k-center.

Data summarization is a central problem in the area of machine learning, where we want to compute a small summary of the data. For example, if the input data is enormous, we do not want to run our machine learning algorithm on the whole input but on a small representative subset. How we select such a representative summary is quite important. It is well known that if the input is biased, then the machine learning algorithms trained on this data will exhibit the same bias. This is a classic example of selection bias but as exhibited by algorithms themselves. Currently used algorithms for data summarization have been shown to be biased with respect to attributes such as gender, race, and age (see, e.g., [KMM15]), and this motivates the fair data summarization problem. Recently, the fair k-center problem was shown to be useful in computing fair summary [KAM19]. In this paper, we continue the study of fair k-center and add to the series of works on fairness in machine learning algorithms. Our main results are streaming and distributed algorithms for fair k-center. These models are extremely suitable for handling massive datasets. The fact that data summarization problem arises when the input is huge makes our work all the more relevant!

Suppose the input is a set of real vectors with a gender attribute and you want to compute a summary of k data points such that both1 genders are represented equally. Say we are given a summary S. The cost we pay for not including a point in S is its Euclidean distance from S. Then the cost of S is the largest cost of a point. We want to compute a summary with minimum cost that is also fair, i.e., contains k/2 women and k/2 men. In one sentence, we want to compute a fair summary such that the point that is farthest from this summary is not too far. Fair k-center models this task: let the number of points in the input be n, the number of groups be m, target summary size be k, and we want to select a summary S such that S contains kjpoints belonging to Group  j, where �j kj = k. And we want to minimize maxx d(x,S) = maxx minx′∈S d(x,x′), where ddenotes the distance function. Note that each point belongs to exactly one of the m groups; for the case of gender, m = 2.

We call the special case where  m = 1 and k1 = k as just k-center throughout this paper. For k-center, there are simple greedy algorithms with an approximation ratio of 2 [Gon85, HS85], and getting better than 2-approximation is NP-hard [HN79]. The NP-hardness result also applies to the more general fair k-center. The best algorithm known for fair k-center is a 3-approximation algorithm that runs in time O(n2 logn) [CLLW16]. A linear-time algorithm with approximation guarantee of  O(2m), which is constant if m is, was given recently [KAM19]. Both of these algorithms work only in the traditional random access machine model, which is suitable only if the input is small enough to ft into fast memory. We give a two-pass streaming algorithm that achieves the approximation ratio arbitrarily close to 3. In the streaming setting, input is thought to arrive one point at a time, and the algorithm has to process the input quickly, using minimum amount of working memory—ideally linear in the size of a feasible solution, which is k for fair k-center. Our algorithm processes each incoming input point in O(k) time and uses space O(km), which is O(k) if the number of groups m is very small. This improves the space usage of the existing streaming algorithm [Kal19] almost quadratically, from  O(k2), while also matching the best approximation ratio achieved by Chen et al. We also give the frst distributed, constant approximation algorithm where the input is divided among multiple processors, each of which performs one round of computation and sends a message of size O(km) to a central processor, which then computes the fnal solution. Both rounds of computation are linear time. All the approximation, communication, space usage, and running-time guarantees are provable. To complement our distributed algorithm, we prove that any distributed algorithm, even randomized, that works by each processor sending a subset of its input to a central processor which outputs the solution, needs to essentially communicate the whole input to achieve an approximation ratio of better than 4. This, in fact, applies for the special case of k-center showing that known 4-approximation algorithm [MKC+15] for k-center is optimal.

We perform experiments on real and synthetic datasets and show that our algorithms are as fast as the linear-time algorithm of Kleindessner et al., while achieving improved approximation ratio, which matches that of Chen et al. Note that this comparison is possible only for small datasets, since those algorithms do not work either in streaming or in distributed setting. We also run our algorithms on a really large synthetic dataset of size 100GB, and show that their running time is only one order of magnitude more than the time taken to just read the input dataset from secondary memory.

As a further contribution, we give faster implementations of existing algorithms—those of Kale and Chen et al.

Related work

Chen et al. gave the frst polynomial-time algorithm that achieves 3-approximation. Kale achieves almost the same ratio using just two passes and also gives a one-pass  (17 + ε)-approximation algorithm, both using  O(k2) space.

One way that is incomparable to ours is to compute a fair summary is using a determinantal measure of diversity [CKS+18]. Fair clustering has been studied under another notion of fairness, where each cluster must be balanced with respect to all the groups (no over-or-under-representation of any group) [CKLV17], and this line of work also has received a lot of attention in a short span of time [BCFN19, AEKM19, BIPV19, SSS20, JSS20].

The k-median clustering problem with fairness constraints was frst considered by [HKK10] and with more general matroid constraints was studied by [KKN+11]. The work of Chen et al. and Kale also actually

applies for matroid constraints. There has been a lot of work done on fairness, and we refer the reader to overviews by [KAM19,

image

The input to fair k-center is a set X of n points in a metric space given by a distance function d. We denote this metric space by (X,d). Each point belongs to one of m groups, say  {1,...,m}. Let g : X −→ {1,...,m}denote this group assignment function. Further, for each group j, we are given a capacity  kj. Let k =�mj=1 kj. We call a subset  S ⊆ X feasibleif for every j, the set S contains at most  kj points from group j. The goal is to compute a feasible set of centers that (approximately) minimizes the clustering cost, formally defned as follows.

Defnition 1. Let A,B ⊆ X, then the clustering cost of A for B is defned as  maxb∈B mina∈A d(a,b).

Note here that we allow A to not be a subset of B. The following lemmas follow easily from the fact that the distance function d satisfes the triangle inequality.

Lemma 1. Let A,B,C ⊆ X. The clustering cost of A for C is at most the clustering cost of A for B plus the clustering cost of B for C.

Lemma 2. Suppose for a set T of points there exists a set S of k centers, not necessarily a subset of T , whose clustering cost for T is at most  ρ. If P ⊆ Tis a set of points separated pairwise by distance more than  2ρ, then|P| ⩽ k.

Proof. If |P| > k then some two points in P must share one of the k centers, and must therefore be both within distance  ρfrom that common center. Then by the triangle inequality, they cannot be separated by distance more than  2ρ.

We denote by  S∗ a feasible set which has the minimum clustering cost for X, and by OPT the minimum clustering cost. We assume that our algorithms have access to an estimate  τof OPT. When  τis at least OPT, our algorithms compute a solution of cost at most  ατfor a constant  α. Thus, when  τ ∈ [OPT,(1+ε)OPT],our algorithms compute a  (1 + ε)α-approximate solution. In Section 3.3 we describe how to efciently compute such a  τ.

Before stating algorithms, we describe some elementary procedures which will be used as subroutines in our algorithms.

getPivots(T,d,r)takes as input a set T of points with distance function d and a radius r. Starting with  P = ∅, it performs a single pass over T. Whenever it fnds a point q which is not within distance r from any point in P, it adds q to P. Finally, it returns P. Thus, P is a maximal subset of T of points separated pairwise by distance more than r. We call points in P pivots. By Lemma 2, if there is a set of k points whose clustering cost for T is at most  r/2, then |P| ⩽ k. Moreover, due to maximality of P, its clustering cost for T is at most r. Note that  getPivots()runs in time  O(|P| · |T |).

getReps(T,d,g,P,r)takes as input a set T of points with distance function d, a group assignment function  g, a subset P ⊆ T, and a radius  r. For each p ∈ P, initializing N(p) = {p}, it includes in N(p) one point, from each group, which is within distance r from p whenever such a point exists. Note that this is done while performing a single pass over T. This procedure runs in time  O(|P| · |T |).

image

Informally, if P is a good but infeasible set of centers, then  getReps()fnds representatives N(p) of the groups in the vicinity of each  p ∈ P. This, while increasing the clustering cost by at most r, gives us enough fexibility to construct a feasible set of centers. The procedure  HittingSet()that we describe next fnds a feasible set from a collection of sets of representatives.

image

a group assignment function g, and a vector  k = (k1,...,km)of capacities of the m groups. It returns a feasible set S intersecting as many  Ni’s as possible. This reduces to fnding a maximum cardinality matching in an appropriately constructed bipartite graph. It is important to note that this procedure does the post-processing: it doesn’t make any pass over the input stream of points. This procedure runs in time O(K2 · maxi |Ni|).

For interested readers, the pseudocodes of these procedures, an explanation of  HittingSet(), and theproof of its running time appear in Appendix A.

3.1 A Two-Pass Algorithm

Recall that  τis an upper bound on the minimum clustering cost. Our two-pass algorithm given by Algorithm 1 consists of three steps. First, the algorithm constructs a maximal subset  P ⊆ Xof pivots separated pairwise by distance more than  2τby executing one pass on the stream of points. In another pass, the algorithm computes a representative set N(q) of each pivot  q ∈ P. Points in the representative set of a pivot are within distance  τfrom the pivot. Due to the separation of  2τbetween the pivots, these representative sets are pairwise disjoint. Finally, a feasible set S intersecting as many N(q)’s as possible is found and returned. (It will soon be clear that S intersects all the  N(q)’s.)

The algorithm needs working space only to store the pivots and their representative sets. By substituting  S = S∗ in Lemma 2, the number of pivots is at most  k, that is, |P| ⩽ k. Since N(q)contains at most one point from any group, it has at most  m − 1points other than q. Thus,

Observation 1. The two-pass algorithm needs just enough working space to store km points.

The calls to  getPivots and getRepsboth take time  O(|P| · |X|) = O(kn), with O(|P|) = O(k) updatetime per point. The call to  HittingSettakes time  O(|P|2 · maxq∈P |N(q)|) = O(mk2). Thus,

Observation 2. The two-pass algorithm runs in time  O(kn + mk2), which is O(kn) when m, the number of groups, is constant.

We now prove the approximation guarantee.

Theorem 1. The two-pass algorithm returns a feasible set whose clustering cost is at most  3τ. This is a 3(1 + ε)-approximation when  τ ∈ [OPT,(1 + ε)OPT].

image

Proof. Recall that  S∗ is a feasible set having clustering cost at most  τ. For each q ∈ P let cq ∈ S∗ denotea point such that  d(q,cq) ⩽ τ. Since the points in P are separated by distance more than  2τ, the points cqare all distinct. Recall that N(q), the output of  getReps(), contains one point from every group which has a point within distance  τ from q. Therefore, N(q) contains a point, say  bq, from the same group as  cqsuch that  d(q,bq) ⩽ τ. Consider the set  B = {bq : q ∈ P}. This set intersects N(q) for each q. Furthermore, B contains exactly as many points from any group as  {cq : q ∈ P} ⊆ S∗, and therefore, B is feasible. Thus, there exists a feasible set, namely B, intersecting all the pairwise disjoint N(q)’s. Recall that S, the output of  HittingSet(), is a feasible set intersecting as many N(q)’s as possible. Thus, S also intersects all the N(q)’s.

Now, the clustering cost of S for P is at most  τ, because Sintersects  N(q) for each q ∈ P. The clustering cost of P for X is at most  2τby the maximality of the set returned by  getPivots(). These facts and Lemma 1 together imply that the clustering cost of S, the output of the algorithm, for X is at most  3τ.

3.2 A Distributed Algorithm

In the distributed model of computation, the set X of points to be clustered is distributed equally among ℓprocessors. Each processor is allowed a restricted access to the metric d: it may compute the distance between only its own points. Each processor performs some computation on its set of points and sends a summary of small size to a coordinator. From the summaries, the coordinator then computes a feasible set S of points which covers all the n points in X within a small radius. Let  Xidenote the set of points distributed to processor i.

The algorithm executed by each processor i is given by Algorithm 2, which consists of two main steps. In the frst step, the processor uses Gonzalez’s farthest point heuristic to fnd k + 1 points. The frst k of those constitute the set  Pi, which we will call the set of local pivots. The point  pk+1is the farthest point from the set of local pivots, and it is at a distance  2rifrom the set of local pivots. Thus, every point  Xi iswithin distance  2rifrom the set of pivots. This means,

Observation 3. The clustering cost of  Pi for Xi is 2ri.

In the second step, for each local pivot  p ∈ Pi, the processor computes a set L(p) of local representatives in the vicinity of p. Finally, the set  Piof local pivots and the union  Li = �p∈Pi L(p)of local representative sets is sent to the coordinator. Since L(p) contains at most one point from any group, it has at most  m − 1points other than  p. Since |Pi| = kwe have the following observation.

image

Observation 4. Each processor sends at most km points to the coordinator.

Moreover, the separation between the local pivots is bounded as follows.

Lemma 3. For every processor  i, we have ri ⩽ OPT ⩽ τ.

Proof. Suppose ri > τ. Then {pi1,...,pik+1} ⊆ Xiis a set of k +1 points separated pairwise by distance more than  2τ. But S∗ is a set of at most k points whose clustering cost for  Xi is OPT ⩽ τ. This contradicts Lemma 2.

Observation 3 allows us to defne a covering function cov from X, the input set of points, to �ℓi=1 Pi,the set of local pivots, as follows.

Defnition 2. Let p be an arbitrary point in X. Suppose p is processed by processor  i, that is, p ∈ Xi. Thencov(p) is an arbitrary local pivot in  Piwithin distance  2ri from p.

Since the processors send only a small number of points to the coordinator, it is very well possible that the optimal set  S∗ of centers is lost in this process. In the next lemma, we claim that the set of points received by the coordinator contains a good and feasible set of centers nevertheless.

Lemma 4. The set L = �ℓi=1 Licontains a feasible set, say B, whose clustering cost for  �ℓi=1 Piis at most  5τ.

Proof. Consider any  c ∈ S∗, and suppose it is processed by processor  i. Then d(c,cov(c)) ⩽ 2ri by Def-nition 2. Recall that L(cov(c)), the output of  getReps(), contains one point from every group which has a point within distance  2ri from cov(c). Therefore,  L(cov(c)) ⊆ Licontains some point, say  c′, from thesame group as c (possibly c itself), such that  d(c′,cov(c)) ⩽ 2ri. Then d(c,c′) ⩽ 4ri ⩽ 4τby the triangle inequality and Lemma 3. Let  B = {c′ : c ∈ S∗}. Clearly, B ⊆ �ℓi=1 Li. Since Bhas exactly as many points from any group as  S∗, Bis feasible. The clustering cost of  B for S∗ is at most 4τ. The clustering cost of  S∗for �ℓi=1 Piis at most  τ, because �ℓi=1 Pi ⊆ X. By Lemma 1, the clustering cost of  B for �ℓi=1 Piis at most 5τ, as required.

The algorithm executed by the coordinator is given by Algorithm 3. The coordinator constructs a maximal subset P of the set of pivots  X′ = �ℓi=1 Pireturned by the processors such that points in P are pairwise separated by distance more than  10τ. Pis called the set of global pivots. For each global pivot q ∈ P, the coordinator computes a set  N(q) ⊆ L = �ℓi=1 Liof its global representatives, all of which are within distance  5τ from q. Due to the separation between points in P, the sets N(q) are pairwise disjoint. Finally, a feasible set S intersecting as many N(q)’s as possible is found and returned. (As before, it will be clear that S intersects all the  N(q)’s.)

Theorem 2. The coordinator returns a feasible set whose clustering cost is at most  17τ. This is a  17(1 + ε)-approximation when  τ ∈ [OPT,(1 + ε)OPT].

Proof. By Lemma 4, L contains a feasible set, say B, whose clustering cost for  X′ is at most 5τ. For eachq ∈ P ⊆ X′, let bqdenote a point in B that is within distance  5τ from q. Since the points in  X′ areseparated pairwise by distance more than  10τ, bq’s are all distinct. By the property of  getReps(), the setN(q) returned by it contains a point, say  b′q, from the same group as  bq. Let B′ = {b′q : q ∈ P}. This setB′ intersects N(q) for each q ∈ P. Since b′q and bq are from the same group and  bq’s are all distinct,  B′contains at most as many points from any group as B does. Since B is feasible, so is  B′. To summarize, there exists a feasible set, namely  B′, intersecting all the N(q)’s. Recall that S, the output of  HittingSet(),is a feasible set intersecting as many N(q)’s as possible. Thus, S also intersects all the  N(q)’s.

Now, the clustering cost of S for P is at most  5τ, because Sintersects  N(q) for each q ∈ P. Theclustering cost of  P for X′ is at most 10τby the maximality of the set returned by  getPivots(). Theclustering cost of  X′ = �ℓi=1 Pi for X = �i Xi is at most 2τbecause the clustering cost of each  Pi for Xi isat most  2ri ⩽ 2τ. These facts and Lemma 1 together imply that the clustering cost of S, the output of the coordinator, for X is at most  17τ.

We note here that even though our distributed algorithm has the same approximation guarantee as Kale’s one-pass algorithm, it is inherently a diferent algorithm. Ours is extremely parallel whereas Kale’s is extremely sequential. We now prove a bound on the running time.

Theorem 3. The running time of the distributed algorithm is  O(kn/ℓ + mk2ℓ). By an appropriate choice of ℓ, the number of processors, this can be made  O(m1/2k3/2n1/2).

Proof. For each processor i, computing local pivots as well as the call to  getReps() takes O(|Pi| · |Xi|) =O(kn/ℓ)time each. For the coordinator, the separation between the global pivots and Lemma 2 together enforce  |P| ⩽ k. Observation 4 implies  |L| ⩽ m · maxi |Li| ⩽ mkℓ. Therefore,  getPivots()takes time O(|P| · |X′|) = O(k2ℓ) and getReps()takes time  O(|P| · |L|) = O(mk2ℓ). The call to  HittingSet() takestime  O(k2 maxq |N(q)|) = O(mk2), thus limiting the coordinator’s running time to  O(mk2ℓ). Choosingℓ = Θ(�n/(mk))minimizes the total running time to  O(m1/2k3/2n1/2).

3.3 Handling the Guesses

Given an arbitrarily small parameter  ε, a lower bound  L ⩽ OPT, and an upper bound  U ⩾ OPT, we runour algorithms for guess  τ ∈ {L,L(1+ε),L(1+ε)2,...,U}, which means at most  log1+ε(U/L)guesses. Call this method of guesses as geometric guessing starting at  L until U. For the τ ∈ [OPT,OPT(1 + ε)], ouralgorithms will compute a solution successfully.

In the distributed algorithm, by Lemma 3, for each processor,  ri ⩽ OPT. Therefore,  maxi ri ⩽ OPT.We then run Algorithm 3 with geometric guessing starting at  maxi riuntil it successfully fnds a solution.

For the two-pass algorithm, let P be the set of frst k + 1 points; then  L = minx1,x2∈P d(x1,x2)/2 is alower bound (call this the simple lower bound). Note that no passes need to be spent to compute the simple lower bound. We also need an upper bound  U ⩾ OPT. One can compute an arbitrary solution and its cost—which will be an upper bound—by spending two more passes (call this the simple upper bound). This results in a four-pass algorithm. To obtain a truly two pass algorithm and space usage  O(kmlog(1/ε)/ε),one can use Guha’s trick [Guh09], which is essentially starting  O(log(1/ε)/ε)guesses and if a run with guess  τfails, then continuing the run with guess  τ/εand treating the old summary as the initial stream for this guess; see also [Kal19] for details. But obtaining and using an upper bound is convenient and easy to implement in practice.

Malkomes et al. [MKC+15] generalized the greedy algorithm [Gon85] to obtain a 4-approximation algorithm for the k-center problem in the distributed setting. Here we prove a lower bound for the 3-center problem with 9 processors for a special class of distributed algorithms: If each processor communicates less than a constant fraction of their input points, then with a constant probability, the output of the co- ordinator will be no better than a 4-approximation to the optimum. Figure 1 shows a graph metric with

image

Figure 1: The underlying metric for  n′ = 2

9n′ + 7points for which lower bound holds, where the point x is not a part of the metric but is only used to defne the distances. Note that  |S1| = |S2| = |S3| = 3n′ and xis at distance of 1 from each point in S1 ∪ S2 ∪ S3.

For  i ∈ {1,2,3}, let S1i ,S2i ,S3i denote an arbitrary equipartition of  Si. There are 9 processors, whose inputs are given by  Y j1 = {b∗1,b∗2,a} ∪ Sj1, Y j2 = {a∗,c∗,b} ∪ Sj2 and Y j3 = {b∗1,b∗2,c} ∪ Sj3, for j ∈ {1,2,3}. Thegoal is to solve the 3-center problem on the union of their inputs. (Observe that the optimum solution is  {a∗,c∗,b∗1}with distance 1.) Each processor is allowed to send a subset of their input points to the coordinator, who outputs three of the received points. For this class of algorithms, we show that if each processor communicates less than  (n′ +3)/54points, then the output of the coordinator is no better than a 4-approximation to the optimum with probability at least 1/84. Using standard amplifcation arguments, we can generate a metric instance for the (3α)-center problem on which with probability at least  1−ε, thealgorithm outputs no better than 4-approximation (α ≈ log(1/ε)).

We frst discuss the intuition behind the proof. The key observation is that all points in each  Y ji arepairwise equidistant. Therefore, sending a uniformly random subset of the inputs is the best strategy for each processor. Since each processor communicates only a small fraction of its input points, the probability that the coordinator receives any of the points in  {a∗,b∗1,b∗2,c∗,a,b,c}is negligible. Conditioned on the coordinator not receiving these points, all the received points are a subset of  S1 ∪S2 ∪S3. As all points in S1 ∪S2 ∪S3are pairwise equidistant, the best strategy for the coordinator is to output 3 points at random. Hence, with constant probability, all the points in the output belong to  S1or all of them belong to  S3. Thisbeing the case, the output has cost 4, whereas the optimum cost is 1.

4.1 The Formal Proof

We now present the formal details of the lower bound. For a natural number n, [n] denotes the set {1,2,...,n}.

The metric space M(n′).The point set of this metric space on  n = 9n′ + 7points is given by

image

where  |S1| = |S2| = |S3| = 3n′. Let C := {a∗,b∗1,b∗2,c∗,a,b,c}. We call the points in C critical. Note that S1,S2,S3are pairwise disjoint and are also disjoint from C. The metric  d : S × S −→ Ris the shortest-path-length metric induced by the graph shown in Figure 1 (where x is not a point in S but is only used to defne the pairwise distances). The pairwise distances are given in Table 1. Note that if the table entry i,j is indexed by sets, then the entry corresponds to the distance between distinct points in the sets. The following observation can be verifed by a case-by-case analysis.

Observation 5. The sets {a∗,b∗1,c∗} and {a∗,b∗2,c∗}are the only optimum solutions of the 3-center problem on M(n′)and they have unit clustering cost. The clustering cost of any subset of  S1 is 4due to point c. Similarly, the clustering cost of any subset of  S3 is 4due to point a.

image

Table 1: Pairwise Distances

Input Distribution D on the Processors’ Inputs. For i ∈ [3], let S1i ,S2i ,S3i be an arbitrary equi- partition of  Si(and therefore,  |Sji | = n′ for all i,j). Defne the sets  Y j1 = {b∗1,b∗2,a} ∪ Sj1, Y j2 = {a∗,c∗,b} ∪ Sj2and  Y j3 = {b∗1,b∗2,c}∪Sj3, for j ∈ [3]. Observe that each  Y ji contains exactly  n′ +3points separated pairwise by distance 2, and moreover, three of the  n′ + 3points are critical. We assign the sets  Y ji randomly to the nine processors after a random relabeling. Formally, we pick a uniformly random bijection  π : S −→ [n]as the relabeling and another uniformly random bijection  Γ : [3] × [3] −→ [9], independent of  π, as theassignment. We assign the set  π(Y ji )to processor  Γ(i,j) for every i,j. When a processor or the coordinator queries the distance between  p and q where p,q ∈ [n], it gets d(π−1(p),π−1(q))as an answer. Note that neither the processors nor the coordinator knows  π or Γ. Let the random variable  P = (P1,...,P9) denotethe partition of the set of labels into a sequence of nine subsets induced by  π and Γ, where Pris the set of labels of points assigned to processor  r, that is, PΓ(i,j) = π(Y ji ).

Lemma 5. Consider any deterministic distributed algorithm for the 9 processor 3-center problem on  M(n′)and input distribution D, in which each processor communicates an  ℓ-sized subset of its input points, and the coordinator outputs 3 of the received points. If  ℓ ⩽ (n′ +3)/54, then with probability at least 1/84, the output is no better than a 4-approximation.

Although the probability with which the coordinator fails to outputs a better-than-4-approximation is only 1/84, it can be  amplifed to 1−ε, for any ε > 0. We discuss the amplifcation result before presenting the proof of the above lemma.

Lemma 6. Let ε > 0 and c < 1/486be arbitrary constants, and let

image

Then there exists an instance of the  (3α)-center problem such that, in the distributed setting with 9 processors, each communicating at most a c fraction of its input points to the coordinator, the coordinator fails to output a better than 4-approximation with probability at least  1 − ε.

Proof. The underlying metric space consists of  αdisjoint copies of  M(n′)separated by an arbitrarily large distance from one another. The point set of each copy is distributed to the nine processors as described earlier, and these distribtions are independent. Thus, each processor receives  α · (n′ + 3)points. Observation 5 implies that in this instance, the optimum set of  3αcenters (the union of optimum sets of 3 centers in each copy) has unit cost. Also, in order to get a better than 4-approximation, the coordinator must output a better than 4-approximate solution from every copy. We prove that this is unlikely.

By our assumption, each processor sends at most  cα·(n′+3)points to the coordinator, where c < 1/486. Therefore, for each processor, there exist at most  54cαcopies from which it sends more than  (n′ + 3)/54points to the coordinator. Since we have 9 processors, there exist at most  9 × 54cα = 486cαcopies from which more than  (n′ + 3)/54points are sent by some processor. From each of the remaining  (1 − 486c)αcopies, no processor sends more than  (n′ +3)/54points. By Lemma 5, the coordinator succeeds on each of these copies independently with probability at most  1−1/84, in producing a better than 4 approximation. Therefore, the probability that the coordinator succeeds in all the  (1 − 486c)αcopies is bounded as

image

where the last inequality follows by substituting the value of  α. Thus, the coordinator fails to produce a better than 4-approximation with probability at least  1 − ε.

Proof of Lemma 5. Consider any one of the nine processors. It gets the set  π(Y ji )for a uniformly random (i,j) ∈ [3] × [3]. Since πis a uniformly random labeling and points in  Y ji are pairwise equidistant, the processor is not able to identify the three critical points in its input. This happens even if we condition on the values of  Γ. Formally, conditioned on  Γ and P, all subsets of  Pr of size 3are equally likely to be the set of labels of the three critical points in processor r’s input, i.e.,  Y ji where (i,j) = Γ−1(r). As aconsequence, the probability that at least one of the three critical points appears in the set of at most  ℓpoints the processor communicates is at most  3ℓ/|Y ji | = 3ℓ/(n′ + 3), even when we condition on  Γ. For agiven processor  r ∈ [9], let Orbe the set of labels it sends to the coordinator, and defne  Brto be the event that  Orcontains the label of a critical point. Then  Pr[Br | Γ,P] ⩽ 3ℓ/(n′ + 3). Next, defne G to be the event that no processor sends the label of any critical point to the coordinator, that is,  G = ∩9r=1Bcr, whereBcr is the complement of  Br. Then by the union bound and the fact that  ℓ ⩽ (n′ +3)/54, we have for every partition P of the label set and every bijection  γ : [3] × [3] −→ [9],

image

Suppose the coordinator outputs O, a set of three labels, on receiving  O1,...,O9. Then O ⊆ Or1 ∪Or2 ∪Or3 for some r1,r2,r3 ∈ [9]. Observe that  O1,...,O9, O, and {r1,r2,r3}are all completely determined2 by P. In contrast, due to the random labeling  π, the mapping  Γis independent of P. Therefore,

Observation 6. Conditioned on P, the bijection  Γis equally likely to be any of the 9! bijections from  [3]×[3]to [9].

Next, defne  G′ to be the event that  {r1,r2,r3} is either Γ({(1,1),(1,2),(1,3)}) or Γ({(3,1),(3,2),(3,3)}).In words,  G′ is the event that the coordinator outputs labels of three points, all of which are contained in  Y 11 ∪ Y 21 ∪ Y 31 or in Y 13 ∪ Y 23 ∪ Y 33 . Note that the event  G′ ∩ Gimplies that the coordinator’s output is contained in  S11 ∪S21 ∪S31 = S1 or in S13 ∪S23 ∪S33 = S3. Therefore, by Observation 5, event  G′ ∩G impliesthat the coordinator fails to output a better than 4-approximation. We are now left to bound  Pr[G′ ∩ G]from below.

Since the set  {r1,r2,r3}is completely determined by P, the event  G′ is completely determined by P and  Γ: for any P, there exist exactly  2 · 3! · 6! values of Γwhich cause  G′ to happen. Formally,

Observation 7. For every partition P of the label set, there exist exactly  2 · 3! · 6!bijections  γ : [3] × [3] −→[9] such that Pr[G′ | P = P,Γ = γ] = 1, whereas Pr[G′ | P = P,Γ = γ′] = 0for all the other bijections γ′ : [3] × [3] −→ [9].

Therefore, we have,

image

Here, we used Observation 7 for the second and fourth equality, and Equation (1) and Observation 6 for the inequality. Thus, the coordinator fails to output a better than 4-approximation with probability at least 1/84, as required.

Using Lemma 6 along with Yao’s lemma, we get our main lower-bound theorem.

Theorem 4. There exists c > 0 such that for any  ε > 0, with k = Θ(log(1/ε)), any randomized distributed algorithm for k-center where each processor communicates at most cn points to the coordinator, who outputs a subset of those points as the solution, is no better than 4-approximation with probability at least  1 − ε.

All experiments are run on HP EliteBook 840 G6 with Intel® Core™ i7-8565U CPU 1.80GHz having 4 cores and 15.5 GiB of RAM, running Ubuntu 18.04 and Anaconda. We make our code available on GitHub3.

We perform our experiments on a massive synthetic dataset, several real datasets, and small synthetic datasets. The same implementation is used for the large synthetic dataset and the real datasets, but a slightly diferent implementation is used for small synthetic datasets. Before presenting the experiments, we frst discuss the implementation details that are common to all three experiments. Specifc details are mentioned along with the corresponding experimental setup. For all our algorithms if the solution size is less than k, then we extend the solution using an arbitrary solution of size k (which also certifes the simple upper bound). In the case of the distributed algorithm, an arbitrary solution is computed using only the points received by the coordinator. Also, one extra pass is spent into computing solution cost. In the processors’ algorithm, we return  rialong with  (Pi,Li). No randomness is used for any optimization, making our algorithms completely deterministic. Access to distance between two points is via a method get_distance(), whose implementation depends on the dataset.

We use the code shared by Kleindessner et al. for their algorithm on github4, exactly as is, for all datasets. In their code, the distance is assumed to be stored in an  n × ndistance matrix.

As mentioned in the introduction, we give new implementations for existing algorithms—those of Chen et al. and Kale (we choose to implement Kale’s two-pass algorithm only, because it is the better of his two). Instead of using a matroid intersection subroutine, which can have running time of super quadratic in n, we reduce the postprocessing steps of these algorithms to fnding a maximum matching in an appropriately constructed graph (for details, see  HittingSet()in Appendix A). We further reduce maximum matching to max-fow which is computed using Python package NetworkX. This results in a postprocessing time of O(k2n)for Chen et al. and  O(k3)for Kale. This step itself makes Chen et al.’s algorithm practical for much larger n than what is observed by Kleindessner et al.

Handling the guesses For all algorithms (except Kleindessner et al.’s), we use  ε = 0.1. For Chen et al.’s algorithm, we use geometric guessing starting with the lower bound given by the farthest point heuristic (call this Gonzalez’s lower bound). For our two-pass algorithm and Kale’s algorithm, we use geometric guessing starting with the simple lower bound until the upper bound given by an arbitrary solution. The values for the guesses  τin the coordinator’s algorithm are scaled down by a factor of 5.1. Concretely, let r1be the maximum among the  ri’s. Then the guesses take values in r15.1, 1.1·r15.1 , (1.1)2·r15.1 ,..., until a feasible solution is found. The factor of 5.1 ensures that when  getPivots()is run with the parameter  10τ < 2r1,we end up picking at least k pivots from  X′.

We now proceed to present our experiments. To show the efectiveness of our algorithms on massive datasets, we run them on a 100 GB synthetic dataset which is a collection of 4,000,000 points in 1000 dimensional Euclidean space, where each coordinate is a uniformly random real in (0,10000). Each point is assigned one of the four groups uniformly at random, and capacity of each group is set to 2. Just reading this data fle takes more than four minutes. Our two-pass algorithm takes 1.95 hours and our distributed algorithm takes 1.07 hours; both compute a solution of almost the same cost, even though their theoretical guarantees are diferent. Here, we use block size of 10000 in the distributed algorithm, i.e., the number of processors  ℓ = 400.

For the above dataset and the real datasets: The input is read from the input fle and attributes are read from the attribute fle, one data point at a time, and fed to the algorithms. This is done in order to be able to handle the 100 GB dataset. Using Python’s multiprocessing library, we are able to use four cores of the processor 5.

5.1 Real Datasets

We use three real world datasets: Celeb-A [LLWT15], Sushi [sus], and Adult [KB], with n = 1000 by selecting the frst 1000 data points (see Table 2).

Celeb-A dataset is a set of 202,599 images of human faces with attributes including male/female and young/not-young, which we use. We use Keras to extract features from each image [fea] via the pretrained neural network VGG16, which returns a 15360 dimensional real vector for each image. We use the  ℓ1distance as the metric and two settings of groups: male/female with capacity of 2 each (denoted by [2,2] in Table 2), and {male, female}  ×{young, not-young} with capacity of 2 each (denoted by  [2]∗4 in Table 2).

Sushi dataset is about preferences for diferent types of Sushis by 5000 individuals with attributes of male/female and six possible age-groups. In SushiB, the preference is given by a score whereas in SushiA, the preference is given by an order. For SushiB, we use the  ℓ1distance whereas for SushiA, we use the number of inversions, i.e., the distance between two Sushi rankings is the number of doubletons {i,j} such that Sushi i is preferred over Sushi j by one ranking and not the other. For both SushiA and SushiB, we use three diferent group settings: with gender only, with age group only, and combination of gender and age group. This results in 2, 6, and 12 groups, respectively, and the capacities appear as  [2,2], [2] ∗ 6, and[2] ∗ 12, respectively, in Table 2.

Table 2: Comparison of solution quality of algorithms for fair k-center on real datasets. Each column after the third corresponds to an algorithm and shows ratio of its cost and Gonzalez’s lower bound. Note that this is not the approximation ratio. Our two-pass algorithm is the best for majority of the settings. Dark shaded cell shows the best-cost algorithm and lightly shaded cell shows the second best.

image

Motivated by Kleindessner et al., we consider the adult dataset [KB], which is extracted from US census data and contains male/female attribute and six numerical attributes that we use as features. We normalize this dataset to have zero mean and standard deviation of one and use the  ℓ1distance as the metric. There are two attributes that can be used to generate groups: gender and race (Black, White, Asian Pacifc Islander, American Indian Eskimo, and Other). Individually and in combination, this results in 2, 5, and 10 groups, respectively.

For comparison, see Table 2. On majority of settings, our two-pass algorithm outputs a solution with cost smaller than the rest. We reiterate for emphasis that in addition to being at least as good as the best in terms of solution quality, our algorithms can handle massive datasets.

For the distributed algorithm, we use block size of 25, i.e., the number of processors are 1000/25 = 40: theoretically, using  ≈ √nprocessor gives maximum speedup.

5.2 Synthetic Datasets

Motivated by the experiments in Kleindessner et al., we use the Erdős-Rényi graph metric to compare the running time and cost of our algorithms with existing algorithms. For a fxed natural number n, a random metric on n points is generated as follows. First, a random undirected graph on n vertices is sampled in which each edge is independently picked with probability 2logn/n. Second, every edge is assigned a uniformly random weight in (0,1000). The points in the metric correspond to the vertices of the graph, and the pairwise distances between the points are given by the shortest path distance. In addition, if m is the number of groups, then each point in the metric is assigned a group in {1,2,...,m} uniformly and independently at random.

Figure 2 shows the plots between the running time and instance size n; the bottom one is a zoom-in of the top one to the lower four plots. In this experiment, n takes values in {100,150,200,...,350}. The number of groups is fxed to 5 and the capacity of each group is 2. For each fxing of n, we run the fve algorithms on 20 independent random metric instances of size n to compute the average running time. Our two pass algorithm and Kleindessner et al.’s algorithm are the fastest. Our distributed algorithm is

image

Figure 2: Comparing Running Times

faster than Chen et al.’s algorithm, but slower than Kale’s.

Figure 3 shows the ratios of the cost of various algorithms to Gonzalez’s lower bound. For this comparison, the instance size is fxed to 500 and capacities are [5,5,5],[2,2,11],[2,2,8,8],[3,3,3,11],[1,2,3,4,5], [3,3,4,4,5],[4,4,5,5,5,10],[2,2,2,2,2,2]. Here again, for every fxing of the capacities, the algorithm is run on 20 independent random metric instances to compute the average costs. Chen et al.’s algorithm achieves the least cost for almost all settings, and Kleindessner et al.’s algorithm gives the highest cost on majority (5 out of 8) of settings. Our two-pass algorithm and Kale’s algorithm perform similar to each other and are quite close to Chen et al.’s. Our distributed algorithm is somewhere in between Chen et al.’s and Kleindessner et al.’s. Note that the ratios of the costs between any two algorithms is at most 1.167.

In the implementation of our two pass algorithm, we use geometric guessing starting with the simple lower bound until the algorithm returns a success instead of running all guesses. This is done for a fair comparison in terms of running time.

One research direction is to improve the theoretical bounds, e.g., get a better approximation ratio in the distributed setting or prove a better hardness result. Another interesting direction is to use fair k-center for fair rank aggregation using the number of inversions between two rankings as the metric.

image

Figure 3: Comparing Approximation Ratios

[AEKM19] Sara Ahmadian, Alessandro Epasto, Ravi Kumar, and Mohammad Mahdian. Clustering with- out over-representation. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 267–275, 2019.

[BCFN19] Suman Kalyan Bera, Deeparnab Chakrabarty, Nicolas Flores, and Maryam Negahbani. Fair algorithms for clustering. In Hanna M. Wallach, Hugo Larochelle, Alina Beygelzimer, Florence d’Alché-Buc, Emily B. Fox, and Roman Garnett, editors, Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, 8-14 December 2019, Vancouver, BC, Canada, pages 4955–4966, 2019.

[BIPV19] Sayan Bandyapadhyay, Tanmay Inamdar, Shreyas Pai, and Kasturi Varadarajan. A Constant Approximation for Colorful k-Center. In Michael A. Bender, Ola Svensson, and Grzegorz Herman, editors, 27th Annual European Symposium on Algorithms (ESA 2019), volume 144 of Leibniz International Proceedings in Informatics (LIPIcs), pages 12:1–12:14, Dagstuhl, Germany, 2019. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik.

[CKLV17] Flavio Chierichetti, Ravi Kumar, Silvio Lattanzi, and Sergei Vassilvitskii. Fair clustering through fairlets. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, Advances in Neural Information Processing Systems 30, pages 5029–5037. Curran Associates, Inc., 2017.

[CKS+18]Elisa Celis, Vijay Keswani, Damian Straszak, Amit Deshpande, Tarun Kathuria, and Nisheeth Vishnoi. Fair and diverse DPP-based data summarization. In Jennifer Dy and Andreas Krause, editors, Proceedings of the 35th International Conference on Machine Learning, volume 80 of Pro-

ceedings of Machine Learning Research, pages 716–725, Stockholmsmässan, Stockholm Sweden, 10–15 Jul 2018. PMLR.

[CLLW16] Danny Z. Chen, Jian Li, Hongyu Liang, and Haitao Wang. Matroid and knapsack center prob- lems. Algorithmica, 75(1):27–52, May 2016.

[fea] Keras: Extract features with vgg16. https://keras.io/applications/#extract-features-with-vgg16. Accessed: 2020-01-26.

[Gon85] Teoflo F. Gonzalez. Clustering to minimize the maximum intercluster distance. Theoretical Computer Science, 38:293–306, 1985.

[Guh09] Sudipto Guha. Tight results for clustering and summarizing data streams. In Proc. 12th International Conference on Database Theory, ICDT ’09, pages 268–275, 2009.

[HKK10] MohammadTaghi Hajiaghayi, Rohit Khandekar, and Guy Kortsarz. Budgeted red-blue median and its generalizations. In Proceedings of the 18th Annual European Conference on Algorithms: Part I, ESA’10, pages 314–325. Springer-Verlag, 2010.

[HN79] Wen-Lian Hsu and George L. Nemhauser. Easy and hard bottleneck location problems. Discrete Applied Mathematics, 1(3):209 – 215, 1979.

[HS85] Dorit S. Hochbaum and David B. Shmoys. A best possible heuristic for the k-center problem. Math. Oper. Res., 10(2):180–184, May 1985.

[JSS20] Xinrui Jia, Kshiteej Sheth, and Ola Svensson. Fair colorful k-center clustering. In To appear in IPCO’20, 2020.

[Kal19] Sagar Kale. Small Space Stream Summary for Matroid Center. In APPROX/RANDOM, volume 145 of Leibniz International Proceedings in Informatics (LIPIcs), pages 20:1–20:22, Dagstuhl, Germany, 2019. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik.

[KAM19] Matthäus Kleindessner, Pranjal Awasthi, and Jamie Morgenstern. Fair k-center clustering for data summarization. In ICML, volume 97, pages 3448–3457, Long Beach, California, USA, 09–15 Jun 2019. PMLR.

[KB] Ronny Kohavi and Barry Becker. Adult data set. https://archive.ics.uci.edu/ml/datasets/Adult. Accessed: 2020-01-26.

[KKN+11] Ravishankar Krishnaswamy, Amit Kumar, Viswanath Nagarajan, Yogish Sabharwal, and Barna Saha. The matroid median problem. In Proceedings of the Twenty-second Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’11, pages 1117–1130, 2011.

[KMM15] Matthew Kay, Cynthia Matuszek, and Sean A. Munson. Unequal representation and gender stereotypes in image search results for occupations. In CHI, pages 3819–3828, 2015.

[LLWT15] Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep learning face attributes in the wild. In Proceedings of International Conference on Computer Vision (ICCV), December 2015.

[MKC+15] Gustavo Malkomes, Matt J Kusner, Wenlin Chen, Kilian Q Weinberger, and Benjamin Moseley. Fast distributed k-center clustering with outliers on massive data. In NIPS, pages 1063–1071. 2015.

[SSS20] Melanie Schmidt, Chris Schwiegelshohn, and Christian Sohler. Fair coresets and streaming algorithms for fair k-means. In Evripidis Bampis and Nicole Megow, editors, Approximation and Online Algorithms, pages 232–251, Cham, 2020. Springer International Publishing.

[sus] Sushi preference data sets.  http://www.kamishima.net/sushi/. Accessed: 2020-01-26.

The defnition of clustering cost (Defnition 1) immediately implies the following observations.

Observation 8. Let A ⊇ A′ and B ⊆ B′ be sets of points in a metric space given by a distance function d. The clustering cost of A for B is at most the clustering cost of  A′ for B′.

Observation 9. Let A1,A2,B1,B2be sets of points in a metric space given by a distance function d. Suppose the clustering cost of each  Ai for Biis at most  τ. Then the clustering cost of  A1 ∪A2 for B1,∪B2is at most  τ.

The following lemma follows easily from the triangle inequality.

Lemma 7 (Lemma 1 from the paper, restated). Let A,B,C ⊆ X. The clustering cost of A for C is at most the clustering cost of A for B plus the clustering cost of B for C.

Proof. Let d be the metric and let  rAB and rBCdenote the clustering costs of A for B and of B for C respectively. For every  a ∈ A, there exists  b ∈ B such that d(a,b) ⩽ rAB. But for this b, there exists  c ∈ Csuch that  d(b,c) ⩽ rBC. Thus, for every  a ∈ A, there exists a  c ∈ C such that d(a,c) ⩽ rAB + rBC, by thetriangle inequality. This proves the claim.

The pseudocodes of procedures  getPivots(), getReps(), and HittingSet()are given by Algorithms 4, 5, and 6 respectively.

image

image

Observation 10. The procedure  getPivots()performs a single pass over the input set T . The set P returned by  getPivots(T,d,r)contains points separated pairwise by distance more than r. The clustering cost of P for T is at most r. Therefore, by Lemma 2 from the paper, if there is a set of k points whose clustering cost for T is at most  r/2, then |P| ⩽ k pivots.

Observation 11. The procedure  getRep()executes a single pass over the input set T. The points in each set Ipreturned by  getRep(T,d,g,P,r)belong to distinct groups and are all within distance r from p. For every point q within distance  r from p ∈ P, Ipcontains a point in the same group as q (possibly q itself).

The procedure  HittingSet()constructs the following bipartite graph. The left side vertex set contains K vertices: one for each  Ni. The right side vertex set is  V = �mj=1 Vj, where Vj contains kj vertices for each group  j. If Nicontains a point from group j, then its vertex is connected to the all of  Vj. Each matching H in this bipartite graph encodes a feasible subset  C of �Ki=1 Ni as follows. For each edge  e = (Ni,v) ∈ Hwhere  v ∈ Vj, add to Cthe point from  Nibelonging to group j. Observe that since  |Vj| = kj and His a matching, C contains at most  kjpoints from group j. Moreover, |C| = |H|, and hence, a maximum cardinality matching in the bipartite graph encodes a set C intersecting as many of the  Ni’s as possible.

In our implementation, we enhance the efcienty of  HittingSet()as follows. For each group, we introduce only one vertex in the right side vertex set and construct the bipartite graph like  HittingSet(),directing edges from left to right. We further connect a source to the left side vertices with unit capacity edges, and the right side vertices to a sink with edges of capacities  kj. We fnd the maximum (integral) source-to-sink fow using the Ford-Fulkerson algorithm. For each i and j, if the edge  (Ni,j)exists and carries nonzero fow, then we include in C the point in  Nithat belongs to group j. Our runtime is bounded as follows.

Lemma 8. The runtime of  HittingSet() is O(K2 · maxi |Ni|).

Proof. The number of edges in the constructed bipartite graph is  O(K · maxi |Ni|)whereas the value of the max-fow is no more than K. The runtime of the Ford-Fulkerson algorithm is of the order of the size of the number of edges times the value of max-fow. Therefore, the runtime of  HittingSet(), which isdominated by the runtime of the Ford-Fulkerson algorithm, turns out to be  O(K2 · maxi |Ni|).


Designed for Accessibility and to further Open Science