← Latest papers
🤖 machine learning

TEDDY: A Pediatric Foundation Model for Risk Forewarning from ICD-Coded Diagnostic Histories

The paper introduces TEDDY, a compact 1.84-million-parameter decoder transformer trained on pediatric ICD-10 data that significantly outperforms larger and more complex models in forecasting disease onset and visit timing, demonstrating that pediatric diagnostic histories can effectively support generative foundation models for rare and long-horizon risk prediction without requiring population-scale datasets.

Original authors: Matthew Brady Neeley, Jorge Botas, Johnathan Jia, Lin Yao, Daniel Palacios, Benjamin Choi, Zhandong Liu, Hyun-Hwan Jeong

Published 2026-07-17
📖 5 min read🧠 Deep dive

Original authors: Matthew Brady Neeley, Jorge Botas, Johnathan Jia, Lin Yao, Daniel Palacios, Benjamin Choi, Zhandong Liu, Hyun-Hwan Jeong

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 predict the future of a story, but the characters are growing up, changing their voices, and learning new things every single day. This is the challenge of pediatric medicine: a child is not just a small adult. Their bodies, their diseases, and even how they get sick change rapidly as they develop from a newborn into a teenager. For a long time, doctors and computer programs have mostly learned from stories about grown-ups, which often leads to wrong guesses when applied to kids. It's like trying to use a map of a city to navigate a forest; the rules are different, and the landmarks don't match.

To make better predictions, scientists are building "foundation models." Think of these as super-smart computers that read millions of medical records to learn the patterns of health and sickness. Usually, these models are huge, like giant libraries of knowledge, and they are trained on data from adults. But what if we could build a smaller, specialized model that understands the unique, fast-paced story of childhood? That is the big question this paper tackles: Can a computer learn to spot the early signs of a child's future illness just by reading their past medical visits, even for rare diseases that haven't happened yet?


Meet TEDDY (Temporal Event Decoder for Disease in Youth). You can think of TEDDY as a super-attentive pediatrician with a perfect memory of every child it has ever seen. Instead of just looking at a child's current symptoms, TEDDY reads their entire medical history like a novel, paying close attention to the order of events and the time between them. Its job is to guess what might happen next: Will this child develop asthma? Could they have a rare genetic condition? And crucially, when might that happen?

The team trained TEDDY on a massive collection of medical records from 1.6 million children at Texas Children's Hospital. They fed the model about 73 million diagnosis codes (the standard medical shorthand for illnesses) to learn the patterns. TEDDY is surprisingly small for a computer brain of this power, with only 1.84 million "parameters" (the internal knobs and dials that make it smart). To put that in perspective, it is much smaller than the giant language models you might have heard of, which often have billions of parameters.

So, what did TEDDY find?

It's a Great Predictor, Even for Rare Things
TEDDY is really good at its job. When tested on 797 different diseases, it correctly ranked children who would get a specific illness higher than those who wouldn't 72% of the time (a score known as AUC). This is a big deal because most computer models struggle with rare diseases, often getting confused or giving up. But TEDDY actually got better at predicting the rarest conditions. For the 225 rarest diseases (those affecting fewer than 5 out of every 10,000 children), the model was still confident and accurate, with its predictions being far better than random guessing.

It Sees the Future Years in Advance
One of the most exciting discoveries is how far ahead TEDDY can see. The model can spot the "warning signs" of a disease more than two years before a doctor officially writes down the diagnosis. While the predictions are strongest right before the diagnosis happens, the signal remains detectable years earlier. This suggests that a child's medical history holds clues about their future health long before the illness fully takes hold.

It Beats the Competition
The researchers didn't just build TEDDY; they put it in a race against other computer models. They compared it to older types of AI (like RNNs and LSTMs) and even a massive, general-purpose language model that is 1,000 times larger than TEDDY.

  • For predicting asthma, TEDDY scored 79.3%, while the best competitor (a giant language model) only scored 62.7%.
  • For predicting ADHD, TEDDY scored 84.7%, beating the next best model which scored 71.7%.

This proves that you don't need a gigantic, billion-dollar computer to understand children's health. A model built specifically for kids, trained on their unique stories, works much better than a giant model built for adults.

How It Avoids Cheating
The scientists were very careful to make sure TEDDY wasn't "cheating." In medical records, a doctor might write down several diagnoses on the same day. A tricky AI might look at the first diagnosis to guess the second, which isn't fair. TEDDY was designed to make its prediction before seeing any of the diagnoses for that day, forcing it to rely only on the child's past history. They also made sure to compare sick children only with other sick children of the same age and gender, so the model couldn't just guess based on whether a child was a boy or a girl.

It's Not Perfect (Yet)
TEDDY is great at guessing what might happen, but it's a bit less precise about exactly when. It can estimate the time until the next doctor's visit with an average error of just 3 days, which is impressive. However, it sometimes struggles with very long gaps between visits, overestimating how long a child might wait before returning. The researchers admit this is a limitation of their current design, which uses a simple mathematical rule to guess time.

The Bottom Line
This paper shows that we can build compact, powerful AI tools specifically for children that outperform massive, adult-focused models. By treating a child's medical history as a unique, unfolding story, TEDDY can spot risks for common and rare diseases years in advance. While it's not a crystal ball that tells us everything perfectly, it's a powerful new tool that could help doctors catch illnesses earlier, especially the rare ones that often go undiagnosed for years. The authors suggest that the next step is to test this model across different hospitals and to add more types of data, like growth charts and lab results, to make the predictions even sharper.

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 →