Related Experiment Video
Updated: Jan 9, 2026

Cross-Modal Multivariate Pattern Analysis
Published on: November 9, 2011
Evaluating XAI techniques under class imbalance using CPRD data
Teena Rai1, Jun He1, Jaspreet Kaur2
1Department of Computer Science, Nottingham Trent University, Nottingham, United Kingdom.
Introduction:
The need for eXplainable Artificial Intelligence (XAI) in healthcare is more critical than ever, especially as regulatory frameworks such as the European Union Artificial Intelligence (EU AI) Act mandate transparency in clinical decision support systems. Post hoc 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.
Related Concept Videos
Interpreting X̄ Charts
An x̄ chart plots the values of individual measurements over time against control limits calculated from historical data. The central line...
The X̄ Chart
The x̄ chart, often known as the individual control chart, is a crucial tool in statistical process control. It is designed to monitor process behavior and performance over time and is widely used in various industries to ensure that processes are operating at their optimum capacity and within specified limits.
A x̄ chart is constructed by plotting individual measurements of a quality...
Testing a Claim about Population Proportion
There are two methods of testing a claim about a population proportion: (1) Using the sample proportion from the data where a binomial distribution is approximated to the normal distribution and (2) Using the binomial probabilities calculated from the data.
The first method uses normal distribution as an approximation to the binomial distribution. The requirements are as follows: sample size is large...
The Ratio of X Chromosome to Autosomes
Normal male Drosophila has a ratio of one X chromosome to two sets of autosomes. In contrast, normal female...
One-Way ANOVA: Unequal Sample Sizes
Quantifying and Rejecting Outliers: The Grubbs Test

