ReLMem: Learning Recurrent Memory for Longitudinal EHR Modeling
Zijie Meng, Xiwei Dai, Yingying Zhang, Jian Wu, Xian Wu, Zuozhu Liu
Abstract
Longitudinal electronic health record (EHR) modeling requires integrating new visits with an expanding patient history. Yet the continual accumulation of clinical information imposes increasing computational and memory costs on large language models (LLMs) when they process and retain complete patient histories. A practical alternative is visit-wise recurrent compression, which incorporates each incoming visit into a compact, continually updated patient memory. However, under a fixed memory budget, successive updates must integrate new information without progressively losing critical historical evidence needed to subsequent tasks. To address this challenge, we introduce Recurrent Longitudinal Memory (ReLMem), a framework that learns to maintain fixed-capacity patient memory for efficient downstream prediction with a frozen LLM. ReLMem equips this LLM with lightweight compression adapters to recurrently update the memory from its previous state and each incoming visit, without rereading earlier records. Specifically, we develop a multi-granularity optimization strategy to preserve task-relevant information throughout recurrent updates and support downstream prediction from the final memory. The intermediate supervision aligns attention outputs from compressed memory and the full history under identical queries, while prediction supervision minimizes cross-entropy with ground truth answers conditioned on the final memory. On EHR-based medication prediction, ReLMem approaches the F1 scores of full-history baseline while reducing average retained historical storage by 97.1%. Under the same memory budget, it improves macro- and micro-F1 over the strongest compressed-memory baseline by 4.66 and 4.75 percentage points, respectively. These results highlight the value of learning recurrent patient memory for efficient longitudinal EHR modeling.
Create a lesson
Metadata
- Categories
- cs.LG, cs.AI
Related papers
LinearSpec: Drafting from the Target's Memory for Long-Context Speculative Decoding in Hybrid Vision-Language Models
Shared title terminologycs.LGHaiyu Wang, Sai Qian Zhang, Steven Li
MLP Cache: A Post-Hoc Memory-Compute Trade-off for Transformer Inference
Shared title terminologycs.LGHuzheng Yang, Yiqiao Huang, Qingqiao Hu et al.
Learning interpretable Schur forms of recurrent weight matrices
Shared title terminologycs.LGAlexander Lanine, Liana Akobian, N Alex Cayco-Gajic
KuaFu-Credit: Reward-Penalty Decoupling and Turn-Level Differencing for Credit Assignment in Long-Horizon RL with Lifelong User Memory
Shared title terminologycs.LGLin Zhu, Jiahao Hui, Junxiu Chen et al.
Low-Discrepancy Dither for Quantized Recurrent State Caches
Shared title terminologycs.LGSnigdha Chandan Khilar
Shared Phase and Retention Control for Efficient Adaptive Spectral Recurrence
Shared title terminologycs.LGWentao Wang, Hengyu Zhong, Yunhan Jiang et al.