arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2605.03354cs.AI
收藏

代理记忆内部发生了什么?从涌现到诊断的电路分析

What Happens Inside Agent Memory? Circuit Analysis from Emergence to Diagnosis

City University of Hong Kong(香港城市大学);University of Toronto(多伦多大学)

Xutao Mao, Jinman Zhao, Gerald Penn, Cong Wang

AI总结:

研究揭示了代理记忆中控制与内容电路的因果关系及共享枢纽的机制,开发出76.2%准确率的无监督诊断工具,优于监督基线13分。

摘要:

代理记忆故障是无声的:即使LLM代理无法跨会话提取、保留或检索所需信息,它仍能产生流畅响应。写-管理-读循环描述了这些系统的外部管道,但未明确各阶段的内部计算机制。通过追踪Qwen-3系列(0.6B-14B)和两个内存框架(mem0和A-MEM)中的特征电路,我们报告了两个机制发现和一个交付成果。首先,控制在内容之前可检测:路由电路在0.6B时因果活跃,而内容电路直到4B才产生可检测信号,暴露了小模型在可靠提取或 grounding 事实前路由记忆决策的部署领域。其次,共享枢纽被招募而非创建:写入和读取在后期层枢纽上汇聚,该枢纽已在基模型中作为上下文 grounding 的基质存在,内存框架在该基质上招募特定功能方向而非自建。这两个发现跨mem0和A-MEM转移,表明底层计算是基模型属性而非特定接口属性。基于此电路结构,我们开发出无监督的阶段级诊断工具,将无声故障定位到负责操作的准确率达76.2%,优于最强监督基线13分。这些结果表明电路级签名是代理记忆监控和结构化设计的实用处理方式。

英文摘要:

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. We trace feature circuits across the Qwen-3 family (0.6B--14B), two memory frameworks (mem0, A-MEM), and a matched Gemma-3 replication, reporting two mechanistic findings plus one deliverable. First, under mem0, control is detectable before content. Routing circuitry is causally active at 0.6B, while content circuitry produces no detectable signal until 4B. Gemma-3 reproduces the same order at 1B and 4B. Small models therefore 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, on which memory framing recruits a memory-specific functional direction. The hub and the early routing circuit carry over to A-MEM, indicating that these computations belong to the base model rather than to a particular interface. Building on this circuit structure, we develop an unsupervised stage-level diagnostic that localizes silent failures to the responsible operation at 76.2% accuracy. It outperforms a strong LLM trace judge by 3.1 points as well as a supervised hidden-state probe by 8.8 points. Together, these results establish circuit-level signatures as a practical handle for monitoring agent memory and guiding its structural design.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑