Brain-Score 91/100 TECH Machine Learning Studio · 9:57

A Dive Into Multihead Attention, Self-Attention and Cross-Attention

3-Second Blueprint (English)

  1. Scaled dot-product attention normalizes QK^T by sqrt(d_k) and masks upper-triangular future tokens with -infinity before softmax.
  2. Multi-head attention projects inputs into h smaller d/h subspaces in parallel, concatenates all heads, and applies output matrix W_O.
  3. Self-attention derives Q, K, and V from one sequence X, whereas cross-attention extracts Q from target Y and K, V from source X.
Multi-Head AttentionCausal Token MaskingSelf-AttentionCross-Attention

3-Sekunden-Fazit (Deutsch)

  1. Scaled Dot-Product Attention skaliert QK^T mit 1/Wurzel(d_k) und maskiert künftige Token im oberen Dreieck vor Softmax mit -Unendlich.
  2. Multi-Head Attention projiziert Eingaben parallel in h kleinere d/h-Unterräume, konkateniert alle Köpfe und multipliziert mit Matrix W_O.
  3. Self-Attention bildet Q, K und V aus derselben Sequenz X, während Cross-Attention Q aus Zielsequenz Y und K, V aus Quellsequenz X zieht.
Multi-Head AttentionKausale MaskierungSelf-AttentionCross-Attention

Note / Hinweis: Blueprints are AI-generated educational summaries (0% Politics · 0% Religion · 0% Brainrot) and do not constitute medical, legal, or financial advice. / KI-generierte Zusammenfassung zu Bildungszwecken – ersetzt keine medizinische, rechtliche oder finanzielle Fachberatung.