TL;DR
Even when an LLM agent’s persistent memory contains perfectly accurate information, the agent can still fail to use it correctly due to subtle changes in how a user asks a question or how the memory state evolves over time. The authors introduce U-FUZZ, a fuzzing framework that systematically mutates queries and memory states to uncover these "memory-use failures," consistently outperforming existing testing strategies across diverse memory architectures.
What Problem Does This Paper Address?
As LLM agents move from simple chat interfaces to complex, long-term assistants, they rely on persistent memory to store facts, user preferences, and past experiences. However, the reliability of these systems is often evaluated using static benchmarks or by checking if the stored content is "poisoned."
The authors argue that a "correct" memory can still lead to an incorrect result. They identify two main failure modes:
- Query-triggered failures: A slight change in phrasing (e.g., "What is his allergy?" vs. "Which medication is he allergic to?") might cause the retrieval system to miss the relevant record or rank an irrelevant one higher.
- Memory-state failures: As memory is updated or deleted, stale records might persist in the ranking, or new information might unexpectedly interfere with the retrieval of unrelated, older facts.
Existing diagnostic tools are often too static to find these edge cases. This paper treats memory-use testing as a fuzzing problem, where the goal is to dynamically explore the massive space of possible queries and memory states to find where the system breaks.
Methods
The authors developed U-FUZZ, a framework that treats both the query and the evolving memory state as primary inputs for testing. The process follows a classic fuzzing loop:
- Seed Initialization: U-FUZZ starts with "seeds" taken from real user-agent interaction checkpoints.
- Mutation: It applies two classes of mutations:
- Query Mutations: These include meaning-preserving (paraphrasing), target-changing (switching the subject of the query), and unsupported (asking for information known to be absent).
- Memory-state Mutations: These include updates (changing a value), deletions (removing a fact), and unrelated changes (adding noise to the memory to test for interference).
- Validation: Before execution, U-FUZZ uses a validation pipeline to ensure the mutation is logical (e.g., a paraphrase actually asks the same thing) without looking at the retrieval results.
- Execution & Feedback: The system executes the mutated test cases and uses feedback—specifically retrieval coverage (reaching new memory entries), novelty (finding new ranking patterns), and divergence (significant shifts in ranking)—to decide which mutants are worth exploring further in the next round.
Datasets
The researchers evaluated U-FUZZ using two major benchmarks designed for long-term memory:
- LoCoMo: A benchmark containing long interaction histories and memory-dependent queries.
- LongMemEval-S: A dataset focused on evaluating how agents handle memory updates, deletions, and complex reasoning over time.
They tested these against four different memory system architectures: Mem0, A-Mem, Graphiti, and MemOS.
Key Insights and Ideas
- Coverage is not enough: Simply ensuring that a test suite "touches" every item in memory doesn't guarantee reliability. U-FUZZ shows that failures often happen within already-covered memory regions when the query or state changes slightly.
- Mutations are complementary: Query mutations are "fast" and find surface-level retrieval issues, but they saturate quickly. Memory-state mutations are "slower" (requiring state reconstruction) but continue to uncover deep architectural failures that query changes alone cannot reach.
- Visibility helps but isn't required: While U-FUZZ performs best when it can see the internal "top-k" retrieved results, it remains highly effective in an output-only setting (like testing a closed-source API). In this mode, it uses "response novelty" as a feedback signal to guide the search.
- Architectural Sensitivity: Different memory backends are vulnerable to different things. For example, Graphiti (a graph-based memory) was more sensitive to memory-state mutations (updates/deletions) than Mem0.
Key Results
- Higher Failure Discovery: Under a fixed execution budget, U-FUZZ consistently found significantly more unique memory-use failures than baselines like random mutation, unguided LLM generation, or "LLM-as-Judge" approaches.
- Robustness across LLMs: In the output-only evaluation (Figure 5), U-FUZZ successfully identified failures in agents powered by both GPT-4o and Claude 3.5 Sonnet, proving the framework's utility for black-box testing.
- Efficiency: By using retrieval feedback (novelty and divergence), U-FUZZ avoids wasting budget on redundant test cases that don't explore new system behaviors.
Limitations and Future Work
- Non-Exhaustive Search: Like all fuzzing techniques, U-FUZZ cannot prove a system is 100% reliable; it can only find where it is currently broken.
- Diagnosis vs. Discovery: The framework is designed to find and localize failures (e.g., "this failure happened during retrieval"), but it does not automatically diagnose the root cause or suggest a fix.
- Future Directions: The authors suggest extending the framework to more complex memory architectures (like hierarchical stores) and developing more sophisticated mutation operators that can simulate multi-step memory corruption.
Summary updated