arXiv:2608.30234cs.AIAug 2026

Manuscript Offprint

arXiv:2608.30234

CoLa-ICD: A Knowledge-Enhanced Framework for Long-Tail Automated Medical Coding

Yihang Cheng, Veronica Liesaputra, Andrew Trotman

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Automatic medical coding assigns ICD codes to clinical notes, but it remains challenging due to long documents, imbalanced label distributions, and diverse terms. These challenges are especially severe for rare codes, which have limited training instances and are easily confused with semantically similar labels. We introduce CoLa-ICD, a knowledge-enhanced framework for long-tail prediction. CoLa-ICD enriches ICD labels with external terms, models dependencies among related codes, and learns stronger alignment between label semantics and clinical evidence for long-tail prediction. Experiments show that CoLa-ICD improves long-tail prediction with larger gains in larger and sparser label spaces and achieves state-of-the-art performance in AUC, F1, and P@k. Our code is available at https://github.com/youwillbethebest/Cola-ICD.

1 Introduction

The International Classification of Diseases (ICD) 1^{1} creates a standard system for medical billing, epidemiology, and clinical analytics (Ellis et al., 2020; Feinstein et al., 2023). Automated medical coding (AMC) aims to assign multiple ICD codes to discharge summaries, posing a challenging multilabel classification problem (Stanfill et al., 2010). AMC remains difficult for two reasons (Edin et al., 2023; Huang et al., 2022). First, ICD codes follow a highly long-tailed distribution (Figure 1), with more than half appearing fewer than 10 times, making long-tail codes extremely hard to learn. Predicting long-tail ICD codes is vital for capturing rare diseases and precise clinical details that common codes overlook, ensuring equitable care and accurate medical billing. Second, clinical notes are long (1,500–2,000 words), but each ICD code is often supported by only a few localized, semantically

ICD Code Frequency Distribution (MIMIC-IV)

Figure

Figure 1: Frequency distribution of ICD codes in MIMIC-IV: Most codes occur fewer than 10 times, illustrating the long-tailed nature of the ICD coding task.

dense cues, such as a diagnosis mention, procedure phrase, medication, or abnormal finding. Figure 2 illustrates another challenge: clinical notes may express the same concept using wording that differs from the official ICD description. For example, “History of tobacco use” could be written as “former smoker” or “quit tobacco”. This mismatch is particularly detrimental for long-tail codes, whose semantics must be inferred from a limited number of training instances.

Recent research (Ji et al., 2024; Li et al., 2025) leverages external medical knowledge to improve automated coding. Existing approaches fall into two groups: Large Language Models (LLMs) and static, task-specific methods. LLMs (e.g., ChatGPT (Achiam et al., 2024) and Gemini (Anil et al., 2025)) provide strong medical knowledge and flexible generation. However, directly applying these generative models often leads to overfitting on high-frequency codes and generating hallucinated or incorrect codes (Falis et al., 2024; Soroush et al., 2024; Hou et al., 2025). Task-specific methods use fixed synonyms (Yuan et al., 2022; Gomes et al., 2024) or rigid hierarchical graphs (Yang et al., 2022; Zhang et al., 2025) to ground predictions. They fail to capture the diverse abbreviations, standard terms, and informal expressions found in real-world clinical notes. Furthermore, relying solely on static hierarchical distances offers limited improve-

∗^{*}Corresponding author.

1^{1}https://www.who.int/standards/classifications/classificationof-diseases ment for long-tail labels, leaving models prone to confusing rare codes with similar frequent ones (Zhou et al., 2021).

ICD CodeDischarge Summary
309.81 Posttraumatic stress disorderHistory of Present IllnessHCV cirrhosis c/b ascites, hiv on ART, h/o IVDU, COPD, bioplar, PTSD,
070.70 Unspecified viral hepatitis C without hepatic comapresented from OSH EDPast Medical History
296.80 Bipolar disorder, unspecified1.HCV Cirrhosis2. No history of abnormal Pap smears.
496 Chronic airway obstruction, not elsewhere classified....6. Past history of smoking....
V15.82 Personal history of tobacco use11. Bipolar affective disorder, currently manic, mild, and PTSD.

Figure 2: A discharge summary with ICD-9 codes. Colored spans show the short evidence for each label.

To address these limitations, CoLa-ICD combines LLM-generated terms, co-occurrence relations, and label-aware contrastive learning to improve evidence-label alignment for long-tail codes.

Our contributions are summarized as follows:

  • We propose a knowledge-enhanced framework that enriches label representations with LLM-generated terms, integrates a co-occurrence GNN to infuse code relations, and uses multi-head term attention to retrieve supporting evidence from clinical text. This is particularly beneficial for long-tail codes.

  • We introduce a label-aware contrastive learning module that aligns clinical evidence with enriched label representations. This mechanism enforces evidence–label consistency and mitigates the bias toward high-frequency codes. This is critical for identifying long-tail and semantically similar labels.

  • We achieve state-of-the-art performance on ICD-9 and ICD-10 benchmarks, with robust improvements on long-tail codes.