[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-327293-105":59,"doc-detail-327293-en":130},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","how-should-transformers-encode-numeric-values-in-electronic-health-records-paper-abstract-and-introduction","How Should Transformers Encode Numeric Values in Electronic Health Records? - Paper Abstract and Introduction","","Examines how transformer-based sequence models encode numeric values in electronic health record (EHR) data. Compares discrete, continuous, and hybrid encoding strategies using synthetic arithmetic tasks embedded in real EHR sequences and real-world clinical prediction tasks. Identifies trade-offs among numeric precision, optimization stability, and architectural flexibility. Shows best precision on arithmetic when value-concept interactions are modeled and constraints allow it; proposes a hybrid token-based binning approach with bin count following an empirically derived power law in dataset size, emphasizing robustness and deployability over exact arithmetic.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":40,"@type":76,"position":81},"https://docshare.wps.com/document/research-report/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/how-should-transformers-encode-numeric-values-in-electronic-health-records-paper-abstract-and-introduction/327293/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/how-should-transformers-encode-numeric-values-in-electronic-health-records-paper-abstract-and-introduction/327293.png","ImageObject",300,407,{"name":92,"@type":93},"Olivia Brown","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-02","2026-09-21",true,{"@type":102,"interactionType":103,"userInteractionCount":29},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What problem does the paper address about transformers in EHRs?","Question",{"text":112,"@type":113},"It asks how to encode numeric values in transformer-based sequence processing for electronic health record data, especially for lab results and other continuous measurements.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"How does the study evaluate different numeric encoding strategies?",{"text":117,"@type":113},"It uses synthetic arithmetic tasks embedded within real-world EHR sequences and also evaluates real-world clinical prediction tasks to test encoding effectiveness under clinically relevant conditions.",{"name":119,"@type":110,"acceptedAnswer":120},"What encoding approach performs best according to the paper?",{"text":121,"@type":113},"Approaches that explicitly model value-concept interactions yield the best results on precision-sensitive arithmetic tasks when architectural constraints permit; otherwise, a hybrid token-based method that bins numeric values before projection is more robust and broadly applicable.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},327293,1790779747,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":39,"category_name":40,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":29,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":144,"read_time":36,"preview_page_count":4},16904993612988,"https://ap-avatar.wpscdn.com/davatar_a8503ba1806abce46bf441b54a3ca4cd","How Should Transformers Encode Numeric Values in Electronic Health  \nRecords?  \nMaria Elkjær Montgomery 1 Christian Igel 1 Mikkel Odgaard 1 Martin Sillesen 2 Mads Nielsen 1  \narXiv :2607 .0 139 1v 1 [ cs .LG] 1 Jul 2026  \nAbstract  \nHow do we encode numeric values in transformerbased sequence processing, particularly in electronic health record (EHR) data? We systematically compare discrete, continuous, and hybrid value encoding strategies using synthetic arithmetic tasks embedded within real-world EHR data, as well as real-world clinical prediction tasks. Our study reveals trade-offs between numeric precision, optimisation stability, and architectural flexibility. We find that approaches that explicitly model value-concept interactions perform best on precision-sensitive arithmetic tasks when architectural constraints permit. Hybrid token-based approaches that retain numeric values but apply binning prior to projection provide a more robust and broadly applicable alternative, with the optimal number of bins following a simple empirically derived power-law in dataset size.  \nAcross tasks, models consistently exhibit reliable“good enough” numeric computation rather than exact arithmetic, while clinical gains from incorporating laboratory values are task-dependent.  \nThis suggests that robustness and deployability often outweigh maximal numeric precision in practice, motivating hybrid token-based approaches as a practical default.  \n1. Introduction  \nThere is a growing body of research leveraging Electronic Health Record (EHR) data for predictive modelling of clinical outcomes. Early approaches primarily relied on traditional machine learning models such as XGBoost and logistic regression (Shillan et al., 2019 ; Stevens et al., 2023 ;  \n1Department of Computer Science, University of Copenhagen, Copenhagen, Denmark 2Department of Organ Surgery and Transplantation, Copenhagen University Hospital-Rigshospitalet, Copenhagen, Denmark. Correspondence to: Maria Elkjær Montgomery \u003C[maem@di.ku.dk](maem@di.ku.dk)>.  \nProceedings of the 43 rd International Conference on Machine Learning, Seoul, South Korea. PMLR 306, 2026 . Copyright 2026 by the author(s) .  \nEl Haji et al., 2023 ; Mishra et al., 2024), but with the advent of transformer-based architectures (Vaswani et al., 2017), these methods have been extended to EHR data as well.  \nIn particular, models inspired by the BERT architecture (Devlin et al., 2019), such as BEHRT (Li et al., 2020) and Med-BERT (Rasmy et al., 2021), marked a major shift in this field, motivating subsequent work in the field (Panget al., 2021 ; Steinberg et al., 2024 ; Wornow et al., 2025 ; Odgaard et al., 2024 ; Kraljevic et al., 2024) . Despite these advances, most large-scale pre-trained models for EHR data rely primarily on structured categorical data such as diagnosis codes, procedure codes, and medication records, while continuous numeric data, such as laboratory test results or risk scores, are often underutilised. This omission is notable given that lab values are among the most routinely collected clinical measurements, typically requiring no additional documentation from clinicians and thus being less prone to subjective bias and human errors. Moreover, they constitute a rich and high-volume data source that could enhance patient representation learning.  \nTherefore, recent work has proposed several strategies for incorporating numeric values into transformer-based models for EHR data. These include value discretisation (Rossi et al., 2019 ; Renc et al., 2024 ; Mbaye et al., 2025), separate embedding layers for numeric features (Li et al., 2020), and joint embeddings that align categorical and continuous features (Bellamy et al., 2025) . More recently, Guo et al. systematically evaluated joint embedding strategies against factorised embedding approaches for numeric encoding in clinical transformers, reflecting the growing focus on how numeric values should be encoded and integrated within transformer ","cbCaiu3IPoAsI87y","https://ap.wps.com/l/cbCaiu3IPoAsI87y","pdf",5935540,16,"English","# Abstract\n# 1. Introduction\n## Background: EHR predictive modeling and transformer-based methods\n## Gap: underutilization of continuous numeric data\n## Related strategies for numeric encoding in EHR transformers\n## Study rationale and evaluation needs\n## Main contributions","[{\"question\":\"What problem does the paper address about transformers in EHRs?\",\"answer\":\"It asks how to encode numeric values in transformer-based sequence processing for electronic health record data, especially for lab results and other continuous measurements.\"},{\"question\":\"How does the study evaluate different numeric encoding strategies?\",\"answer\":\"It uses synthetic arithmetic tasks embedded within real-world EHR sequences and also evaluates real-world clinical prediction tasks to test encoding effectiveness under clinically relevant conditions.\"},{\"question\":\"What encoding approach performs best according to the paper?\",\"answer\":\"Approaches that explicitly model value-concept interactions yield the best results on precision-sensitive arithmetic tasks when architectural constraints permit; otherwise, a hybrid token-based method that bins numeric values before projection is more robust and broadly applicable.\"}]","How Should Transformers Encode Numeric Values in Electronic Health Records? - Paper Abstract and Introduction | PDF",1789976924]