← Latest papers
🤖 AI

Hierarchical Modeling of ICD Codes in EHR Foundation Models

This paper demonstrates that explicitly incorporating the hierarchical structure of ICD-10-CM codes into EHR foundation models, through either token augmentation or graph-based edge injection, significantly improves both in-domain and cross-dataset clinical prediction performance compared to treating codes as flat tokens.

Original authors: Megha Thukral, Dong Gyun Kang, Rudra Pratap Singh, Shruthi Kashinath Hiremath, Katrin Hänsel, Thomas Plötz

Published 2026-06-16
📖 4 min read☕ Coffee break read

Original authors: Megha Thukral, Dong Gyun Kang, Rudra Pratap Singh, Shruthi Kashinath Hiremath, Katrin Hänsel, Thomas Plötz

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are trying to teach a computer how to understand a patient's medical history. The computer reads a long list of codes (like "S72.001A") that doctors use to describe illnesses.

The Problem: The "Flat" View
Currently, most computer models treat these codes like a list of random, unrelated words. It's as if the computer sees "Apple," "Car," and "Zebra" as three completely separate items with no connection. In reality, medical codes are organized like a massive, detailed family tree. A code for a specific type of broken leg is part of a "leg injury" group, which is part of a "bone injury" group, which is part of the "injury" family.

The paper argues that by ignoring this family tree, computers are missing a huge clue about how diseases are related.

The Solution: Two New Ways to Teach the Computer
The researchers tried two different methods to force the computer to respect this family tree structure:

  1. The "Label Sticker" Method (HICD-BERT):
    Imagine you have a box of toys. Instead of just writing "Toy" on the box, you add stickers that say "Toy," "Action Figure," "Superhero," and "Batman."
    In this method, the computer doesn't just see the specific code; it also sees "stickers" representing the broader categories the code belongs to. It learns that a specific code is part of a bigger group, just like seeing the "Batman" sticker helps you understand the toy better.

  2. The "Social Network" Method (HICD-Graph):
    Imagine drawing a map where every disease is a city. Usually, you only draw roads between cities that often appear together in the same patient's record.
    In this method, the researchers added extra roads to the map. They drew lines connecting a specific disease city to its "parent" cities (the broader groups) based on the official medical family tree. This creates a hybrid map that knows both which diseases happen together and how they are related by definition.

What They Found
The researchers tested these methods on two huge databases of real patient records (one from Boston hospitals and one from ICUs across the US).

  • Better Predictions: In almost every test, the models that used the "family tree" structure were better at predicting future health events (like if a patient would be readmitted to the hospital or if they needed emergency care) than the models that ignored the structure.
  • The "Goldilocks" Zone: They found that the "best" level of detail depends on the job.
    • For the "Label Sticker" method, the most specific details (the finest level of the tree) were usually the most helpful.
    • For the "Social Network" method, using all levels of the tree (from the broadest family down to the specific code) worked best.
  • The "Traveling" Test: They trained the computer on one set of hospital data and then asked it to predict outcomes for a completely different set of hospitals it had never seen before.
    • The "Social Network" method traveled very well; it kept its accuracy because it learned the universal rules of how diseases are related.
    • The "Label Sticker" method struggled to travel; it seemed to have memorized the specific habits of the first hospital rather than the general rules of medicine.

The Bottom Line
The paper concludes that medical codes aren't just random labels; they are a structured language. By explicitly teaching computers to understand the "family tree" of these codes, we can build smarter, more reliable AI that understands the context of a patient's illness, not just the isolated facts. The researchers showed that you don't need to completely rebuild the computer's brain to do this; you just need to add a few "guideposts" (stickers or extra roads) to help it navigate the medical landscape.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →