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

Explainable Prediction of Medical Codes from Clinical Text

James Mullenbach, Sarah Wiegreffe, Jon Duke, Jimeng Sun, Jacob Eisenstein

Introduction

Assigning International Classification of Diseases (ICD) codes to patient records is a critical but grueling task in healthcare, essential for billing, insurance, and research. Currently, human "coders" must manually sift through messy, jargon-heavy clinical narratives to find evidence for thousands of possible diagnoses and procedures. This task presents three major challenges: a massive label space (over 15,000 codes), noisy unstructured text filled with typos and abbreviations, and the "black box" problem where medical predictions require verifiable reasoning.

This paper introduces CAML (Convolutional Attention for Multi-Label classification), a neural network designed to automatically assign medical codes to clinical notes. By using a unique per-label attention mechanism, the model achieves state-of-the-art accuracy on massive label sets while providing "explainable" predictions by highlighting specific text snippets.

The CAML Architecture

The authors propose the CAML model to address the limitations of standard document classification. Its architecture consists of three main stages:

  1. Convolutional Layer: The model uses a CNN to aggregate local information (n-grams) across the document. This captures short, relevant phrases like "acute myocardial infarction."
  2. Per-Label Attention: Unlike standard models that compress a document into a single vector, CAML learns a distinct "attention" weight for every possible code. This allows the model to look at the same document through different lenses—searching for respiratory symptoms for one code while looking for surgical procedures for another.
  3. Description Regularization (DR-CAML): To handle rare codes, the authors regularize the model using official text descriptions of the codes. This forces the parameters for a code to be similar to the embeddings of its textual definition, effectively allowing the model to "read the manual" for diseases it has rarely seen.
Architecture of the CAML model featuring per-label attention.

Experimental Setup

The researchers evaluated their models on two versions of the MIMIC (Medical Information Mart for Intensive Care) dataset: MIMIC-II and MIMIC-III. The latter is the current gold standard, containing nearly 50,000 discharge summaries. The evaluation covered both the "Top-50" most frequent codes and the "Full" set (nearly 9,000 unique codes), providing a realistic and difficult benchmark.

Summary statistics for the MIMIC-II and MIMIC-III datasets.

Results and Insights

CAML significantly outperformed standard CNNs, GRUs, and logistic regression baselines. On the full MIMIC-III dataset (8,922 labels), CAML achieved a Precision@8 of 0.71 and a Micro-F1 of 0.54.

Beyond performance metrics, the model offers significant advantages in interpretability and efficiency:

  • Attention as an Explanation: By identifying which 4-grams had the highest attention weights, the model "highlights" evidence for human users. A physician evaluation confirmed that CAML's explanations were more informative than baseline methods.
  • Nuanced Representation: The per-label approach acknowledges that different diagnoses are triggered by different parts of a note, avoiding the "blurry" representation of single-vector document summaries.
  • Computational Efficiency: Despite the per-label attention, the convolutional approach proved more efficient than recurrent neural networks like LSTMs or GRUs.

Conclusion and Future Work

While CAML represents a major step forward, challenges remain in handling the "long tail" of zero-shot scenarios where codes never appeared in training. Future work may involve integrating the hierarchical structure of ICD codes (where 428.0 is a subtype of 428) and utilizing the structured sections of clinical notes (e.g., "History of Present Illness") to improve accuracy and context.

Summary updated

BibTeX
@inproceedings{mullenbach2018explainable,
  author = {James Mullenbach and Sarah Wiegreffe and Jon Duke and Jimeng Sun and Jacob Eisenstein},
  title = {{Explainable Prediction of Medical Codes from Clinical Text}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2018},
  doi = {10.18653/v1/n18-1100},
}
Figure