As machine learning systems are increasingly used in critical areas like finance, employment, and criminal justice, it’s essential to ensure these models are fair and do not discriminate against certain groups. In this post, I will explore the concept of fairness in machine learning.

Defining Fairness

Fairness in machine learning can be understood in several ways:

  • Group Fairness: This implies equal treatment or outcomes for different groups categorized by sensitive attributes like race or gender. For instance, ensuring a loan application system doesn’t have a higher false rejection rate for one gender compared to another.

  • Individual Fairness: This means that similar individuals should receive similar predictions or decisions, irrespective of their group membership. Two individuals with comparable financial backgrounds should get similar credit scores, regardless of their ethnicity or gender.

  • Causal Fairness: Defined using causal modeling, it ensures similar predictions for individuals who would exhibit similar outcomes under different treatments. For example, a person’s chances of getting a job should not be influenced by their gender.

Sources of Unfairness

Unfairness in machine learning models can arise from several factors:

  • Biased Training Data: If the training data reflects historical human biases, the model will likely inherit these biases.
  • Using Protected Variables: Direct use of attributes like race or gender in models can lead to disparate treatment.
  • Proxy Variables: Models may learn to discriminate using variables correlated with protected attributes, like zip codes.
  • Skewed Test Performance: Poor model performance on minority groups due to imbalanced datasets.
  • Incorrect Similarity Metrics: Discriminatory definitions of similarity between individuals can introduce bias.

Techniques to Improve Fairness

Addressing unfairness involves strategies across the ML pipeline:

  • Pre-processing: Removing biases in training data and identifying proxy variables.
  • In-processing: Modifying the model training process to incorporate fairness constraints.
  • Post-processing: Applying techniques post-training to correct biases.
  • Improved Evaluation: Using specific metrics to assess fairness in different contexts.
  • Causal Modeling: Employing causal inference techniques to understand and mitigate biases.

Real-World Example: Bias in Digital Recruitment Advertising

A notable instance highlighting the need for fairness in AI was observed in digital recruitment advertising. An algorithm disproportionately showed high-salary job ads to men over women, influenced by biased historical data that reflected existing employment trends. This case underscores the importance of evaluating training data for biases and the necessity for ongoing algorithmic assessment to avoid reinforcing social inequalities.


Achieving fairness in machine learning is a complex yet vital endeavor, requiring collaboration across various fields. With careful consideration and appropriate techniques, we can develop AI systems that are both ethical and equitable.