用代码片段锚定验证记忆,让编程代理更准确判断旧结论是否仍有效。
EA-Graph: Artifact-Anchored Verification Memory for Coding Agents under Upstream Drift
- 将验证结论与具体代码片段绑定,避免凭空猜测
- 在上游变更后,能区分结论是否仍成立、受影响或无法证明
- 适合需要长期维护和可靠推理的自动化编程场景
编程代理在跨会话任务中面临一个问题:仅靠文字记录无法保留支持结论的程序状态。上游变更后,代码库可能仍可编译,但之前的验证结论已失效。EA-Graph 是一种以代码构件为锚点的验证记忆机制,它以子路径粒度表示构件,解析别名至叶定义,将每条验证声明锚定在实际使用的具体内容上,并将证据强度与新鲜度分离。当替代内容缺失时,声明变为不可证明而非被猜测。实验在 42 个会话、7 个干净世界、14 个模型-世界实例、3 种记忆条件和 2 种模型层级下进行。在 Haiku 轮次中,构件锚定记忆在所有 7 个世界均优于自然语言笔记和无持久记忆(每组配对威尔科克森检验 p = 0.0156)。Sonnet 轮次中锚定条件表现完美,但受控天花板影响,预注册对比未达显著性。无会话虚构被隐藏内容。结果支持一个有限结论:在该测试环境中,构件锚定记忆提升了小模型的可证明性判断能力。探索性分析表明,结构化声明记忆可能通过外化会话内重推导缩小能力差距,但未建立跨模型等效性。研究不涉及效率或修复质量。
原文摘要 · Abstract (English)
Coding agents increasingly work across sessions, but prose notes can preserve a conclusion without the program state that supported it. After an upstream change, a repository may still build even though earlier verification claims are no longer valid. EA-Graph is an artifact-anchored memory for verification claims. It represents artifacts at sub-path granularity, resolves aliases to leaf definitions, anchors each claim to the content used to establish it, and keeps evidence strength separate from freshness. When replacement content is unavailable, the claim becomes unprovable rather than guessed. EA-Graph is evaluated on generated repositories whose behavior-to-artifact ground truth is known by construction. The task is to classify prior claims as unaffected, affected, or unprovable after value drift, logic drift, and deliberately withheld upstream content. The analysis covers 42 sessions across seven clean worlds, 14 model-world instances, three memory conditions, and two model tiers. In the Haiku round, artifact-anchored memory outscored prose notes and no persistent memory in all seven worlds; each exact paired Wilcoxon comparison yielded p = 0.0156. In the Sonnet round, the anchored condition was perfect, but frequent control ceilings left the preregistered contrasts non-significant. No session fabricated withheld content. These results support a bounded claim: artifact-anchored memory improved the smaller model's provability judgments in this testbed. An exploratory comparison further suggests that structured claim memory may narrow a capability gap by externalizing in-session re-derivation, but it does not establish cross- model equivalence. The study makes no claim about efficiency or repair quality.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。