Linear Maps, Matrices, Invertibility
What is a neural net layer actually doing to your data?
Vishnu Boddeti
Example 1
The projection itself is linear. Layer normalization, attention softmax, and the MLP activation are separate nonlinear operations.
Example 2
This operation is literally an invertible linear map. A singular W would collapse channel information and break exact reversal and likelihood accounting.
Example 3
The identity branch is linear even though F is generally nonlinear. Separating those two paths avoids incorrectly calling the whole block a linear map.
Example 4
Kernel collisions identify distinctions the router cannot see. Agent evaluations should include collision pairs and low-margin cases, not only average routing accuracy.
Each scenario hides a mathematical structure from this lecture. Identify the structure, justify your choice, and then solve the resulting problem.
A linear encoder compresses three sensor readings into two latent coordinates. The product team claims that the original sensor vector can still be recovered uniquely from every embedding.
$T(x)=Ax$ with $A=\begin{bmatrix}1&0&1\\0&1&1\end{bmatrix}$.
A deployment pipeline applies a learned linear calibration to three logits. A debugging tool sees only calibrated logits and must reconstruct the original vector.
$y=Ax$ where $A=\begin{bmatrix}1&1&0\\0&1&1\\1&0&1\end{bmatrix}$ and the observed output is $y=(3,2,4)^\top$.
Engineers want to fuse preprocessing into the first matrix multiplication. This is valid only when preprocessing respects mixtures and rescaling of examples.
Compare $P_1(x)=2x$, $P_2(x)=x-\mu$ for fixed nonzero $\mu$, and coordinate clipping $P_3(x)_i=\max(-1,\min(1,x_i))$.