The Saturation Trap

Why is the raw dot product QK⊤QK^\top divided by d\sqrt{d} (dd being the key/query dimension) before applying softmax?

A

It reduces the number of floating point operations needed to compute the attention scores

B

Without scaling, dot products of high-dimensional random vectors have variance that grows with dd, producing large-magnitude logits that push softmax into saturated regions with near-zero gradients

C

It converts the dot product into a proper probability distribution so the softmax output sums to 1

D

It compensates for the fact that QQ and KK are computed with different weight matrices than VV