← Latest papers
🤖 machine learning

FeatEHR-LLM: Leveraging Large Language Models for Feature Engineering in Electronic Health Records

FeatEHR-LLM is a privacy-preserving framework that utilizes Large Language Models and tool-augmented generation to automatically produce clinically meaningful, executable feature-extraction code from irregularly sampled and sparse Electronic Health Record (EHR) time series.

Original authors: Hojjat Karami, David Atienza, Jean-Philippe Thiran, Anisoara Ionescu

Published 2026-04-27
📖 4 min read☕ Coffee break read

Original authors: Hojjat Karami, David Atienza, Jean-Philippe Thiran, Anisoara Ionescu

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 a master chef trying to create the perfect recipe for a complex, multi-course meal. However, there’s a catch: your ingredients arrive at your kitchen at completely random times. Sometimes the salt arrives in five minutes; sometimes the steak doesn't show up for three hours. Even worse, some ingredients are missing entirely, and you don't know if they were forgotten or if they just weren't needed for that specific dish.

In the world of medicine, Electronic Health Records (EHRs) are like those chaotic ingredients. A patient’s data (heart rate, blood sugar, oxygen levels) doesn't come in a neat, rhythmic beat. It’s "irregularly sampled"—doctors only take measurements when something happens. This makes it incredibly hard for standard computers to "cook" a reliable prediction about whether a patient is getting better or worse.

This paper introduces FeatEHR-LLM, a new way to organize this kitchen chaos using the "brainpower" of Large Language Models (like ChatGPT).

The Problem: The "Messy Kitchen" of Medical Data

Most AI models are like rigid robots. They expect data to be perfectly organized in rows and columns, like a neatly laid out spreadsheet. When they encounter the "messy kitchen" of real hospital data—where a heart rate might be recorded every minute, but a blood test only happens once a day—the robots get confused. They either try to "guess" the missing data (which can be dangerous) or they simply fail to see the patterns.

The Solution: The "Expert Sous-Chef" (FeatEHR-LLM)

Instead of forcing a rigid robot to work, the researchers decided to hire an Expert Sous-Chef (the LLM).

Here is how the Sous-Chef works:

  1. Privacy First (The "Recipe-Only" Rule): To protect patient privacy, the Sous-Chef never actually sees the "raw meat" (the actual sensitive patient names or private records). Instead, they are only shown the "Menu" (the Data Schema). They see: "We have a variable called 'Heart Rate' measured in beats per minute." This way, the AI learns how to cook without ever knowing who the diner is.
  2. Writing the Instructions (Code Generation): Instead of doing the math themselves, the Sous-Chef writes customized instruction manuals (Python code). They say: "If the heart rate is jumping up and down wildly every ten minutes, write down a 'Stability Score' of 2."
  3. Univariate & Multivariate Thinking (The "Flavor Profile"):
    • Univariate (Single Ingredient): The Sous-Chef looks at one thing at a time. "How much is the sugar level fluctuating?"
    • Multivariate (The Whole Dish): This is where the magic happens. The Sous-Chef understands how ingredients interact. They might ask: "How is the relationship between blood pressure and oxygen levels changing?" This is like a chef knowing that if the sauce is too salty, you need more acid to balance it.
  4. The Validation Loop (The "Taste Test"): The Sous-Chef writes the code, runs it, and if the code crashes or makes no sense, they fix it. They keep refining their "recipes" until they work perfectly.

Why does this matter?

By using an LLM to turn messy, irregular time-series data into clean, meaningful "features" (like "Organ Stability Score" or "Respiratory Stress Level"), the researchers found they could predict patient outcomes much more accurately.

In their tests, this method beat almost all the old "robotic" ways of doing things, sometimes improving accuracy by as much as 6%. In a hospital setting, a 6% improvement in predicting a crisis can literally be the difference between life and death.

Summary in a Nutshell

FeatEHR-LLM takes a "smart" AI, shows it the structure of medical data (but not the private details), and asks it to write clever, custom math formulas that can handle the messy, unpredictable timing of real-world hospital monitoring. It turns a chaotic pile of timestamps into a clear, organized dashboard for doctors.

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 →