The Sensitivity of Counterfactual Fairness to Unmeasured Confounding

Niki Kilbertus, Philip J. Ball, Matt J. Kusner, Adrian Weller, Ricardo Silva

Introduction

As machine learning models increasingly influence critical life outcomes—from hiring to judicial sentencing—the demand for algorithmic fairness has never been higher. Traditional metrics like statistical parity often fail to capture the underlying mechanisms of bias. In response, researchers have pivoted toward Counterfactual Fairness (CF). CF posits that a decision is fair if it remains unchanged for an individual in a hypothetical world where their protected attribute (e.g., race or gender) was different, while all other causal factors remained constant.

However, the implementation of CF relies on a significant assumption: the existence of an accurate Structural Causal Model (SCM). This paper investigates the fragility of this assumption, specifically addressing how unmeasured confounding can undermine fairness guarantees.

The Challenge of Unmeasured Confounding

An SCM is essentially a mathematical map of how variables influence one another. In practice, these maps are often "misspecified." The most pervasive error is unmeasured confounding, where a hidden variable influences two or more observed variables. If a practitioner assumes two variables are independent when they are actually linked by a hidden confounder, the resulting "fair" predictor may inadvertently perpetuate the very biases it seeks to eliminate.

The authors address a fundamental question: How sensitive is a counterfactual fairness guarantee to these hidden, unmeasured variables?

Methodology: Quantifying Sensitivity

The researchers propose a framework to measure Counterfactual Unfairness (CFU) by comparing two potential states of the world.

Comparison between the practitioner's assumed Model A and the potentially confounded true Model B.

As illustrated in the figure above, the framework distinguishes between:

  1. Model A (The "Guessed" Model): The idealized, unconfounded model used by the practitioner to build their predictor. Here, error terms (e.g., $\epsilon_G$ and $\epsilon_L$) are assumed to be independent.
  2. Model B (The "True" Model): A hypothetical version of reality where error terms are correlated due to hidden confounders, represented by the dashed double-headed arrow.

To quantify the risk, the authors introduce a "confounding budget" ($p_{max}$), representing the maximum plausible correlation between hidden noise terms. They developed two primary tools to find the "worst-case" unfairness within this budget:

  • Grid-Based Procedure (Bivariate): For simple graphs involving two variables, a fast, closed-form procedure calculates how fairness shifts as the correlation between variables varies.
  • Optimization-Based Approach (Multivariate): For complex graphs, the problem is formulated as a differentiable optimization task. Using "clique parameterization" and tanh squashing functions, the system ensures the correlation matrix remains valid while using standard optimization libraries (like PyTorch) to identify the maximum possible bias.

Experimental Evaluation

The framework was tested on two distinct real-world datasets:

Law School Success

This classic dataset predicts first-year averages based on LSAT scores and GPA, using race as the protected attribute. The analysis revealed that counterfactual unfairness does not always scale linearly with confounding. Interestingly, the direction of the correlation mattered significantly; negative correlations between error terms sometimes resulted in lower unfairness than positive ones.

NHS Staff Survey (2014)

This multivariate dataset involves job satisfaction, manager satisfaction, and organizational satisfaction to predict overall health, with race as the protected attribute. Even at high levels of confounding ($p_{max} \to 1.0$), the counterfactually fair predictor maintained significantly lower unfairness scores compared to standard non-causal baseline predictors.

Key Insights: Fairness as a Spectrum

A central takeaway of this research is that fairness should be viewed as a spectrum rather than a binary state. By plotting "sensitivity curves," researchers can visualize exactly how much hidden confounding is required to "break" a model's fairness.

Furthermore, the study suggests that causality remains a robust bet. Even when the causal model is slightly misspecified, the resulting predictor is often fairer than "unconstrained" models or "blind" models that simply ignore protected attributes. This "breaking point" analysis allows domain experts to judge whether the level of confounding required to invalidate a model is realistic in a given context.

Limitations and Future Directions

While powerful, the current tools are designed for Non-linear Additive Noise Models (ANMs). While flexible, these do not cover every possible data-generating process. Additionally, sensitivity analysis does not "solve" the problem of confounding; it merely quantifies the risk, still requiring human expertise to interpret the plausibility of worst-case scenarios.

Future work may extend these methods to larger, more complex graphs and apply sensitivity analysis to other causal measures beyond counterfactual fairness, such as path-specific effects.

Summary updated

BibTeX
@inproceedings{kilbertus2019sensitivity,
  author = {Niki Kilbertus and Philip J. Ball and Matt J. Kusner and Adrian Weller and Ricardo Silva},
  title = {{The Sensitivity of Counterfactual Fairness to Unmeasured Confounding}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2019},
  url = {https://openreview.net/forum?id=r0ebtCH7Bx5},
}
Figure