Related Experiment Video
Updated: Jun 22, 2025

Implementation of a Real-Time Psychosis Risk Detection and Alerting System Based on Electronic Health Records using CogStack
Published on: May 15, 2020
Early detection of pediatric health risks using maternal and child health data
1University of California, Berkeley, CA, USA. cornelia.ilin@berkeley.edu.
Insights
A new deep learning model, Ped-BERT, accurately predicts pediatric diagnoses and hospital stays by analyzing patient and mother health data. Incorporating maternal health significantly improves prediction accuracy for early disease identification.
Area of Science:
- Computational biology
- Pediatric health informatics
- Machine learning applications in healthcare
Background:
- Early identification of pediatric diseases is crucial for long-term health outcomes but is hindered by limited health data access.
- Machine learning (ML) offers potential for developing predictive diagnostic systems in pediatrics.
- Previous research has not fully characterized the impact of early-life conditions on hospital stay length in pediatric patients.
Purpose of the Study:
- To develop a deep learning model, Ped-BERT, for predicting pediatric diagnoses and length of hospital stay.
- To evaluate the impact of incorporating mother-specific pre- and postnatal health information on model performance.
- To assess the fairness of the Ped-BERT model across different demographic and health subgroups.
Main Methods:
- Utilized a large dataset of 513.9K mother-baby pairs from California health records.
- Developed Ped-BERT, a deep learning model based on BERT, pre-trained using masked language modeling on diagnosis codes.
- Fine-tuned Ped-BERT to predict diagnoses and length of stay, incorporating patient history and optionally maternal health data.
Main Results:
- Ped-BERT demonstrated superior performance compared to contemporary classifiers, even with minimal features.
- Incorporating maternal health attributes led to significant performance improvements across all patient subgroups.
- Achieved high performance metrics: ROC AUC of 0.927 and APS of 0.408 for diagnosis prediction; ROC AUC of 0.855 and APS of 0.815 for length of stay prediction.
Conclusions:
- Ped-BERT is a highly effective deep learning tool for predicting pediatric diagnoses and hospital length of stay.
- Maternal health data integration substantially enhances the predictive power of ML models in pediatrics.
- Further analysis is required to ensure equitable performance and mitigate prediction biases across diverse patient populations.
Abstract:
Machine learning (ML)-driven diagnosis systems are particularly relevant in pediatrics given the well-documented impact of early-life health conditions on later-life outcomes. Yet, early identification of diseases and their subsequent impact on length of hospital stay for this age group has so far remained uncharacterized, likely because access to relevant health data is severely limited. Thanks to a confidential data use agreement with the California Department of Health Care Access and Information, we introduce Ped-BERT: a state-of-the-art deep learning model that accurately predicts the likelihood of 100+ conditions and the length of stay in a pediatric patient's next medical visit. We link mother-specific pre- and postnatal period health information to pediatric patient hospital discharge and emergency room visits. Our data set comprises 513.9K mother-baby pairs and contains medical diagnosis codes, length of stay, as well as temporal and spatial pediatric patient characteristics, such as age and residency zip code at the time of visit. Following the popular bidirectional encoder representations from the transformers (BERT) approach, we pre-train Ped-BERT via the masked language modeling objective to learn embedding features for the diagnosis codes contained in our data. We then continue to fine-tune our model to accurately predict primary diagnosis outcomes and length of stay for a pediatric patient's next visit, given the history of previous visits and, optionally, the mother's pre- and postnatal health information. We find that Ped-BERT generally outperforms contemporary and state-of-the-art classifiers when trained with minimum features. We also find that incorporating mother health attributes leads to significant improvements in model performance overall and across all patient subgroups in our data. Our most successful Ped-BERT model configuration achieves an area under the receiver operator curve (ROC AUC) of 0.927 and an average precision score (APS) of 0.408 for the diagnosis prediction task, and a ROC AUC of 0.855 and APS of 0.815 for the length of hospital stay task. Further, we examine Ped-BERT's fairness by determining whether prediction errors are evenly distributed across various subgroups of mother-baby demographics and health characteristics, or if certain subgroups exhibit a higher susceptibility to prediction errors.

