Methods › General › Attention Modules › Attention Free Transformer

Attention Free Transformer

3 papers tagged archive 2025-07-28

Introduced by Shuangfei Zhai et al. in An Attention Free Transformer

archive 2025-07-28 Description, source and code snippet are the archive's method entry.

Attention Free Transformer, or AFT, is an efficient variant of a multi-head attention module that eschews dot product self attention. In an AFT layer, the key and value are first combined with a set of learned position biases, the result of which is multiplied with the query in an element-wise fashion. This new operation has a memory complexity linear w.r.t. both the context size and the dimension of features, making it compatible to both large input and model sizes.

Given the input X, AFT first linearly transforms them into Q=X W^Q, K=X Wᴷ, V=X Wⱽ, then performs following operation:

Y=f(X) ; Yₜ=σ_q(Qₜ) ⊙(∑_(t^'=1)ᵀ exp(K_(t^')+w_(t, t^')) ⊙V_(t^'))/(∑_(t^'=1)ᵀ exp(K_(t^')+w_(t, t^')))

where ⊙ is the element-wise product; σ_q is the nonlinearity applied to the query with default being sigmoid; w ∈R^(T ×T) is the learned pair-wise position biases.

Explained in words, for each target position t, AFT performs a weighted average of values, the result of which is combined with the query with element-wise multiplication. In particular, the weighting is simply composed of the keys and a set of learned pair-wise position biases. This provides the immediate advantage of not needing to compute and store the expensive attention matrix, while maintaining the global interactions between query and values as MHA does.

PaperSource

Papers archive 2025-07-28

3 shown of 3, newest first. Repository counts are the archive's code-links table. A Syntology line states what Syntology ran from that paper's harvested code; it is per sample and not a correctness claim.

Tasks archive 2025-07-28

4 tasks the archive attaches to papers tagged with this method, by distinct papers. A task without a page in the catalog is plain text.

TaskPapers
Fine-Grained Image Classification1
Image Classification1
Language Modelling1
Position1

Usage over time archive 2025-07-28

Papers per year tagged with Attention Free Transformer: 2021 to 2021, peak 3 3 0 2021: 3 papers 2021
Papers per year the archive tags with this method, by the paper's archive date (3 dated). Bars are counts, not a trend claim.

Components: the archive holds no method-to-method composition, so PwC's Components table cannot be rebuilt; the Papers list carries no Results column for the same reason (the archive does not join its leaderboard rows to method tags).

Categories archive 2025-07-28

Attention Modules

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections