← Latest papers
📄 health informatics

Forecasting laboratory measurements from longitudinal electronic health records

The paper introduces LaBERT, a transformer-based model that significantly outperforms baseline methods in forecasting future laboratory measurements from longitudinal electronic health records by effectively learning clinically meaningful treatment effects and enabling personalized clinical decision support.

Original authors: Firoozbakht, F., Baumabach, J.

Published 2026-08-13
📖 6 min read🧠 Deep dive

Original authors: Firoozbakht, F., Baumabach, J.

Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). ⚕️ This is an AI-generated explanation of a preprint that has not been peer-reviewed. It is not medical advice. Do not make health decisions based on this content. Read full disclaimer

Imagine you are trying to guess what the weather will be like next week. You could just look at the sky right now and say, "It's sunny, so it will probably be sunny tomorrow." That's a decent guess, but it misses the bigger picture. What if a storm system is moving in from the west? What if it's been raining for three days straight? To get it right, you need to look at the whole story: the history of the weather, the temperature trends, and even what the forecasters said yesterday.

In the world of medicine, doctors face a similar puzzle. They have a patient's "medical weather report," which is a long list of numbers and notes called Electronic Health Records (EHRs). These records track things like blood test results, medications, and how a patient feels over time. The big question is: Can we use this messy, complicated history to predict what a patient's health numbers will look like at their next doctor's visit? If we could do this, it would be like having a crystal ball that helps doctors spot trouble before it happens, allowing them to tweak treatments just in time. This is the challenge of "forecasting" patient health, and it's tricky because every person's body reacts differently, and the data is often messy and full of gaps.

Enter LaBERT, a new computer brain designed by researchers Farzaneh Firoozbakht and Jan Baumbach to solve this exact puzzle. Think of LaBERT as a super-smart detective who doesn't just look at the latest clue (the most recent blood test) but reads the entire case file. This detective is trained on a massive library of real-world medical records from over 255,000 patients, containing more than half a million hospital visits.

Here is how LaBERT works and what it found:

The Detective's Toolkit
Most computer models try to turn a patient's history into a simple list of words, like a storybook. But LaBERT is different. It treats different types of medical data in their own special way. It knows that a medication name is different from a blood pressure number. Instead of squashing everything into text, it uses a special "translation" system that keeps the numbers as numbers and the drug names as names, letting the model understand the unique shape of each piece of information.

Crucially, LaBERT doesn't just look at one visit in isolation. It uses a "memory lane" system. Imagine a hiker leaving a backpack at every campsite. When the hiker reaches the next campsite, they don't just look at the new spot; they check the backpacks from all the previous campsites to see where they've been and where they might be going. LaBERT does this by combining the current visit with a "latent history" of all previous visits. The researchers tested three ways to carry this backpack: just adding the old info, using a "gate" to decide how much old info to keep, or using a complex memory cell. They found that the "gate" method worked best, allowing the model to adaptively balance what happened yesterday with what is happening today.

The Results: Better Than the Basics
The team tested LaBERT against some simpler methods. One was the "baseline" approach, which just assumes your next blood test will be exactly the same as your last one. Another was a standard computer model (MLP) that didn't have the fancy "memory" or "translation" skills.

The results were clear: LaBERT won.

  • It reduced the average error in its predictions (Mean Squared Error) from 0.77 down to 0.53.
  • It improved its ability to explain the changes in a patient's health (the R² score) from 0.29 to 0.51.

This means LaBERT isn't just guessing; it's actually learning the complex dance between a patient's history, their treatments, and their future health.

Does it actually understand medicine?
To make sure LaBERT wasn't just memorizing patterns without understanding them, the researchers played a game of "what if." They took real patient records and swapped the actual medications with random, fake ones. They found that in 81% of the cases, the model predicted the future health state much more accurately when it used the real medications than when it used the fake ones. This suggests LaBERT has learned that specific drugs lead to specific changes in the body.

They took this even further with a "counterfactual" experiment. They asked the model: "If this patient took Warfarin (a blood thinner), what happens to their INR (a blood clotting number)?" and "If they took Heparin, what happens to their PTT?"

  • When the model saw Warfarin, it predicted an increase in INR 100% of the time across different test runs.
  • When it saw Heparin, it predicted an increase in PTT in 82% to 89% of the runs.

These results held true whether the model was predicting the health state 0.5 days later or 30 days later. This shows the model has learned real, established medical rules, not just random noise.

What LaBERT Doesn't Do
It is important to note what this model doesn't do. The researchers explicitly state that LaBERT learns from observational data—what actually happened in hospitals. It does not prove causation. For example, the model might predict that patients taking insulin have higher blood sugar later. This isn't because insulin raises blood sugar (it actually lowers it); it's because doctors give insulin to patients who already have very high blood sugar. The model faithfully reproduces this real-world pattern, but it doesn't magically know the biological cause-and-effect unless it's told. The authors warn that these predictions are "observational forecasts," not absolute causal truths, and should be used to support, not replace, a doctor's judgment.

The Bottom Line
LaBERT is a powerful new tool that shows we can use the long, messy history of a patient's life to predict their future health numbers with surprising accuracy. By treating time, medications, and lab results as a connected story rather than a list of isolated facts, it offers a glimpse into a future where doctors can simulate different treatment paths and choose the one most likely to keep their patients healthy. While it's not a magic wand that solves all medical mysteries, it's a significant step toward personalized, forward-looking medicine.

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 →