TL;DR
When doctors predict what might happen at a patient's next hospital visit, they don't mentally score tens of thousands of random medical codes—they narrow their focus to a small, clinically sensible shortlist of possibilities. Risk Horizons teaches AI to do the same by mapping medical hierarchies and historical patient trajectories into curved (hyperbolic) geometric space, using "risk cones" to retrieve a tight, plausible set of future events. By turning prediction into ranking within a structured shortlist—optionally polished by an LLM—it beats standard sequence models and prevents clinically bizarre hallucinations.
What Problem Does This Paper Address?
Electronic Health Records (EHRs) track a patient’s medical journey across hospital visits. A core task in clinical AI is next-visit prediction: given a patient's history, what diagnoses, procedures, and medications will show up next?
Standard deep learning approaches treat medical histories like sentences—sequences of tokens fed into RNNs, Transformers, or Large Language Models (LLMs)—to score the entire medical vocabulary at once. Here is the catch: clinical data is sparse, messy, and fragmented across isolated coding systems (like ICD for diagnoses and ATC for drugs). While these coding trees tell you how specific diseases group under broader categories, they don't explicitly tell you which diagnosis triggers which medication over time. Asking an unconstrained neural network or LLM to guess from 60,000+ codes often leads to diffuse, noisy, or clinically nonsensical predictions—especially for rare transitions.
Methods
Instead of scoring every medical code in existence, the authors reframe prediction as a two-stage process: build a patient-specific hypothesis space (the "Risk Horizon"), then rank within it.
- Unified Clinical Graph: They start with standard, deterministic medical coding trees (connecting broad parent concepts to specific child codes) and "stitch" them together across modalities and time. Using lagged Pointwise Mutual Information (PMI) filtered via bootstrap resampling, they add directed edges when event $A$ reliably precedes or co-occurs with event $B$ across visits (e.g., a diagnosis leading to a procedure).
- Hyperbolic Embeddings & Central Events: Tree-like hierarchies expand exponentially, making flat Euclidean space a cramped fit. Instead, the authors embed the clinical graph into a Poincaré ball (hyperbolic space), where volume grows exponentially from the center outward—naturally fitting broad concepts near the origin and specialized codes near the boundary. Because a single hospital visit contains dozens of noisy codes across diagnoses, procedures, and drugs, the model summarizes each visit into Multi-head Central Events: learned hyperbolic averages (barycenters) trained via self-supervised masked-code reconstruction to capture distinct, denoised clinical factors.
- Directional Risk Cones: At inference time, standard nearest-neighbor search isn't enough—you don't just want similar codes, you want downstream progression. Starting from the patient's latest Central Events, the model traverses local graph neighborhoods and projects geometric risk cones pointing outward from the modality roots, capturing specialization and forward temporal progression to form a compact shortlist of top-$K$ candidates per modality.
- Constrained LLM Reranking: Finally, candidates are ranked by their geometric score. Optionally, an inference-time LLM (like Llama-3.3-70B) reranks this shortlist. Crucially, the LLM is strictly forbidden from inventing new codes outside the Risk Horizon.
Datasets
The authors evaluate multi-modal next-visit prediction (diagnoses, procedures, and medications) on two established, publicly available clinical datasets using strict patient-level splits:
- MIMIC-IV: Filtered to patients with at least two visits, yielding 34,775 patients, 97,943 visits, and a unified clinical graph of 62,574 nodes and 713,717 edges.
- eICU: An independent multi-center critical care dataset used for cross-institution validation across different coding distributions.
No new benchmarks are introduced.
Key Insights and Ideas
- Geometry beats brute-force sequence modeling: Swapping hyperbolic space for flat Euclidean space (while keeping the exact same graph and retrieval pipeline) drops overall Recall@10 from
0.357to0.270. Furthermore, simple nearest-neighbor lookup in hyperbolic space (0.218R@10) falls flat compared to structured risk-cone retrieval. You need both curved space and directional cones. - Stitching hierarchies with data is essential: In ablation studies, removing the data-driven lagged PMI edges causes performance to completely collapse (Recall@10 plunges from
0.357to0.005). Static medical ontologies alone cannot predict longitudinal progression without inferred cross-modal bridges. - LLMs shine on a short leash: Rather than letting LLMs generate medical codes freely—where they risk hallucinating—using them strictly as inference-time rerankers over a geometrically grounded candidate set yields substantial accuracy jumps while keeping outputs clinically coherent.
Key Results
Main quantitative results comparing Risk Horizons against sequential, Euclidean, and hyperbolic baselines on MIMIC-IV.
- Competitive without sequences or LLMs: On MIMIC-IV, geometry-only Risk Horizons achieves
0.357Recall@10 and0.447nDCG@10—nearly matching heavy-hitting sequential models like RETAIN (0.363R@10) and Transformers (0.362R@10), and outperforming Med-BERT (0.311) and HALO (0.289), without using a sequence prediction network at all. - State-of-the-art with constrained reranking: Adding Llama-3.3-70B-Instruct as a reranker boosts MIMIC-IV performance to
0.425Recall@10 and0.516nDCG@10 (with Meditron-70B hitting0.389R@10 on procedures). On eICU, Risk Horizons + Llama-3.3-70B also takes the top spot (0.401R@10 vs. RETAIN's0.381). - Stronger Candidate Spaces: Compared to global hyperbolic nearest-neighbor search, Risk Horizons lifts procedure Candidate Recall from
0.391to0.578and shrinks ontological hierarchy error distance from1.910to1.508.
Limitations and Future Work
- Blind spots for sudden external shocks: Qualitative analysis shows Risk Horizons excels when disease follows a structured clinical trajectory (e.g., ongoing chemotherapy and heart care), but struggles when a patient's next visit is driven by an unpredictable external event—like a facial fracture from a fall at home. Even then, its errors remain clinically sensible (predicting ongoing kidney/heart issues rather than random noise).
- Incomplete coverage and ranking gaps: Candidate coverage for diagnoses remains tighter (
0.413Candidate Recall) than for procedures (0.578) or medications (0.994). Additionally, a noticeable gap remains between "Oracle@10" (perfect ranking of retrieved candidates) and actual Recall@10, pointing to clear headroom for better reranking algorithms. Also, hyperbolic distance itself is symmetric, meaning asymmetry currently relies on graph edges and retrieval cones rather than the base distance metric.
Summary updated