Hover a cell to see attention detail. Click a row to inspect it.
Low → High attentiondiagonal = self-attention
Attention Heatmap
Example
PeakedUniform
Row sums (should = 1.0)
The1.000
cat1.000
sat1.000
on1.000
the1.000
mat1.000
Each row shows which tokens a given token "pays attention to" when computing its contextual representation. Rows sum to 1.0 (softmax). Lower temperature = sharper focus.
Self-attention is the mechanism that made transformers dominate NLP. Every token simultaneously looks at every other token, and the attention weights determine how much influence each token has on the current token's representation. This heatmap shows exactly those weights - each row sums to 1.0 (softmax), showing where each token looks.
Each row = one query token; columns = key tokens it attends to; darker = more attention
Rows sum to 1.0 - attention weights are a probability distribution via softmax
See ambiguous sentences like "the bank was flooded" - bank attends to flooded, revealing meaning
Click any row to see the full attention distribution as a bar chart
Foundation for understanding GPT, Claude, BERT, and every modern language model
Part of the EngineersOfAI Interactive 3D - free interactive visualizations covering every major concept in machine learning and AI engineering. Hover any element for a plain-English explanation. No code required.