X-FEMR: A Token-level Explainable Approach for Electronic Health Records Foundation Models using Transformer-based Models

Jie Huang, Pengfei Yin, Zihan Xu, Daniel Capurro, Mike Conway +1 more
7/7/2026
cs.LGcs.AI

No confident code implementation found for this paper.

Abstract

Foundation Models for Electronic Health Records (FEMRs) are pretrained on large-scale structured patient data, enabling them to convert longitudinal patient trajectories into generalizable representations for diverse clinical prediction tasks. Despite their effectiveness, FEMRs remain black-box models, raising concerns about bias, interpretability, and clinical trust. To address this, we propose the first token-level explainability approach for FEMRs. We train a Transformer-based surrogate model on input-output pairs from the FEMR across two prediction tasks, approximating its behavior while preserving temporal dynamics. We identify the most influential tokens, providing insights into how FEMRs leverage different aspects of patient history for predictions. To evaluate clinical relevance, we introduce a novel clinical alignment metric that quantifies the correspondence between the surrogate model's key tokens and clinically validated features. Our results demonstrate that the surrogate closely approximates FEMR predictions and that token-level explanations align well with clinical knowledge, offering a practical framework for interpretable and trustworthy clinical AI.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{huang2026xfemr,
  title  = {X-FEMR: A Token-level Explainable Approach for Electronic Health Records Foundation Models using Transformer-based Models},
  author = {Jie Huang and Pengfei Yin and Zihan Xu and Daniel Capurro and Mike Conway and Ting Dang},
  year   = {2026},
  eprint = {2607.06163},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.06163v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2607.06163.svg)](https://codeofpaper.com/paper/2607.06163)

Discussion