EA-Graph: Artifact-Anchored Verification Memory for Coding Agents under Upstream Drift
This paper introduces EA-Graph, an artifact-anchored verification memory system that significantly improves a coding agent's ability to accurately classify the validity of past claims after upstream changes by grounding them in specific code artifacts rather than prose notes, thereby reducing hallucination and enhancing provability judgments.
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 a detective trying to solve a mystery that spans several days. You have a notebook where you write down clues, like "The butler was in the library at 8 PM." But here's the catch: your notebook only records where you looked, not the actual evidence you found. If the library gets renovated overnight and the bookshelves move, your old note might still say "library," but the clue is now useless because the room has changed. This is the daily struggle of "coding agents"—smart computer programs that write and fix software. These agents often work in shifts, passing the baton from one session to the next. They rely on notes to remember what they checked, but if the software they are working on changes behind the scenes (a "drift"), those notes can become dangerous lies. They might tell the agent, "This part is safe!" when it's actually broken, or worse, they might force the agent to guess when it should just admit, "I don't know anymore."
This paper tackles that exact problem. It asks: How can we give these AI agents a memory that doesn't just say "I checked this," but actually remembers exactly what they checked against? The authors built a new kind of memory system called EA-Graph. Instead of treating a whole file as a single block of truth, EA-Graph zooms in to remember specific little pieces of data, like a single number in a list or a specific setting. It also has a special "refusal" button: if the evidence it relied on has vanished or changed, the system doesn't guess; it flags the claim as "unprovable." The researchers tested this in a controlled, made-up world of software to see if it helps AI agents spot when their old work is no longer valid. They found that for smaller, faster AI models, this new memory system was a game-changer, helping them avoid mistakes that they usually make. However, for the super-smart, larger models, the new system didn't show a huge statistical advantage because those models were already doing a great job on their own. The study suggests that this structured memory might help smaller brains do big-brain tasks by offloading the heavy lifting of re-checking facts, but it doesn't prove that memory can fully replace raw intelligence.
The Problem: The "Silent" Lie
Imagine you are baking a cake based on a recipe. You write a note: "I checked the sugar; it's 2 cups." Later, someone sneaks into the kitchen and changes the sugar to 3 cups, but they don't touch the bag or the box. Your note still says "2 cups," and the bag looks the same. If you follow your note, you'll ruin the cake.
In the world of software, this happens all the time. A coding agent might verify that a program works correctly, write a note saying "Verified," and move on. Then, the "upstream" (the source code or data the program depends on) changes slightly. Maybe a number in a database shifts from 10 to 11. The file names haven't changed, the imports still work, and the program still compiles. But the logic is now broken.
The problem is that traditional notes are too vague. They say, "I checked the file rates.py." But rates.py might hold 50 different numbers. If the agent only remembers the file name, it can't tell if the specific number it relied on has changed. This leads to "silent errors"—bugs that don't crash the program but make it give wrong answers. The paper calls this the difference between file granularity (looking at the whole file) and artifact granularity (looking at the specific piece of data). The researchers found that if you only look at files, you might think 88 out of 96 behaviors are broken when really only 17 are. That's a lot of false alarms!
The Solution: EA-Graph (The "Anchor" System)
To fix this, the authors created EA-Graph. Think of it as a super-precise anchor system. Instead of tying a claim to a whole file, EA-Graph ties it to the exact, tiny piece of data used.
Here is how it works, using a playful analogy:
Imagine you are a security guard checking a list of VIPs.
- Old Way (Prose Notes): You write, "I checked the VIP list in the lobby." If someone swaps a name on the list, your note is useless because you didn't record which name you saw.
- EA-Graph Way: You write, "I checked the VIP named 'Alice' who has ID #123 and a photo of a cat."
- Sub-path Identity: If the lobby moves, or the list gets a new page, your note is still valid because it's anchored to "Alice" and "ID #123," not the lobby.
- Alias Resolution: Sometimes names are tricky. "Alice" might be listed as "The Cat Lady" in one place and "VIP-001" in another. EA-Graph is smart enough to follow the trail and realize they are all the same person.
- The "Unprovable" Button: This is the most important part. If the "Alice" entry is deleted from the new list, and you can't find the new version, EA-Graph doesn't guess "Maybe it's still Alice?" or "Maybe it's Bob?" Instead, it says, "Unprovable." It admits, "I cannot verify this anymore because the evidence is gone." This prevents the agent from making up facts or guessing dangerously.
The Experiment: A Made-Up World
You can't test this easily on real software because real software is messy, and you might accidentally leak the answers to the AI. So, the researchers built a simulated world.
- They created 7 different "worlds," each with 12 modules and 96 specific behaviors (like "calculate the price for a VIP").
- They gave the AI a "reference" (the truth) and a "port" (the code the AI maintains).
- They verified the code in a first round (D1).
- Then, they dropped in a second version (D2) with changes: some numbers changed, some logic was swapped, and some data was withheld (hidden).
- The AI had to look at the new version and decide for each of the 96 behaviors: Is it Unaffected (still good), Affected (broken), or Unprovable (I can't tell because data is missing)?
They tested three types of memory:
- ANCHOR: The new EA-Graph system.
- PROSE: Just a text note saying "I checked this."
- NONE: No memory at all; the AI had to figure it out from scratch.
They ran this with two different AI models: a smaller, faster one (Haiku) and a larger, smarter one (Sonnet).
The Results: Small Models Win Big
The results were fascinating, especially for the smaller AI model (Haiku).
- The Small Model (Haiku): When using the ANCHOR memory, it got the classification right almost every time (a perfect score of 1.000 in most worlds). Without it, using just notes or no memory, it struggled badly, scoring around 0.27 to 0.29. The difference was statistically significant (p = 0.0156). The structured memory helped the smaller model act like a much smarter detective.
- The Big Model (Sonnet): The larger model was already very good. It scored near-perfectly (1.000) even with just notes or no memory. Because it was already so good, the new memory system didn't show a huge statistical improvement. It was like giving a master chef a new knife; they were already chopping perfectly with the old one.
What This Means (and What It Doesn't)
The paper makes a very specific claim: Structured memory helps smaller models judge what is provable. It suggests that by giving the AI a way to "externalize" its checking process (storing the exact anchors), it can narrow the gap between a small, fast model and a big, slow one.
However, the authors are careful not to overhype it:
- It's not a magic fix for everything: The study only looked at judging whether something is broken, not actually fixing it. In fact, one session got the judgment perfect but then accidentally destroyed the code while trying to fix it.
- It's not a replacement for intelligence: The memory didn't make the small model "smarter" in a general sense; it just helped it avoid guessing when it didn't have enough info.
- It's a simulation: The world was made up. Real-world software might be messier, with harder-to-find data and more complex changes.
The study concludes that while this "artifact-anchored memory" is a powerful tool for helping AI agents stay honest about what they know (and what they don't), it is a specific solution for a specific problem: keeping track of tiny, changing pieces of data in a shifting software world. It suggests that if we want AI agents to work reliably over long periods, we need to stop giving them vague notes and start giving them precise anchors.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.