podcasts / The attention family / episode / question
Question

Why is dot product attention scaled by the square root of d_k, according to Vizuara?

Answered from Dot product attention and scaled dot product attention | The attention family series - Lecture 4 · The attention family · 2026-09-11

The Vizuara instructor explains that the dot product of two randomly initialised query and key vectors grows in magnitude with the square root of their dimension. At the hundreds or thousands of dimensions real models use, raw scores get large enough that softmax saturates and hands almost all the weight to one token. Dividing every score by the square root of d cancels that growth, so the scores stay in a similar range whatever the dimension and the softmax weights stay meaningful.

▸In their words

“This number is proportional to square root of dimensionality.” Instructor · at 11:58 — open in the transcript →

Source: our own transcription of the episode. The full conversation is on The attention family (2026-09-11). Read the whole episode summary →

▸More from this episode

Q2What is the difference between dot product attention and Bahdanau additive attention?Q3Why does a dot product work as an attention score between two tokens?Q4What happens to softmax attention weights without scaling at 1,000 or 4,096 dimensions?Q5How does softmax saturation hurt LLM training, according to Vizuara?Q6Which paper introduced scaled dot product attention and why is it used everywhere?
Transcribe your links. Paste a YouTube, Google Drive or podcast link and WhipScribe gives you the transcript. Transcribe a link →