ShardMemo: Masked MoE Routing for Sharded Agentic LLM Memory

📄 arXiv: 2601.21545v1 📥 PDF

作者: Yang Zhao, Chengxiao Dai, Yue Xiu, Mengying Kou, Yuliang Zheng, Dusit Niyato

分类: cs.AI, cs.CL

发布日期: 2026-01-29


💡 一句话要点

提出ShardMemo以解决大规模语言模型的内存瓶颈问题

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大规模语言模型 内存管理 混合专家 多代理系统 长上下文处理

📋 核心要点

  1. 现有的内存管理方法在处理大规模并发访问时面临集中索引和启发式分区的瓶颈,限制了性能和扩展性。
  2. ShardMemo通过分层内存服务设计,采用掩蔽混合专家路由策略,优化了内存访问效率和准确性。
  3. 在LoCoMo数据集上,ShardMemo相较于最强基线GAM提升了5.11到6.82的F1分数,同时减少了检索工作和延迟。

📝 摘要(中文)

代理大型语言模型(LLM)系统依赖外部内存以支持长时间状态和并发多代理执行,但随着内存量和并行访问的增加,集中索引和启发式分区成为瓶颈。本文提出ShardMemo,一种预算分层内存服务,包含每个代理的工作状态、分片证据及版本化技能库。ShardMemo通过结构化的资格约束在路由或近似最近邻搜索前屏蔽不合格的分片,采用掩蔽混合专家路由,显著提升了性能。

🔬 方法详解

问题定义:本文旨在解决代理大型语言模型在内存管理中的瓶颈问题,尤其是集中索引和启发式分区在内存量和并行访问增加时的局限性。

核心思路:ShardMemo通过分层内存服务设计,分别为每个代理提供工作状态、分片证据和技能库,并在路由前通过资格约束屏蔽不合格的分片,从而提高内存访问的效率和准确性。

技术框架:ShardMemo的整体架构包括三个层次:Tier A为每个代理的工作状态,Tier B为分片证据及其局部近似最近邻索引,Tier C为版本化技能库。路由过程采用掩蔽混合专家策略,确保只对合格的分片进行访问。

关键创新:本文的主要创新在于引入了掩蔽混合专家路由机制,通过结构化的资格约束优化了分片访问,显著提升了性能,尤其是在长上下文处理上。

关键设计:在路由过程中,ShardMemo使用了成本感知的门控机制,基于配置文件、观察和会话的分片族进行动态选择,且路由器通过证据到分片的监督进行训练。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

在LoCoMo数据集上,ShardMemo相较于最强基线GAM提升了5.11到6.82的F1分数。在固定预算路由设置下,ShardMemo在减少检索工作(VecScan从521减少到414,降低20.5%)的同时,F1分数提升了6.87,且延迟从95毫秒降低至76毫秒。

🎯 应用场景

ShardMemo的设计可广泛应用于需要高效内存管理的多代理系统和长时间状态跟踪的任务,如智能助手、自动驾驶和复杂决策支持系统。其高效的内存访问策略将推动相关领域的技术进步,提升系统的响应速度和准确性。

📄 摘要(原文)

Agentic large language model (LLM) systems rely on external memory for long-horizon state and concurrent multi-agent execution, but centralized indexes and heuristic partitions become bottlenecks as memory volume and parallel access grow. We present ShardMemo, a budgeted tiered memory service with Tier A per-agent working state, Tier B sharded evidence with shard-local approximate nearest neighbor (ANN) indexes, and Tier C, a versioned skill library. Tier B enforces scope-before-routing: structured eligibility constraints mask ineligible shards before routing or ANN search. We cast shard probing as masked mixture-of-experts (MoE) routing over eligible shards, probing up to $B_{\mathrm{probe}}$ shards via Top-$B_{\mathrm{probe}}$ or adaptive Top-$P$, and use cost-aware gating over profile/observation/session shard families; the router is trained from evidence-to-shard supervision. On LoCoMo, ShardMemo improves over the strongest baseline (GAM) by +5.11 to +6.82 F1 across question categories. Under a fixed-budget routing setting ($B_{\mathrm{probe}}=3$), ShardMemo improves over cosine-to-prototype shard routing by +6.87 F1 while reducing retrieval work (VecScan 521->414, -20.5%) and p95 latency (95->76 ms). On long-context HotpotQA, ShardMemo achieves 63.41/61.88/57.95 F1 at 56K/224K/448K tokens. On ToolBench, Tier C reaches 0.97 Precision@3 and 1.94 StepRed (+10.2% and +7.2% over embedding-similarity retrieval).