NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Towards Automated ICD Coding Using Deep Learning

Haoran Shi, Pengtao Xie, Zhiting Hu, Ming Zhang, Eric P. XingarXiv 2017

Introduction

Medical coding—the process of assigning International Classification of Diseases (ICD) codes to clinical notes—is a critical yet labor-intensive task in healthcare administration. Human coders must navigate a vast "language gap" between informal physician shorthand and formal medical terminology, a process that costs billions annually due to errors and inefficiencies. This paper presents a hierarchical deep learning framework designed to automate this mapping by bridging the semantic divide between clinical narratives and formal ICD definitions.

Methodology: Hierarchical Neural Architecture

The authors propose a multi-stage neural architecture to automate the translation of narrative discharge summaries into structured codes.

The hierarchical neural architecture featuring character, word, and sentence representations coupled with an attention mechanism.

As shown in the architecture diagram, the system utilizes a Hierarchical Encoding approach. First, a character-level LSTM captures the morphology of medical terms, which is particularly effective for handling typos and medical suffixes. These representations feed into a word-level LSTM to generate sentence representations. Uniquely, the model also encodes the actual text of ICD code titles, treating the task as a semantic matching problem rather than simple classification. Finally, a Soft-attention mechanism allows the model to "focus" on multiple relevant parts of the clinical text simultaneously to justify a specific code assignment.

Dataset and Experimental Setup

The study utilized the MIMIC-III dataset, extracting over 59,000 diagnosis descriptions from 11,523 hospital admission records. Due to the extreme sparsity of rare diseases, the researchers focused their study on the 50 most frequent ICD codes to ensure sufficient training data.

Distribution of ICD code frequency, highlighting the sparsity and "long tail" nature of medical coding data.

Key Results and Insights

The soft-attention model was the clear winner in performance, achieving an F1 score of 0.532 and an AUC-ROC of 0.900. Several key insights emerged from the evaluation:

  • Characters Matter: The character-level LSTM acted as an automatic spell-checker, successfully mapping typos like "Ischmia" and "Pnuemonia" to their correct concepts by analyzing letter sequences.
  • Attention Mimics Human Reasoning: The mechanism effectively replicates how a human coder scans a document, "highlighting" specific phrases (e.g., focusing on "Hyperbilirubinemia" to assign a code for "Neonatal jaundice") while ignoring irrelevant text.
  • Semantic Labeling: By encoding the titles of the ICD codes, the model treats the task as a matching problem, making the system more robust and potentially easier to extend to new codes.

Conclusion and Future Work

While the model shows high discriminative power, the "long tail" problem remains a challenge; thousands of rare ICD codes lack the data density required for standard deep learning. Future iterations may leverage the inherent hierarchical structure of the ICD system to improve the classification of these rarer, more specific codes. Despite these hurdles, the hierarchical attention framework represents a significant step toward reducing the $25 billion annual cost of medical coding errors.

Summary updated

BibTeX
@misc{shi2017towards,
  author = {Haoran Shi and Pengtao Xie and Zhiting Hu and Ming Zhang and Eric P. Xing},
  title = {{Towards Automated ICD Coding Using Deep Learning}},
  year = {2017},
  eprint = {1711.04075},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1711.04075},
}
Figure