The Dynamical Memory Transformer explores a way to keep a sequence model's working memory from growing with every new token. The paper combines recurrent memory units with an attention-based decoder, separating how past information is stored from how it is retrieved.
What changes in the architecture
A conventional Transformer retains token representations that attention can revisit directly. DMT instead updates several dynamical memory units and lets the decoder read their outputs. Each unit uses a complex diagonal recurrent matrix, with an input-dependent leak rate controlling updates.
The authors describe an associative scan with linear total work and logarithmic parallel depth when dimensions are fixed. During autoregressive inference, the recurrent states and convolution cache stay fixed in size. The claim concerns how the architecture scales with sequence length; it does not make computation independent of model size or eliminate all inference costs.
The results include a tradeoff
DMT performs best on several cognitive tasks in the reported comparisons and shows stronger length extrapolation on selective copy. Its language-modeling performance is close to the Transformer baseline, but it remains behind Mamba in language modeling. That mixed result is central to understanding the proposal.
A bounded memory is useful only if it preserves the information a task needs. Directly addressable history and compressed recurrent state offer different ways of handling that requirement, so a single aggregate score cannot settle the choice.
How to evaluate the idea
For a long-sequence workload, compare memory use and latency at increasing sequence lengths alongside answer quality. Include tasks that require retrieving a precise earlier detail as well as tasks that reward broad sequential patterns. The paper supports investigating this architecture as a memory mechanism; it does not establish a universal replacement for existing language models or provide evidence of production performance in a particular application.
Comments