An exploratory data analysis: the performance differences of a medical code prediction system on different demographic groups (2022)

Abstract: Recent studies show that neural natural processing models for medical code prediction suffer from a label imbalance issue. This study aims to investigate further imbalance in a medical code prediction dataset in terms of demographic variables and analyse performance differences in demographic groups. We use sample-based metrics to correctly evaluate the performance in terms of the data subject. Also, a simple label distance metric is proposed to quantify the difference in the label distribution between a group and the entire data. Our analysis results reveal that the model performs differently towards different demographic groups: significant differences between age groups and between insurance types are observed. Interestingly, we found a weak positive correlation between the number of training data of the group and the performance of the group. However, a strong negative correlation between the label distance of the group and the performance of the group is observed. This result suggests that the model tends to perform poorly in the group whose label distribution is different from the global label distribution of the training data set. Further analysis of the model performance is required to identify the cause of these differences and to improve the model building.

## introduction medical coding is the process of assigning standard codes, such as the international classification of diseases (icd) codes, to each clinical document for documenting records and medical billing purposes. even though medical coding is an important process in the healthcare system, it is expensive, time-consuming, and error-prone @xcite . researchers have investigated approaches for automated icd coding systems and there has been great progress with neural network architectures @xcite . however, current state-of-the-art models still suffer from data imbalance issues: since the benchmark dataset is imbalanced in terms of assigned icd codes, the model performances differ across icd codes @xcite @xcite @xcite . moreover, a recent study argues that the performances of models tend to decrease when the icd codes have fewer training instances @xcite . based on this observation from the literature (i.e., imbalanced icd code distribution results in the performance imbalance between the icd codes), the goal of this paper is to investigate the effect of the imbalance of different demographic groups in the training data set on the performances of the demographic groups. more specifically, we study the following questions: 1) is a benchmark dataset for medical code prediction imbalance in terms of the data subject's demographic variables (i.e., age, gender, ethnicity, socioeconomic status)?; 2) if so, would it result in performance differences between demographic groups? to answer these questions, we analyse the benchmark dataset, reproduce one of the state-of-the-art models @xcite , and analyse the performance of the model. to the best of our knowledge, this is the first attempt to study the demographic imbalance of the medical code prediction benchmark dataset and analyse the performance differences between demographic groups. our contribution is three-fold. firstly, we analysed the medical code prediction benchmark dataset to investigate the underlying imbalance in the dataset (section 4.1) and reproduced one of the state-of-the-art medical code prediction models proposed by @xcite . secondly, we propose sample-based evaluation metrics (section. 3.4) to identify potential biases inside a model and potential risk of the bias (section. 4.2). thirdly, we propose a simple label distance metric to quantify the differences in the label distribution between each group and the global data (section. 3.2) and found that the label distance metric is strongly correlated with the performance negatively (section. 4.3). we expect that these analytic results could provide a valuable insight to the natural language processing (nlp) research community working for clinical applications. ## data this section includes the information on the benchmark dataset used and the details of pre-processing steps taken for preparing data for the experiments. note that we followed the previous approach to reproduce the result from the literature. more details are explained in the following subsections. ## discussion impact of the study. the mimic-ii dataset for medical code prediction provides opportunities to develop and benchmark models and facilitates natural language processing research in the clinical domain. since it is one of the most frequently used benchmark datasets for medical code prediction, it has a huge impact on the quality of the developed models. for example, previous studies @xcite @xcite @xcite have shown that the icd code distribution in the mimic-iii dataset is imbalanced and it results in performance differences between icd codes. in this study, we investigated the data imbalance of the mimic-iii 50 data, in terms of the data subject's demographic factors, and its effect on the model performance for icd code prediction. evaluation metrics for fairness. in this paper, we proposed metrics that can correctly evaluate the model's performance in terms of individual patients' benefits and potential harms. especially, we formulated the medical code prediction task as a multi-label classification task. from a machine learning perspective, sample-based metrics and label-based metrics are used to evaluate the performance of a model in a multi-label classification task @xcite . sample-based and label-based metrics focus on different aspects of model performance, one in sample-wise performance and the other in label-wise performance. however, label-based metrics are more frequently used in the literature @xcite @xcite @xcite . considering a healthcare application setting where all patients are expected to receive an equal quality of service, we argue that using sample-based metrics is required to evaluate the model performance. also, we propose to use disaggregated metrics @xcite , which are metrics evaluated on each group of data, to ensure that a model is equally accurate for patients from different demographic groups @xcite . ## conclusion in this study, we performed an empirical analysis to investigate the data imbalance of the mimic-iii 50 dataset and its effect on the model performance for icd code prediction. we found that demographic imbalance exists in the mimic-iii 50 dataset and a medical code prediction model performs differently across some demographic groups. interestingly, the correlation between the number of training data of the group and the performance of the group is weak. instead, we found a negative correlation between the label distance of the group and the performance of the group. this result suggests that the model tends to perform poorly in the group whose label distribution is different from the global label distribution. potential future research direction includes further analysis of the main effects of the data subject's demographic factors on the model performance and investigation of building a robust and fair model that can perform equally well across demographic groups with different label distributions.