Fair Rank Aggregation
Anonymous Author(s)
AffiliationAddress email
Abstract
Ranking algorithms find extensive usage in diverse areas such as web search,employment, college admission, voting, etc.
The related rank aggregation problemdeals with combining multiple rankings into a single aggregate ranking.
However,algorithms for both these problems might be biased against some individuals orgroups due to implicit prejudice or marginalization in the historical data.
We studyranking and rank aggregation problems from a fairness or diversity perspective,where the candidates (to be ranked) may belong to different groups and each groupshould have a fair representation in the final ranking.
We allow the designer to setthe parameters that define fair representation.
These parameters specify the allowedrange of the number of candidates from a particular group in the top- k positionsof the ranking.
Given any ranking, we provide a linear time exact algorithm forfinding the closest fair ranking for the Kendall tau metric under strong fairness , i.e.,when the final ranking is fair for all values of k .
We also provide an exact algorithmfor finding the closest fair ranking for the Ulam metric under strong fairness whenthere are only O (1) number of groups.
Our algorithms are simple, fast, and mightbe extendable to other relevant metrics.
We also give a novel meta-algorithm forthe general rank aggregation problem under the fairness framework.
Surprisingly,this meta-algorithm works for any generalized mean objective (including centerand median problems) and any fairness criteria.
As a byproduct, we obtain 3approximation algorithms for both center and median problems, under both Kendalltau and Ulam metrics.
Furthermore, using sophisticated techniques we obtain a(3 − ε ) -approximation algorithm, for a constant ε > 0 , for the Ulam metric understrong fairness.
Introduction
Ranking a set of candidates or items is a ubiquitous problem arising in diverse areas ranging fromsocial choice theory [BCE + 16] to information retrieval [Har92].
Given a set of d candidates and aset of n different, potentially conflicting, rankings of these candidates, one fundamental task is todetermine a single ranking that best summarizes the preference orders in the individual rankings.
Thissummarizing task, popularly termed rank aggregation , has been widely studied from a computationalviewpoint over the last two decades [DKNS01, FKS03, GL11, ASCPX13].
Most well-studied rankaggregation paradigms are median rank aggregation (or simply rank aggregation )
[Kem59, You88,
YL78, DKNS01] and maximum rank aggregation [BBGH15, BBD09, Pop07], which are based onfinding the median and center of the given set of rankings, respectively.
Recently, fairness and diversity have become a natural prerequisite for ranking algorithms whereindividuals are rated for access to goods and services or ranked for seeking facilities in education (e.g.,obtaining scholarship or admission), employment (e.g., hiring or promotion in a job), medical (e.g.,triage during a pandemic), or economic opportunities (e.g., loan lending).
Some concrete examplesinclude university admissions through affirmative action in the USA [Des05] or the reservation system in jobs in India [Bor10], where we want rankings to be fair to mitigate the prevalent disparities due tohistorical marginalization.
Rankings not being fair may risk promoting extreme ideology [CHRG16]or
certain stereotypes about dominating/marginalized communities based on sensitive attributes likegender or race [KMM15, BCZ + 16].
There has been a series of works on fair ranking algorithms,see [ZBC + 17, AJSD19, Cas19, GSB21, GDL21, PPM + 22, ZYS21] and the references therein.
A substantial literature on algorithmic fairness focuses on group fairness to facilitate demographicparity [DHP + 12] or equal opportunity [HPS16]: typically this is done by imposing fairness constraints which require that top- k positions in the ranking contain enough candidates from protectedgroups that are typically underrepresented due to prevalent discrimination (e.g., due to gender,caste, age, race, sex, etc.).
In many countries, group fairness constraints are being enforced bylegal norms [Eur, USD].
For example, in Spain 40% of candidates for elections in large votingdistricts must be women [Ver10], in India 10% of the total recruitment for civil posts and services ingovernment are reserved for people from Economically Weaker Society (EWS)
[SIN19], etc.
In this paper, we study group fairness, more specifically proportional fairness (sometimes alsoreferred to as p -fairness [BCPV96]).
Inspired by the Disparate Impact doctrine, this notion offairness mandates that the output of an algorithm must contain a fair representation of each of the‘protected classes’ in the population.
In the context of ranking, the set of candidates is consideredto be partitioned into g groups G 1 , G 2 , . . .
, G g .
For each group G i , i = 1 , 2 , . . .
, g , we have twoparameters α i ∈ (0 , 1] , β i ∈ (0 , 1] .
A ranking π of the set of items is called proportionally fair if forevery position k ∈ { 1 , 2 , . . . , n } and for every group G i , the following two properties are satisfied:(a) Minority Protection : The number of items from group G i , which are in the top- k positionsπ (1) , π (2) , . .
, π ( k ) , is at least ⌊ α i · k ⌋ , and (b) Restricted Dominance : The number of items fromgroup C i , which are in the top- k positions π (1) , π (2) , . .
, π ( k ) , is at most ⌈ β i · k ⌉ .
To compare different rankings several distance functions have been considered defined on theset of permutations/rankings, such as Kendall tau distance [Ken38, DG77, Kem59, You88, YL78,
DKNS01, ACN08, KMS07, KV10] (also called Kemeny distance in case of rank aggregation), Ulamdistance [AD99, CMS01, CK06, AK10, AN10, NSS17, BS19, CDK21, CGJ21], Spearman footruledistance [Spe04, Spe06, DG77, DKNS01, KV10, BBGH15], etc.
Among these, Kendall tau distance is perhaps the most common measure used in ranking as it is the only known measure tosimultaneously satisfy several required properties such as neutrality, consistency, and the extended
Condorcet property [Kem59, You88].
The Ulam metric is another widely-used measure in practiceas it is also a simpler variant of the general edit distance metric which finds numerous applications in computational biology, DNA storage system, speech recognition, classification, etc.
(e.g.,see [CMS01, CDK21, CGJ21]).
One natural computational question related to fairness in ranking is, given a ranking, how to find itsclosest fair ranking under p -fairness.
Celis et al.
[CSV18] considered this problem and gave exactand approximation algorithms under several ranking metrics such as discounted cumulative gain(DCG), Spearman footrule, and Bradley-Terry.
However, their algorithms do not extend to Kendalltau and Ulam metric, two of the most commonly used ranking metrics.
Fair rank aggregation is relatively less studied.
Recently, Kulman et al.
[KR20] initiated the studyof fair rank aggregation under Kendall tau metric.
However, their fairness notion is based on top- kstatistical parity and pairwise statistical parity .
These notions are quite restricted.
For example,their results only hold for binary protected attributes (i.e., g = 2 ) and and does not satisfy p -fairness.
Informally, pairwise statistical parity considers pairs of items from different groups in an aggregatedmanner and does not take into account the actual rank of the items in the final ranking.
See [WISR22]for an example on why the fairness notion in [KR20] does not satisfy p -fairness.
In fact, as p -fairnesssatisfies statistical parity for all top k -positions in the ranking, it is a much stronger notion comparedto statistical parity.
Thus achieving p -fairness is a significantly more challenging problem.
1.1 Our Contributions.
Our first main contribution is exact algorithms for the closest fair ranking (CFR) problem underproportional fairness (see Definition 2.4) for Kendall tau and Ulam metrics.
For the Kendall tau metric,we give the first exact algorithm for the closest fair ranking problem ( Theorem 3.4).
Our algorithmis simple and based on a greedy strategy; however, the analysis is delicate.
It exploits the followinginteresting and perhaps surprising fact.
Under the Kendall tau metric, given a fixed (possibly unfair) ranking π , there exists a closest fair ranking π ′ to π such that for every group G i , i = 1 , 2 , . .
, g , therelative ordering of elements in G i remains unaltered in π ′ compared to π (Theorem 3.3).
Then, forthe Ulam metric , we give a polynomial time dynamic programming algorithm for the closest fairranking problem when the number of groups g is a constant ( Theorem 3.10).
In practice, the numberof protected classes is relatively few, and hence our result gives an efficient algorithm for such cases.
Our second significant contribution is the study of rank aggregation problem under a very generalnotion of proportional fairness .
Our main contribution is to develop a novel algorithmic toolbox forthe fair rank aggregation that solves a wide variety of rank aggregation objectives satisfying suchgeneric fairness constraints.
An essential takeaway of our work is that a set of potentially biasedrankings can be aggregated into a fair ranking with only a small loss in the ‘quality’ of the ranking.
We study q -mean Fair Rank Aggregation (FRA), where given a set of rankings π 1 , π 2 , . . .
, π n , a(dis)similarity measure (or distance) ρ between two rankings, and any q ≥ 1 , the task is to determinea fair ranking σ that minimizes the generalized mean objective: (cid:80) ni
=1 ( ρ ( π i , σ ) q ) 1 /q .
We would liketo emphasize that in general, q -mean objective captures two classical data aggregation tasks: One ismedian which asks to minimize the sum of distances (i.e., q = 1 ) and another is center which asks tominimize the maximum distance to the input points (i.e., q = ∞ ). Without the fairness requirement,if ρ is defined as the Kendall tau distance between two rankings and q = 1 , then our objective boilsdown to the classical Kemeny optimization [Kem59]. The rank aggregation problems (without anyfairness constraint) are already hard to solve under certain metrics. E.g., it is known to be NP-hardunder the Kendall tau
[BTT89] (even for 4 input rankings [DKNS01]).
Thus the best we could hopefor is to provide approximate algorithms for the fair rank aggregation problem.
We show generic reductions of the q -mean Fair Rank Aggregation (FRA) to the problem of determining the closest fair ranking (CFR) to a given ranking.
More specifically, we show that anyc -approximation algorithm for the closest fair ranking problem can be utilized as a blackbox togive a ( c + 2) -approximation to the FRA for any q ≥ 1 (Theorem 4.3).
This result is obliviousto the specifics of the (dis)similarity measure and only requires the measure to be a metric.
Usingthe exact algorithms for the CFR for the Kendall tau, Spearman footrule, and Ulam metrics (forconstantly many groups), we thus obtain 3-approximation algorithms for the FRA problem underthese three (dis)similarity measures, respectively.
Further, we provide yet another simple algorithmthat even breaks below 3-factor for the Ulam metric.
For q = 1 , by combining the above-stated3-approximation algorithm with an additional procedure, we achieve a (3 − ε ) -approximation factor(for some ε > 0 ) for the FRA under the Ulam, for constantly many groups (Theorem 4.11).
We alsoprovide another reduction from FRA to one rank aggregation computation (without fairness) and a
CRF computation (Theorem 4.8), and as a corollary get an O ( d 3 log d + n 2 d ) -time algorithm for
Spearman footrule when q = 1 (Corollary 4.10).
We summarize our main results in Table 1.1.
Problem
Metric #Groups
Approx Ratio
Runtime
Reference
CFR
Kendall tau
Arbitrary
Exact
O ( d )
Theorem 3.
Ulam
Constant
Exact
O ( d g +2 )
Theorem 3.
Spearman footrule
Arbitrary
Exact
O ( d 3 log d ) [CSV18]
FRA
Kendall tau
Arbitrary
O ( n 2 d log d )
Corollary 4.
Ulam
Constant
O ( nd g +2 + n 2 d log d )
Corollary 4.
Ulam ( q = 1 )
Constant 3 − ε poly( n, d )
Theorem 4.
Spearman footrule
Arbitrary
O ( nd 3 log d + n 2 d )
Corollary 4.
Comparison with concurrent work.
Independently and concurrently to our work, Wei etal.
[WISR22] considers the fair ranking problem under a setting that is closely related to ours.
However, the fairness criteria in their work are much more restrictive compared to ours as follows.
Their algorithms for CFR are only designed for a special case of our formulation where for each group
G i and any position k in the output ranking, α i =
β i = p
( i ) , where p ( i ) denotes the proportion ofgroup G i in the entire population.
Further, under the Kendall tau metric, they give a polynomial timeexact algorithm for CFR only for the special case of binary groups ( g = 2 ).
They also give additionalalgorithms for multiple groups - an exact algorithm that works in time exponential in the number of groups and a polynomial time 2 -approximation.
In contrast, we fully resolve the CFR problemunder the Kendall tau metric by giving a linear time algorithm for the case of multiple groups andany arbitrary bounds on α
i
and β i for each group
G i .
Further, we give the first results for CFR and
FRA under the Ulam metric as well.
Preliminaries
Notations.
For any n ∈ N , let [ n ] denote the set { 1 , 2 , · · · , n } .
We refer to the set of all permutations/rankings over [ d ] by S d .
Throughout this paper we consider any permutation π ∈ S d as asequence of numbers a 1 , a 2 , · · · , a d such that π ( i ) = a i , and we say that the rank of a i is i .
Forany two x, y ∈
[ d ] and a permutation π ∈ S d , we use the notation x < π y to denote that the rankof x is less than that of y in π .
For any subset I = { i 1 < i 2 < · · · < i r } ⊆
[ d ] , let π ( I ) be thesequence
π ( i 1 ) , π ( i 2 ) , · · · , π ( i r ) (which is essentially a subsequence of the sequence representedby π ).
When clear from the context, we use π ( I ) also to denote the set of elements in the sequenceπ ( i 1 ) , π ( i 2 ) , · · · , π ( i r ) .
For any k ∈ [ d ] and a permutation π ∈ S d , we refer to π ([ k ]) as the k -lengthprefix of π .
For any prefix P , let | P | denote the length of that prefix.
For any two prefixes P 1 , P 2 , weuse P 1 ⊆
P 2 to denote | P 1 | ≤ | P 2 | .
Distance measures on rankings.
There are different distance functions being considered to measurethe dissimilarity between any two rankings/permutations.
Among them, perhaps the most commonlyused one is the Kendall tau distance .
Definition 2.1 (Kendall tau distance) .
Given two permutations π 1 , π 2 ∈ S d , the Kendall tau distancebetween them, denoted by K ( π 1 , π 2 ) , is the number of pairwise disagreements between x and y , i.e.,
K ( π 1 , π 2 ) :
= |{ ( a, b ) ∈ [ d ] ×
[ d ] | a < π 1 b but b < π 2 a }| .
Another important distance measure is the Spearman footrule (aka.
Spearman’s rho ) which isessentially the ℓ 1 -norm between two permutations.
Definition 2.2 (Spearman footrule distance) .
Given two permutations π 1 , π 2 ∈ S d , the Spearmanfootrule distance between them is defined as F ( π 1 , π 2 ) :
= (cid:80) i ∈ [ d ] | π 1 ( i ) − π 2 ( i ) | .
Another interesting distance measure is the Ulam distance which counts the minimum number ofcharacter move operations between two permutations [AD99].
This definition is motivated by theclassical edit distance that is used to measure the dissimilarity between two strings.
A character moveoperation in a permutation can be thought of as “picking up” a character from its position and then“inserting” that character in a different position 2 .
Definition 2.3 (Ulam distance) .
Given two permutations π 1 , π 2 ∈ S d , the Ulam distance betweenthem, denoted by U ( π 1 , π 2 ) , is the minimum number of character move operations that is needed totransform π 1 into π 2 .
Alternately, the Ulam distance between π 1 , π 2 can be defined as d − LCS ( π 1 , π 2 ) , where LCS ( π 1 , π 2 )denotes the longest common subsequence between the sequences π 1 and π 2 .
Fair rankings.
We are given a set C of d candidates, which are partitioned into g groups.
We call aranking (of these d candidates) fair if all sufficiently large prefixes of it have certain proportion ofrepresentatives from each group.
Formally,
Definition 2.4 ( (¯ α, ¯ β ) - k -fair ranking) .
Consider a set C of d candidates partitioned into g groups
G 1 , · · · , G g , and ¯ α = ( α 1 , · · · , α g ) ∈ [0 , 1] g , ¯ β = ( β 1 , · · · , β g ) ∈ [0 , 1] g , k ∈ [ d ] .
A rankingπ ∈ S d is said to be (¯ α, ¯ β ) - k -fair if for any prefix P of size at least k , of π and each group i ∈ [ g ] ,there are
at least ⌊ α i · | P |⌋ and at most ⌈ β i · | P |⌉ elements from the group G i in P , i.e., [Equation]
We also define a weak fairness notion that preserves the proportionate representation only for a fixedk -length prefix.
Definition 2.5 ( (¯ α, ¯ β ) -weak k -fair ranking) .
Consider a set C of d candidates partitioned into ggroups G 1 , · · · , G g , and ¯ α = ( α 1 , · · · , α g ) ∈ [0 , 1] g , ¯ β = ( β 1 , · · · , β g ) ∈ [0 , 1] g , k ∈ [ d ] .
Aranking π ∈ S d is said to be (¯ α, ¯ β ) -weak
k -fair if for the k -length prefix P of π and each groupi ∈ [ g ] , there are at least ⌊ α i · k ⌋ and at most ⌈ β i · k ⌉ elements from the group G i in P , i.e.,∀ i ∈ [ g ] , ⌊ α i · k ⌋ ≤ | P ∩ G i | ≤ ⌈ β i · k ⌉ .
Note, an (¯ α, ¯ β ) - k -fair ranking is also (¯ α, ¯ β ) -weak
k -fair, but the converse need not be true.
Wewould like to emphasize that all the results presented in this paper hold for both (¯ α, ¯ β ) - k -fairness and(¯ α, ¯ β )
-weak
k -fairness.
Closest Fair Ranking
In this section, we consider the problem of computing the closest fair ranking of a given input ranking.
Below we formally define the problem.
Definition 3.1 (Closest fair ranking problem) .
Consider a metric space ( S d , ρ ) for a d ∈ N .
Givena ranking π ∈ S d and ¯ α, ¯ β ∈ [0 , 1] g for some g ∈ N , k ∈
[ d ] , the objective of the closest fairranking problem (resp.
closest weak fair ranking problem) is to find a (¯ α, ¯ β ) - k -fair ranking (resp.(¯ α, ¯ β ) -(weak)
k -fair ranking)
π ∗ ∈ S d that minimizes the distance ρ ( π, π ∗ ) .
Unless stated explicitly, we consider the notion of (¯ α, ¯ β ) - k -fairness (not the weak one) in all theresults presented in this section.
3.1 Closest fair
ranking under Kendall tau
Closest weak fair ranking.
We first show that we can compute a closest weak fair ranking underthe Kendall tau, exactly in linear time.
Theorem 3.2.
There exists a linear time algorithm that, given a ranking π ∈ S d , a partition of [ d ] intog groups G 1 , · · · , G g for some g ∈ N , and ¯ α = ( α 1 , · · · , α g ) ∈ [0 , 1] g , ¯ β = ( β 1 , · · · , β g ) ∈ [0 , 1] g ,k ∈ [ d ] , outputs a closest (¯ α, ¯ β ) -weak
k -fair ranking under the Kendall tau distance.
Let us first describe the algorithm.
Our algorithm follows a simple greedy strategy.
For each group
G i , it picks the top
⌊ α i k ⌋ elements according to the input ranking π , and add them in a set P .
If Pcontains k elements, then we are done.
Otherwise, we iterate over the remaining elements and addthem in P as long as for each group G i , | P ∩ G i | ≤ ⌈ β i k
⌉ (each group has at most ⌈ β i k
⌉ elementsin P ) until the size of P becomes exactly k .
Then we use the relative ordering of the elements in Pas in the input ranking π and make it the k -length prefix of the output ranking σ .
Fill the last d − kpositions of σ by the remaining elements ( [ d ] \ P ) by following their relative ordering as in the inputπ .
See Algorithm 1 in appendix for the pseudocode of the algorithm.
By the construction of the set P , at the end, for each group G i , ⌊ α i k ⌋ ≤ | P ∩ G i | ≤ ⌈ β i k ⌉ .
Sincewe use the elements of P in the k -length prefix of the output ranking σ , σ is an (¯ α, ¯ β ) -weak
k -fairranking.
For the running time, a straightforward implementation our algorithms takes O ( d ) time.
Itonly remains to argue that σ is a closest (¯ α, ¯ β ) -weak
k -fair ranking to the input π .
To show that, weuse the following key observation.
Claim 3.3.
Under the Kendall tau distance, there always exists a closest (¯ α, ¯ β ) -weak k -fair rankingπ ∗ such that, for each group G i ( i ∈ [ g ] ), for any two elements a ̸ = b ∈ G i , a < π ∗ b if and only ifa < π b .
We defer the proof of the above claim and how we use it to conclude the proof of Theorem 3.2, to theappendix (provided in the supplementary material).
Extension to general fairness notion.
Previously, we provide an algorithm that outputs a weak fairranking (see Definition 2.5 for the definition of weak fairness) closest to the input.
Now, we presentan algorithm that outputs a closest fair (according to Definition 2.4) ranking.
Theorem 3.4.
There exists an O ( d ) time algorithm that, given a ranking π ∈ S d , a partition of [ d ] intog groups G 1 , · · · , G g for some g ∈ N , and ¯ α = ( α 1 , · · · , α g ) ∈ [0 , 1] g , ¯ β = ( β 1 , · · · , β g ) ∈ [0 , 1] g ,k ∈ [ d ] , outputs a closest (¯ α, ¯ β ) - k -fair ranking under the Kendall tau distance.
The main challenge with this stronger fairness notion is that now we need to satisfy the fairnesscriteria for all the prefixes not just the k -length prefix as in case of weak fairness.
Surprisingly, weshow that under the Kendall tau metric, by iteratively applying the algorithm for the closest weakfair ranking (Algorithm 1) as a black-box, over the prefixes of decreasing length, we can construct aclosest fair (not just the weak one) ranking.
It is worth noting that here at any iteration the input to
Algorithm 1 is a prefix of π which is not a permutation.
However, Algorithm 1 only treats the inputas a sequence of numbers (not really as a permutation).
See Algorithm 2 in appendix for a formaldescription of the algorithm.
It is worth noting that, since we iteratively apply Algorithm 1 on a prefix of π (not the whole sequencerepresented by π ), it is not even clear whether the algorithm finally outputs a fair ranking (assuming itexists).
Below we first argue that if there exists a fair ranking then the output σ must be a fair ranking.
Next, we establish that σ is indeed a closest fair ranking to π .
Let π ∗ be a closest fair ranking to π that preserves relative orderings (of elements in [ d ] ) maximally.
We show that the output σ = π ∗ .
We start the argument by considering any two prefixes of lengthk 1 and k 2 , where k 2 < k 1 .
We argue that k 1 and k 2 -length prefixes of σ and π ∗ are the same.
Sincethis hold for any k 1 and k 2 (with k 1 , k 2 ≥ k ), where k 2 < k 1 , by using induction we can show thatσ =
π ∗ .
We defer the induction argument to the appendix, and below provide the argument for the k 1and k 2 -length prefixes (which is a key to prove the correctness of Theorem 3.4).
For the sake of analysis, let us consider the following three permutations.
Let π 1 be the (¯ α, ¯ β ) -weakk 1 -fair ranking closest to π , output by Algorithm 1.
Let π 2 be the ranking output by Algorithm 1when given the k 1 -length prefix of π 1 (i.e., the sequence π 1 ([ k 1 ]) ) as input and is asked to output an(¯ α, ¯ β ) -weak
k 2 -fair ranking closest to π 1 .
Further, let π ′ 2 be the (¯ α, ¯ β ) -weak
k 2 -fair ranking closest toπ , output by Algorithm 1.
In other words, π 2 be the ranking produced by first applying Algorithm 1on
π to make its k 1 -length prefix fair and then apply Algorithm 1 again on that output to make itsk 2 -length prefix fair.
Whereas, π ′ 2 be the ranking produced by directly applying Algorithm 1 on π tomake its k 2 -length prefix fair.
Then the next claim argues about the existence of fair ranking π 2 .
We defer the proof of this claim tothe appendix.
Claim 3.5.
If there is a ranking π ′ such that its k 1 -length prefix P 1 and k 2 -length prefix P 2 satisfiesthat for each group G i ( i ∈ [ g ] ), ⌊ α i k 1 ⌋ ≤ | P 1 ∩ G i | ≤ ⌈ β i k 1 ⌉ and ⌊ α i k 2 ⌋ ≤ | P 2 ∩ G i | ≤ ⌈ β i k 2 ⌉ ,then π 2 exists.
It follows from the construction that,
Claim 3.6.
The set of elements in π 2 ([ k 1 ]) is the same as that in π 1 ([ k 1 ]) .
Claim 3.7.
π 2 ([ k 2 ]) =
π ′ 2 ([ k 2 ]) .
Proof.
Consider an element a ∈ π ′ 2 ([ k 2 ])
∩ G i for some i ∈ [ g ] .
If a is among the top ⌊ α i k 2 ⌋elements (according to π ) inside the group G i , then by Algorithm 1, it would also be selected inπ 1 ([ k 1 ])
(since k 1 ≥ k 2 ) and also in π 2 ([ k 2 ]) .
Now consider the case where a is among the top ⌈ β i k 2 ⌉ elements of G i , but not among the top⌊ α i k 2 ⌋ elements.
This means that a is also among the top ⌈ β i k 1 ⌉ ( ≥ ⌈ β i k 2 ⌉ ) elements of its group G i .
This means that if it is encountered during the execution of Algorithm 1 on π to get an (¯ α, ¯ β ) -weakk 1 -fair ranking, then it will be selected in π 1 ([ k 1 ]) .
However, we also know that it is selected inπ ′ 2 ([ k 2 ]) which is a shorter prefix.
Since the upper bound constraints were not violated for G i duringthe selection of the elements in π ′ 2 ([ k 2 ]) , the upper bound constraints cannot be violated during theselection of the elements of π 1 ([ k 1 ]) as well.
Hence, a will be selected in π 1 ([ k 1 ]) .
By a similar argument, when executing Algorithm 1 on π 1 (in the later iteration) to output an (¯ α, ¯ β ) -weak k 2 -fair ranking, a will again be encountered and be selected in π 2 ([ k 2 ]) .
Therefore, everyelement in π ′ 2 ([ k 2 ]) is also in π 2 ([ k 2 ]) .
Since the sizes of both the sets are equal, the two sets areinfact the same, and so are the rankings (by Algorithm 1).
Claim 3.8.
The set of elements in π ∗ ([ k 1 ]) is the same as that in π 2 ([ k 1 ]) .
Proof.
Assume towards contradiction that ∃ a ∈ π ∗ ([ k 1 ]) \ π 2 ([ k 1 ]) and ∃ b ∈ π 2 ([ k 1 ])
\ π ∗ ([ k 1 ]) .
Ifa, b were in the same group, then by Algorithm 1, we know that b < π a , and hence by swapping the elements in π ∗ , the distance from π can only be reduced. Hence we can obtain a different solution ¯ πin which b ∈ ¯ π ([ k 1 ]) and a ̸∈ ¯ π ([ k 1 ]) , and thus is also fair. This contradicts that π ∗ is a closest fairranking to π that preserves relative orderings (of elements in [ d ] ) maximally.
So, we can assume,a ∈ G i and b ∈ G j for some i ̸ =
j .
Now we note that a cannot be among the top
⌊ α i k 1 ⌋ elements, but is in the top ⌈ β i k 1 ⌉ elements in
G i .
Similarly, b cannot be among the top ⌊ α j k 1 ⌋ elements, but is in the top ⌈ β j k 1 ⌉ elements in G j .
Again, it follows from Algorithm 1, b < π a .
So by swapping these two elements in π ∗ we can onlyreduce the distance from π , while obtaining another fair ranking (because it has b in the k 1 -lengthprefix instead of a ).
This again contradicts that π ∗ is a closest fair ranking to π that preserves relativeorderings (of elements in [ d ] ) maximally.
The claim now follows.
Claim 3.9.
The set of elements in π ∗ ([ k 2 ]) is the same as that in π 2 ([ k 2 ]) .
The proof of the above is in the appendix.
We apply Claim 3.8 and Claim 3.9 iteratively to completethe correctness of Algorithm 2 which we defer to the appendix.
It only remains to argue that the algorithm runs in time O ( d ) .
It is easy to see that a straightforwardimplementation takes O ( d 2 ) time (since it invokes at most d calls to the subroutine Algorithm 1).
However, with a slightly more intricate implementation (by maintaining an "active" prefix which inthe beginning contains all the elements, and then at each iteration we remove lowest rank elementsfrom specific groups, and thus avoiding re-processing of the elements again and again over theiterations), we can show that the algorithm runs in only O ( d ) time, which we defer to the appendix.
3.2 Closest fair ranking under
Ulam Metric
Theorem 3.10.
There exists a polynomial time dynamic programming based algorithm that finds a(¯ α, ¯ β ) - k -fair ranking when there are constant number of groups.
The proof of the lemma uses an intricate dynamic program exploiting the connection between the
Ulam distance with the Longest Common Subsequence problem.
We defer the proof to the appendix.
Fair Rank Aggregation
We start this section by formally defining the fair rank aggregation problem.
Then we will providetwo meta-algorithms that approximate the fair aggregated ranking.
Definition 4.1 ( q -mean Rank Aggregation) .
Consider a metric space ( S d , ρ ) for a d ∈ N .
Given a set
S ⊆ S d of n input rankings, the q -mean rank aggregation problem asks to find a ranking σ ∈ S d (notnecessarily from S ) that minimizes the objective function Obj q ( S, σ ) :
= (cid:0)(cid:80) π ∈ S ρ ( π, σ ) q (cid:1) 1 /q .
Generalized mean or q -mean objective functions are well-studied in the context of clustering[CMV22], and division of goods
[BKM22].
We study it for the first time in the context of rankaggregation.
For q = 1 , the above problem is also referred to as the median ranking problem orsimply rank aggregation problem [Kem59, You88, YL78, DKNS01].
On the other hand, for q = ∞ ,the problem is also referred to as the center ranking problem or maximum rank aggregation problem [BBGH15, BBD09, Pop07].
Both these special cases are studied extensively in the literature withdifferent distance measures, e.g., Kendall tau distance [DKNS01, ACN08, KMS07, Sch12, BBD09],
Ulam distance [CDK21, BBGH15, CGJ21], Spearman footrule distance [DKNS01, BBGH15].
In the fair rank aggregation problem, we want the output aggregated rank to satisfy certain fairnessconstraint.
Throughout this section, for brevity, we use the term (weak) fair ranking instead of(¯ α, ¯ β ) -(weak)
k -fair ranking.
Definition 4.2 ( q -mean Fair Rank Aggregation) .
Consider a metric space ( S d , ρ ) for a d ∈ N .
Givena set S ⊆ S d of n input rankings/permutations, the q -mean (weak) fair rank aggregation problemasks to find a (weak) fair ranking σ ∈ S d (not necessarily from S ) that minimizes the objectivefunction Obj q ( S, σ ) :
= (cid:0)(cid:80) π ∈ S ρ ( π, σ ) q (cid:1) 1 /q .
It is worth noting that in the above definition, the minimization is over the set of all the (weak)fair rankings in S d .
When clear from the context, we drop weak and refer it as the q -mean fairrank aggregation problem.
Let σ ∗ be a (weak) fair ranking that minimizes Obj q ( S, σ ) , i.e., σ ∗ =
arg min fair σ ∈S d Obj q ( S, σ ) .
Then we call σ ∗ a q -mean fair aggregated rank of S .
We refer to
Obj q ( S, σ ∗ ) as OPT q ( S ) .
When q = 1 , we refer the problem as the fair median ranking problem or simply fair rank aggregationproblem.
When q = ∞ , the objective function becomes Obj ∞ ( S, σ ) = max π ∈ S ρ ( π, σ ) , and werefer the problem as the fair center ranking problem.
Next, we present two meta algorithms that work for any values of q and irrespective of strong or weakfairness constraint.
4.1 First Meta Algorithm
Theorem 4.3.
Consider any q ≥ 1 .
Suppose there is a t ( d ) -time c -approximation algorithm A ,for some c ≥ 1 , for the closest fair ranking problem over the metric space ( S d , ρ ) .
Then thereexists a ( c + 2) -approximation algorithm for the q -mean fair rank aggregation problem, that runs in
O ( n · t ( d ) + n 2 · f ( d )) time where f ( d ) is the time to compute ρ ( π 1 , π 2 ) for any π 1 , π 2 ∈ S d .
We devote this subsection in proving the above theorem.
Let us start with describing the algorithm.
It works as follows:
Given a set S ⊆ S d of rankings, it first computes c -approximate closest fairranking σ (for some c ≥ 1 ) for each π ∈ S .
Next, output a σ that minimizes
Obj q ( S, σ ) .
Let usdenote the output ranking by ¯ σ .
See Algorithm 4 in appendix for a more formal description.
It is straightforward to verify that the running time of the above algorithm is O ( n · t ( d ) + n 2 · f ( d )) ,where f ( d ) is the time to compute ρ ( π 1 , π 2 ) for any π 1 , π 2 ∈ S d and t ( d ) denotes the running timeof the algorithm A .
So it only remains to argue about the approximation factor of Algorithm 4.
The following simple observation plays a pivotal role in establishing the approximation factor of
Algorithm 4.
Lemma 4.4.
Given a set S ⊆ S d of n rankings, let σ ∗ be a q -mean fair aggregated rank of S undera distance function ρ .
Further, let ¯ π be a nearest neighbor (closest ranking) of σ ∗ in S , and ¯ σ be ac -approximate closest fair ranking to ¯ π , for some c ≥ 1 .
Then ∀ π ∈ S, ρ ( π, ¯ σ ) ≤ ( c + 2) · ρ ( π, σ ∗ ) .
We defer the proof of the above claim to the appendix.
Now, we use the above lemma to show thatthe approximation factor of Algorithm 4 is c
+ 2 .
Let σ ∗ be an (arbitrary) optimal fair aggregaterank of S and ¯ σ be the output of Algorithm 4.
The optimal value of the objective function is
OPT =
[Equation] q ( S, σ ∗ ) =
(cid:0)(cid:80) π ∈ S [Equation] ( π, σ ∗ ) q (cid:1) 1 /q .
Next, we show that Obj q ( S, ¯ σ ) ≤ ( c + 2) · OPT .
Obj
[Equation]
where the second inequality follows from [-Lemma 4.
-]Theorem 4.4 This concludes the proof of Theorem 4.3.
Applications of Theorem 4.3.
We have shown in Theorem 3.4 that the closest fair ranking problemfor Kendall tau can be solved exactly in O ( d ) time, i.e., the approximation ratio is c = 1 .
We alsoknow from [Kni66], that the Kendall tau distance between two permutations can be computed in
O ( d log d ) time.
This gives us that,
Corollary 4.5.
For any q ≥ 1 , there exists an O ( n 2 d log d ) time meta-algorithm, that finds a3-approximate solution to the q -mean fair rank aggregation problem , under the Kendall tau metric.
It is shown in [CSV18] that the closest fair ranking problem for Spearman Footrule can be solvedexactly in O ( d 3 log d ) time, i.e., the approximation ratio is c = 1 .
Since distance under Spearman
Footrule can be trivially computed in O ( d ) we have that,
Corollary 4.6.
For any q ≥ 1 , there exists an O ( nd 3 log d + n 2 d ) time meta-algorithm, that finds a3-approximate solution to the q -mean fair rank aggregation problem , under the Spearman footrulemetric.
We have shown in Theorem 3.10 that for constant number of groups, the closest fair ranking problemfor Ulam metric can be solved exactly in O
( d g +2 ) time, i.e., the approximation ratio is c = 1 .
From [AD99] we know that Ulam distance between two permutations can be computed in O ( d log d )time.
This gives us that,
Corollary 4.7.
For any q ≥ 1 , there exists an O ( nd g +2 + n 2 d log d ) time meta-algorithm, that findsa 3-approximate solution to the q -mean fair rank aggregation problem , under the Ulam metric.
We would like to emphasize that all the above results hold for any values of q ≥ 1 .
Hence, they arealso true for the special case of the fair median problem (i.e., for q = 1 ) and the fair center problem(i.e.
, for q = ∞ ).
4.2 Second Meta Algorithm
Theorem 4.8.
Consider any q ≥ 1 .
Suppose there is a t 1 ( n ) time c 1 -approximation algorithm
A
1for some c 1 ≥ 1 for q -mean rank aggregation problem; and a t 2 ( d ) -time
c
2 -approximation algorithm
A ∈ , for some c 2 ≥ 1 , for the closest fair ranking problem over the metric space ( S d , ρ ) .
Then thereexists a ( c 1 c 2 + c 1 + c 2 ) -approximation algorithm for the q -mean fair rank aggregation problem,that runs in O ( t 1 ( n ) + t 2 ( d ) + n 2 · f ( d )) time where f ( d ) is the time to compute ρ ( π 1 , π 2 ) for anyπ 1 , π 2 ∈ S d .
The algorithm works as follows:
Given a set S ⊆ S d of rankings, it first computes c 1 -approximateaggregate rank π ∗ .
Next, output a c 2 -approximate closest fair ranking ¯ σ , to π ∗ .
See Algorithm 5 inappendix for a more formal description.
It is easy to see that the running time of the algorithm is O ( t 1 ( n ) + t 2 ( d ) + n 2 · f ( d )) , where f ( d )is the time to compute ρ ( π, σ ) for any π, σ ∈ S d , t 1 ( n ) denotes the running time of the algorithm
A 1 , and t 2 ( d ) denotes the running time of the algorithm
A 2 .
It now remains to argue about theapproximation ratio of the above algorithm.
We again make a simple but crucial observation towardsestablishing the approximation ratio for Algorithm 5.
Lemma 4.9.
Given a set S ⊆ S d of n rankings, let σ ∗ be a q -mean fair aggregated rank of Sunder a distance function ρ .
Further, let π ∗ be the c 1 -approximate aggregate rank of S and ¯ σ be ac 2 -approximate closest fair ranking to π ∗ , for some c 1 , c 1 ≥ 1 .
Then
[Equation]
We defer the proof of this lemma to the appendix.
Once we have this key lemma in place, theremaining proof of Theorem 4.8, follows exactly as the proof of Theorem 4.3.
The above algorithm can give similar approximation guarantees as Algorithm 4, but with potentiallybetter running times depending on whether the rank aggregation problem is solved in a faster wayfor the particular problem in consideration.
For instance consider the case for Spearman footrule.
It is known that the rank aggregation problem for Spearman footrule can be solved in ˜ O
( d 2 . 5 )[vdBLN + 20].
So, using this in conjunction with Algorithm 5 we obtain the following result.
Corollary 4.10.
For q = 1 , there exists an O ( d 3 log d + n 2 d ) time meta-algorithm, that finds a3-approximate solution to the q -mean fair rank aggregation problem (i.e., the fair median problem),under Spearman footrule metric.
4.3 Breaking below 3-factor for Ulam
Theorem 4.11.
For q = 1 , there exists a constant ε > 0 and a polynomial time algorithm, that findsa (3 − ε ) -approximate solution to the q -mean fair rank aggregation problem (i.e., the fair medianproblem), under the Ulam metric for constantly many groups.
We show the above result by designing a new algorithm based on the relative ordering of the elements(as in in majority of the input rankings).
Then the final output is the best of that output by this newalgorithm and that produced by our first meta-algorithm.
We argue that when the whole optimalobjective value is distributed among only a few elements, then the first meta-algorithm alreadyachieves (3 − ϵ ) -approximation.
Otherwise, this new relative ordering based approach will provide a(3 − ϵ ) -approximation.
Although our new algorithm is also very simple, the whole analysis is quitedelicate and involves a few important observations on the Ulam metric.
We provide the description ofour new algorithm along with the whole analysis in the appendix.
Checklist
For all authors..
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s
contributions and scope?
[Yes]
(b) Did you describe the limitations of your work?
[No] The current work is theoretical.
The setting and models under study are clearly described in the paper.
(c) Did you discuss any potential negative societal impacts of your work?
[No] Given
the theoretical nature of the work, we do not envision any potential negative societal
impact.
(d) Have you read the ethics review guidelines and ensured that your paper conforms to
them?
[Yes]
If you are including theoretical results...
(a) Did you state the full set of assumptions of all theoretical results?
[Yes]
(b) Did you include complete proofs of all theoretical results?
[Yes] complete proofs are given in the appendix.
If you ran experiments...
(a) Did you include the code, data, and instructions needed to reproduce the main experi-
mental results (either in the supplemental material or as a URL)?
[N/A]
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)?
[N/A]
(c) Did you report error bars (e g., with respect to the random seed after running experi- ments multiple times)?
[N/A]
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)?
[N/A]
If you are using existing assets (e g., code, data, models) or curating/releasing new assets...
(a) If your work uses existing assets, did you cite the creators?
[N/A]
(b) Did you mention the license of the assets?
[N/A]
(c) Did you include any new assets either in the supplemental material or as a URL?
[N/A]
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating?
[N/A]
(e) Did you discuss whether the data you are using/curating contains personally identifiable
information or offensive content?
[N/A]
If you used crowdsourcing or conducted research with human subjects...
(a) Did you include the full text of instructions given to participants and screenshots, if applicable?
[N/A]
(b) Did you describe any potential participant risks, with links to Institutional Review
Board (IRB) approvals, if applicable?
[N/A]
(c) Did you include the estimated hourly wage paid to participants and the total amount
spent on participant compensation?
[N/A]