SodaMem: Evidence-Grounded Temporal Graph Memory for LLM Agents
SodaMem is an evidence-grounded temporal graph memory system for LLM agents that improves long-term conversation accuracy by tracking fact validity and provenance through time-aware graph edges, achieving state-of-the-art performance on LongMemEval-S at a low cost per query.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are talking to a very smart, very chatty robot friend who has been hanging out with you for weeks. You've shared thousands of messages, from your favorite spicy food to the time you decided to quit eating it. Now, you ask, "What should I cook tonight?" A simple robot might just scan your chat history and find the first thing it sees: "I love spicy food!" It misses the fact that you changed your mind three days ago. This is the problem of Long-Horizon Memory in Artificial Intelligence. It's not just about finding a needle in a haystack; it's about knowing which needle is the current one, when it was picked up, and whether it's still sharp. Scientists are trying to build AI agents that don't just remember what was said, but maintain a living, breathing model of what is true right now, updating their knowledge as time passes and new information arrives.
Enter SodaMem, a new system designed to be the ultimate "memory manager" for these AI friends. Think of SodaMem not as a giant, messy notebook where every conversation is scribbled down in order, but as a high-tech, living time-traveling detective's board.
Most current AI memory systems are like flat diaries. If you write "I hate broccoli" on Monday and "I love broccoli" on Tuesday, a simple diary just has two lines. When you ask the AI later, it might get confused about which one is true, or it might grab the wrong one because it looks similar to your question. SodaMem fixes this by turning every fact into a FactEvent—a special, typed card that doesn't just say what happened, but when it was mentioned, when it actually happened, and how long it stays true.
Here is how the magic works:
The Detective's Board (The Graph)
Instead of a list, SodaMem builds a web of connections. Every time the AI learns something new, it creates a card. If you say, "I'm cutting down on spice," SodaMem draws a red line from that new card to your old "I love spicy food" card and labels it "SUPERSEDES" (meaning "this new one replaces the old one"). If you contradict yourself, it draws a "CONTRADICTS" line. This way, the AI doesn't just guess which fact is newer; it has a clear, visual map of the timeline. It knows exactly which fact is the "current" one and which ones are outdated history.
The Three-Legged Stool (The Retrieval)
When you ask a question, SodaMem doesn't just look for keywords. It uses a "multi-tunnel" search, like a detective using three different tools at once:
- The Graph Tunnel: It follows the red and blue lines on the detective board to find related facts and check if they are still valid.
- The Word Tunnel: It scans for exact words and phrases (like a classic search engine).
- The Vibe Tunnel: It looks for ideas that "feel" similar to your question, even if the words are different.
It then combines all these clues. If the Graph Tunnel says "this fact is outdated" but the Word Tunnel finds it, the system weighs the evidence. It prioritizes facts that are supported by multiple paths and are still "valid" according to the timeline.
The Planner and The Reader
Once the evidence is gathered, SodaMem uses a two-step team to answer you. First, a Planner (like a project manager) checks the evidence, decides if it needs to dig deeper, and gathers the best facts. Then, a Reader (like a journalist) writes the final answer. Crucially, the Reader must cite its sources. It can't just make things up; it has to point to the specific "FactEvent" cards that prove its answer is correct.
The Results
The researchers tested this system on a tough challenge called LongMemEval-S, which has 500 questions about long conversations. SodaMem got 92.8% of the answers right (464 out of 500). Even more impressively, it did this while spending very little money on computer power—about $0.00161 per question on average (with a median of $0.00111).
In the world of AI memory, many other systems that get high scores cost ten to forty times more to run because they use much more expensive "brain" models. SodaMem sits near the top of the accuracy chart while staying in the "budget-friendly" zone. It proves that you don't need to spend a fortune to get a smart, up-to-date memory; you just need a better way to organize the facts.
However, the authors are careful to note that this is a specific configuration tested on one dataset. While the results are promising, they suggest that the system still has room to grow, especially in handling tricky time-related questions where humans might misremember dates. But for now, SodaMem offers a clear, evidence-based way for AI agents to stop living in the past and start living in the present.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.