揭示智能体记忆失效的内在机制,找到诊断方法。
What Happens Inside Agent Memory? Circuit Analysis from Emergence to Diagnosis

- 发现控制电路比内容电路早出现,小模型已能决策但无法可靠提取事实。
- 写入与读取共享基础模型中的同一枢纽,而非新建独立结构。
- 提出无监督诊断方法,定位沉默失败准确率达76.2%,优于有监督基线13个百分点。
智能体记忆故障是无声的:基于LLM的智能体可在未正确提取、保留或检索跨会话信息时仍生成流畅回复。写-管理-读流程描述了外部管道,但未揭示各阶段的内部计算机制。通过对Qwen-3系列(0.6B–14B)和两种记忆框架(mem0与A-MEM)的特征电路追踪,我们报告两项机制发现与一项可交付成果。第一,控制信号在0.6B即被检测到,而内容信号直到4B才显现,表明小模型在能提取事实前已具备记忆路由能力,存在部署风险。第二,写入与读取共同调用基础模型中已存在的晚期层枢纽,该枢纽原为上下文对齐基础结构,记忆框架仅在其上引入特定功能方向,而非重建新结构。上述发现均在mem0与A-MEM间转移,说明其为基模型固有属性,非接口特有。基于此电路结构,我们开发出无监督阶段级诊断方法,将沉默故障定位至具体操作的准确率达76.2%,优于最强有监督基线13个百分点。整体结果表明,电路级特征可作为监控与结构化设计智能体记忆的实际抓手。
原文摘要 · Abstract (English)
Agent memory failures are silent: an LLM-based agent can produce a fluent response even when it fails to extract, retain, or retrieve the information needed across sessions. The write-manage-read loop describes the external pipeline of these systems but leaves open which internal computations implement each stage. Tracing feature circuits across the Qwen-3 family (0.6B--14B) and two memory frameworks (mem0 and A-MEM), we report two mechanistic findings and one deliverable. First, control is detectable before content: routing circuitry is causally active at 0.6B, while content circuitry produces no detectable signal until 4B, exposing a deployment regime where small models route memory decisions before they can reliably extract or ground the underlying facts. Second, the shared hub is recruited, not created: Write and Read converge on a late-layer hub that already exists in the base model as a context-grounding substrate, and memory framing recruits a memory-specific functional direction on this substrate rather than building one of its own. Both findings transfer across mem0 and A-MEM, indicating that the underlying computations are properties of the base model rather than of any particular interface. Building on this circuit structure, we develop an unsupervised stage-level diagnostic that localizes silent failures to the responsible operation up to 76.2% accuracy, outperforming the strongest supervised baseline by 13 points. Together, these results point to circuit-level signatures as a practical handle for monitoring and structurally-guided design of agent memory.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。