📞 0339-0387701 (WhatsApp) Contact

« Back to Data Science & AI (NCCIA)

What is the difference between self-attention and cross-attention?

A. Cross-attention is only for training
B. Self-attention is within one sequence, cross-attention is between two sequences such as decoder and encoder ✅
C. They are the same thing
D. Self-attention uses images, cross-attention uses text

Correct Answer: B. Self-attention is within one sequence, cross-attention is between two sequences such as decoder and encoder

Explanation

Self-attention relates tokens in the same input; cross-attention relates output to a separate source.