효율적인 장문맥 모델링을 위한 인공 해마 네트워크
Artificial Hippocampus Networks for Efficient Long-Context Modeling
October 8, 2025
저자: Yunhao Fang, Weihao Yu, Shu Zhong, Qinghao Ye, Xuehan Xiong, Lai Wei
cs.AI
초록
장기 시퀀스 모델링은 RNN(Recurrent Neural Network)과 유사한 모델에서의 압축된 고정 크기 메모리의 효율성과 어텐션 기반 트랜스포머(Transformer)에서의 무손실 확장 메모리의 충실도 사이의 근본적인 트레이드오프에 직면해 있습니다. 인지과학의 다중 저장소 모델(Multi-Store Model)에서 영감을 받아, 우리는 인공 신경망의 메모리 프레임워크를 제안합니다. 우리의 방법은 트랜스포머의 KV 캐시를 무손실 단기 메모리로 유지하는 슬라이딩 윈도우를 유지하면서, 인공 해마 네트워크(Artificial Hippocampus Network, AHN)라고 명명된 학습 가능한 모듈이 윈도우 밖의 정보를 고정 크기의 압축된 장기 메모리로 반복적으로 압축합니다. 이 프레임워크를 검증하기 위해, 우리는 Mamba2, DeltaNet, Gated DeltaNet과 같은 현대적인 RNN 유사 아키텍처를 사용하여 AHN을 구현했습니다. 장기 컨텍스트 벤치마크인 LV-Eval과 InfiniteBench에서의 광범위한 실험을 통해, AHN이 추가된 모델들이 슬라이딩 윈도우 베이스라인을 지속적으로 능가하고, 전체 어텐션 모델과 비슷하거나 더 우수한 성능을 달성하면서도 계산 및 메모리 요구 사항을 크게 줄이는 것을 확인했습니다. 예를 들어, Qwen2.5-3B-Instruct 모델에 AHN을 추가하면 추론 FLOPs를 40.5% 줄이고 메모리 캐시를 74.0% 줄이면서, LV-Eval(128k 시퀀스 길이)에서의 평균 점수를 4.41에서 5.88로 향상시켰습니다. 코드는 https://github.com/ByteDance-Seed/AHN에서 확인할 수 있습니다.
English
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.