发表机构
Emory University(埃默里大学)
机构由 AI 辅助整理,请以论文原文为准。AI 中文总结
MegaMem是一种双视图检索系统,可在有限生成上下文下实现数亿至10亿token的超大规模内存检索,在EnterpriseRAG-Bench上总体指标达82.26、正确性达86.50。
AI 中文摘要
现代语言模型与智能体日益需要持久化内存来存储完整代码库、长交互历史及异构企业记录。核心挑战在于需将数亿个token保持可搜索状态,同时仅向答案模型传递有限的源证据。我们提出MegaMem,一种源解析双视图检索系统,将语义访问与生成证据分离。蒸馏记录与详细证据分别用原始查询与转换后查询进行搜索;每个蒸馏命中项在倒数排名融合、去重及交叉编码器重排序前,会解析为不可变源ID;仅固定预算内排名最高的详细证据用于支持生成。答案生成后,归因步骤会识别哪些加载的源文件支持最终答案。我们在EnterpriseRAG-Bench上评估MegaMem,该基准包含超过50万份异构企业文档和约6.5亿个token。MegaMem将总体指标从68.22提升至82.26,达到86.50的正确性。这些结果表明,MegaMem在有限生成上下文下支持超大规模持久化内存,同时保持较强的答案准确性。通过将可搜索内存规模与答案上下文大小分离,MegaMem为对从数亿到10亿token的内存进行准确检索提供了可行路径。我们的代码可在https://github.com/xfab-xinyuansong/MegaMem.git获取。
英文摘要
Modern language models and agents increasingly require persistent memory for complete codebases, long interaction histories, and heterogeneous enterprise records. The key challenge is to keep hundreds of millions of tokens searchable while passing only bounded source evidence to the answer model. We introduce MegaMem, a source-resolved dual-view retrieval system that separates semantic access from generation evidence. Distilled records and detailed evidence are searched with original and transformed queries; every distilled hit resolves to an immutable source ID before reciprocal-rank fusion, deduplication, and cross-encoder reranking; and only the highest-ranked detailed evidence within a fixed budget supports generation. Post-answer attribution then identifies which loaded sources support the fixed answer. We evaluate MegaMem on EnterpriseRAG-Bench, which contains more than 500,000 heterogeneous enterprise documents and approximately 650M tokens. MegaMem improves Overall from 68.22 to 82.26 and reaches 86.50 Correctness. These results show that MegaMem supports ultra-large persistent memory while preserving strong answer accuracy under a bounded generation context. By separating searchable memory scale from answer-context size, MegaMem provides a practical path toward accurate retrieval over memories ranging from hundreds of millions to one billion tokens. Our code is available at https://github.com/ xfab-xinyuansong/MegaMem.git.