# Attention Scores

- **Canonical URL:** https://getaimath.com/dictionary/attention-scores/
- **Topics:** [Transformer Architecture](https://getaimath.com/dictionary/category/transformer-architecture/)
- **Last updated:** 2026-11-25

## What is Attention Scores?

**In one sentence:** Attention scores are numbers that show how much each word should focus on every other word.

They are made by comparing queries with keys, then passing the results through softmax so they add up to 100% for each word. High scores mean strong focus. Researchers sometimes draw them as heat maps to see what a model is paying attention to.

![Transformers & Attention: The Smart Highlighter — Simple cartoon diagram showing how a Transformer reads a whole sentence at once and shines a bright highlighter beam from the word "IT" back to "trophy" so it knows what "IT" means.](https://getaimath.com/diagrams/transformer-architecture.png)
*Napkin Diagram (Transformer Architecture): Older AI read word-by-word and often lost track of earlier words; a Transformer highlights which words connect to which.*

## What is an example of Attention Scores?

For "it" in "The cat slept because it was tired," the score for "cat" might be 0.7 and for "slept" just 0.05.

## Why does Attention Scores matter?

Attention scores reveal how a model connects information.

## Related Concepts

- [Value Matrix](https://getaimath.com/dictionary/value-matrix/): The value matrix is a grid of learned weights that turns each word's numbers into the value it shares.
- [Scaled Dot-Product Attention](https://getaimath.com/dictionary/scaled-dot-product-attention/): Scaled dot-product attention is the standard math recipe for attention: compare queries and keys, scale the results, softmax them, and mix the values.
- [Key Matrix](https://getaimath.com/dictionary/key-matrix/): The key matrix is a grid of learned weights that turns each word's numbers into its key.
- [Causal Attention](https://getaimath.com/dictionary/causal-attention/): Causal attention only lets each word look at the words before it, never the words after.
- [Query Matrix](https://getaimath.com/dictionary/query-matrix/): The query matrix is a grid of learned weights that turns each word's numbers into its query.
- [Masked Attention](https://getaimath.com/dictionary/masked-attention/): Masked attention is attention where some positions are hidden, so certain words cannot look at certain other words.

---
Source: The AI Math Dictionary (https://getaimath.com/dictionary/attention-scores/)
