Skip to the document
Madhuopen lab
Outcome School · Transformers and architecture9 min read

by Amit Shekhar · 8 January 2026

Causal Masking in Attention

The Causal Masking in Attention.

1,695 words#llm#ai#machine-learning2 recall cards

Causal Masking in Attention
Read on Outcome School ↗then come back to lock it in
Before you read, guess

What is the purpose of applying the mask matrix to the score matrix?

Ten seconds, a guess, then read — a wrong guess still makes the answer stick.

What this article covers

  1. Without Causal Masking
  2. With Causal Masking
  3. Implementation of Causal Masking
  4. The Causal Mask Matrix

The article lives on outcomeschool.com. Read it there, then come back: the tutor in the margin has read it and will answer questions, and the questions below check what stayed.

Before you go

In one sentence, what was this chapter about?

From memory, without scrolling up. Writing it is what makes it yours; the grade is only to show you what you had.

How sure?