Fair and Optimal Cohort Selection for Linear Utilities
aa r X i v : . [ c s . D S ] F e b Fair and Optimal Cohort Selection for Linear Utilities
Konstantina Bairaktari Huy Le Nguyen Jonathan Ullman Khoury College of Computer Sciences, Northeastern University
February 17, 2021
Abstract
The rise of algorithmic decision-making has created an explosion of research around the fairness of thosealgorithms. While there are many compelling notions of individual fairness, beginning with the work of Dworket al. [DHP + fair cohort selection problem , which captures a speciο¬c application where a singlefair classiο¬er is composed with itself to pick a group of candidates of size exactly π . In this work we introducea speciο¬c instance of cohort selection where the goal is to choose a cohort maximizing a linear utility function.We give approximately optimal polynomial-time algorithms for this problem in both an oο¬ine setting wherethe entire fair classiο¬er is given at once, or an online setting where candidates arrive one at a time and areclassiο¬ed as they arrive. The rise of algorithmic decision-making has created an explosion of research around the fairness of those algo-rithms. Beginning with the seminal work of Dwork, Hardt, Pitassi, Reingold, and Zemel [DHP + fair cohort selection problem introduced in [DI19]. In this problem, we wouldlike to select π candidates for a job from a universe of π possible candidates. We are given a classiο¬er that assignsa score π π’ β [ , ] to each candidate, with the guarantee that the scores are individually fair with respect tosome similarity measure D . We would like to select a set a cohort of π candidates such that the probability π π’ ofselecting any candidate should be fair with respect to the same metric.We can trivially solve the fair cohort selection problem by ignoring the scores and selecting a uniformly ran-dom set of π candidates, so that every user is chosen with the same probability π / π . Thus Smedemark-Margulies,Langton, and Nguyen [SMLN20] proposed to consider fair algorithms for cohort selection that optimize someutility function related to the scores, and construct algorithms for a particular choice of utility function.In this work we consider a setting where the utility function is known and simple, speciο¬cally we assume a linear utility function where the utility of a cohort is the sum of the scores of all candidates in the cohort: Γ ππ’ = π π π π . This type of utility implicitly assumes that the scores π π’ are themselves doing a good job of approximating theutility of a candidate, and that there are no complements or supplements among participants in the cohort. KB is supported by NSF award CCF-1750640. HLN is supported by NSF awards CCF-1909314 and CCF-1750716. JU is supported by NSFawards CCF-1750640, CNS-1816028, and CNS-1916020. In the model of Dwork et al. [DHP + Oο¬line Setting.
In this model, we are given all the scores π , . . . , π π at once, and must choose the optimal cohort.We present a polynomial-time algorithm that computes a fair cohort with optimal exdpected utility. Online Setting.
In this model we are given the scores π , π , . . . as a stream. Ideally, after receiving π π’ , we wouldlike to immediately accept candidate π’ to the cohort or reject them from the cohort. However, this goal is toostrong, so we consider a relaxation where candidate π’ can be either accepted, rejected, or kept on hold untillater, and we would like to output a fair cohort with optimal expected utility while minimizing the number ofcandidates who are kept on hold. We give an approximately fair and optimal algorithm in this online model.Speciο¬cally, we present a polynomial-time algorithm for this online setting where the fairness constraints aresatisο¬ed and utility is optimized up to an additive error of π , for any desired π >
0, while ensuring that the numberof users on hold never exceeds 2 π + π .To interpret our additive error guarantee, since the fairness constraint applies to are the probabilities π , . . . , π π ,allowing the fairness constraint to be violated by an additive error of, say, π = .
01 means that every candidate isselected with probability that is within Β±
1% of the probability that candidate would have been selected by somefair mechanism.
We start with a brief overview of the key steps in our algorithms for each model.
Oο¬line Setting.
Our oο¬ine algorithm is based on two main properties of the fair cohort selection problem.First, we use a dependent-rounding procedure from [SMLN20] that takes a set of probabilities π , . . . , π π suchthat Γ ππ = π π = π and outputs a random cohort πΆ , represented by an indicator vector Λ π , . . . , Λ π π with Γ ππ = Λ π π = π such that E ( Λ π π’ ) = π π’ for every candidate π’ . Thus, it is enough for our algorithm to come up with a set of marginalprobabilities for each candidate to appear in the cohort, rather than directly ο¬nding the cohort.To ο¬nd the marginal probabilities that maximize utilities with respect to the scores π , . . . , π π β [ , ] , wewould like to solve the linear programmaximize Γ ππ = π π π π s.t. Γ ππ = π π β€ π β π, π | π π β π π | β€ | π π β π π |β π β€ π π β€ π π’ representing the marginal probability ofselecting candidate π’ in a cohort of size π . The second constraint ensures that these probabilities π are fair withrespect to the same measure D as the original scores π . Speciο¬cally, | π π’ β π π£ | β€ | π π’ β π π£ | β€ D ( π’, π£ ) . Although wecould have used the stronger constraint | π π’ β π π£ | β€ D ( π’, π£ ) , writing the LP this way means that our algorithmdoesnβt need to know the underlying measure, and means our solution will preserve any stronger fairness thatthe scores π happen to satisfy.While we could solve this linear program explicitly, we can get a faster solution that is more useful for extend-ing to the online setting by noting that this LP has a speciο¬c closed form based on βwater ο¬lling.β Speciο¬cally, if Γ ππ = π π β€ π , then the optimal solution simply adds some number π β₯ π π’ = min { π π’ + π, } ,and an analogous solution works when Γ ππ = π π > π . Online Setting.
In the online model we do not have all the scores in advance, thus we cannot determine thesolution to the linear program, and do not even know the value of the constant π that determines the solution. Wegive two algorithms for addressing this problem. The basic algorithm begins by introducing some approximation ,in which we group users into 1 / π groups based on their scores, where π contains users with scores in [ ππ, ( π + ) π ] .This grouping can only reduce utility by π , and can only lead to violating the fairness constraint by π . Since usersin each bucket are treated identically, we know that when we reach the end of the algorithm, we can express theο¬nal cohort as containing a random set of π π members from each group π . Thus, to run the algorithm we use reservoir sampling to maintain a random set of at most π candidates from each group, reject all other members,and then run the oο¬ine algorithm at the end to determine how many candidates to select from each group.2he drawback of this method is that it keeps as many as π / π candidates on hold until the end. Thus, wedevelop an improved algorithm that solves the linear program in an online fashion, and uses the informationit obtains along the way to more carefully choose how many candidates to keep from each group. This ο¬nalalgorithm reduces the number of candidates on hold by as much as a quadratic factor, down to 2 π + π . Our work ο¬ts into the line of work initiated by Dwork et al. [DHP +
12] on individual fairness , which imposes con-straints on how algorithms may distinguish speciο¬c individuals. Within this framework, issues with composingfair algorithms were ο¬rst explored by Dwork and Ilvento [DI19], and later studied by [DIJ20] and [SMLN20].A complementary line of work, initiated by Hardt, Price, and Srebro [HPS16] considers notions of groupfairness , which imposes constraints on how algorithms may distinguish in aggregate between individuals fromdiο¬erent groups. While our work is technically distinct from work on group fairness, issues of composition alsoarise in that setting, as noted in several works [BKN +
17, KRZ19, AKRZ21].
For our model, we consider a set of π individuals π and a binary classiο¬er πΆ , that chooses individual π’ β π withprobability π π’ . The classiο¬er outputs 1 when the individual is chosen and 0 otherwise. If we restrict the deο¬nitionof individual fairness from to this particular model, we obtain the following deο¬nition. Deο¬nition 1 (Individual Fairness [DHP + . Given a metric D over the individuals of set π and a randomizedbinary classiο¬er πΆ with outputs in { , } that assigns selection probability π π’ to any individual π’ in π , we saythat the classiο¬er is individually fair if and only if for all π’, π£ in π , D ( π’, π£ ) β₯ | π π’ β π π£ | . In this work, we want to select a cohort of exactly π individuals out of the set π , by consulting an individuallyfair classiο¬er πΆ that assigns individual selection probabilities π , π , . . . , π π to the π individuals. We are interestedin maintaining the fairness property for the probabilities of selection for the cohort. The general setting of thisproblem was deο¬ned in [DI19]. At the same time, we attempt to eliminate trivial solutions that would be fair,such as a uniform probability distribution. To achieve this, we deο¬ne a linear utility function of the probabilitiesof selection, which we want to maximize during the cohort selection. Deο¬nition 2 (Utility) . Given a set of π candidates π , a randomized binary classiο¬er πΆ that assigns individualselection probabilities π , π , . . . , π π to the members of π and a cohort selection algorithm S which chooses indi-viduals with probabilities π , π , . . . , π π , we deο¬ne the utility to be π Γ π = π π π π . We consider two variations of the cohort selection problem. The ο¬rst one is the oο¬ine cohort selection, wherethe algorithm has full access to the set π and makes decisions oο¬ine. The second one is the streaming versionof the cohort selection problem, for which we use a relaxation of the individual fairness. Deο¬nition 3 ( π -Individual Fairness) . Given a metric D over the individuals of set π , a randomized binary clas-siο¬er πΆ with outputs in { , } that assigns selection probabilities π π’ to any individual in π and 0 β€ π β€
1, we saythat the classiο¬er is π -individually fair if and only if for all π’, π£ in π , D ( π’, π£ ) + π β₯ | π π’ β π π£ | . Now, we have the tools we need to deο¬ne the problem we study in the following sections.
Deο¬nition 4 (Fair and Useful Cohort Selection Problem) . Given a set of π individuals π and the probabilities ofselection an individually fair classiο¬er πΆ assigns to the members of π with respect to a metric D (and a constant π in ( , ] ), choose a cohort of π individuals such that: 3. the probability of selection for the cohort is individually fair (or π -individually fair) with respect to D , and2. it achieves the optimal cohort selection utility.Since the input and the output probabilities of the cohort selection problem satisfy fairness conditions for thesame metric, it will be implied in the theorems of the following sections that the result of the cohort selection isfair with respect to the same metric as the input. Both the oο¬ine and the streaming solutions for the cohort selection problem will be based on a dependent round-ing algorithm that solves the oο¬ine fair and useful cohort selection problem when the sum of the input scores ofall the candidates is equal to the number of people we want to choose π . The output of this algorithm consists ofindicators Λ π π which are 1 if the π -th candidate is selected to be part of the cohort and 0 otherwise. This roundingprocedure is a special case of rounding a fractional solution in a matroid polytope (in this case, we have a uniformmatroid). This problem has been studied extensively with rounding procedures satisfying additional desirableproperties (see e.g. [CVZ10]). Here we describe a simple and very eο¬cient rounding algorithm for the specialcase of the problem arising in our work. Algorithm 1:
Rounding
Input: list of scores π , π , . . . , π π β [ , ] for the π candidates with Γ ππ = π π = π Output: list of selection indicators Λ π , Λ π , . . . , Λ π π β { , } pendingIndex β for π from to π do if π = pendingIndex then continue to next π end π β π π π β π pendingIndex choose π’ randomly from unif ( , ) if π + π β€ then if π’ < ππ + π then π π β π + π π pendingIndex β pendingIndex β π else π π β π pendingIndex β π + π end else if π’ < β π β π β π then π π β π pendingIndex β π + π β else π π β π + π β π pendingIndex β pendingIndex β π end end end return π , π , . . . , π π emma 1 (see e.g. [SMLN20]) . Let π , π , . . . , π π β [ , ] be a list of scores with Γ ππ = π π = π β N . Algorithm 1outputs randomized Λ π , . . . , Λ π π β { , } such that π elements will be equal to 1, the rest will be equal to 0 and forall π β { , . . . , π } , E [ Λ π π ] = π π . For the streaming algorithm which solves the cohort selection problem we use a procedure called random reser-voir sampling. In particular, we want to maintain an upper-bounded number of people in the memory. We dothis by choosing a subset of people uniformly at random if the number of people exceeds a constant and rejectthe rest. However, since our algorithm works in the streaming setting, we need a sampling method which createsthe sample on the ο¬y.
In this version of the problem, the algorithm has full access to the set π and makes decisions oο¬ine. We canformalize it as the following constrained utility maximization problem where we want to compute the selectionprobabilities for all π individuals. Maximize Γ ππ = π π π π s.t. Γ ππ = π π β€ π β π, π | π π β π π | β€ | π π β π π |β π β€ π π β€ β π β€ π π β€
1. By lemma 1, we have that algorithm 1 can receive as input the list of individual cohortselection probabilities and form a cohort that respects these probabilities. Nevertheless, the sum of the initialprobabilities generated by classiο¬er πΆ might not be equal to π . If the sum is greater than π , then the new selectionprobabilities become π π = min { π π + π, } , where the constant π is calculated so that Γ ππ = π π = π . This adjustmentmaintains the probability diο¬erences between the pairs of candidates, unless one of them becomes 1, in whichcase the diο¬erence will become smaller. As a result, the diο¬erences of the new probabilities will remain boundedby the same metric as the initial probabilities. The case where the sum is less than π is treated similarly. Morespeciο¬cally, the new probabilities are π π = min { , π π β π } . After the adjustment, algorithm 1 can decide whichpeople will constitute the cohort based on the probabilities of the input. Theorem 1.
Given individually fair scores π , π , . . . , π π for a set of π candidates, Algorithm 2 solves the Oο¬ineCohort Selection problem by selecting π individuals with marginal probabilities π , π , . . . , π π that:1. are individually fair, and2. optimize the cohort selection utility function. Proof.
We can rewrite the procedure that Algorithm 2 runs before the rounding in a succinct way. In particular,if the sum is less than π then we have π π = min { π π + π, } , for a real number π so that Γ ππ = π π = π . The valueof the sum remains the same after the initialization of the π π s because the algorithm only redistributes the massbetween individuals. All π π s that are not set to 1 are equal to the sum of π π plus the same constant that consistsof the initial π and the fractions of the π π s that exceeded 1 and, therefore, were set to 1. In the end no π π can begreater than 1 because then its value will be set to 1 and the remaining mass will be uniformly redistributed toall π π s that are less than 1. Similarly, if the sum is greater than π the formula is π π = max { π π β π, } , for a realnumber π so that Γ ππ = π π = π . Individual fairness
The algorithm adjusts the scores of the individuals according the value of the Γ ππ = π π before running the rounding algorithm. Hence, there are three distinct cases.1. Γ ππ = π π = π . The input scores are used unaltered as the marginal probabilities for the cohort selection and,thus, we have for any pair of indices diο¬erent π, π | π π β π π | = | π π β π π | . lgorithm 2: Oο¬ine Cohort Selection
Input: list of scores π , π , . . . , π π β [ , ] for the π candidates,the number of individuals that must be selected π Output: list of selection indicators Λ π , Λ π , . . . , Λ π π β { , } sum β Γ ππ = π π if sum < π then π β π β sum π π π β π π + π , β π β [ π ] while β π π > do set π < equal to the number of individuals with π π < π π β π π + π π β π < , β π : π π < π π β end else π β sum β ππ π π β π π β π , β π β [ π ] while β π π < in π do set π > equal to the number of individuals with π π > π π β π π + π π π > , β π : π π > π π β end end return Rounding( π , . . . , π π )2. Γ ππ = π π < π . The cohort selection probabilities are of the form π π = min { π π + π, } . For any pair of individuals π, π if both have probability of being selected 1 then | π π β π π | = π π = π π = π π + π , we have | π π β π π | < | π π β π π | . Finally, if π π = π π + π and π π = π π + π , then it holds that | π π β π π | = | π π β π π | . Combining these, we conclude that for any pair of individuals π, π we have | π π β π π | β€ | π π β π π | . Γ ππ = π π > π . Now, the cohort selection probabilities are of the form π π = max { π π β π, } . For any pair ofindividuals π, π if both have zero probability of being selected then | π π β π π | = π π = π π = π π β π , we have | π π β π π | < | π π β π π | . Finally, if π π = π π β π and π π = π π β π , then itholds that | π π β π π | = | π π β π π | . We conclude that for any pair of individuals π, π we have | π π β π π | β€ | π π β π π | . Therefore, the individual fairness is ensured by the assumption of the theorem that the input scores satisfy theindividual fairness condition. More speciο¬cally, if the scores are individually fair with respect to a metric D , weobtain β π, π β { , . . . , π } | π π β π π | β€ | π π β π π | β€ D ( π, π ) . Optimal utility.
Let π π for π β { , . . . , π } denote the individual selection probabilities π of the solution ofAlgorithm 2. For the optimal solution the ο¬rst constraint that refers to the sum is satisο¬ed with equality. Thishappens because otherwise we would be able to increase the π π s by setting π β² π = min { π π + π, } so that Γ ππ = π β² π = π and obtain greater utility while not violating any constraint. We assume that there exists a diο¬erent solution π β² which is also individually fair and it is the optimal one, i.e. Γ ππ = π β² π π π > Γ ππ = π π π π . Without loss of generality wecan assume that the original scores π π are sorted in increasing order. In particular, we have π β€ π β€ . . . β€ π π . π β€ π β€ . . . β€ π π . Let π be the individual with the smallest index for whom the two solutions diο¬er. There are two possible cases.If π β² π < π π , then because Γ ππ = π π = Γ ππ = π β² π = π there exists an individual with π > π such that π β² π > π π . Inaddition π π > π π <
1. The values of the probabilities depend on the sum of the scores in comparison to π .If the sum is greater than π , all the π π s that are not equal to 0 are of the form π π = π π β π . Hence, considering that π β² π < π π β€ π π < π β² π we obtain | π β² π β π β² π | = π β² π β π β² π > π π β π β ( π π β π ) = π π β π π = | π π β π π | . Similarly, if the sum is less than π , the π π s that are not equal to 1 are of the form π π = π π + π , therefore giving | π β² π β π β² π | = π β² π β π β² π > π π + π β ( π π + π ) = π π β π π = | π π β π π | . If the sum is equal to π , we have | π β² π β π β² π | = π β² π β π β² π > π π β π π = π π β π π = | π π β π π | . In all three cases one of the constraints of the optimization is violated.If π β² π > π π , then there exists an individual with π > π such that π β² π < π π . Let π be the smallest such index. Ifthere exists another index π > π such that π β² π β₯ π π , then by the previous argument the constraints are not satisο¬ed.Therefore, for all individuals π after π it must hold that π β² π < π π . We can now separate the individuals in threegroups: πΊ ( π β² ) = { π : π π = π β² π } πΊ ( π β² ) = { π : π β² π > π π } πΊ ( π β² ) = { π : π β² π < π π } . All individuals in πΊ have greater indices than those in πΊ and πΊ . We can now take mass uniformly from theindividuals in πΊ and distribute it uniformly to individuals in πΊ in a way that all individuals remain in the samegroup as before. Let π β²β² π be the new score of individual π . The value of the objective function will increase becauseindividuals in πΊ , who have higher π π s than those in πΊ , will get higher new scores. The constraints are stillsatisο¬ed because the total sum remains the same and for any pair of individuals π, π we have | π β²β² π β π β²β² π | β€ | π β² π β π β² π | .By constructing a solution π β²β² which gives a greater objective than π β² , we arrive at a contradiction. As a result, π is the optimal solution. (cid:3) In this section, we consider the streaming setting of the cohort selection problem. Speciο¬cally, we propose algo-rithms 3 and 5 that read the initial scores from a stream and solve the cohort selection problem while achievinghigh utility and keeping a small number of people in the memory. In particular, due to the result in [DI19], whichstates that if the number of individuals in the input is unknown the online version of the cohort selection problemhas no solution, a streaming algorithm cannot choose a cohort without having seen the entire stream. However,it can make the process more eο¬cient for the candidates by rejecting some candidates throughout the process.We say that a candidate is pending if they have not yet been rejected. It is important to note though that noperson is accepted before the algorithm reaches the end of the stream.Both algorithms described in this section divide the people into groups with similar initial selection scoresand treat any member of a group as equivalent. Hence, the ο¬nal probability of being selected for the cohort isequal for any person assigned to the same group. This leads to a relaxation of the individual fairness propertyachieved, which is the reason why we deο¬ned π -individual fairness. Even though for each group we keep anumber of people pending and reject everyone else, we maintain the information of the rejected candidates byconsidering that each person pending represents themselves as well as a fraction of the rejected people from theirgroup. The fraction of people represented by the π -th candidate is denoted by π π β₯
0. Algorithm 3 maintains at7ost π people pending per group uniformly at random and every representative within a certain group representsthe same fraction of people. Algorithm 5 reduces the memory required by allowing pending candidates of thesame group to represent diο¬erent numbers of people. Algorithm 4 is used to eliminate people and determine howmany people each candidate represents. We split the people we see into groups according to their initial score. For example we can split the interval [ , ] into π intervals of size π each, where π = β π β . Person π is assigned to group π β { , . . . , π } , if π π β [( π β ) π, ππ ] .Once person π is in the group, they get a new score Λ π π , equal to the score of all other members in the group Λ π π = ππ .The use of the groups aο¬ects the performance of the cohort selection algorithm in terms of individual fairnessand utility. Lemma 2 shows that the performance compromise of the streaming algorithms 3 and 5 is caused bythe use of groups, as it is also observed in the oο¬ine algorithm 2 when the input scores are grouped in multiplesof π . Lemma 2.
Given individually fair scores π , π , . . . , π π for a set of π candidates and π β ( , ] , we split the interval [ , ] into π = β π β intervals of length π and for all π β { , . . . , π } we set Λ π π = ππ if π π β [( π β ) π, ππ ] . Algorithm 2with input the modiο¬ed scores Λ π , . . . , Λ π π solves the Cohort Selection problem by choosing a cohort of size π β N with individual selection probabilities π , π , . . . , π π that:1. are π -individually fair2. achieve cohort selection utility πππ β ππ β€ Γ ππ = π π π π β€ πππ , where the optimal utility is with respect tothe original scores π , π , . . . , π π . Proof.
We have that for all individuals π in { , . . . , π } β€ Λ π π β π π β€ π . Therefore, we obtain that for any pair ofindividuals π, π | Λ π π β Λ π π | β€ | π π β π π | + π . By Theorem 1 we have that | π π β π π | β€ | Λ π π β Λ π π | . Combining the twoinequalities, we obtain that the selection process is π -individually fair.We denote by π β , . . . , π β π the optimal solution that oο¬ers utility Γ ππ = π β π π π β₯ Γ ππ = π π π π . The utility achieved bythe algorithm is π Γ π = π π π π = π Γ π = π π Λ π π + π Γ π = π π ( π π β Λ π π )β₯ π Γ π = π π Λ π π β π Γ π = π π π (Λ π π β π π β€ π, β π β { , . . . , π } ) = π Γ π = π π Λ π π β ππ ( π Γ π = π π = π ) β₯ π Γ π = π β π Λ π π β ππ ( π Γ π = π π Λ π π is the optimal utility for scores Λ π π ) . Since we want a ο¬nal result that involves Γ π = π β π π π , we can rewrite Γ ππ = π β π Λ π π as π Γ π = π β π Λ π π = π Γ π = π β π π π + π Γ π = π β π ( Λ π π β π π )β₯ π Γ π = π β π π π (Λ π π β π π β₯ , β π β { , . . . , π } ) . Thus, we see that Γ ππ = π π π π β₯ Γ ππ = π β π π π β ππ . (cid:3) This algorithm adds each new person to the appropriate group and maintains at most π people from each groupusing reservoir sampling if the size of the group exceeds π . If there are more than π people in one group, each8f the people from this group who are not rejected represent π of the size of the group. For all people that arewaiting for the decision, the algorithm keeps the score and the number of people they represent. When thestream ends, the algorithm adjusts the scores of the remaining people so that the sum of their scores is equal to π . The process followed is equivalent to that of the oο¬ine algorithm. To be more precise, it is modiο¬ed to workwith the limited information kept by the streaming algorithm so that the expected value of any score is equal tothe value computed by the corresponding oο¬ine version. Algorithm 3:
Basic streaming cohort selection
Input: list of scores π , π , . . . , π π β [ , ] for the π candidates,the number of individuals that must be selected π ,constant π β ( , ] Output: list of selection indicators Λ π , Λ π , . . . , Λ π π β { , } while stream has individuals do add the new person π to group π for which π π β [( π β ) π, ππ ] π π β // π represent only themselves Λ π π β ππ if group π has π π > π people then keep π people from group π with uniform random reservoir sampling of size π for any rejected person π set π π β π π β for any pending person π in group π set π π β π π π end end sum β Γ ππ = Λ π π if sum < π then π β π β sum π for any person π pending set Λ π π β π π Λ π π + π π π while β Λ π π > do set π < equal to the number of individuals with Λ π π < for any pending person π with Λ π π < π π β Λ π π + π π ( Λ π π β ) π < Λ π π β end else if sum > π then π β sum β ππ for any person π pending set Λ π π β π π Λ π π β π π π while β Λ π π < do set π > equal to the number of individuals with Λ π π > for any pending person π with Λ π π > π π β Λ π π + π π Λ π π π > Λ π π β end else for any pending person π set Λ π π β π π Λ π π end return Rounding(Λ π , Λ π , . . . , Λ π π ) Theorem 2.
Given individually fair scores π , π , . . . , π π for a set of π candidates, the streaming algorithm 3solves the cohort selection problem for any π β ( , ] by choosing a cohort with individual selection probabilities π , π , . . . , π π that:1. are π -individually fair2. achieve cohort selection utility πππ β ππ β€ Γ ππ = π π π π β€ πππ .9n addition, it keeps at most π ( ππ ) candidates pending. Proof.
We want to show that algorithm 3 gives the same marginal probabilities of selection as the oο¬ine algorithm2 whose input is rounded into multiples of π and the scores have become Λ π , . . . , Λ π π . In other words, our goal isto show that for any candidate π β [ π ] , π π = π π , where π π is the probability that the candidate is selected by theoο¬ine algorithm. To prove this, we can show that two properties hold for scores Λ π , . . . , Λ π π that the candidateshave right before the ο¬nal rounding:1. Γ ππ = Λ π π = π , and2. β π β [ π ] , E [ Λ π π ] = π π .In the oο¬ine algorithm, all members of a group π have the same score denoted by π π , which, as seen in theproof of theorem 1, means that the individual selection probabilities are π π = π π for any pair of candidates π, π from group π . The basic streaming version redistributes the score mass of the group among its members so that ifthe candidates are more than π , each of the pending candidates of the group represents π π π of π π and the rejectedget score Λ π =
0. We will show that Λ π π = π π π π , for any individual π , where Λ π π is the score of π before the ο¬nalrounding and π π signiο¬es the number of people represented by π . There are three ways the new scores Λ π , . . . , Λ π π are calculated depending on the value of the sum of scores Λ π , . . . , Λ π π when the stream has ended. Case 1 : Γ ππ = Λ π π = π . The streaming algorithm sets Λ π π = π π Λ π π in line 29 for the people who are pending, whichalso holds for those rejected because their π π and Λ π π are zero. The oο¬ine algorithm makes no modiο¬cations in thescores and, hence, every person π keeps their score Λ π π . By lemma 1, the probability of candidate π being selected bythe oο¬ine algorithm is π π = Λ π π . Thus, we obtain that for any person π has score Λ π π = π π π π before the ο¬nal rounding. Case 2 : Γ ππ = Λ π π < π . First, we see that if the size of a group π is π π > π , then for any member π of group π theprobability of selection by the oο¬ine algorithm π π is at most ππ π . This holds because if there exists a person π ingroup π with π π > ππ π , then any other member π of this group has selection probability π π = π π > ππ π . By addingtogether the probabilities of the candidates in this group, we obtain probability mass greater than π , which leadsto a contradiction because the oο¬ine algorithm gives a solution with Γ ππ = π π = π . Therefore, only the probabili-ties of people in groups of size smaller than π (who have π π =
1) can reach 1. This observation is useful for theanalysis of lines 13-19 of the streaming algorithm that are executed in this case. In line 14 all scores of pendingcandidates are initialized with π π ( Λ π π + π ) . The oο¬ine algorithm initializes the scores of all candidates with Λ π π + π .The total amount of mass added to the candidates in the streaming is equal to that in the oο¬ine algorithm, butinstead of distributing it uniformly, it is added according the fraction represented by each individual. If no scoreexceeds 1 in both the streaming and the oο¬ine, we have the property we want, because the oο¬ine will select π with probability π π = Λ π π + π . Otherwise, the loop is executed. Due to our observation, only people with π π = π π ( Λ π π + π ) = Λ π π + π . As a consequence, the term Λ π π β π < of line 17 involves only the originalscores, which are the same as in the oο¬ine. Since any term added to any candidate π is multiplied by π π , we havethat if the oο¬ine algorithm has computed that the score of the π -th candidate is Λ π π + π , then the streaming hascomputed score Λ π π = π π ( Λ π π + π ) and if the oο¬ine has assigned score 1, then the streaming has also assigned score1. Therefore, any person π is assigned score Λ π π = π π π π by the streaming algorithm before the ο¬nal rounding. Case 3 : Γ ππ = Λ π π < π . The adjusting process is analogous to that of case 2 and, hence, it can be similarly shownthat for any person π we have Λ π π = π π π π .Additionally, the new sum of scores is π Γ π = Λ π π = π Γ π = π π π π = π Γ π = Γ π in group π π π π π = π Γ π = Γ π in group π π π π π π = π Γ π = π π π π = π. π π s is randomized because of the random reservoir sampling. The value of π π for candidate π who is in a group with at most π members is equal to 1, which gives E [ π π ] =
1. If candidate π is in a group π with π π > π people, then E [ π π ] = π π π ππ π =
1. Combining, the expected value of π π with the fact that Λ π π = π π π π , wecan compute the expected value of Λ π π E [ Λ π π ] = E [ π π π π ] = π π E [ π π ] = π π . Since the indicators Λ π , . . . , Λ π π have values in { , } , the probability π π of person π getting selected by thestreaming algorithm is π π = π π . Thus, we see that algorithm 3 is equivalent to the algorithm of lemma 2 andproperties 1 and 2 of the lemma are satisο¬ed.The number of groups is π = β π β and each group keeps at most π candidates. As a result, the algorithm keepsat most ππ = β π β π β€ (cid:0) π + (cid:1) π candidates pending in total. (cid:3) The size of memory needed by the basic streaming algorithm is determined by the way the representativesare deο¬ned within the groups. By keeping a subset of π people for each group that has size greater than π and distributing the numbers of people they represent uniformly, algorithm 3 keeps at most π ( ππ ) candidatespending. We can improve this by optimizing the process that determines who gets rejected and who representswhich subgroup of rejected people. Instead of distributing the mass of a group uniformly to the candidateswho have not been rejected, we perform a rounding process presented in algorithm 4. Its input consists of therepresentation numbers π , . . . , π π , where π π is the number of people the π -th candidate represents, and a value π£ , which determines the maximum number of people a pending candidate can represent. At every iteration, itrounds two entries by randomly setting one equal to zero and one equal to their sum, if their sum is less than π£ else it sets one entry equal to π£ and the other one equal to the remainder so that their sum is maintained. Itsgoal is to maximize the number of people it can reject while having each pending candidate represent at most π£ people. Lemma 3.
Let π , π , . . . , π π π β { , , . . . , π£ } be a list of the number of people each candidate of the same group π represents. Algorithm 4 rounds each π π up to value π£ so that β π π π£ β elements will be equal to π£ , one element willbe equal to π π β β π π π£ β π£ and the rest will be equal to 0. Moreover, for all π β [ π π ] E [ Λ π π ] = π π . Proof.
We begin by showing that for all π β [ π π ] E [ Λ π π ] = π π . At step π , we have two candidates π and π whoget rounded and obtain new values denoted by Λ π and Λ π , respectively. The rounding depends on the value of π + π . If π + π is at most equal to π£ , then E [ Λ π ] = ( π + π ) ππ + π = π . If π + π greater than π£ and at most 2 π£ , then E [ Λ π ] = π£ π£ β π π£ β π β π + ( π + π β π£ ) π£ β π π£ β π β π = π . Similarly, we obtain E [ Λ π ] = π . Since, the expected values remain constantthroughout the process, we conclude that E [ Λ π π ] = π π .We notice that during the procedure β π : π < π and π β pendingIndex π π = π π = π£ . At the end all thecandidates with index π : π < π and π β pendingIndex and one of the candidates with index π π or pendingIndexhave value 0 or π£ . Since Γ π π π = π π = π π , we obtain that β π π π£ β of the people with π : π < π and π β pendingIndex havevalue π£ and the rest of them have value 0. The remaining mass is assigned to either the π π -th candidate or thependingIndex. (cid:3) The structure of algorithm 5 is similar to that of algorithm 3. The most important change is the roundingprocess which determines who represents whom and who gets rejected before the stream ends. Since all themembers of one group have the same score Λ π , we adjust the scores, as new people are considered, on the level ofgroups. Speciο¬cally, for every iteration we calculate the scores of the groups so that Γ ππ = π π π π = π , where π π isthe size of group π and π π is its adjusted score. Then, we perform the rounding process while making sure that forall groups π no candidate has π π π π >
1, where π π is the number of people candidate π represents. This is ensuredby setting the argument π£ = β π π β . In the end, every person who has not been rejected while the algorithm readsfrom the stream is assigned score Λ π π = π π π π . The ο¬nal step calls the algorithm 1 with input Λ π , . . . , Λ π π . Theorem 3.
Given individually fair scores π , π , . . . , π π for a set of π candidates, the streaming algorithm 5solves the cohort selection problem for any π β ( , ] by choosing a cohort with individual selection probabilities π , π , . . . , π π that:1. are π -individually fair 11 lgorithm 4: IRounding
Input: list of representation numbers π , π , . . . , π β β N for β candidates and maximum number ofpeople one person can represent π£ β N Output: list of adjusted representation numbers Λ π , Λ π , . . . , Λ π β β N pendingIndex β for π from to β do if π = pendingIndex then continue to next π end π β π π π β π pendingIndex choose π’ randomly from π’ππ π ( , ) if π + π β€ π£ then if π’ < ππ + π then π π β π + π π pendingIndex β pendingIndex β π else π π β π pendingIndex β π + π end else if π’ < π£ β π π£ β π β π then π π β π£ π pendingIndex β π + π β π£ else π π β π + π β π£ π pendingIndex β π£ pendingIndex β π end end end return π , π , . . . , π β lgorithm 5: Improved streaming cohort selection
Input: list of scores π , π , . . . , π π β [ , ] for the π candidates,the number of individuals that must be selected π ,constant π β ( , ] Output: list of selection indicators Λ π , Λ π , . . . , Λ π π β { , } while stream has individuals do add the new person π to group π for which π π β [( π β ) π, ππ ] Λ π π β ππ π π β sum β Γ ππ = Λ π π if sum < π then π β π β π π’ππ for any group π set π π β ππ + π while β group π with π π > do set π < equal to the number of individuals from groups with π π < for any group π with π π < π π β π π + π π ( π π β ) π < π π β end else if sum > π then π β π π’π β ππ for any group π set π π β ππ β π while β group π with π π < do set π > equal to the number of individuals from groups with π π > for any group π with π π > π π β π π + π π π π π > π π β end else for any group π set π π β ππ end for group π do if π π > then /* π£ is the max number of people a person π can represent s.t. π π π£ β€ */ ({ π π } π in group π ) = IRounding( { π π } π in group π , π£ = β π π β ) for any person π in group π with π π = π π β end end end for any group π and any person π in π set Λ π π β π π π π return Rounding(Λ π , Λ π , . . . , Λ π π ) 13. achieve cohort selection utility πππ β ππ β€ Γ ππ = π π π π β€ πππ .In addition, it keeps at most π ( π + π ) candidates pending. Proof.
By comparing algorithm 5 to the algorithm described in lemma 2 we want to prove that they are equivalent.In particular, we show that the probability π π that individual π is selected by algorithm 5 is equal to the probability π π that π is selected by the oο¬ine algorithm with input the modiο¬ed scores Λ π , . . . , Λ π π , where Λ π π = ππ if π π β[( π β ) π, ππ ] . The ο¬rst step is to prove that the scores Λ π , Λ π , . . . , Λ π π which are the input of the ο¬nal rounding inline 31 satisfy the following properties:1. Γ ππ = Λ π π = π E [ Λ π π ] = π π , β π β [ π ] .We saw in the proof of theorem 1 that for the oο¬ine algorithm all candidates of the same group have thesame selection probability π π . We will show that for any person π we have π π = π π , where π π is the ο¬nal calculatedscore of the group π to which π belongs. The π π we are referring to is calculated by the ο¬nal execution of lines 5-24.Lines 6-24 of algorithm 5 describe the same procedure as lines 2-18 of algorithm 2, but from the point of viewof groups instead of individuals. We consider three cases that depend on the value of the sum of the initial scores. Case 1 : Γ ππ = Λ π π = π . The oο¬ine algorithm does not change the scores of the individuals and, thus, assignsprobability π π = Λ π π = ππ to candidate π of group π . Similarly, algorithm 5 assigns score π π = ππ to group π and inline 30 sets Λ π π = π π π π = π π ππ = π π π π for the people who have not been rejected. Case 2 : Γ ππ = Λ π π < π . The process that calculates π π starts by setting π π = ππ + π . The oο¬ine algorithm ini-tializes the probability of π who is a member of π as π π = Λ π π + π = ππ + π . If for all groups π , ππ + π β€
1, then theadjustment stops for both algorithms and we have that for any group π and any member π of π has π π = π π . If thereexists π such that π π >
1, then the corresponding π π exceeds 1 by the same amount. Additionally, at this pointthe probabilities of all people in the same group as π will exceed 1 by this amount. Therefore, the π < of the twoalgorithms is the same. The oο¬ine algorithm runs the loop for all members of all groups that have individualswith π π >
1. The streaming version aggregates the excess mass from all π π members of group π and redistributesit all at once instead of running separate iterations for every member of the group as the oο¬ine does. No extramass is added after the initialization but it is only moved from group to group. Hence, we obtain that at the endof this process π π = π π . Case 3 : Γ ππ = Λ π π > π . Analogously to case 2, if π is a member of group π , then π π = π π and for all .Those who were rejected have Λ π π = π π =
0. As a result, we see that for any person π , Λ π π = π π π π . From thiswe can infer that π Γ π = Λ π π = π Γ π = π π π π = π Γ π = Γ π β π π π π π = π Γ π = π π π π = π Γ π = Γ π β π π π = π. As new people are added to the groups, the group scores π π become smaller in order for the sum of scores π π π π to be equal to π . Therefore, the maximum number π£ of people that can be represented by a candidate in agiven group either stays the same or increases after every iteration. By lemma 3, we obtain that the roundingprocess maintains the expected value of the number of people each candidate represents equal to their initialvalue. Since every person begins by representing only themselves, we have that for the π -th candidate E [ π π ] = E [ Λ π π ] = E [ π π π π ] = E [ π π ] π π = π π , because the calculation of π π s is deterministic. The ο¬nal rounding process makes the ο¬nal decisions and outputs 0if the candidate is rejected and 1 if the candidate is selected. Due to properties 1 and 2, the probability of candidate π being selected by the streaming algorithm is π π . Thus, algorithm 5 and the oο¬ine algorithm with scores roundedto multiples of π have the same selection probabilities. The theorem follows by the application of lemma 2.14ecause of the online score adjustments, we have that for π β₯ π the sum of all the scores is equal to π at theend of each loop. Therefore, we have Γ ππ = π π π π = π . If π π >
0, each person can represent at most β π π β candidates.By lemma 3, the number of representatives per group is at most & π π β π π β ' β€ π π β π π β + β€ π π π π + , since π π β π π β β€ π π π π . If we sum the number of representatives for all groups we obtain π Γ π = & π π β π π β ' β€ π Γ π = ( π π π π + ) = π + π . This completes the proof. (cid:3)
References [AKRZ21] Eshwar Ram Arunachaleswaran, Sampath Kannan, Aaron Roth, and Juba Ziani. PipelineInterventions. In
Innovations in Theoretical Computer Science Conference , ITCS β21, 2021. https://arxiv.org/abs/2002.06592 .[BKN +
17] Amanda Bower, Sarah N Kitchen, Laura Niss, Martin J Strauss, Alexander Vargas, and Suresh Venkata-subramanian. Fair pipelines. arXiv preprint arXiv:1707.00391 , 2017.[CVZ10] Chandra Chekuri, Jan VondrΓ‘k, and Rico Zenklusen. Dependent randomized rounding via exchangeproperties of combinatorial structures. In
IEEE Symposium on Foundations of Computer Science , FOCSβ10. IEEE, 2010. https://arxiv.org/abs/0909.4348 .[DHP +
12] Cynthia Dwork, Moritz Hardt, Toniann Pitassi, Omer Reingold, and Richard Zemel. Fairness throughawareness. In
Innovations in Theoretical Computer Science , ITCS β12. ACM, 2012.[DI19] Cynthia Dwork and Christina Ilvento. Fairness under composition.
Innovations in Theoretical Com-puter Science , 2019. http://arxiv.org/abs/1806.06122 .[DIJ20] Cynthia Dwork, Christina Ilvento, and Meena Jagadeesan. Individual Fairness inPipelines. In
Symposium on Foundations of Responsible Computing , FORC β20, 2020. https://arxiv.org/abs/2004.05167 .[HPS16] Moritz Hardt, Eric Price, and Nathan Srebro. Equality of opportunity in supervisedlearning. In
Conference on Neural Information Processing Systems , NIPS β16, 2016. https://arxiv.org/abs/1610.02413 .[KRZ19] Sampath Kannan, Aaron Roth, and Juba Ziani. Downstream eο¬ects of aο¬rmative ac-tion. In
Conference on Fairness, Accountability, and Transparency , FAT* β19. ACM, 2019. https://arxiv.org/abs/1808.09004 .[SMLN20] Niklas Smedemark-Margulies, Paul Langton, and Huy L Nguyen. Fair and useful cohort selection. arXiv preprint arXiv:2009.02207arXiv preprint arXiv:2009.02207