IDEAS home Printed from https://ideas.repec.org/a/plo/pdig00/0001516.html

AI alignment in medical imaging: Unveiling hidden biases through counterfactual analysis

Author

Listed:
  • Haroui Ma
  • Francesco Quinzan
  • Theresa Willem
  • Stefan Bauer

Abstract

Machine learning (ML) systems for medical imaging have demonstrated remarkable diagnostic capabilities. However, their susceptibility to learning spurious correlations with sensitive attributes poses significant risks to fairness and safety. In this paper, we introduce a novel statistical framework to evaluate the dependency of medical imaging ML models on sensitive attributes, such as demographics. Our method leverages the concept of counterfactual invariance, measuring the extent to which a model’s predictions remain unchanged under hypothetical changes to sensitive attributes. We present a practical algorithm that combines conditional latent diffusion models with statistical hypothesis testing to identify and quantify such biases without requiring direct access to counterfactual data. On synthetic benchmarks, our framework correctly identifies 96.1% of biased models while producing false alarms on 22.0% of fair models. On two real-world chest X-ray datasets, CheXpert and MIMIC-CXR, it detects bias at average rates 96.3%, 95.7% across all diagnostic tasks when models are strongly biased, and its average false alarm rate drops to 15.3%, 14.7%, respectively, for the least biased models, consistently outperforming existing fairness baselines and demonstrating strong alignment with counterfactual fairness principles.Author summary: Machine learning (ML) systems are increasingly used in medical imaging for diagnostic purposes. However, these systems can learn biases from training data, leading to disparities in clinical outcomes, particularly across demographic groups. Our work addresses this critical issue by introducing a novel statistical framework that tests whether an ML model’s predictions change when sensitive attributes—such as self-reported race or gender—are altered. We achieve this by using latent conditional diffusion models to create realistic image variations. These tools allow us to measure a model’s dependency on sensitive attributes and assess its fairness. We validate our method on synthetic and real-world medical imaging datasets, demonstrating its effectiveness and alignment with counterfactual fairness principles. This approach represents an important step towards building trustworthy and unbiased AI systems in healthcare.

Suggested Citation

  • Haroui Ma & Francesco Quinzan & Theresa Willem & Stefan Bauer, 2026. "AI alignment in medical imaging: Unveiling hidden biases through counterfactual analysis," PLOS Digital Health, Public Library of Science, vol. 5(8), pages 1-21, August.
  • Handle: RePEc:plo:pdig00:0001516
    DOI: 10.1371/journal.pdig.0001516
    as

    Download full text from publisher

    File URL: https://journals.plos.org/digitalhealth/article?id=10.1371/journal.pdig.0001516
    Download Restriction: no

    File URL: https://journals.plos.org/digitalhealth/article/file?id=10.1371/journal.pdig.0001516&type=printable
    Download Restriction: no

    File URL: https://libkey.io/10.1371/journal.pdig.0001516?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:plo:pdig00:0001516. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: digitalhealth (email available below). General contact details of provider: https://journals.plos.org/digitalhealth .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.