TL;DR
MemDoctor is a novel framework that enables Multimodal Large Language Model (MLLM) agents to diagnose and repair their own memory failures. By decomposing the memory pipeline into four distinct stages—Write, Update, Retrieve, and Answer—it traces errors back to their origin and applies targeted repairs, allowing a 4B-parameter model to outperform much larger 8B-parameter baselines.
What Problem Does This Paper Address?
As MLLM agents move beyond single-turn interactions, they rely on external "memories" to store information from past sessions. However, when an agent gives a wrong answer, it’s often unclear why. Did it fail to reason correctly (Answer stage)? Did it fail to find the right information (Retrieve stage)? Or was the information stored incorrectly to begin with (Write or Update stages)?
The authors point out a critical "grounding trap": a wrong answer can appear perfectly valid because it is correctly grounded in a faulty memory record. As shown in Figure 1, an error introduced during the initial writing of a memory can propagate downstream, leading to confidently incorrect answers that are difficult to debug just by looking at the final output.
Methods
The researchers formalize multimodal memory into a four-stage pipeline:
- WRITE: Extracting evidence from a conversation turn into a record.
- UPDATE: Maintaining and merging records across multiple interactions.
- RETRIEVE: Selecting the most relevant records for a specific question.
- ANSWER: Using the retrieved evidence to generate a response.
They identify nine specific error types across these stages, such as "visual loss" (missing details from an image during writing) or "retrieval distraction" (irrelevant records derailing the answer).
MemDoctor itself is a self-diagnosis and repair loop. When the system generates an answer, it doesn't just stop there. Instead, it works backward through the stages:
- Answer Check: Does the cited evidence actually support the answer?
- Retrieve Check: If not, does the needed fact exist elsewhere in the memory pool?
- Update Check: If not, was it present in an earlier version of a record before a merge?
- Write Check: If all else fails, the error is attributed to the initial writing stage.
Once an error is localized, MemDoctor applies a specific repair operator, such as rewriting a record from its original source turns, and then re-answers the question. Crucially, every diagnosis must be grounded in the actual memory state (records, version history, or original images) to prevent the model from "hallucinating" a fix.
Datasets
The authors evaluated MemDoctor on two primary benchmarks:
- Mem-Gallery: A benchmark for multimodal multi-session conversations involving complex reasoning over images and text.
- MemLens: A 32K-length agent-based memory benchmark focused on long-term information extraction and knowledge updates.
Key Insights and Ideas
- The "Silent" Majority of Errors: A stage-resolved analysis revealed that 62% of failures originate before the answer stage, yet they all surface as incorrect answers. Retrieval is the biggest culprit among memory stages (34% of failures), followed by writing (18%) and updating (10%).
- Error Persistence: Injected errors (like mislabeling a flower) are incredibly "sticky." In their analysis, 97% of wrong answers caused by a distorted memory record actually quoted that tainted record as evidence.
- Self-Diagnosis is Viable: Surprisingly, the same model that made the mistake can often find it if forced to trace facts backward through its own memory logs. This "reflection" doesn't require external feedback or "gold" answers to be effective.
- Different Origins, Different Fixes: Simply asking a model to "think again" is insufficient if the underlying data is corrupted. By identifying the specific faulty stage, MemDoctor can perform targeted surgery on the memory itself.
Key Results
MemDoctor demonstrated significant performance gains across the board:
- Outperforming Larger Models: On Mem-Gallery, a 4B-parameter Qwen3-VL model equipped with MemDoctor achieved 75.63% accuracy, surpassing all evaluated 8B-parameter baselines, including MuRAG (75.16%) and V-Mem (66.22%).
- Task-Specific Gains: The framework was particularly effective at conflict detection, where it improved accuracy by a staggering 27.2 points over the baseline without repair.
- Plug-and-Play Utility: When attached as a "repair layer" to existing memory systems like MuRAG and A-Mem, MemDoctor improved their performance on MemLens by 7.69 and 4.10 percentage points, respectively.
Limitations and Future Work
The authors acknowledge several limitations:
- Computational Cost: The self-diagnosis loop requires multiple additional model calls per question, which increases latency and inference costs.
- Consistent Errors: If every version of a record contains the same error and there is no visual evidence to contradict it, MemDoctor struggles to diagnose the failure without an external signal.
- Single Error Assumption: The propagation analysis focused on planting one error at a time; real-world scenarios often involve multiple interacting errors.
Future work could involve optimizing the efficiency of the diagnosis loop and exploring how to handle errors that are consistent across all memory versions.
Summary updated