arXiv:2605.10537cs.CL2026-05

Mela通过模拟人类记忆整合机制,提升模型在长文本中的推理能力。

Mela: Test-Time Memory Consolidation based on Transformation Hypothesis

论文配图:Mela: Test-Time Memory Consolidation based on Transformation Hypothesis
图 1 · 摘自论文原文
  • 基于神经科学的分层记忆模块,分频更新抽象与细节表征
  • 测试时动态融合多粒度记忆,在4K外长文本上性能稳定
  • 无需新增标记,适配大模型长序列任务

记忆巩固是将短暂经验转化为稳定结构化表征的核心机制,虽在人脑中至关重要,却未被充分应用于现代序列模型。本文借鉴神经科学中的记忆巩固理论与跨频率耦合机制,提出分层记忆模块(HMM),由两个不同更新频率的子模块组成:低频模块生成抽象的语义级表征,高频模块保留更丰富的事件细节。最终记忆输出为上下文依赖的动态组合,类比人类记忆的重构过程。将HMM集成至Transformer语言解码器,构建Mela系列记忆增强型语言模型,实现测试时的在线记忆巩固。为进一步利用多粒度记忆表征,引入MemStack方法,将不同层次的记忆特征分布于解码器早期层,不增加额外标记。语言建模实验表明,Mela在所有模型规模下均优于标准Transformer基线;且在预训练上下文长度固定为4K的情况下,其在显著更长的上下文中保持性能,而基线模型在超出训练长度后迅速退化。大量消融实验证实各组件的有效性,并为实际配置提供指导。

原文摘要 · Abstract (English)

Memory consolidation, the process by which transient experiences are transformed into stable, structured representations, is a foundational organizing principle in the human brain, yet it remains largely unexplored as a design principle for modern sequence models. In this work, we leverage established neuroscientific theories of memory consolidation and cross-frequency coupling to propose the Hierarchical Memory Module (HMM), a neural memory architecture composed of two functionally distinct sub-modules that operate at different update frequencies. Inspired by the transformation hypothesis, the low-frequency sub-module produces high-level representations that capture abstract, gist-level knowledge, while the high-frequency sub-module produces fine-grained representations that preserve richer episodic detail. The final memory output is dynamically reconstructed as a context-dependent combination of both representations, analogous to the reconstructive nature of human memory retrieval. We integrate HMM into a Transformer-based language decoder to form Mela, a family of memory-augmented language models that perform online memory consolidation at test time. To further exploit the multi-granularity memory representations produced by HMM, we introduce MemStack, a method that distributes different levels of memory features across the early layers of the decoder without introducing additional tokens. Experiments on language modeling demonstrate that Mela outperforms Transformer baselines across all the model sizes. Moreover, with the pretrained context length fixed at 4K, Mela maintains performance on significantly longer contexts, whereas Transformer baselines degrade rapidly beyond their training length. Extensive ablation studies validate the contribution of each component and provide guidance for practical configuration.

记忆机制长序列Transformer多粒度

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。