A Two-Stage Decoder for Efficient ICD Coding (2023)

Abstract: Clinical notes in healthcare facilities are tagged with the International Classification of Diseases (ICD) code; a list of classification codes for medical diagnoses and procedures. ICD coding is a challenging multilabel text classification problem due to noisy clinical document inputs and long-tailed label distribution. Recent automated ICD coding efforts improve performance by encoding medical notes and codes with additional data and knowledge bases. However, most of them do not reflect how human coders generate the code: first, the coders select general code categories and then look for specific subcategories that are relevant to a patient’s condition. Inspired by this, we propose a two-stage decoding mechanism to predict ICD codes. Our model uses the hierarchical properties of the codes to split the prediction into two steps: At first, we predict the parent code and then predict the child code based on the previous prediction. Experiments on the public MIMIC-III data set have shown that our model performs well in single-model settings without external data or knowledge.

## introduction medical records and clinical documentation contain critical information about patient care, disease progression, and medical operations. after a patient's visit, medical coders process them and extract key diagnoses and procedures according to the international classification of diseases (icd) system @xcite . such codes are used for predictive modeling of patient care and health status, for insurance claims, billing mechanisms, and other hospital operations @xcite . although the healthcare industry has seen many innovations, many challenges related to manual operations still remain. one of these challenges is manual icd coding, which requires understanding long and complex medical records with a vast vocabulary and sparse content. coders must select a small subset from a continuously expanding set of icd codes (from around 15,000 codes in icd 9 to around 140,000 codes in icd 10 (who, 2016)). therefore, manual icd coding may result in errors and cause revenue loss or improper allocation of care-related resources. thus, automated icd coding has received attention not only from the industry but also from the academic community. before the rise of deep learning methods, automated icd coding methods applied rules or decision tree-based methods @xcite . the focus has now changed to neural networks using two strands of approaches. the first encodes medical documents using pretrained language models @xcite , adapts pretrained language models to make them suitable for the clinical domain @xcite or injects language models with medical knowledge such as taxonomy, synonyms, and abbreviations of medical diseases @xcite . the second improves the representation of pretrained language models, by capturing the relevance between the document and the label metadata such as their descriptions @xcite @xcite , cooccurrences @xcite , hierarchy @xcite @xcite , or thesaurus knowledge, such as synonyms @xcite . although these approaches are supposed to alleviate problems specific to medical coding such as special vocabulary, a large set of labels, etc., they fall short. intuitively, human coders generate the code in two stages: first, the coders select the general codes and then look for specific subcategories that are relevant to a patient's condition. the advantage of adapting this approach to neural networks is that at each stage of the prediction, we deal with a smaller output space and we can have more confidence when predicting the next stage. therefore, in this paper, we introduce a simple two-stage decoding framework foot_0 for icd coding to mimic the processes of human coders. our approach leverages the hierarchical structure of the icd codes to decode, i.e., having parent-child relationships. the first stage predicts the parent codes; the second stage uses the document representation and the predicted parent codes to predict the child codes. experiments with mimic-iii data sets demonstrate the effectiveness of our proposed method. in particular, our simple method outperforms models that use external knowledge and data. since our models (figure 1 ) are based on lstms, they require less computing power and can be trained faster than other larger models. this factorization allows us to compute the prediction scores of the parent codes first, and then, conditioned on them and the document, we can obtain the prediction score of the child codes. therefore, we can model the icd coding task using a decoder framework where we generate parent labels before predicting child labels. in this case, we adapt the decoder framework to the multilabel problem setting, where at each decoding stage, we predict multiple labels at once, instead of one label at a time like a standard decoder. ## conclusion in this paper, we have presented a novel, simple but effective two-stage decoding model that leverages the hierarchical structure of the icd codes to decode from parent-level codes to child-level codes. experiments on the mimic-iii data set show that our model outperforms other single-model work and achieves on-par results with models using external data/knowledge. our ablation studies validate the effectiveness of our model in predicting the code hierarchy and codes in different frequency groups. in future work, we intend to integrate our decoder with a better document or label representation to further improve performance.