Clinical agents track patient changes with smart memory system
Personalized State-Transition-Aware Memory for Clinical Agents
Computation and LanguageArtificial Intelligence
Summary
Tracking a patient’s health changes is tricky because doctors need to remember both current and past information. The authors created a system called STAM that keeps track of what has changed in a patient’s state over time, instead of just piling up all information or deleting what’s old. STAM separates active details from older, resolved ones and chooses what to show depending on the question asked. They tested this approach on clinical tasks and found it helps answer questions better and maintain accurate patient status.
What this means in practice
- •For clinical ai developers: Integrate STAM to improve AI systems that answer questions from evolving patient medical records.
- •For healthcare it teams: Use STAM to better organize and retrieve patient history and current state across multiple clinical visits.
Authors
Maryam Haghifam, Zahra Rajabi, Yizhou Sun, Carlos Morato
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 it 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 approximately matched context lengths.