Responsible AI & Behavioural

Pre-, In- and Post-Processing Mitigation

Applying pre-processing data re-weighting, in-processing constrained loss functions, and post-processing threshold adjustments to reduce bias.

🔴 advanced5 min readethics
Pre-, In-, and Post-Processing Mitigation techniques reduce algorithmic bias in machine learning systems. Pre-processing techniques re-weight or re-sample training data before model training starts. In-processing techniques add fairness constraint penalties directly into loss functions during model optimization. Post-processing techniques adjust decision probability thresholds per group after model inference to satisfy fairness constraints.

3 Stages of Algorithmic Bias Mitigation

Once an engineering team identifies bias in a machine learning system, how do they reduce it?

Bias mitigation techniques are categorized by Where in the ML pipeline they intervene:

Pre-Processing (Data Layer) ──► In-Processing (Training Layer) ──► Post-Processing (Output Layer)
(Re-weighting / Re-sampling)    (Adversarial Debiasing)            (Group Threshold Tuning)

1. Pre-Processing Mitigation (Data Level)

Modifies the training dataset before model training begins:

┌──────────────────────────┬──────────────────────────┐
│ RE-WEIGHTING             │ DISPARATE IMPACT REMOVER │
├──────────────────────────┼──────────────────────────┤
│ Assigns higher loss      │ Edits feature distributions│
│ weights to under-        │ to remove correlation with│
│ represented group        │ protected attributes     │
│ samples during training. │ while preserving rank.   │
└──────────────────────────┴──────────────────────────┘

2. In-Processing Mitigation (Model Training Level)

Modifies the model architecture or loss function during training:

$$\mathcal{L}{\text{total}} = \mathcal{L}{\text{task}} + \lambda \cdot \text{FairnessPenalty}$$

3. Post-Processing Mitigation (Inference Output Level)

Modifies prediction probability thresholds after model training finishes:

Strategy Selection Guide

StageRequires Model Retraining?Needs Protected Attribute at Inference?Model Agnostic?
Pre-ProcessingYesNoYes
In-ProcessingYesNoNo
Post-ProcessingNoYesYes

Say this out loud

Bias mitigation techniques intervene at data pre-processing, model in-processing, or prediction post-processing stages. Pre-processing re-weights or re-samples training data prior to training. In-processing adds fairness constraints or adversarial debiasing into loss functions. Post-processing adjusts decision probability thresholds per group without requiring model retraining.

Followups to expect

  1. What is AIF360 (AI Fairness 360)? An open source Python toolkit developed by IBM containing metrics and algorithms for detecting and mitigating algorithmic bias across pre-processing, in-processing, and post-processing stages.
  2. Why can post-processing threshold adjustments face legal challenges? Using explicit demographic attributes to set different threshold cutoffs can be interpreted legally as intentional disparate treatment in specific jurisdictions.

Check yourself

Question 1 of 3

What pre-processing technique balances representation by adjusting sample loss weights prior to model training?

More in Responsible AI & Behavioural

See all →
Telling Your ML Project Story5 minBias & Fairness in ML5 minExplainability: SHAP & LIME4 min