The construction of fair (unbiased) machine learning models is becoming essential in data science. The use of machine learning algorithms to solve problems across different types of businesses will reproduce bias and discrimination that society seeks to combat, but which are present in the data.
Related to this context is the concept known as Disparate Impact, that is, the impact of discrimination. It refers to practices that negatively affect a minority group of individuals in relation to a majority group, even when such discrimination occurs unintentionally.
A Protected Class refers to individuals who are protected from discrimination under the law. Generally, protected characteristics refer to attributes such as race, religion, nationality, sex, age, sexual orientation, disability, etc., which are protected under federal laws.
To illustrate these concepts, consider a selection process for a Data Scientist position in which candidates are required to take a physical test. In this case, we have a scenario of Disparate Impact, since the Data Scientist role does not require such an ability. That is, the employer may be attempting to discriminate against a protected class of individuals. If a woman does not succeed in the physical test, this would not imply that she is incapable of performing the job. Therefore, there is no legitimacy in this selection process for evaluating job performance.
With the growth of model-based applications and decision-making processes that may affect individuals belonging to protected classes, there is increasing interest in developing machine learning models and algorithms capable of measuring and ensuring that their predictions and classifications are not influenced by the presence of bias.
A real-world example of the application of discriminatory models can be seen in Machine Bias — ProPublica, where a model designed to predict future crimes assigned higher risk scores to Black individuals.
But what does it mean to build fair models? How can the notion of fairness be translated into something measurable?
In general, problems with discriminatory models occur due to the presence of unintentional bias contained in datasets. There are different methods to identify the presence of bias and to address it in order to build fair models.
The 4/5 rule (or 80% rule) is commonly used to evaluate the presence of bias in sociodemographic variables. The Impact Ratio (IR) between minority and majority classes is evaluated. If the IR value is below 80%, it suggests the presence of bias, that is, the presence of disparate impact.
Other statistical tests can be used to identify the presence of bias in data, such as the Chi-square test of independence, Fisher’s exact test (association between variables), among others, which together help strengthen the evidence of bias.
In the literature, there are suggestions for measures and techniques at different stages of building machine learning models in order to develop fair models, ranging from data preprocessing to the evaluation of final models.
Special attention to this topic is necessary, especially in the field of Data Science, because the development of models based on discriminatory biased data implies the reproduction of this bias by such algorithms. Further exploration of the topic can be found in the references below.
References
- A flexible tool for bias detection, visualization, and mitigation. https://fairmodels.drwhy.ai
- Data preprocessing techniques for classification without discrimination, Knowledge and Information Systems (2012) 33:1–33, DOI 10.1007/s10115-011-0463-8
- How can we ensure Machine Learning models are fair? https://onfido.com/resources/blog/how-can-we-ensure-machine-learning-models-are-fair
- What Is the Difference Between Disparate Impact and Disparate Treatment Discrimination? https://rayneslaw.com/what-is-the-difference-between-disparate-impact-and-disparate-treatment-discrimination
- Fairness Constraints: Mechanisms for Fair Classification. https://people.mpi-sws.org/~mzafar/papers/disparate_impact.pdf
- How to easily check if your Machine Learning model is fair? https://www.kdnuggets.com/2020/12/machine-learning-model-fair.html
- Feldman, M., Friedler, S. A., Moeller, J., et al. Certifying and Removing Disparate Impact (2015). Proceedings of the 21st ACM SIGKDD International Conference on Knowledge Discovery and Data Mining.
- Understanding Fairness. https://machinesgonewrong.com/fairness/



