podcasts / The attention family / episode / question
Question

Why is zeroing attention weights after softmax the wrong way to do causal masking?

Answered from Causal attention (masked self attention) | The attention family series - Lecture 7 · The attention family · 2026-09-24

Sreedath Panat calls it naive masking: take softmax, set the upper triangle to 0 and divide each row by its new sum. The rows sum to 1 and look identical in form to a correct mask, but softmax divides by the sum of e raised to every score in the row, and those scores include the dot products of the current query with future keys. Information from tokens that would not exist at inference is already baked into every remaining weight.

▸In their words

“So the moment you calculate attention weights from raw attention scores using softmax, some information from the future is already baked in.” Sreedath Panat · at 20:26 — open in the transcript →

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

▸More from this episode

Q1Why does causal attention mask future tokens, according to Vizuara?Q2What does the causal attention mask look like in the attention weights matrix?Q4How does masking attention scores with minus infinity before softmax work?Q5How is dropout applied to attention weights, and why scale by 1/(1-p)?Q6What are the full steps of causal self-attention in Vizuara's attention family series?
Transcribe your links. Paste a YouTube, Google Drive or podcast link and WhipScribe gives you the transcript. Transcribe a link →