MODEL AGNOSTIC FEATURE SELECTION FOR FAIRNESS MODEL AGNOSTIC FEATURE SELECTION FOR FAIRNESS

The study aims to introduce a model agnostic, filter based framework for fair feature selection. While in the field of fairness, numerous models have been deployed to achieve fair and unbiased results but questions that arise are (i) How often the tasks are designed in association with fairness concepts? (ii) How often we check for dependency between protected attributes (also known as sensitive attributes; e.g. race, age, sex etc.) and other features in the data to assess fairness instead of employing an algorithm right away? (iii) How often we use a framework that yields a fair set of features? An obvious answer could be that fairness techniques and fairness criteria are not yet central to the industrial work and we tend to substitute temporary solutions for the sake of attaining accuracy in the results. Another reason could be that the classifier-independent methodologies are not available explicitly as an implementable solution in a straightforward setting. Fair ML is a field concerned with making data and prediction fair but comes with some level of trade-off between accuracy and fairness. Fairness is a subjective concept and has diverse definitions associated to it, it also depends on different scenarios concerning an individual or a group. The majority of technical fairness interventions are algorithmic, which makes them computationally expensive and complex to implement. Our goal is to answer the questions mentioned above by developing a model-agnostic, fast, and easily implementable feature selection framework based on task level formulations using information theory. This feature selection technique will focus on selecting a subset of features based on the reliance of protected attributes (race, sex, age etc.) on other random variables present in the data and maximal dependency of features with the target.

Disparate impact versus accuracy for adult reconstruction with varying. We can observe that disparate impact changes with changing y threshold for each protected attribute. . . . . . . . . 32 10 Statistical Parity versus accuracy for adult reconstruction with varying y threshold. We can observe that Statistical Parity changes with changing y threshold for each protected attribute. 33 11 Equal opportunity versus accuracy for adult reconstruction with varying y threshold. We can observe that Equal opportunity changes with changing y threshold for each protected attribute. 34 Table  Page 1 List of benchmark dataset used for evaluating the framework . . 18 2 I(X; A) and I(X; Y ) are scores for Adult Data between the features and demographic attributes and features and proxy target. Y column is the target, income-per-year = income [1]. Scores in bold are the cases where MI scores for I(X; Y ) are greater than I(X; A

Literature Review
Machine learning algorithms form the core of decision making processes and have wide range of usage in areas like -healthcare, banking, criminal justice, etc.
Most algorithms do not have explicit bias correction mechanism in the training process which does not get rid of pre-existing biases in data. Algorithms have been shown to amplify existing biases due to placed restrictions hence does not prevent the model from predictions against an individual or a certain group in the society. Feature selection focuses on selecting appropriate set of features based on statistical insights and is a common early step in analyses of any tabular data.
Feature selection techniques are readily used in case of high dimensional data for selecting best subset of features which can define the data rightly [7,8]. An important measure in Information theory is Mutual information (MI). We have used MI as base for measuring the relevance of features and by classifying each protected attributes(like race, age etc) as demographic variables, we have examined and evaluated task formulations which can help in mitigating biases in terms of protected classes, hence supporting the core objective of selecting suitable and fair subset of features.
Our framework formulation is based on fairness criteria for feature selection using mutual information approach. Elements in data are often influenced by societal structure or can be wrongly labeled, e.t.c resulting in discriminatory results.
Discriminatory or biased results are the cause of imbalanced data. To describe the issue in layman term, an individual can be biased as everyone is entitled to hold an opinion but machines should not be biased and hence, we should work on ethical stability of data before modeling it. We therefore have tried building a framework that is based on the concept of fairness criteria and mutual dependency between features, target and demographic attributes to analyze the biases existing in data and extracting only suitable and fair features. We have discussed the overview of concept being used and how our approach compares to other existing methods in sections below.

Mutual Information
Feature selection technique is based on Mutual information (MI) which is the concept of information theoretic framework. MI measures the degree of dependency between two random variables. If the value of a random variable is known, there is some reduction in uncertainty for predicting the value of another variable and MI measures such reduction in uncertainty. MI quantifies the reliance between two random features in categorical and continuous setting. If X and Y are two random variables, MI guides in understanding the distribution of X if the distribution of Y is known. If the features are independent, their MI score is zero. A feature has a maximal MI score with itself. MI between two random variable X and Y is written as I(X, Y ). In terms of discrete distribution, MI is formulated as: where p(x, y) is the joint probability distribution and p(x), p(y) are marginal probability distributions for two random variables X and Y .
MI and Entropy are related terminologies. Entropy is defined as an ideal measure of uncertainty and is also known as the information contained in a random variable. MI in terms of entropy is formulated as: where H(X, Y ) is the joint entropy and H(X|Y ) and H(Y |X) are conditional entropies. H(X, Y ) in terms of MI can be expressed as: Figure 1: Venn diagram of relation between Mutual Information and Entropy

Feature Selection
Feature selection is the process of selecting minimal sized features from the data. Feature selection has many advantages in current time especially when data is growing rapidly.
• Removal of irrelevant features, there exist features which might not have any relation with the proxy target (ground truth), using such attributes affects the performance of an algorithm or models being used.
• High dimensional data, When we train a model using bunch of features from a high dimensional data, the algorithm might not learn to predict, what it has been explicitly designed for.
• Explainability and Interpretability, these are the two important factors that contribute in understanding of the model results.
• Time and Cost effective, feature selection provides efficiency in terms of time and cost.
Feature selection techniques can be grouped into two categories -1. classifier dependent [8] 2. classifier independent [8] Classifier dependent techniques include wrapper and embedded methods. Wrapper

Fair ML
Fair ML is a field concerned with maintaining social fairness in terms of balancing demographic equality, equal opportunity e.t.c [2]. If a task in ML is designed in association with demographic attributes (race, gender, age, e.t.c), Fair ML identifies such task as discriminatory. As the impacts of ML algorithms are of public interest, much of the work discovering, and detailing the biases in ML come from outside of research. Journalists [5], and social scientists have detailed with qualitative techniques. [9], book by Cathy O'Neil reveals in greater detail, how social fairness is being threatened by growing data and mathematical models. An article [10] highlights how Amazon's Face Recognition deceitfully matched 28 Members of Congress (people of color) with people who were arrested for a crime. AI scientists and philosophers in [11], have elaborated about the issues around moral status of machines. It clearly reveals that technology is failing to sustain social fairness and under the bounds of Fair ML we must try to deploy algorithms based on fairness criteria to prevent discrimination's and mitigate any harms that an algorithm can cause [12].
fairness criteria are the statistical representations in terms of random variables outlining the decision making scenario [2]. Below are the three non-discrimination fairness criteria and variables can be read as, R Prediction, Y Target and A Demographic group.
1. Independence : R ⊥ A, Independence is satisfied if demographic group is statistically independent of the prediction.
2. Separation : R ⊥ A|Y , Separation is satisfied if the demographic group is statistically independent of prediction given the target.
3. Sufficiency : Y ⊥ A|R, Sufficiency is satisfied if the demographic group is statistically independent of target given the prediction.
Designing a task before fitting a model is a normalized action but evaluating and analyzing the fairness quotient of data being used is still not an essential step. [1] details about the task level fairness by providing formulations based on three important fairness criteria i.e. Independence, Sufficiency and Separation. [1] provides task formulations that can be used to analyze data prior to fitting a model. It also guides model-builders to formulate their tasks in different ways to access and compare relationships between target and features. Purpose behind task level formulations is to access the data early in stage to understand the existing biases and manage the harms it may cause.
The informative beyond demographic criteria in task formulation from [1] states that information between data and target should be greater than information between data and protected attributes.
where A is the demographic features (sensitive attributes -age, race, gender) and Y is the proxy target.
Following 5, we came up with feature selection techniques for fairness by evaluating three different ways 3 to extract features to improve fairness metrics and accuracy of the model.
Fairness in machine learning focuses on mitigating disparities across social groups [2]. A model is considered fair if errors are distributed uniformly across protected classes.
While many metrics exist, we have focused our study on the following metrics.
Variables used below can be read as,ŷ, ideal outcome(predictions), y, ground truth (proxy target) and A ∈ (0, 1) is representation for unprivileged and privileged demographic group respectively.
1. Disparate Impact -DI is part of Independence. It is ratio of the probability of favorable outcomes between the unprivileged and privileged groups.
Let's consider two groups 1 and 0. We are assuming 1 is an advantaged group and 0 is a disadvantaged group, now a hiring manager is asked to hire a few candidates for a job from both group 1 and 0, Hence in order to have balance, disparate impact in this case can be represented as 2. Statistical Parity -Also sometimes referred as demographic parity and is part of Independence. It is the difference in the probability of favorable outcomes between the unprivileged and privileged groups. Considering same scenario as above, SP = p2 − p1. No discrimination in terms of SP would have a score of perfect 0, but since it's difficult to completely remove biases, we are trying to mitigate the extent of Bias, hence we can consider a score close to 0 as an improved score.
3. Equal opportunity difference -EOD is another fairness metric which falls in Separation and is defined as the difference between true positive rates between the unprivileged and privileged groups. Equal opportunity states that each group 1 and 0 (from above) should have true positives at equal rates.

Related Fair Feature Selection Techniques
Previous works in the field of fair feature selection based on information theoretic measures are referenced as following. [7], evaluates correlation between features by following bi-variate decomposition of mutual information for fairness, which uses a fairness-utility score for demographic attributes for removing features with high discriminatory and low accuracy impacts. [13] proposes an information theory framework for fairness, which is focused on compressing demographic features and converting into a decontaminated auxiliary feature for maximal mutual information with target. [14] works on identifying new features using transformations which can be further integrated with original training data for mitigating biases. [15] discusses about fairness based on moral sense of decision making process regarding feature selection and further evaluates the trade-off between accuracy and fairness. [16] is another work in similar domain which proposes robust sub-modular maximization problem, that works in greedy way to delete protected attributes.
Feature selection framework introduced in the study differs from existing tech-niques, it is a filter based model agnostic approach built on information theoretic measures. We use mutual information (MI) as base for understanding the underlying similarity between the distribution of features to minimize the MI between A and X, and maximize the MI between X and Y .

CHAPTER 3 Feature Selection Techniques
This chapter elaborates the three feature selection techniques for fairness.
Each criteria follows variable notations, X (all features), A (demographic attributes) and Y (target). X includes all the features present in the data except demographic attributes (race, gender, age, e.t.c) whereas A includes all the demographic attributes. Y includes the proxy target.
With an understanding that if MI score between X and A is greater than X and Y , it may result in unfair outcome. A attributes are features that describe characteristics of a human-being and any algorithm that learns such characteristics might get influenced and would not perform neutrally.
We are aiming to find relevant and fair subset represented by {i}Ā using below mentioned criteria and if {i}Ā remains empty, then the task, as defined, can be termed as discriminatory and either should be fully abandoned or additional data is required. If there are features that are more informative about the task than the Y proxy target, then we can consider in greater detail. The three feature selection techniques we employed for fair feature selection follows the concept of making relation between features and target independent of protected attributes and hence falls under Independence fairness criteria.

Non-demographic Task Relevance
We started by first examining non-demographic features that are highly related with target, creating a subspace for all the Non-demographic relevant features denoted by iĀ. In order to create the subspace we assessed the X (features) with higher scores with Y and minimal score with A i.e. (I(X, Y ) and (I(X, A) using equation (6) to maximize the gap. Features that reveal more information about target compared to demographics, can be defined as: Attributes in data are often related to demographic features for example, if an arbitrary data has features like area, id, race, age, wage, interest, education, e.t.c, area may often provide information about race or wage may often provide information about age, hence the intent behind proposing (6) was to design a formulation to segregate features that reveal maximum information about the target and at the same time reveals minimal information about demographics. The formulation assisted in populating iĀ with features that maintained high dependency with target than the demographic attributes.

Minimally Demographic-Informative Subspace
We formulated second fair feature selection task formulation as first learning a demographic subspace, a set of features that are more informative about demographics than the target variable.
Formally, the demographic subspace is a set of features, X A for which the mutual information between (I(X A , A) is greater than or equal to I(X A , Y ). Main objective behind designing such formulation is to assess X features, that are highly correlated with A and should not be considered while evaluating the framework.
Presence of any such X A features may result in biased assessment.
All sets of features that are more informative about demographics than the proxy target can be defined as: and {i}Ā to the the complement.
Determining the demographic subspace X A is the main object of this criteria.
We designed following technique to build this subspace.
Maximally demographically-informative subset track A variables having maximal score with X features.
Further eliminating i A from X using sequential forward and backward feature selection approach but using custom made estimator object built for scoring based on mutual information between features, yielding iĀ as an appropriate and fair subspace of features to be used.

Maximally Predictive, Minimally Demographic
In the third approach, we designed a concept inspired by the Maximum Relevance and Minimum Redundancy (MRMR) which we named Maximally Predictive, Minimally Demographic (MPMD). We wanted to select X features that have maximum dependency based on MI score with the Y target and minimum dependency on A demographic attributes.
Maximally Predictive, Minimally Demographic criteria can be defined as: We followed an objective of evaluating I(X i , Y ) and I(X i , A) and select the k best features based on maximal quotient achieved.

Objective behind minimizing MI between A and X
Demographic features define an individual and includes attributes like sex, race, age and etc. Discrimination based on demographics are prevailing in the society and affecting lives adversely. Simply removing protected attributes from data to set fairness grounds does not solving the problem of data fairness, there could exist features that are highly correlated with protected attributes. It has been disadvantageous for unprivileged group and damaged social fairness [17]. In the designed framework we have identified such features and focused on maximizing the gap between MI of X and A and, X and Y .

Fair Feature Selection Evaluation Setup
We evaluated all the criteria listed above by using two different classifiers, Base classifier and fair classifier. Logistic Regression [18] is used as a base classifier and Prejudice Remover from IBM toolkit (Aif360) [19] is used as fair classifier. Prime reason behind examining the results from two different classifiers was to analyze the performance of subsets achieved from the framework. We based our results on three important group metrics -Disparate Impact, Statistical Parity and Equalized Odds, and Accuracy of the model. Figure 4 describes the experimental setup for evaluation of the framework. The study is focused on the development of a classifier independent framework for fair selection of feature subset by evaluating the efficiency of achieved subspace and accuracy of the model being used. Figure 4 shows an overview of experimental cycle that we performed in stages to achieve results. Experiments were focused on analyzing and manipulating data for providing a baseline engineered data to designed feature selection techniques and the resultant subsets were provided as an input to both base and fair classifiers for attaining results in terms of fairness metrics and the accuracy of the model.

Data
We evaluated task level formulations by using common benchmark datasets that have been used to illustrate how problem formulation can impact fairness. Table 1 shows the list of datasets used for experimental analyses.
Data cite description adult data [19] binary Y adult reconstruction [20] varied Y year'. We discretized the target into 9 separate groups as 'income-per-year' >=

Data Preparation
IBM AIF360 toolkit [19] is an open source platform that provides a collection of credible fair modeling algorithms, datasets and a group of fairness metrics that can be used to quantify fairness in the data and models performance in interpretable manner. We used a benchmark data, Adult data set from the toolkit to evaluate designed fair feature selection technique. We converted the data into a dataframe by converting long format to wide format following our use case.
We perprocessed the numerical and categorical attributes separately. For cat-egorical variables we programmed ordinal encoding and for numerical variables, we discretized the data points into groups depending on the number of values. Feature manipulation involved conversion of protected attributes (race, age, gender) values into privileged and un-privileged groups by observing the frequency of each unique value with respect to the target and as per societal norm. For example, gender male is privileged over female in most of the cases as per societal norm but depending on the type of data we are dealing with it might change. In case of ProPublica violent recidivism dataset [21], men are more likely to be charged with violet crimes, number of males are more likely to commit a crime again in two years is greater than that of females, making females the privileged class for this dataset. Following the feature manipulation we scaled the data to run through base and fair classifiers. Figure 5 shows a quick overview of steps we followed for transforming data.

Probability Density Estimation
Mutual information calculation is based on probability distribution which is unknown, and therefore must be estimated. We used discrete distribution in our case that reduces the mutual information calculation to sum. In order to convert continuous attributes to fit the calculations we preferred binning the values into groups considering the range of values and used histogram approximation to calculate a discrete probability mass function. Histogram approximation produced n-dimensional result, hence we further converted the n-dimensional result into 2dimension for the ease of calculation. In the prior work [1], we evaluated the sensitivity of MI quantities to binning for a simple histogram approximation to confirm that our results are robust to the approximation parameters. We were able to prove that the relative value of MI quantities does not vary much with varying bin sizes. This deems histogram approximation sufficient for our purpose;

Base Classifier and Fair Classifier
Our approach towards the experiment was to check, how the feature selection formulations perform in different settings, hence we chose to use Logistic Regression (LR) as the base classifier to carry out first stage of our study. Logistic regression is fairly a simple classification algorithm, it does not have any inbuilt fairness mechanism to correct existing prejudice in data. LR was used as a baseline model to examine and evaluate the results from before and after employing the feature selection techniques. IBM AIF360 toolkit [19] provides plethora of fair algorithms for mitigating biases and discrimination. We chose Prejudice remover (PR) [22] as fair classifier to evaluate the results of fair feature selection framework.
PR is an in-processing algorithm, we used the implementation base provided in IBM AIF360 toolkit [19] for fairness interventions. PR primarily aims at preventing three causes of bias -prejudice; the author defines prejudice as dependency between the protected attributes and features, underestimation; they define underestimation as the inefficiency of classifier to estimate and perform and, negative legacy; as wrongly labeled training data. PR uses a regularization parameter eta which is responsible for balancing the trade off between accuracy and fairness.
Fair classifier does come with an inbuilt fairness correction mechanism, hence we wanted to observe and compare the working of our framework on an existing fair algorithm -Prejudice Remover.

Preliminary Results
[1] highlights demographic biases in the data using the task level formulations we designed, we analyzed the prejudice using mutual information concept. We evaluated Task level formulations using common benchmark datasets: adult data (45222 rows × 14 columns) from IBM AIF360 [19] consisting of protected attributes (A-age, sex, race and marital-status), other features (X) and proxy target (Yincome-per-year). Results from prior work [1] provided a secure foundation for researching further on fairness intervention by providing an implementable solution.
We took the motivation ahead by extending our study and designing filter based feature selection for fairness based on task level formulations [1]. We calculated I(X;Y ) and I(X;A) and, as preliminary results we picked subsets of features that yielded true value for cases where I(X;Y ) > I(X;A). Table 2 exhibits that the task formulations have credibility for further evaluation. Scores in bold are the cases where MI scores for I(X; Y ) are greater than I(X; A). Further in the experiment we mapped the set of X features to each A feature where the scores for I(X;Y ) was greater than I(X;A) shown in Table 3.

Feature Selection Results
In order to compare results based on fairness metrics and accuracy of the model, we considered the following experimental settings:    Bottom two plots exhibits that all the points are scattered all over while designed framework improved the results by mitigating bias in the result.
Adult reconstruct is an original dataset which contains continuous target variable -'income'. We converted income to a binary target by grouping it as income >= 10, 000, >= 20, 000 . . . >= 90, 000 producing 9 different data-frames with binary target. We applied feature selection techniques and modeled using both base and fair classifier. Fair classifier was trained using three different eta values -1,10,20, we statistically analyzed one value that worked best and chose eta = 10 to showcase results. Figure 9 shows how disparate impact changes with changing target, with increase in target threshold, class imbalance for y = 1 increases, because number of 1's in the data would reduce. For target >= 10, 000 model is easily able to produce close to perfect DI score, but as the values for target changes the variation in DI increases. Considering the plot in Figure 9, feature selection techniques f s = xy > xa, and f s = M P M D does reduce the disparity in prediction by bringing the points slightly close to 1.     Statistical Parity SP = P r(ŷ = 1|A = 0) − P r(ŷ = 1|A = 1) Separation Equal opportunity difference EOD = P r(ŷ = 1|y = 1, A = 0) − P r(ŷ = 1|y = 1, A = 1) Independence Disparate Impact DI = P r(ŷ=1|A=0) P r(ŷ=1|A=1)    We can observe that disparate impact changes with changing y threshold for each protected attribute. Figure 10: Statistical Parity versus accuracy for adult reconstruction with varying y threshold. We can observe that Statistical Parity changes with changing y threshold for each protected attribute. Figure 11: Equal opportunity versus accuracy for adult reconstruction with varying y threshold. We can observe that Equal opportunity changes with changing y threshold for each protected attribute.
In this work, we introduced three different formulations for Fair Feature Selection, Non-Demographic Task  Fairness in machine learning is a fairly new field which is growing and has open ends to explore. It aims at researching about building non discriminatory model and mitigating biases in data to promote equality in society at different levels. Feature selection technique in the study, is based on mutual information which relies on probability density estimation. We used histogram approximation for probability density estimation. It may not be a sufficient approach in case of high dimensional data, hence exploring density estimation using neural networks [23,24] can be one of the directions for extending this research. Three group fairness metrics have been central to the framework, but there exist other fairness metrics like conditional use predictive equality, accuracy equality, predictive parity as part of Separation and Independence fairness criteria respectively and can be a part of our future exploration.