The neural network architecture behind almost all modern language models, built around attention instead of recurrence.
A mechanism that lets a model weigh how much each part of the input should influence each output, learned rather than fixed.
Also known as: Self-Attention
Attention computes, for every position in a sequence, a set of weights over all the other positions — how much each one should contribute. Those weights are computed from the data itself rather than fixed in advance, so the model learns which relationships matter.
In self-attention the sequence attends to itself, which is how a language model resolves what "it" refers to three sentences earlier. The standard formulation projects each token into a query, a key and a value; the query is compared against every key to produce the weights, and the weighted sum of values becomes the output.
Running several attention operations in parallel with different projections — multi-head attention — lets one head track syntax while another tracks long-range reference.
The neural network architecture behind almost all modern language models, built around attention instead of recurrence.
The algorithm that works out how much each weight in a network contributed to the error, by applying the chain rule backwards through the layers.
The optimisation method that trains most models: repeatedly step every parameter a little way downhill on the error surface.
A network that processes sequences one element at a time, carrying a hidden state forward — the standard approach before transformers.
Definitions are reviewed by our editorial team. Spotted a problem? Tell us.