arXiv:2608.02870cs.LG2026-08

提出可并行训练的滑动记忆循环模型,提升长序列建模能力。

Maglev: Sliding Recurrent Memory

论文配图:Maglev: Sliding Recurrent Memory
图 1 · 摘自论文原文
  • 用双模型结构:预填充器全注意力生成记忆目标,解码器滑动窗口+递归注入生成记忆。
  • 验证损失和下游预训练任务均优于滑动窗口与潜在循环变压器基线。
  • 参数共享降低内存开销,适合长序列生成任务

我们提出 exttt{Maglev},一种具有固定大小记忆的循环Transformer架构,它在保持训练时并行性的同时,推广了滑动窗口注意力机制。该架构由两个耦合模型组成:预填充器 $Q$ 使用全注意力(实际中采用交错的全注意力与滑动窗口注意力以增强性能)生成记忆目标 $m'_t$,解码器 $P$ 仅使用滑动窗口注意力与递归键值注入,生成用于下一步预测的解码器记忆 $m_t$。通过记忆一致性损失将 $m_t$ 与 $m'_t$ 对齐,推理时仅需使用 $P$。实验表明, exttt{Maglev} 在验证损失和下游预训练基准上均优于滑动窗口与潜在循环Transformer基线。此外,$P$ 与 $Q$ 共享参数可显著降低参数内存开销,同时保留大部分性能增益。

原文摘要 · Abstract (English)

We introduce \ours{}, a recurrent Transformer architecture with fixed-size memory that generalizes sliding-window attention while remaining parallelizable during training. \ours{} consists of two coupled models: a prefiller $Q$, which leverages full attention\footnote{In practice, we use interleaved full and sliding-window attention for $Q$, as this yields stronger performance. The essential requirement is that $Q$ be more expressive than $P$, with access to the full history.} to produce memory targets $m'_t$, and a decoder $P$, which uses only sliding-window attention and recurrent K/V injection to produce decoder memories $m_t$ for next-token prediction. We train \ours{} with a memory consistency loss that aligns $m_t$ with $m'_t$, allowing inference to use $P$ alone. Empirically, \ours{} improves validation loss and downstream pretraining benchmarks over sliding-window and latent recurrent transformer baselines. Moreover, sharing parameters between $P$ and $Q$ reduces parameter memory while preserving most of the gains.

循环模型注意力机制长序列建模Transformer

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