Global and local memory improve clinical reasoning on electronic health records

GLoC-EHR: Evidence-Cited Clinical Reasoning over Global Context and Local EHR Events

Machine Learning

Summary

Understanding medical records to answer clinical questions requires looking at both the overall patient history and specific important events. The authors created GLoC-EHR, a model that remembers the big picture of a patient’s health journey and focuses on key events, helping it explain its answers clearly by citing evidence from the records. This method outperforms other large language models that try to read the records without this dual-memory approach. It also works well on different hospital datasets and can answer some new laboratory questions better than other models.

What this means in practice

  • For hospital data teams: Develop models that generate clinical summaries from EHRs with supporting evidence to improve trust and clinical decision assistance.
  • For healthcare ai developers: Build EHR question-answering systems that combine global patient history and local clinical events for more accurate and explainable answers.

Authors

Chaiho Shin, Kwangsoo Kim

Abstract

Structured electronic health records (EHRs) contain a patient's clinical trajectory as a sequence of clinical codes. Answering clinical questions from such records requires both the context of the whole trajectory and the specific events that support the answer. We introduce GLoC-EHR, a multimodal language model that reads a contextual encoding of the record through a fixed-size global memory of the trajectory and a local memory of selected events. The model learns to generate hospital-course summaries from the global memory and descriptions of masked concepts from the local memory, aligning both with clinical text. It is then trained to cite evidence before answering, through rationale fine-tuning followed by group relative policy optimization (GRPO) with rewards for correct answers and record-supported evidence. On three MIMIC-IV outcome tasks, GLoC-EHR attains the highest macro AUROC among the compared models when it answers directly, whereas zero-shot LLMs reading the serialized record fall far behind. With evidence-cited reasoning, it stays close to its direct multi-task counterpart in macro AUROC, and the evidence terms of the objective reduce unsupported evidence at a similar macro AUROC. The local memory adds distinct supported findings, particularly under strict matching, without a detectable change in macro AUROC. Without retraining, GLoC-EHR transfers to EHRSHOT on par with EHR-BERT and answers two unseen laboratory questions better than zero-shot prompting of its own backbone.