arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2504.05646cs.LGcs.AI
收藏

Lattice: 学习高效压缩内存

Lattice: Learning to Efficiently Compress the Memory

Google Research(谷歌研究院);Google DeepMind(谷歌DeepMind)

Mahdi Karami, Razvan Pascanu, Vahab Mirrokni

AI总结:

Lattice通过正交更新机制,高效压缩内存,提升语言建模和联想回忆任务的性能与内存效率。

摘要:

注意力机制已经革新了序列学习,但存在二次计算复杂度。本文介绍了\model,一种新的循环神经网络(RNN)机制,利用K-V矩阵的内在低秩结构,高效地将缓存压缩到固定数量的记忆槽中,实现亚二次复杂度。我们将这种压缩 formulation 为一个在线优化问题,并基于单个梯度下降步骤推导出动态内存更新规则。所得到的递归特征包含状态和输入依赖的门控机制,提供了一种可解释的记忆更新过程。核心创新是正交更新:每个内存槽仅使用与其当前状态正交的信息进行更新,因此仅包含新颖的、非冗余的数据,以最小化对先前存储信息的干扰。我们推导出该正交更新规则的高效计算方法,并进一步通过分块并行化近似,以确保训练可扩展性。实验证明,Lattice在语言建模和联想回忆任务上,跨多样上下文长度和模型规模的强基线表现更优,实现了更高效的内存效率,同时显著减少了内存大小。

英文摘要:

Attention mechanisms have revolutionized sequence learning but suffer from quadratic computational complexity. This paper introduces \model, a novel recurrent neural network (RNN) mechanism that leverages the inherent low-rank structure of K-V matrices to efficiently compress the cache into a fixed number of memory slots, achieving sub-quadratic complexity. We formulate this compression as an online optimization problem and derive a dynamic memory update rule based on a single gradient descent step. The resulting recurrence features a state- and input-dependent gating mechanism, offering an interpretable memory update process. The core innovation is the orthogonal update: each memory slot is updated exclusively with information orthogonal to its current state, hence incorporating only novel, non-redundant data to minimize interference with previously stored information. We derive an efficient computation for this orthogonal update rule and further approximate it with chunk-wise parallelization to ensure training scalability. Empirically, Lattice outperforms strong baselines on language modeling and associative recall tasks across diverse context lengths and model sizes, achieving superior memory efficiency with significantly reduced memory sizes.

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

↑