TLDR: CausalFT is a new framework for AI fairness testing that uses causal inference to identify non-sensitive features most relevant to sensitive ones. By injecting this causal knowledge into test sample generation, it significantly improves the detection of fairness bugs in AI models, outperforming correlation-based methods and making models more robust to bias with acceptable overhead.
Artificial intelligence (AI) models are increasingly integrated into critical systems, from healthcare to criminal justice. However, these powerful tools can inadvertently perpetuate and even amplify societal biases present in their training data, leading to unfair and unethical discrimination. Identifying these “fairness bugs” is crucial for building trustworthy AI, but it’s a complex challenge due to the vast number of possible inputs an AI model can encounter.
Traditional fairness testing methods often rely on randomly perturbing data around sensitive features like gender or race. While these methods have made strides, they often overlook a critical piece of information: the intricate relationships between sensitive features and other non-sensitive features in the data. For instance, a person’s age might not directly cause a biased outcome, but its interaction with their marital status could significantly influence an AI model’s prediction, leading to discrimination.
Addressing this gap, researchers Chengwen Du and Tao Chen from the IDEAS Lab at the University of Birmingham, UK, have introduced a novel framework called CausalFT. This framework, detailed in their paper “Causally Perturbed Fairness Testing”, leverages causal inference to revolutionize how fairness bugs are detected. The core idea behind CausalFT is to identify the non-sensitive features that are most directly and causally linked to sensitive features, and which together influence the AI model’s predictions. This causal understanding is then seamlessly integrated into the perturbation process, guiding test sample generation more effectively.
How CausalFT Works
Unlike existing methods that focus on designing specific test sample generators, CausalFT acts as a higher-level, adaptable framework. It can be paired with various existing “base generators,” enhancing their ability to find fairness bugs. The framework operates in three key phases:
- Feature Causality Analysis: CausalFT first builds a causal model from the training data to map out how different features influence each other and the final prediction. It then pinpoints non-sensitive features that have a direct causal relationship with the sensitive feature. For example, in a dataset predicting income, ‘Age’ (sensitive) might have a direct causal link to ‘Marital-status’ (non-sensitive).
- Causal Perturbation: Once the most causally relevant non-sensitive feature is identified, CausalFT injects this knowledge into the test sample generation process. Instead of just considering the sensitive feature, it temporarily treats both the sensitive feature and its causally linked non-sensitive counterpart as a “synthetic sensitive set.” This relaxed definition of a discriminatory instance allows for more diverse and targeted perturbations. Crucially, during perturbation, these two causally linked features are kept stable, while other features are varied. This ensures that the complex interaction between the sensitive and its causally relevant non-sensitive feature is preserved, making it easier to uncover hidden biases.
- Invalidity Repair: Sometimes, the relaxed definition might generate “invalid” test cases that don’t strictly meet the original definition of a discriminatory instance (where only the sensitive feature differs). CausalFT includes a repair mechanism to re-pair these samples with existing data, ensuring that the final generated test cases are valid and practical.
Also Read:
- Guiding Language Models to Reflect Diverse Human Values with Causal Reasoning
- Enhancing AI’s Adaptability: A Human-Inspired Approach to Learning Across Diverse Environments
Impact and Efficiency
Extensive experiments across eight datasets, four AI models (including Deep Neural Networks and traditional models like Logistic Regression and Random Forest), and six different base generators confirm CausalFT’s effectiveness. It significantly improves the ability of arbitrary base generators to reveal fairness bugs in over 93% of the cases. For instance, it can uncover hundreds more unique fairness bugs compared to methods without CausalFT. When compared to approaches that rank non-sensitive features based solely on correlation (like FairRF), CausalFT performs significantly better in 64% of cases, demonstrating the importance of understanding causality over mere correlation.
Furthermore, CausalFT contributes to making AI models more robust to bias. When models are retrained using fairness-repaired samples generated by CausalFT, they become considerably more resilient to fairness bugs, often with only a small, acceptable degradation in overall model quality (accuracy or AUC). In terms of efficiency, CausalFT’s pre-testing analysis is notably faster than correlation-based methods. While the test sample generation might take slightly longer due to its refined search strategy, the extra runtime is considered acceptable given the substantial benefits in bias detection.
CausalFT represents a significant step forward in fairness testing, offering a robust and adaptable framework that can be seamlessly integrated into existing workflows to build more equitable and trustworthy AI systems.


