TL;DR
Fine-tuning clinical NLP models is highly sensitive to random seeds, but how does this stochasticity impact algorithmic fairness? This paper demonstrates that different random seeds can yield identical overall performance while producing wildly different performance disparities across demographic subgroups—a phenomenon heavily exacerbated by small minority sample sizes.
What Problem Does This Paper Address?
Algorithmic fairness is a critical concern in clinical settings, where predictive models trained on Electronic Health Records (EHR) can directly influence treatment decisions. While recent machine learning literature highlights that fine-tuning large language models (like BERT) is highly sensitive to the choice of random seeds, the implications of this randomness on model fairness remain under-explored.
The authors address this gap by investigating how random seed selection affects performance disparities across demographic subgroups (gender and ethnicity) in clinical text classification. When multiple models achieve the same overall accuracy but differ internally, the problem is underspecified. This paper asks: does this underspecification mean our fairness evaluations are just rolling the dice?
Methods
The authors fine-tuned a pretrained ClinicalBERT model on clinical notes to perform binary classification tasks. To isolate the impact of randomness, they generated $K = 1,000$ pairs of random seeds, varying the data shuffling order and parameter initialization independently while keeping all other hyperparameters fixed.
Model performance was evaluated using the Area Under the ROC Curve (AUC) for both the aggregate population and individual demographic subgroups. Fairness was quantified as the absolute difference ($\Delta$ AUC) between overall and subgroup performance.
Datasets
The study utilizes MIMIC-III, the standard de-identified Electronic Health Records database containing data from over 40,000 intensive care unit (ICU) patients. They evaluated models on two benchmark tasks:
- In-hospital Mortality (IHM): Predicting the risk of mortality based on the first 48 hours of an ICU stay.
- Phenotype Classification (PC): Classifying the presence of 25 acute or chronic conditions (e.g., Shock, Chronic Kidney Disease, Diabetes).
Crucially, the dataset is highly imbalanced: 55% Male, 85% White, 9% Black, 3% Asian, and 3% Hispanic.
Key Insights and Ideas
- Underspecification in Fairness: Multiple random seeds can achieve virtually identical overall validation performance but result in vastly different subgroup disparities. A model selected purely for top-tier aggregate accuracy might secretly be highly unfair to a minority group purely by chance.
- The Small Sample Size Trap: Minority subgroups inherently have very small sample sizes in EHR data, especially when intersecting with rare medical conditions. The authors discovered that the higher variance in performance observed in minority groups is largely a statistical artifact of small sample sizes rather than pure model instability.
- Weak Validation-Test Generalization: Fairness metrics on the validation set correlate very poorly with fairness metrics on the test set. Consequently, trying to select a "fair" seed during validation does not guarantee a fair model in production.
Key Results
- Across all 26 tasks, both overall performance and the gap between the best and worst subgroups showed massive fluctuations across the 1,000 seeds.
- Even when filtering for the best-performing seeds on validation data (within $\le 0.01$ AUC of the top model), the test set subgroup performance varied drastically. For example, in the Shock phenotype classification task, certain top-performing seeds maximized performance for some groups at the direct expense of others.
- By evaluating majority groups on an artificially downsampled, balanced test set, the authors showed that majority groups exhibited the same high variance as minority groups, confirming sample size as a primary driver of apparent variance.
Limitations and Future Work
- Data Scarcity Constraints: The inherent demographic imbalance of MIMIC-III makes it incredibly difficult to accurately decouple true algorithmic bias from statistical noise.
- Optimization Failures: Jointly optimizing for both high overall performance and low disparity on validation data failed to yield statistically significant improvements on the test set due to the weak validation-test correlation for fairness.
- A Call for Better Reporting: The authors urge future clinical NLP researchers to move away from reporting single-seed fairness results. Instead, researchers must carefully account for stochasticity and sample size constraints by reporting variances across multiple runs.
Summary updated