CARing EHR: Code and Experiment Logs of "Coverage-Aware Reasoning with Medical Tokens for Diagnosis Prediction".
This repository contains the code and logs accompanying the CARing EHR experiments.
Codes/contains SID construction, training, and evaluation code, including the modified verl components used in the experiments. SeeCodes/README.mdfor the required inputs and run instructions.Our-Logs/contains training and evaluation logs.
CARing predicts the unordered set of diagnoses at a patient's next visit from longitudinal electronic health records (EHRs). The framework combines compositional medical tokens with reasoning that covers multiple correct diagnoses.
- Medical Semantic IDs (SIDs): Disease names and ICD ontology paths are encoded into compact, compositional tokens using residual quantization.
- Clinical grounding and reasoning: Six alignment tasks connect SIDs with diagnosis names and patient histories. Teacher-generated clinical narratives and reasoning activation train the model to reason before predicting a SID.
- Diagnosis coverage: Visit-level reinforcement learning rewards distinct correct diagnoses across sampled reasoning paths, while multi-positive supervision also trains on correct diagnoses absent from those samples.
- Two inference modes: Direct prediction ranks valid SIDs with constrained decoding; reasoning mode combines predictions from multiple reasoning chains using reciprocal rank fusion.
- Results: On MIMIC-III and MIMIC-IV, CARing achieves the highest reported top-k recall at every evaluated cutoff; reasoning-mode R@30 reaches 46.04% and 46.52%, respectively.

