Predicting future clinical events from longitudinal electronic health records (EHRs) is challenging due to sparse multi-type clinical events, hierarchical medical vocabularies, and the tendency of large language models (LLMs) to hallucinate when reasoning over long structured histories. We study next-visit event prediction, which aims to forecast a patient's upcoming clinical events based on prior visits. We propose GRAIL, a framework that models longitudinal EHRs using structured geometric representations and structure-aware retrieval. GRAIL constructs a unified clinical graph by combining deterministic coding-system hierarchies with data-driven temporal associations across event types, embeds this graph in hyperbolic space, and summarizes each visit as a probabilistic Central Event that denoises sparse observations. At inference time, GRAIL retrieves a structured set of clinically plausible future events aligned with hierarchical and temporal progression, and optionally refines their ranking using an LLM as a constrained inference-time reranker. Experiments on MIMIC-IV show that GRAIL consistently improves multi-type next-visit prediction and yields more hierarchy-consistent forecasts.
翻译:从纵向电子健康记录(EHR)预测未来临床事件具有挑战性,原因在于稀疏的多类型临床事件、层次化的医学词汇表,以及大型语言模型(LLMs)在基于长结构化病史进行推理时容易产生幻觉。我们研究下次就诊事件预测,其目标是根据患者既往就诊记录预测其即将发生的临床事件。我们提出GRAIL框架,该框架利用结构化几何表示和结构感知检索对纵向EHR进行建模。GRAIL通过将确定性的编码系统层次结构与跨事件类型的数据驱动时序关联相结合,构建统一的临床图,将该图嵌入双曲空间,并将每次就诊总结为一个概率性的中心事件以对稀疏观测进行去噪。在推理阶段,GRAIL检索一组结构化的、临床合理的未来事件,这些事件与层次化和时序进展保持一致,并可选择性地使用LLM作为约束性推理时重排序器来优化其排序。在MIMIC-IV数据集上的实验表明,GRAIL持续改进了多类型下次就诊预测,并产生了更具层次一致性的预测结果。