[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-84891-en":3,"doc-seo-84891-105":29,"detail-sidebar-cat-0-en-105":90},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":4,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":13,"seo_description":14,"update_tm":27,"read_time":28},84891,8796095461610,"Oliver","https://ap-avatar.wpscdn.com/davatar_276721f389ce27ea32af1340a28f341c",7,"Healthcare","X-FEMR: A Token-level Explainable Approach for Electronic Health Records Foundation Models using Transformer-based Models","Foundation Models for Electronic Health Records (FEMRs) learn generalizable representations from large-scale structured patient data, translating longitudinal trajectories into embeddings for many clinical prediction tasks. Despite strong performance, FEMRs function as black boxes, limiting bias assessment, interpretability, and clinician trust. X-FEMR introduces the first token-level explainability framework for FEMRs using a Transformer-based surrogate trained on FEMR input-output pairs across two tasks. It highlights influential tokens and a clinical alignment metric to validate correspondence with clinically supported features.","arXiv :2607 .06 163v 1 [ cs .LG] 7 Jul 2026  \nX-FEMR: A Token-level Explainable Approach for Electronic Health Records Foundation Models using Transformer-based Models  \nJie Huang 1,†, Pengfei Yin 1,†, Zihan Xu 1 , Daniel Capurro 1,2 , Mike Conway 1 , Ting Dang 1,*  \n1 School of Computing and Information Systems, University of Melbourne, Melbourne, Australia  \n2Department of General Medicine, Royal Melbourne Hospital Melbourne, Australia †These authors contributed equally to this work.  \n* Corresponding author(s) . Email(s): [ting.dang@unimelb.edu.au](ting.dang@unimelb.edu.au)  \nAbstract  \nFoundation 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 Transformerbased 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.  \nKeywords: Natural Language Processing; Large Language Models; Multimodal data; Explainable AI; Electronic Health Records Analysis  \n1. Introduction  \nFoundation models (FMs) are trained on large-scale and diverse datasets using self-supervised objectives, learning to acquire general-purpose representations that can be efficiently adapted to a wide range of downstream tasks [10] . The use of abundant data, transformer-based architectures, and advances in optimization and model scaling has produced models with strong transferability and emergent capabilities [12] . Consequently, FMs often outperform task-specific systems, reducing the need for extensive task-dependent supervision and making them well-suited for complex, data-rich domains, such as healthcare.  \nIn the field of medical artificial intelligence (AI), FMs have primarily been developed along two major lines, reflecting the heterogeneous nature of clinical data. The first stream focuses on unstructured clinical text, creating Clinical Language Models (CLaMs), which are trained on narrative notes and reports. While CLaMs have demonstrated strong performance in extracting information from unstructured clinical narratives, a substantial portion of clinically relevant information is encoded in structured electronic health records (EHRs), which capture longitudinal diagnoses, procedures, medications, and their temporal relationships. Consequently, increasing attention has shifted toward FMs for structured EHR data. These models  \nlearn from longitudinal sequences of coded clinical events to capture temporal patterns in patient trajectories, which are referred to as FMs for EHRs (FEMRs) [36], include ETHOS [20] and CLMBR-T-Base [35] .  \nDespite their strong empirical performance, the translation of FEMRs into clinical practice remains limited. First, their internal representations and decision mechanisms are largely opaque [33], limiting interpretability for clinicians and model developers. Second, while interpretability tools for clinical language models have rapidly matured, they mainly focus on traditional machine learning approaches [1, 23], and thus comparable explainability frameworks for FEMRs are still underdeveloped.","cbCaipV4SyeSyCBn","https://ap.wps.com/l/cbCaipV4SyeSyCBn","pdf",367855,1,15,"English","en",105,"# Introduction\n## Foundation Models for EHRs (FEMRs)\n## Limitations in clinical deployment\n## Explainable AI for foundation-scale models","[{\"question\":\"What problem does X-FEMR address for electronic health record foundation models?\",\"answer\":\"X-FEMR targets the black-box nature of FEMRs, which makes decisions hard to interpret and limits clinical trust, bias evaluation, and transparency.\"},{\"question\":\"How does X-FEMR generate token-level explanations?\",\"answer\":\"It trains a Transformer-based surrogate model on FEMR input-output pairs across two prediction tasks, approximating FEMR behavior while preserving temporal dynamics, then identifies the most influential tokens.\"},{\"question\":\"What is the clinical alignment metric used for?\",\"answer\":\"The clinical alignment metric quantifies how well the surrogate model’s key tokens correspond to clinically validated features, assessing the clinical relevance of the explanations.\"}]",1784199062,38,{"code":4,"msg":30,"data":31},"ok",{"site_id":24,"language":23,"slug":32,"title":13,"keywords":33,"description":14,"schema_data":34,"social_meta":85,"head_meta":87,"extra_data":89,"updated_unix":27},"x-femr-a-token-level-explainable-approach-for-electronic-health-records-foundation-models-using-transformer-based-models","",{"@graph":35,"@context":84},[36,53,67],{"@type":37,"itemListElement":38},"BreadcrumbList",[39,43,47,50],{"item":40,"name":41,"@type":42,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":44,"name":45,"@type":42,"position":46},"https://docshare.wps.com/document/","Document",2,{"item":48,"name":12,"@type":42,"position":49},"https://docshare.wps.com/document/healthcare/",3,{"item":51,"name":13,"@type":42,"position":52},"https://docshare.wps.com/document/x-femr-a-token-level-explainable-approach-for-electronic-health-records-foundation-models-using-transformer-based-models/84891/",4,{"url":51,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":23,"description":14,"dateModified":61,"datePublished":61,"encodingFormat":60,"isAccessibleForFree":62,"interactionStatistic":63},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":40,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-07-16",true,{"@type":64,"interactionType":65,"userInteractionCount":4},"InteractionCounter",{"@type":66},"ViewAction",{"@type":68,"mainEntity":69},"FAQPage",[70,76,80],{"name":71,"@type":72,"acceptedAnswer":73},"What problem does X-FEMR address for electronic health record foundation models?","Question",{"text":74,"@type":75},"X-FEMR targets the black-box nature of FEMRs, which makes decisions hard to interpret and limits clinical trust, bias evaluation, and transparency.","Answer",{"name":77,"@type":72,"acceptedAnswer":78},"How does X-FEMR generate token-level explanations?",{"text":79,"@type":75},"It trains a Transformer-based surrogate model on FEMR input-output pairs across two prediction tasks, approximating FEMR behavior while preserving temporal dynamics, then identifies the most influential tokens.",{"name":81,"@type":72,"acceptedAnswer":82},"What is the clinical alignment metric used for?",{"text":83,"@type":75},"The clinical alignment metric quantifies how well the surrogate model’s key tokens correspond to clinically validated features, assessing the clinical relevance of the explanations.","https://schema.org",{"og:url":51,"og:type":86,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":88,"canonical":51},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":91},[92,96,100,104,109,114,117,122,127,130,134],{"id":20,"doc_module":4,"doc_module_name":45,"category_name":93,"show_sort_weight":94,"slug":95},"Story & Novel",90,"story-novel",{"id":46,"doc_module":4,"doc_module_name":45,"category_name":97,"show_sort_weight":98,"slug":99},"Literature",80,"literature",{"id":52,"doc_module":4,"doc_module_name":45,"category_name":101,"show_sort_weight":102,"slug":103},"Exam",70,"exam",{"id":105,"doc_module":4,"doc_module_name":45,"category_name":106,"show_sort_weight":107,"slug":108},5,"Comic",60,"comic",{"id":110,"doc_module":4,"doc_module_name":45,"category_name":111,"show_sort_weight":112,"slug":113},6,"Technology",50,"technology",{"id":11,"doc_module":4,"doc_module_name":45,"category_name":12,"show_sort_weight":115,"slug":116},40,"healthcare",{"id":118,"doc_module":4,"doc_module_name":45,"category_name":119,"show_sort_weight":120,"slug":121},8,"Research & Report",30,"research-report",{"id":123,"doc_module":4,"doc_module_name":45,"category_name":124,"show_sort_weight":125,"slug":126},9,"Religion & Spirituality",20,"religion-spirituality",{"id":125,"doc_module":4,"doc_module_name":45,"category_name":128,"show_sort_weight":125,"slug":129},"World Cup","world-cup",{"id":131,"doc_module":4,"doc_module_name":45,"category_name":132,"show_sort_weight":131,"slug":133},10,"Lifestyle","lifestyle",{"id":135,"doc_module":4,"doc_module_name":45,"category_name":136,"show_sort_weight":105,"slug":137},19,"General","general"]