面向长程LLM对话的协作式内存分页与关键词书签
Cooperative Memory Paging with Keyword Bookmarks for Long-Horizon LLM Conversations
AI总结:
提出协作式分页方法,用关键词书签替代被驱逐的对话片段,并赋予模型 recall() 工具按需检索,在 LoCoMo 基准上四个模型均取得最佳答案质量,并通过消融实验揭示分页设计的关键因素。
摘要:
当LLM对话超出上下文窗口时,旧内容必须被驱逐——但模型在需要时如何恢复它们?我们提出协作式分页:被驱逐的片段被替换为最小关键词书签([pN:keywords],每个约8-24个token),并赋予模型一个 recall() 工具以按需检索完整内容。在 LoCoMo 基准(10个真实多会话对话,300+轮次)上,协作式分页在四种模型(GPT-4o-mini、DeepSeek-v3.2、Claude Haiku、GLM-5)的六种方法中实现了最高的答案质量——优于截断、BM25、词重叠检索、搜索工具基线和完整上下文——由四个独立的LLM评判员确认(p=0.017,配对bootstrap)。随后,我们通过边界策略和驱逐策略的5x4消融实验(3,176个合成探针,1,600个LoCoMo探针)研究分页设计空间。关键发现:(1)粗粒度固定大小页面(fixed_20)达到96.7%,而内容感知的topic_shift降至56.7%;(2)驱逐策略的选择依赖于数据(FIFO在合成数据上最佳,LFU在LoCoMo上最佳);(3)两种书签生成策略相比启发式基线有提升(+4.4和+8.7个E2E点);(4)剩余瓶颈是书签区分度——模型96%的时间触发recall(),但当书签区分度不足时,仅57%选择正确页面。关键词特异性单独造成25个百分点的准确率差异。
英文摘要:
When LLM conversations grow beyond the context window, old content must be evicted -- but how does the model recover it when needed? We propose cooperative paging: evicted segments are replaced with minimal keyword bookmarks ([pN:keywords], ~8-24 tokens each), and the model is given a recall() tool to retrieve full content on demand. On the LoCoMo benchmark (10 real multi-session conversations, 300+ turns), cooperative paging achieves the highest answer quality among six methods -- outperforming truncation, BM25, word-overlap retrieval, a search-tool baseline, and full context -- on four models (GPT-4o-mini, DeepSeek-v3.2, Claude Haiku, GLM-5), confirmed by four independent LLM judges ($p=0.017$, paired bootstrap). We then study the paging design space with a 5x4 ablation over boundary strategies and eviction policies (3,176 synthetic probes, 1,600 LoCoMo probes). Key findings: (1) coarse fixed-size pages (fixed_20) reach 96.7% while content-aware topic_shift collapses to 56.7%; (2) eviction policy choice is data-dependent (FIFO best on synthetic, LFU on LoCoMo); (3) two bookmark generation strategies improve over the heuristic baseline (+4.4 and +8.7 E2E points); (4) the remaining bottleneck is bookmark discrimination -- the model triggers recall() 96% of the time but selects the correct page only 57% when bookmarks are insufficiently distinctive. Keyword specificity alone accounts for a 25 percentage point accuracy difference.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。