cs.LGAug 20, 2026

Explainable Transformer Models for Clinical Prediction Tasks on Structured Electronic Health Records

Authors: Jun Ni Du, Lukas Adamek, Maxim Kryukov, Flavio Dormont, Ziv Bar-Joseph, Sven Jager, Brandon Rufino

Organizations: Data & Computational Science, R&D, Sanofi Toronto, Canada · Data & Computational Science, R&D, Sanofi Barcelona, Spain · Clinical Real World Evidence, R&D, Sanofi Cambridge, USA · School of Computer Science, Carnegie Mellon University Pittsburgh, USA · Data & Computational Science, R&D, Sanofi Frankfurt, Germany

Abstract

Predictive models over structured electronic health records (EHRs) remain central to machine learning for healthcare, but few have jointly emphasized quantitative laboratory information and interpretability with respect to input medical events. We present BERT-LER, a BERT-style model for coded EHR timelines pretrained and fine-tuned from a de-identified EHR dataset of 75 million patients, that encodes laboratory test results as discrete tokens while retaining graded information through percentile-based binning, paired with Integrated Gradients for token-level attributions grounded in the input EHR sequence. We benchmark our approach on the public EHRShot benchmark suite and on an asthma severity progression study based on real-world data. This addresses a methodological gap in EHR foundation-style modeling by unifying laboratory value representation and explainability in a single framework, while assessing whether both predictive performance and explanations generalize beyond standard clinical prediction tasks. Across EHRShot and asthma tasks, BERT-LER achieves predictive performance that is competitive with, and on laboratory-related tasks often exceeds, publicly available benchmark models, and provides attributions that align with clinically known risk factors. Our architecture and explainability approach can be applied to many therapeutic areas and prediction tasks using language models trained on structured EHRs.

Figures & tables

Appendix figures & tables8 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. DT-BEHRT: Disease Trajectory-aware Transformer for Interpretable Patient Representation Learning

    Mar 10, 2026Deyi Li, Zijun Yao, Qi Xu +4Longitudinal EHR ModelingPredictive Representation Learning

  2. ChatHealthAI: Aligning Electronic Health Record Representations with Large Language Models for Grounded Clinical Reasoning

    Jun 1, 2026Bo-Hong Wang, Baicheng Peng, Ruilin Wang +3LLM GroundingLLM Alignment

  3. INTERVenE: Temporal-Abstraction-Interval Based Transformers for Short-Horizon Medical Event Prediction

    Aug 30, 2026Shahar Oded, Yuval ShaharEvent Time PredictionInterpretable ML