Inner Products and Orthogonal Matrices
How does attention decide what to "attend" to?
Vishnu Boddeti
Example 1
Dot products become normalized weights that decide which token information reaches the next representation.
Example 2
Orthogonal coordinates turn inner-product geometry into a practical control mechanism: one steering direction should have zero component along protected directions.
Example 3
Cosine similarity ignores vector magnitude and compares semantic direction in the learned space.
Example 4
Semantic closeness is not permission; retrieval must enforce access control before memories enter the model context.
Each scenario hides a mathematical structure from this lecture. Identify the structure, justify it, and work through the resulting problem.
A probe finds a unit direction $b$ associated with an unwanted attribute in an embedding. You want to remove that attribute before retrieval while disturbing the original vector as little as possible.
$x=(2,1,3)^\top$ and $b=(1,1,0)^\top/\sqrt2$.
A frozen representation lets a linear head predict only combinations of two feature templates. The desired target sits outside that plane, so exact fitting is impossible. What is the closest prediction the head can make?
$u_1=(1,0,1)^\top$, $u_2=(0,1,1)^\top$, and target $y=(2,1,0)^\top$.
A privacy layer rotates every query and database embedding before retrieval. The results should look scrambled in coordinates but produce exactly the same neighbors. What must be true of the rotation matrix?
The transformed embedding is $x'=Qx$ for a square real matrix $Q$.