eess.IVNov 23, 2026

Demographic Encoding is Not Exposure: Fairness and Privacy in Chest X-ray Foundation Models

Authors: Sahar Askari, Amin Golnari

Organizations: Department of Computer Science and Engineering, Shiraz University, Shiraz, Iran. · College of Engineering & Computer Science, VinUniversity, Hanoi, Vietnam.

Abstract

Medical foundation models encode patient demographics and can reveal whether a patient was in the training set, and these properties are often treated as one problem. We tested whether they are aligned by measuring demographic encoding, diagnostic fairness gaps and membership-inference vulnerability on the same models. We trained 200 linear or multilayer-perceptron (MLP) heads on frozen BiomedCLIP, DINOv2 and RAD-DINO embeddings, with three seeds, and audited them on CheXpert and NIH ChestX-ray14. Demographic encoding explained almost no variance in patient vulnerability, and all 72 CheXpert associations were statistically equivalent to zero. Erasing linearly decodable demographics left leakage unchanged but reduced age-related underdiagnosis gaps. Leakage depended instead on head capacity and training length. On RAD-DINO, a linear head reached a membership-inference area under the curve (AUC) of 0.694, compared with 0.907 for a 30-epoch MLP, at similar test performance. Fairness and privacy should therefore be audited separately, and linear heads or shorter training reduce leakage with little or no loss of utility. The code is available on GitHub for public use.

Figures & tables

Explore similar work

Aug 19, 2026

Subgroup performance analysis of adaptation strategies for chest X-ray foundation models

Foundation models are increasingly adapted for downstream medical imaging tasks, yet the influence of the chosen adaptation strategy on subgroup fairness remains poorly understood. We investigate how three parameter-efficient adaptation techniques, including linear heads on the raw CLS token, an MLP, and an attention-pooling module over multi-layer patch features, affect both pathology classification performance and subgroup disparities when applied to the frozen Rad-DINO chest X-ray encoder. Using MIMIC-CXR, we evaluate eight pathologies across race, sex, and imaging-view subgroups on a prevalence-preserving, demographically balanced test set, and additionally probe how strongly each adapter encodes protected attributes. We find that attention pooling achieves the strongest overall discriminative performance and encodes attributes, particularly race, most strongly, but that improved overall performance does not consistently reduce subgroup disparities. Notably, stronger attribute encoding did not correspond to larger disparities: early network layers encoded race most weakly yet produced the largest subgroup performance gaps. Exploring different attention-pooling layer combinations further revealed no consistent relationship between the layers pooled, attribute encoding strength, and subgroup fairness. Our results indicate that richer, more expressive representations can improve accuracy while leaving fairness implications task-dependent and unpredictable, which must be assessed directly and per-task rather than inferred from encoding strength or overall performance alone.
Oct 5, 2026

Representation Disentanglement for Fair Chest X-Ray Diagnosis

Deep learning has advanced chest X-ray (CXR) diagnosis, yet demographic biases in learned representations may contribute to performance disparities across intersectional groups. We propose a single-encoder framework combining dual-level decorrelation with prototype-guided cross-group contrastive learning to reduce demographic dependence while accounting for within-class variation. We further propose Demographic Representation Alignment Reduction (DRAR), a new metric that quantifies the reduction in demographic structure within disease representations. The framework is evaluated on four classification tasks using 34,809 CheXpert test images across eight intersectional groups, defined by age, sex and ethnicity. Compared with empirical risk minimization (ERM), our method reduces the mean equalized-odds gap from 15.41% to 10.86% and the AUC gap from 5.95% to 5.01%. Our method achieves a DRAR of 59.04% relative to ERM, with only a slight decrease in mean AUC. These results demonstrate that representation disentanglement can reduce demographic bias and improve intersectional fairness. Code is available at https://github.com/06Yujie/Fair-Medical-Imaging.
Aug 26, 2026

Race and gender differences in medical imaging models arise at the shared decision threshold

Fairness evaluations compare the performance of a medical imaging model between patient groups. A group difference in how well the model ranks images requires a better model, whereas a difference in error rates at the decision threshold shared by all groups can be addressed at the threshold. In studies of single chest radiograph models, race groups differed in error rates and hardly in ranking. However, to our knowledge, this has not been tested across image encoders, findings, and hospitals. We compared the area under the receiver operating characteristic curve (AUROC), sensitivity, and false positive rate (FPR) between patient groups for 133 classification models from 13 public image encoders. The data comprised more than 700,000 images from 10 different public datasets of chest radiography, dermatology, and funduscopy. The tests resampled patients. Within each of the two hospitals with recorded race, no race difference in AUROC was statistically significant in any of the 117 chest radiograph models. By contrast, the race difference in FPR was significant in 107 models in one hospital, at a median of 12 more false positive calls per 100 radiographs without the finding, and in 54 models in the other, at a median of 6. The same held for 299 models from 22 encoders pretrained in this study with three objectives or race-balanced data and from a randomly initialized encoder. So within a hospital, the race groups differed significantly at the shared decision threshold and not in the ranking, whatever the encoder. Developers and hospitals could examine the decision threshold for each patient group before retraining a model to remove a group difference.