ImageNet classification with deep convolutional neural networks
Alex Krizhevsky, Ilya Sutskever et al.
0
Citations
0
Influential Citations
—
Venue
2026
Year
We introduce , a recurrent Transformer architecture with fixed-size memory that generalizes sliding-window attention while remaining parallelizable during training. consists of two coupled models: a prefiller Q, which leverages full attentionIn 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 with a memory consistency loss that aligns m_t with m'_t, allowing inference to use P alone. Empirically, 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.
Maglev addresses a critical challenge in scaling Transformers to long sequences: the quadratic cost of full attention. While sliding-window attention reduces complexity, it loses access to distant context. Recurrent models like linear attention or RWKV offer fixed memory but often sacrifice expressiveness. Maglev bridges this gap by introducing a recurrent memory that is trained to mimic a full-attention prefiller, achieving both efficiency and strong performance.
The key insight is to decouple the training-time teacher (prefiller Q) from the inference-time student (decoder P). By using a memory consistency loss, Maglev distills the ability to compress history into a fixed-size memory that P can use autoregressively. This is a novel training paradigm that could be applied to other recurrent architectures.
The paper reports that Maglev improves validation loss and downstream pretraining benchmarks compared to sliding-window and latent recurrent transformer baselines. While specific numbers are not provided in the abstract, the consistent improvement across metrics suggests the memory consistency training is effective. The parameter-sharing variant also preserves most gains, making it a practical choice for memory-constrained settings.
Maglev offers a new paradigm for efficient long-context modeling. By training a recurrent decoder to emulate a full-attention teacher, it achieves a balance between expressiveness and efficiency. This could inspire further research into distillation-based memory training and hybrid architectures. The ability to share parameters also makes it attractive for deployment on edge devices. As long-context capabilities become increasingly important, Maglev provides a promising step toward scalable Transformers.
Alex Krizhevsky, Ilya Sutskever et al.
Ashish Vaswani, Noam Shazeer et al.
Douglas M. Bates, Martin Mächler et al.
Diederik P. Kingma, Jimmy Ba