SlowGuess/NeurIPS_2023_OCR huggingface dataset:
John Dickerson<sup>1,2</sup>, Seyed A. Esmaeili<sup>3</sup>, Jamie Morgenstern<sup>4</sup>, and Claire Jie Zhang<sup>4</sup>
<sup>1</sup>University of Maryland, College Park  
<sup>2</sup>Arthur  
nons Laufer Mathematical Sciences Institute  
<sup>4</sup>University of Washington
The remarkable attention which fair clustering has received in the last few years has resulted in a significant number of different notions of fairness. Despite the fact that these notions are well-justified, they are often motivated and studied in a disjoint manner where one fairness desideratum is considered exclusively in isolation from the others. This leaves the understanding of the relations between different fairness notions as an important open problem in fair clustering. In this paper, we take the first step in this direction. Specifically, we consider the two most prominent demographic representation fairness notions in clustering: (1) Group Fairness (GF), where the different demographic groups are supposed to have close to population-level representation in each cluster and (2) Diversity in Center Selection (DS), where the selected centers are supposed to have close to population-level representation of each group. We show that given a constant approximation algorithm for one constraint (GF or DS only) we can obtain a constant approximation solution that satisfies both constraints simultaneously. Interestingly, we prove that any given solution that satisfies the GF constraint can always be post-processed at a bounded degradation to the clustering cost to additionally satisfy the DS constraint while the reverse is not true given a solution that satisfies DS instead. Furthermore, we show that both GF and DS are incompatible (having an empty feasibility set in the worst case) with a collection of other distance-based fairness notions. Finally, we carry experiments to validate our theoretical findings.
Algorithms' deployment in consequential settings, from their use in selecting interview candidates during hiring, to criminal justice systems for risk assessment, to making decisions about where public resources should be allocated [39, 28, 11, 18, 12], have led to an explosion in interest of developing classification and regression algorithms designed to have equitable predictions. More recently, these questions have been extended to unsupervised settings, with the recognition that algorithms which behave as subroutines may have downstream impacts on the ability of a system to make equitable decisions. For example, while personalized advertising seems to be a much lower-risk application than those mentioned above, the advertisements in question might pertain to lending, employment, or housing. For this reason, understanding the impact of unsupervised data pre-processing, including dimensionality reduction and clustering, have been of recent interest, despite the fact that many mathematical operationalizations of fairness do not behave nicely under composition [19].
Clustering is a canonical problem in unsupervised learning and arguably the most fundamental. It is also among the classical problems in operations research and used heavily in facility location as well as customer segmentation. As a result, fairness in clustering has also been well-studied
in recent years [8]. Much of this work has identified that existing clustering algorithms fail to satisfy various notions of fairness, and introduce special-purpose algorithms whose outcomes do conform to these definitions. As in supervised learning, a list of mathematical constraints have been introduced as notions of fairness for clustering (more than seven different constraints so far). For example, Chierichetti et al. [17] show algorithms that are guaranteed to produce clustering outputs that prevent the under-representation of a demographic group in a given cluster, hence being compliant to the disparate impact doctrine [22]. Brubach et al. [13] show algorithms that bound the probability of assigning two nearby points to different clusters, therefore guaranteeing a measure of community cohesion. Other algorithms for well-motivated fairness notions have also been introduced, such as minimizing the maximum clustering cost per population among the groups [24, 1], assigning distance-to-center values that are equitable [14], and having proportional demographic representation in the chosen cluster centers [32].
These constraints and others may be well-justified in a variety of specific application domains, and which are more appropriate will almost certainly depend on the particular application at hand. The dominant approach in the literature has imposed only one constraint in a given setting, though some applications of clustering (which are upstream of many possible tasks) might naturally force us to reconcile these different constraints with one another. Ideally, one would desire a single clustering of the data which satisfies a collection of fairness notions instead of having different clusterings for different fairness notions. A similar question was investigated in fair classification [31, 18] where it was shown that unless the given classification instance satisfies restrictive conditions, the two desired fairness objectives of calibration and balance cannot be simultaneously satisfied. One would expect that such a guarantee would also hold in fair clustering. For various constraints it can be shown that they are in fact at odds with one another. However, it is also worthwhile on the other hand to ask if some fair clustering constraints are more compatible with one another, and how one can satisfy both simultaneously?
Our Contributions: In this paper, we take a first step towards understanding this question. In particular, we consider two specific group fairness constraints (1) GF: The group fair clustering (GF) of Chierichetti et al. [17] which roughly states that clusters should have close to population level proportions of each group and (2) DS: The diversity in center selection (DS) constraint [32] which roughly states that the selected centers in the clustering should similarly include close to population level proportions of each group. We note that although these two definitions are both concerned with group memberships, the fact that they apply at different "levels" (clustered points vs selected centers) makes the algorithms and guarantees that are applicable for one problem not applicable to the other, certainly not in an obvious way. Further, both of these notions are motivated by disparate impact [22] which essentially states that different groups should receive the same treatment. Therefore, it is natural to consider the intersection of both definitions  $(\mathbf{GF} + \mathbf{DS})$ . We show that by post-processing any solution satisfying one constraint then we can always satisfy the intersection of both constraints. At a more precise level, we show that an  $\alpha$ -approximation algorithm for one constraint results in an approximation algorithm for the intersection of the constraints with only a constant degradation to approximation ratio  $\alpha$ . Additionally, we study the degradation in the clustering cost and show that imposing DS on a GF solution leads to a bounded degradation of the clustering cost while the reverse is not true. Moreover, we show that both GF and DS are incompatible (having an empty feasible set) with a set of distance-based fairness constraints that were introduced in the literature. Finally, we validate our finding experimentally. Due to the space limits we refer the reader to Appendix C for the proofs as well as further details.
Fairness in clustering: GF and DS. In the line of works on group-level fairness, Chierichetti et al. [17] defined balance in the case of two groups to require proportion of a group in any cluster to resemble its proportion in input data. They also proposed the method of creating fairlets and then run generic clustering algorithm on fairlets. Bera et al. [9] generalized the notion of balance to multiple groups, and considered when centers are already chosen how to assign points to centers so that each group has bounded representation in each cluster. While only assuming probabilistic group assignment, Esmaeili et al. [21] presented algorithms that guarantee cluster outputs satisfy expected group ratio bounds. Also working with bounded representation, Esmaeili et al. [20] showed how to minimize additive violations of fairness constraint while ensuring clustering cost is within given upper
bound. Besides center-based clustering, group fairness constraint is also applied to spectral clustering [33]. Recent work due to Wang et al. [41] speeds up computation in this setting. Ahmadi et al. [2] applied group fairness to correlation clustering. As a recent follow-up, Ahmadian and Negahbani [4] generalized the setting and improved approximation guarantee. Ahmadian et al. [6] and Chhabra and Mohapatra [16] introduced group fairness in the context of hierarchical clustering, with work due to Knittel et al. [35] proposing an algorithm with improved approximation factor in optimizing cost with fairness setting. Diversity in center selection was first studied in Kleindessner et al. [32] for data summarization tasks. The authors presented an algorithms that solves the fair  $k$ -centers problem with an approximation factor that is exponential in the number of groups and with a running time that is linear in the number of input points. A follow-up work Jones et al. [29] improved the approximation factor to a constant while keeping the run time linear in number of input points. Concerned with both the diversity in selected center and its distortion of the summary, Angelidakis et al. [7] proposed an approximation algorithm for the  $k$ -centers problem that ensures number of points assigned to each center is lower bounded. Recent work due to Nguyen et al. [37] generalized the problem to requiring group representation in centers to fall in desired range, which is the setting this work is using.
Other fairness considerations in clustering. Besides fairness notions already mentioned, other individual fairness notions include requiring individual points to stay close to points that are similar to themselves in output clusters such as that of [34, 13]. The proportionally fair clustering based on points forming coalitions [15]. A notion based on individual fairness that states that points should have centers within a distance  $R$  if there are  $n / k$  points around it within  $R$  [36, 30]. Newer fairness notions on clustering problems were introduced recently in Ahmadi et al. [3] and Gupta and Dukkipati [26]. For the interested reader, we recommend a recent overview due to Awasthi et al. [8] for exhaustive references and an accessible overview of fair clustering research.
3 Preliminaries and Symbols
We are given a set of points  $\mathcal{C}$  along with a metric distance  $d(.,.)$ . The set of chosen centers is denoted by  $S \subset \mathcal{C}$  and the assignment function (assigning points to centers) is  $\phi: \mathcal{C} \to S$ . We are concerned with the  $k$ -center clustering which minimizes the maximum distance between a point and its assigned center. Formally, we have:
$$
\min  _ {S: | S | \leq k, \phi} \max  _ {j \in \mathcal {C}} d (j, \phi (j)) \tag {1}
$$
In the absence of constraints, the assignment function  $\phi(.)$  is trivial since the optimal assignment is to have each point assigned to its nearest center. However, when the clustering problem has constraints this is generally not the case.
In fair clustering, each point  $j \in \mathcal{C}$  is assigned a color by a function  $\chi(j) = h \in \mathcal{H}$  to indicate its demographic group information, where  $\mathcal{H}$  is the set of all colors. For simplicity, we assume that each point has one group associated with it and that the total number of colors  $m = |\mathcal{H}|$  is a constant. Moreover, the set of points with color  $h$  are denoted by  $\mathcal{C}^h$ . The total number of points is  $n = |\mathcal{C}|$  and the total number of points of color  $h$  is  $n_h = |\mathcal{C}^h|$ . It follows that the proportion of color  $h$  is  $r_h = \frac{n_h}{n}$ . Finally, given a clustering  $(S, \phi)$ , we denote the set of points in the  $i^{\text{th}}$  cluster by  $C_i$  and the subset of color  $h$  by  $C_i^h = C_i \cap \mathcal{C}^h$ .
We now formally introduce the group fair clustering (GF) and the diverse center selection (DS) problems:
Group Fair Clustering [17, 10, 9, 21, 5]: Minimize objective (1) subject to proportional demographic representation in each cluster. Specifically,  $\forall i\in S,\forall h\in \mathcal{H}:\beta_h|C_i|\leq |C_i^h |\leq \alpha_h|C_i|$  where  $\beta_{h}$  and  $\alpha_{h}$  are pre-set upper and lower bounds for the demographic representation of color  $h$  in a given cluster.
Diverse Center Selection [32, 29, 37]: Minimize objective (1) subject to the set of centers  $S$  satisfying demographic representation. Specifically, denoting the number of centers from demographic (color)  $h$  by  $k_h = |S \cap \mathcal{C}^h|$ , then as done in [37] it must satisfy  $k_h^l \leq k_h \leq k_h^u$  where  $k_h^l$  and  $k_h^u$  are lower and upper bounds set for the number of centers of color  $h$ , respectively.
Importantly, throughout we have  $\forall h\in \mathcal{H}:\beta_h > 0$ . Further, for  $\mathbf{GF}$  we consider solutions that could have violations to the constraints as done in the literature [9, 10]. Specifically, a given solution  $(S,\phi)$  has an additive violation of  $\rho$ $\mathbf{GF}$  if  $\rho$  is the smallest number such that the following holds:  $\forall i\in S,\forall h\in \mathcal{H}:\beta_h|C_i| - \rho \leq |C_i^h |\leq \alpha_h|C_i| + \rho$ . We denote the problem of minimizing the  $k$ -center objective while satisfying both the  $\mathbf{GF}$  and DS constraints as  $\mathbf{GF} + \mathbf{DS}$ .
Why Consider GF and DS in Particular? There are two reasons to consider the GF and DS constraints in particular. First, from the point of view of the application both GF and DS are concerned with demographic (group) fairness. Further, they are both specifically focused on the representation of groups, i.e. the proportions of the groups (colors) in the clusters for GF and in the selected center for DS. Second, they are both "distance-agnostic", i.e. given a clustering solution one can decide if it satisfies the GF or DS constraints without having access to the distance between the points.
4 Algorithms for GF+DS
4.1 Active Centers
We start by observing the fact that if we wanted to satisfy both GF and DS simultaneously, then we should make sure that all centers are active (having non-empty clusters). More precisely, given a solution  $(S,\phi)$  then the DS constraints should be satisfied further  $\forall i\in S:|C_i| > 0$ , i.e. every center in  $S$  should have some point assigned to it and therefore not forming an empty cluster. The following example clarifies this:
Example: Consider Figure 1. Suppose we have  $k = 2$  and we wish to satisfy the GF and DS constraints with equal red to blue representation. DS requires one blue and one red center. Further, each cluster should have  $|C_i^{\mathrm{blue}}| = |C_i^{\mathrm{red}}| = \frac{1}{2} |C_i|$  to satisfy GF. Consider the following solution  $S_1 = \{2,4\}$  and  $\phi_1$  which assigns all points to point 2 including point 4. This satisfies GF and DS. Since we have one blue center and one red center. Further, the cluster of center 4 has no points and therefore  $0 = |C_i^{\mathrm{blue}}| = |C_i^{\mathrm{red}}| = \frac{1}{2} |C_i|$ . Another solution would have  $S_2 = S_1 = \{2,4\}$  but with  $\phi_2$  assigning points 2 and 3 to center 2 and points 1 and 4 to center 4. This would also clearly satisfy the GF and DS constraints.
There is a clear issue in the first solution which is that although center 4 is included in the selection it has no points assigned to it (it is an empty
cluster). This makes it functionally non-existent. This is why the definition should only count active centers.
Figure 1: In this graph the distance between the points is defined as the path distance.
This issue of active centers did not appear before in DS [32, 37], the reason behind this is that it is trivial to satisfy when considering only the DS constraint since each center is assigned all the points closest to it. This implies that the center will at least be assigned to itself, therefore all centers in a DS solution are active. However, we cannot simply assign each point to its closest center when the GF constraints are imposed additionally as the colors of the points have to satisfy the upper and lower proportion bounds of GF.
4.2 The DIVIDE Subroutine
Here we introduce the DIVIDE subroutine (block 1) which is used in subsections 4.3 and 4.4 in algorithms for converting solutions that only satisfy DS or GF into solutions that satisfy  $\mathbf{GF} + \mathbf{DS}$ . DIVIDE takes a set of points  $C$  (which is supposed to be a single cluster) with center  $i$  along with a subset of chosen points  $Q$  ( $Q \subset C$ ). The entire set of points is then divided among the points  $Q$  forming  $|Q|$  many new non-empty (active) clusters. Importantly, the points of each color are divided among the new centers in  $Q$  so that the additive violation increases by at most 2. See Figure 2 for an intuitive illustration.
Here we use the symbol  $q$  to index a point in the set  $Q$ . Importantly, the numbering starts with 0 and ends with  $|Q| - 1$ .
We prove the following about DIVIDE:
Figure 2: Illustration of DIVIDE subroutine.
Algorithm 1 DIVIDE
1: Input: Set of points  $C$  with center  $i\in C$ , Subset of points  $Q$ $(Q\subset C)$  of cardinality  $|Q|$ .  
2: Output: An assignment function  $\phi :C\to Q$ .  
3: if  $|Q| = 1$  then  
4: Assign all points  $C$  to the single center in  $Q$ .  
5: else  
6: Set firstIndex  $= 0$ .  
7: for  $h\in \mathcal{H}$  do  
8: Set:  $T_{h} = \frac{|C^{h}|}{|Q|}$ ,  $b_{h} = T_{h} - |Q|\lfloor T_{h}\rfloor$ , count  $= 0$   
9: Set:  $q =$  firstIndex  
10: while count  $\leq |Q| - 1$  do  
11: if  $b_{h} > 0$  then  
12: Assign  $[T_h]$  many points of color  $h$  in  $C$  to center  $q$ .  
13: Update  $b_{h} = b_{h} - 1$ .  
14: Update firstIndex = (firstIndex + 1) mod  $|Q|$ .  
15: else  
16: Assign  $[T_h]$  many points of color  $h$  in  $C$  to center  $q$ .  
17: end if  
18: Update  $q = (q + 1)\mod |Q|$ , count  $= \text{count} + 1$ .  
19: end while  
20: end for  
21: end if
Lemma 1. Given a non-empty cluster  $C$  with center  $i$  and radius  $R$  that satisfies the  $GF$  constraints at an additive violation of  $\rho$  and a subset of points  $Q$  ( $Q \subset C$ ). Then the clustering  $(Q, \phi)$  where  $\phi = \mathrm{DIVIDE}(C, Q)$  has the following properties: (1) The  $GF$  constraints are satisfied at an additive violation of at most  $\frac{\rho}{|Q|} + 2$ . (2) Every center in  $Q$  is active. (3) The clustering cost is at most  $2R$ . If  $|Q| = 1$  then guarantee (1) is for the additive violation is at most  $\rho$ .
4.3 Solving  $\mathbf{GF} + \mathbf{DS}$  using a DS Algorithm
Here we show an algorithm that gives a bounded approximation for  $\mathbf{GF} + \mathbf{DS}$  using an approximation algorithm for  $\mathbf{DS}$ . Algorithm 2 works by first calling an  $\alpha_{\mathbf{DS}}$ -approximation algorithm resulting in a solution  $(\bar{S},\bar{\phi})$  that satisfies the DS constraints, then it solves an assignment problem using the ASSIGNMENTGF algorithm (shown in 3) where points are routed to the centers  $\bar{S}$  to satisfy the GF constraint. The issue is that some of the centers in  $\bar{S}$  may become closed and as a result the solution may no longer satisfy the DS constraints. Therefore, we have a final step where more centers are opened using the DIVIDE subroutine to satisfy the DS constraints while still satisfying the GF constraints at an additive violation and having a bounded increase to the clustering cost.
ASSIGNMENTGF works by solving a linear program (2) to find a clustering which ensures that (1) each cluster has at least a  $\beta_h$  fraction and at most an  $\alpha_h$  fraction of its points belonging to color  $h$ , and (2) the clustering assigns each point to a center that is within a minimum possible distance  $R$ . While the resulting LP solution could be fractional, the last step of ASSIGNMENTGF uses MAXFLOWGF which is an algorithm for rounding an LP solution to valid integral assignments at a bounded degradation to the GF guarantees and no increase to the clustering cost. See Appendix B for details on the MAXFLOWGF and its guarantees.
Algorithm 2 DSToGF+DS
1: Input: Points  $\mathcal{C}$ , Solution  $(\bar{S},\bar{\phi})$  with clusters  $\{C_i,\dots,C_{\bar{k}}\}$  satisfying the DS constraints with  $|\bar{S}| = \bar{k} \leq k$  of approximation ratio  $\alpha_{\mathbf{DS}}$  for the DS clustering problem.
2: Output: Solution  $(S,\phi)$  satisfying the GF and DS constraints simultaneously.
3:  $(S',\phi') = \text{ASSIGNMENTGF}(\bar{S},\mathcal{C})$
4: Update the set of centers  $S'$  by deleting all non-active centers (which have no points assigned to them). Let  $\{C_1', \ldots, C_{k'}'\}$  be the (non-empty) clusters of the solution  $(S', \phi')$  with  $|S'| = k' \leq \bar{k}$ .
5: Set  $\forall h\in \mathcal{H}:s_h = |S'\cap \mathcal{C}^h |$  , Set  $\forall i\in S:Q_{i} = \{i\}$
6: while  $\exists h\in \mathcal{H}$  such that  $s_h <   k_h^l$  do
7: Pick a color  $h_0$  such that  $s_{h_0} < k_{h_0}^l$ .
8: Pick a center  $i \in S'$  where there exists a point of color  $h_0$ .
9: Pick a point  $j_{h_0}$  of color  $h_0$  in cluster  $C_i^\prime$
10: Set  $Q_{i} = Q_{i} \cup \{j_{h_{0}}\}$ .
11: Update  $s_{h_0} = s_{h_0} + 1$ .
12: end while
13: for  $i\in S^{\prime}$  do
14:  $\phi_{i} = \mathrm{DIVIDE}(C_{i}^{\prime},Q_{i})$
15:  $\forall j\in C_i^{\prime}:\operatorname {Set}\phi (j) = \phi_i(j).$
16: end for
17: Set  $S = S' \cup (\cup_{i \in S'} Q_i)$ .
Algorithm 3 ASSIGNMENTGF
1: Input: Set of centers  $S$ , Set of Points  $C$ .
2: Output: An assignment function  $\phi : C \to S$ .
3: Using binary search over the distance matrix, find the smallest radius  $R$  such that  $LP(C, S, R)$  in (2) is feasible and call the solution  $\mathbf{x}^*$ .
4: Solve MAXFlowGF(x*, C, S) and call the solution  $\bar{\mathbf{x}}^*$ .
$\mathbf{LP}(C,S,R)$  ：
$$
\forall j \in C, \forall i \in S: x _ {i j} = 0 \quad \text {i f} d (i, j) > R \tag {2a}
$$
$$
\forall h \in \mathcal {H}, \forall i \in S: \beta_ {h} \sum_ {j \in C} x _ {i j} \leq \sum_ {j \in C ^ {h}} x _ {i j} \leq \alpha_ {h} \sum_ {j \in C} x _ {i j} \tag {2b}
$$
$$
\forall j \in C: \sum_ {i \in S} x _ {i j} = 1 \tag {2c}
$$
$$
\forall j \in C, \forall i \in S: x _ {i j} \in [ 0, 1 ] \tag {2d}
$$
To establish the guarantees we start with the following lemma:
Lemma 2. Solution  $(S',\phi')$  of line (3) in algorithm 2 has the following properties: (1) It satisfies the  $GF$  constraint at an additive violation of 2, (2) It has a clustering cost of at most  $(1 + \alpha_{DS})R_{GF+DS}^{*}$  where  $R_{GF+DS}^{*}$  is the optimal clustering cost (radius) of the optimal solution for  $GF+DS$ , (3) The set of centers  $S'$  is a subset (possibly proper subset) of the set of centers  $\bar{S}$ , i.e.  $S' \subset S$ .
Theorem 4.1. Given an  $\alpha_{DS}$ -approximation algorithm for the  $DS$  problem, then we can obtain an  $2(1 + \alpha_{DS})$ -approximation algorithm that satisfies  $\mathbf{GF}$  at an additive violation of 3 and satisfies  $DS$  simultaneously.
Remark: If in algorithm 2 no center is deleted in line (4) because it forms an empty cluster, then by Lemma 2 the approximation ratio is  $1 + \alpha_{\mathbf{DS}}$  which is an improvement by a factor of 2. Further, the additive violation for  $\mathbf{GF}$  is reduced from 3 to 2.