SOTAVerified

Augmenting Self-attention with Persistent Memory

2019-07-02Code Available0· sign in to hype

Sainbayar Sukhbaatar, Edouard Grave, Guillaume Lample, Herve Jegou, Armand Joulin

Code Available — Be the first to reproduce this paper.

Reproduce

Code

Abstract

Transformer networks have lead to important progress in language modeling and machine translation. These models include two consecutive modules, a feed-forward layer and a self-attention layer. The latter allows the network to capture long term dependencies and are often regarded as the key ingredient in the success of Transformers. Building upon this intuition, we propose a new model that solely consists of attention layers. More precisely, we augment the self-attention layers with persistent memory vectors that play a similar role as the feed-forward layer. Thanks to these vectors, we can remove the feed-forward layer without degrading the performance of a transformer. Our evaluation shows the benefits brought by our model on standard character and word level language modeling benchmarks.

Tasks

Benchmark Results

DatasetModelMetricClaimedVerifiedStatus
enwik8All-attention network (18 layers)Bit per Character (BPC)1.01Unverified
Text8All-attention network - 36 layersBit per Character (BPC)1.08Unverified
Text8All-attention network - 18 layersBit per Character (BPC)1.11Unverified
WikiText-103All-attention network (36 layers)Test perplexity20.6Unverified

Reproductions