arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2607.00394cs.DBcs.CL
收藏

当经典缓存策略失效时:面向语义检索缓冲区的学习增强替换

When Classic Cache Policies Fail: Learning-Augmented Replacement for Semantic Retrieval Buffers

LIGHTSPEED, Tencent(腾讯光速);The Chinese University of Hong Kong(香港中文大学)

Yushi Sun, Bowen Cao, Wai Lam

AI总结:

针对LLM代理中语义检索缓冲区的缓存替换问题,提出学习增强框架SOLAR,通过遗憾积累和贝叶斯在线学习实现恒定竞争比≤3,在紧缓存下相对FIFO提升5-75%。

摘要:

LLM代理越来越依赖检索缓冲区来存储和重用过去的经验,然而管理这些缓冲区的缓存策略在很大程度上仍然是临时的。我们将此形式化为一个具有切换成本的在线语义缓存替换问题,其中项目通过嵌入相似性进行匹配,命中质量是连续的而非二元的。通过在来自MemoryBench-Full(LoCoMo,DialSim)的两个数据集上使用8种替换策略进行实验,我们揭示了一个令人惊讶的发现:经典启发式算法(LRU,LFU)在语义工作负载上始终不如朴素的FIFO基线,这是由于缺乏时间局部性和频率集中性。我们提出了SOLAR,一个学习增强框架,它通过遗憾积累(实现约17%的修改率)推导修改时机,并通过隐式检索反馈上的贝叶斯在线学习推导内容选择。我们证明SOLAR实现了常数竞争比≤3,与缓存大小和范围无关(而FIFO为Ω(K)),并且驱逐遗憾为O(√(KT log T)),匹配Ω(√(KT))的下界(对数因子内)。实验表明,在紧缓存大小下,SOLAR相对于FIFO有5-75%的相对改进,并在工作集边界处具有清晰表征的相变。使用5000个项目池的合成实验进一步揭示了池大小与检索质量之间的倒U型关系,将容量约束解释为检索噪声现象而非存储限制。

英文摘要:

LLM agents increasingly rely on retrieval buffers to store and reuse past experience, yet the cache management policies governing these buffers remain largely ad-hoc. We formalize this as an online semantic cache replacement problem with switching costs, where items are matched by embedding similarity and hit quality is continuous rather than binary. Through experiments on two datasets from MemoryBench-Full (LoCoMo, DialSim) with 8 replacement policies, we reveal a surprising finding: classic heuristics (LRU, LFU) \emph{consistently underperform} the naive FIFO baseline on semantic workloads, due to the absence of temporal locality and frequency concentration. We propose SOLAR, a learning-augmented framework that derives modification timing from regret accumulation (achieving $\sim$17\% modification rate) and content selection from Bayesian online learning over implicit retrieval feedback. We prove SOLAR achieves a constant competitive ratio $\leq 3$, independent of cache size and horizon (vs.\ $Ω(K)$ for FIFO), and eviction regret $O(\sqrt{KT\log T})$, matching the $Ω(\sqrt{KT})$ lower bound up to logarithmic factors. Experiments demonstrate 5--75\% relative improvement over FIFO at tight cache sizes, with a clearly characterized phase transition at the working set boundary. Synthetic experiments with 5000-item pools further reveal an inverted-U relationship between pool size and retrieval quality, justifying capacity constraints as a retrieval noise phenomenon rather than a storage limitation.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑