arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.14517cs.AIcs.LG
收藏

学习遗忘:受睡眠启发的记忆巩固用于缓解大语言模型中的前瞻性干扰

Learning to Forget: Sleep-Inspired Memory Consolidation for Resolving Proactive Interference in Large Language Models

Ying Xie

AI总结:

本文提出SleepGate框架,通过引入学习睡眠周期和三个机制缓解大语言模型中的前瞻性干扰,理论分析显示其将干扰范围从O(n)降至O(log n)。

摘要:

大语言模型(LLMs)受到前瞻性干扰(PI)的影响:上下文窗口中的过时信息会干扰当前值的检索。这种干扰会导致检索准确性以对数方式下降,成为瓶颈,无论上下文长度如何,且抵抗提示工程的缓解。生物大脑通过睡眠依赖的记忆巩固解决类似挑战:突触下调、选择性回放和目标遗忘。我们提出SleepGate,一个受生物启发的框架,通过在基于变换器的LLMs中引入学习的睡眠周期来增强键值(KV)缓存。SleepGate引入了三个机制:(1)冲突感知的时间标签器,检测新条目何时取代旧条目;(2)轻量级遗忘门,训练以选择性地驱逐或压缩过时的缓存条目;(3)巩固模块,将幸存条目合并为紧凑的摘要。这些组件在推理期间定期激活,由基于自适应熵的触发器控制。我们正式化了一个双阶段训练目标,共同优化清醒阶段的语言建模和睡眠阶段后的检索。理论分析显示SleepGate将干扰范围从O(n)降至O(log n)。在小型变换器(4层,793K参数)的实验中,SleepGate在PI深度5时达到99.5%的检索准确率,在深度10时达到97.0%,而所有五个基线——完整的KV缓存、滑动窗口、H2O、StreamingLLM和仅衰减的消融——仍低于18%。我们的框架提供了一个架构级的解决方案,提示工程无法解决。

英文摘要:

Large language models (LLMs) suffer from proactive interference (PI): outdated information in the context window disrupts retrieval of current values. This interference degrades retrieval accuracy log-linearly as stale associations accumulate, a bottleneck that persists regardless of context length and resists prompt-engineering mitigations. Biological brains resolve an analogous challenge through sleep-dependent memory consolidation: synaptic downscaling, selective replay, and targeted forgetting. We propose SleepGate, a biologically inspired framework that augments transformer-based LLMs with a learned sleep cycle over the key-value (KV) cache. SleepGate introduces three mechanisms: (1) a conflict-aware temporal tagger detecting when new entries supersede old ones; (2) a lightweight forgetting gate trained to selectively evict or compress stale cache entries; and (3) a consolidation module that merges surviving entries into compact summaries. These components activate periodically during inference in sleep micro-cycles, governed by an adaptive entropy-based trigger. We formalize a dual-phase training objective jointly optimizing language modeling during the wake phase and post-consolidation retrieval during the sleep phase. Theoretical analysis shows SleepGate reduces the interference horizon from O(n) to O(log n). In experiments with a small-scale transformer (4 layers, 793K parameters), SleepGate achieves 99.5% retrieval accuracy at PI depth 5 and 97.0% at depth 10, while all five baselines -- full KV cache, sliding window, H2O, StreamingLLM, and decay-only ablation -- remain below 18%. Our framework offers an architecture-level solution that prompt engineering cannot address.

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

↑