MedGraph improves long-term medical dialogue accuracy with graph memory

MedGraph: Maintaining Patient State with Graph Memory for Long-Term Medical Dialogue

Computation and LanguageArtificial Intelligence

Summary

Medical assistants that use large language models (LLMs) can struggle to remember updated patient information over multiple visits. The authors found that errors happen when the system uses outdated facts, confuses patients, or misses important safety details. They created MedGraph, a special memory system that organizes patient facts by date and person, linking related medical records to track changes over time. This approach helps the assistant provide more accurate, up-to-date answers about a patient's medical history.

What this means in practice

  • For medical software developers: Build virtual medical assistants that keep accurate, updated patient histories across multiple visits.$Commercial implications: Enables creation of more reliable AI-powered medical assistants for healthcare providers, improving patient care continuity.
  • For healthcare data teams: Improve integration and retrieval of patient longitudinal data by organizing and linking dated clinical facts.

Authors

Donghua Zhang, Zizheng Wang, Ze Dong, Yiding Feng, Siyu Qian

Abstract

LLM-based medical assistants that follow a patient across visits need a memory that keeps the patient's clinical state correct as it changes. We examine the errors of five memory systems on longitudinal medical dialogue and find three recurring causes: the retrieved evidence gives an outdated state, includes another person's health facts, or lacks a safety fact the answer depends on. We present MedGraph, a graph memory built for these three cases. Construction extracts dated facts from each session, attributes each fact to the person it describes, and links medication, diagnosis, and measurement records into chains that keep earlier states. Retrieval ranks the patient's chains as units, reads each chain at the time the question asks about, and adds the original dialogue text; a patient profile lists every recorded safety fact with every question. On MedMemoryBench, MedGraph has the highest overall accuracy with both a GPT and a Qwen backbone, 10.5 and 10.4 points above the strongest of five baselines, with efficient memory construction and answering in the GPT setting.