Constant-Factor Approximations for Doubly Constrained Fair -Center, -Median and -Means
Abstract
We study discrete -clustering problems in general metric spaces that are constrained by a combination of two different fairness conditions within the demographic fairness model. Given a metric space , where every point in is equipped with a protected attribute, and a number , the goal is to partition into clusters with a designated center each, such that a center-based objective function is minimized and the attributes are fairly distributed with respect to the following two fairness concepts: 1) group fairness: We aim for clusters with balanced numbers of attributes by specifying lower and upper bounds for the desired attribute proportions. 2) diverse center selection: Clusters have natural representatives, i.e., their centers. We ask for a balanced set of representatives by specifying the desired number of centers to choose from each attribute.
Dickerson, Esmaeili, Morgenstern, and Pena [13] denote the combination of these two constraints as doubly constrained fair clustering. They present algorithms whose guarantees depend on the best known approximation factors for either of these problems. Currently, this implies an -approximation with a small additive violation on the group fairness constraint. For -center, we improve this approximation factor to with a small additive violation. This guarantee also depends on the currently best algorithm for DS-fair -center given by Jones, Nguyen and Nguyen [21]. For -median and -means, we propose the first constant-factor approximation algorithms. Our algorithms transform a solution that satisfies diverse center selection into a doubly constrained fair clustering using an LP-based approach. Furthermore, our results are generalizable to other center-selection constraints, such as matroid -clustering and knapsack constraints.
Keywords and phrases:
Clustering, Fairness, Approximation Algorithms, -center, -median, -meansFunding:
Nicole Funk: Funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) – Project Number 559931366.Copyright and License:
2012 ACM Subject Classification:
Theory of computation Facility location and clustering ; Computing methodologies Cluster analysis ; Theory of computation Rounding techniques ; Theory of computation Linear programmingAcknowledgements:
We thank Melanie Schmidt for her valuable feedback and advice, Anna Arutyunova for proofreading the manuscript, and Lukas Drexler and Elmar Langetepe for productive initial discussions. We are also grateful to the three anonymous reviewers whose constructive comments helped improve this paper.Editor:
Pierre FraigniaudSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
With algorithms being used in a wide range of applications that can have a significant impact on individuals and society, fairness in machine learning has become an increasingly important topic in recent years. Much of the work is inspired by the disparate impact effect, which describes how machine learning algorithms may produce biased outcomes that disproportionately affect individual groups based on certain protected attributes. Clustering is a fundamental task in unsupervised learning, making this issue relevant in this context. Arguably, the most popular center-based clustering objectives are -center, -median, and -means. For the unconstrained versions in general metric spaces, the best known approximation factors are for -center [19, 15], for -median [11] and for -means [7].
Directly addressing the disparate impact effect, demographic fairness notions aim to ensure that protected attributes are fairly represented in the clusters. We say that data points belong to the same group if they share the same protected attribute value. Throughout, we will assume that any data point belongs to exactly one group, i. e., that the groups are disjoint. We also identify groups with different colors. Since the work of Chierichetti, Kumar, Lattanzi and Vassilvitskii [10] initiated the rigorous study of fair clustering, a significant amount of research has emerged on this topic [9, 12], spanning a variety of different fairness notions. Here, we focus on two specific demographic fairness constraints: group fairness and diverse center selection. Our goal will be to construct clusterings that satisfy the combination of these fairness constraints, but first, we will discuss them individually.
Group fairness.
Group fairness concerns the composition of clusters, namely ensuring that the proportion of points from any group in each cluster is within certain bounds. For group fair -center, -median, and -means there exist: a -approximation with additive violation of at most [4], a -approximation with violation of [4, 3], and a -approximation with violation of [3], respectively.
Diverse center selection.
Complementing the group fairness notion, diverse center selection aims to ensure fair representation of the groups. As centers are naturally interpreted as representatives of the clusters, this constraint requires that from each group, a certain number of points be selected as centers. We also say that a clustering is diversity-aware when the selected centers satisfy this constraint. For diversity-aware -center, -median, and -means with exact numbers of points per center, there exist: a -approximation [21], a -approximation [29, 23], and a -approximation [29, 30] (and a -approximation if the distances are Euclidean [29, 35]), respectively.
Doubly constrained fair clustering.
Most works study these two constraints in isolation, but one could argue that, in many applications, it is desirable to achieve both constraints simultaneously. Group fairness alone can be useful to guarantee a range of different opinions and life experiences in a working environment or in a voting group, i. e., a cluster. This can boost productivity or prevent manipulation, such as gerrymandering, but loses its effect if the chosen representatives of the groups are not as diverse and act in their own interests. At the other extreme, selecting only diverse centers without addressing the distributions within the clusters leaves the possibility of manipulation or peer pressure, mitigating the advantages of diverse centers.
Dickerson, Esmaeili, Morgenstern, and Pena [13] were the first to study the combination of these two constraints for the -center problem and coined the term doubly constrained fair clustering. They present algorithms that sequentially solve the two problems to achieve solutions for the doubly constrained problem. The guarantees depend on the order in which the two problems are considered. By first computing a group fair solution, and transforming it into a doubly fair solution, they get a -approximation for doubly fair -center, where is the approximation guarantee of the algorithm used to compute the group fair clustering. Note that their approach requires an algorithm for group fair clustering with no additive violation, which currently does not exist for -center. Therefore, we will only compare to their results for the other direction, where they first compute an -approximation for diversity-aware -center and then transform it into a doubly constrained fair solution, which yields a -approximation overall. While one could easily arrange for diverse center selection by moving centers into their own singleton clusters, to ensure group fairness, clusters usually need to contain multiple points in addition to their selected center.
Our contributions.
We improve on known results for -center and construct the first constant-factor approximation algorithms for doubly constrained fair -median and -means.
-
We improve the currently best known approximation guarantee for doubly constrained fair -center [13] by a factor of . Using the currently best approximation factor for diversity-aware -center [21], this implies a -approximation for doubly constrained fair -center with an additive violation of at most for the group fairness constraint.
-
We present the first polynomial-time constant-factor approximation algorithms for doubly constrained fair -median and -means. For -median, our algorithm currently implies a -approximation, and for -means, it yields a -approximation, both with an additive violation of at most for the group fairness constraint.
-
Our algorithms generalize to combinations of the group fairness constraint with other constraints on the centers, such as matroid and knapsack constraints or individual fairness.
Techniques.
Our algorithms for all three objectives follow the same framework:
First, we independently compute a diversity-aware center set using an external approximation algorithm and a (fractional) group fair solution by solving a linear program. Next, we combine the two solutions by rerouting assignments so that only centers from the diversity-aware clustering get assigned points. Finally, we compute an integral solution by solving a max flow instance for -center and a min cost flow instance for -median and -means.
The idea for the overall framework and the rerouting of assignments is inspired by the work of Ahmadian, Epasto, Kumar and Mahdian [2], who study a special case of group fairness with only upper bounds on the ratios of colors and provide a -approximation with additive violation of at most for -center without over-representation. We significantly adapt their techniques to handle our doubly constrained setting.
First, we must incorporate lower bounds into the group fairness constraint. While adapting the linear program is straightforward, it requires a more complex rerouting of assignments to ensure that the lower bounds are still satisfied after reassigning the points.
Second, we need to handle the fact that we have to combine two different solutions. They compute a set of centers that have pairwise distances of at least some appropriate threshold, which guarantees that there are at most centers. The LP solution guarantees that every point has a close LP center, and the lower bound on the pairwise distances of the centers guarantees that every new center has a close LP center that is not as close to other centers. This allows them to reroute all the mass assigned to an old center in the LP solution to the closest new center, and every new center gets assigned some positive mass. In our case, we do not have such a guarantee, as the diversity-aware solution does not provide a lower bound on the pairwise distances between the centers. Just reassigning the mass in the same way would not work as some centers from the diversity-aware solution might not get assigned any points, violating the requirement that all centers should be active. Therefore, we need to reroute the mass in a more complex way. We ensure that every cluster is assigned some mass, which may require splitting the incoming mass of an LP center appropriately among multiple centers from the diversity-aware solution while maintaining group fairness. Then, we reassign the remaining mass by the approach described above. For the other objectives, we need to refine the rerouting approach further to keep the solution’s cost small.
We compare our results with those of [13] for the direction in which they transform a diversity-aware solution into a doubly constrained fair solution. Our algorithm performs the transformation in the same direction, and no applicable algorithm exists for the other direction. Their approach is similar to the framework described above, but differs in that they incorporate the centers computed by the diversity-aware clustering algorithm directly into their linear program for group fairness. Solving the linear program with the given centers causes the problem that some centers might not get assigned any points, i. e., they are not active. To overcome this issue, they replace inactive centers with points from suitable groups inside clusters that are large enough to be split into two group fair clusters. The additional factor of in their approximation guarantee comes from this splitting step, which is not necessary in our approach. They finalize their solution by rounding the assignments by computing a max-flow, while we need to reroute assignments to other centers first before solving a max-flow instance.
1.1 Problem definition
Let be a general metric space with and an integer. A -clustering is a partition of into clusters optimizing some objective function. We are considering center-based objectives, where a clustering is induced by a set of centers with and an assignment mapping points to centers. Note that we study the discrete variant of -clustering, where the set of centers must be a subset of the point set. The cluster with center is given by . In the -center objective, our goal is to minimize the maximal distance of any point to its assigned center, i. e., we want to minimize the maximal radius among the clusters. In -median, the objective is to minimize the sum of distances of points to their assigned center, i. e., , and in -means it is the sum of squared distances of points to centers that we want to minimize, i. e., .
We study clusterings that satisfy two types of demographic fairness constraints. Both fairness notions rely on a coloring of the points. Let be some number of colors. For , we denote the group of points of color by . We assume that every point in is assigned exactly one color , i.e., . On the one hand, we want to achieve a fair distribution of colors in the clusters. This means that every color should constitute a certain fraction in every cluster. For every color , we are given a lower bound and an upper bound on these fractions. To relax this problem, we further allow a small additive violation of these fractional bounds.
Definition 1 (Group fair cluster).
For all , let be values with . Let . We say that a cluster is group fair with additive violation if
for all colors . We say that a cluster is group fair if .
We say that a clustering fulfills the group fairness constraint (GF) if every cluster is group fair. If the lower and upper bounds on the ratios of the groups equal the respective proportions in the overall dataset, we also speak of exact preservation of ratios or short exact group fairness. Additionally, we aim for a fair representation of the colors, formalized by lower and upper bounds on the number of centers per group.
Definition 2 (Diverse center selection).
Given for such that , we say that a set of centers satisfies the diverse center selection (DS) constraint if for all .
The definition in its most general form is also called fair-range clustering; the special case with only lower bounds is also referred to as minority protection; we denote the case for all by exact diverse center selection. All guarantees with fixed approximation guarantees stated in this paper hold for exact diverse center selection; some even hold for more general cases, see also the section on related work. Our algorithm does not depend on the specific combinatorial structure of the center set and therefore also works for the generalized version, provided appropriate approximation algorithms are available. Throughout, we will consider only instances with feasible solutions.
1.2 Our results
We have two main results; the first is a constant factor approximation algorithm for the doubly constrained fair -center problem.
Theorem 3.
Let be the approximation factor of a given approximation algorithm for DS-fair -center. There exists an algorithm that computes a -approximation with GF-violation of for the doubly constrained fair -center problem in polynomial time.
Using the currently best approximation factor of for -center with DS by Jones, Nguyen and Nguyen [21], this yields a -approximation.
Corollary 4.
There exists an algorithm that computes a -approximation for the doubly constrained fair -center problem with a GF-violation of at most .
The second result extends the techniques of the -center algorithm to obtain approximation algorithms for the doubly constrained fair -median problem and the doubly constrained fair -means problem.
Theorem 5.
There exists a polynomial time algorithm that computes a
-
-approximation with GF-violation of at most for the doubly constrained fair -median problem, where is the approximation factor of a given approximation algorithm for DS-fair -median.
-
-approximation with GF-violation of at most for the doubly constrained fair -means problem, where is the approximation factor of a given approximation algorithm for DS-fair -means.
Currently the best algorithm for center fair -median computes a -approximation [29, 23] and for -means a -approximation [29, 30], resulting in the following:
Corollary 6.
There exists an algorithm that computes a
-
-approximation with GF-violation of at most for the doubly constrained fair -median problem.
-
-approximation with GF-violation of at most for the doubly constrained fair -means problem.
For the special case of doubly constrained fair -means under euclidean distance we can use the -approximation [29, 35] to achieve an -approximation with GF-violation of at most .
We remark that, as we use the approximation algorithms for clustering with diverse centers as opaque-box111https://www.acm.org/diversity-inclusion/words-matter algorithms, our results can also be applied to combine the group fairness constraint with different notions of fairness. Such a notion would need to apply only to the set of centers, e. g., matroid and knapsack constraints [27, 35] or the notion of individual fairness [22, 30].
1.3 Related work
Besides the two specific fairness definitions described above, there is an abundance of different fairness notions. These include, but are not limited to, more constraints focusing on fair distributions of points, such as balance [10], bounded representation [2], and colorful clustering [20]. Other fairness concepts focus on distances, like individual fairness [24] and socially fair clustering [1].
Chierichetti, Kumar, Lattanzi and Vassilvitskii [10] were the first to study the group fairness constraint (albeit not using this name) for the special case of two colors and a specific balance notion. Bercea, Groß, Khuller, Kumar, Rösner, Schmidt and Schmidt [4] presented the first approximation algorithms for group fair clustering for general metric spaces and general bounds on the proportions of groups for an arbitrary number of groups. For the fair -center problem, there is a a deterministic -approximation algorithm with additive violation of at most [4] and randomized -approximation with no additive violation in expectation [18]. For the exact variant, Bercea et al. [4] provide a -approximation algorithm with no additive violation for exact preservation of ratios, and show that it is NP-hard to approximate the assignment version of this problem, i. e., finding the optimal -center assignment for a given set of centers, better than a factor of . For -median, Bercea et al. [4] and Bera et al. [3] both give algorithms implying a -approximation with an additive violation of at most for the group fairness constraint using the recent -approximation for -median [11]. For -means, a -approximation with violation of is achieved by the algorithm from Bera, Chakrabarty, Flores and Negahbani [3], using the best known approximation for unconstrained -means [7]. All these results assume that the groups are disjoint. Approximation algorithms for the generalization of non-disjoint groups also exist [3, 18]. Further related for group fairness include the integration of privacy constraints [26], the learning-augmented setting [32], streaming, and the distributed model [5].
We now look at the related work for the diverse center selection constraint. For the -center objective, there exists a -approximation for exact center diversity [21], and a -approximation for a slight variant of diverse center selection that deals with lower and upper bounds on fractions of the actual proportions of a group in the data set [25]. If color groups are non-disjoint, the problem is inapproximable to any factor, assuming [29]. For the most general version of diverse center selection, there exists an FPT -approximation that can even handle outliers [14]. For -median and -means, a result for general -norm objectives implies -approximations for general diverse center selection. In the exact case, Thejaswi, Ordozgoiti and Gionis [29] show that the problem for the -median objective can be reduced to the matroid median problem in polynomial time. This result can also be generalized to other objectives, implying a -approximation for -median and a -approximation for -means with exact diverse center selection, using the best known guarantees for the matroid version of the respective objective [23, 30]; where the -means variant allows for a -approximation if the distances are Euclidean [29, 35]. In the FPT-regime, randomized - and -approximations for general diversity-aware -median and -means can be achieved, respectively [28]. For Euclidean spaces, -approximations are possible for both objectives under the diverse center selection constraint [34]. Further related work in the realm of diverse center selection includes distributed models [6] and the streaming setting [6, 16].
For doubly constrained fair clustering, the landscape of related work is sparser. Only for -center, there exists a constant-factor approximation algorithm [13]. For -median, there is an FPT-time approximation algorithm by [31] that achieves an approximation ratio of with an additive violation of at most for the group fairness constraint. For general -norm objectives, there is a polynomial-time algorithm by [33] that achieves an approximation ratio of with an additive violation of at most , where is the maximum cluster size in the computed solution. Table 1 summarizes the results for doubly constrained fair clustering in general metric spaces, comparing our results to the state-of-the-art.
Lastly, we provide a brief overview of additional important center constraints that our algorithm can handle. There exists a -approximation for matroid -center [8], a -approximation for matroid median [23], and a -approximation for matroid means [30], which is improved to in Euclidean spaces [35]. For knapsack constraints, the factors are [19], [17] and [35] for -center, -median and (Euclidean) -means.
| Objective | Reference | Approx. ratio | Add. GF viol. | Runtime |
| -center | Dickerson et al. [13] | poly | ||
| This work | poly | |||
| -median | Zhang et al. [33] | poly | ||
| Wu et al. [31] | FPT | |||
| This work | poly | |||
| -means | Zhang et al. [33] | poly | ||
| This work | poly |
2 A -approximation for -center with center diversity and group fairness constraints
First, we give an overview of the algorithm, followed by a detailed description of the individual steps. As an initial step, compute a fractional solution to the -center clustering problem with only the group fairness constraint using linear programming, where represents a fractional assignment of points to centers, and indicates which points receive mass from other points in , i.e., are used as centers in . Furthermore, we compute a set of centers satisfying center diversity using a known approximation algorithm for this problem. As a next step, we reroute the mass in such that only the points in are used as centers. This yields a fractional solution satisfying center diversity and group fairness. Lastly, we convert the fractional assignment to an integral one by using a max flow with lower bounds. To discuss the algorithm in more detail, we divide it into four components, which are later formalized in Algorithm 1.
-
1.
Compute a set of centers that fulfills center diversity
-
2.
Compute a fractional group fair solution
-
3.
Reroute mass in such that only points in receive positive mass
-
4.
Compute an integral point assignment
2.1 Center diversity
To guarantee our solution fulfills the DS constraint we use an existing algorithm for diversity-aware -center as an opaque-box algorithm. In the following, let be the returned set of centers that satisfy the DS constraint, and be the approximation factor of the algorithm. Currently, the best known algorithm for diversity-aware -center is the -approximation by Jones et al. [21] with running time. If the combination of group fairness with another constraint is desired, a corresponding approximation algorithm can be used instead.
2.2 Group fairness
We formulate a linear program to obtain an initial fractional group fair clustering. We use a matrix of variables representing the assignment from points to centers, i.e., denotes the amount of mass sent from point to point , i. e., the amount by which a point is assigned to a center . Additionally, we compute a vector of variables , where can be interpreted as the amount to which is opened as a center.
| (LP-1.1) | |||||
| (LP-1.2) | |||||
| (LP-1.3) | |||||
| (LP-1.4) | |||||
| (LP-1.5) | |||||
| (LP-1.6) | |||||
| (LP-1.7) | |||||
We denote the linear program by . Note that the -center objective function is not linear. However, we can control the cost of a feasible solution via constraint (LP-1.6), which ensures that points are not assigned to centers farther than away. Combining this with a search over all possible values of allows us to drop the objective function. The group fairness (as described in Definition 1) is enforced by constraints (LP-1.4) and (LP-1.5).
This linear program is a correct formalization of -center clustering with group fairness constraint. To see this, we prove that any feasible -center clustering satisfying group fairness corresponds to a feasible solution for when is at least the objective value of the clustering. The proof of the following two lemmas can be found in the full version.
Lemma 7.
Let be a feasible -center clustering satisfying GF with objective value . Then, defined by
is a feasible solution for .
Lemma 8.
Let be a feasible integral solution for . Then, defined by
is a feasible -center clustering satisfying group fairness with objective value .
We choose the value of as follows. It should be large enough such that allows for a feasible solution. For this, let denote the minimal value such that has a solution. Further, should be large enough such that the -approximation for -center with DS has cost upper bounded by . For this, let be minimal such that the -approximation returns a solution with exactly centers and value of at most . Now, we set . We can upper bound the value of by the value of an optimal solution satisfying both GF and DS.
Lemma 9.
Let be the value of an optimal -center solution satisfying GF and DS. Then, .
Proof.
Let and denote the values of an optimal -center clustering satisfying GF and DS, respectively. By Lemma 7, contains a feasible solution. This implies . Let denote the cost of the solution computed by the -approximation for -center with DS. It is . We set to the minimal value such that . Then, .
Any solution satisfying both GF and DS is also a feasible solution for GF or DS, respectively. Hence, and . Putting everything together yields .
2.3 Rerouting fractional assignments
Let be the (fractional) group fair solution computed by solving the LP optimally, and be the set of diverse centers computed by a -approximation for -center with DS constraint. If for some , the point can be considered as a center in this solution. We want to reroute mass to the centers in , such that positive mass is only sent to points in . Meanwhile, we want to ensure that all centers in get some positive mass. That is, we construct such that , while ensuring that the cost does not increase too much. In this context, we need the notion of a point’s neighborhood. For a point , we define the set of all the points that sends positive mass to (i. e., is assigned to in the fractional solution). For a set of points , we define .
The overall idea is to take all the mass incoming at some point in the LP solution and reroute it to a “nearby” center in if this is possible. We have to be careful that this does not change the color proportions. Then, as fulfills group fairness, the newly formed clusters are also group fair. Consider a point that gets some mass in the current solution, i.e., . Depending on ’s position relative to the centers in , we decide how to reroute the incoming mass at .
We want to prevent any center in from becoming empty (i.e., it gets no mass assigned). By the first constraint of the LP, , every point, particularly every center in , must possess some outgoing mass in the LP solution . That is, for every , the set is non-empty. To ensure that mass is sent to a point , we reroute mass sent to a point to . However, these sets might overlap, and if we sent all incoming mass at to , there might not be any mass left to send to some other center that has in its neighborhood. To circumvent this problem, we proportionally split the mass sent to a point among all points with . A center gets as much mass from with as it sends to , proportional to the masses sent from all centers to .
In the remaining case that , gets mass solely from points that are not desired centers themselves. In this case, we can safely reroute all mass to some nearby center in . To keep the distances small, we choose the center that is closest to . Formally, a new fractional solution is defined as follows:
| (rerouting-) |
and
| (rerouting-) |
where with
Figure 1 schematically visualizes how the mass emitted from a point is rerouted to centers in . We can show that the rerouted solution is a feasible solution to such that is integral. Further, every gets a mass of at least assigned. We defer the proof to the full version.
Lemma 10.
Let be a feasible solution for and let be the solution achieved through the rerouting described above. Then the following properties hold:
-
1.
is a feasible solution to
-
2.
for all
-
3.
is integral.
2.4 Final fair assignment
After the rerouting step (see Section 2.3), we have an assignment that is group fair and satisfies the diverse center selection constraint. However, the assignment is still fractional. To achieve the final integral assignment of points to centers, we build a network graph and solve a max flow problem with lower bounds on it, similar to [2]. This is done as follows:
Let , where and . The set of edges connects all points in to the source. Each point is connected to a center-color-node , if and . More formally . The edges in and have capacity 1. Each of the color-center-nodes is connected to its corresponding center , thus . The capacities on these edges ensure that each center receives (nearly) the same amount of flow of each color as it does in the fractional group fair solution. Since is not necessarily integral, lower and upper bounds on the edges are introduced; the lower bound is and the upper bound is . Lastly, the set of edges connects all center points to the sink . These edges are used to ensure that each cluster center receives (nearly) as much total flow as it received in the fractional solution, but again is not necessarily integral. Each edge has the lower bound and the upper bound (see Figure 2).
The important property of a max flow we use here is that in a network with integral capacities and integral demands, there always exists a feasible assignment that is integral. Since there is a flow with value (using ), there is also an integral flow with value . Let be the integral assignment from the flow. Our final solution is given by the pair . This step can introduce an additive violation of 2.
Lemma 11 (Group fairness – -center).
For each center and each color it holds that
Proof (analogous to [2]).
The full proof for Lemma 11 can be found in the full version.
3 An Algorithm for -median/-means with center diversity and group fairness constraints
In this section, we look at the doubly fair clustering problem under the -median and -means objective functions. The basic structure of the algorithm we use for these objectives is the same as for the -center objective described in Section 2. We again use a fractional LP solution that fulfills group fairness and reroute it such that it uses centers we obtain via an opaque-box algorithm for center diversity. The resulting fractional assignment is then rounded via a min cost flow procedure. In the following, we describe the steps of the algorithm for these cost functions and prove its correctness. For notational simplicity we describe the -median cost of a solution by and the -means cost by .
3.1 Center diversity
We find a center fair solution via an opaque-box algorithm for the respective problem. For notation reasons, we can interpret this solution as an integral assignment with if and only if and iff . Let and be the resulting approximation factors, respectively. The currently best available approximation algorithms for diverse center selection for these objectives are the following: For -median with DS, Thejaswi et al. [29] give a reduction to the matroid median problem, allowing a -approximation algorithms for the matroid median problem to be used to compute a -approximation for -median with DS. Currently the best known algorithm for the matroid median problem is the -approximation algorithm by Krishnaswamy et al. [23].
The reduction by Thejaswi et al. [29] can also be modified to reduce -means with DS to the facility location problem with -norm cost under matroid constraint, where , introduced by Vakilian and Yalçıner [30]. For this, we only need to set the opening costs of every facility to in addition to the construction of the -median reduction. As the number of opened facilities is bounded by the partition matroids constructed in the reduction, the arguments by Thejaswi et al. apply here as well. Vakilian and Yalçıner [30] also give a approximation for the facility location problem with -norm cost under matroid constraint, meaning we can use it to obtain a 256-approximation for -means with DS. For the special case of euclidean distance can also use the construction by Thejaswi et al. [29] to reduce from the matroid means problem to -means with DS. This allows us to use the -approximation algorithm for matroid means under Euclidean Distance by Zhao et al. [35].
3.2 Group fairness
The following relaxed LP finds a feasible assignment satisfying the GF constraint and minimizes the -median objective function
| minimize | (LP-Med/LP-Means) | |||||
| subject to | (LP-2.1) | |||||
| (LP-2.2) | ||||||
| (LP-2.3) | ||||||
| (LP-2.4) | ||||||
| (LP-2.5) | ||||||
| (LP-2.6) | ||||||
Note that the LP is in large parts identical to the one in section 2. The only difference is that both the -median and -means objective function are linear, so instead of using Equation LP-1.6 we now add it as proper objective function to the LP. Which objective function (LP-Med or LP-Means) is used depends on if we are interested in the -median or the -means problem. Analogously to Lemma 7 and Lemma 8 it can be shown how to obtain clustering solutions from the LP and the other way round.
In the following we denote by an optimal solution to the above relaxed LP. Since the algorithm largely works the same for both objectives, we often do not specify which one is used except for cases where it is relevant. Note that the cost of is a lower bound for the cost of the optimal doubly fair solution. This holds for both the -median and the -means cost function.
3.3 Rerouting
We use the center set from Section 3.1 and reroute the point assignments of in a way that the following hold:
-
the resulting solution () is a feasible solution to the LP
-
for all it holds
-
we can bound the cost of the resulting solution by the following:
-
–
in the -median case
-
–
for in the -means case
-
–
-
all are integral
We first focus on the second requirement. For we look at the set which is the set of points that get assigned positive mass from in . The main idea is to redirect the mass that is assigned to a point such that gets assigned a share of this mass that is equivalent to . After we have done this for all , we reroute the remaining mass that arrives at by sending it to the nearest neighbor of in . For this we use the same mapping function as in Section 2.3.
We denote by the ratio of to the total mass of assignments on . Note that if . Using this notation we define the following way:
An example for this rerouting can be seen in Figure 3. The main difference of this rerouting step to the rerouting in Section 2.3 is that a point now does not get all the mass that is assigned to a point (even if he is the only center sending mass there), but only a fraction of it that is equivalent to . This property will later be important when we are bounding the cost of this solution.
The following lemmas show that do indeed have the desired properties. We defer the corresponding proofs to the full version of this paper. Note that the solutions depend on the objective function (-median or -means), since it is used in the LP in Section 3.2 and the respective opaque-box algorithm in Section 3.1.
Lemma 12.
is a feasible solution to the LP in Section 3.2. It holds for all . All in this solution are integral.
Lemma 13 (Cost -median).
For the -median cost of the following holds:
Lemma 14 (Cost -means).
For the -means cost of the following holds for :
3.4 Final fair assignment
In this section, we show how to round the fractional assignments to get an integral solution with small additive violation of the group fairness constraint. We show that the resulting solution has the same cost as .
For this, we use the same min cost flow construction as Bercea et al. use in [4] to round their essentially fair clustering solutions. Similarly to the construction used in Section 2.4 the vertex set is given by and the set of edges is given by , where , , and . All edges have unit capacity. is the only edge set that has nonzero cost. An edge has cost in the -median case and cost in the -means case. The node balances are defined as follows:
-
has balance
-
All have balance 0
-
All have balance
-
All have balance
-
has balance
The structure of this min cost flow can be seen in Figure 2 since it is identical to the structure of the max flow instance used in Section 2.4. Since all capacities and balances are integral, we can find an integral solution to the flow instance that has minimal cost. We call the assignment we extract from this MinCostflow-solution . We show that it satisfies group fairness with an additive violation of 2:
Lemma 15 (Group fairness – -median, -means).
For each center and each color it holds that
The final solution is then obtained via the pair . We defer the proof that this results in Theorem 5 to the full version.
Theorem 5. [Restated, see original statement.]
There exists a polynomial time algorithm that computes a
-
-approximation with GF-violation of at most for the doubly constrained fair -median problem, where is the approximation factor of a given approximation algorithm for DS-fair -median.
-
-approximation with GF-violation of at most for the doubly constrained fair -means problem, where is the approximation factor of a given approximation algorithm for DS-fair -means.
4 Conclusion
We study the doubly constrained fair -clustering problem, requiring both group fairness within clusters and diverse center selection among representatives. Via a modular and extendable approach that uses an LP-based rerouting and rounding routine, we obtain a 4-approximation for -center and the first constant-factor approximations for -median and -means in general metrics. Natural next steps include proving nontrivial lower bounds and eliminating the additive violation. Further, developing non-sequential algorithms that enforce both fairness constraints directly might enable better approximation guarantees.
References
- [1] Mohsen Abbasi, Aditya Bhaskara, and Suresh Venkatasubramanian. Fair clustering via equitable group representations. In Madeleine Clare Elish, William Isaac, and Richard S. Zemel, editors, FAccT ’21: 2021 ACM Conference on Fairness, Accountability, and Transparency, Virtual Event / Toronto, Canada, March 3-10, 2021, pages 504–514. ACM, 2021. doi:10.1145/3442188.3445913.
- [2] Sara Ahmadian, Alessandro Epasto, Ravi Kumar, and Mohammad Mahdian. Clustering without over-representation. In Ankur Teredesai, Vipin Kumar, Ying Li, Rómer Rosales, Evimaria Terzi, and George Karypis, editors, Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, KDD 2019, Anchorage, AK, USA, August 4-8, 2019, KDD ’19, pages 267–275, New York, NY, USA, 2019. ACM. doi:10.1145/3292500.3330987.
- [3] 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, December 8-14, 2019, Vancouver, BC, Canada, pages 4955–4966, 2019. URL: https://proceedings.neurips.cc/paper/2019/hash/fc192b0c0d270dbf41870a63a8c76c2f-Abstract.html.
- [4] Ioana Oriana Bercea, Martin Groß, Samir Khuller, Aounon Kumar, Clemens Rösner, Daniel R. Schmidt, and Melanie Schmidt. On the cost of essentially fair clusterings. In Dimitris Achlioptas and László A. Végh, editors, Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, APPROX/RANDOM 2019, Massachusetts Institute of Technology, Cambridge, MA, USA, September 20-22, 2019, volume 145 of LIPIcs, pages 18:1–18:22. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2019. doi:10.4230/LIPIcs.APPROX-RANDOM.2019.18.
- [5] Matteo Ceccarello, Andrea Pietracaprina, and Geppino Pucci. Fast and accurate fair -center clustering in doubling metrics. In Tat-Seng Chua, Chong-Wah Ngo, Ravi Kumar, Hady W. Lauw, and Roy Ka-Wei Lee, editors, Proceedings of the ACM on Web Conference 2024, WWW 2024, Singapore, May 13-17, 2024, pages 756–767. ACM, 2024. doi:10.1145/3589334.3645568.
- [6] Matteo Ceccarello, Andrea Pietracaprina, Geppino Pucci, and Federico Soldà. Scalable and space-efficient robust matroid center algorithms. J. Big Data, 10(1):49, 2023. doi:10.1186/s40537-023-00717-4.
- [7] Moses Charikar, Vincent Cohen-Addad, Ruiquan Gao, Fabrizio Grandoni, Euiwoong Le, and Ernest Van Wijland. An Improved Greedy Approximation for (Metric) -Means. In 2025 IEEE 66th Annual Symposium on Foundations of Computer Science (FOCS), pages 233–240, Los Alamitos, CA, USA, December 2025. IEEE Computer Society. doi:10.1109/FOCS63196.2025.00016.
- [8] Danny Z. Chen, Jian Li, Hongyu Liang, and Haitao Wang. Matroid and knapsack center problems. Algorithmica, 75(1):27–52, 2016. doi:10.1007/s00453-015-0010-1.
- [9] Anshuman Chhabra, Karina Masalkovaite, and Prasant Mohapatra. An overview of fairness in clustering. IEEE Access, 9:130698–130720, 2021. doi:10.1109/ACCESS.2021.3114099.
- [10] Flavio Chierichetti, Ravi Kumar, Silvio Lattanzi, and Sergei Vassilvitskii. Fair clustering through fairlets. In Isabelle Guyon, Ulrike von Luxburg, Samy Bengio, Hanna M. Wallach, Rob Fergus, S. V. N. Vishwanathan, and Roman Garnett, editors, Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, December 4-9, 2017, Long Beach, CA, USA, pages 5029–5037, 2017. URL: https://proceedings.neurips.cc/paper/2017/hash/978fce5bcc4eccc88ad48ce3914124a2-Abstract.html.
- [11] Vincent Cohen-Addad, Fabrizio Grandoni, Euiwoong Lee, Chris Schwiegelshohn, and Ola Svensson. A -approximation algorithm for metric -median. In Michal Koucký and Nikhil Bansal, editors, Proceedings of the 57th Annual ACM Symposium on Theory of Computing, STOC 2025, Prague, Czechia, June 23-27, 2025, pages 615–624. ACM, 2025. doi:10.1145/3717823.3718299.
- [12] John Dickerson, Seyed A. Esmaeili, Jamie Morgenstern, and Claire Jie Zhang. Sok: Fair clustering: Critique, caveats, and future directions. In IEEE Conference on Secure and Trustworthy Machine Learning, SaTML 2025, Copenhagen, Denmark, April 9-11, 2025, pages 698–713. IEEE, 2025. doi:10.1109/SaTML64287.2025.00044.
- [13] John P. Dickerson, Seyed A. Esmaeili, Jamie H. Morgenstern, and Claire Jie Zhang. Doubly constrained fair clustering. In Alice Oh, Tristan Naumann, Amir Globerson, Kate Saenko, Moritz Hardt, and Sergey Levine, editors, Advances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems 2023, NeurIPS 2023, New Orleans, LA, USA, December 10 - 16, 2023, 2023. URL: http://papers.nips.cc/paper_files/paper/2023/hash/2ab87e2179b8ea209b52463802d62560-Abstract-Conference.html.
- [14] Ameet Gadekar. Tight FPT approximations for fair -center with outliers. CoRR, abs/2602.05476, 2026. doi:10.48550/arXiv.2602.05476.
- [15] Teofilo F. Gonzalez. Clustering to minimize the maximum intercluster distance. Theor. Comput. Sci., 38:293–306, 1985. doi:10.1016/0304-3975(85)90224-5.
- [16] Longkun Guo, Zeyu Lin, Chaoqi Jia, and Chao Chen. Improved streaming algorithm for fair -center clustering. In Sven Koenig, Chad Jenkins, and Matthew E. Taylor, editors, Fortieth AAAI Conference on Artificial Intelligence, Thirty-Eighth Conference on Innovative Applications of Artificial Intelligence, Sixteenth Symposium on Educational Advances in Artificial Intelligence, AAAI 2026, Singapore, January 20-27, 2026, pages 36946–36954. AAAI Press, 2026. doi:10.1609/aaai.v40i43.41022.
- [17] Anupam Gupta, Benjamin Moseley, and Rudy Zhou. Structural iterative rounding for generalized -median problems. Math. Program., 212(1):581–634, 2025. doi:10.1007/s10107-024-02119-7.
- [18] Elfarouk Harb and Ho Shan Lam. KFC: A scalable approximation algorithm for -center fair clustering. In Hugo Larochelle, Marc’Aurelio Ranzato, Raia Hadsell, Maria-Florina Balcan, and Hsuan-Tien Lin, editors, Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020. URL: https://proceedings.neurips.cc/paper/2020/hash/a6d259bfbfa2062843ef543e21d7ec8e-Abstract.html.
- [19] Dorit S. Hochbaum and David B. Shmoys. A unified approach to approximation algorithms for bottleneck problems. J. ACM, 33(3):533–550, 1986. doi:10.1145/5925.5933.
- [20] Xinrui Jia, Kshiteej Sheth, and Ola Svensson. Fair colorful -center clustering. Math. Program., 192(1):339–360, 2022. doi:10.1007/s10107-021-01674-7.
- [21] Matthew Jones, Huy L. Nguyen, and Thy Dinh Nguyen. Fair -centers via maximum matching. In Proceedings of the 37th International Conference on Machine Learning, ICML 2020, 13-18 July 2020, Virtual Event, volume 119 of Proceedings of Machine Learning Research, pages 4940–4949. PMLR, 2020. URL: http://proceedings.mlr.press/v119/jones20a.html.
- [22] Christopher Jung, Sampath Kannan, and Neil Lutz. Service in Your Neighborhood: Fairness in Center Location. In Aaron Roth, editor, 1st Symposium on Foundations of Responsible Computing (FORC 2020), volume 156 of Leibniz International Proceedings in Informatics (LIPIcs), pages 5:1–5:15, Dagstuhl, Germany, 2020. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.FORC.2020.5.
- [23] Ravishankar Krishnaswamy, Shi Li, and Sai Sandeep. Constant approximation for -median and -means with outliers via iterative rounding. In Ilias Diakonikolas, David Kempe, and Monika Henzinger, editors, Proceedings of the 50th Annual ACM SIGACT Symposium on Theory of Computing, STOC 2018, Los Angeles, CA, USA, June 25-29, 2018, pages 646–659. ACM, 2018. doi:10.1145/3188745.3188882.
- [24] Sepideh Mahabadi and Ali Vakilian. Individual fairness for -clustering. In Proceedings of the 37th International Conference on Machine Learning, ICML 2020, 13-18 July 2020, Virtual Event, volume 119 of Proceedings of Machine Learning Research, pages 6586–6596. PMLR, 2020. URL: http://proceedings.mlr.press/v119/mahabadi20a.html.
- [25] Huy Le Nguyen, Thy Dinh Nguyen, and Matthew Jones. Fair range -center. CoRR, abs/2207.11337, 2022. doi:10.48550/arXiv.2207.11337.
- [26] Clemens Rösner and Melanie Schmidt. Privacy preserving clustering with constraints. In Ioannis Chatzigiannakis, Christos Kaklamanis, Dániel Marx, and Donald Sannella, editors, 45th International Colloquium on Automata, Languages, and Programming, ICALP 2018, Prague, Czech Republic, July 9-13, 2018, volume 107 of LIPIcs, pages 96:1–96:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2018. doi:10.4230/LIPIcs.ICALP.2018.96.
- [27] Chaitanya Swamy. Improved approximation algorithms for matroid and knapsack median problems and applications. ACM Trans. Algorithms, 12(4):49:1–49:22, 2016. doi:10.1145/2963170.
- [28] Suhas Thejaswi, Ameet Gadekar, Bruno Ordozgoiti, and Aristides Gionis. Diversity-aware clustering: Computational complexity and approximation algorithms. CoRR, abs/2401.05502, 2024. doi:10.48550/arXiv.2401.05502.
- [29] Suhas Thejaswi, Bruno Ordozgoiti, and Aristides Gionis. Diversity-aware -median: Clustering with fair center representation. In Nuria Oliver, Fernando Pérez-Cruz, Stefan Kramer, Jesse Read, and José Antonio Lozano, editors, Machine Learning and Knowledge Discovery in Databases. Research Track - European Conference, ECML PKDD 2021, Bilbao, Spain, September 13-17, 2021, Proceedings, Part II, volume 12976 of Lecture Notes in Computer Science, pages 765–780. Springer, 2021. doi:10.1007/978-3-030-86520-7_47.
- [30] Ali Vakilian and Mustafa Yalçiner. Improved approximation algorithms for individually fair clustering. In Gustau Camps-Valls, Francisco J. R. Ruiz, and Isabel Valera, editors, Proceedings of The 25th International Conference on Artificial Intelligence and Statistics (AISTATS 2022), 28-30 March 2022, Virtual Event, volume 151 of Proceedings of Machine Learning Research, pages 8758–8779. PMLR, 2022. URL: https://proceedings.mlr.press/v151/vakilian22a.html.
- [31] Xiaoliang Wu, Qilong Feng, Junyu Huang, and Jianxin Wang. Parameterized approximation algorithm for doubly constrained fair clustering. In Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence, IJCAI 2025, Montreal, Canada, August 16-22, 2025, pages 592–600. ijcai.org, 2025. doi:10.24963/ijcai.2025/67.
- [32] Xiaoliang Wu, Ting Liang, Junyu Huang, and Qilong Feng. Learning-augmented approximation algorithms for group fair -center clustering. Frontiers of Computer Science, 20:2010408, 2026. doi:10.1007/s11704-025-50627-2.
- [33] Lunhao Zhang, Pengzhi Gao, and Peng Zhang. Doubly constrained fair clustering for general -norms. In Fedor V. Fomin and Mingyu Xiao, editors, Computing and Combinatorics - 31st International Computing and Combinatorics Conference, COCOON 2025, Chengdu, China, August 15-17, 2025, Proceedings, Part I, volume 15983 of Lecture Notes in Computer Science, pages 93–105. Springer, 2025. doi:10.1007/978-981-95-0215-8_8.
- [34] Zhen Zhang, Xiaohong Chen, Limei Liu, Jie Chen, Junyu Huang, and Qilong Feng. Parameterized approximation schemes for fair-range clustering. In Amir Globersons, Lester Mackey, Danielle Belgrave, Angela Fan, Ulrich Paquet, Jakub M. Tomczak, and Cheng Zhang, editors, Advances in Neural Information Processing Systems 38: Annual Conference on Neural Information Processing Systems 2024, NeurIPS 2024, Vancouver, BC, Canada, December 10 - 15, 2024, 2024. URL: http://papers.nips.cc/paper_files/paper/2024/hash/6ee0ebd0983f0926496b7d4e0d48b8e3-Abstract-Conference.html.
- [35] Ao Zhao, Yang Zhou, and Qian Liu. Improved approximation algorithms for matroid and knapsack means problems. International Journal of Foundations of Computer Science, 36(05):709–729, 2025. doi:10.1142/S012905412246008X.
