Table of Contents
Fetching ...

FairSHAP: Preprocessing for Fairness Through Attribution-Based Data Augmentation

Lin Zhu, Yijun Bian, Lei You

TL;DR

FairSHAP tackles the fairness gap in ML by treating bias reduction as an interpretable preprocessing task. It identifies fairness-critical features at the instance level using Shapley value attributions and then performs bidirectional instance-level matching across sensitive groups to replace high-contribution features with reference values, yielding a minimally perturbed augmented dataset. The method achieves substantial reductions in discriminative risk and improvements in demographic parity and equality of opportunity across multiple tabular datasets, with occasional gains in predictive accuracy. Its model-agnostic, transparent pipeline can be integrated into existing workflows, providing interpretable insights into the sources of bias and how data modifications influence fairness.

Abstract

Ensuring fairness in machine learning models is critical, particularly in high-stakes domains where biased decisions can lead to serious societal consequences. Existing preprocessing approaches generally lack transparent mechanisms for identifying which features or instances are responsible for unfairness. This obscures the rationale behind data modifications. We introduce FairSHAP, a novel pre-processing framework that leverages Shapley value attribution to improve both individual and group fairness. FairSHAP identifies fairness-critical instances in the training data using an interpretable measure of feature importance, and systematically modifies them through instance-level matching across sensitive groups. This process reduces discriminative risk - an individual fairness metric - while preserving data integrity and model accuracy. We demonstrate that FairSHAP significantly improves demographic parity and equality of opportunity across diverse tabular datasets, achieving fairness gains with minimal data perturbation and, in some cases, improved predictive performance. As a model-agnostic and transparent method, FairSHAP integrates seamlessly into existing machine learning pipelines and provides actionable insights into the sources of bias.Our code is on https://github.com/youlei202/FairSHAP.

FairSHAP: Preprocessing for Fairness Through Attribution-Based Data Augmentation

TL;DR

FairSHAP tackles the fairness gap in ML by treating bias reduction as an interpretable preprocessing task. It identifies fairness-critical features at the instance level using Shapley value attributions and then performs bidirectional instance-level matching across sensitive groups to replace high-contribution features with reference values, yielding a minimally perturbed augmented dataset. The method achieves substantial reductions in discriminative risk and improvements in demographic parity and equality of opportunity across multiple tabular datasets, with occasional gains in predictive accuracy. Its model-agnostic, transparent pipeline can be integrated into existing workflows, providing interpretable insights into the sources of bias and how data modifications influence fairness.

Abstract

Ensuring fairness in machine learning models is critical, particularly in high-stakes domains where biased decisions can lead to serious societal consequences. Existing preprocessing approaches generally lack transparent mechanisms for identifying which features or instances are responsible for unfairness. This obscures the rationale behind data modifications. We introduce FairSHAP, a novel pre-processing framework that leverages Shapley value attribution to improve both individual and group fairness. FairSHAP identifies fairness-critical instances in the training data using an interpretable measure of feature importance, and systematically modifies them through instance-level matching across sensitive groups. This process reduces discriminative risk - an individual fairness metric - while preserving data integrity and model accuracy. We demonstrate that FairSHAP significantly improves demographic parity and equality of opportunity across diverse tabular datasets, achieving fairness gains with minimal data perturbation and, in some cases, improved predictive performance. As a model-agnostic and transparent method, FairSHAP integrates seamlessly into existing machine learning pipelines and provides actionable insights into the sources of bias.Our code is on https://github.com/youlei202/FairSHAP.
Paper Structure (37 sections, 7 theorems, 47 equations, 4 figures, 4 tables, 2 algorithms)

This paper contains 37 sections, 7 theorems, 47 equations, 4 figures, 4 tables, 2 algorithms.

Key Result

Theorem 3.1

Let $f\colon\mathbb{R}^d\to[0,1]$ be a classifier, and let $\phi_k(\mathbf{x})$ denote the Shapley contribution of feature $k$ on instance $\mathbf{x}$. Fix a threshold $T>0$ and define the set of fairness‐critical features Given a matched reference instance $r$ (from reference set $\mathcal{B}$), FairSHAP constructs Then the satisfies

Figures (4)

  • Figure 1: Overall framework of FairSHAP. (Left) Training data are first split by sensitive attribute and aligned via nearest-neighbor matching to produce paired instances. (Right) For each target group, feature values whose Shapley value exceeds a threshold are adjusted to reduce , and the modified instances from both groups are recombined into an augmented, fairness-improved training set.
  • Figure 2: Percentage reduction in the across different datasets. The $x$-axis denotes the number of modifications applied (up to the maximum required under a fairness threshold $T = 0.05$), while the $y$-axis indicates the relative in , expressed as a percentage of the original value.
  • Figure 3: Improvement in fairness metrics (Accuracy, DR, DP, EO, and PQP) as the number of modifications increases using FairSHAP on various datasets. Solid lines represent the mean, and shaded areas indicate the standard deviation from 5-fold cross-validation. The $x$-axis shows the number of modifications taken, up to the maximum required under a given threshold $T$, where $T=0.05$.
  • Figure 4: Normalized distribution of modification counts per Shapley interval. Each color corresponds to a dataset (German Credit, COMPAS, Adult). Y-axis shows relative frequency (summing to 1 within each dataset), while numbers above bars indicate the absolute counts of modifications in each interval.

Theorems & Definitions (12)

  • Theorem 3.1: Instance‐wise DR reduction
  • Theorem 3.2: Identical‐distribution case
  • Theorem 3.3: General case
  • Lemma C.1: Shapley decomposition of individual DR
  • proof
  • Theorem C.2: Instance-wise DR reduction achieved by FairSHAP
  • proof
  • Theorem D.1: Identical-distribution case
  • proof
  • Definition D.2: Total variation distance
  • ...and 2 more