用潜在空间建记忆,让大模型更牢靠记住事实。
NextMem: Towards Latent Factual Memory for LLM-based Agents
- 用自回归编码器在潜空间构建记忆,省去文本索引负担。
- 在多个数据集上检索准确率超基线15%以上,抗遗忘能力更强。
- 适合需要长期记忆的智能体任务,如对话、规划与推理。
记忆对基于大语言模型的智能体至关重要,其中事实性记忆是基础。现有方法存在明显局限:文本型记忆带来沉重上下文与索引开销,参数型记忆则易发生灾难性遗忘且成本高。为此,我们提出NextMem,一种基于自回归自动编码器的潜在事实性记忆框架,可在高效构建潜空间记忆的同时保证高精度重建。为优化训练效果,我们设计了两阶段训练流程:自回归重建对齐与渐进式潜变量替换。同时引入量化技术以降低存储开销。大量实验表明,NextMem在检索性能、鲁棒性与可扩展性方面均表现优异。代码与模型检查点已开源:https://github.com/nuster1128/NextMem。
原文摘要 · Abstract (English)
Memory is critical for LLM-based agents to preserve past observations for future decision-making, where factual memory serves as its foundational part. However, existing approaches to constructing factual memory face several limitations. Textual methods impose heavy context and indexing burdens, while parametric methods suffer from catastrophic forgetting and high costs. To address these challenges, we introduce NextMem, a latent factual memory framework that utilizes an autoregressive autoencoder to efficiently construct latent memory while ensuring accurate reconstruction. For better optimization, we propose a two-stage training process, including autoregressive reconstruction alignment and progressive latent substitution. We also incorporate quantization to reduce storage overhead. Extensive experiments demonstrate that NextMem achieves superior performance, and excels in retrieval, robustness, and extensibility properties. We release our code and model checkpoints at https://github.com/nuster1128/NextMem.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。