Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Linear Transformers Are Secretly Fast Weight Programmers

About

We show the formal equivalence of linearised self-attention mechanisms and fast weight controllers from the early '90s, where a ``slow" neural net learns by gradient descent to program the ``fast weights" of another net through sequences of elementary programming instructions which are additive outer products of self-invented activation patterns (today called keys and values). Such Fast Weight Programmers (FWPs) learn to manipulate the contents of a finite memory and dynamically interact with it. We infer a memory capacity limitation of recent linearised softmax attention variants, and replace the purely additive outer products by a delta rule-like programming instruction, such that the FWP can more easily learn to correct the current mapping from keys to values. The FWP also learns to compute dynamically changing learning rates. We also propose a new kernel function to linearise attention which balances simplicity and effectiveness. We conduct experiments on synthetic retrieval problems as well as standard machine translation and language modelling tasks which demonstrate the benefits of our methods.

Imanol Schlag, Kazuki Irie, J\"urgen Schmidhuber• 2021

Related benchmarks

TaskDatasetResultRank
Commonsense ReasoningWinoGrande--
1085
Question AnsweringARC Challenge--
906
Commonsense ReasoningPIQA
Accuracy74.3
751
Question AnsweringARC Easy
Accuracy75.3
597
Language ModelingWikiText-103 (test)
Perplexity36.659
579
Commonsense ReasoningHellaSwag
HellaSwag Accuracy61.3
350
Language ModelingLAMBADA
Accuracy49.2
268
Language ModelingWikiText-103 (val)
PPL35.64
214
Question AnsweringOpenBookQA
Normalized Accuracy31.6
102
Language ModelingFineWeb-Edu
PPL10.45
26
Showing 10 of 18 rows

Other info

Follow for update