cs.LGMay 16, 2026

The Geometry of Projection Heads: Conditioning, Invariance, and Collapse

Authors: Faris Chaudhry

Abstract

We develop a geometric theory of projection heads in self-supervised learning by modeling the head as a trainable Riemannian metric on the backbone representation manifold. We show that linear heads perform implicit subspace whitening, while nonlinear heads adapt local metrics to satisfy the specific topological constraints of the loss, with head depth empirically dictating this capacity. Analyzing dimensional collapse, we prove that smooth nonlinear heads natively induce negative eigenvalues in the Hessian at collapsed equilibria, making them unstable. We empirically validate this by continuously tracking the optimization geometry during training, which reveals that smooth activations like Swish can generate explicit negative curvature to escape collapse, whereas linear and ReLU heads under continuous-time gradient flow cannot, relying instead on discrete-time optimization dynamics and BatchNorm. Finally, we geometrically characterize how metric degeneracy governs the information-invariance trade-off, explaining why the head must be discarded. Evaluated across contrastive and decorrelation-based objectives on foundation models, our results demonstrate that the projection head acts as a universal geometric buffer, decoupling the semantic backbone from the rigid, destructive constraints of the pretraining objective.

Explore similar work

Aug 23, 2026cs.LG

Toward a First-Principles Update Geometry for the Language-Model Head

Muon motivates designing optimizer geometry around the function of each parameter block and uses the spectral norm for hidden linear layers. For the language-model head, the spectral norm is not a faithful measure of functional change. Softmax removes shared logit shifts, whereas the spectral norm can assign arbitrarily large size to updates that change no output probability. We therefore treat the LM head and softmax as one module and derive an update geometry for their composition. Hilbert's projective distance respects this invariance as it measures the largest change in pairwise log odds. For an update SS with token rows sis_i^\top, we show that the largest Hilbert distance over h2H\left\lVert h\right\rVert_2\leq H is exactly HD(S)H D(S), where D(S)=maxi<jsisj2D(S)=\max_{i<j}\left\lVert s_i - s_j\right\rVert_2 is the Euclidean row diameter. This diameter replaces the spectral norm in the resulting Muon-style steepest descent problem. An exact solution is possible, but its direct formulation contains one dd-dimensional vector variable for every token pair. For a vocabulary size of approximately 5050k, this means more than one billion token pairs, making the calculation impractical at every training step. We instead impose a stronger common-ball constraint and derive projected RowNorm as an O(Vd)O(Vd) solution. For the exact RowNorm oracle, we prove that its first-order decrease is at least 1/21/\sqrt{2} of the exact diameter-constrained optimum. With Muon on the backbone, experiments across three seeds at 190M, 380M, and 640M parameters show that RowNorm reduces mean final step diameters and empirical Hilbert RMS perturbations by factors of 4545--6060 and 1212--1515, respectively, with only a 0.00570.0057--0.01530.0153 increase in mean final validation loss.
Aditya Somasundaram, Charles Guille-Escuret, Alexander Moreno +2
Sep 16, 2026cs.LG

Stiefel Attention: When the Geometry of Transformer Projection Matrices Dominates Optimizer Choice---and When It Does Not

The query and key projections \WQ,\WK\WQ,\WK in attention are almost always trained by Euclidean optimizers with no constraint on their geometry. We constrain them to the Stiefel manifold and optimize them there with a Riemannian Adam that carries one scalar second moment per frame, caps its step by a trust region, and retracts polarly. Four propositions prove this update is steepest descent in the embedded metric, independent of gradient scale, well conditioned, and exactly O(d)\mathrm{O}(d)-equivariant, each certified numerically in \texttt{float64}. A fifth supplies the mechanism: weight decay has \emph{identically zero} Riemannian gradient on \St(d,r)\St(d,r), since W=WIrW = W I_r lies in the normal space, so the learned attention geometry survives the collapse cycles that decay drives through the rest of the model. On modular arithmetic grokking, a single run holds 97.0%97.0\% validation accuracy at epoch 20,000 against the baseline's 61.1%61.1\%---an unstable endpoint we report as evidence for the mechanism rather than as an effect size. On CIFAR-10 patches the same rule gains +8.98\mathbf{+8.98},pp over 12 paired starts (t=60.6t{=}60.6, 12/1212/12), and the gap widens with data rather than eroding. The step rule earns this: a fixed-step Riemannian update is degree one in the gradient, so it moves 2424--40×40\times less per step than an identically shaped AdamW matrix---its frames barely leave their initialization, and freezing them outright costs only 0.280.28,pp. An ablation credits the whole gain to making the step scale free, and nothing measurable to the projector or to equivariance. A negative result sharpens the account: gauge removal cannot motivate the method, because a direction along which the loss is invariant carries no gradient at all.
Rubén Darío Guerrero
Sep 23, 2026cs.CV

Task-Induced Riemannian Metrics for Vision Transformer Feature Spaces

Methods operating on Vision Transformer (ViT) feature spaces typically rely on Euclidean distance or cosine similarity. This assumes that every direction is equally meaningful, but there is no reason to believe the true task geometry has this property. The task-sensitive geometry of the feature space is given by the pullback metric g(F)=J(F)J(F)g(F) = J(F)^\top J(F), where JJ is the Jacobian of the decoder's output fed to a task-specific distance, with respect to the features. Storing the full gg is infeasible at modern scales, and for dense outputs such as depth maps even forming JJ is impractical. We show that whether a low-rank approximation of this metric can be learned depends on the model-decoder pair, and we characterize this with a matrix-free diagnostic κcap(r)κ_{cap}(r) computable with a low number of Jacobian-vector products. For tractable pairs, we develop the Spectral Pullback Network (SPN), which learns a low-rank version of the metric from randomized power iteration, and we distill it into a 310310K-parameter importance head that predicts token importance directly from the features. When the Jacobian spectrum is too spread out for a low-rank approximation, passing the decoder's input features through a VAE bottleneck can restore tractability. Across DPT, DINOv2, CLIP, and VGGT backbones, κcap(r)κ_{cap}(r) predicts which learned-metric architectures are viable. The importance head reaches Spearman ρ=0.998ρ= 0.998 on DINOv2 CLS, and our geometric token pruning reduces the additional depth error of ToMe-based token selection by 25%25\% on DPT depth at prune ratio 0.50.5, without fine-tuning the ViT. Project page: https://cyberiada.github.io/TaskInducedViTs/
Andrew Bond, Ege Erdem Özlü, Tuna Çimen +4