ICDAGENT: Empowering Agentic Large Language Models for Explainable Medical Coding
Ziyi Yin, Yuanpu Cao, Ting Wang, Jinghui Chen, Fenglong Ma
Abstract
The explainable medical coding task aims to automatically assign International Classification of Diseases (ICD) codes to clinical notes while providing explicit justifications for each assignment. Recent approaches employ large language models (LLMs) to generate such explanations. However, their performance remains limited due to a lack of understanding of the clinical meanings of ICD codes. Additionally, the vast ICD code space further complicates the task of accurate prediction. To address these challenges, we propose the ICDAGENT framework, which consists of two collaborative LLM agents: a coding agent and a critical agent. The coding agent extracts ICD codes and generates preliminary rationales, while the critical agent performs fine-grained chain-of-thought reasoning to verify and refine them. Furthermore, the critical agent is trained with a rationaleaware reward, combined with reinforcement learning, enabling it to distinguish between correct and incorrect reasoning and ensure explanation accuracy. Experiments across multiple ICD coding standards and datasets demonstrate that ICDAGENT achieves effective ICD coding with accurate and trustworthy explanations. 1 * Corresponding author. 1 The source code will be available at https://github. com/ericyinyzy/ICDAGENT.git . 15 20 25 30 35 40 45 40 43 46 49 52 55 58 Precision (%) Recall (%) Claude-4-Sonnet Claude-3.7-Sonnet Gemini-2.5-Pro Gemini-2.5-Flash GPT-5-Chat (Azure) GPT-4o (Azure) ICDAGENT (Ours) LoRA Fine-tuning HuatuoGPT-o1-8B Clinical Note 𝐓𝐓
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 8d7f8d96-71e5-49af-bfc4-04fca9bb2431Builds on8
- LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
- ICD Coding from Clinical Text Using Multi-Filter Residual Convolutional Neural NetworkFei Li, Hong YuAAAI 2020 · 201 citations
- HyperCore: Hyperbolic and Co-graph Representation for Automatic ICD CodingPengfei Cao, Yubo Chen, Kang Liu, Jun Zhao et al.ACL 2020 · 104 citations
- HybridFlow: A Flexible and Efficient RLHF FrameworkGuangming Sheng, Chi Zhang, Zilingfeng Ye, Xibin Wu et al.EuroSys 2025 · 61 citations
- MDACE: MIMIC Documents Annotated with Code EvidenceHua Cheng, Rana Jafari, April Russell, Russell Klopfer et al.ACL 2023 · 11 citations
Related papers
- EHRAgent: Code Empowers Large Language Models for Few-shot Complex Tabular Reasoning on Electronic Health RecordsWenqi Shi, Ran Xu, Yuchen Zhuang, Yue Yu et al.EMNLP 2024 · 33 citations
- MEDDxAgent: A Unified Modular Agent Framework for Explainable Automatic Differential DiagnosisDaniel Philip Rose, Chia-Chien Hung, Marco Lepri, Israa Alqassem et al.ACL 2025 · 14 citations
- From Model Diagram to Code: A Benchmark Dataset and Multi-Agent FrameworkMengzhen Wang, Xunbin Huang, Jiayuan Xie, Shukai Ma et al.ACM MM 2025 · 1 citation
- Reinforcement Learning for Out-of-Distribution Reasoning in LLMs: An Empirical Study on Diagnosis-Related Group CodingHanyin Wang, Zhenbang Wu, Gururaj Kolar, Hariprasad Korsapati et al.NeurIPS 2025 · 7 citations
- CodeAgent: Enhancing Code Generation with Tool-Integrated Agent Systems for Real-World Repo-level Coding ChallengesKechi Zhang, Jia Li, Ge Li, Xianjie Shi et al.ACL 2024
