FairLogue: A Toolkit for Intersectional Fairness Analysis in Clinical Machine Learning Models
Organizations: Department of Biomedical Engineering, University of Arizona, 1127 E. James E. Rogers Way, Tucson, AZ, 85721-0020, United States
Abstract
Objective: Algorithmic fairness is essential for equitable and trustworthy machine learning in healthcare. Most fairness tools emphasize single-axis demographic comparisons and may miss compounded disparities affecting intersectional populations. This study introduces Fairlogue, a toolkit designed to operationalize intersectional fairness assessment in observational and counterfactual contexts within clinical settings. Methods: Fairlogue is a Python-based toolkit composed of three components: 1) an observational framework extending demographic parity, equalized odds, and equal opportunity difference to intersectional populations; 2) a counterfactual framework evaluating fairness under treatment-based contexts; and 3) a generalized counterfactual framework assessing fairness under interventions on intersectional group membership. The toolkit was evaluated using electronic health record data from the All of Us Controlled Tier V8 dataset in a glaucoma surgery prediction task using logistic regression with race and gender as protected attributes. Results: Observational analysis identified substantial intersectional disparities despite moderate model performance (AUROC = 0.709; accuracy = 0.651). Intersectional evaluation revealed larger fairness gaps than single-axis analyses, including demographic parity differences of 0.20 and equalized odds true positive and false positive rate gaps of 0.33 and 0.15, respectively. Counterfactual analysis using permutation-based null distributions produced unfairness ("u-value") estimates near zero, suggesting observed disparities were consistent with chance after conditioning on covariates. Conclusion: Fairlogue provides a modular toolkit integrating observational and counterfactual methods for quantifying and evaluating intersectional bias in clinical machine learning workflows.
Figures & tables
| Problem or Issue | Traditional algorithmic fairness evaluations in clinical machine learning primarily rely on single-axis demographic comparisons, which may overlook compounded disparities affecting intersectional subgroups and limit equitable deployment of predictive models. |
|---|---|
| What is Already Known | Existing fairness toolkits and auditing methods can detect bias across individual protected attributes, and counterfactual frameworks have been proposed; however, practical implementations that integrate intersectional analysis with real-world clinical workflows remain limited. |
| What This Paper Adds | This paper introduces FairLogue , a modular toolkit that combines observational and counterfactual intersectional fairness assessments within a unified framework. Applied to All of Us clinical data, the toolkit demonstrates that intersectional analyses can reveal disparities not captured by single-axis evaluations and provides practical workflows for diagnosing whether disparities reflect model unfairness or underlying data structure. |
| Who would benefit from the new knowledge in this paper | Clinical informaticians, machine learning researchers, healthcare data scientists, and developers deploying predictive models who require practical methods to evaluate and improve fairness across diverse patient populations. |
| Group (n) | TPR | FPR |
|---|---|---|
| Black (300) | 0.69 | 0.40 |
| White (485) | 0.61 | 0.30 |
| Female (433) | 0.72 | 0.33 |
| Male (402) | 0.56 | 0.34 |
| Black | Female (170) | 0.66 | 0.39 |
| Black | Male (130) | 0.72 | 0.43 |
| Metric | Race Only | Gender Only | Intersectional |
|---|---|---|---|
| Demographic parity gap | 0.1038 | 0.0692 | 0.200 |
| Equalized odds FPR gap | 0.1031 | 0.0133 | 0.1462 |
| Equal opportunity gap | 0.0796 | 0.1661 | 0.3316 |
Algorithmic Fairness
Algorithmic fairness studies how automated decisions distribute errors, opportunities, and harms across groups, and how to measure and reduce disparities.
See all 419 papers