STAM: State-Transition-Aware Memory for Longitudinal Clinical Agents
Abstract
Large language model (LLM) agents that reason over clinical records must track changes in a patient’s state while preserving the history needed to understand them. Simply accumulating memories leaves unclear which information still applies, whereas overwriting earlier memories can erase evidence needed to reconstruct treatment history and clinical trajectories. We introduce STAM, a state-transition-aware memory framework that records state changes as new clinical entries arrive. STAM combines semantic retrieval with typed clinical relations to identify affected memories, maintaining current information in Active and superseded or resolved information in History. At read time, a query-dependent gate selectively serves historical memory. Across four longitudinal clinical benchmarks, we evaluate STAM with downstream question answering, direct state-maintenance diagnostics, and comparisons at matched evidence lengths. On MedMemoryBench, the full write-time pipeline increases supersession-pair recall from 28.6 to 53.9 and reduces false archival relative to deterministic state-maintenance rules. At matched evidence lengths, STAM also shows six significant improvements and no significant decreases across paired comparisons with memory and retrieval baselines. These findings support evaluating longitudinal memory systems for how they manage state as well as how they retrieve information.
est. 32% chance this paper gets accepted at ICLR 2027.
What do you think this paper will get?
All positions stay anonymous.