用轻量级路由模型决定对话记忆存储,提升长对话问答性能。
MemRouter: Memory-as-Embedding Routing for Long-Term Conversational Agents

- 基于嵌入向量的路由策略,替代逐轮生成决策
- 在LoCoMo上整体F1达52.0,延迟从970ms降至58ms
- 适合需要高效记忆管理的长对话系统开发者
长期对话代理需决定将哪些对话轮次存入外部记忆,但现有系统依赖每轮自回归大模型生成来决策。本文提出MemRouter,一种写端记忆路由机制,将记忆准入与下游回答模型解耦,以嵌入向量为基础进行路由判断。该方法结合当前轮次与近期上下文编码,通过冻结的LLM骨干网络提取嵌入,并使用轻量级分类头预测是否存储,仅训练1200万参数。在LoCoMo上的受控对比实验中,检索管道、回答提示和问答骨干(Qwen2.5-7B)保持一致时,MemRouter在所有问题类别上均优于基于LLM的记忆管理器(总体F1 52.0 vs 45.6,非重叠95%置信区间),同时将记忆管理中位延迟从970ms降低至58ms。因子分析显示,学习型准入使平均F1提升+10.3,特定类别提示带来+5.2,检索贡献+0.7。结果表明,写端记忆准入可通过小规模监督路由器学习,而答案生成可独立作为下游任务。
原文摘要 · Abstract (English)
Long-term conversational agents must decide which turns to store in external memory, yet recent systems rely on autoregressive LLM generation at every turn to make that decision. We present MemRouter, a write-side memory router that decouples memory admission from the downstream answer backbone and replaces per-turn memory-management decoding with an embedding-based routing policy. MemRouter encodes each turn together with recent context, projects the resulting embeddings through a frozen LLM backbone, and predicts whether the turn should be stored using lightweight classification heads while training only 12M parameters. Under a controlled matched-harness comparison on LoCoMo, where the retrieval pipeline, answer prompts, and QA backbone (Qwen2.5-7B) are held identical, MemRouter outperforms an LLM-based memory manager on every question category (overall F1 52.0 vs 45.6, non-overlapping 95% CIs) while reducing memory-management p50 latency from 970ms to 58ms. Descriptive factorial averaging further shows that learned admission improves mean F1 by +10.3 over random storage, category-specific prompting adds +5.2 over a generic prompt, and retrieval contributes +0.7. These results suggest that write-side memory admission can be learned by a small supervised router, while answer generation remains a separate downstream component in long-horizon conversational QA.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。