Vector Spaces, Basis, Direct Sum
Where do embeddings actually live?
Vishnu Boddeti
Example 1
Self-attention makes a token representation depend on the whole sequence, so geometry can encode word sense and use.
Example 2
The projector aligns dimensions; token type and position retain provenance while cross-attention learns useful correspondences.
Example 3
Activation steering treats behavior as a manipulable direction, but the intervention can also change unrelated capabilities.
Example 4
Typed state supports attribution, permission checks, and recovery when a tool result is stale or incorrect.
Each scenario hides a mathematical structure from this lecture. Identify the structure, justify your choice, and then solve the resulting problem.
A vision-language model emits a 2-coordinate text representation and a 3-coordinate image representation. The fusion layer stores both without mixing their coordinates so that either modality can be recovered exactly from the fused vector.
Text features live in $U=\mathbb{R}^2$ and image features in $W=\mathbb{R}^3$. A fused representation is written $(u_1,u_2,w_1,w_2,w_3)$.
A small adapter proposes three update directions for a frozen layer. Before allocating three trainable coefficients, the team wants to know whether one direction is redundant and whether a requested update can be represented.
$a_1=(1,0,1)$, $a_2=(0,1,1)$, $a_3=(1,1,2)$, and the desired update is $\Delta=(2,1,3)$.
A monitor flags an embedding as novel whenever it lies outside the subspace generated by embeddings from the training population. The alert should depend on geometry, not on whether the vector appeared verbatim in the data.
Training directions are $v_1=(1,0,1,0)$, $v_2=(0,1,0,1)$, and $v_3=(1,1,1,1)$. The new embedding is $q=(2,-1,2,-1)$.