Skip to main content
QUICK REVIEW

[Paper Review] Can Active Memory Replace Attention?

Łukasz Kaiser, Samy Bengio|arXiv (Cornell University)|Oct 27, 2016
Multimodal Machine Learning ApplicationsComputer Science18 references16 citations
TL;DR

This paper proposes an extended active memory mechanism, the Extended Neural GPU, which matches or exceeds transformer-style attention models in neural machine translation, achieving state-of-the-art performance on WMT'14 English-to-German translation with lower sensitivity to sentence length. Unlike standard attention, which focuses on a single memory element via softmax, the model updates all memory elements uniformly at each step using a learnable transformation, enabling better generalization on longer sequences and smaller datasets.

ABSTRACT

Several mechanisms to focus attention of a neural network on selected parts of its input or memory have been used successfully in deep learning models in recent years. Attention has improved image classification, image captioning, speech recognition, generative models, and learning algorithmic tasks, but it had probably the largest impact on neural machine translation. Recently, similar improvements have been obtained using alternative mechanisms that do not focus on a single part of a memory but operate on all of it in parallel, in a uniform way. Such mechanism, which we call active memory, improved over attention in algorithmic tasks, image processing, and in generative modelling. So far, however, active memory has not improved over attention for most natural language processing tasks, in particular for machine translation. We analyze this shortcoming in this paper and propose an extended model of active memory that matches existing attention models on neural machine translation and generalizes better to longer sentences. We investigate this model and explain why previous active memory models did not succeed. Finally, we discuss when active memory brings most benefits and where attention can be a better choice.

Motivation & Objective

  • To address the limitation of standard attention mechanisms, which focus on a single memory element and struggle with tasks requiring multi-part memory access.
  • To investigate whether active memory—where all memory elements are updated uniformly at each step—can replace attention in real-world NLP tasks like machine translation.
  • To identify the key deficiencies in prior active memory models that prevented them from outperforming attention on sequence-to-sequence tasks.
  • To develop and evaluate an enhanced active memory architecture (Extended Neural GPU) that incorporates recurrent dependencies in output generation, enabling performance parity with attention on large-scale translation tasks.

Proposed method

  • Proposes an active memory mechanism where, at each decoding step, all memory elements are transformed uniformly using a shared, learnable function (e.g., convolutional or recurrent layer), rather than attending to a single element.
  • Introduces the Extended Neural GPU model, which extends the original Neural GPU by adding recurrent dependencies in the output distribution, enabling better modeling of sequential structure.
  • Employs teacher forcing during training to stabilize learning of long-range dependencies in the output sequence, a key factor in achieving high performance.
  • Uses a shared transformation across all memory elements at each step, enabling parallel computation and reducing sensitivity to sequence length.
  • Applies length normalization and dropout during training, with careful hyperparameter tuning to match or exceed attention-based models.
  • Evaluates performance using BLEU score and perplexity on standard benchmarks, including WMT'14 and WSJ parsing, under controlled settings.

Experimental results

Research questions

  • RQ1Why did previous active memory models fail to outperform attention mechanisms on neural machine translation tasks?
  • RQ2Can an active memory mechanism match the performance of soft attention in real-world NLP tasks, particularly sequence-to-sequence translation?
  • RQ3What architectural modifications are necessary for active memory to generalize better to longer sequences and smaller datasets?
  • RQ4In what scenarios does active memory outperform attention, and where does attention remain superior?
  • RQ5How does the inclusion of recurrent dependencies in the output distribution affect model performance and generalization?

Key findings

  • The Extended Neural GPU model achieves a BLEU score of 28.4 on the WMT'14 English-to-German translation task, matching the performance of state-of-the-art attention-based models.
  • The active memory model shows significantly lower sensitivity to sentence length compared to the attention baseline, maintaining stable performance across all length buckets from 0–10 to 50+ tokens.
  • On the small WSJ constituency parsing dataset (40K sentences), the model achieves an F1 score of 85.1, outperforming a pure sequence-to-sequence model (F1 < 70) and demonstrating strong generalization on limited data.
  • The active memory model does not require length normalization during decoding, unlike attention models, suggesting it generalizes better from shorter training examples.
  • Perplexity on the test set is 1.3 for the Extended Neural GPU, comparable to the best-performing attention models, indicating strong language modeling capacity.
  • The study confirms that recurrent dependencies in the output distribution are critical for high performance, and that this can be decoupled from model architecture, enabling active memory to match attention when properly regularized.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.