2025-10-09 · 进阶 · 自然语言处理 · 机器学习

Artificial Hippocampus Networks for Efficient Long-Context Modeling

本文提出了一种名为人工海马体网络(AHN)的内存框架,通过将无损短期记忆压缩为固定大小的长期记忆,实现了高效的长期上下文建模。

更新于 2025-10-16。作者:Yunhao Fang、Weihao Yu、Shu Zhong、Qinghao Ye、Xuehan Xiong、Lai Wei。

中文摘要

长序列建模在RNN-like模型中压缩固定大小内存的效率与基于注意力的Transformer中无损增长内存的保真度之间面临根本性的权衡。受认知科学中多存储模型(Multi-Store Model)的启发,我们提出了一种人工神经网络记忆框架。我们的方法维护Transformer的KV缓存滑动窗口作为无损短期记忆,同时一个可学习的模块,称为人工海马体网络(Artificial Hippocampus Network,AHN),通过循环压缩窗口外的信息到一个固定大小的紧凑长期记忆。为了验证这个框架,我们使用现代RNN-like架构实例化AHN,包括Mamba2、DeltaNet和Gated DeltaNet。在长上下文基准LV-Eval和InfiniteBench上进行的广泛实验表明,AHN增强模型在一致性上优于滑动窗口基线,并且实现了与全注意力模型相当甚至更优的性能,同时大幅降低了计算和内存需求。例如,使用AHN增强Qwen2.5-3B-Instruct减少了推理FLOPs的40.5%和内存缓存的74.0%,同时将其在LV-Eval(128k序列长度)上的平均分数从4.41提高到5.88。代码可在以下链接获得:https://github.com/ByteDance-Seed/AHN。

英文摘要

Long-sequence modeling faces a fundamental trade-off between the efficiency of compressive fixed-size memory in RNN-like models and the fidelity of lossless growing memory in attention-based Transformers. Inspired by the Multi-Store Model in cognitive science, we introduce a memory framework of artificial neural networks. Our method maintains a sliding window of the Transformer's KV cache as lossless short-term memory, while a learnable module termed Artificial Hippocampus Network (AHN) recurrently compresses out-of-window information into a fixed-size compact long-term memory. To validate this framework, we instantiate AHNs using modern RNN-like architectures, including Mamba2, DeltaNet, and Gated DeltaNet. Extensive experiments on long-context benchmarks LV-Eval and InfiniteBench demonstrate that AHN-augmented models consistently outperform sliding window baselines and achieve performance comparable or even superior to full-attention models, while substantially reducing computational and memory requirements. For instance, augmenting the Qwen2.5-3B-Instruct with AHNs reduces inference FLOPs by 40.5% and memory cache by 74.0%, while improving its average score on LV-Eval (128k sequence length) from 4.41 to 5.88. Code is available at: https://github.com/ByteDance-Seed/AHN.

解读

一句话总结

本文提出了一种名为人工海马体网络(AHN)的内存框架,通过将无损短期记忆压缩为固定大小的长期记忆,实现了高效的长期上下文建模。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源