podcasts / The attention family / episode / question
Question

Why do transformers need position embeddings, according to Vizuara?

Answered from Position Embeddings: Learned, Sinusoidal, Relative | The attention family series - Lecture 9 · The attention family · 2026-10-09

In Vizuara's Lecture 9, Sreedath Panat uses two sentences made of the same four tokens: 'all dogs are animals' and 'all animals are dogs'. Without position information, 'dogs' and 'animals' get the same embeddings in both sentences, so they project to the same queries and keys and the dot product between them is the same number, even though the word order, and the meaning, differ. Attention on its own ignores order; position information has to be injected so the two scores come out different.

▸In their words

“Clearly the order in which tokens are arranged in a language matters.” Sreedath Panat · at 6:54 — open in the transcript →

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

▸More from this episode

Q2Does adding a position embedding change a word's meaning in a transformer?Q3How do learned absolute position embeddings work in GPT-2?Q4How do sinusoidal position embeddings work?Q5Why does every position get a unique sinusoidal embedding if sine waves repeat?Q6How does Shaw et al.'s relative position representation work?Q7What is T5's relative position bias and how is it different from a position embedding?Q8What happens to a small language model trained without position embeddings?
Transcribe your links. Paste a YouTube, Google Drive or podcast link and WhipScribe gives you the transcript. Transcribe a link →