Quiz Space

Deep Learning · End Term · 31 Aug 2025 · May 2025 term · Set QIC1

Question 5: Scaled Dot-Product Attention You are given a simple trans…

Question 5

+3 marksNumerical answer

Scaled Dot-Product Attention

You are given a simple transformer attention setup with the following configuration:

  • Embedding dimension: dmodel=2d_{\text{model}} = 2
  • Input sequence (sequence length = 2, each column vector in R2\mathbb{R}^2):

X=[1110]X = \begin{bmatrix} 1 & 1 \\ 1 & 0 \end{bmatrix}

  • Dimension of queries and keys: dk=2d_k = 2
  • Projection matrices:

WQ=WK=[2−11−1],WV=[0112]W_Q = W_K = \begin{bmatrix} 2 & -1 \\ 1 & -1 \end{bmatrix}, \quad W_V = \begin{bmatrix} 0 & 1 \\ 1 & 2 \end{bmatrix}

Scaled Dot-Product Attention:

Scaled Dot-Product Attention(Q,K,V)=softmax(QTKdk)VT\text{Scaled Dot-Product Attention}(Q, K, V) = \text{softmax}\left(\frac{Q^T K}{\sqrt{d_k}}\right) V^T

Based on the above data, answer the given subquestions.

Show answer

Correct answer: 10

Question 5 of 19 in the IIT Madras BS Deep Learning (Deep Learning) End Term paper sat on 31 Aug 2025, in the May 2025 term (IIT M IMPROVEMENT FN EXAM QIC1 31 Aug 2025). It carries 3 marks.

More questions from this paper

  1. Q1Figure question
  2. Q2Based on the two statements provided choose the correct option?\ Statement 1: Optimization’s primary goal is to reduce …
  3. Q3Figure question
  4. Q4Consider a feedforward neural network with one hidden layer trained using backpropagation for a binary classification t…
  5. Q6Scaled Dot-Product Attention You are given a simple transformer attention setup with the following configuration: Embed…
  6. Q7Scaled Dot-Product Attention You are given a simple transformer attention setup with the following configuration: Embed…
  7. Q8Consider an image X of size 4 \times 4, and a true label y = 3. The image is passed through a convolutional neural netw…
  8. Q9Consider an image X of size 4 \times 4, and a true label y = 3. The image is passed through a convolutional neural netw…
  9. Q10Consider an image X of size 4 \times 4, and a true label y = 3. The image is passed through a convolutional neural netw…
  10. Q11Consider a CBOW model for learning word embeddings. The vocabulary is made up of three words, {good, bad, ugly}. W and …
  11. Q12Consider a CBOW model for learning word embeddings. The vocabulary is made up of three words, {good, bad, ugly}. W and …
  12. Q13Consider a CBOW model for learning word embeddings. The vocabulary is made up of three words, {good, bad, ugly}. W and …
  13. Q14Based on the above data, answer the given subquestions. Find s1.
  14. Q15Based on the above data, answer the given subquestions. Find s2.
  15. Q16Based on the above data, answer the given subquestions.
  16. Q17Based on the above data, answer the given subquestions.
  17. Q18Based on the above data, answer the given subquestions.
  18. Q19Based on the above data, answer the given subquestions.