Next Article in Journal
Entropy? Exercices de Style
Next Article in Special Issue
Maximum Entropy Analysis of Flow Networks: Theoretical Foundation and Applications
Previous Article in Journal
Underwater Bearing-Only and Bearing-Doppler Target Tracking Based on Square Root Unscented Kalman Filter
Previous Article in Special Issue
Entropic Regularization of Markov Decision Processes
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A General Framework for Fair Regression

by
Jack Fitzsimons
1,*,
AbdulRahman Al Ali
2,
Michael Osborne
1 and
Stephen Roberts
1
1
Department of Engineering Science, University of Oxford, Oxford OX13PJ, UK
2
Faculty of Business and Law, Northampton University, Northampton NN15PH, UK
*
Author to whom correspondence should be addressed.
Entropy 2019, 21(8), 741; https://doi.org/10.3390/e21080741
Submission received: 29 April 2019 / Revised: 17 July 2019 / Accepted: 22 July 2019 / Published: 29 July 2019
(This article belongs to the Special Issue Entropy Based Inference and Optimization in Machine Learning)

Abstract

:
Fairness, through its many forms and definitions, has become an important issue facing the machine learning community. In this work, we consider how to incorporate group fairness constraints into kernel regression methods, applicable to Gaussian processes, support vector machines, neural network regression and decision tree regression. Further, we focus on examining the effect of incorporating these constraints in decision tree regression, with direct applications to random forests and boosted trees amongst other widespread popular inference techniques. We show that the order of complexity of memory and computation is preserved for such models and tightly binds the expected perturbations to the model in terms of the number of leaves of the trees. Importantly, the approach works on trained models and hence can be easily applied to models in current use and group labels are only required on training data.

1. Introduction

As the proliferation of machine learning and algorithmic decision making continues to grow throughout industry, the net societal impact of them has been studied with more scrutiny. In the USA under the Obama administration, a report on big data collection and analysis found that “big data technologies can cause societal harms beyond damages to privacy” [1]. The report feared that algorithmic decisions informed by big data may have harmful biases, further discriminating against disadvantaged groups. This along with other similar findings has led to a surge in research around algorithmic fairness and the removal of bias from big data.
The term fairness, with respect to some sensitive feature or set of features, has a range of potential definitions. In this work, impact parity is considered. In particular, this work is concerned with group fairness under the following definitions as taken from [2].
Group Fairness:A predictor H : X Y achieves fairness with bias ϵ with respect to groups A , B X and O Y being any subset of outcomes iff,
| P { H ( x i ) O | x i A } P { H ( x j ) O | x j B } | ϵ .
The above definition can also be described as statistical or demographical parity. Group fairness has found widespread application in India and the USA, where affirmative action has been used to address discrimination against caste, race and gender [3,4,5].
The above definition does not, unfortunately, have natural application to regression problems. One approach to get around this would be to alter the definition to bound the absolute difference between the respective marginal distributions over the output space. However, this is a strong requirement and may hinder the model’s ability to model the function space appropriately. Rather, a weaker and potentially more desirable constraint would be to force the expectation of the marginal distributions over the output space to equate. Therefore, statements such as “the average expected outcome for population A and B is equal“ would be valid. This can be seen as a constraint such that the total entropy of the partition is maximised.
The second issue encountered is that the generative distribution of groups A and B are generally unknown. In this work, it is assumed that the empirical distribution p A ( x ) and p B ( x ) , as observed from the training set, is equal to or negligibly perturbed from the true generative distributions.
Combining these two caveats, we arrive at the definition:
Group Fairness in Expectation:A regressor f ( · ) : X Y achieves fairness with respect to groups A , B X iff,
E [ f ( x i ) | x i A ] E [ f ( x i ) | x j B ] = 0
p A ( x ) p B ( x ) f ( x ) d x = 0 .
There are many machine learning techniques with which Group Fairness in Expectation constraints (GFE constraints) may be incorporated. While constraining kernel regression is introduced in Section 3, the main focus of the paper is examining decision tree regression and respective ensemble methods which build on decision tree regression such as random forests, extra trees and boosted trees due to their widespread use in industry and hence their extensive impact on society [6]. The reason for this is to show that such an approach will not affect the order of computational or memory complexity of the model.
The main contributions of this paper are:
I
We use quadrature approaches to enforce GFE constraints on kernel regression with applications to Gaussian processes, support vector machines, neural network regression and decision tree regression, as outlined in Section 3.
II
We incorporate these constraints on decision tree regression without affecting the computational or memory requirements, as outlined in Section 5 and Section 6.
III
We derive a tight bound for the variance of the perturbations due to the incorporation of GFE constraints on decision tree regression in terms of the number of leaves of the tree, as outlined in Section 7.
IV
We show that these fair trees can be combined into random forests, boosted trees and other ensemble approaches while maintaining fairness, as shown in Section 8.

2. Related Work

There are many ways in which the now huge volume of literature on algorithmic fairness may be split. One such approach is to break the proposed literature into three branches of research based upon the stage of the machine learning life cycle they belong. The first is the data alteration approach, which endeavours to modify the original dataset in order to prevent discrimination or bias due to the protected variable [7,8]. The second is an attempt to regularise such that the model is penalised for bias [9,10,11,12,13]. Finally, the third endeavours to use post-processing to re-calibrate and mitigate against bias [14,15].
The literature also differs dramatically as to what is the objective of the fairness algorithm. Recent work has made efforts towards grouping these into consistent objective formalisation [2,16]. Often, the focus of algorithmic fairness is on classification problem with regression receiving very little attention.
The approach applied to enforce fairness may be from a plethora of definitions, anti-classification [16], or fairness through unawareness as it is also referred to as [2], endeavour to treat data agnostic of protected variables and hence enforces fairness via treatment rather than outcome. The second popular method is classification parity, i.e., the error with respect to some given measure is equal across groups defined by the protected variable. Finally, calibration is the term used when outcomes are independent of protected group conditioned on risk.
Narrowing our focus to regression, two contradicting objectives once again arise, namely group level fairness and individual fairness. Individual fairness implies that small changes to a given characteristic of an individual leads to small changes in outcome. Group fairness on the other hand endeavours to make aggregate outcomes of protected groups similar. The latter is the focus of this work and an overview of where this fits into the broader litterature may be found in Table 1.
Our work endeavours to create group level parity of expected outcome, of Group Fairness in Expectation as introduced in this work, with application to all kernel based regression which minimise the L2 norm. This includes decision trees, Gaussian processes and multi-layer perceptrons.
Specifically to decision trees, discrimination aware decision trees have been introduced [30] for classification. They offer dependency aware tree construction and leaf relabelling approach. Later, fair forests [13] introduced a further tree induction algorithm to encourage fairness. They did this by introducing a new gain measure to encourage fairness. However, the issue with adding such regularisation is two-fold. Firstly, discouraging bias via a regularising term does not make any guarantee about the bias of the post trained model. Secondly, it is hard to make any theoretical guarantees about the underlying model or the effect the new regulariser has had on the model.
The approach offered in this work seeks to perform model inference in a constrained space, leveraging basic theory from Bayesian quadrature such that the predicted marginal distributions are guaranteed to have equal means. Such moment constraints have a natural relationship to maximum entropy methods. By utilising quadrature methods, it is also possible to derive bounds for the expected absolute perturbation induced by constraining the space. This is shown explicitly in Section 7. Ultimately, the paper develops a general framework to perform group-fair regression, an important open problem as pointed out in [23].
We emphasise to the reader that, as outlined in the next section, there are many definitions of fairness, each with reasonable motives but conflicting values. Group fairness, addressed in this work, inherently leads to individual unfairness, i.e., to create equal aggregate statistics between sub-population, individuals in each sub-population are treated inconsistently. The reverse is also true. As such, we should always think through the adverse effects of our approach before applying it in the real world. The experiments in this paper are aimed to explore and demonstrate the approach introduced, but are not meant to advocate using group fairness specifically for the task in hand.

3. Constrained Kernel Regression

We first show how one can create such linear constraints on kernel regression models. This work builds on the earlier contributions in [31], where the authors examined the incorporation of linear constraints on Gaussian processes (GPs). Gaussian processes are a Bayesian kernel method most popular for regression. For a detailed introduction to Gaussian processes, we refer the reader to [32]. However, for the reader unfamiliar with GPs specifically, they may simply think of a high dimensional Gaussian distribution parameterised by a kernel K ( · , · ) , with zero mean and unit variance without loss of generality. Given a set of inputs and respective outputs, { x i , y i } i = 1 N , split into training and testing sets, { x i , y i } i = 1 n and { x ¯ i , y ¯ i } i = 1 N n , inference is performed as,
E [ y ¯ ] = K x ¯ , x K x , x 1 y ,
V [ y ¯ ] = K x ¯ , x ¯ K x ¯ , x K x , x 1 K x , x ¯
where K x , x denotes the kernel matrix between training examples, K x ¯ , x is the kernel matrix between the test and training examples and K x ¯ , x ¯ is the prior variance on the prediction point defined by the kernel matrix. Gaussian processes differ from high dimensional Gaussian distributions as they can model the relationships between points in continuous space, via the kernel function, as opposed to being limited to a finite dimension.
An important note is that any combination of Gaussian distributions via addition and subtraction is a closed space, i.e., the sum of Gaussians is also Gaussian and so on. While this may at first appear trivial, it is, in fact, a very useful artefact. For example, let us assume there are two variables, a and b, drawn from Gaussian distributions with mean and variance μ a , μ b , σ a 2 , σ b 2 , respectively. Further, assume that the correlation coefficient ρ describes the interaction between the two variables. Then, a new variable c, which is equal to the difference a and b, is drawn from a Gaussian distribution with mean and variance,
μ c = μ a μ b ,
σ c 2 = σ a 2 + σ b 2 2 ρ σ a σ b .
We can thus write all three variables in terms of a single mean vector and covariance matrix,
μ = μ a μ b μ a μ b
K = σ a 2 + σ b 2 2 ρ σ a σ b σ a 2 ρ σ a σ b σ b 2 ρ σ a σ b σ a 2 ρ σ a σ b σ a 2 ρ σ a σ b σ b 2 ρ σ a σ b ρ σ a σ b σ b 2
Given any two of the above observations, the third can be inferred exactly. We refer to this as a degenerate distribution as K will naturally be low rank. If we observe that μ a μ b is equal to zero, we are thus constraining the distribution of a and b. This can easily be extended to the relationship between sums and differences of more variables.
Bayesian quadrature [33] is a technique used to incorporate integral observations into the Gaussian process framework. Essentially, quadrature can be derived through an infinite summation and the above relationship between these summations can be exploited [34]. An example covariance structure thus looks akin to,
K = p ( x ) K ( x , x ) p ( x ) d x d x p ( x ) K ( x , x 0 ) d x p ( x ) K ( x , x 1 ) d x p ( x ) K ( x , x 0 ) d x K ( x 0 , x 0 ) K ( x 1 , x 0 ) p ( x ) K ( x , x 1 ) d x K ( x 1 , x 0 ) K ( x 1 , x 1 )
where p ( x ) is some probability distribution over the domain of x, on which the Gaussian process is defined and against which the quadrature is performed against.
Reiterating the motivation of this work, given two generative distributions p A ( x ) and p B ( x ) which subpopulations A and B of the data are generated from, we wish to constrain the inferred function f ( · ) such that,
p A ( x ) f ( x ) d x = p B ( x ) f ( x ) d x .
This constraint can be rewritten as,
p A ( x ) p B ( x ) f ( x ) d x = 0 ,
which allows us to incorporate the constraint on f ( · ) as an observation in the above Gaussian process. Let q A , B ( x ) = p A ( x ) p B ( x ) be the difference between the generative probability distributions of A and B; then, by setting the corresponding observation as zero, the covariance matrix becomes,
K = q A , B ( x ) K ( x , x ) q A , B ( x ) d x d x q A , B ( x ) K ( x , x 0 ) d x q A , B ( x ) K ( x , x 1 ) d x q A , B ( x ) K ( x , x 0 ) d x K ( x 0 , x 0 ) K ( x 1 , x 0 ) q A , B ( x ) K ( x , x 1 ) d x K ( x 1 , x 0 ) K ( x 1 , x 1 )
We refer to these as equality constrained Gaussian processes. Let us now turn to incorporate these concepts into decision tree regression.

4. Trees as Kernel Regression

Decision tree regression (DTR) and related approaches offer a white box approach for practitioners who wish to use them. These methods are among the most popular methods in machine learning [6] in practice as they are generally intuitive even for those not from statistics, mathematics or computer science background. It is their proliferation, especially in businesses without machine learning researchers, that makes them of particular interest.
DTR regress data by sorting them down binary trees based partitions in the input domain. The trees are created by recursively partitioning the domain of input along axis aligned splits determined by a given metric of the data in each partition, such as information gain or variance reduction. In this work, we do not consider the many possible techniques for learning decision trees, but rather assume that the practitioner has a trained decision tree model. For a more complete description of decision trees, the authors refer the readers to [35].
For the purposes of this work, DTR can be described as a partitioning of space such that predictions are made by averaging the observations in the local partition, referred to as the leaves of the tree. As such, DTR has a very natural formulation as a degenerate kernel whereby,
K ( x i , x j ) = 1 , if L ( x i ) = L ( x j ) 0 , otherwise
where L ( · ) is the index of the leaf in which the argument belongs. The kernel hence becomes naturally block diagonal and the classifier/regressor written as,
f ( x ¯ ) = E [ y ¯ ] = K x ¯ , x K x , x 1 y
with K x ¯ , x denoting the vector of kernel values between x ¯ and the observations, K x , x denoting the covariance matrix of the observations as defined by the implicit decision tree kernel and y denoting the values of the observations.
It is also worth noting how one can also write the decision tree as a two-stage model: first by averaging the observations of associated with each leaf and then by using a diagonal kernel matrix to perform inference. Trivially, the diagonal kernel matrix acts only as a lookup and outputs the leaf average that corresponds to the point being predicted. Let us refer to this compressed kernel matrix approach as the compressed kernel representation and the block diagonal variant as the explicit kernel representation.

5. Fairness Constrained Decision Trees

Borrowing concepts from the previous section on equality constrained Gaussian processes using Bayesian quadrature, decision trees may be constrained in a similar fashion. The first consideration to note is that we wish the constraint observation to act as a hard equality, i.e., noiseless. In contrast, we are willing for the observations to be perturbed in order to satisfy this hard equality constraint. To achieve this, let us add a constant noise term, σ n o i s e 2 , to the diagonals of the decision tree kernel matrix. Similar to ordinary least squares regression, the regressor now minimises the L2-norm of the error induced on the observations, conditioned on the equality constraint, which is noise free. In the explicit kernel representation, this implies the minimum induced noise per observation, whereas in compressed kernel representation this implies the minimum induced noise per leaf.
An important note is that the constraint is applied to the kernel regressor equations, hence the method is exact for regression trees or when the practitioner is concerned with relative outcomes of various predictions. However, in the case that the observations range within [ 0 , 1 ] , as is the case in classification, then we must renormalise the output to [ 0 , 1 ] . This no longer guarantees a minimum L2-norm perturbation and while potentially still useful, is not the focus of this work.
The second consideration is how to determine the generative probability distributions p A ( x ) and p B ( x ) . Given the frequentist nature of decision trees, it makes sense to consider p A ( x ) and p B ( x ) as the empirical distributions of subpopulations A and B, as described in Section 1. Thus, the integral of the empirical distribution on a given leaf, L i p A ( x ) d x , is defined as the proportion of population A observed in the partition associated with leaf L i . We emphasise that how p A ( x ) and p B ( x ) are determined is not the core focus of this work and many approaches have merit. For example, a Gaussian mixture model could be used to model the input distribution, in which case L i p A ( x ) d x would equal the cumulative distribution of the generative PDF over the bounds defined by the leaf. This is demonstrated in the Experimental Section. Many other such models would also be valid and determining which method to use to model the generative distribution is left to the practitioner with domain expertise.

6. Efficient Algorithm For Equality Constrained Decision Trees

At this point, an equality constrained variant of a decision tree has been described, in both explicit representation and compressed representation. In this section, we show that equality constraints on a decision tree do not change the computational or memory order of complexity. The motivation for considering the order of complexities is that decision trees are one of the more scalable machine learning models, whereas kernel methods such as Gaussian processes naively scale at O ( n 3 ) in computation and O ( n 2 ) in memory, where n is the number of observations. While the approach presented in this work utilises concepts from Bayesian quadrature and linearly constrained Gaussian processes, the model’s usefulness would be drastically hindered if it no longer maintained the performance characteristics of the classic decision tree, namely computational cost, and memory requirements.

6.1. Efficiently Constrained Decision Trees in Compressed Kernel Representation

As Figure 1 shows, the compressed kernel representation of the constrained decision tree creates an arrowhead matrix. It is well known that the inverse of an arrowhead matrix is a diagonal matrix with a rank-1 update. Letting D represent the diagonal principal sub-matrix with diagonal elements equal to one, z being vector such that the ith element is equal to the relative difference in generative populations distributions for leaf i, z i = L i ( p A ( x ) p B ( x ) ) d x , then the arrowhead inversion properties state that,
D z z T 0 1 = D 1 0 0 T 0 + ρ u u T ,
with ρ = 1 z T D 1 z and u = D 1 z 1 . Note that the integral of the difference between the two generative distributions when evaluated over the entire domain is equal to zero, as both p A ( x ) and p B ( x ) must sum to one by definition and hence their differences to zero. Returning to the equation of interest, namely f ( x ¯ ) = K x ¯ , x K x , x 1 y with y as the average value of each leaf of the tree, and subbing in K x ¯ , x as a vector of zeros with a one indexing the jth leaf in which the predicted point belongs to and is equal to zero, as it does not contribute to the empirical distributions, we arrive at,
f ( x ¯ ) = 1 1 + σ n 2 y j + z j i z i y i i z i 2 .
The term 1 1 + σ n 2 is the effect of the prior under the Gaussian process perspective; however, by post-multiplying by ( 1 + σ n 2 ) , this prior effect can be removed. While relatively simple to derive, the above equation shows that only an additive update to the predictions is required to ensure group fairness in decision trees. Further, if the same relative population is observed for Group A and Group B on a single leaf j, then z j = 0 and no change is applied to the original inferred prediction before the constraint is applied other than the effect of the noise. In fact, the perturbation to a leaf’s expectation grows linearly with the bias in the population of the leaf.
From an efficiency standpoint, only the difference in generative distributions, z, needs to be stored, which is an additional O ( L ) extra memory requirement and the update per leaf can be pre-computed in O ( L ) . These additional memory and computational requirements are negligible compared to O ( N ) cost of the decision tree itself.

6.2. Efficiently Constrained Decision Trees in Explicit Kernel Representation

Let us now turn our attention to the explicit kernel representation case, where the D in the previous subsection is replaced with the block diagonal matrix equivalent. First, let us state the bordering method, a special case of the block diagonal inversion lemma,
D z z T 0 1 = D 1 ρ D 1 z z T D 1 ρ D 1 z ρ z T D 1 ρ .
with ρ = 1 z T D 1 z once again. Substituting this into the kernel regression equation once more, we find,
f ( x ¯ ) = I j 0 D z z T 0 1 y 0 = I j 0 D 1 ρ D 1 z z T D 1 ρ D 1 z ρ z T D 1 ρ y 0
where I j denotes a vector of zeros with ones placed in all elements relating to observations in the same leaf. Expanding the above linear algebra,
f ( x ¯ ) = I j D 1 y + ρ I j D 1 z z T D 1 y .
As D is a block-diagonal matrix, it is straight forward to show ρ = j L m j z j 2 m j + σ n 2 1 where j is iterating over the set of leaves. Note that, when m j = 1 for all j, we arrive at the same value for ρ as we did in the previous subsection. We can continue to apply this result to the other terms of interest,
X 1 = I j D 1 y = m j y j m j + σ n 2 X 2 = I j D 1 z = m j z j m j + σ j 2 X 3 = z T D 1 y = j L m j z j y j m j + σ n 2
where y j is once again the average output observation over leaf j. The terms have been labelled X 1 , X 2 and X 3 for shorthand. The computation time for the three terms, along with ρ , can be computed in linear time with respect to the size of the data, O ( n ) , and can be pre-computed ahead of time, hence not affect the computational complexity of a standard decision tree. Once again, only z j and m j have to be stored for each leaf and hence the additional memory cost is only O ( L ) . As such, we can simplify the full expression for the expected outcome as,
f ( x ¯ ) = X 1 + ρ X 2 X 3 .

6.3. Expected Perturbation Bounds

In imposing equality constraints on the models, the inferred outputs become perturbed. In this section, the expected magnitude of the perturbation is analysed for the compressed kernel representation. We define the perturbation due to the equality constraint, not due to the incorporation of the noise, as,
ϵ = z j i z i y i i z i 2 .
Theorem 1.
Given a decision tree with L leaves, with expected value of leaf observations denoted by the vector y R L normalised to have zero mean and unit variance and leaf frequency imbalance denoted as z R L , the expected variance induced by the perturbation due to the incorporating a Group Fairness in Expectation constraint is bounded by,
E [ ϵ 2 ] 1 L
Proof. 
As the expectation of z j is zero due to it being the difference of two probability distributions, the variance is equal to the expectation of ϵ 2 ,
E [ ϵ 2 ] = 1 L j = 1 L z j 2 ( i z i y i ) 2 ( i z i 2 ) 2 = 1 L z 1 2 z 2 2 ( z ¯ T y ) 2 z 2 4
with z ¯ equal to z after normalisation. By Lemma 1, the expectation of the dot product ( z ¯ T y ) 2 is equal to 1 L . Further, the 2-norm of z can be cancelled from the numerator and denominator. Finally, using the L 1 , L 2 norm inequality, z 2 z 1 L z 2 , we can then tightly bound the worst case introduced variance as,
E [ ϵ 2 ] = 1 L 2 z 1 2 z 2 2 1 L
Lemma 1.
Given two vectors y , z ¯ uniformly distributed on the unit hypersphere S L 1 , the expectation of their dot product is zero and variance,
E [ ( z ¯ T y ) 2 ] = 1 L .
Proof. 
As the inner product is rotation invariant when applied to both z ¯ and y, let us denote the vector z ¯ as [ 1 , 0 , , 0 ] without loss of generality. The first element of the vector y, denoted by y 0 , is thus equal to z ¯ T y . The probability density mass of the random variable y 0 is proportional to the surface area lying at a height between y 0 and y 0 + d y 0 on the unit hypersphere. That proportion occurs within a belt of height d y 0 and radius 1 y 0 2 , which is a conical frustum constructed out of an S L 2 of radius 1 y 0 2 , of height d y 0 , and slope 1 1 y 0 2 . Hence, the probability is proportional to,
P ( y 0 ) ( 1 y 0 2 ) D 2 1 y 0 2 d y 0 = ( 1 y 0 2 ) L 3 2
Substituting u = y 0 + 1 2 . we find that,
P ( u ) d u 1 ( 2 u 1 ) 2 L 3 2 d ( 2 u 1 ) = 2 L 2 ( u u 2 ) L 3 2 d u = 2 L 2 u L 1 2 1 ( u 1 ) L 1 2 1 d u .
Note that this last simplification of P ( u ) is equal to the probability density function of the Beta distribution with both shape parameters equal α = β = L 1 2 . The variance of the Beta distribution is,
α β ( α + β ) 2 ( α + β + 1 ) = 1 4 L .
Rescaling to find the variance of y 0 , we arrive at 1 L . As the expectation of E [ z ¯ T y ] = 0 due to the properties of symmetry, E [ ( z ¯ T y ) 2 ] = 1 L .
This is an interesting result as it implies that, if the model is not exploiting biases in the generative distribution evenly across all of the leaves of the tree, i.e., z 1 = L z 2 , then the resulting predictions receive the greatest expected absolute perturbation when averaged over all possible y.
For the explicit kernel representation, the expected absolute perturbation bound can be analysed whereby each leaf holds an even number of observations. In such a scenario, m i = m is equal for all leaves i 1 , , L . Substituting this into the equations for ρ , X 2 and X 3 , we can find that the bounded expected perturbation is equal to,
E [ ϵ 2 ] σ n 2 m + σ n 2 2 1 L
For the sake of conciseness, the full derivation of the above is left to the reader but follows the same steps as the compressed kernel representation.

7. Combinations of Fair Trees

While it is intuitive to say that ensembles of trees with GFE constraints preserve the GFE constraint, for the sake of completeness, this is now shown more formally. Random forests [36], extremely random trees (ExtraTrees) [37] and tree bagging models [38] combine tree models by averaging over their predictions. Denoting the predictions of the trees at point x as f i ( x ) for each i 1 , , T , where T is the number of trees, we can easily show that the combined difference in expectation marginalised over the space is equal to zero,
0 = ( p A ( x ) p B ( x ) ) i = 1 T f i ( x ) d x = i = 1 T ( p A ( x ) p B ( x ) ) f i ( x ) d x = i = 1 T 0 .
It can also be easily shown that modelling residual errors of the trees with other fair trees, such as is the case for boosted tree models [39], also results in fair predictors. These concepts are not limited to tree methods either and the core concepts set out in this paper of constraining kernel matrices can have applications in models such as deep Gaussian process models [40].

8. Experiments

8.1. Synthetic Demonstration

The first experiment was a visual demonstration to better communicate the validity of the approach. The models examined are ExtraTrees, Gaussian processes and a single hidden layer perceptron. They endeavour to model an analytic function, f ( x ) = x cos ( α x 2 ) + sin ( β x ) , with observations drawn from two beta distributions, p A ( x ) and p B ( x ) , respectively. The parameters of the two beta distribution are presented in Table 2. Figure 2 shows the effect of perturbing the models using the approach presented to constrain the expected means of the two populations. The figure shows the greater is the disparity between p A ( x ) and p B ( x ) , the greater is the perturbation in the inferred function. Both the compressed and explicit kernel representation lead to very similar plots for the tree-based models, thus only the compressed kernel representation algorithm has been shown for conciseness. Note, in the case of the ExtraTrees model, each tree was individually perturbed before being combined. Further, in the case of the perceptron, a GMM was fit to the data in the inferred latent space rather than in the original input space.
A downside to group fairness algorithms more generally, as pointed out in [7], is that candidate systems which impose group fairness can lead to qualified candidates being discriminated against. This can be visually verified as the perturbation pushes down the outcome of many orange points below the total population mean in order to satisfy the constraint. By choosing to incorporate group fairness constraints, the practitioner should be aware of these tradeoffs.

8.2. ProPublica Dataset—Racial Biases

Across the USA, judges, and probation and parole officers are increasingly using algorithms to aid in their decision making. The ProPublica dataset (https://www.propublica.org/datastore/dataset/compas-recidivism-risk-score-data-and-analysis) contains data about criminal defendants from Florida in the United States. It is the Correctional Offender Management Profiling for Alternative Sanctions (COMPAS) algorithm [41], which is often used by judges to estimate the probability that a defendant will be a recidivist, a term used to describe re-offenders. However, the algorithm is said to be racially biased against African Americans [42]. To highlight the proposed algorithm, we first endeavoured to use a random forest to approximate the decile scoring of the COMPAS algorithm and then perturbed each tree to remove any racial bias from the system.
The two subpopulations we considered constraining are thus African American and non-African American. We encode the COMPAS algorithms decile score into an integer between zero and ten such that minimising L 2 perturbation is an appropriate objective function. The fact the decile scores are bounded in [ 0 , 10 ] was not taken into account. The random forest used 20 decision trees as base estimators and the explicit kernel representation version of the algorithm was used for the sake of demonstrative purposes.
Figure 3 presents the marginal distribution of predictions on a 20% held out test set before and after the GFE constraint was applied. It is visible that both the expected outcome for African Americans is decreased and for non-African Americans is increased. Notice that, while the means are equal, the structure of the two of distributions are quite different, indicating that GFE constraints still allow greater flexibility than more strict group fairness such as that described in Section 1. The root square difference between the predicted points before and after perturbation was 0.8. Importantly, the GFE constraint described in this work was verified numerically with the average outputs recorded as shown in Table 3.

8.3. Intersectionality: Illinois State Employee Salaries

The Illinois state employee salaries (https://data.illinois.gov/datastore/dump/1a0cd05c-7d17-4e3d-938d-c2bfa2a4a0b1) since 2011 can be seen to have a gender bias and bias between veterans and non-veterans. The motivation of this experiment was to show how we can deal with intersectionality issues (multiple compounding constraints) such as if one wished to predict a fair salary for future employees based on current staff. Gender labels were inferred using the employees’ first names, parsed through the gender-geusser Python library. GFE constraints were applied between all intersections of gender and veteran/non-veterans, the marginals of gender and the marginals of veteran/non-veterans. Figure 4 visualises the perturbations to the marginals of each demographic intersection due to the GFE constraints. The train–test split was set as 80–20% and the incorporation of the GFE constraints increase the root mean squared error from $12,086 to $12,772, the cost of fairness. The only difference to allow for intersectionality is the z is no longer a vector, but rather a matrix with a column for each constraint. Thus,
f ( x ¯ ) = y j + z j ( z T z ) 1 z T y .

9. Conclusions

This work offers an easily implementable approach to constrain the means of kernel regression, which has direct applicability to decision tree regression, Gaussian process regression, neural network regression, random forest regression, boosted trees and other tree-based ensemble models.
References

Author Contributions

Conceptualisation, J.F. and A.A.A.; Methodology, J.F.; Software, J.F.; Supervision, M.O. and S.R.; Visualisation, J.F.; Writing—original draft, J.F.; and Writing—review and editing, M.O. and S.R.

Funding

S.R. would like to thank the UK Royal Academy of Engineering and the Oxford-Man Institute of Quantitive Finance.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. The Executive Office of the President of the United States; Podesta, J. Big Data: Seizing Opportunities, Preserving Values; White House, Executive Office of the President: Washington, DC, USA, 2014.
  2. Gajane, P. On formalizing fairness in prediction with machine learning. arXiv 2017, arXiv:1710.03184. [Google Scholar]
  3. Weisskopf, T.E. Affirmative action in the United States and India. In A Comparative Perspective; Routledge: London, UK; New York, NY, USA, 2004. [Google Scholar]
  4. Dumont, L. Homo Hierarchicus: The Caste System and Its Implications; University of Chicago Press: Chicago, IL, USA, 1980. [Google Scholar]
  5. Deshpande, A. Affirmative action in India. In Race and Inequality; Routledge: Abingdon-on-Thames, UK, 2017; pp. 77–90. [Google Scholar]
  6. Wu, X.; Kumar, V.; Quinlan, J.R.; Ghosh, J.; Yang, Q.; Motoda, H.; McLachlan, G.J.; Ng, A.; Liu, B.; Philip, S.Y.; et al. Top 10 algorithms in data mining. Knowl. Inf. Syst. 2008, 14, 1–37. [Google Scholar] [CrossRef]
  7. Luong, B.T.; Ruggieri, S.; Turini, F. k-NN as an implementation of situation testing for discrimination discovery and prevention. In Proceedings of the 17th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Diego, CA, USA, 21–24 August 2011; pp. 502–510. [Google Scholar]
  8. Kamiran, F.; Calders, T. Classifying without discriminating. In Proceedings of the 2009 2nd International Conference on Computer, Control and Communication, Karachi, Pakistan, 17–18 February 2009; pp. 1–6. [Google Scholar]
  9. Kamishima, T.; Akaho, S.; Sakuma, J. Fairness-aware learning through regularization approach. In Proceedings of the 2011 IEEE 11th International Conference on Data Mining Workshops, Vancouver, BC, Canada, 11 December 2011; pp. 643–650. [Google Scholar]
  10. Berk, R.; Heidari, H.; Jabbari, S.; Joseph, M.; Kearns, M.; Morgenstern, J.; Neel, S.; Roth, A. A convex framework for fair regression. arXiv 2017, arXiv:1706.02409. [Google Scholar]
  11. Calders, T.; Karim, A.; Kamiran, F.; Ali, W.; Zhang, X. Controlling attribute effect in linear regression. In Proceedings of the 2013 IEEE 13th International Conference on Data Mining, Dallas, TX, USA, 7–10 December 2013; pp. 71–80. [Google Scholar]
  12. Calders, T.; Verwer, S. Three naive Bayes approaches for discrimination-free classification. Data Min. Knowl. Discov. 2010, 21, 277–292. [Google Scholar] [CrossRef] [Green Version]
  13. Raff, E.; Sylvester, J.; Mills, S. Fair Forests: Regularized Tree Induction to Minimize Model Bias. arXiv 2017, arXiv:1712.08197. [Google Scholar]
  14. Kamiran, F.; Karim, A.; Zhang, X. Decision theory for discrimination-aware classification. In Proceedings of the 2012 IEEE 12th International Conference on Data Mining, Brussels, Belgium, 10–13 December 2012; pp. 924–929. [Google Scholar]
  15. Pleiss, G.; Raghavan, M.; Wu, F.; Kleinberg, J.; Weinberger, K.Q. On fairness and calibration. In Proceedings of the Advances in Neural Information Processing Systems, Long Beach, CA, USA, 4–9 December 2017; pp. 5680–5689. [Google Scholar]
  16. Kleinberg, J.; Ludwig, J.; Mullainathan, S.; Rambachan, A. Algorithmic fairness. Am. Econ. Assoc. Pap. Proc. 2018, 108, 22–27. [Google Scholar] [CrossRef]
  17. Dwork, C.; Hardt, M.; Pitassi, T.; Reingold, O.; Zemel, R. Fairness through awareness. In Proceedings of the 3rd Innovations in Theoretical Computer Science Conference, Cambridge, MA, USA, 8–10 January 2012; pp. 214–226. [Google Scholar]
  18. Kilbertus, N.; Carulla, M.R.; Parascandolo, G.; Hardt, M.; Janzing, D.; Schölkopf, B. Avoiding discrimination through causal reasoning. In Proceedings of the Advances in Neural Information Processing Systems, Long Beach, CA, USA, 4–9 December 2017; pp. 656–666. [Google Scholar]
  19. Kusner, M.J.; Loftus, J.; Russell, C.; Silva, R. Counterfactual fairness. In Proceedings of the Advances in Neural Information Processing Systems, Long Beach, CA, USA, 4–9 December 2017; pp. 4066–4076. [Google Scholar]
  20. Kilbertus, N.; Ball, P.J.; Kusner, M.J.; Weller, A.; Silva, R. The Sensitivity of Counterfactual Fairness to Unmeasured Confounding. arXiv 2019, arXiv:1907.01040. [Google Scholar]
  21. Zafar, M.B.; Valera, I.; Rodriguez, M.; Gummadi, K.; Weller, A. From parity to preference-based notions of fairness in classification. In Proceedings of the Advances in Neural Information Processing Systems, Long Beach, CA, USA, 4–9 December 2017; pp. 229–239. [Google Scholar]
  22. Dwork, C.; Immorlica, N.; Kalai, A.T.; Leiserson, M. Decoupled classifiers for group-fair and efficient machine learning. In Proceedings of the Conference on Fairness, Accountability and Transparency, New York, NY, USA, 23–24 February 2018; pp. 119–133. [Google Scholar]
  23. Donini, M.; Oneto, L.; Ben-David, S.; Shawe-Taylor, J.S.; Pontil, M. Empirical risk minimization under fairness constraints. In Proceedings of the Advances in Neural Information Processing Systems, Montreal, QC, Canada, 3–8 December 2018; pp. 2791–2801. [Google Scholar]
  24. Raff, E.; Sylvester, J.; Mills, S. Fair forests: Regularized tree induction to minimize model bias. In Proceedings of the 2018 AAAI/ACM Conference on AI, Ethics, and Society, New Orleans, LA, USA, 13 February 2018; pp. 243–250. [Google Scholar]
  25. Balcan, M.F.; Dick, T.; Noothigattu, R.; Procaccia, A.D. Envy-Free Classification. arXiv 2018, arXiv:1809.08700. [Google Scholar]
  26. Joseph, M.; Kearns, M.; Morgenstern, J.; Neel, S.; Roth, A. Rawlsian fairness for machine learning. arXiv 2016, arXiv:1610.09559. [Google Scholar]
  27. Bechavod, Y.; Ligett, K.; Roth, A.; Waggoner, B.; Wu, Z.S. Equal Opportunity in Online Classification with Partial Feedback. arXiv 2019, arXiv:1902.02242. [Google Scholar]
  28. Hardt, M.; Price, E.; Srebro, N. Equality of opportunity in supervised learning. In Proceedings of the Advances in Neural Information Processing Systems, Barcelona, Spain, 5–10 December 2016; pp. 3315–3323. [Google Scholar]
  29. Zafar, M.B.; Valera, I.; Gomez Rodriguez, M.; Gummadi, K.P. Fairness beyond disparate treatment & disparate impact: Learning classification without disparate mistreatment. In Proceedings of the 26th International Conference on World Wide Web, Perth, Australia, 3–7 April 2017; pp. 1171–1180. [Google Scholar]
  30. Kamiran, F.; Calders, T.; Pechenizkiy, M. Discrimination aware decision tree learning. In Proceedings of the 2010 IEEE International Conference on Data Mining, Sydney, NSW, Australia, 13–17 December 2010; pp. 869–874. [Google Scholar]
  31. Jidling, C.; Wahlström, N.; Wills, A.; Schön, T.B. Linearly constrained Gaussian processes. In Proceedings of the Advances in Neural Information Processing Systems, Long Beach, CA, USA, 4–9 December 2017; pp. 1215–1224. [Google Scholar]
  32. Rasmussen, C.E. Gaussian processes in machine learning. In Advanced Lectures on Machine Learning; Springer: Berlin, Germany, 2004; pp. 63–71. [Google Scholar]
  33. O’Hagan, A. Bayes-Hermite quadrature. J. Stat. Plan. Inference 1991, 29, 245–260. [Google Scholar] [CrossRef]
  34. Osborne, M.; Garnett, R.; Ghahramani, Z.; Duvenaud, D.K.; Roberts, S.J.; Rasmussen, C.E. Active learning of model evidence using Bayesian quadrature. In Proceedings of the Advances in Neural Information Processing Systems, Lake Tahoe, NV, USA, 3–6 December 2012; pp. 46–54. [Google Scholar]
  35. Rokach, L.; Maimon, O.Z. Data Mining with Decision Trees: Theory and Applications; World Scientific: Singapore, 2008; Volume 69. [Google Scholar]
  36. Breiman, L. Random forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef]
  37. Geurts, P.; Ernst, D.; Wehenkel, L. Extremely randomized trees. Mach. Learn. 2006, 63, 3–42. [Google Scholar] [CrossRef] [Green Version]
  38. Breiman, L. Bagging predictors. Mach. Learn. 1996, 24, 123–140. [Google Scholar] [CrossRef] [Green Version]
  39. Elith, J.; Leathwick, J.R.; Hastie, T. A working guide to boosted regression trees. J. Anim. Ecol. 2008, 77, 802–813. [Google Scholar] [CrossRef] [PubMed]
  40. Damianou, A.; Lawrence, N. Deep Gaussian processes. In Proceedings of the Artificial Intelligence and Statistics, Scottsdale, AZ, USA, 29 April–1 May 2013; pp. 207–215. [Google Scholar]
  41. Dieterich, W.; Mendoza, C.; Brennan, T. COMPAS Risk Scales: Demonstrating Accuracy Equity and Predictive Parity; Northpoint Inc.: Santa Maria, Philippines, 2016. [Google Scholar]
  42. Dressel, J.; Farid, H. The accuracy, fairness, and limits of predicting recidivism. Sci. Adv. 2018, 4, eaao5580. [Google Scholar] [CrossRef] [PubMed] [Green Version]
Figure 1. This is a visualisation of a decision tree kernel matrix with marginal constraint, left in explicit representation and right in compressed representation. The dark cell in the upper left of the matrix is the double integrated kernel function with respect to the difference of input distributions, which constrain the process. The solid grey row and column are single integrals of the kernel function. White cells have zero values and the dashed (block) diagonals are the kernel matrix between observations or leaves of the tree. We can note that the above, compressed representation kernel matrix is an arrowhead matrix, which we exploit to create an efficient algorithm.
Figure 1. This is a visualisation of a decision tree kernel matrix with marginal constraint, left in explicit representation and right in compressed representation. The dark cell in the upper left of the matrix is the double integrated kernel function with respect to the difference of input distributions, which constrain the process. The solid grey row and column are single integrals of the kernel function. White cells have zero values and the dashed (block) diagonals are the kernel matrix between observations or leaves of the tree. We can note that the above, compressed representation kernel matrix is an arrowhead matrix, which we exploit to create an efficient algorithm.
Entropy 21 00741 g001
Figure 2. The figure shows synthetic data of two populations, p A ( x ) (blue) and p B ( x ) (orange). The main plots show the observations and the perturbation to the respective models. Purple functions identify the original inferred functions and green indicates the fair perturbed inferred functions. Below, the main plots show a normalised histogram of the observations for the p A ( x ) and p B ( x ) populations, respectively, along with the PDF of the Gaussian mixture model of their respective densities. To the right shows how the expected mean of the two populations have been perturbed to be equal.
Figure 2. The figure shows synthetic data of two populations, p A ( x ) (blue) and p B ( x ) (orange). The main plots show the observations and the perturbation to the respective models. Purple functions identify the original inferred functions and green indicates the fair perturbed inferred functions. Below, the main plots show a normalised histogram of the observations for the p A ( x ) and p B ( x ) populations, respectively, along with the PDF of the Gaussian mixture model of their respective densities. To the right shows how the expected mean of the two populations have been perturbed to be equal.
Entropy 21 00741 g002
Figure 3. The figure shows the output distribution of decile scores for African Americans and non-African Americans before (blue) and after (orange) the mean equality constraint was applied. We can see that the respective means (vertical lines) become approximately equal after the inclusion of the constraint using the empirical input distribution.
Figure 3. The figure shows the output distribution of decile scores for African Americans and non-African Americans before (blue) and after (orange) the mean equality constraint was applied. We can see that the respective means (vertical lines) become approximately equal after the inclusion of the constraint using the empirical input distribution.
Entropy 21 00741 g003
Figure 4. The above figure shows the effect of multiple GFE constraints acting on a single regression task. Blue signifies the original model and orange the perturbed model. The dashed horizontal lines signify the mean before and after perturbation.
Figure 4. The above figure shows the effect of multiple GFE constraints acting on a single regression task. Blue signifies the original model and orange the perturbed model. The dashed horizontal lines signify the mean before and after perturbation.
Entropy 21 00741 g004
Table 1. This table is amended from [2], highlighting some of the major contribution currently in the domain of fairness in machine learning. Parity versus preference refers to whether fairness means achieving equality or satisfying the preferences. Treatment versus impact refers to whether fairness is to be maintained in treatment or process of the learning algorithm or resulting output of the system. To the best of the authors knowledge, this work is the first group fair framework for regression problems.
Table 1. This table is amended from [2], highlighting some of the major contribution currently in the domain of fairness in machine learning. Parity versus preference refers to whether fairness means achieving equality or satisfying the preferences. Treatment versus impact refers to whether fairness is to be maintained in treatment or process of the learning algorithm or resulting output of the system. To the best of the authors knowledge, this work is the first group fair framework for regression problems.
Parity Preference
TreatmentUnawarenessCounterfactualPreferred Treatment
[7,17][18,19,20][21]
OutcomeGroup FairnessIndividual FairnessPreferred Impact
[22,23,24][7,10,17][21,25]
Equal Opportunity
[26,27,28,29]
Table 2. Parameters of Beta distributions used to create synthetic samples.
Table 2. Parameters of Beta distributions used to create synthetic samples.
Group p A ( x ) p B ( x )
α 23
β 32
Table 3. Mean score before and after GFE perturbation.
Table 3. Mean score before and after GFE perturbation.
UnconstrainedConstrained
African Am.4.824.41
non-African Am.3.264.41

Share and Cite

MDPI and ACS Style

Fitzsimons, J.; Al Ali, A.; Osborne, M.; Roberts, S. A General Framework for Fair Regression. Entropy 2019, 21, 741. https://doi.org/10.3390/e21080741

AMA Style

Fitzsimons J, Al Ali A, Osborne M, Roberts S. A General Framework for Fair Regression. Entropy. 2019; 21(8):741. https://doi.org/10.3390/e21080741

Chicago/Turabian Style

Fitzsimons, Jack, AbdulRahman Al Ali, Michael Osborne, and Stephen Roberts. 2019. "A General Framework for Fair Regression" Entropy 21, no. 8: 741. https://doi.org/10.3390/e21080741

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop