← All parts of this equation

Equation 27 · Part 2 · Locality Is the Whole Game: The Memory Hierarchy and What a Kernel Does Not Read

multiplication

N×NN \times N
multiplication

What this part means

Multiply the quantities on either side.

Its job in the formula

Multiply the quantities on either side.

The passage around this formula

Standard attention forms the score matrix S\mathbf{S} = Q\mathbf{Q}K⊤\mathbf{K}^{\top} , applies a row-wise softmax to obtain P\mathbf{P} , and multiplies by V\mathbf{V} . Both S\mathbf{S} and P\mathbf{P} are N ×\times N , and standard implementations materialise them in main memory, which is quadratic in sequence length [ 1 ] . That materialisation is the problem. It is a large intermediate, it is written and read at least once, and the operations applied to it — masking, softmax, dropout — are exactly the memory-bound kind.

Read this part in the article →

Learn the underlying idea

Multiplication scales one quantity by another. A dot, a cross, or adjacent symbols can indicate a product.

Open the illustrated multiplication: combining factors guide →

Sources cited in the surrounding passage

These citations provide research context; check each source for the exact claim it supports.