Skip to content
ml-recall

#distance-attention

1 question from Attention & Transformers

Timed test

1 question · 1 min · score and explanations at the end

Take a test
Q 1 / 1Score 0 / 0

Question 1: Single choice

mediumAI-checkedAttention & Transformers

You implement distance-based attention with the score a(q,ki)=−12∥q−ki∥2=q⊤ki−12∥ki∥2−12∥q∥2a(\mathbf{q}, \mathbf{k}_i) = -\tfrac12\lVert\mathbf{q} - \mathbf{k}_i\rVert^2 = \mathbf{q}^\top\mathbf{k}_i - \tfrac12\lVert\mathbf{k}_i\rVert^2 - \tfrac12\lVert\mathbf{q}\rVert^2, followed by a softmax over the keys. Which term can you drop without changing any attention weight?

Choose one option