arXiv:2601.08160cs.CLcs.AI2026-01被引 3

通过智能索引加速大模型记忆检索,响应速度提升一个数量级。

SwiftMem: Fast Agentic Memory via Query-aware Indexing

  • 按时间与语义维度构建查询感知索引,只检索相关记忆片段。
  • 在LoCoMo和LongMemEval上实现10.8/12.7毫秒搜索延迟。
  • 适合需要实时交互的大模型代理系统,尤其关注低延迟场景。

智能体记忆系统对维持大语言模型代理的长期上下文和高效信息检索至关重要。然而,现有记忆框架即使在使用高效向量索引(如HNSW)时,仍对全内存嵌入空间进行无差别的查询,导致随记忆增长产生延迟瓶颈。本文提出SwiftMem,一种查询感知的智能体记忆系统,通过在时间和语义维度上构建专用索引,将检索范围缩小至与查询相关的记忆子集。其时间索引支持对时间敏感数据的对数时间范围查询,语义DAG-Tag索引则通过分层标签结构将查询映射到相关主题。为缓解记忆增长带来的碎片化问题,引入嵌入-标签联合重组机制,基于语义聚类优化存储局部性。在LoCoMo和LongMemEval$_S$基准上,SwiftMem实现10.8/12.7毫秒搜索延迟,同时保持与强HNSW基线相当的LLM-judge准确率。在校准后的基准LoCoMo Refined上,其性能接近最优,且延迟优势达一个数量级。

原文摘要 · Abstract (English)

Agentic memory systems have become critical for enabling LLM agents to maintain long-term context and retrieve relevant information efficiently. However, existing memory frameworks often perform query-agnostic retrieval over the full memory embedding space even when their storage layer is backed by efficient vector indexes such as HNSW. This full-scope retrieval path creates latency bottlenecks as memory grows, hindering real-time agent interactions. We propose SwiftMem, a query-aware agentic memory system that narrows retrieval to query-relevant memory subsets through specialized indexing over temporal and semantic dimensions. Our temporal index enables logarithmic-time range queries for time-sensitive retrieval, while the semantic DAG-Tag index maps queries to relevant topics through hierarchical tag structures. To address memory fragmentation during growth, we introduce an embedding-tag co-consolidation mechanism that reorganizes storage based on semantic clusters to improve locality. Across LoCoMo and LongMemEval$_S$, SwiftMem reaches 10.8/12.7 ms search latency while maintaining competitive LLM-judge accuracy against strong HNSW-backed memory systems. On the calibrated benchmark, LoCoMo Refined, SwiftMem remains close to the top LLM-judge score while preserving an order-of-magnitude latency advantage.

记忆系统检索加速大模型代理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。