Inferensys

Glossary

Causal Fairness

A framework for defining and auditing fairness using causal inference and structural causal models to distinguish between discriminatory and legitimate causal pathways in a prediction.
Governance lead reviewing model governance framework on laptop, policy documents visible, executive office setup.
DEFINITION

What is Causal Fairness?

Causal fairness is a framework for defining and auditing algorithmic fairness using the language of causal inference, distinguishing discriminatory pathways from legitimate ones in a model's predictions.

Causal fairness is a framework for auditing algorithmic bias that uses structural causal models (SCMs) and directed acyclic graphs to formally distinguish between discriminatory causal pathways and legitimate, non-discriminatory ones in a prediction. Unlike purely statistical definitions, it explicitly models the data-generating process to determine if a protected attribute, such as race or gender, exerts an unfair causal effect on a model's output.

A core technique is counterfactual fairness, which deems a prediction fair if it remains identical in the actual world and a hypothetical world where an individual's protected attribute was different, holding all other causally independent factors constant. This approach resolves the limitations of fairness through unawareness by directly addressing proxy discrimination, where non-protected features like zip code serve as conduits for a protected attribute's causal influence.

FOUNDATIONAL CONCEPTS

Core Characteristics of Causal Fairness

Causal fairness moves beyond statistical parity to examine the mechanisms of discrimination. By using structural causal models, it distinguishes legitimate causal pathways from illegitimate ones, answering not just if a disparity exists, but why.

01

Structural Causal Models (SCM)

The mathematical backbone of causal fairness. An SCM is a triple (U, V, F) defining exogenous variables (U), endogenous variables (V), and structural equations (F) that assign a causal mechanism to each variable.

  • Nodes represent variables (e.g., education, hiring decision).
  • Edges represent direct causal relationships.
  • Exogenous variables capture unobserved background noise.

This graph allows auditors to explicitly encode assumptions about how the world works before testing for bias.

02

Counterfactual Fairness

A prediction Ŷ is counterfactually fair if it would remain the same in the actual world and a counterfactual world where an individual's protected attribute (e.g., race) was different, but all other causally independent factors remain unchanged.

  • Key Insight: It corrects for the 'red-lining' proxy problem.
  • Requirement: A fully specified causal model to compute the intervention.
  • Contrast: Unlike demographic parity, it allows legitimate statistical dependence through mediating variables like education if education is not itself a product of discrimination.
03

Path-Specific Effects

Not all causal paths from a protected attribute to an outcome are discriminatory. Path-specific fairness decomposes the total causal effect into fair and unfair pathways.

  • Fair Path: A protected attribute influences a job-relevant skill, which legitimately influences hiring.
  • Unfair Path: A protected attribute directly influences hiring via a biased interviewer (direct discrimination).
  • Audit Logic: The goal is to nullify the effect along the unfair path while preserving the effect along the fair path, a technique known as path-specific counterfactual inference.
04

Resolving the Simpson's Paradox

A core motivation for causal fairness is resolving statistical reversals. A model might appear fair in aggregate but be discriminatory in every sub-group, or vice versa.

  • Example: A university admissions model might show no gender bias overall, but causal analysis reveals bias against women applying to competitive departments and against men applying to less competitive ones.
  • Causal Solution: By conditioning on the correct confounders (applicant qualifications) and analyzing the direct effect of gender, the paradox is resolved, revealing the true discriminatory structure.
05

No Unresolved Discrimination

A formal causal fairness definition proposed by Kilbertus et al. It states that there should be no directed path from a protected attribute to the outcome, except via a resolving variable.

  • Resolving Variable: A feature that society explicitly accepts as a legitimate basis for differential treatment (e.g., physical strength for a firefighter role).
  • Audit Process: The auditor specifies the resolving variables. The model is fair if the protected attribute's influence is fully mediated by these variables, blocking all other back-door or direct paths.
06

Counterfactual vs. Observational Fairness

A critical distinction in auditing. Observational criteria (like Demographic Parity) only look at data correlations. Causal criteria look at mechanisms.

  • Observational: 'Are loan rates equal across groups?' (Can be fooled by proxy variables).
  • Counterfactual: 'Would this specific applicant have received the loan if they were of a different race, holding all else equal?'
  • Power: Causal reasoning allows for individual-level recourse and justification, whereas observational methods only guarantee group-level statistical properties.
CAUSAL FAIRNESS EXPLAINED

Frequently Asked Questions

Clear, technically precise answers to the most common questions about using causal inference to audit and enforce fairness in machine learning systems.

Causal fairness is a framework for defining and auditing algorithmic fairness using the language of causal inference and Structural Causal Models (SCMs). Unlike statistical fairness definitions—such as Demographic Parity or Equalized Odds—which only examine correlations between a protected attribute and a model's output, causal fairness explicitly models the data-generating process. It distinguishes between discriminatory causal pathways (e.g., the direct effect of race on a hiring decision) and legitimate causal pathways (e.g., the effect of race mediated through a job-relevant qualification). This allows a practitioner to block unfair effects while preserving fair ones, solving the proxy discrimination problem that statistical methods often miss. The core tool is the causal graph, a directed acyclic graph encoding assumptions about how variables influence one another.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.