cs.AIOct 13, 2026

Beyond ICD Codes: Semantic IDs for Generative Medical Coding

Authors: Yihang Cheng, Qian Zhang, Yonghui, Huang, Baoshuo Kan, Junyi Shen

Organizations: Andie · Massey University Palmerston North, New Zealand · South China Normal University Guangzhou, China · University of Otago Dunedin, New Zealand

Abstract

Generative approaches to automatic International Classification of Diseases (ICD) coding use large language models (LLMs) to predict ICD codes from clinical documents. However, original ICD code strings are not ideal generation targets because the ICD hierarchy does not always reflect clinical relationships, and LLMs struggle to interpret and generate these codes. We introduce SemICD, a framework that trains LLMs to generate Semantic IDs (SIDs) instead. SemICD constructs SIDs by hierarchically clustering embeddings of textual code profiles, allowing semantically related codes to share prefixes while each complete SID uniquely identifies one ICD code. To align the SID tokens with clinical semantics, we employ two auxiliary tasks for bidirectional generation between textual code profiles and SIDs. Experiments on MIMIC-III and MIMIC-IV with four LLMs show that SemICD outperforms direct code generation, improving Micro-F1 by 1.34-8.00 points. Our code is available at https://github.com/youwillbethebest/SemICD.

Figures & tables

Appendix figures & tables1 asset

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

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

    Aug 31, 2026Yihang Cheng, Veronica Liesaputra, Andrew TrotmanLong-Tailed ClassificationMulti-Label Classification

  2. Multimodal Dual-Encoder Retrieval for Automated ICD Coding

    Oct 3, 2026Abhinav Bohra, Anuj BohraAutomated Medical CodingMultimodal Learning