CoChat

A self-supervised framework for laboratory data imputation in electronic health records

Open access
Heilbroner, Samuel P., Carter, Curtis, Vidmar, David M., Mueller, Erik T., Stumpe, Martin C., Miotto, Riccardo · 2025 · Communications Medicine

The DOI matches its Crossref record; 31 of the 31 references it cites were found in a registry or an index.

Abstract

Laboratory data in electronic health records (EHRs) is an effective source of information to characterize patient populations, inform accurate diagnostics and treatment decisions, and fuel research studies. However, despite their value, laboratory values are underutilized due to high levels of missingness. Existing imputation methods fall short, as they do not fully leverage patient clinical histories and are commonly not scalable to the large number of tests available in real-world data (RWD). To address these shortcomings, we present Laboratory Imputation Framework for EHRs (LIFE), a self-supervised learning framework based on multi-head attention that is trained to impute any laboratory test value at any point in time in the patient’s journey using their complete EHRs. This architecture (1) eliminates the need to train a different model for each laboratory test by jointly modeling all laboratory data of interest; and (2) better clinically contextualizes the predictions by leveraging additional EHR variables, such as diagnosis, medications, and discrete laboratory results. We validate our framework using a large-scale, real-world dataset encompassing over 1 million oncology patients. Our results demonstrate that LIFE obtains superior or equivalent results compared to state-of-the-art baseline methods in 23 out of 25 evaluated laboratory tests and better enhances a downstream adverse event detection task in 7 out of 9 cases. LIFE shows promise in accurately estimating missing laboratory values and enhancing the utilization of large-scale RWD in healthcare. This advancement could lead to better clinical models, more informed decision-making and improved patient outcomes. Electronic health records (EHRs) contain laboratory test results that are crucial for modeling and analyzing patient health and outcomes. However, many laboratory test results are often missing, which limits their usefulness. Current automated methods to fill these gaps are not very effective because they generally do not utilize all available patient clinical information and cannot handle a wide variety of tests. To address this issue, we present Laboratory Imputation Framework for EHRs (LIFE), a model that predicts missing laboratory results at any point in time by analyzing a patient’s entire health record, including diagnoses and medications. Tested on data from over a million cancer patients, LIFE outperformed other methods in predicting laboratory results and improved the detection of several clinical adverse events. This tool could lead to better clinical models, potentially enhancing healthcare decisions and improving patient outcomes. Heilbroner et al. present LIFE, a self-supervised learning framework for imputing laboratory test values at any point in a patient’s journey using electronic health records. LIFE generally outperforms state-of-the-art baselines and enhances adverse event detection when tested on over 1 million oncology records.

Overview

The claims and statistics of this paper haven’t been checked yet.

Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

Crossref · 10.1038/s43856-025-00973-w

Cites

31 of 31 references verified0 citation errors · 0 not checkable

Statistics

Figures

Fig. 1 Overview of the LIFE experimental framework. EHR observations and a query comprising a laboratory test, a unit of measure, and a date are input into LIFE to impute the corresponding laboratory value for that specific time point. We assessed these imputations within two scenarios. For the initial experiment (Task 1), we masked laboratory data from a patient’s clinical history, replaced the absent value through imputation, and then compared it with the actual measurement. In the subsequent experiment (Task 2), we employed LIFE’s laboratory value imputations as features within a downstream task focused on detecting adverse events.
Fig. 1 Overview of the LIFE experimental framework. EHR observations and a query comprising a laboratory test, a unit of measure, and a date are input into LIFE to impute the corresponding laboratory value for that specific time point. We assessed these imputations within two scenarios. For the initial experiment (Task 1), we masked laboratory data from a patient’s clinical history, replaced the absent value through imputation, and then compared it with the actual measurement. In the subsequent experiment (Task 2), we employed LIFE’s laboratory value imputations as features within a downstream task focused on detecting adverse events.CC BY-NC-ND · PubMed Central
Fig. 2 LIFE model architecture. A The model’s inputs consist of a query, which includes a laboratory test, a unit of measure, and a date, along with EHR observations extracted from patient clinical records. During the training phase, each query is chosen randomly from the available patient laboratory data, and its value is masked before being fed into the model. B LIFE is constructed with time decay and multi-head attention layers, both contributing to the creation of patient embeddings. The multiple time decay modules compute observations across various time scales. The patient embeddings resulting from this process are then subjected to multiplication by the query using the Hadamard product. The concatenated result is passed through a multi-layer perceptron to generate a final prediction. Throughout the training iterations, the model predicts the masked values and aims to minimize the discrepancy between original and imputed values through Mean Square Loss. C The time decay module assigns weights to observations based on their proximity to the time point specified in the query. These weights are determined by calculating the time difference in days between each observation and the query and then applying an exponential decay function. D The multi-head attention module assigns weights to observations according to their medical significance relative to the query. This module takes three inputs: the query, the observations, and the weights computed by the time decay mechanism.
Fig. 2 LIFE model architecture. A The model’s inputs consist of a query, which includes a laboratory test, a unit of measure, and a date, along with EHR observations extracted from patient clinical records. During the training phase, each query is chosen randomly from the available patient laboratory data, and its value is masked before being fed into the model. B LIFE is constructed with time decay and multi-head attention layers, both contributing to the creation of patient embeddings. The multiple time decay modules compute observations across various time scales. The patient embeddings resulting from this process are then subjected to multiplication by the query using the Hadamard product. The concatenated result is passed through a multi-layer perceptron to generate a final prediction. Throughout the training iterations, the model predicts the masked values and aims to minimize the discrepancy between original and imputed values through Mean Square Loss. C The time decay module assigns weights to observations based on their proximity to the time point specified in the query. These weights are determined by calculating the time difference in days between each observation and the query and then applying an exponential decay function. D The multi-head attention module assigns weights to observations according to their medical significance relative to the query. This module takes three inputs: the query, the observations, and the weights computed by the time decay mechanism.CC BY-NC-ND · PubMed Central
Fig. 3 Performance of LIFE across 344 laboratory tests. The x-axis represents mean absolute error (MAE), and the y-axis displays the count of tests where LIFE reached the corresponding performance level. As evident from the graph, LIFE consistently performs effectively across all laboratory tests, implying its proficiency in imputing not only common tests but also a broader range, including less frequent tests. The average MAE across all 344 tests was 0.15. All laboratory tests we standardized to a uniform distribution on [0, 1] to facilitate comparison.
Fig. 3 Performance of LIFE across 344 laboratory tests. The x-axis represents mean absolute error (MAE), and the y-axis displays the count of tests where LIFE reached the corresponding performance level. As evident from the graph, LIFE consistently performs effectively across all laboratory tests, implying its proficiency in imputing not only common tests but also a broader range, including less frequent tests. The average MAE across all 344 tests was 0.15. All laboratory tests we standardized to a uniform distribution on [0, 1] to facilitate comparison.CC BY-NC-ND · PubMed Central
Fig. 4 Interpretation of LIFE predictions using multi-head attention weights. Every bar corresponds to a patient timeline, with the specific laboratory test labeled at the top. The observations within the timeline are color-coded to indicate the intensity of their respective attention weights. The darker the color, the greater and more relevant the weight. The top 20 observations to which the model allocated the highest attention are identified along the x-axis. It is important to note that less relevant and unlabeled observations have been spatially compressed to conserve space. Thin red lines on some of the plots represent observations that, while not among the top 20 in terms of attention weight, still garnered sufficient attention to be highlighted on the heat map. MCHC mean corpuscular hemoglobin, Ag antigen.
Fig. 4 Interpretation of LIFE predictions using multi-head attention weights. Every bar corresponds to a patient timeline, with the specific laboratory test labeled at the top. The observations within the timeline are color-coded to indicate the intensity of their respective attention weights. The darker the color, the greater and more relevant the weight. The top 20 observations to which the model allocated the highest attention are identified along the x-axis. It is important to note that less relevant and unlabeled observations have been spatially compressed to conserve space. Thin red lines on some of the plots represent observations that, while not among the top 20 in terms of attention weight, still garnered sufficient attention to be highlighted on the heat map. MCHC mean corpuscular hemoglobin, Ag antigen.CC BY-NC-ND · PubMed Central

Verification

Claims the paper makes

The claims and statistics of this paper haven’t been checked yet.

Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.

A few free checks a day · papers already verified open instantly · results are public

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

The self-check needs the paper’s full text.

Citations

Cites

Show all 31 references

Research works printed but not linked: 2

  1. Yoon, J. & Zame, W. R. Multi-directional recurrent neural networks: a novel method for estimating missing data. InTime series workshop in international conference on machine learning 2017 Nov.
  2. Ma, C. & Zhang, C. Identifiable generative models for missing not at random data imputation. Adv. Neural Inf. Process Syst 34, 27645–2758 (2021).

Cited by

See all 1

Metadata

Authors
Heilbroner, S. P., Carter, C., Vidmar, D. M., Mueller, E. T., Stumpe, M. C., & Miotto, R.
Affiliations
Tempus Labs (United States) (US)
Corresponding author
Miotto, Riccardo
Venue
Communications Medicine
Published
2025-07-01
Volume
5
Issue
1
Pages
251-251
ISSN
2730-664X (ISSN-L)
OpenAlex
W4411857863
Cited by
1
References
28
Citations by year
2025: 1
FWCI
0.40
Type
journal article
Language
en
Open access
Licence
Locations
  • Communications Medicine (publishedVersion, cc-by-nc-nd)
  • PubMed Central (publishedVersion, cc-by-nc-nd)
  • PubMed (publishedVersion)
  • DOAJ (DOAJ: Directory of Open Access Journals) (submittedVersion, cc-by-sa)
Topics
  • Physical Sciences › Computer Science › Artificial Intelligence › Machine Learning in Healthcare
  • Health Sciences › Health Professions › Health Information Management › Electronic Health Records Systems
  • Health Sciences › Health Professions › Health Information Management › Medical Coding and Health Information
Keywords
electronic health records, self-supervised learning, multi-head attention, real-world data, cancer patients, adverse event detection, clinical decision support, missing data imputation, clinical natural language processing, clinical decision support systems

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review

How to cite

Cite CoChat for the checks on this page, and the paper for its own findings.

This page
CoChat. (2026). Citation check: A self-supervised framework for laboratory data imputation in electronic health records. https://app.cochat.ai/papers/10.1038/s43856-025-00973-w
The paper
Heilbroner, S. P., Carter, C., Vidmar, D. M., Mueller, E. T., Stumpe, M. C., & Miotto, R. (2025). A self-supervised framework for laboratory data imputation in electronic health records. Communications Medicine. https://doi.org/10.1038/s43856-025-00973-w

Data sources

Bibliographic data: Semantic Scholar, OpenAlex, Crossref.

Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).

Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.