基于医学令牌的覆盖感知推理用于下次就诊诊断预测
摘要
CARing 框架通过组合式语义 ID 与覆盖感知的强化学习奖励,优化大语言模型在多标签下次就诊诊断预测任务中的推理轨迹,并在 MIMIC-III/IV 数据集上超越所有基于 EHR 训练的基线模型。
arXiv:2610.10641v1 Announce Type: new
Abstract: Large language models (LLMs) offer promising potential for next-visit diagnosis prediction, owing to their ability to integrate longitudinal clinical evidence and reason over it in natural language. However, reinforcement learning for LLM reasoning commonly rewards each trajectory according to the correctness of its final answer. In next-visit diagnosis prediction, multiple diagnoses can be simultaneously valid, but independently rewarding one diagnosis per trajectory does not distinguish repeated hits from coverage of different diagnoses. The policy can therefore concentrate on a few correct diagnoses, leaving others uncovered. Meanwhile, LLM tokenizers can split ICD codes into several generic tokens with limited clinical meaning, requiring multiple decoding steps to predict each diagnosis and hindering reasoning over a large disease vocabulary. To address both challenges, we propose CARing, a framework that represents diagnoses with compositional Semantic IDs (SIDs) and optimizes reasoning trajectories for multi-label coverage. Concretely, we first encode ontology-enriched disease semantics into compact SIDs through residual quantization, and ground the resulting SID tokens in natural language and longitudinal EHR contexts through multi-task alignment and reasoning-enriched training to unlock transferable LLM reasoning. CARing further improves unordered multi-label prediction through a coverage reward for reinforcement learning and multi-positive supervision. At inference time, the model supports both efficient direct constrained decoding and multi-chain reasoning with rank fusion. On MIMIC-III and MIMIC-IV, CARing exceeds all EHR-trained baselines in weighted F1 and attains the highest top-k recall at every reported cutoff, including R@30 of 46.04% and 46.52% in reasoning mode. Our codes and logs are available at https://github.com/zmlxzyh/CARing-Codes-Logs.
查看缓存全文
缓存时间: 2026/10/09 06:40
# Coverage-Aware Reasoning with Medical Tokens for Diagnosis Prediction
Source: [https://arxiv.org/html/2610.10641](https://arxiv.org/html/2610.10641)
Haotian Fang11footnotemark:1Junmeng ZhouAffiliation:Fuzhou University Shanghai Jiao Tong University Beihang UniversityHang LvYulan PanYanchao Tan††thanks:Corresponding author\.
###### Abstract
Large language models \(LLMs\) offer promising potential for next\-visit diagnosis prediction, owing to their ability to integrate longitudinal clinical evidence and reason over it in natural language\. However, reinforcement learning for LLM reasoning commonly rewards each trajectory according to the correctness of its final answer\. In next\-visit diagnosis prediction, multiple diagnoses can be simultaneously valid, but independently rewarding one diagnosis per trajectory does not distinguish repeated hits from coverage of different diagnoses\. The policy can therefore concentrate on a few correct diagnoses, leaving others uncovered\. Meanwhile, LLM tokenizers can split ICD codes into several generic tokens with limited clinical meaning, requiring multiple decoding steps to predict each diagnosis and hindering reasoning over a large disease vocabulary\. To address both challenges, we propose CARing, a framework that represents diagnoses with compositional Semantic IDs \(SIDs\) and optimizes reasoning trajectories for multi\-label coverage\. Concretely, we first encode ontology\-enriched disease semantics into compact SIDs through residual quantization, and ground the resulting SID tokens in natural language and longitudinal EHR contexts through multi\-task alignment and reasoning\-enriched training to unlock transferable LLM reasoning\. CARing further improves unordered multi\-label prediction through a coverage reward for reinforcement learning and multi\-positive supervision\. At inference time, the model supports both efficient direct constrained decoding and multi\-chain reasoning with rank fusion\. On MIMIC\-III and MIMIC\-IV, CARing exceeds all EHR\-trained baselines in weightedF1F\_\{1\}and attains the highest top\-kkrecall at every reported cutoff, including R@30 of 46\.04% and 46\.52% in reasoning mode\. Our codes and logs are available at[https://github\.com/zmlxzyh/CARing\-Codes\-Logs](https://github.com/zmlxzyh/CARing-Codes-Logs)\.
## 1Introduction
Next\-visit diagnosis prediction aims to infer diagnoses at a patient’s next encounter from their previous visits\. Existing EHR predictors learn from longitudinal patient histories\([Choi et al\., 2016a](https://arxiv.org/html/2610.10641#bib.bib10);[Ma et al\., 2018](https://arxiv.org/html/2610.10641#bib.bib8);[Rasmy et al\., 2021](https://arxiv.org/html/2610.10641#bib.bib45);[Chen et al\., 2024](https://arxiv.org/html/2610.10641#bib.bib9);[Ke et al\., 2026](https://arxiv.org/html/2610.10641#bib.bib28)\)\. Large language models \(LLMs\) offer a way to incorporate explicit reasoning into this task by synthesizing historical evidence and generating intermediate clinical hypotheses in natural language\([Jiang et al\., 2025](https://arxiv.org/html/2610.10641#bib.bib16);[Cao et al\., 2026](https://arxiv.org/html/2610.10641#bib.bib17)\)\. Reinforcement learning is commonly used to improve LLM reasoning by rewarding the correctness of each trajectory’s final answer\([Shao et al\., 2024](https://arxiv.org/html/2610.10641#bib.bib4);[Liu et al\., 2025](https://arxiv.org/html/2610.10641#bib.bib55)\)\. However, next\-visit diagnosis prediction is an*unordered multi\-label prediction*problem over a large diagnosis vocabulary\. Multiple diagnoses can be simultaneously correct, and their order within a visit has no intrinsic meaning\. When each trajectory predicts one diagnosis and is rewarded only for its own correctness, a group that repeats one correct diagnosis earns the same total reward as an equally sized group covering different correct diagnoses\. The policy can therefore concentrate on a few correct diagnoses and leave others uncovered\([Yue et al\., 2025](https://arxiv.org/html/2610.10641#bib.bib35);[GX\-Chen et al\., 2026](https://arxiv.org/html/2610.10641#bib.bib36)\), as illustrated in Figure[1](https://arxiv.org/html/2610.10641#S1.F1)\.
Figure 1:Motivation for multi\-label reinforcement learning in next\-visit diagnosis prediction\. Standard RL can collapse onto one correct diagnosis, leaving others uncovered\. Our coverage reward discounts repeated predictions and encourages coverage of distinct correct diagnoses\.Effective reasoning also requires a diagnosis representation that an LLM can understand and generate efficiently\. Although ICD codes organize diagnoses hierarchically, their letters and numbers do not describe the diseases in ordinary language\. LLM tokenizers can split a single code into several character\-level tokens rather than treat it as a disease\-level unit, and such fragmented codes are hard to ground, reason over, and generate across a large diagnosis vocabulary\([Soroush et al\., 2024](https://arxiv.org/html/2610.10641#bib.bib49)\)\. Medical tokenizers such as MedTok and MedRQ compress code descriptions, relations, and ontologies into reusable discrete codebooks\([Su et al\., 2025](https://arxiv.org/html/2610.10641#bib.bib13);[Lv et al\., 2026](https://arxiv.org/html/2610.10641#bib.bib14)\), but their downstream predictors use the resulting representations as model inputs rather than as tokens for reasoning and prediction\. MERA maps each disease to an atomic special token and handles the unordered diagnoses within a visit\([Ma et al\., 2025](https://arxiv.org/html/2610.10641#bib.bib15)\), but its vocabulary and associated parameters grow linearly with the number of diagnoses, and natural language reasoning stays outside its prediction path\. Semantic IDs \(SIDs\) in recommendation suggest a compositional alternative: items reuse codebook tokens\([Rajput et al\., 2023](https://arxiv.org/html/2610.10641#bib.bib50);[Zheng et al\., 2024](https://arxiv.org/html/2610.10641#bib.bib51)\), and recent systems let an LLM reason in natural language before generating an identifier\([Liu et al\., 2026](https://arxiv.org/html/2610.10641#bib.bib30);[Team et al\., 2026](https://arxiv.org/html/2610.10641#bib.bib29)\)\. Inspired by this approach, we use medical SIDs as a shared token language linking disease concepts to longitudinal patient histories\. Unlike recommendation, where the target is usually a single item, a future visit can contain multiple correct diagnoses, so the model must recover complementary labels\.
We propose CARing \(Coverage\-AwareReasoning with Compositional Medical Tokens for Multi\-Label Next\-Visit Diagnosis Prediction\), a framework that brings LLM reasoning to diagnosis prediction through medical SIDs and trains reasoning trajectories to cover multiple correct diagnoses\.
Our technical contributions are as follows:
- •Adapting LLM reasoning to diagnosis prediction through medical SIDs\.We use medical SIDs to connect clinical language, patient histories, and diagnosis outputs within one autoregressive model\. Disease semantics and ICD ontology paths are compressed through residual quantization into shared codebook tokens\. Six alignment tasks and narratives generated by a teacher LLM ground these tokens in clinical context\. Reasoning activation then trains the model to generate a clinical rationale before predicting a diagnosis SID\.
- •Optimizing reasoning trajectories for diagnosis coverage\.A coverage reward divides each correct prediction’s credit by its frequency within a group of sampled trajectories, so the total group reward equals the number of distinct correct diagnoses\. An auxiliary multi\-positive objective supervises only the SID answer tokens, supplying learning signals for correct diagnoses that policy sampling may miss\. These objectives encourage trajectories to recover complementary diagnoses\.
- •Direct prediction and explicit reasoning within a common inference framework\.The direct mode ranks diagnoses through constrained decoding without generating a rationale\. The reasoning mode samples multiple chains of thought before prediction, ranks diagnoses by constrained decoding after each chain, and combines the rankings with reciprocal rank fusion\. Both modes restrict predictions to valid medical SIDs\.
We evaluate CARing on MIMIC\-III and MIMIC\-IV\([Johnson et al\., 2016](https://arxiv.org/html/2610.10641#bib.bib7);[Johnson et al\., 2023](https://arxiv.org/html/2610.10641#bib.bib6)\)\. CARing outperforms all baselines trained on EHR data in weightedF1F\_\{1\}and achieves the highest top\-kkrecall among all evaluated methods\. The reasoning mode reaches R@30 of 46\.04% and 46\.52% on the two datasets, respectively\. Ablation studies show that semantic enrichment improves direct prediction and supports the complementary roles of the coverage reward and multi\-positive supervision\.
## 2Related Work
We briefly summarize related work and refer readers to Appendix[A](https://arxiv.org/html/2610.10641#A1)for a detailed discussion\.
Next\-visit diagnosis prediction is commonly addressed by EHR models that encode visit sequences with recurrent or attention architectures\([Choi et al\., 2016a](https://arxiv.org/html/2610.10641#bib.bib10);[Choi et al\., 2016b](https://arxiv.org/html/2610.10641#bib.bib22);[Gao et al\., 2020](https://arxiv.org/html/2610.10641#bib.bib23);[Yang et al\., 2023b](https://arxiv.org/html/2610.10641#bib.bib12)\)and incorporate medical ontologies or patient graphs\([Ma et al\., 2018](https://arxiv.org/html/2610.10641#bib.bib8);[Lu et al\., 2021](https://arxiv.org/html/2610.10641#bib.bib21);[Chen et al\., 2024](https://arxiv.org/html/2610.10641#bib.bib9);[Tan et al\., 2025](https://arxiv.org/html/2610.10641#bib.bib20)\)\. These models output scores over a fixed diagnosis vocabulary rather than generating diagnoses through explicit reasoning\. Bringing LLMs to this task requires diagnosis tokens that the model can read and generate\. Medical tokenizers learn discrete codes for diseases but mainly feed them to downstream predictors\([Su et al\., 2025](https://arxiv.org/html/2610.10641#bib.bib13);[Lv et al\., 2026](https://arxiv.org/html/2610.10641#bib.bib14)\), while MERA adds one vocabulary token per disease, so the vocabulary grows with the number of diagnoses\([Ma et al\., 2025](https://arxiv.org/html/2610.10641#bib.bib15)\)\. Semantic IDs in recommendation instead compose each item from shared codebook tokens, and recent systems let an LLM reason in text before generating the identifier\([Liu et al\., 2026](https://arxiv.org/html/2610.10641#bib.bib30);[Team et al\., 2026](https://arxiv.org/html/2610.10641#bib.bib29)\)\. Explicit reasoning has also improved clinical prediction\([Jiang et al\., 2025](https://arxiv.org/html/2610.10641#bib.bib16);[Cao et al\., 2026](https://arxiv.org/html/2610.10641#bib.bib17)\), but mainly for binary outcomes or small label spaces\. Our work represents diseases with compositional medical SIDs, so that one LLM reads patient histories, reasons in natural language, and generates diagnoses from a large vocabulary in which a visit has several correct labels\.
Large reasoning models generate intermediate steps before the final answer\([Wei et al\., 2022](https://arxiv.org/html/2610.10641#bib.bib31)\)and gain accuracy from sampling multiple chains at test time\([Wang et al\., 2023](https://arxiv.org/html/2610.10641#bib.bib32);[Snell et al\., 2025](https://arxiv.org/html/2610.10641#bib.bib33)\)\. Reinforcement learning with verifiable rewards \(RLVR\) trains such reasoning from outcome feedback\([Shao et al\., 2024](https://arxiv.org/html/2610.10641#bib.bib4);[Guo et al\., 2025](https://arxiv.org/html/2610.10641#bib.bib34)\), but rewarding each trajectory only for its own correctness tends to concentrate the policy on a few answers\. RLVR raises pass@1 while base models reach higher pass@kkat largekk\([Yue et al\., 2025](https://arxiv.org/html/2610.10641#bib.bib35)\), and weak KL regularization with equal rewards tends to specify a unimodal target distribution\([GX\-Chen et al\., 2026](https://arxiv.org/html/2610.10641#bib.bib36)\)\. Recent methods jointly optimize diversity and correctness by scoring the whole rollout group\([Anschel et al\., 2025](https://arxiv.org/html/2610.10641#bib.bib37);[Li et al\., 2026](https://arxiv.org/html/2610.10641#bib.bib38)\)\. In diagnosis prediction, recall depends on how many correct diagnoses of a visit the model covers\. Our coverage reward divides each correct SID’s credit by its frequency in the group, so the group reward counts distinct correct diagnoses, and a multi\-positive loss supplies signal for correct diagnoses that no trajectory samples\.
## 3Method
Our framework first constructs ontology\-enriched medical SIDs from shared tokens, then grounds these tokens in clinical text and longitudinal patient histories, and finally optimizes reasoning trajectories for multi\-label diagnosis coverage\. Figure[2](https://arxiv.org/html/2610.10641#S3.F2)illustrates the overall pipeline\.
Figure 2:Overview of CARing\. The framework constructs compositional medical SIDs, aligns them with clinical language and reasoning, combines a coverage reward with multi\-positive answer supervision, and supports direct and multi\-chain reasoning inference\.### 3\.1Task Formulation
Let𝒟\\mathcal\{D\}denote the diagnosis vocabulary\. A patient’s longitudinal record up to visitttisHt=\(V1,…,Vt\)H\_\{t\}=\(V\_\{1\},\\ldots,V\_\{t\}\), whereVj⊆𝒟V\_\{j\}\\subseteq\\mathcal\{D\}is the set of diagnoses at visitjj\. The prediction target is the unordered diagnosis set at the next visit,Yt=Vt\+1=\{d1,…,dm\}⊆𝒟Y\_\{t\}=V\_\{t\+1\}=\\\{d\_\{1\},\\ldots,d\_\{m\}\\\}\\subseteq\\mathcal\{D\}\.
To avoid imposing an order on the target diagnoses, we expand each visit\-level example\(Ht,Yt\)\(H\_\{t\},Y\_\{t\}\)into case\-level instances\{\(Ht,di\)\}i=1m\\\{\(H\_\{t\},d\_\{i\}\)\\\}\_\{i=1\}^\{m\}\. Each instance pairs the same history with one target\. We use them for SID–language alignment and reasoning activation, with each trajectory predicting one diagnosis SID\. Reinforcement learning and visit\-level evaluation retain the complete target setYtY\_\{t\}\.
### 3\.2Ontology\-Enriched Compositional Medical Tokenization
##### Ontology\-enriched disease semantics\.
For each diseased∈𝒟d\\in\\mathcal\{D\}, we pair its canonical titlen\(d\)n\(d\)with its root\-to\-leaf ICD ontology pathp\(d\)p\(d\), represented schematically asud=Disease:n\(d\)⊕ICD ontology path:p\(d\)u\_\{d\}=\\texttt\{Disease: \}n\(d\)\\ \\oplus\\ \\texttt\{ICD ontology path: \}p\(d\)\. We encode the textual metadataudu\_\{d\}into a continuous semantic representation𝐱d\\mathbf\{x\}\_\{d\}, which is then fed into a residual quantization module\.
##### Residual quantization\.
Following residual\-quantized VAEs \(RQ\-VAEs\)\([Zeghidour et al\., 2022](https://arxiv.org/html/2610.10641#bib.bib3)\), an MLP encoder maps𝐱d\\mathbf\{x\}\_\{d\}to a latent vector𝐳d=E\(𝐱d\)∈ℝdz\\mathbf\{z\}\_\{d\}=E\(\\mathbf\{x\}\_\{d\}\)\\in\\mathbb\{R\}^\{d\_\{z\}\}\. GivenLLcodebooks𝒞l=\{𝐞k\(l\)\}k=1K\\mathcal\{C\}\_\{l\}=\\\{\\mathbf\{e\}^\{\(l\)\}\_\{k\}\\\}\_\{k=1\}^\{K\}, residual quantization starts with𝐫d\(0\)=𝐳d\\mathbf\{r\}^\{\(0\)\}\_\{d\}=\\mathbf\{z\}\_\{d\}\. At each level, it selectscd\(l\)=argmink‖𝐫d\(l\)−𝐞k\(l\)‖22c\_\{d\}^\{\(l\)\}=\\arg\\min\_\{k\}\\\|\\mathbf\{r\}^\{\(l\)\}\_\{d\}\-\\mathbf\{e\}^\{\(l\)\}\_\{k\}\\\|\_\{2\}^\{2\}and updates the residual as𝐫d\(l\+1\)=𝐫d\(l\)−𝐞cd\(l\)\(l\)\\mathbf\{r\}^\{\(l\+1\)\}\_\{d\}=\\mathbf\{r\}^\{\(l\)\}\_\{d\}\-\\mathbf\{e\}^\{\(l\)\}\_\{c\_\{d\}^\{\(l\)\}\}\. The quantized latent𝐳q,d=∑l=0L−1𝐞cd\(l\)\(l\)\\mathbf\{z\}\_\{q,d\}=\\sum\_\{l=0\}^\{L\-1\}\\mathbf\{e\}^\{\(l\)\}\_\{c\_\{d\}^\{\(l\)\}\}is decoded back to the original embedding space\. The entry selected at levell=0,…,L−1l=0,\\ldots,L\-1becomes medical tokensdl\+1s\_\{d\}^\{l\+1\}; these tokens form the SID sequenceq\(d\)=\(sd1,…,sdL\)q\(d\)=\(s\_\{d\}^\{1\},\\ldots,s\_\{d\}^\{L\}\), withL=3L=3in our experiments\. These components are jointly trained withℒtok=‖𝐱d−D\(𝐳q,d\)‖22\+1L∑l=0L−1\(‖sg\[𝐫d\(l\)\]−𝐞cd\(l\)\(l\)‖22\+β‖𝐫d\(l\)−sg\[𝐞cd\(l\)\(l\)\]‖22\)\\mathcal\{L\}\_\{\\mathrm\{tok\}\}=\\\|\\mathbf\{x\}\_\{d\}\-D\(\\mathbf\{z\}\_\{q,d\}\)\\\|\_\{2\}^\{2\}\+\\frac\{1\}\{L\}\\sum\_\{l=0\}^\{L\-1\}\\bigl\(\\\|\\mathrm\{sg\}\[\\mathbf\{r\}^\{\(l\)\}\_\{d\}\]\-\\mathbf\{e\}^\{\(l\)\}\_\{c\_\{d\}^\{\(l\)\}\}\\\|\_\{2\}^\{2\}\+\\beta\\\|\\mathbf\{r\}^\{\(l\)\}\_\{d\}\-\\mathrm\{sg\}\[\\mathbf\{e\}^\{\(l\)\}\_\{c\_\{d\}^\{\(l\)\}\}\]\\\|\_\{2\}^\{2\}\\bigr\), wheresg\[⋅\]\\mathrm\{sg\}\[\\cdot\]is stop\-gradient andβ\\betacontrols the commitment term\. The resulting SID is a compact sequence of discrete tokens that preserves disease semantics for autoregressive modeling\. We writeHHfor the SID\-encoded historyHtH\_\{t\}, preserving visit boundaries\.
### 3\.3Multi\-Task SID–Clinical Context Alignment
Although the RQ\-VAE preserves disease\-level similarity, its component tokens are newly added to the LLM vocabulary and initially have no lexical meaning\. To enable the LLM to interpret, reason over, and generate SID tokens in clinical contexts, we conduct full\-parameter autoregressive training on six complementary tasks, where SID tokens and natural language tokens co\-occur across diverse medical scenarios\. Four*next\-visit prediction*tasks cover the combinations required by the downstream model: SID history→\\rightarrowSID \(T1\), textual disease history→\\rightarrowSID \(T2\), SID history→\\rightarrowdisease name \(T3\), and textual disease history→\\rightarrowdisease name \(T4\)\. Two*concept translation*tasks establish bidirectional grounding: disease name→\\rightarrowSID \(T5\) and SID→\\rightarrowdisease name \(T6\)\. T1–T4 jointly align textual and SID histories with both language and SID outputs, with T1 matching the final prediction interface; T5–T6 teach the SID vocabulary to encode recognizable disease semantics\. All tasks are jointly optimized under the standard next\-token prediction objective\. Due to space limitations, detailed input and output formats for all six tasks are provided in Appendix[B\.1](https://arxiv.org/html/2610.10641#A2.SS1)\.
### 3\.4Reasoning\-Enriched Training
The six alignment tasks ground SIDs through concise translation and prediction templates, but expose them to limited linguistic and clinical contexts\. To address this issue, we leverage a large teacher language model with rich world knowledge\. We augment SID–language alignment with two offline teacher\-generated corpora and general\-domain reasoning data, then train the aligned model to follow an explicit reason\-then\-predict pathway\.
##### Disease\-level semantic enrichment\.
For each disease, the teacher generates a clinical narrative in which its SID denotes the concept across manifestations, investigations, comorbidities, and ontology relations\. To ground the description, each prompt includes metadata from the PyHealth ICD\-9\-CM ontology\([Yang et al\., 2023a](https://arxiv.org/html/2610.10641#bib.bib24)\)and the 2015 Clinical Classifications Software \(CCS\) and Chronic Condition Indicator \(CCI\) released by the AHRQ Healthcare Cost and Utilization Project\([Agency for Healthcare Research and Quality, 2015b](https://arxiv.org/html/2610.10641#bib.bib25);[Agency for Healthcare Research and Quality, 2015a](https://arxiv.org/html/2610.10641#bib.bib26)\)\. The resulting text interleaves SID tokens with natural language\. Training on the entire narrative with next\-token prediction exposes each SID to clinical language beyond the fixed T1–T6 templates\.
##### Case\-level semantic enrichment\.
For each case\-level training instance, the teacher first receives the historical SID visits and a reference target used only as private guidance, and generates a reasoning pathrr\. A second teacher call integrates the history,rr, and the target into a coherent narrative\.
We concatenate these two enriched corpora, the T1–T6 datasets, and general\-domain reasoning data for continued full\-parameter alignment training\. The general data are intended to mitigate degradation of the backbone’s language and reasoning abilities\.
##### Reasoning activation\.
Rich alignment does not by itself ensure that the model will externalize reasoning before predicting a SID\. We reuse the teacher\-generated reasoning pathrrfrom case\-level semantic enrichment to construct supervised samples for each history–diagnosis pair\(H,d\)\(H,d\)\. Starting from the enriched alignment checkpoint, we apply supervised fine\-tuning to history\-only prompts, supervisingrrfollowed by the target SIDq\(d\)q\(d\)while masking the prompt tokens\. This fine\-tuning targets instruction following and the reason\-then\-SID response format\.
Representative training sequences are provided in Appendix[B\.2](https://arxiv.org/html/2610.10641#A2.SS2), and their objectives are defined in Appendix[B\.2\.1](https://arxiv.org/html/2610.10641#A2.SS2.SSS1)\. The teacher prompts for data enrichment are provided in Appendix[B\.3](https://arxiv.org/html/2610.10641#A2.SS3)\.
### 3\.5Reinforcement Learning with Multi\-Positive Supervision
Reasoning activation uses case\-level instances with one target SID, whereas a future visit generally contains multiple unordered correct diagnoses\. An exact match \(EM\) reward assigns the same credit to every correct prediction, even when several trajectories repeat one diagnosis\. It therefore cannot distinguish repeated hits from coverage of different diagnoses\. We address this mismatch with GRPO\([Shao et al\., 2024](https://arxiv.org/html/2610.10641#bib.bib4)\)at the visit level, combining a coverage reward over sampled trajectories with supervision over the full positive set\.
##### Sampling by visit\.
For one historyHHwith ground\-truth SID setY=\{q\(d\):d∈Vt\+1\}Y=\\\{q\(d\):d\\in V\_\{t\+1\}\\\}, the old policy samples a group ofNNreasoning–prediction trajectories
oi=\(τi,yi\)∼πθold\(⋅∣H\),i=1,…,N,o\_\{i\}=\(\\tau\_\{i\},y\_\{i\}\)\\sim\\pi\_\{\\theta\_\{\\mathrm\{old\}\}\}\(\\cdot\\mid H\),\\qquad i=1,\\ldots,N,\(1\)whereτi\\tau\_\{i\}is the generated reasoning andyiy\_\{i\}is the final three\-token SID\. Letai,1,…,ai,Tia\_\{i,1\},\\ldots,a\_\{i,T\_\{i\}\}be the tokens of serializedoio\_\{i\}included in the loss\.
##### Coverage reward\.
Letzi=𝟏\[yi∈Y\]z\_\{i\}=\\mathbf\{1\}\[y\_\{i\}\\in Y\]indicate a correct prediction and letci=∑j=1N𝟏\[yj=yi\]c\_\{i\}=\\sum\_\{j=1\}^\{N\}\\mathbf\{1\}\[y\_\{j\}=y\_\{i\}\]be its frequency in the rollout group\. We assign
ri=zici\.r\_\{i\}=\\frac\{z\_\{i\}\}\{c\_\{i\}\}\.\(2\)Each distinct correct SID predicted by the group contributes one unit to the total reward, regardless of how often it appears \(Appendix[B\.4](https://arxiv.org/html/2610.10641#A2.SS4)\)\. When rewards vary within the group, GRPO assigns larger advantages to less\-repeated correct SIDs than to repeated hits, encouraging trajectories to cover complementary correct diagnoses\.
##### Policy optimization\.
After computing the shaped rewards, GRPO compares trajectories generated from the same history without training a value model\. LetμH\\mu\_\{H\}andσH\\sigma\_\{H\}be the mean and standard deviation of theNNrewards\. Each rollout receives the normalized outcome advantage
μH=1N∑j=1Nrj,σH=Std\(\{rj\}j=1N\),A^i=ri−μHσH\+ϵ\.\\mu\_\{H\}=\\frac\{1\}\{N\}\\sum\_\{j=1\}^\{N\}r\_\{j\},\\qquad\\sigma\_\{H\}=\\operatorname\{Std\}\(\\\{r\_\{j\}\\\}\_\{j=1\}^\{N\}\),\\qquad\\widehat\{A\}\_\{i\}=\\frac\{r\_\{i\}\-\\mu\_\{H\}\}\{\\sigma\_\{H\}\+\\epsilon\}\.\(3\)Hereϵ\>0\\epsilon\>0stabilizes the normalization\. For tokentt,hi,t=\(H,ai,<t\)h\_\{i,t\}=\(H,a\_\{i,<t\}\)is its context andρi,t\(θ\)=πθ\(ai,t∣hi,t\)/πθold\(ai,t∣hi,t\)\\rho\_\{i,t\}\(\\theta\)=\\pi\_\{\\theta\}\(a\_\{i,t\}\\mid h\_\{i,t\}\)/\\pi\_\{\\theta\_\{\\mathrm\{old\}\}\}\(a\_\{i,t\}\\mid h\_\{i,t\}\)is its importance ratio;ε\>0\\varepsilon\>0is the clipping width\.
ℒGRPO=−1∑iTi∑i=1N∑t=1Timin\[ρi,t\(θ\)A^i,clip\(ρi,t\(θ\),1−ε,1\+ε\)A^i\]\.\\mathcal\{L\}\_\{\\mathrm\{GRPO\}\}=\-\\frac\{1\}\{\\sum\_\{i\}T\_\{i\}\}\\sum\_\{i=1\}^\{N\}\\sum\_\{t=1\}^\{T\_\{i\}\}\\min\\\!\\left\[\\rho\_\{i,t\}\(\\theta\)\\widehat\{A\}\_\{i\},\\,\\operatorname\{clip\}\(\\rho\_\{i,t\}\(\\theta\),1\-\\varepsilon,1\+\\varepsilon\)\\widehat\{A\}\_\{i\}\\right\]\.\(4\)The sameA^i\\widehat\{A\}\_\{i\}applies to the reasoning and SID answer tokens\. Minimizing this objective increases the likelihood of reasoning and answer tokens in above\-average trajectories and decreases it for below\-average trajectories\. Further optimization details are given in Appendix[B\.5](https://arxiv.org/html/2610.10641#A2.SS5)\.
##### Multi\-positive supervision\.
Coverage reward gives no policy\-gradient signal for correct diagnoses absent from the rollout group\. We therefore supervise alternative positives at the answer level\. Letℐ\\mathcal\{I\}index rollouts with an identifiable three\-token terminal SID\. Fori∈ℐi\\in\\mathcal\{I\}, we retain its reasoning prefixτi\\tau\_\{i\}, replace the answer withg\(i\)∈Yg\(i\)\\in Y, and optimize itsLLSID tokens, writingg\(i\)lg\(i\)\_\{l\}for tokenllandg\(i\)<lg\(i\)\_\{<l\}for its prefix:
ℒMP=−1N∑i∈ℐwi1L∑l=1Llogπθ\(g\(i\)l∣H,τi,g\(i\)<l\)\.\\mathcal\{L\}\_\{\\mathrm\{MP\}\}=\-\\frac\{1\}\{N\}\\sum\_\{i\\in\\mathcal\{I\}\}w\_\{i\}\\,\\frac\{1\}\{L\}\\sum\_\{l=1\}^\{L\}\\log\\pi\_\{\\theta\}\\\!\\left\(g\(i\)\_\{l\}\\mid H,\\tau\_\{i\},g\(i\)\_\{<l\}\\right\)\.\(5\)We assigng\(i\)g\(i\)round\-robin over a fixed enumeration ofYY, with a step\-dependent starting offset\. ForS=\{g\(i\):i∈ℐ\}S=\\\{g\(i\):i\\in\\mathcal\{I\}\\\}andng=\|\{i∈ℐ:g\(i\)=g\}\|n\_\{g\}=\|\\\{i\\in\\mathcal\{I\}:g\(i\)=g\\\}\|, we setwi=N/\(\|S\|ng\(i\)\)w\_\{i\}=N/\(\|S\|n\_\{g\(i\)\}\), giving each selected SID equal total weight\. The loss is zero whenℐ\\mathcal\{I\}is empty\.
##### Joint optimization\.
The actor is optimized with
ℒ=ℒGRPO\+βKLD^KL\(πθ∥πref\)\+λMPℒMP,\\mathcal\{L\}=\\mathcal\{L\}\_\{\\mathrm\{GRPO\}\}\+\\beta\_\{\\mathrm\{KL\}\}\\,\\widehat\{D\}\_\{\\mathrm\{KL\}\}\(\\pi\_\{\\theta\}\\\|\\pi\_\{\\mathrm\{ref\}\}\)\+\\lambda\_\{\\mathrm\{MP\}\}\\mathcal\{L\}\_\{\\mathrm\{MP\}\},\(6\)whereβKL\\beta\_\{\\mathrm\{KL\}\}andλMP\\lambda\_\{\\mathrm\{MP\}\}weight the KL and multi\-positive terms, andπref\\pi\_\{\\mathrm\{ref\}\}is the fixed reasoning activation policy; see Appendix[B\.5](https://arxiv.org/html/2610.10641#A2.SS5)for gradients\.
### 3\.6Two Inference Settings
Because next\-visit diagnoses form an unordered set, we rank individual diagnosis SIDs rather than generate the full set as one autoregressive sequence\. Both settings use catalog\-constrained beam search to obtain valid, deduplicated candidates \(Appendix[B\.6](https://arxiv.org/html/2610.10641#A2.SS6)\)\.
##### Direct inference \(Non\-Thinking\)\.
Multi\-task alignment and reasoning\-enriched training strengthen the checkpoint’s direct prediction capability, enabling efficient inference without explicitly generating a reasoning chain\. For efficient prediction, we disable explicit thinking and condition the model only on the longitudinal SID history\. Constrained beam search directly expands valid SID prefixes and ranks the completed paths by their autoregressive sequence scores,
Sdir\(d∣H\)=∑l=1Llogpθ\(sdl∣H,sd<l\)\.S\_\{\\mathrm\{dir\}\}\(d\\mid H\)=\\sum\_\{l=1\}^\{L\}\\log p\_\{\\theta\}\\\!\\left\(s\_\{d\}^\{l\}\\mid H,s\_\{d\}^\{<l\}\\right\)\.\(7\)Duplicate SID paths are removed before returning the ranked list\.
##### Multi\-chain reasoning \(Thinking\)\.
We use the checkpoint after joint optimization with the coverage reward and multi\-positive loss\. From the same history, we sampleRRreasoning chains\{τr\}r=1R\\\{\\tau\_\{r\}\\\}\_\{r=1\}^\{R\}\. For each chain, constrained decoding yields a SID ranking that is mapped to a diagnosis rankingℛr\\mathcal\{R\}\_\{r\}\. We rank the union of these candidates using reciprocal rank fusion \(RRF\)\([Cormack et al\., 2009](https://arxiv.org/html/2610.10641#bib.bib5)\):
SRRF\(d∣H\)=∑r:d∈ℛr1κ\+rankℛr\(d\),S\_\{\\mathrm\{RRF\}\}\(d\\mid H\)=\\sum\_\{r:\\,d\\in\\mathcal\{R\}\_\{r\}\}\\frac\{1\}\{\\kappa\+\\operatorname\{rank\}\_\{\\mathcal\{R\}\_\{r\}\}\(d\)\},\(8\)whereκ\>0\\kappa\>0controls the weight assigned to top\-ranked candidates\.
## 4Experiments
In this section, we aim to answer the following research questions:
- •RQ1:How does CARing compare with ML and LLM baselines?
- •RQ2:Do ICD ontology paths improve SID quality and diagnosis recall?
- •RQ3:How do different design choices affect the performance of CARing?
- •RQ4:How do the coverage reward and multi\-positive loss affect diagnosis coverage and diversity?
##### Datasets\.
We conduct experiments on two real\-world electronic health record datasets, MIMIC\-III\([Johnson et al\., 2016](https://arxiv.org/html/2610.10641#bib.bib7)\)and MIMIC\-IV\([Johnson et al\., 2023](https://arxiv.org/html/2610.10641#bib.bib6)\), following the preprocessing protocol of prior diagnosis\-prediction studies\([Ma et al\., 2018](https://arxiv.org/html/2610.10641#bib.bib8);[Chen et al\., 2024](https://arxiv.org/html/2610.10641#bib.bib9)\)\. Due to the larger scale of MIMIC\-IV, we sample 10,000 patients for our experiments\. Detailed preprocessing procedures and dataset statistics are provided in Appendix[C\.1](https://arxiv.org/html/2610.10641#A3.SS1)\.
##### Evaluation Metrics\.
We adopt weightedF1F\_\{1\}score \(w\-F1F\_\{1\}\)\([Bai et al\., 2018](https://arxiv.org/html/2610.10641#bib.bib11);[Lu et al\., 2021](https://arxiv.org/html/2610.10641#bib.bib21)\)and top\-kkrecall \(R@kk\)\([Choi et al\., 2016a](https://arxiv.org/html/2610.10641#bib.bib10);[Lu et al\., 2021](https://arxiv.org/html/2610.10641#bib.bib21)\)for next\-visit diagnosis prediction\. w\-F1F\_\{1\}is a weighted sum of theF1F\_\{1\}score for each diagnosis\. R@kkis the ratio of ground\-truth diagnoses retrieved among the top\-kkpredictions to the total number of ground\-truth diagnoses\.
##### Baselines\.
We compare with four groups of baselines: \(1\)*neural EHR predictors*, including RETAIN\([Choi et al\., 2016b](https://arxiv.org/html/2610.10641#bib.bib22)\), KAME\([Ma et al\., 2018](https://arxiv.org/html/2610.10641#bib.bib8)\), StageNet\([Gao et al\., 2020](https://arxiv.org/html/2610.10641#bib.bib23)\), CGL\([Lu et al\., 2021](https://arxiv.org/html/2610.10641#bib.bib21)\), and TRANS\([Chen et al\., 2024](https://arxiv.org/html/2610.10641#bib.bib9)\); \(2\) a*PLM\-based predictor*, BoxLM\([Tan et al\., 2025](https://arxiv.org/html/2610.10641#bib.bib20)\); \(3\) an*LLM\-assisted predictor*, HieraMed\([Ke et al\., 2026](https://arxiv.org/html/2610.10641#bib.bib28)\), which embeds LLM\-generated medical\-code descriptions; and \(4\) a*zero\-shot LLM*, DeepSeek\-V4\-Flash\([DeepSeek\-AI, 2026](https://arxiv.org/html/2610.10641#bib.bib27)\), evaluated without task\-specific parameter updates\. Please refer to Appendix[C\.2](https://arxiv.org/html/2610.10641#A3.SS2)for more details\.
##### Implementation Details\.
We adopt Qwen3\-1\.7B\([Yang et al\., 2025](https://arxiv.org/html/2610.10641#bib.bib1)\)as the backbone and perform full\-parameter fine\-tuning throughout all stages\. DeepSeek\-V4\-Flash serves as the teacher model for corpus enrichment\. The effective batch sizes for multi\-task SID–language alignment, reasoning activation, and reinforcement learning are 1024, 1024, and 256, with learning rates of3×10−43\\times 10^\{\-4\},1×10−51\\times 10^\{\-5\}, and1×10−61\\times 10^\{\-6\}, respectively\. For reinforcement learning, we sample 16 rollouts per input and set the multi\-positive loss weight toλMP=5×10−3\\lambda\_\{\\mathrm\{MP\}\}=5\\times 10^\{\-3\}\. All experiments are conducted on 4 NVIDIA A800 GPUs\. Further details are provided in Appendix[C\.3](https://arxiv.org/html/2610.10641#A3.SS3)\.
### 4\.1Main Results \(RQ1\)
Table 1:Overall next\-visit diagnosis prediction performance on MIMIC\-III and MIMIC\-IV\. All values are percentages\. Best and second\-best results are shown in bold and underlined, respectively\.##### Performance across both datasets\.
Table[1](https://arxiv.org/html/2610.10641#S4.T1)shows that CARing has the highest w\-F1F\_\{1\}among EHR\-trained models on both datasets and the highest recall at every reported cutoff across all methods\. The thinking setting leads at seven of eight recall cutoffs; direct inference is 0\.09 points higher on MIMIC\-III R@40\. DeepSeek\-V4\-Flash has the highest w\-F1F\_\{1\}overall on both datasets, and its thinking mode exceeds CARing\-Think by 0\.54 points on MIMIC\-IV\. Compared with the direct setting, the thinking model scores 2\.49 and 2\.04 points higher in w\-F1F\_\{1\}on MIMIC\-III and MIMIC\-IV\.
##### Generalization on MIMIC\-IV\.
The MIMIC\-IV cohort contains 10,000 sampled patients, and many diagnoses in its test set do not appear in the EHR training split\. All seven EHR\-trained baselines lose 1\.41–7\.99 points in w\-F1F\_\{1\}relative to MIMIC\-III; nearly all their recall scores also decline\. CARing\-Think loses 0\.96 w\-F1F\_\{1\}points \(27\.58 to 26\.62\), but R@10, R@20, and R@30 increase by 2\.34, 1\.54, and 0\.48 points, respectively, while R@40 decreases by 0\.39 points\. It remains 5\.55 w\-F1F\_\{1\}points above the strongest EHR\-trained baseline, BoxLM, on MIMIC\-IV\. The smaller w\-F1F\_\{1\}decline and mixed recall changes are consistent with semantic enrichment and pretraining supporting prediction under sparse label coverage\.
### 4\.2ICD Ontology Paths in Medical SIDs \(RQ2\)
##### Effectiveness of ontology enrichment\.
Table 2:SID quality and MIMIC\-III recall with disease names alone or names plus ICD ontology paths\. Entropy is in bits; its maximum is 8 for a 256\-entry codebook\.In Table[2](https://arxiv.org/html/2610.10641#S4.T2), the name plus path variant scores 39\.73 R@30 versus 38\.97 for name alone after multi\-task alignment\. It uses all three codebooks fully\. The SID entropy is also higher in all layers, indicating a more even distribution across codebook tokens\. Appendix[C\.4](https://arxiv.org/html/2610.10641#A3.SS4)examines the semantic structure of these SIDs through randomly sampled prefix cases and a full\-vocabulary comparison of the two variants\.
### 4\.3Ablation Study \(RQ3\)
##### Effect of Reasoning\-Enriched Training for CARing\-Non\-think\.
Figure 3:Effect of the four stages of reasoning\-enriched training on MIMIC\-III under non\-thinking direct inference\.S1 denotes the checkpoint after multi\-task SID–clinical context alignment, before semantic enrichment\. Semantic enrichment \(S2\) raises w\-F1F\_\{1\}by 2\.04 points and R@30 by 1\.21 points, showing that SID\-grounded narratives add clinical semantics beyond fixed templates\. General corpora \(S3\) yield small EHR gains \(0\.37 w\-F1F\_\{1\}and 0\.39 R@30\), but IFEval and GSM8K in Appendix[C\.5](https://arxiv.org/html/2610.10641#A3.SS5)show that they partially recover the instruction\-following and reasoning abilities attenuated during alignment\. Reasoning activation \(S4\) gives the largest gain over S3 \(\+4\.45 w\-F1F\_\{1\}; \+2\.52 R@30\), showing that activation improves direct ranking without test\-time reasoning\.
##### Effect of the coverage reward for CARing\-Think\.
Figure 4:Training ablation on MIMIC\-III in thinking mode\.We compare four settings under the same thinking\-mode inference protocol to separate the effects of visit\-level RL and answer\-level supervision\. As shown in Figure[4](https://arxiv.org/html/2610.10641#S4.F4), the reasoning\-activation checkpoint \(S4\) attains 23\.57 w\-F1F\_\{1\}and 39\.47 R@30\. With EM reward \(S5\), every correct rollout receives equal credit, regardless of how often its SID appears in the group\. Its scores fall to 18\.88 and 34\.67, respectively\. This decline is consistent with repeated predictions of a few correct diagnoses, a pattern examined in RQ4\. S6 retains S5’s RL setup and replaces only the EM reward with the coverage reward, without adding the multi\-positive loss\. By discounting repeated predictions of the same correct SID, S6 reaches 25\.41 w\-F1F\_\{1\}and 40\.27 R@30, gains of 6\.53 and 5\.60 points over S5, respectively, and also exceeds S4\. Adding the multi\-positive loss \(S7\) raises them to 27\.58 and 46\.04, gains of 2\.17 and 5\.77 points over S6\. The larger gain in recall is consistent with the auxiliary loss supplying a learning signal for target diagnoses that the sampled trajectories may miss\. These results support the complementary roles of rewarding distinct sampled positives and supervising the full set of target diagnoses\.
### 4\.4Coverage and Diversity in Training \(RQ4\)
For each visit, we monitor 16 sampled trajectories\. Unique SIDs count all distinct predictions, while unique correct SIDs count distinct next\-visit diagnoses\. We also measure mean inverse frequency1/ci1/c\_\{i\}over correct predictions, wherecic\_\{i\}counts repetitions of the predicted SID within the group; larger values indicate less repetition\.
##### Effect of the coverage reward\.
Figure 5:MIMIC\-III trajectories for S5 \(EM reward\) and S6 \(coverage reward\), both initialized from S4\.Under EM reward, unique correct SIDs rise from 2\.18 at step 1 to 2\.86 at step 30, then fall to 1\.52 by step 100 \(Figure[5](https://arxiv.org/html/2610.10641#S4.F5)\)\. The coverage reward retains 2\.89 unique correct SIDs at step 100 and produces 7\.03 unique SIDs per group, versus 3\.06 under EM\. S6’s higher mean inverse frequency indicates less repetition among correct predictions, consistent with S6’s higher held\-out scores in Figure[4](https://arxiv.org/html/2610.10641#S4.F4)\.
##### Effect of the multi\-positive loss\.
Figure 6:MIMIC\-III trajectories for S6 and S7\. The missing S7 value at step 42 is linearly interpolated between steps 41 and 43\.The coverage reward can distinguish correct SIDs only after sampling\. At step 60, S7 produces 12\.40 unique SIDs per group, versus 7\.02 for S6 \(Figure[6](https://arxiv.org/html/2610.10641#S4.F6)\)\. Batch\-level SID entropy,−∑sp\(s\)logp\(s\)\-\\sum\_\{s\}p\(s\)\\log p\(s\)for empirical frequenciesp\(s\)p\(s\)of parsed final SIDs, is 5\.58 versus 4\.58, and mean inverse frequency among correct predictions is 0\.60 versus 0\.32\. The additional supervision thus reduces repetition while retaining more candidate diagnoses; S7 also improves held\-out w\-F1F\_\{1\}and R@30 over S6 \(Figure[4](https://arxiv.org/html/2610.10641#S4.F4)\)\.
## 5Conclusion
Predicting diagnoses at the next visit requires a model to recover several valid diagnoses from a large vocabulary\. Rewarding each reasoning trajectory only for correct predictions can favor repeated answers and leave other diagnoses uncovered\. We introduced CARing, which represents diagnoses with compositional medical SIDs grounded in clinical language and patient histories\. The model learns to reason before predicting a SID, while a coverage reward and supervision over multiple correct diagnoses encourage complementary answers across trajectories\. It supports direct ranking and multiple reasoning chains\. On MIMIC\-III and MIMIC\-IV, CARing reaches R@30 of 46\.04% and 46\.52%, respectively, has the highest recall at every reported cutoff, and exceeds all EHR\-trained baselines in weightedF1F\_\{1\}\. We discuss broader impacts, limitations, and future work in Appendix[D](https://arxiv.org/html/2610.10641#A4)\.
### AI use statement
We primarily utilized LLMs for paper polishing and programming assistance\. Specifically, for paper writing, we employed LLMs \(*e\.g\.,*GPT\-5\.6\) to refine sentence fluency as well as provide suggestions on precise and appropriate expression\. All the modifications generated by LLMs were carefully reviewed by the authors to ensure that the final content faithfully reflects the authors’ intended ideas\. For code generation, LLMs \(*e\.g\.,*GPT\-5\.6\) were mainly used to generate some code snippets, which were subsequently adapted and integrated into the implementation framework by the authors\. In both paper polishing and programming assistance, the authors were in full control, with LLMs serving solely as tools to improve efficiency\.
### Reproducibility statement
For reproducibility, we describe the method and training objectives in Section[3](https://arxiv.org/html/2610.10641#S3)and Appendix[B](https://arxiv.org/html/2610.10641#A2)\. The coverage reward property is proved in Appendix[B\.4](https://arxiv.org/html/2610.10641#A2.SS4)\. Data preprocessing, implementation details, and experimental settings are provided in Appendix[C](https://arxiv.org/html/2610.10641#A3)\. The code, training logs, and test logs are available at[https://github\.com/zmlxzyh/CARing\-Codes\-Logs](https://github.com/zmlxzyh/CARing-Codes-Logs)\.
## References
- Agency for Healthcare Research and Quality \(2015a\)Agency for Healthcare Research and QualityChronic condition indicator \(CCI\) for ICD\-9\-CM\.Note:Healthcare Cost and Utilization Project \(HCUP\)External Links:[Link](https://hcup-us.ahrq.gov/toolssoftware/chronic/chronic.jsp)Cited by:[§3\.4](https://arxiv.org/html/2610.10641#S3.SS4.SSS0.Px1.p1.1)\.
- Agency for Healthcare Research and Quality \(2015b\)Agency for Healthcare Research and QualityClinical classifications software \(CCS\) for ICD\-9\-CM\.Note:Healthcare Cost and Utilization Project \(HCUP\)External Links:[Link](https://hcup-us.ahrq.gov/toolssoftware/ccs/ccs.jsp)Cited by:[§3\.4](https://arxiv.org/html/2610.10641#S3.SS4.SSS0.Px1.p1.1)\.
- Anschelet al\.\(2025\)O\. Anschel, A\. Shoshan, A\. Botach, S\. H\. Hakimi, A\. Gendler, E\. Ben Baruch, N\. Bhonker, I\. Kviatkovsky, M\. Aggarwal, and G\. MedioniGroup\-aware reinforcement learning for output diversity in large language models\.InProceedings of the 2025 Conference on Empirical Methods in Natural Language Processing,pp\. 32394–32415\.External Links:[Document](https://dx.doi.org/10.18653/v1/2025.emnlp-main.1649)Cited by:[§A\.5](https://arxiv.org/html/2610.10641#A1.SS5.p1.1),[§2](https://arxiv.org/html/2610.10641#S2.p3.1)\.
- Baiet al\.\(2018\)T\. Bai, S\. Zhang, B\. L\. Egleston, and S\. VuceticInterpretable representation learning for healthcare via capturing disease progression through time\.InProceedings of the 24th ACM SIGKDD international conference on knowledge discovery & data mining,pp\. 43–51\.Cited by:[§4](https://arxiv.org/html/2610.10641#S4.SS0.SSS0.Px2.p1.1)\.
- Ben Shoham and Rappoport \(2024\)O\. Ben Shoham and N\. RappoportCPLLM: clinical prediction with large language models\.PLOS Digital Health3\(12\),pp\. e0000680\.Cited by:[§A\.1](https://arxiv.org/html/2610.10641#A1.SS1.p3.1)\.
- Caoet al\.\(2026\)Y\. Cao, Y\. Chen, H\. Jiang, H\. Lee, and R\. T\. TanReMedi: reasoner for medical clinical prediction\.InFindings of the Association for Computational Linguistics: ACL 2026,pp\. 20232–20241\.Cited by:[§A\.3](https://arxiv.org/html/2610.10641#A1.SS3.p2.1),[§1](https://arxiv.org/html/2610.10641#S1.p1.1),[§2](https://arxiv.org/html/2610.10641#S2.p2.1)\.
- Chenet al\.\(2024\)J\. Chen, C\. Yin, Y\. Wang, and P\. ZhangPredictive modeling with temporal graphical representation on electronic health records\.InProceedings of the Thirty\-Third International Joint Conference on Artificial Intelligence \(IJCAI 2024\),pp\. 5763–5771\.External Links:[Document](https://dx.doi.org/10.24963/ijcai.2024/637)Cited by:[§A\.1](https://arxiv.org/html/2610.10641#A1.SS1.p2.1),[5th item](https://arxiv.org/html/2610.10641#A3.I1.i5.p1.1),[§C\.1](https://arxiv.org/html/2610.10641#A3.SS1.p1.1),[§1](https://arxiv.org/html/2610.10641#S1.p1.1),[§2](https://arxiv.org/html/2610.10641#S2.p2.1),[§4](https://arxiv.org/html/2610.10641#S4.SS0.SSS0.Px1.p1.1),[§4](https://arxiv.org/html/2610.10641#S4.SS0.SSS0.Px3.p1.1)\.
- Chenet al\.\(2025\)J\. Chen, Z\. Cai, K\. Ji, X\. Wang, W\. Liu, R\. Wang, and B\. WangTowards medical complex reasoning with LLMs through medical verifiable problems\.InFindings of the Association for Computational Linguistics: ACL 2025,pp\. 14552–14573\.External Links:[Document](https://dx.doi.org/10.18653/v1/2025.findings-acl.751)Cited by:[§A\.3](https://arxiv.org/html/2610.10641#A1.SS3.p1.1)\.
- Choiet al\.\(2016a\)E\. Choi, M\. T\. Bahadori, A\. Schuetz, W\. F\. Stewart, and J\. SunDoctor ai: predicting clinical events via recurrent neural networks\.InMachine learning for healthcare conference,pp\. 301–318\.Cited by:[§A\.1](https://arxiv.org/html/2610.10641#A1.SS1.p1.1),[§1](https://arxiv.org/html/2610.10641#S1.p1.1),[§2](https://arxiv.org/html/2610.10641#S2.p2.1),[§4](https://arxiv.org/html/2610.10641#S4.SS0.SSS0.Px2.p1.1)\.
- Choiet al\.\(2017\)E\. Choi, M\. T\. Bahadori, L\. Song, W\. F\. Stewart, and J\. SunGRAM: graph\-based attention model for healthcare representation learning\.InProceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining,pp\. 787–795\.Cited by:[§A\.1](https://arxiv.org/html/2610.10641#A1.SS1.p2.1)\.
- Choiet al\.\(2016b\)E\. Choi, M\. T\. Bahadori, J\. Sun, J\. Kulas, A\. Schuetz, and W\. StewartRetain: an interpretable predictive model for healthcare using reverse time attention mechanism\.Advances in neural information processing systems29,pp\. 3504–3512\.Cited by:[§A\.1](https://arxiv.org/html/2610.10641#A1.SS1.p1.1),[1st item](https://arxiv.org/html/2610.10641#A3.I1.i1.p1.1),[§2](https://arxiv.org/html/2610.10641#S2.p2.1),[§4](https://arxiv.org/html/2610.10641#S4.SS0.SSS0.Px3.p1.1)\.
- Cormacket al\.\(2009\)G\. V\. Cormack, C\. L\. Clarke, and S\. BuettcherReciprocal rank fusion outperforms condorcet and individual rank learning methods\.InProceedings of the 32nd international ACM SIGIR conference on Research and development in information retrieval,pp\. 758–759\.Cited by:[§3\.6](https://arxiv.org/html/2610.10641#S3.SS6.SSS0.Px2.p1.1)\.
- DeepSeek\-AI \(2026\)DeepSeek\-AIDeepSeek\-V4: towards highly efficient million\-token context intelligence\.arXiv preprint arXiv:2606\.19348\.Cited by:[§4](https://arxiv.org/html/2610.10641#S4.SS0.SSS0.Px3.p1.1)\.
- Fanget al\.\(2026\)Y\. Fang, Y\. Guo, J\. Gao, H\. Ding, X\. Jiang, W\. Liao, Y\. Xu, Y\. Zhu, Z\. Yang, L\. Ma, J\. Zhao, and Y\. WangToward better EHR reasoning in LLMs: reinforcement learning with expert attention guidance\.InProceedings of the AAAI Conference on Artificial Intelligence,Vol\.40,pp\. 30690–30698\.External Links:[Document](https://dx.doi.org/10.1609/aaai.v40i36.40325)Cited by:[§A\.3](https://arxiv.org/html/2610.10641#A1.SS3.p2.1)\.
- Gaoet al\.\(2020\)J\. Gao, C\. Xiao, Y\. Wang, W\. Tang, L\. M\. Glass, and J\. SunStagenet: stage\-aware neural networks for health risk prediction\.InProceedings of the web conference 2020,pp\. 530–540\.Cited by:[§A\.1](https://arxiv.org/html/2610.10641#A1.SS1.p1.1),[3rd item](https://arxiv.org/html/2610.10641#A3.I1.i3.p1.1),[§2](https://arxiv.org/html/2610.10641#S2.p2.1),[§4](https://arxiv.org/html/2610.10641#S4.SS0.SSS0.Px3.p1.1)\.
- Guoet al\.\(2025\)D\. Guo, D\. Yang, H\. Zhang, J\. Song, R\. Zhang, R\. Xu, Q\. Zhu, S\. Ma, P\. Wang, X\. Bi,et al\.DeepSeek\-R1 incentivizes reasoning in LLMs through reinforcement learning\.Nature645\(8081\),pp\. 633–638\.External Links:[Document](https://dx.doi.org/10.1038/s41586-025-09422-z)Cited by:[§A\.4](https://arxiv.org/html/2610.10641#A1.SS4.p1.1),[§2](https://arxiv.org/html/2610.10641#S2.p3.1)\.
- GX\-Chenet al\.\(2026\)A\. GX\-Chen, J\. Prakash, J\. Guo, R\. Fergus, and R\. RanganathKL\-regularized reinforcement learning for generative modelling is designed to mode collapse\.InInternational Conference on Learning Representations,Vol\.2026,pp\. 50665–50693\.Cited by:[§A\.4](https://arxiv.org/html/2610.10641#A1.SS4.p2.1),[§1](https://arxiv.org/html/2610.10641#S1.p1.1),[§2](https://arxiv.org/html/2610.10641#S2.p3.1)\.
- Heet al\.\(2026\)Y\. He, Y\. Sun, J\. Tan, Y\. Chen, X\. Kong, C\. Shen, X\. Wang, A\. Zhang, and T\. ChuaReasoning over semantic ids enhances generative recommendation\.InProceedings of the 32nd ACM SIGKDD Conference on Knowledge Discovery and Data Mining V\. 2,pp\. 1638–1649\.External Links:[Document](https://dx.doi.org/10.1145/3770855.3818122)Cited by:[§A\.2](https://arxiv.org/html/2610.10641#A1.SS2.p3.1)\.
- Huanget al\.\(2026\)X\. Huang, J\. Wu, H\. Liu, X\. Tang, and Y\. ZhouM1: unleash the potential of test\-time scaling for medical reasoning with large language models\.InProceedings of the Fifth Machine Learning for Health Symposium,Proceedings of Machine Learning Research, Vol\.297,pp\. 369–383\.Cited by:[§A\.3](https://arxiv.org/html/2610.10641#A1.SS3.p1.1)\.
- Jianget al\.\(2024\)P\. Jiang, C\. Xiao, A\. Cross, and J\. SunGraphCare: enhancing healthcare predictions with personalized knowledge graphs\.InInternational Conference on Learning Representations,Vol\.2024,pp\. 16839–16866\.Cited by:[§A\.3](https://arxiv.org/html/2610.10641#A1.SS3.p2.1)\.
- Jianget al\.\(2025\)P\. Jiang, C\. D\. Xiao, M\. Jiang, P\. Bhatia, T\. Kass\-Hout, J\. Sun, and J\. HanReasoning\-enhanced healthcare predictions with knowledge graph community retrieval\.InInternational Conference on Learning Representations,Vol\.2025,pp\. 81785–81830\.Cited by:[§A\.3](https://arxiv.org/html/2610.10641#A1.SS3.p2.1),[§1](https://arxiv.org/html/2610.10641#S1.p1.1),[§2](https://arxiv.org/html/2610.10641#S2.p2.1)\.
- Johnsonet al\.\(2023\)A\. E\. Johnson, L\. Bulgarelli, L\. Shen, A\. Gayles, A\. Shammout, S\. Horng, T\. J\. Pollard, S\. Hao, B\. Moody, B\. Gow,et al\.MIMIC\-iv, a freely accessible electronic health record dataset\.Scientific data10\(1\),pp\. 1\.Cited by:[§1](https://arxiv.org/html/2610.10641#S1.p5.1),[§4](https://arxiv.org/html/2610.10641#S4.SS0.SSS0.Px1.p1.1)\.
- Johnsonet al\.\(2016\)A\. E\. Johnson, T\. J\. Pollard, L\. Shen, L\. H\. Lehman, M\. Feng, M\. Ghassemi, B\. Moody, P\. Szolovits, L\. Anthony Celi, and R\. G\. MarkMIMIC\-iii, a freely accessible critical care database\.Scientific data3\(1\),pp\. 160035\.Cited by:[§1](https://arxiv.org/html/2610.10641#S1.p5.1),[§4](https://arxiv.org/html/2610.10641#S4.SS0.SSS0.Px1.p1.1)\.
- Keet al\.\(2026\)F\. Ke, D\. Hua, and K\. YangHieraMed: a hierarchical representation framework for next\-visit diagnosis prediction from longitudinal electronic health records\.MethodsX17,pp\. 104087\.External Links:ISSN 2215\-0161,[Document](https://dx.doi.org/https%3A//doi.org/10.1016/j.mex.2026.104087),[Link](https://www.sciencedirect.com/science/article/pii/S2215016126003031)Cited by:[§A\.1](https://arxiv.org/html/2610.10641#A1.SS1.p2.1),[7th item](https://arxiv.org/html/2610.10641#A3.I1.i7.p1.1),[§1](https://arxiv.org/html/2610.10641#S1.p1.1),[§4](https://arxiv.org/html/2610.10641#S4.SS0.SSS0.Px3.p1.1)\.
- Koo \(2024\)H\. KooNext visit diagnosis prediction via medical code\-centric multimodal contrastive EHR modelling with hierarchical regularisation\.InFindings of the Association for Computational Linguistics: EACL 2024,pp\. 41–55\.Cited by:[§A\.1](https://arxiv.org/html/2610.10641#A1.SS1.p2.1)\.
- Kraljevicet al\.\(2024\)Z\. Kraljevic, D\. Bean, A\. Shek, R\. Bendayan, H\. Hemingway, J\. Au Yeung,et al\.Foresight—a generative pretrained transformer for modelling of patient timelines using electronic health records: a retrospective modelling study\.The Lancet Digital Health6\(4\),pp\. e281–e290\.Cited by:[§A\.1](https://arxiv.org/html/2610.10641#A1.SS1.p3.1)\.
- Lanhamet al\.\(2023\)T\. Lanham, A\. Chen, A\. Radhakrishnan, B\. Steiner, C\. Denison, D\. Hernandez, D\. Li, E\. Durmus, E\. Hubinger, J\. Kernion,et al\.Measuring faithfulness in chain\-of\-thought reasoning\.arXiv preprint arXiv:2307\.13702\.Cited by:[§D\.2](https://arxiv.org/html/2610.10641#A4.SS2.p2.1)\.
- Liet al\.\(2026\)C\. Li, Y\. Zhang, B\. Wang, G\. Ma, W\. Tang, H\. Huang, and N\. DuanSetPO: set\-level policy optimization for diversity\-preserving LLM reasoning\.InProceedings of the 43rd International Conference on Machine Learning,External Links:[Link](https://openreview.net/forum?id=tYKGzVE1g7)Cited by:[§A\.5](https://arxiv.org/html/2610.10641#A1.SS5.p1.1),[§2](https://arxiv.org/html/2610.10641#S2.p3.1)\.
- Liet al\.\(2020\)Y\. Li, S\. Rao, J\. R\. A\. Solares, A\. Hassaine, R\. Ramakrishnan, D\. Canoy, Y\. Zhu, K\. Rahimi, and G\. Salimi\-KhorshidiBEHRT: transformer for electronic health records\.Scientific Reports10\(1\),pp\. 7155\.Cited by:[§A\.1](https://arxiv.org/html/2610.10641#A1.SS1.p3.1)\.
- Liuet al\.\(2025\)C\. Liu, H\. Wang, J\. Pan, Z\. Wan, Y\. Dai, F\. Lin, W\. Bai, D\. Rueckert, and R\. ArcucciBeyond distillation: pushing the limits of medical LLM reasoning with minimalist rule\-based RL\.arXiv preprint arXiv:2505\.17952\.Cited by:[§A\.3](https://arxiv.org/html/2610.10641#A1.SS3.p1.1),[§1](https://arxiv.org/html/2610.10641#S1.p1.1)\.
- Liuet al\.\(2026\)Z\. Liu, S\. Wang, X\. Wang, R\. Zhang, J\. Deng, H\. Bao, J\. Zhang, W\. Li, P\. Zheng, X\. Wu,et al\.OneRec\-Think: in\-text reasoning for generative recommendation\.InProceedings of the 64th Annual Meeting of the Association for Computational Linguistics \(Volume 1: Long Papers\),pp\. 2664–2681\.External Links:[Document](https://dx.doi.org/10.18653/v1/2026.acl-long.123)Cited by:[§A\.2](https://arxiv.org/html/2610.10641#A1.SS2.p3.1),[§1](https://arxiv.org/html/2610.10641#S1.p2.1),[§2](https://arxiv.org/html/2610.10641#S2.p2.1)\.
- Luet al\.\(2022\)C\. Lu, T\. Han, and Y\. NingContext\-aware health event prediction via transition functions on dynamic disease graphs\.InProceedings of the AAAI Conference on Artificial Intelligence,Vol\.36,pp\. 4567–4574\.Cited by:[§A\.1](https://arxiv.org/html/2610.10641#A1.SS1.p2.1)\.
- Luet al\.\(2021\)C\. Lu, C\. K\. Reddy, P\. Chakraborty, S\. Kleinberg, and Y\. NingCollaborative graph learning with auxiliary text for temporal event prediction in healthcare\.InProceedings of the Thirtieth International Joint Conference on Artificial Intelligence \(IJCAI\-21\),pp\. 3529–3535\.External Links:[Document](https://dx.doi.org/10.24963/ijcai.2021/486)Cited by:[§A\.1](https://arxiv.org/html/2610.10641#A1.SS1.p2.1),[4th item](https://arxiv.org/html/2610.10641#A3.I1.i4.p1.1),[§2](https://arxiv.org/html/2610.10641#S2.p2.1),[§4](https://arxiv.org/html/2610.10641#S4.SS0.SSS0.Px2.p1.1),[§4](https://arxiv.org/html/2610.10641#S4.SS0.SSS0.Px3.p1.1)\.
- Luoet al\.\(2020\)J\. Luo, M\. Ye, C\. Xiao, and F\. MaHiTANet: hierarchical time\-aware attention networks for risk prediction on electronic health records\.InProceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining,pp\. 647–656\.Cited by:[§A\.1](https://arxiv.org/html/2610.10641#A1.SS1.p1.1)\.
- Lvet al\.\(2026\)H\. Lv, K\. Zhang, Y\. Tan, and X\. ChenTowards efficient and interpretable medical concept representation via ontology\-driven residual vector quantization\.InProceedings of the ACM Web Conference 2026,pp\. 8645–8648\.Cited by:[§A\.2](https://arxiv.org/html/2610.10641#A1.SS2.p1.1),[§1](https://arxiv.org/html/2610.10641#S1.p2.1),[§2](https://arxiv.org/html/2610.10641#S2.p2.1)\.
- Maet al\.\(2017\)F\. Ma, R\. Chitta, J\. Zhou, Q\. You, T\. Sun, and J\. GaoDipole: diagnosis prediction in healthcare via attention\-based bidirectional recurrent neural networks\.InProceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining,pp\. 1903–1911\.Cited by:[§A\.1](https://arxiv.org/html/2610.10641#A1.SS1.p1.1)\.
- Maet al\.\(2018\)F\. Ma, Q\. You, H\. Xiao, R\. Chitta, J\. Zhou, and J\. GaoKame: knowledge\-based attention model for diagnosis prediction in healthcare\.InProceedings of the 27th ACM international conference on information and knowledge management,pp\. 743–752\.Cited by:[§A\.1](https://arxiv.org/html/2610.10641#A1.SS1.p2.1),[2nd item](https://arxiv.org/html/2610.10641#A3.I1.i2.p1.1),[§C\.1](https://arxiv.org/html/2610.10641#A3.SS1.p1.1),[§1](https://arxiv.org/html/2610.10641#S1.p1.1),[§2](https://arxiv.org/html/2610.10641#S2.p2.1),[§4](https://arxiv.org/html/2610.10641#S4.SS0.SSS0.Px1.p1.1),[§4](https://arxiv.org/html/2610.10641#S4.SS0.SSS0.Px3.p1.1)\.
- Maet al\.\(2025\)M\. D\. Ma, X\. Wang, Y\. Xiao, A\. Cuturrufo, V\. S\. Nori, E\. Halperin, and W\. WangMemorize and rank: elevating large language models for clinical diagnosis prediction\.InProceedings of the AAAI Conference on Artificial Intelligence,Vol\.39,pp\. 24786–24794\.Cited by:[§A\.2](https://arxiv.org/html/2610.10641#A1.SS2.p2.1),[§1](https://arxiv.org/html/2610.10641#S1.p2.1),[§2](https://arxiv.org/html/2610.10641#S2.p2.1)\.
- Rajputet al\.\(2023\)S\. Rajput, N\. Mehta, A\. Singh, R\. H\. Keshavan, T\. Vu, L\. Heldt, L\. Hong, Y\. Tay, V\. Tran, J\. Samost, M\. Kula, E\. Chi, and M\. SathiamoorthyRecommender systems with generative retrieval\.InAdvances in Neural Information Processing Systems,Vol\.36,pp\. 10299–10315\.Cited by:[§A\.2](https://arxiv.org/html/2610.10641#A1.SS2.p3.1),[§1](https://arxiv.org/html/2610.10641#S1.p2.1)\.
- Rasmyet al\.\(2021\)L\. Rasmy, Y\. Xiang, Z\. Xie, C\. Tao, and D\. ZhiMed\-BERT: pretrained contextualized embeddings on large\-scale structured electronic health records for disease prediction\.npj Digital Medicine4\(1\),pp\. 86\.Cited by:[§A\.1](https://arxiv.org/html/2610.10641#A1.SS1.p3.1),[§1](https://arxiv.org/html/2610.10641#S1.p1.1)\.
- Röhret al\.\(2026\)T\. Röhr, T\. M\. J\. Steffek, R\. Teucher, K\. Bressem, A\. Figueroa, P\. Grundmann, P\. Troeger, F\. A\. Gers, and A\. LöserDeepICD\-R1: medical reasoning through hierarchical rewards and unsupervised distillation\.InProceedings of the Fifteenth Language Resources and Evaluation Conference,pp\. 10764–10775\.External Links:[Link](https://aclanthology.org/2026.lrec-1.843/),[Document](https://dx.doi.org/10.63317/5ntn3gnmv9cy)Cited by:[§A\.3](https://arxiv.org/html/2610.10641#A1.SS3.p3.1)\.
- Shaoet al\.\(2024\)Z\. Shao, P\. Wang, Q\. Zhu, R\. Xu, J\. Song, X\. Bi, H\. Zhang, M\. Zhang, Y\. Li, Y\. Wu,et al\.Deepseekmath: pushing the limits of mathematical reasoning in open language models\.arXiv preprint arXiv:2402\.03300\.Cited by:[§A\.4](https://arxiv.org/html/2610.10641#A1.SS4.p1.1),[§C\.3](https://arxiv.org/html/2610.10641#A3.SS3.p3.1),[§1](https://arxiv.org/html/2610.10641#S1.p1.1),[§2](https://arxiv.org/html/2610.10641#S2.p3.1),[§3\.5](https://arxiv.org/html/2610.10641#S3.SS5.p1.1)\.
- Singhalet al\.\(2023\)K\. Singhal, S\. Azizi, T\. Tu, S\. S\. Mahdavi, J\. Wei, H\. W\. Chung, N\. Scales, A\. Tanwani, H\. Cole\-Lewis, S\. Pfohl,et al\.Large language models encode clinical knowledge\.Nature620\(7972\),pp\. 172–180\.Cited by:[§A\.3](https://arxiv.org/html/2610.10641#A1.SS3.p1.1)\.
- Singhalet al\.\(2025\)K\. Singhal, T\. Tu, J\. Gottweis, R\. Sayres, E\. Wulczyn, M\. Amin, L\. Hou, K\. Clark, S\. R\. Pfohl, H\. Cole\-Lewis,et al\.Toward expert\-level medical question answering with large language models\.Nature Medicine31\(3\),pp\. 943–950\.Cited by:[§A\.3](https://arxiv.org/html/2610.10641#A1.SS3.p1.1)\.
- Snellet al\.\(2025\)C\. Snell, J\. Lee, K\. Xu, and A\. KumarScaling LLM test\-time compute optimally can be more effective than scaling parameters for reasoning\.InInternational Conference on Learning Representations,Vol\.2025,pp\. 10131–10165\.Cited by:[§A\.4](https://arxiv.org/html/2610.10641#A1.SS4.p1.1),[§2](https://arxiv.org/html/2610.10641#S2.p3.1)\.
- Soroushet al\.\(2024\)A\. Soroush, B\. S\. Glicksberg, E\. Zimlichman, Y\. Barash, R\. Freeman, A\. W\. Charney, G\. N\. Nadkarni, and E\. KlangLarge language models are poor medical coders—benchmarking of medical code querying\.NEJM AI1\(5\),pp\. AIdbp2300040\.Cited by:[§A\.2](https://arxiv.org/html/2610.10641#A1.SS2.p1.1),[§1](https://arxiv.org/html/2610.10641#S1.p2.1)\.
- Suet al\.\(2025\)X\. Su, S\. Messica, Y\. Huang, R\. Johnson, L\. Fesser, S\. Gao, F\. Sahneh, and M\. ZitnikMultimodal medical code tokenizer\.InProceedings of the 42nd International Conference on Machine Learning,Proceedings of Machine Learning Research, Vol\.267,pp\. 57030–57045\.Cited by:[§A\.2](https://arxiv.org/html/2610.10641#A1.SS2.p1.1),[§1](https://arxiv.org/html/2610.10641#S1.p2.1),[§2](https://arxiv.org/html/2610.10641#S2.p2.1)\.
- Tanet al\.\(2025\)Y\. Tan, H\. Lv, Y\. Zhan, G\. Ma, B\. Xiong, and C\. YangBoxlm: unifying structures and semantics of medical concepts for diagnosis prediction in healthcare\.InProceedings of the 42nd International Conference on Machine Learning,Proceedings of Machine Learning Research, Vol\.267,pp\. 58603–58620\.Cited by:[§A\.1](https://arxiv.org/html/2610.10641#A1.SS1.p2.1),[6th item](https://arxiv.org/html/2610.10641#A3.I1.i6.p1.1),[§2](https://arxiv.org/html/2610.10641#S2.p2.1),[§4](https://arxiv.org/html/2610.10641#S4.SS0.SSS0.Px3.p1.1)\.
- Teamet al\.\(2026\)O\. Team, B\. Yang, B\. Ding, C\. Chu, D\. Zang, F\. Pan, H\. Li, H\. Jiang, H\. Bao, H\. Wang,et al\.OneReason technical report\.arXiv preprint arXiv:2606\.06260\.Cited by:[§A\.2](https://arxiv.org/html/2610.10641#A1.SS2.p3.1),[§1](https://arxiv.org/html/2610.10641#S1.p2.1),[§2](https://arxiv.org/html/2610.10641#S2.p2.1)\.
- Turpinet al\.\(2023\)M\. Turpin, J\. Michael, E\. Perez, and S\. BowmanLanguage models don’t always say what they think: unfaithful explanations in chain\-of\-thought prompting\.Advances in Neural Information Processing Systems36,pp\. 74952–74965\.Cited by:[§D\.2](https://arxiv.org/html/2610.10641#A4.SS2.p2.1)\.
- Wanget al\.\(2023\)X\. Wang, J\. Wei, D\. Schuurmans, Q\. Le, E\. Chi, S\. Narang, A\. Chowdhery, and D\. ZhouSelf\-consistency improves chain of thought reasoning in language models\.InInternational Conference on Learning Representations,Cited by:[§A\.4](https://arxiv.org/html/2610.10641#A1.SS4.p1.1),[§2](https://arxiv.org/html/2610.10641#S2.p3.1)\.
- Weiet al\.\(2022\)J\. Wei, X\. Wang, D\. Schuurmans, M\. Bosma, B\. Ichter, F\. Xia, E\. Chi, Q\. V\. Le, and D\. ZhouChain\-of\-thought prompting elicits reasoning in large language models\.InAdvances in Neural Information Processing Systems,Vol\.35,pp\. 24824–24837\.Cited by:[§A\.4](https://arxiv.org/html/2610.10641#A1.SS4.p1.1),[§2](https://arxiv.org/html/2610.10641#S2.p3.1)\.
- Yanget al\.\(2025\)A\. Yang, A\. Li, B\. Yang, B\. Zhang, B\. Hui, B\. Zheng, B\. Yu, C\. Gao, C\. Huang, C\. Lv,et al\.Qwen3 technical report\.arXiv preprint arXiv:2505\.09388\.Cited by:[§C\.3](https://arxiv.org/html/2610.10641#A3.SS3.p1.1),[§4](https://arxiv.org/html/2610.10641#S4.SS0.SSS0.Px4.p1.1)\.
- Yanget al\.\(2023a\)C\. Yang, Z\. Wu, P\. Jiang, Z\. Lin, J\. Gao, B\. P\. Danek, and J\. SunPyhealth: a deep learning toolkit for healthcare applications\.InKDD’23: Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining,pp\. 5788–5789\.Cited by:[§3\.4](https://arxiv.org/html/2610.10641#S3.SS4.SSS0.Px1.p1.1)\.
- Yanget al\.\(2019\)P\. Yang, F\. Luo, S\. Ma, J\. Lin, and X\. SunA deep reinforced sequence\-to\-set model for multi\-label classification\.InProceedings of the 57th annual meeting of the association for computational linguistics,pp\. 5252–5258\.Cited by:[§A\.5](https://arxiv.org/html/2610.10641#A1.SS5.p2.1)\.
- Yanget al\.\(2023b\)Z\. Yang, A\. Mitra, W\. Liu, D\. Berlowitz, and H\. YuTransformEHR: transformer\-based encoder\-decoder generative model to enhance prediction of disease outcomes using electronic health records\.Nature communications14\(1\),pp\. 7857\.Cited by:[§A\.1](https://arxiv.org/html/2610.10641#A1.SS1.p3.1),[§2](https://arxiv.org/html/2610.10641#S2.p2.1)\.
- Yueet al\.\(2025\)Y\. Yue, Z\. Chen, R\. Lu, A\. Zhao, Z\. Wang, Y\. Yue, S\. Song, and G\. HuangDoes reinforcement learning really incentivize reasoning capacity in LLMs beyond the base model?\.InAdvances in Neural Information Processing Systems,Vol\.38\.Cited by:[§A\.4](https://arxiv.org/html/2610.10641#A1.SS4.p2.1),[§1](https://arxiv.org/html/2610.10641#S1.p1.1),[§2](https://arxiv.org/html/2610.10641#S2.p3.1)\.
- Zeghidouret al\.\(2022\)N\. Zeghidour, A\. Luebs, A\. Omran, J\. Skoglund, and M\. TagliasacchiSoundstream: an end\-to\-end neural audio codec\.IEEE/ACM Transactions on Audio, Speech, and Language Processing30,pp\. 495–507\.External Links:[Document](https://dx.doi.org/10.1109/TASLP.2021.3129994)Cited by:[§3\.2](https://arxiv.org/html/2610.10641#S3.SS2.SSS0.Px2.p1.1)\.
- Zhanget al\.\(2025\)Y\. Zhang, M\. Li, D\. Long, X\. Zhang, H\. Lin, B\. Yang, P\. Xie, A\. Yang, D\. Liu, J\. Lin, F\. Huang, and J\. ZhouQwen3 embedding: advancing text embedding and reranking through foundation models\.arXiv preprint arXiv:2506\.05176\.Cited by:[§C\.3](https://arxiv.org/html/2610.10641#A3.SS3.p1.1)\.
- Zhenget al\.\(2024\)B\. Zheng, Y\. Hou, H\. Lu, Y\. Chen, W\. X\. Zhao, M\. Chen, and J\. WenAdapting large language models by integrating collaborative semantics for recommendation\.In2024 IEEE 40th International Conference on Data Engineering \(ICDE\),pp\. 1435–1448\.Cited by:[§1](https://arxiv.org/html/2610.10641#S1.p2.1)\.
###### Appendix Contents
1. [1Introduction](https://arxiv.org/html/2610.10641#S1)
2. [2Related Work](https://arxiv.org/html/2610.10641#S2)
3. [3Method](https://arxiv.org/html/2610.10641#S3)1. [3\.1Task Formulation](https://arxiv.org/html/2610.10641#S3.SS1) 2. [3\.2Ontology\-Enriched Compositional Medical Tokenization](https://arxiv.org/html/2610.10641#S3.SS2) 3. [3\.3Multi\-Task SID–Clinical Context Alignment](https://arxiv.org/html/2610.10641#S3.SS3) 4. [3\.4Reasoning\-Enriched Training](https://arxiv.org/html/2610.10641#S3.SS4) 5. [3\.5Reinforcement Learning with Multi\-Positive Supervision](https://arxiv.org/html/2610.10641#S3.SS5) 6. [3\.6Two Inference Settings](https://arxiv.org/html/2610.10641#S3.SS6)
4. [4Experiments](https://arxiv.org/html/2610.10641#S4)1. [4\.1Main Results \(RQ1\)](https://arxiv.org/html/2610.10641#S4.SS1) 2. [4\.2ICD Ontology Paths in Medical SIDs \(RQ2\)](https://arxiv.org/html/2610.10641#S4.SS2) 3. [4\.3Ablation Study \(RQ3\)](https://arxiv.org/html/2610.10641#S4.SS3) 4. [4\.4Coverage and Diversity in Training \(RQ4\)](https://arxiv.org/html/2610.10641#S4.SS4)
5. [5Conclusion](https://arxiv.org/html/2610.10641#S5)
6. [References](https://arxiv.org/html/2610.10641#bib)
7. [AExtended Related Work](https://arxiv.org/html/2610.10641#A1)1. [A\.1Longitudinal Diagnosis Prediction](https://arxiv.org/html/2610.10641#A1.SS1) 2. [A\.2Medical Code Representations and Generation](https://arxiv.org/html/2610.10641#A1.SS2) 3. [A\.3Reasoning for Clinical Prediction](https://arxiv.org/html/2610.10641#A1.SS3) 4. [A\.4Large Reasoning Models and Policy Collapse](https://arxiv.org/html/2610.10641#A1.SS4) 5. [A\.5Correctness and Diversity in Reinforcement Learning](https://arxiv.org/html/2610.10641#A1.SS5)
8. [BAdditional Method Details](https://arxiv.org/html/2610.10641#A2)1. [B\.1Multi\-Task SID–Language Alignment](https://arxiv.org/html/2610.10641#A2.SS1) 2. [B\.2Reasoning\-Enriched Training](https://arxiv.org/html/2610.10641#A2.SS2)1. [B\.2\.1Training Objectives](https://arxiv.org/html/2610.10641#A2.SS2.SSS1) 3. [B\.3Prompts for Reasoning\-Enriched Data](https://arxiv.org/html/2610.10641#A2.SS3) 4. [B\.4Coverage Reward Property](https://arxiv.org/html/2610.10641#A2.SS4) 5. [B\.5GRPO Optimization Details](https://arxiv.org/html/2610.10641#A2.SS5) 6. [B\.6Catalog\-Constrained Beam Search](https://arxiv.org/html/2610.10641#A2.SS6)
9. [CAdditional Experimental Details](https://arxiv.org/html/2610.10641#A3)1. [C\.1Dataset Preprocessing](https://arxiv.org/html/2610.10641#A3.SS1) 2. [C\.2Baselines](https://arxiv.org/html/2610.10641#A3.SS2) 3. [C\.3Implementation Details](https://arxiv.org/html/2610.10641#A3.SS3) 4. [C\.4Semantic Structure of Medical SIDs](https://arxiv.org/html/2610.10641#A3.SS4)1. [C\.4\.1Randomly Sampled First\-Token Cases](https://arxiv.org/html/2610.10641#A3.SS4.SSS1) 2. [C\.4\.2Semantic Organization Across the Disease Vocabulary](https://arxiv.org/html/2610.10641#A3.SS4.SSS2) 5. [C\.5General Ability Evaluation](https://arxiv.org/html/2610.10641#A3.SS5)
10. [DBroader Impacts, Limitations, and Future Work](https://arxiv.org/html/2610.10641#A4)1. [D\.1Broader Impacts](https://arxiv.org/html/2610.10641#A4.SS1) 2. [D\.2Limitations](https://arxiv.org/html/2610.10641#A4.SS2) 3. [D\.3Future Work](https://arxiv.org/html/2610.10641#A4.SS3)
## Appendix AExtended Related Work
We expand the discussion in Section[2](https://arxiv.org/html/2610.10641#S2), following the progression from clinical prediction and medical representations to reasoning models and the optimization of diagnosis coverage\.
### A\.1Longitudinal Diagnosis Prediction
Longitudinal EHR models learn how diagnoses and other clinical events evolve across visits\. Doctor AI and Dipole use recurrent networks to model these sequences, while RETAIN uses attention to identify influential visits and clinical variables\([Choi et al\., 2016a](https://arxiv.org/html/2610.10641#bib.bib10);[Ma et al\., 2017](https://arxiv.org/html/2610.10641#bib.bib39);[Choi et al\., 2016b](https://arxiv.org/html/2610.10641#bib.bib22)\)\. HiTANet accounts for irregular time intervals, and StageNet models changes in patient status\([Luo et al\., 2020](https://arxiv.org/html/2610.10641#bib.bib41);[Gao et al\., 2020](https://arxiv.org/html/2610.10641#bib.bib23)\)\.
Medical knowledge and relations between patients provide additional structure\. GRAM and KAME incorporate medical ontologies into the representations used for prediction\([Choi et al\., 2017](https://arxiv.org/html/2610.10641#bib.bib40);[Ma et al\., 2018](https://arxiv.org/html/2610.10641#bib.bib8)\)\. CGL learns from patient and disease graphs, while subsequent methods model transitions on dynamic disease graphs or encode EHRs as temporal heterogeneous graphs\([Lu et al\., 2021](https://arxiv.org/html/2610.10641#bib.bib21);[Lu et al\., 2022](https://arxiv.org/html/2610.10641#bib.bib42);[Chen et al\., 2024](https://arxiv.org/html/2610.10641#bib.bib9)\)\. NECHO combines medical codes, demographic information, and clinical notes through contrastive learning and hierarchical regularization\([Koo, 2024](https://arxiv.org/html/2610.10641#bib.bib43)\)\. BoxLM combines the textual semantics and hierarchical structure of medical concepts using box embeddings\([Tan et al\., 2025](https://arxiv.org/html/2610.10641#bib.bib20)\)\. HieraMed uses embeddings of medical code descriptions within a hierarchy of code, visit, and patient representations\([Ke et al\., 2026](https://arxiv.org/html/2610.10641#bib.bib28)\)\.
Pretraining on patient records offers another route to clinical prediction\. BEHRT and Med\-BERT learn contextual representations of structured EHRs that can be adapted to disease prediction\([Li et al\., 2020](https://arxiv.org/html/2610.10641#bib.bib44);[Rasmy et al\., 2021](https://arxiv.org/html/2610.10641#bib.bib45)\)\. Generative approaches also exist: TransformEHR predicts future medical codes with a Transformer encoder and decoder, and Foresight models patient timelines through autoregressive generation\([Yang et al\., 2023b](https://arxiv.org/html/2610.10641#bib.bib12);[Kraljevic et al\., 2024](https://arxiv.org/html/2610.10641#bib.bib46)\)\. CPLLM adapts pretrained LLMs to clinical prediction by expressing patient histories as text, with evaluations including specific disease prediction and readmission\([Ben Shoham and Rappoport, 2024](https://arxiv.org/html/2610.10641#bib.bib48)\)\. These settings differ in the information available to the model and the outputs being evaluated\. Predicting a selected outcome, generating future clinical concepts, and recovering the full set of diagnoses at the next visit place different demands on the prediction model\.
### A\.2Medical Code Representations and Generation
Medical codes identify standardized concepts, but their character sequences do not express disease meanings in ordinary language\. Evaluations of LLMs on medical code queries report errors in mapping descriptions to exact codes\([Soroush et al\., 2024](https://arxiv.org/html/2610.10641#bib.bib49)\)\. This motivates representations that connect code identities to their descriptions and clinical relations\. MedTok encodes textual descriptions and relational context, then quantizes these representations into a shared token space\([Su et al\., 2025](https://arxiv.org/html/2610.10641#bib.bib13)\)\. Its evaluations include both EHR predictors and medical question answering, where the learned tokens are supplied as prefixes to LLMs\. MedRQ uses residual quantization and supervision from medical ontologies to learn discrete medical representations\([Lv et al\., 2026](https://arxiv.org/html/2610.10641#bib.bib14)\)\.
MERA incorporates disease identities directly into a language model’s vocabulary, with a dedicated token for each disease\([Ma et al\., 2025](https://arxiv.org/html/2610.10641#bib.bib15)\)\. It learns mappings between disease tokens and definitions, varies the order of diagnoses within a visit, and uses the medical hierarchy in candidate ranking\. This treatment accounts for the unordered structure of visit diagnoses, although a dedicated token for each disease requires the added vocabulary to grow with the diagnosis catalog\.
Our compositional representation draws on semantic IDs in generative recommendation, including systems that generate a natural language rationale before an identifier\([Rajput et al\., 2023](https://arxiv.org/html/2610.10641#bib.bib50);[Liu et al\., 2026](https://arxiv.org/html/2610.10641#bib.bib30);[He et al\., 2026](https://arxiv.org/html/2610.10641#bib.bib19);[Team et al\., 2026](https://arxiv.org/html/2610.10641#bib.bib29)\)\. We adapt this representation to diseases by quantizing their descriptions and ICD ontology paths into sequences of shared codebook tokens\. Alignment with clinical text and patient histories makes these SIDs usable as both inputs and diagnosis outputs\. The resulting interface allows a single autoregressive model to generate a clinical rationale followed by a diagnosis SID\.
### A\.3Reasoning for Clinical Prediction
Medical question answering has provided a setting for adapting and evaluating LLM reasoning\. Med\-PaLM and Med\-PaLM 2 study the use of LLMs for answering medical questions\([Singhal et al\., 2023](https://arxiv.org/html/2610.10641#bib.bib52);[Singhal et al\., 2025](https://arxiv.org/html/2610.10641#bib.bib53)\)\. HuatuoGPT\-o1 trains on medical problems with verifiable answers, while AlphaMed studies reinforcement learning from answer correctness without an initial stage of supervised training on reasoning traces\([Chen et al\., 2025](https://arxiv.org/html/2610.10641#bib.bib2);[Liu et al\., 2025](https://arxiv.org/html/2610.10641#bib.bib55)\)\. The m1 study examines computation at inference time for medical reasoning and finds that longer reasoning alone does not consistently improve performance; medical knowledge and the reasoning budget also matter\([Huang et al\., 2026](https://arxiv.org/html/2610.10641#bib.bib54)\)\.
For prediction from patient records, knowledge retrieval and reasoning supervision help connect clinical evidence to target outcomes\. GraphCare constructs patient\-specific knowledge graphs for healthcare prediction\([Jiang et al\., 2024](https://arxiv.org/html/2610.10641#bib.bib47)\)\. KARE retrieves relevant knowledge graph communities and distills reasoning for mortality and readmission prediction\([Jiang et al\., 2025](https://arxiv.org/html/2610.10641#bib.bib16)\)\. ReMedi uses known outcomes to guide the construction and regeneration of rationale–answer pairs for supervised and preference tuning\([Cao et al\., 2026](https://arxiv.org/html/2610.10641#bib.bib17)\)\. EAG\-RL initializes the policy with reasoning trajectories guided by specialized EHR models\. It then uses their attention patterns as an additional reward during reinforcement learning\([Fang et al\., 2026](https://arxiv.org/html/2610.10641#bib.bib56)\)\.
Reasoning has also been applied to medical coding\. DeepICD\-R1 combines distilled reasoning traces with rewards at several levels of the ICD hierarchy to predict codes from admission notes\([Röhr et al\., 2026](https://arxiv.org/html/2610.10641#bib.bib57)\)\. Coding the conditions described in a clinical document and forecasting a future visit use different evidence and supervision\. Our setting requires reasoning from earlier visits to recover multiple diagnoses in the next visit\. We therefore evaluate diagnosis coverage across sampled trajectories, in addition to whether an individual trajectory predicts a correct diagnosis\.
### A\.4Large Reasoning Models and Policy Collapse
Chain\-of\-thought prompting elicits intermediate reasoning steps before an answer\([Wei et al\., 2022](https://arxiv.org/html/2610.10641#bib.bib31)\)\. Self\-consistency samples several reasoning paths and aggregates their answers\([Wang et al\., 2023](https://arxiv.org/html/2610.10641#bib.bib32)\), while work on scaling computation at inference time studies how to allocate search and refinement to different problems\([Snell et al\., 2025](https://arxiv.org/html/2610.10641#bib.bib33)\)\. Reinforcement learning with verifiable rewards trains reasoning policies from feedback on their outputs\. DeepSeekMath introduces GRPO, which compares sampled trajectories within a group, and DeepSeek\-R1 applies reinforcement learning to develop reasoning capabilities\([Shao et al\., 2024](https://arxiv.org/html/2610.10641#bib.bib4);[Guo et al\., 2025](https://arxiv.org/html/2610.10641#bib.bib34)\)\.
Higher accuracy for an individual sample need not imply broader coverage across samples\. In the settings evaluated by[Yue et al\. \(2025\)](https://arxiv.org/html/2610.10641#bib.bib35), RLVR improves pass@1, but base models can attain higher pass@kkwhenkkis large\.[GX\-Chen et al\. \(2026\)](https://arxiv.org/html/2610.10641#bib.bib36)analyze how rewards, the reference policy, and KL regularization determine the target distribution\. Under conditions including weak regularization and equal verifiable rewards, that distribution can concentrate on a single region of high reward\. These findings motivate examining both correctness and coverage when several outputs can be valid\. For diagnosis prediction, repeated success on one diagnosis can coexist with poor recall of the other diagnoses recorded at the same visit\.
### A\.5Correctness and Diversity in Reinforcement Learning
Optimizing the quality of a group of outputs requires assigning credit for what each sample contributes to that group\. GAPO adjusts rewards using the frequency of valid outputs within a rollout group, giving more credit to underrepresented valid outputs\([Anschel et al\., 2025](https://arxiv.org/html/2610.10641#bib.bib37)\)\. SetPO measures diversity through similarities between trajectories and uses each trajectory’s marginal contribution to group diversity in policy optimization\([Li et al\., 2026](https://arxiv.org/html/2610.10641#bib.bib38)\)\. These methods connect the training signal for one trajectory to the other trajectories sampled for the same input\.
Rewards defined over sets also appear in multi\-label classification\.[Yang et al\. \(2019\)](https://arxiv.org/html/2610.10641#bib.bib18)use reinforcement learning with a reward independent of label order to reduce the sensitivity of sequence generation to arbitrary label orderings\. Their model generates a label set within one output sequence\. In our formulation, each reasoning trajectory ends with one diagnosis, and the rollout group is evaluated against the complete set of diagnoses at the next visit\.
Our objective measures diversity in terms of distinct correct diagnosis labels\. The coverage reward divides a correct prediction’s credit by the number of times that diagnosis appears in the group\. Consequently, each distinct correct diagnosis contributes one unit to the raw group reward, as shown in Appendix[B\.4](https://arxiv.org/html/2610.10641#A2.SS4)\. This gives the frequency adjustment a direct interpretation as diagnosis coverage\. An auxiliary multi\-positive loss supervises the SID answer tokens to provide training signal for correct diagnoses absent from a sampled group\. Together, the two terms address repetition among sampled positives and the limited exposure to positives that sampling can miss\.
## Appendix BAdditional Method Details
This section provides representative input–output examples for the task formats used throughout training\. We first present the six tasks used for multi\-task SID–language alignment\. The examples below follow the prompts in the implementation; only the assistant response is supervised\.
### B\.1Multi\-Task SID–Language Alignment
Tasks T1–T4 align textual or SID\-based longitudinal histories with disease\-name or SID prediction\. Tasks T5–T6 establish bidirectional grounding between disease names and compositional SIDs\. Diagnoses within each visit are unordered, whereas visits are listed chronologically\.
Let𝒟τ\\mathcal\{D\}\_\{\\tau\}denote the training set for taskτ∈\{1,…,6\}\\tau\\in\\\{1,\\ldots,6\\\}and let𝒜\(y\)\\mathcal\{A\}\(y\)contain the assistant\-response token positions\. All tasks are jointly optimized under the standard next\-token prediction objective\.
ℒMT=−1∑τ\|𝒟τ\|∑τ=16∑\(x,y\)∈𝒟τ∑j∈𝒜\(y\)logpθ\(yj∣x,y<j\)\.\\mathcal\{L\}\_\{\\mathrm\{MT\}\}=\-\\frac\{1\}\{\\sum\_\{\\tau\}\|\\mathcal\{D\}\_\{\\tau\}\|\}\\sum\_\{\\tau=1\}^\{6\}\\sum\_\{\(x,y\)\\in\\mathcal\{D\}\_\{\\tau\}\}\\sum\_\{j\\in\\mathcal\{A\}\(y\)\}\\log p\_\{\\theta\}\(y\_\{j\}\\mid x,y\_\{<j\}\)\.\(9\)
Task T1: SID History to SIDSystem: Predict one possible diagnosis SID in the next visit from the chronological SID history\. User: The patient’s chronological diagnosis history is: <visit\_start\> <a\_117\><b\_59\><c\_117\>,<a\_199\><b\_76\><c\_251\> <visit\_end\> <visit\_start\> <a\_117\><b\_0\><c\_82\>,<a\_87\><b\_184\><c\_39\> <visit\_end\> Return exactly one disease SID\. Assistant: <a\_117\><b\_0\><c\_82\>
Task T2: Textual History to SIDSystem: Predict one possible diagnosis SID in the next visit from the chronological diagnosis history\. User: The patient’s chronological diagnosis history is: Visit 1: Subarachnoid hemorrhage; Pneumonitis due to inhalation of food or vomitus Visit 2: Cerebral aneurysm, nonruptured; Unspecified essential hypertension Return exactly one disease SID\. Assistant: <a\_117\><b\_0\><c\_82\>
Task T3: SID History to Disease NameSystem: Predict one possible diagnosis in the next visit from the chronological SID history\. User: The patient’s chronological diagnosis history is: <visit\_start\> <a\_117\><b\_59\><c\_117\>,<a\_199\><b\_76\><c\_251\> <visit\_end\> <visit\_start\> <a\_117\><b\_0\><c\_82\>,<a\_87\><b\_184\><c\_39\> <visit\_end\> Return one possible disease description for the next visit\. Assistant: Cerebral aneurysm, nonruptured
Task T4: Textual History to Disease NameSystem: Predict one possible diagnosis in the next visit from the chronological diagnosis history\. User: The patient’s chronological diagnosis history is: Visit 1: Subarachnoid hemorrhage; Pneumonitis due to inhalation of food or vomitus Visit 2: Cerebral aneurysm, nonruptured; Unspecified essential hypertension Return one possible disease description for the next visit\. Assistant: Cerebral aneurysm, nonruptured
Task T5: Disease Name to SIDSystem: You map ICD disease names to semantic identifiers\. User: Which disease has the name “Cerebral aneurysm, nonruptured”? Assistant: <a\_117\><b\_0\><c\_82\>
Task T6: SID to Disease NameSystem: You map semantic identifiers to ICD disease names\. User: What disease does<a\_117\><b\_0\><c\_82\>represent? Assistant: Cerebral aneurysm, nonruptured
### B\.2Reasoning\-Enriched Training
The disease\-level and case\-level enriched corpora are trained as plain\-text next\-token prediction sequences, without a system or user prompt\. Reasoning activation instead uses the chat\-formatted history\-only prompt shown in the third example; both its reasoning trace and final SID are supervised\.
Training Case R1: Disease\-Level Semantic EnrichmentTraining text: <a\_117\><b\_0\><c\_82\>is a clinically significant vascular abnormality characterized by localized ballooning of an intracranial artery that has not yet ruptured\. The CCI body\-system classification places this entity within Diseases of the circulatory system, and the CCI chronicity classification designates it as chronic, reflecting its persistent nature and need for long\-term surveillance\. According to the CCS single\-level category,<a\_117\><b\_0\><c\_82\>falls under Other and ill\-defined cerebrovascular disease, and the complete CCS multi\-level hierarchy is Diseases of the circulatory system\>\>Cerebrovascular disease\>\>Other and ill\-defined cerebrovascular disease \[111\.\]\. Within the ICD ontology hierarchy, it is situated as DISEASES AND INJURIES\>\>DISEASES OF THE CIRCULATORY SYSTEM\>\>CEREBROVASCULAR DISEASE\>\>Other and ill\-defined cerebrovascular disease\>\><a\_117\><b\_0\><c\_82\>\. This classification structure is coding information and should not be interpreted as evidence of a causal pathway between the categories and the lesion\. Clinically,<a\_117\><b\_0\><c\_82\>often remains asymptomatic and may be discovered incidentally during brain imaging for unrelated complaints\. However, the most feared complication is rupture, leading to subarachnoid hemorrhage, which carries high morbidity and mortality\. Established risk factors for the development and growth of<a\_117\><b\_0\><c\_82\>include hypertension, cigarette smoking, alcohol misuse, and a family history of intracranial aneurysms\. Certain genetic conditions, such as autosomal dominant polycystic kidney disease and Ehlers\-Danlos syndrome, also predispose patients to this vascular lesion\. Common comorbidities among patients harboring<a\_117\><b\_0\><c\_82\>may include atherosclerotic cardiovascular disease, prior ischemic stroke, or other manifestations of systemic vascular injury\. Management strategies focus on preventing rupture, balancing the risks of microsurgical clipping or endovascular coiling against the natural history of the unruptured lesion\. Regular imaging follow\-up is often recommended for small stable lesions, while larger or symptomatic aneurysms may warrant intervention\. Thus,<a\_117\><b\_0\><c\_82\>represents a chronic circulatory condition that demands individualized risk assessment and careful clinical surveillance\.
Training Case R2: Case\-Level Semantic EnrichmentTraining text: Reviewing the longitudinal record, the picture centers on chronic cerebrovascular disease\. At the initial visit,<a\_117\><b\_0\><c\_82\>appeared alongside<a\_117\><b\_59\><c\_117\>, with associated symptoms<a\_138\><b\_32\><c\_38\>and<a\_93\><b\_60\><c\_3\>;<a\_179\><b\_208\><c\_18\>was also present but seemed less tied to this axis\. By the most recent visit, recurrence of<a\_117\><b\_59\><c\_117\>together with<a\_207\><b\_3\><c\_118\>and<a\_38\><b\_213\><c\_64\>points to an active cerebrovascular process that required intervention and now device\-related follow\-up\. In this context, the chronic<a\_117\><b\_0\><c\_82\>from the earliest encounter stands out as the likely underlying lesion being monitored, rather than an incidental finding, since it belongs to the same circulatory/cerebrovascular domain\. The early presence of<a\_179\><b\_208\><c\_18\>contributed to the initial burden but does not share this close relationship\. Going forward, continued cerebrovascular surveillance and management of potential complications, along with related neurological and vascular diagnoses, would be expected\.
Training Case R3: Reasoning ActivationSystem: Predict one possible diagnosis SID in the next visit from the chronological SID history\. Think through the longitudinal clinical patterns before answering\. User: The patient’s chronological diagnosis history is: <visit\_start\> <a\_117\><b\_0\><c\_82\>,<a\_138\><b\_32\><c\_38\>,<a\_117\><b\_59\><c\_117\>,<a\_179\><b\_208\><c\_18\>,<a\_93\><b\_60\><c\_3\> <visit\_end\> <visit\_start\> <a\_117\><b\_59\><c\_117\>,<a\_207\><b\_3\><c\_118\>,<a\_38\><b\_213\><c\_64\> <visit\_end\> Think step by step about the longitudinal clinical patterns, then return exactly one disease SID\. Assistant: <think\> I see a core longitudinal pattern centered on chronic cerebrovascular disease\. The earliest visit already contained<a\_117\><b\_0\><c\_82\>, a chronic circulatory\-system diagnosis, alongside<a\_117\><b\_59\><c\_117\>and symptoms such as<a\_138\><b\_32\><c\_38\>and<a\_93\><b\_60\><c\_3\>\. The recurrence of<a\_117\><b\_59\><c\_117\>in the most recent visit, together with<a\_207\><b\_3\><c\_118\>and<a\_38\><b\_213\><c\_64\>, strongly suggests an active cerebrovascular process that required intervention and generated device\-related follow\-up\. The persistence of the chronic SID<a\_117\><b\_0\><c\_82\>from the first visit may remain clinically relevant because it belongs to the same circulatory/cerebrovascular domain and could represent the underlying lesion being monitored\. The non\-chronic<a\_179\><b\_208\><c\_18\>from the first visit seems less tied to this axis, though it contributed to the initial overall burden\. Given the recurrence and the recent device/procedure encounters, subsequent visits may continue to involve cerebrovascular surveillance, complication management, or related neurological and vascular diagnoses\. </think\> <a\_117\><b\_0\><c\_82\>
#### B\.2\.1Training Objectives
Let𝒳disease\\mathcal\{X\}\_\{\\mathrm\{disease\}\}and𝒳case\\mathcal\{X\}\_\{\\mathrm\{case\}\}denote the disease\-level and case\-level enriched corpora\. Each samplex=\(x1,…,x\|x\|\)x=\(x\_\{1\},\\ldots,x\_\{\|x\|\}\)is a plain\-text sequence, withpθ\(x\)=∏j=1\|x\|pθ\(xj∣x<j\)p\_\{\\theta\}\(x\)=\\prod\_\{j=1\}^\{\|x\|\}p\_\{\\theta\}\(x\_\{j\}\\mid x\_\{<j\}\)\. The two corpora use next\-token prediction objectives:
ℒdisease\\displaystyle\\mathcal\{L\}\_\{\\mathrm\{disease\}\}=−𝔼x∼𝒳disease\[logpθ\(x\)\],\\displaystyle=\-\\mathbb\{E\}\_\{x\\sim\\mathcal\{X\}\_\{\\mathrm\{disease\}\}\}\\left\[\\log p\_\{\\theta\}\(x\)\\right\],\(10\)ℒcase\\displaystyle\\mathcal\{L\}\_\{\\mathrm\{case\}\}=−𝔼x∼𝒳case\[logpθ\(x\)\]\.\\displaystyle=\-\\mathbb\{E\}\_\{x\\sim\\mathcal\{X\}\_\{\\mathrm\{case\}\}\}\\left\[\\log p\_\{\\theta\}\(x\)\\right\]\.
For reasoning activation, each training example pairs a historical SID sequenceHHwith a teacher\-generated reasoning pathrrand a target diagnosisdd\. The prompt contains onlyHH, and the loss applies to the assistant response:
ℒact=−𝔼\(H,r,d\)\[logpθ\(<think\>r</think\>q\(d\)∣H\)\]\.\\mathcal\{L\}\_\{\\mathrm\{act\}\}=\-\\mathbb\{E\}\_\{\(H,r,d\)\}\\\!\\left\[\\log p\_\{\\theta\}\\\!\\left\(\\texttt\{<think\>\}r\\texttt\{</think\>\}\\,q\(d\)\\mid H\\right\)\\right\]\.\(11\)
### B\.3Prompts for Reasoning\-Enriched Data
We generate the three supervision signals in two routes\. Disease\-level semantic enrichment directly converts the structured dossier of one coded concept into a SID\-grounded clinical narrative\. For case\-level enrichment, we first elicit a history\-supported reasoning path and then provide that path, together with the same history and the observed diagnosis, to a separate integration prompt\. The resulting reasoning path is also reused as the reasoning supervision in the activation data\. The prompts below omit only the mechanics of model invocation\.
Prompt P1: Disease\-Level Narrative GenerationUser prompt \(template\): You are a senior clinical medicine expert preparing an in\-depth narrative for a coded clinical concept dossier\. Source information: – Concept name, provided only for understanding and medical knowledge retrieval; never reproduce it in the output: \[CONCEPT NAME\] – Semantic Identifier: \[SID\] – CCI body\-system classification: \[CCI BODY SYSTEM\] – CCI chronicity classification: \[CCI CHRONICITY\] – CCS single\-level category: \[CCS SINGLE\-LEVEL LABEL\] – CCS optional category: \[CCS OPTIONAL LABEL\] – CCS multi\-level hierarchy: \[COMPLETE CCS MULTI\-LEVEL PATH\] – ICD ontology hierarchy: \[COMPLETE ICD ONTOLOGY PATH\] Task: 1\. Write a rich, coherent clinical narrative of at least ten sentences about the coded clinical concept represented by \[SID\]\. 2\. Incorporate every available structured fact above\. Explicitly describe the CCI body\-system classification, CCI chronicity classification, CCS single\-level category, complete CCS multi\-level hierarchy, and complete ICD ontology hierarchy\. 3\. Treat the CCI, CCS, and ICD fields as coding and classification information\. Do not present a classification relationship as proof of clinical causation\. 4\. Enrich the dossier using only widely accepted, high\-confidence clinical knowledge relevant to the supplied concept name\. When applicable, discuss a concise clinical description, established causes or risk factors, commonly associated complications or downstream clinical consequences, relevant comorbidities or prior diagnoses, and the broader clinical context in which the concept may be recorded\. 5\. If CCI chronicity or body\-system information is unavailable, state only that the concept is not classified for that field\. Do not infer a missing classification\. 6\. Adapt the narrative to the type of coded concept\. If it represents an external cause, status, symptom, finding, or supplementary classification rather than a disease, do not describe it as a disease\. Entity\-reference requirements: 7\. Begin the paragraph with \[SID\]\. 8\. Every direct reference to this specific clinical concept must use exactly \[SID\]\. Never output the supplied concept name, ICD code, disease ID, abbreviation, synonym, or another alias\. 9\. Official CCS, CCI, and ICD category labels supplied above may appear only when explicitly describing those classification categories\. 10\. Use \[SID\] naturally at least four times\. Do not output any other Semantic Identifier\. Output requirements: 11\. Output only one flowing English paragraph\. Do not use headings, bullet points, enumerations, JSON, citations, meta\-commentary, or<think\>tags\. 12\. Maintain a professional and medically precise tone suitable for a clinical concept dossier\. The concrete output obtained by instantiating this template with<a\_117\><b\_0\><c\_82\>is shown in Training Case R1\.
Prompt P2: History\-Supported Reasoning\-Path GenerationUser prompt \(template\): You are an experienced clinical diagnostician reviewing a patient’s longitudinal diagnosis history\. Your task is to reason through the patient’s historical diagnoses and identify the longitudinal clinical patterns that would be most useful for a downstream prediction of one possible diagnosis in the next visit\. The observed next diagnosis is provided only as internal guidance for deciding which historical patterns may be relevant\. Never mention or discuss that diagnosis\. Patient diagnosis history: Visits are listed in chronological order, from oldest to most recent\. Diagnoses within the same visit are an unordered set; never infer temporal order among them\. For every diagnosis, the input supplies its complete SID, diagnosis name, CCI body system, CCI chronicity, CCS single\-level category, and CCS multi\-level path\. \[HISTORICAL VISITS WITH PER\-DIAGNOSIS METADATA\] Observed next diagnosis—internal guidance only; do not reveal: \[NEXT\-DIAGNOSIS SID, NAME, CCI FIELDS, AND CCS FIELDS\] SID atomicity rule:Every SID is one atomic identifier consisting of exactly three adjacent components,<a\_NUMBER\><b\_NUMBER\><c\_NUMBER\>\. Copy the complete SID exactly; never abbreviate it to one or two components\. Output requirements: 1\. Output only a concise but detailed first\-person reasoning monologue as one paragraph\. Start directly with the reasoning\. 2\. Compare diagnoses across visits, while treating diagnoses within one visit as unordered and potentially co\-occurring\. 3\. Give the greatest immediate predictive weight to recent visits\. Also consider diagnoses that persist or recur across visits, especially chronic diagnoses\. For a single\-visit history, discuss only the observed disease burden\. 4\. Body systems, chronicity, CCS categories, and broad clinical relationships may be used as attributes of SID\-based diagnoses, but never as alternative names for a concrete diagnosis\. 5\. Whenever referring to a concrete diagnosis, use only its complete SID\. Never attach a diagnosis name, abbreviation, synonym, clinical gloss, or explanatory label to a SID\. 6\. Mention only SIDs present in the history\. Never introduce an unseen SID, and do not output the observed next\-diagnosis SID unless it already occurs in the history\. 7\. Never mention “observed diagnosis,” “reference diagnosis,” “target diagnosis,” or equivalent language\. Reason as if predicting blindly\. 8\. Do not claim that chronology or within\-visit co\-occurrence proves causation\. Use appropriately cautious language such as “may,” “could,” or “is consistent with\.” 9\. Adapt the depth to history length: emphasize burden and co\-occurrence for short histories, and persistence, recurrence, newly appearing conditions, and recent shifts for longer histories\. 10\. Do not select or name a specific next diagnosis\. End with a non\-deterministic summary\. Applied to the two\-visit history in Training Case R3, this prompt produces the paragraph enclosed by<think\>and</think\>in that example\. That paragraph is retained as activation supervision and passed to Prompt P3 as the case\-level reasoning path\.
Prompt P3: Case\-Level Narrative IntegrationUser prompt \(instantiated example\): Integrate the following information into a single, coherent, natural narrative paragraph\. Patient diagnosis history: Visits are listed in chronological order, from oldest to most recent\. Diagnoses within the same visit are an unordered set\. Historical visit 1—oldest: –<a\_117\><b\_0\><c\_82\>: Cerebral aneurysm, nonruptured –<a\_138\><b\_32\><c\_38\>: Headache –<a\_117\><b\_59\><c\_117\>: Subarachnoid hemorrhage –<a\_179\><b\_208\><c\_18\>: Iron deficiency anemia, unspecified –<a\_93\><b\_60\><c\_3\>: Visual discomfort Historical visit 2—most recent: –<a\_117\><b\_59\><c\_117\>: Subarachnoid hemorrhage –<a\_207\><b\_3\><c\_118\>: Other complications due to nervous system device, implant, and graft –<a\_38\><b\_213\><c\_64\>: Other specified procedures as the cause of abnormal reaction or later complication Observed next diagnosis to integrate: – SID:<a\_117\><b\_0\><c\_82\> – Diagnosis name: Cerebral aneurysm, nonruptured Reasoning path: I see a core longitudinal pattern centered on chronic cerebrovascular disease\. The earliest visit already contained<a\_117\><b\_0\><c\_82\>, a chronic circulatory\-system diagnosis, alongside<a\_117\><b\_59\><c\_117\>and symptoms such as<a\_138\><b\_32\><c\_38\>and<a\_93\><b\_60\><c\_3\>\. The recurrence of<a\_117\><b\_59\><c\_117\>in the most recent visit, together with<a\_207\><b\_3\><c\_118\>and<a\_38\><b\_213\><c\_64\>, strongly suggests an active cerebrovascular process that required intervention and generated device\-related follow\-up\. The persistence of the chronic SID<a\_117\><b\_0\><c\_82\>from the first visit may remain clinically relevant because it belongs to the same circulatory/cerebrovascular domain and could represent the underlying lesion being monitored\. The non\-chronic<a\_179\><b\_208\><c\_18\>from the first visit seems less tied to this axis, though it contributed to the initial overall burden\. Given the recurrence and the recent device/procedure encounters, subsequent visits may continue to involve cerebrovascular surveillance, complication management, or related neurological and vascular diagnoses\. Output requirements: 1\. Write one natural, flowing longitudinal clinical narrative\. Avoid mechanical or formulaic language\. 2\. Preserve the essential analytical insights and clinical logic from the reasoning path\. 3\. Connect the historical pattern to the observed SID as an ordinary clinical finding\. Never use meta\-language such as “reference,” “target,” “ground truth,” or “next diagnosis,” and never imply that it was known in advance\. 4\. Refer to every concrete diagnosis only by its complete SID of the form<a\_XXX\><b\_YYY\><c\_ZZZ\>\. Do not output diagnosis names, codes, abbreviations, synonyms, or parenthetical clinical glosses\. Use only SIDs appearing in the supplied history or observed diagnosis\. 5\. Keep the narrative clinically precise, cohesive, and engaging\. Output only the paragraph\. The narrative produced for this instantiated prompt is shown in Training Case R2\.
### B\.4Coverage Reward Property
For a group ofNNtrajectories, letYYbe the ground\-truth SID set,yiy\_\{i\}the SID predicted by trajectoryii, andri=𝟏\[yi∈Y\]/cir\_\{i\}=\\mathbf\{1\}\[y\_\{i\}\\in Y\]/c\_\{i\}, whereci=∑j=1N𝟏\[yj=yi\]c\_\{i\}=\\sum\_\{j=1\}^\{N\}\\mathbf\{1\}\[y\_\{j\}=y\_\{i\}\]\. The total reward within a group equals its number of distinct correct predictions:
∑i=1Nri=\|\{yi:yi∈Y,1≤i≤N\}\|\.\\sum\_\{i=1\}^\{N\}r\_\{i\}=\\left\|\\\{y\_\{i\}:y\_\{i\}\\in Y,\\ 1\\leq i\\leq N\\\}\\right\|\.\(12\)To see this, group correct rollouts by disease\. If a correct SID appearscctimes, its total contribution isc\(1/c\)=1c\(1/c\)=1; summing over distinct correct SIDs gives Equation[12](https://arxiv.org/html/2610.10641#A2.E12)\. Incorrect predictions contribute zero regardless of their frequency\. The reward therefore increases when the group covers another correct SID, but not when it repeats a correct SID or generates a new incorrect one\.
Equation[12](https://arxiv.org/html/2610.10641#A2.E12)describes the raw group reward\. GRPO normalizes rewards within each group before updating the policy\. When rewards vary, trajectories predicting less\-repeated correct SIDs receive larger normalized advantages than duplicate or incorrect trajectories\. If all rollouts have the same reward, their normalized advantages are zero: an all\-identical correct group receives no policy\-gradient reinforcement, while an all\-distinct correct group has already attained the maximum coverage possible withNNrollouts\. Finite sampling and advantage normalization do not guarantee a globally uniform policy over all ground\-truth diagnoses\.
### B\.5GRPO Optimization Details
Negative\-advantage tokens use dual clipping\. To limit drift,D^KL\\widehat\{D\}\_\{\\mathrm\{KL\}\}averageseδ−δ−1e^\{\\delta\}\-\\delta\-1over response tokens, withδ=logπref−logπθ\\delta=\\log\\pi\_\{\\mathrm\{ref\}\}\-\\log\\pi\_\{\\theta\}\(numerically clipped\)\.
The original rollouts contribute the GRPO and KL gradients\. A second forward pass over answer\-replaced branches contributes the multi\-positive gradients\. These gradients accumulate on the same actor parameters across microbatches, followed by gradient norm clipping and one optimizer step\. At updatett, eligible rollouts are ordered by rollout index and assigned successive ground\-truth SIDs from a fixed enumeration ofYY, starting at index\(\(t−1\)N\)mod\|Y\|\(\(t\-1\)N\)\\bmod\|Y\|\.
### B\.6Catalog\-Constrained Beam Search
Let𝒬\\mathcal\{Q\}be the catalog of valid three\-token SIDs\. We build a prefix trie from their tokenizer IDs\. For a generated SID prefixaa, the trie returns the tokens that extendaatoward at least one SID in𝒬\\mathcal\{Q\}:
𝒩\(a\)=\{v:a∥vis a prefix of someq∈𝒬\}\.\\mathcal\{N\}\(a\)=\\\{v:a\\mathbin\{\\\|\}v\\text\{ is a prefix of some \}q\\in\\mathcal\{Q\}\\\}\.\(13\)Herea∥va\\mathbin\{\\\|\}vappends tokenvvto prefixaa\. After a complete SID, only the end\-of\-sequence token is allowed\. At each decoding step, we mask tokens outside𝒩\(a\)\\mathcal\{N\}\(a\)\. Starting from the empty prefix, beam search extends each retained path with its allowed next tokens and keeps theBBpaths with the highest cumulative log probability\. This continues through the end\-of\-sequence token\. Completed paths are checked against the catalog and deduplicated before mapping SIDs to diagnoses\.
Direct inference uses the checkpoint after reasoning activation\. The prompt contains the longitudinal SID historyHHand disables explicit thinking\. The SID\-token contribution to the score of diagnosisddis given in Equation[7](https://arxiv.org/html/2610.10641#S3.E7)\. The implementation ranks completed beams by their full sequence scores, which also include the terminating end\-of\-sequence token\. The thinking setting uses the checkpoint after coverage\-reward RL with multi\-positive supervision\. We first sampleRRreasoning chains\. Each chain is appended to the same history prompt, and the trie constrains only the subsequent SID tokens\. The resulting local rankings are fused as in Equation[8](https://arxiv.org/html/2610.10641#S3.E8)\.
## Appendix CAdditional Experimental Details
### C\.1Dataset Preprocessing
We process MIMIC\-III and MIMIC\-IV following prior diagnosis\-prediction studies\([Ma et al\., 2018](https://arxiv.org/html/2610.10641#bib.bib8);[Chen et al\., 2024](https://arxiv.org/html/2610.10641#bib.bib9)\)\. For both datasets, we retain patients with at least two visits and arrange each patient’s visits chronologically\. Given the diagnoses observed in the historical visits, the task is to predict the complete diagnosis set recorded at the next visit\. We split each dataset by patient into training, validation, and test sets with a ratio of 7:1:2, ensuring that all visits from the same patient occur in only one split\.
Because MIMIC\-IV is substantially larger than MIMIC\-III, we construct the experimental MIMIC\-IV cohort by sampling 10,000 patients from the patient\-level partitions while preserving the 7:1:2 ratio: 7,000 patients from the training split, 1,000 from the validation split, and 2,000 from the test split\. Table[3](https://arxiv.org/html/2610.10641#A3.T3)reports the cohort statistics after the common preprocessing procedure and before this MIMIC\-IV subsampling\.
Table 3:Dataset statistics after cohort preprocessing and before subsampling MIMIC\-IV\.
### C\.2Baselines
We compare CARing with representative baselines spanning conventional neural predictors, language\-assisted predictors, and a zero\-shot large language model:
- •RETAIN\([Choi et al\., 2016b](https://arxiv.org/html/2610.10641#bib.bib22)\)uses two reverse\-time recurrent attention mechanisms to assign visit\-level and variable\-level importance weights for accurate and interpretable prediction from longitudinal EHRs\.
- •KAME\([Ma et al\., 2018](https://arxiv.org/html/2610.10641#bib.bib8)\)augments a recurrent patient\-history encoder with medical knowledge\-graph embeddings and a knowledge\-attention mechanism over relevant ontology concepts for next\-visit diagnosis prediction\.
- •StageNet\([Gao et al\., 2020](https://arxiv.org/html/2610.10641#bib.bib23)\)combines a stage\-aware LSTM with stage\-adaptive convolution to identify latent health\-stage transitions and capture progression patterns for risk prediction\.
- •CGL\([Lu et al\., 2021](https://arxiv.org/html/2610.10641#bib.bib21)\)jointly learns patient and disease representations from a patient–disease observation graph and a disease ontology graph, while integrating attention\-weighted clinical\-text features into sequential prediction\.
- •TRANS\([Chen et al\., 2024](https://arxiv.org/html/2610.10641#bib.bib9)\)represents each longitudinal EHR as a temporal heterogeneous graph and applies a temporal graph transformer that combines temporal edge features with global positional and local structural encodings\.
- •BoxLM\([Tan et al\., 2025](https://arxiv.org/html/2610.10641#bib.bib20)\)fuses language\-model semantics with ontology\- and EHR\-derived hierarchies through box embeddings and models evolving patient states for diagnosis prediction using volume\-based similarity\.
- •HieraMed\([Ke et al\., 2026](https://arxiv.org/html/2610.10641#bib.bib28)\)encodes LLM\-generated medical\-code descriptions with Sentence\-BERT, aggregates diagnoses, procedures, and medications in visit\-centered heterogeneous graphs, and models patient\-state evolution across visits with a Liquid Neural Network for next\-visit diagnosis prediction\.
- •DeepSeek\-V4\-Flash \(zero\-shot\)is prompted directly to perform next\-visit diagnosis prediction without in\-context demonstrations or task\-specific parameter updates\.
For a fair comparison, we set both the disease embedding dimension and the dimension of the aggregated patient representation to 64 dim for all EHR\-trained baselines\.
##### DeepSeek\-V4\-Flash zero\-shot evaluation\.
We evaluate DeepSeek\-V4\-Flash on the test splits of MIMIC\-III and MIMIC\-IV without in\-context examples or task\-specific training\. For MIMIC\-IV, we use the 10,000\-patient cohort\. The prompt presents a patient’s prior diagnosis codes in chronological visit order and asks for 40 unique next\-visit diagnoses ranked by likelihood\. It includes neither diagnosis names nor target diagnoses\. Non\-thinking and thinking use the same prompt and differ only in whether the API’s thinking mode is enabled\. Both modes use temperature 0 and a maximum generation budget of 8,192 tokens on each dataset\.
We evaluate the final answer rather than the model’s reasoning text\. Predicted codes are normalized, matched to the dataset’s diagnosis catalog, and deduplicated while preserving their order\. Invalid codes are discarded, and at most 40 predictions are retained\. R@kkaverages the fraction of ground\-truth diagnoses retrieved among the topkkpredictions across visits, fork∈\{10,20,30,40\}k\\in\\\{10,20,30,40\\\}\.
### C\.3Implementation Details
We use Qwen3\-Embedding\-8B\([Zhang et al\., 2025](https://arxiv.org/html/2610.10641#bib.bib58)\)to obtain the continuous semantic representationxdx\_\{d\}of each disease from its ontology\-enriched textual metadata for SID construction\. We use Qwen3\-1\.7B\([Yang et al\., 2025](https://arxiv.org/html/2610.10641#bib.bib1)\)as the backbone and optimize all model parameters in each training stage\. DeepSeek\-V4\-Flash is used to generate the disease\-level and longitudinal corpora for enriched SID–language alignment and reasoning activation\. In the multi\-task alignment stage, SID and visit\-boundary tokens are appended to the tokenizer vocabulary and their embeddings are trained jointly with the backbone\. We train with AdamW, an effective batch size of 1024, a per\-GPU micro\-batch size of 8, a learning rate of3×10−43\\times 10^\{\-4\}, and a maximum sequence length of 1024\. Training runs for at most five epochs with early stopping on validation loss\. We use 20 warm\-up steps followed by cosine learning\-rate decay to 10% of the initial rate\.
The reasoning\-activation stage initializes from the multi\-task alignment checkpoint and retains the same effective batch size, micro\-batch size, sequence length, scheduler, and maximum number of epochs, while reducing the learning rate to1×10−51\\times 10^\{\-5\}\.
For reinforcement learning, we implement GRPO\([Shao et al\., 2024](https://arxiv.org/html/2610.10641#bib.bib4)\)with theverlframework\. We use a training batch size and PPO mini\-batch size of 256, a per\-GPU PPO micro\-batch size of 8, and a learning rate of1×10−61\\times 10^\{\-6\}\. For each input, we sample 16 rollouts with temperature 1\.0 and top\-pp1\.0; both the maximum prompt length and maximum response length are 1024\. We set the KL\-loss coefficient to1×10−31\\times 10^\{\-3\}, the entropy coefficient to zero, and the multi\-positive loss coefficient toλMP=5×10−3\\lambda\_\{\\mathrm\{MP\}\}=5\\times 10^\{\-3\}\. The actor is trained for at most ten epochs with gradient checkpointing\. All stages are distributed over 4 NVIDIA A800 GPUs\.
### C\.4Semantic Structure of Medical SIDs
#### C\.4\.1Randomly Sampled First\-Token Cases
We sampled four distinct first SID tokens uniformly from the 256 used by the name plus ICD path variant, using a fixed seed of 2024\. Figure[7](https://arxiv.org/html/2610.10641#A3.F7)shows how their diseases are distributed across ICD ontology subgroups\. Each count represents one distinct disease\.
Figure 7:ICD ontology subgroup counts for four randomly sampled first SID tokens\. Subgroups are the second nodes below the ontology root\.The sampled prefixes have recognizable clinical themes\. Of the 18 diseases beginning with⟨a86⟩\\langle a\_\{86\}\\rangle, 17 describe a personal or family history of malignancy\. The⟨a184⟩\\langle a\_\{184\}\\rangleprefix contains 20 nervous system diagnoses among 23 diseases, mainly peripheral and hereditary or degenerative disorders\. All 19 diseases under⟨a23⟩\\langle a\_\{23\}\\rangleare spinal cord injuries, and all 24 under⟨a192⟩\\langle a\_\{192\}\\rangleare chronic skin ulcers\. The three musculoskeletal diagnoses under⟨a184⟩\\langle a\_\{184\}\\ranglealso illustrate that a first token can connect related conditions across ontology branches\.
#### C\.4\.2Semantic Organization Across the Disease Vocabulary
We measured how well a shared first token groups the 4,491 distinct diseases by their top\-level ICD ontology group and single\-level CCS category\. The vocabulary spans 52 top\-level groups and 264 CCS categories\. For each token, majority purity is the fraction of its diseases in the most common category\. Weighted purity averages this fraction over diseases\. Pair agreement is the probability that two diseases with the same first token also have the same category\. Both SID variants use the same disease labels\.
Table 4:Semantic organization of first SID tokens over 4,491 distinct diseases\. ICD groups are the first nodes below the ontology root\.MetricName onlyName \+ ICD pathFirst\-token groups pure by ICD / 25658143First\-token groups≥80%\\geq 80\\%pure by ICD / 256108212Top\-level ICD weighted purity \(%\)69\.3690\.51Same ICD group given shared token \(%\)57\.6086\.49First\-token groups pure by CCS / 2561344First\-token groups≥80%\\geq 80\\%pure by CCS / 25636103CCS weighted purity \(%\)47\.6369\.78Same CCS category given shared token \(%\)32\.7457\.39Table[4](https://arxiv.org/html/2610.10641#A3.T4)shows stronger semantic organization for SIDs learned from names plus ICD paths\. The share of diseases assigned to their token’s dominant top\-level group rises from 69\.36% to 90\.51%, and 143 rather than 58 first\-token groups contain a single top\-level group\. The same pattern holds at the finer CCS level: diseases sharing a first token have the same CCS category with probability 57\.39% for names plus paths, compared with 32\.74% for names alone\. These results extend the sampled cases in Figure[7](https://arxiv.org/html/2610.10641#A3.F7)to the full disease vocabulary\.
### C\.5General Ability Evaluation
Table[5](https://arxiv.org/html/2610.10641#A3.T5)reports general\-ability scores for the base Qwen3\-1\.7B model and two intermediate training stages\. Enriched alignment \(S2\) reduces performance on both benchmarks\. Adding general reasoning data \(S3\) partially recovers these abilities\.
Table 5:General\-ability evaluation across training stages\. Higher scores are better\.
## Appendix DBroader Impacts, Limitations, and Future Work
### D\.1Broader Impacts
CARing turns longitudinal diagnosis histories into ranked candidate diagnoses\. In clinical review, these candidates and the thinking mode’s readable traces could help physicians revisit earlier visits and consider conditions that merit further assessment\. Clinical decisions would still rest on examination, testing, and professional judgment\. Prospective studies could examine how this assistance changes case review and diagnostic decisions\.
The compositional medical tokenizer also suggests a generative interface for large medical vocabularies\. Because SID construction uses concept descriptions and ontology paths, the pipeline could be adapted to other coding systems\. Adding medication, procedure, and laboratory events to the history could allow diagnosis prediction to use a fuller record\. The same representation and training strategy could then be studied for other EHR prediction tasks\.
### D\.2Limitations
The thinking mode suggests a mechanism for improved diagnosis coverage\. A reasoning chainτ\\taugenerated from the SID historyHHmay foreground a temporal pattern or comorbidity and alter the conditional ranking of a diagnosis SIDy=q\(d\)y=q\(d\)\. Becauseτ\\tauderives fromHH, it can organize evidence already in the history and guide the model toward complementary diagnoses\. The gains in Table[1](https://arxiv.org/html/2610.10641#S4.T1)are consistent with this account\.
The clinical meaning of a generated trace requires separate study\. Plausible chains of thought can omit factors that influence a prediction, and their faithfulness varies across models and tasks\([Turpin et al\., 2023](https://arxiv.org/html/2610.10641#bib.bib59);[Lanham et al\., 2023](https://arxiv.org/html/2610.10641#bib.bib60)\)\. The teacher receives a reference diagnosis when constructing training traces, while the student sees onlyHHat inference\. The clinical accuracy of both kinds of trace and any artifacts linked to target guidance merit closer study\.
### D\.3Future Work
To examine the role of the reasoning chain, a controlled analysis could hold the checkpointθ\\theta, SID historyHH, and answer format fixed and comparepθ\(y∣H,τ\)p\_\{\\theta\}\(y\\mid H,\\tau\)withpθ\(y∣H\)p\_\{\\theta\}\(y\\mid H\)for each valid SIDy=q\(d\)y=q\(d\), before rank fusion\. Changes in SID log scores and ranks would indicate whether a trace promotes correct diagnoses in the target setYYthat direct decoding ranks lower\. Across sampled chains, we could measure how many additional members ofYYenter the top\-kkcandidate lists\. Comparing direct and thinking inference with matched sample counts and computation would help quantify the contributions of trace conditioning, repeated sampling, and rank fusion\.
Clinicians could assess teacher and student traces for factual accuracy, relevance to the recorded history, and usefulness in reviewing candidate diagnoses\. Changes to selected evidence inHHorτ\\taucould test whether predictions respond to the clinical factors expressed in the trace\. We also plan to study SID vocabularies across coding systems and extend the patient history to medication, procedure, and laboratory events\. These extensions could support medication recommendation and broader EHR event recommendation\.相似文章
CARE: 用于医疗大型语言模型的因果对齐推理探索
CARE 引入了一个因果对齐推理探索框架,用于医疗大型语言模型,以增强训练稳定性并减少虚假相关性。
RareDxR1:超越人类标注的罕见病诊断自主医疗推理
介绍RareDxR1,一种端到端的以推理为中心的大语言模型,用于从非结构化临床笔记中进行开放域罕见病诊断,采用渐进式训练框架和反思增强推理采样,实现了最先进的准确率。
一种专门用于加速罕见病诊断的推理型大型语言模型:一项随机AI医生辅助试验
本文介绍了RaDaR,一个320亿参数的开源推理型大语言模型,基于公开和合成的罕见病病例进行训练。在诊断基准测试中,其表现优于DeepSeek-R1等更大模型,并在随机试验中将医生诊断准确率提升了21.44个百分点。
ChatHealthAI: 将电子健康记录表示与大型语言模型对齐以实现基于临床的推理
ChatHealthAI 是一个多模态推理框架,它将结构化 EHR 表示与冻结的 LLM 对齐,从而在保持预测性能的同时实现基于临床的推理。
多轮多模态诊断推理在具有挑战性的真实临床案例上的评估
本文提出了一种利用具有挑战性的真实临床案例对多轮多模态诊断推理进行评估的方法,旨在衡量AI模型处理复杂医疗场景的能力。