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

Entity Anchored ICD Coding

Jay DeYoung, Han-Chin Shing, Luyang Kong, Christopher Winestock, Chaitanya Shivade

TL;DR

Researchers from Northeastern University and Amazon have developed a new "entity-anchored" approach to medical coding that treats the problem as a ranking task rather than a simple classification one. By focusing on local contexts around medical entities and incorporating textual code descriptions, their model significantly outperforms existing baselines, particularly when dealing with rare or entirely unseen ICD-10 codes.

What Problem Does This Paper Address?

Medical coding—the process of assigning standardized International Classification of Diseases (ICD) codes to clinical notes—is a massive bottleneck in healthcare. With over 72,000 possible ICD-10-CM codes, the "output space" is enormous.

Current state-of-the-art models, like Convolutional Attention for Multi-Label classification (CAML), face two major hurdles:

  1. The Long Document Problem: Clinical notes are often too long for standard Transformer models (like BERT) to process in one go.
  2. The "Cold Start" for Rare Codes: Traditional models learn a fixed representation for each code during training. If a code appears rarely—or not at all—in the training data, the model cannot predict it. In practice, about 30% of codes in a test set might be "unseen" during training, leading to a total failure for traditional classifiers.

Methods

The authors propose an Entity Anchored approach. Instead of reading the whole document to find codes, the model "anchors" its search to specific medical entities (like "seizures" or "nausea") identified by an extraction tool (Amazon Comprehend Medical).

The architecture evolves through three stages:

  • Base Model (BERT): It takes a small window of text around an entity and concatenates it with the textual description of a candidate ICD code. By "reading" the code's definition, the model can make an educated guess even if it has never seen that specific code number before.
  • Longformer Models: To capture broader context, they use a Longformer architecture, which allows for "global attention" across distant parts of the document while maintaining local focus.
  • Aggregation Model: This is the most sophisticated version. It encodes multiple instances of the same code found throughout a document, aggregates those representations using self-attention, and then makes a final document-level relevance decision.

Crucially, they introduce a Ranking Loss component. Since medical billing requires a ranked list of codes (usually the top 12), the model is trained to push "relevant" codes higher than "irrelevant" ones, rather than just treating every code as an independent yes/no question.

Datasets

The study utilized two primary English-language clinical datasets:

  1. MIMIC-III: A standard public dataset of discharge summaries, which the authors' team re-annotated for ICD-10-CM (as the original only had ICD-9).
  2. Internal Dataset: De-identified documents from outpatient settings.

Both datasets were "doubly-annotated" by professional medical coders to ensure a high-quality ground truth for both the codes and the specific entities that justify them.

Key Insights and Ideas

  • Descriptions as Features: The "aha moment" here is treating the ICD code description as an input feature rather than a label. This transforms the task from "memorizing 72,000 labels" to "matching clinical text to a definition," which is exactly how human coders work.
  • Zero-Shot Capability: Because the model understands the meaning of the codes, it can predict codes it has never seen in the training set. In their tests, the baseline CAML model scored 0% on unseen codes, while the entity-anchored models achieved F1 scores as high as 78%.
  • Ranking Matters More Than Classification: In a real-world billing workflow, a human needs to see the most important codes first. The authors argue that metrics like NDCG (Normalized Discounted Cumulative Gain) are more representative of a system's utility than standard F1 scores.

Key Results

The Aggregation Model was the clear winner across almost all metrics:

  • Superiority over Baselines: On the MIMIC-III dataset, the Aggregation Model achieved an NDCG@12 of 61.03, compared to just 14.55 for the CAML baseline.
  • Precision at 1 (P@1): The model correctly identified the "primary" diagnosis code as its top choice 54.55% of the time on MIMIC-III, whereas the baseline managed only 18.18%.
  • Handling the Long Tail: For "unseen" codes in the internal dataset, the Entity-Based Longformer achieved an F1 of 78.33, effectively solving a problem that renders traditional models useless in clinical practice.

Limitations and Future Work

The primary limitation is the pipeline dependency: the model relies on an initial step to extract medical entities and candidate codes. If the entity extractor misses a symptom, the ranker will never see it.

The authors also noted that while the Ranking Loss was theoretically sound, it didn't provide a universal improvement across all datasets, suggesting that the interpolation between classification loss and ranking loss needs more fine-tuning. Future work may involve end-to-end training where the entity extraction and code ranking are optimized simultaneously.

Summary updated

BibTeX
@inproceedings{deyoung2022entity,
  author = {Jay DeYoung and Han-Chin Shing and Luyang Kong and Christopher Winestock and Chaitanya Shivade},
  title = {{Entity Anchored ICD Coding}},
  booktitle = {Amia},
  year = {2022},
}
Figure