CoChat

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

TransformEHR: transformer-based encoder-decoder generative model to enhance prediction of disease outcomes using electronic health records

Open access
Yang, Zhichao, Mitra, Avijit, Liu, Weisong, Berlowitz, Dan, Yu, Hong · 2023 · Nature Communications

Published version of a preprint

Abstract

Deep learning transformer-based models using longitudinal electronic health records (EHRs) have shown a great success in prediction of clinical diseases or outcomes. Pretraining on a large dataset can help such models map the input space better and boost their performance on relevant tasks through finetuning with limited data. In this study, we present TransformEHR, a generative encoder-decoder model with transformer that is pretrained using a new pretraining objective—predicting all diseases and outcomes of a patient at a future visit from previous visits. TransformEHR’s encoder-decoder framework, paired with the novel pretraining objective, helps it achieve the new state-of-the-art performance on multiple clinical prediction tasks. Comparing with the previous model, TransformEHR improves area under the precision–recall curve by 2% ( p < 0.001) for pancreatic cancer onset and by 24% ( p = 0.007) for intentional self-harm in patients with post-traumatic stress disorder. The high performance in predicting intentional self-harm shows the potential of TransformEHR in building effective clinical intervention systems. TransformEHR is also generalizable and can be easily finetuned for clinical prediction tasks with limited data.

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/s41467-023-43715-z

Cites

58 of 58 references verified0 citation errors · 0 not checkable

Statistics

Figures

Fig. 1 Exemplar EHR sequence of a patient (white, male, age 51). This EHR contains demographic and ICD codes from 3 previous visits, including Z-codes such as exam to educational institution Z02.0. The pretraining objective is to predict all diseases and outcomes in the next visit. All these values are artificial and for illustration purposes.
Fig. 1 Exemplar EHR sequence of a patient (white, male, age 51). This EHR contains demographic and ICD codes from 3 previous visits, including Z-codes such as exam to educational institution Z02.0. The pretraining objective is to predict all diseases and outcomes in the next visit. All these values are artificial and for illustration purposes.CC BY · PubMed Central
Fig. 2 How model learns the correlation of ICD codes by recovering the masked ICD codes to its original ICD codes. a illustrates the preprocessing of input data from 4 patient visits, with visit embeddings capturing chronological information, time embeddings capturing the specific date, and ICD codes along with demographic data encoded as embeddings. b displays various medical history masking schemes: BERT-style masking random codes and TransformEHR-style masking the all codes in a visit.
Fig. 2 How model learns the correlation of ICD codes by recovering the masked ICD codes to its original ICD codes. a illustrates the preprocessing of input data from 4 patient visits, with visit embeddings capturing chronological information, time embeddings capturing the specific date, and ICD codes along with demographic data encoded as embeddings. b displays various medical history masking schemes: BERT-style masking random codes and TransformEHR-style masking the all codes in a visit.CC BY · PubMed Central
Fig. 3 TransformEHR architecture and pretrain-finetune paradigm. During Step 1, TransformEHR was pretrained with generative encoder-decoder transformer on a large set of longitudinal EHR data. TransformEHR learned the probability distribution of ICD codes (vs. random distribution) through correlation of cross attention. During Step 2, we then finetuned TransformEHR to the predictions of single disease or outcome. Through attention weights, TransformEHR was able to identify top indicators for the predictions. Encoder is colored in green, decoder is colored in red, and cross attention that connects both is colored in blue.
Fig. 3 TransformEHR architecture and pretrain-finetune paradigm. During Step 1, TransformEHR was pretrained with generative encoder-decoder transformer on a large set of longitudinal EHR data. TransformEHR learned the probability distribution of ICD codes (vs. random distribution) through correlation of cross attention. During Step 2, we then finetuned TransformEHR to the predictions of single disease or outcome. Through attention weights, TransformEHR was able to identify top indicators for the predictions. Encoder is colored in green, decoder is colored in red, and cross attention that connects both is colored in blue.CC BY · 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

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 58 references

Research works printed but not linked: 5

  1. Vaswani, A. et al. Attention is All you Need. in Advances in Neural Information Processing Systems 30 (eds. Guyon, I. et al.) 5998–6008 (Curran Associates, Inc., 2017).
  2. Devlin, J., Chang, M.-W., Lee, K. & Toutanova, K. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. in Proceedings of the 2019 Conference of the North {A}merican Chapter of the Association for Computational Linguistics: Human Language Technologies 4171–4186 (Association for Computational Linguistics, 2019).
  3. McDermott, M. B. A., Nestor, B. A., Argaw, P. N. & Kohane, I. S. Event Stream GPT: a data pre-processing and modeling library for generative, pre-trained transformers over continuous-time sequences of complex events. ArXiv abs/2306.11547, (2023). · arXiv
  4. Pascanu, R., Mikolov, T. & Bengio, Y. On the difficulty of training recurrent neural networks. in International Conference on Machine Learning 1310–1318 (2013).
  5. Gradus, J. PTSD and death from suicide. Natl Cent. Posttraumatic Stress Disord. 28, 1050–1835 (2017).

Cited by

See all 158

Metadata

Authors
Yang, Z., Mitra, A., Liu, W., Berlowitz, D., & Yu, H.
Affiliations
  • University of Massachusetts Amherst (US)
  • University of Massachusetts Lowell (US)
Corresponding author
Yu, Hong
Venue
Nature Communications
Published
2023-11-29
Volume
14
Issue
1
Pages
7857-7857
ISSN
2041-1723 (ISSN-L)
OpenAlex
W4389132345
Cited by
158
References
57
Citations by year
2026: 67 · 2025: 64 · 2024: 27
FWCI
14.89
Type
journal article
Language
en
Open access
Licence
Locations
  • Nature Communications (publishedVersion, cc-by)
  • Research Square (acceptedVersion, cc-by)
  • PubMed Central (publishedVersion, cc-by)
  • PubMed (publishedVersion)
  • RePEc: Research Papers in Economics (submittedVersion)
  • DOAJ (DOAJ: Directory of Open Access Journals) (submittedVersion, cc-by-sa)
Funders
  • U.S. Department of Health & Human Services | NIH | National Institute of Mental Health (R01MH125027)
  • U.S. Department of Health & Human Services | NIH | National Institute on Drug Abuse (R01DA056470)
  • U.S. Department of Health & Human Services | NIH | National Institute on Aging (R01AG080670)
  • U.S. Department of Veterans Affairs (I01HX003711)
Topics
  • Physical Sciences › Computer Science › Artificial Intelligence › Machine Learning in Healthcare
  • Health Sciences › Medicine › Health Informatics › Artificial Intelligence in Healthcare and Education
  • Health Sciences › Health Professions › Health Information Management › Electronic Health Records Systems
Keywords
generative models, electronic health records, pre-training objectives, longitudinal clinical data, disease outcome prediction, intentional self-harm, post-traumatic stress disorder
MeSH terms
Humans, Pancreatic Neoplasms, Electric Power Supplies, Mental Recall, Stress Disorders, Post-Traumatic, Electronic Health Records

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: TransformEHR: transformer-based encoder-decoder generative model to enhance prediction of disease outcomes using electronic health records. https://app.cochat.ai/papers/10.1038/s41467-023-43715-z
The paper
Yang, Z., Mitra, A., Liu, W., Berlowitz, D., & Yu, H. (2023). TransformEHR: transformer-based encoder-decoder generative model to enhance prediction of disease outcomes using electronic health records. Nature Communications. https://doi.org/10.1038/s41467-023-43715-z

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.