HelloAI glossary

Masked attention

Explain it for

Attention in the decoder where each word may only score against the words before it; later words get a score that becomes zero after softmax. This forces the model to predict each token using only earlier ones, never future ones, which is what makes left-to-right text generation work.

In the clinic

A decision support tool displays a treatment recommendation followed by a paragraph of rationale, and the vendor confirms the model generates them in that order. Generation runs left to right, with each new word drawing only on the words before it, so the rationale was produced after the recommendation and could not have shaped it. Read it as an account written to fit the answer and check each of its claims against the chart. For any similar tool, ask in what order the text is generated, since the screen layout may differ.

Go beyond the definition

Terms like this come up in real clinical scenarios across the HelloAI courses: bite-sized modules with verifiable certificates. An account takes one minute, no password needed.

Sign in →
See all terms →Still unclear? Ask the team →
What is Masked attention? | HelloAI Glossary