Risk Horizons: Structured Hypothesis Spaces for Longitudinal Clinical Prediction

Zhan Qu, Michael FärberNeurIPS 2026

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.

Figure 1: Overview of Risk Horizons. (A) Clinical structure is constructed by combining coding hi- erarchies with data-driven cross-modal associations. (B) Concepts are embedded in hyperbolic space, and visits are summarized as multi-head Central Events. (C) Structure-aware retrieval constructs a patient-specific Risk Horizon, a set of plausible future events. (D) Prediction ranks candidates within the Risk Horizon using geometric scores, optionally refined by an LLM.
  1. 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).
  2. 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.
  3. 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.
  4. 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.357 to 0.270. Furthermore, simple nearest-neighbor lookup in hyperbolic space (0.218 R@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.357 to 0.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.

Table 1: Multi-modal next-visit prediction on MIMIC-IV (mean ± std over 5 seeds).
  • Competitive without sequences or LLMs: On MIMIC-IV, geometry-only Risk Horizons achieves 0.357 Recall@10 and 0.447 nDCG@10—nearly matching heavy-hitting sequential models like RETAIN (0.363 R@10) and Transformers (0.362 R@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.425 Recall@10 and 0.516 nDCG@10 (with Meditron-70B hitting 0.389 R@10 on procedures). On eICU, Risk Horizons + Llama-3.3-70B also takes the top spot (0.401 R@10 vs. RETAIN's 0.381).
  • Stronger Candidate Spaces: Compared to global hyperbolic nearest-neighbor search, Risk Horizons lifts procedure Candidate Recall from 0.391 to 0.578 and shrinks ontological hierarchy error distance from 1.910 to 1.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.413 Candidate 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

Abstract

Predicting future clinical events from longitudinal electronic health records (EHRs) requires selecting plausible outcomes from a large and structured event space under sparse observations. While clinical coding systems provide hierarchical organization of events, cross-modal and temporal relationships are not explicitly specified and must instead be inferred from data, making prediction difficult for weakly observed longitudinal transitions. We introduce Risk Horizons, a geometry-aware framework for constructing patient-specific candidate spaces for multi-modal next-visit prediction. Risk Horizons combines deterministic coding hierarchies with data-driven lagged cross-modal associations, embeds the resulting clinical graph in hyperbolic space, and retrieves candidate futures using directional risk cones. This reframes longitudinal prediction as ranking within a compact, clinically coherent hypothesis space rather than scoring an unconstrained vocabulary. Experiments on MIMIC-IV and eICU demonstrate competitive next-visit prediction performance, with consistently improved hierarchy consistency and candidate-space coverage across clinical modalities. Further analysis suggests that hyperbolic structured candidate retrieval is the primary driver of performance, while LLMs are effective as constrained inference-time rerankers operating over clinically grounded candidate sets.
BibTeX
@inproceedings{qu2026risk,
  author = {Zhan Qu and Michael Färber},
  title = {{Risk Horizons: Structured Hypothesis Spaces for Longitudinal Clinical Prediction}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=AQvN9jkmVc},
}
Figure