HarmonyFidelisHarmonyFidelis
Login
Skip to content
AURA
LearnConfigurePublic programs
Learn

First principles

LearningInference

Mechanisms

RepresentationsContext & memoryArchitecturesDiffusion

Advanced research

Reasoning & agentsWorld modelsAGI & ASIEvaluation

Explore each space independently. More detail is always within reach.

Aura home
AuraUnderstand AIArchitectures

Transformers: understanding attention

Compare architectures, training methods and complete systems at the right level.

EssentialsExperimentGo deeper
Scientific sources
Definition

A Transformer combines attention, position information and local transformations, among other components. A recurrent network updates state over successive inputs. Architecture describes how to compute; the training objective describes what optimisation improves.

Scaled dot-product attention

Attention(Q,K,V) = softmax(QKᵀ / √dₖ)V

Q contains queries, K keys and V values. QKᵀ is scaled by √dₖ; row-wise softmax produces weights that combine V.

01

Compare Q and K

Q [n_q × dₖ]
Kᵀ [dₖ × nₖ]
↓
QKᵀ [n_q × nₖ]
02

Normalise each row

softmax(QKᵀ / √dₖ)
[n_q × nₖ]
Σⱼ wᵢⱼ = 1
03

Combine the values V

W [n_q × nₖ]
V [nₖ × dᵥ]
↓
O [n_q × dᵥ]

One head is shown. Q has n_q rows; K and V have nₖ rows. Q and K share dₖ columns. In self-attention, they are projected from the same sequence.

Numerical example: one query, three keys

Assumptions and notation

A causal mask excludes future positions in autoregressive prediction. Projections, multiple heads, local layers and residual connections complete a Transformer. Attention weights alone are not causal proof of its behaviour.

Limits of interpretation

Diffusion is a modelling and generation method that can use different networks. DreamerV3 and MuZero organise components into learning and decision systems. These names are not interchangeable categories.

Compare the right levels

Architecture
Transformer · Recurrent network
Learning / generation method
Supervised · self-supervised · reinforcement · diffusion
Learning and decision system
DreamerV3 · MuZero

On this page

DefinitionEquationAssumptions and notationLimits of interpretationScientific sources
Essentials
From concept to practicePut it into practice

Scientific sources

  • Vaswani et al. · 2017Attention Is All You NeedarXiv v7 · 2023
    Original publication
  • Hochreiter & Schmidhuber · 1997Long Short-Term Memory
    Original publication
  • Ho, Jain & Abbeel · 2020Denoising Diffusion Probabilistic Models
    Original publication
  • Jain & Wallace · 2019Attention is not Explanation
    Original publication

Teaching synthesis of the cited sources. Published results remain tied to their tasks, protocols and budgets.

Explore nextDiffusionInference

Search Aura

18 results

LearnLearning, then using a modelSeparate learned parameters from information supplied with a request.
LearnFrom context to the next tokenSeparate the model’s probabilities from the rule that selects an output.
LearnFrom text to representationsUnderstand why words become vectors without equating a vector with human meaning.
LearnWhat kind of memory?Separate working context, recurrent state, learned parameters and persistent storage.
LearnTransformers: understanding attentionCompare architectures, training methods and complete systems at the right level.
LearnGenerating by denoisingDistinguish corruption during learning from progressive generation.
LearnFrom a model to a system that actsUnderstand the harness around a model and its tools.
LearnPredicting to choose an actionExplore longer horizons and the risk of inaccurate predictions.
LearnDefinitions, not a single verdictExamine generality, performance and adaptation before applying a label.
LearnWhat can a result establish?Move from a convincing impression to a reproducible comparison.
ConfigurePrepare a ChatGPT projectA clear objective, useful context and instructions you can actually use.
ConfigureChoose for your taskStart with your needs. Compare access and outcomes without a universal model ranking.
ConfigureMake your request verifiableTurn an intention into an objective, context and success criteria.
ConfigurePut the right information in the right placeDistinguish working rules, task resources and memory managed by the product.
ConfigurePrepare a development environmentDefine the model’s role, harness capabilities and the access you actually need.
ConfigureCompose a development workflowOrganise preparation, changes, verification and reporting. Reuse the steps that help.
ConfigurePrepare a mission, then check the resultA reproducible example, a checklist and a record of your observations.
Public programsTentacularPublicly available uses, features and resources.