~/tedtes/writing/math-foundations-for-reasoning-models

~/writing/math-foundations-for-reasoning-models $ ls

Attention and Transformers

Bridge to Embeddings

Attention explains how representations interact; embeddings explain how discrete tokens become representations in the first place.

~/writing/math-foundations-for-reasoning-models $ cat topic.md

Bridge To Embeddings

Where We Are

This chapter explained attention as learned information routing.

The progression was:

attention -> self-attention -> query/key/value -> attention weight

Then the transformer structure:

scaled dot-product attention
multi-head attention
positional encoding
transformer block
feedforward layer
residual connection
layer normalization

And finally:

long-range dependency
attention as learned alignment

Attention explains how information moves between representations.


What Attention Assumes

Attention assumes there are representations to operate on.

It compares queries and keys.

It mixes values.

But this raises a prior question:

where do those representations come from?

Text begins as discrete symbols or tokens.

Attention needs numerical representations.

Attention needs inputs that can be compared, weighted, and transformed.


Why Embeddings Come Next

An embedding is a way to represent a discrete item as a learned numerical representation.

Simple idea:

token -> representation

Once tokens have representations, attention can operate on them.

token representations -> attention -> contextual representations

Embeddings provide the representational material that attention transforms.


Token Identity Is Not Enough

A token ID can distinguish one token from another.

But attention needs more than identity.

It needs representations that can participate in operations like:

comparison
weighting
mixing
transformation

Embeddings make this possible.

Embeddings make discrete tokens operable inside neural computation.


Bridge Question

The next chapter begins with:

what is an embedding?

That leads to:

token
token ID
token embedding
word embedding
learned embedding
contextual embedding
embedding space
similarity
sparse and dense representation

The next step is understanding how symbols become representations that models can compute with.


Final Summary

  • Attention routes information between representations.
  • Transformers use attention inside repeatable representation-update blocks.
  • Attention assumes that tokens already have computable representations.
  • Embeddings explain how discrete items become those representations.
  • The next chapter moves from attention mechanics to representational form.

~/writing/math-foundations-for-reasoning-models $ open

Continue the series.

Embedding