hn.today

All-Attention Transformer

arxiv.org39 points8 comments
Screenshot of All-Attention Transformer

The paper proposes a Transformer architecture built entirely from attention layers, removing the feed-forward layer normally paired with self-attention in each block. Its motivation is that self-attention is often credited with Transformers’ ability to model long-range dependencies, while the feed-forward layer performs a different, complementary role. To preserve that role without retaining a conventional feed-forward network, the authors add persistent memory vectors to self-attention. These learned vectors are available across inputs and let attention draw on stored representations, giving the layer a source of information beyond the tokens in the current sequence.

The authors argue that this modification lets a Transformer dispense with feed-forward layers without losing performance. They evaluate the resulting model on standard character-level and word-level language-modeling benchmarks, reporting benefits from the persistent-memory design. The central finding is that an attention-only network can match the performance of a conventional Transformer while using persistent vectors to supply functionality otherwise provided by its feed-forward modules. The work therefore challenges the assumption that both module types are necessary in every Transformer block and offers a way to simplify the architecture while retaining its language-modeling capability.

Read on arxiv.org8 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in AI

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.