Evaluating XAI techniques under class imbalance using CPRD data
Teena Rai, Jun He, Jaspreet Kaur, Yuan Shen, Mufti Mahmud, David J. Brown, Emma O’Dowd, David Baldwin
Nottingham Trent University · University of Nottingham
Key points
From the paper's conclusion- Discussion: These findings highlight a critical vulnerability in current XAI techniques, i.e., their interpretability are significantly affected under skewed class distributions, which is common in medical data and emphasises the importance of consistent model explanations for trustworthy ML deployment in healthcare.
Abstract
Introduction: XAI techniques such as Local Interpretable Model-Agnostic Explanations (LIME), SHapley Additive exPlanations (SHAP) and Partial Dependence Plots (PDPs) are widely used to interpret Machine Learning (ML) models for disease risk prediction, particularly in tabular Electronic Health Record (EHR) data. However, their reliability under real-world scenarios is not fully understood. Class imbalance is a common challenge in many real-world datasets, but it is rarely accounted for when evaluating the reliability and consistency of XAI techniques. Methods: In this study, we design a comparative evaluation framework to assess the impact of class imbalance on the consistency of model explanations generated by LIME, SHAP, and PDPs. Using UK primary care data from the Clinical Practice Research Datalink (CPRD), we train three ML models: XGBoost (XGB), Random Forest (RF), and Multi-layer Perceptron (MLP), to predict lung cancer risk and evaluate how interpretability is affected under class imbalance when compared against a balanced dataset. To our knowledge, this is the first study to evaluate explanation consistency under class imbalance across multiple models and interpretation methods using real-world clinical data. Results: Our main finding is that class imbalance in the training data can significantly affect the reliability and consistency of LIME and SHAP explanations when evaluated against models trained on balanced data. To explain these empirical findings, we also present a theoretical analysis of LIME and SHAP to understand why explanations change under different class distributions. It is also found that PDPs exhibit noticeable variation between models trained on imbalanced and balanced datasets with respect to clinically relevant features for predicting lung cancer risk. Discussion: These findings highlight a critical vulnerability in current XAI techniques, i.e., their interpretability are significantly affected under skewed class distributions, which is common in medical data and emphasises the importance of consistent model explanations for trustworthy ML deployment in healthcare.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Explainable artificial intelligence for cross domain evaluation of predictive models in multi-disease diagnosisDiscover Computing · 2026
- Application of explainable artificial intelligence integrating with electronic health record in oncologyExploration of Targeted Anti-tumor Therapy · 2026
- Explainability in Forecasting Hospital Readmissions with Machine Learning.Hospital topics · 2026
- Making Healthcare AI Explainable: A Structured Review of Methods and Clinical PracticeAppliedMath · 2026
- Beyond predictive performance: Interpretability challenges and feature importance bias in XGBoost-based readmission models.Geriatric nursing (New York, N.Y.) · 2026
- Leakage- and Label-Aware Benchmarking of Class-Imbalance Strategies for Multimodal Chest X-Ray and EHR ClassificationarXiv · 2026