Transformer Normalisation Layers and the Independence of Semantic Subspaces
- URL: http://arxiv.org/abs/2406.17837v1
- Date: Tue, 25 Jun 2024 16:16:38 GMT
- Title: Transformer Normalisation Layers and the Independence of Semantic Subspaces
- Abstract summary: We consider a semantic subspace to be any independent subspace of the latent representation that can fully determine an attention distribution.
We show that Pre-Norm, the placement of normalisation layer used by state-of-the-art transformers, violates this ability.
We observe a 1% rate of circuit collapse when the norms are artificially perturbed by $lesssim$10%.
- Score: 17.957364289876548
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Recent works have shown that transformers can solve contextual reasoning tasks by internally executing computational graphs called circuits. Circuits often use attention to logically match information from subspaces of the representation, e.g. using position-in-sequence to identify the previous token. In this work, we consider a semantic subspace to be any independent subspace of the latent representation that can fully determine an attention distribution. We show that Pre-Norm, the placement of normalisation layer used by state-of-the-art transformers, violates this ability unless the model learns a strict representation structure of orthogonal spheres. This is because it causes linear subspaces to interfere through their common normalisation factor. Theoretically, we analyse circuit stability by modelling this interference as random noise on the $L_2$-norms of the query/key/value vectors, predicting a phenomenon of circuit collapse when sparse-attention shifts to a different token. Empirically, we investigate the sensitivity of real-world models trained for mathematical addition, observing a 1% rate of circuit collapse when the norms are artificially perturbed by $\lesssim$10%. We contrast Pre-Norm with QKV-Norm, which places normalisation after the attention head's linear operators. Theoretically this relaxes the representational constraints. Empirically we observe comparable in-distribution but worse out-of-distribution performance.
Related papers
- Tracing distinguishability through transformer processing with stochastic LayerNorm [0.0]
We give representations volume, turning similarity into statistical distinguishability.<n>We realize this idea in pretrained transformers through a light-touch modification to LayerNorm.<n>These results establish distinguishability as a functionally grounded lens on transformer computation.
arXiv Detail & Related papers (2026-08-31T12:57:38Z) - A Spectral Theory of Normalized Corrected GNN Propagation [2.9801823421431854]
We develop a spectral theory for emphnormalized corrected GNN propagation.<n>The central theoretical question is whether this corrected normalized operator preserves class-discnative signal after many propagation layers.<n>We also establish a multi-class partial recovery theorem showing contraction toward class centers for most nodes.
arXiv Detail & Related papers (2026-06-22T16:38:50Z) - Transformers learn factored representations [62.86679034549244]
Transformers pretrained via next token prediction learn to factor their world into parts.<n>We formalize two representational hypotheses: (1) a representation in the product space of all factors, whose dimension grows exponentially with the number of parts.<n>We derive precise predictions about the geometric structure of activations for each, including the number of subspaces, their dimensionality, and the arrangement of context embeddings within them.<n>This provides a principled explanation for why transformers decompose the world into parts, and suggests that interpretable low dimensional structure may persist even in models trained on complex data.
arXiv Detail & Related papers (2026-02-02T17:49:06Z) - Clustering in Deep Stochastic Transformers [10.988655177671255]
Existing theories of deep Transformers with layer normalization typically predict that tokens cluster to a single point.<n>We analyze deep Transformers where noise arises from the random value of value.<n>For two tokens, we prove a phase transition governed by the interaction strength and the token dimension.
arXiv Detail & Related papers (2026-01-29T16:28:13Z) - TensorLens: End-to-End Transformer Analysis via High-Order Attention Tensors [53.891337639229285]
We introduce attentionLens, a novel formulation that captures the entire transformer as a single, input-dependent linear operator expressed through a high-order attention-interaction connection.<n>Our experiments demonstrate that the attention tensor can serve as a powerful foundation for developing tools aimed at interpretability and model understanding.
arXiv Detail & Related papers (2026-01-25T19:21:25Z) - PRISM: Deriving the Transformer as a Signal-Denoising Operator via Maximum Coding Rate Reduction [0.0]
We propose Prism, a white-box attention-based architecture for deep learning.<n>We show that Prism spontaneously specializes its attention heads into spectrally distinct regimes.<n>Our results suggest that interpretability and performance are not a trade-off, but can be unified through principled construction.
arXiv Detail & Related papers (2026-01-21T23:52:36Z) - Normalizing Diffusion Kernels with Optimal Transport [4.081238502499229]
We introduce a class of smoothing operators that inherit desirable properties from Laplacians.<n>This construction enables Laplacian-like smoothing and processing of irregular data.<n>We show that the resulting operators approximate heat diffusion but also retain spectral information from the Laplacian itself.
arXiv Detail & Related papers (2025-07-08T16:42:09Z) - Generalized Linear Mode Connectivity for Transformers [87.32299363530996]
A striking phenomenon is linear mode connectivity (LMC), where independently trained models can be connected by low- or zero-loss paths.<n>Prior work has predominantly focused on neuron re-ordering through permutations, but such approaches are limited in scope.<n>We introduce a unified framework that captures four symmetry classes: permutations, semi-permutations, transformations, and general invertible maps.<n>This generalization enables, for the first time, the discovery of low- and zero-barrier linear paths between independently trained Vision Transformers and GPT-2 models.
arXiv Detail & Related papers (2025-06-28T01:46:36Z) - Transformers Are Universally Consistent [14.904264782690639]
We show that Transformers equipped with softmax-based nonlinear attention are uniformly consistent when tasked with executing Least Squares regression.<n>We derive upper bounds on the empirical error which, in the regime, decay at a provable rate of $mathcalO(t-1/2d)$, where $t$ denotes the number of input tokens and $d$ the embedding dimensionality.
arXiv Detail & Related papers (2025-05-30T12:39:26Z) - Two failure modes of deep transformers and how to avoid them: a unified theory of signal propagation at initialisation [8.973965016201822]
Finding the right initialisation for neural networks is crucial to ensure smooth training and good performance.<n>In transformers, the wrong initialisation can lead to one of two failure modes of self-attention layers: rank collapse, where all tokens collapse into similar representations, and entropy collapse, where highly concentrated attention scores lead to instability.<n>Here, we provide an analytical theory of signal propagation through deep transformers with self-attention, layer normalisation, skip connections and gradients.
arXiv Detail & Related papers (2025-05-30T08:18:23Z) - A Unified Perspective on the Dynamics of Deep Transformers [24.094975798576783]
We study the evolution of data anisotropy through a deep Transformer.
We highlight a clustering phenomenon that parallels previous results in the non-normalized discrete case.
arXiv Detail & Related papers (2025-01-30T13:04:54Z) - On the phase diagram of extensive-rank symmetric matrix denoising beyond rotational invariance [5.058205542605482]
We make progress towards the understanding of matrix denoising when the hidden signal is a factored matrix $XXintercal$ that is not rotationally invariant.
We argue that it is only beyond the transition that factorisation, i.e., estimating $X$ itself, becomes possible up to sign and permutation universality.
We also argue that it is only beyond the transition that factorisation, i.e., estimating $X$ itself, becomes possible up to sign and permutation universality.
arXiv Detail & Related papers (2024-11-04T10:50:37Z) - Refined Risk Bounds for Unbounded Losses via Transductive Priors [58.967816314671296]
We revisit the sequential variants of linear regression with the squared loss, classification problems with hinge loss, and logistic regression.
Our key tools are based on the exponential weights algorithm with carefully chosen transductive priors.
arXiv Detail & Related papers (2024-10-29T00:01:04Z) - Unveiling Induction Heads: Provable Training Dynamics and Feature Learning in Transformers [54.20763128054692]
We study how a two-attention-layer transformer is trained to perform ICL on $n$-gram Markov chain data.
We prove that the gradient flow with respect to a cross-entropy ICL loss converges to a limiting model.
arXiv Detail & Related papers (2024-09-09T18:10:26Z) - Operator space fragmentation in perturbed Floquet-Clifford circuits [0.0]
Floquet quantum circuits are able to realise a wide range of non-equilibrium quantum states.
We investigate the stability of operator localisation and emergence of chaos in random Floquet-Clifford circuits.
arXiv Detail & Related papers (2024-08-02T19:18:30Z) - A metaplectic perspective of uncertainty principles in the Linear Canonical Transform domain [0.0]
We derive Heisenberg uncertainty principles for pairs of Linear Canonical Transforms of a given function.
We also propose a new quadratic phase-space distribution, which represents a signal along two intermediate directions in the time-frequency plane.
arXiv Detail & Related papers (2024-05-17T09:26:48Z) - Uniformly Decaying Subspaces for Error Mitigated Quantum Computation [2.434659102843556]
We present a general condition to obtain subspaces that decay uniformly in a system governed by the Lindblad master equation.
The expectation values of dynamics encoded in such subspaces are unbiased estimators of noise-free expectation values.
We show that such subspaces can be used to eliminate bias up to first order variations in the decay rates without requiring full knowledge of noise.
arXiv Detail & Related papers (2024-02-29T22:25:19Z) - Transformers as Support Vector Machines [54.642793677472724]
We establish a formal equivalence between the optimization geometry of self-attention and a hard-margin SVM problem.
We characterize the implicit bias of 1-layer transformers optimized with gradient descent.
We believe these findings inspire the interpretation of transformers as a hierarchy of SVMs that separates and selects optimal tokens.
arXiv Detail & Related papers (2023-08-31T17:57:50Z) - Outliers Dimensions that Disrupt Transformers Are Driven by Frequency [79.22656609637525]
We show that the token frequency contributes to the outlier phenomenon.
We also find that, surprisingly, the outlier effect on the model performance varies by layer, and that variance is also related to the correlation between outlier magnitude and encoded token frequency.
arXiv Detail & Related papers (2022-05-23T15:19:09Z) - Unsupervised Disentanglement with Tensor Product Representations on the
Torus [78.6315881294899]
Current methods for learning representations with auto-encoders almost exclusively employ vectors as the latent representations.
In this work, we propose to employ a tensor product structure for this purpose.
In contrast to the conventional variations methods, which are targeted toward normally distributed features, the latent space in our representation is distributed uniformly over a set of unit circles.
arXiv Detail & Related papers (2022-02-13T04:23:12Z) - Causal Expectation-Maximisation [70.45873402967297]
We show that causal inference is NP-hard even in models characterised by polytree-shaped graphs.
We introduce the causal EM algorithm to reconstruct the uncertainty about the latent variables from data about categorical manifest variables.
We argue that there appears to be an unnoticed limitation to the trending idea that counterfactual bounds can often be computed without knowledge of the structural equations.
arXiv Detail & Related papers (2020-11-04T10:25:13Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.