header

Leveraging Counterfactual Explanations to Detect, Mitigate, and Explain Demographic Bias in Machine Learning-Based Thyroid Dysfunction Screening

Authors
  • Abey city

    Lautech
    Author
Keywords:
Counterfactual Explanations, Demographic Bias, Thyroid Dysfunction, Explainable AI, Machine Learning, Clinical Deployment
Abstract

Thyroid dysfunction affects millions worldwide, yet machine learning (ML) models developed for automated screening frequently fail upon deployment due to hidden demographic biases that systematically disadvantage underrepresented patient groups. While ML demonstrates remarkable diagnostic accuracy—with recent ensemble models achieving F1 scores up to 0.9944 in thyroid classification  and near-perfect AUC of 0.99 —these performance metrics often mask significant disparities across age, gender, and ethnic subgroups. This study addresses the critical gap between algorithmic performance and equitable clinical deployment by developing a bias-aware framework that integrates counterfactual explanations for bias detection, mitigation, and transparent explanation. Using a publicly available thyroid disease cohort of 9,172 observations, we evaluate five classifiers under stratified nested cross-validation and implement counterfactual generation to identify demographic feature dependencies. Our framework achieves a balanced accuracy of 89.4% while reducing disparate impact from 0.73 to 0.92 across demographic groups. The integration of SHAP-based feature attribution with counterfactual analysis enables clinicians to understand not only what the model predicts but why biases occur and how they can be mitigated through actionable interventions. This research provides a replicable, transparent framework for deploying equitable AI systems in endocrinology, addressing both technical performance and real-world fairness requirements.

Cover Image
Downloads
Published
06/18/2026
Section
Articles
License

Copyright (c) 2026 Abey city (Author)

Creative Commons License

This work is licensed under a Creative Commons Attribution 4.0 International License.

How to Cite

Leveraging Counterfactual Explanations to Detect, Mitigate, and Explain Demographic Bias in Machine Learning-Based Thyroid Dysfunction Screening. (2026). The Science Post, 2(2). https://www.thesciencepostjournal.com/index.php/tsp/article/view/109