- A Theoretical and Empirical Study
Introduction
In the realm of algorithmic fairness, researchers generally focus on two primary paradigms: Group Fairness (GF) and Counterfactual Fairness (CF). Group Fairness ensures that a model performs equally well across different demographic groups (e.g., achieving equalized odds). Counterfactual Fairness, on the other hand, operates at the individual level, ensuring that a model’s prediction for a specific person remains identical even if a sensitive attribute—such as their sex—were changed, holding all other variables constant.
Previous research conducted on simple tabular datasets suggested a convenient relationship: achieving Counterfactual Fairness often guarantees Group Fairness "for free." However, this assumption has remained largely untested on complex, high-dimensional data like images. The primary bottleneck has been the lack of "counterfactual pairs"—images of the exact same individual but with a different sensitive attribute. This paper investigates whether the CF $\implies$ GF relationship holds true for computer vision and reveals a surprising conclusion: it does not. In fact, enforcing CF can sometimes worsen group disparities.
Methods and Counterfactual Generation
To tackle this problem, the authors first needed a way to test counterfactuals in images. They utilized InstructPix2Pix (IP2P), a diffusion-based image editing tool, to create counterfactual versions of human faces. By prompting the model to change a person's perceived sex while maintaining their core identity, they generated candidate pairs. Human annotators were then employed to rigorously filter out low-quality or "leaky" edits, ensuring the integrity of the counterfactuals.
Using this generation pipeline, the study introduces three primary benchmarks:
- CelebA-CF: A counterfactual version of the popular CelebA dataset, containing 230 high-quality, human-verified image pairs.
- LFW-CF: A counterfactual version of the Labeled Faces in the Wild dataset, containing 144 verified pairs.
- CIFAR-10B: A controllable synthetic dataset allowing precise manipulation of the correlation between sensitive and latent attributes to validate theoretical claims.
The "Shortcut" Trap: Why CF Fails GF in Images
Through theoretical analysis using Structural Causal Models (SCMs), the authors prove that image data inherently contains latent attributes ($G$) that are correlated with, but not strictly caused by, the sensitive attribute ($A$). For instance, "hair length" or "makeup" is statistically correlated with "sex" in many datasets, but isn't biologically caused by it.
When a model is forced to ignore the sensitive attribute $A$ to achieve Counterfactual Fairness, it looks for "shortcuts." It compensates by relying more heavily on the correlated latent attributes $G$. Because these latent features are still unevenly distributed across demographic groups, the model remains biased at a group level. Consequently, while the model might treat an individual and their counterfactual counterpart identically (achieving CF), it inadvertently destroys Group Fairness across the broader population.
Counterfactual Knowledge Distillation (CKD)
To bridge this gap, the authors propose a novel training objective called Counterfactual Knowledge Distillation (CKD). They observed a counterintuitive phenomenon: "vanilla" models (trained with simple cross-entropy and no fairness constraints) are actually more robust to these latent attributes than models specifically optimized for counterfactual fairness.
CKD leverages this by using a vanilla "teacher" model to distill its latent-attribute robustness into a "student" model. Simultaneously, the student model is trained with counterfactual pairing constraints. This dual approach prevents the model from falling into the shortcut trap.
Key Results
The empirical results strongly support the theoretical SCM analysis:
- Failure of Standard CF: On the CelebA dataset, a baseline Counterfactual Pairing (CP) method successfully improved individual fairness, reducing Counterfactual Disparity (CD) from 10.26 to 2.53. However, it significantly worsened group fairness, increasing the Disparity of Equalized Odds (DEO) from 47.10 to 51.01.
- CKD Success: The proposed CKD method achieved a vastly superior balance. On CelebA, it reached a DEO of 13.23 (a massive improvement over the baseline's 47.10) while maintaining a low CD of 4.44.
- Consistency: These findings remained consistent across real-world facial datasets (CelebA-CF, LFW-CF) and the synthetic CIFAR-10B tests, proving that the "latent attribute" theory robustly explains the CF/GF gap in computer vision.
Limitations and Future Work
While groundbreaking, the study notes a few limitations. Primarily, it focuses on "sex" as a binary sensitive attribute, which simplifies the biological and social complexities of gender. Additionally, due to the difficulty of perfect image editing and the high cost of human verification, the high-quality counterfactual test sets (CelebA-CF and LFW-CF) remain relatively small. Finally, the effectiveness of CKD relies heavily on the availability of a "teacher" model that is already somewhat robust to latent attributes, which may be challenging to find or train in domains that are even more heavily biased than facial recognition.
Summary updated