Isotropic Spaces and HDC
This is a quick overview that I wanted to write to understand the types of feature spaces that Hyperdimensional Computing models learn. This all boils down to the idea that HDC models (mostly their projections) need uniform feature spaces, and more complex loss functions and architectures that are popular in modern AI/ML work learn feature representations that are too contextual, leading to collapse when applied to a standard HDC model.
This will cover the background necessary for the analysis, a demonstration of why HDC needs the structure that anisotropic spaces have, and also a quick overview of some theoretical results that show that CNNs learn isotropic spaces (which is why they work so well with HDC) and that transformers learn anisotropic spaces (which is why the don’t work with HDC).
What are Isotropic and Anisotropic Spaces
Before we get into the analysis itself, we need to define the different types of feature spaces that we will be talking about.
At a high level, the isotropy of a feature space describes how much variance is distributed across its dimension. Isotropic Spaces are directionally uniform. If you map the feature vectors into a high-dimensional space, they form a roughly symmetrical hypersphere, meaning no single direction holds significantly more information (variance) than any other. Anisotropic spaces are directionally skewed. The data collapses into a hyperellipsoid or a narrow cone, meaning a few dominant directions capture almost all the variance, rendering the remaining dimensions effectively useless.
Formally, we define these spaces through the lens of their covariance structure. Let be a random vector representing a feature embedding, assuming it is mean-centered such that . The geometry of the space is governed by its covariance matrix . Since is symmetric and positive semi-definite, it admits an eigendecomposition , where contains the eigenvalues sorted such that .
A space is perfectly isotropic if its covariance matrix is proportional to the identity matrix, that is if , meaning (every orthogonal basis vector contributes equally to the total variance). A space is anisotropic if the spectrum of is skewed. The degree of anisotropy is rigorously quantified by the condition number of the covariance matrix, , or by observing rapid decay in the cumulative spectral energy, meaning for a subspace dimension .
For the upcoming theorems (specifically regarding the JL lemma and deep learning architectures), we need two specific, operational definitions of anisotropy that appear in the literature.
In the context of HDC and the Johnson-Lindenstrauss Lemma, the robustness of random projections depends on the data not occupying a degenerate lower-dimensional subspace. This is measured via effective dimensionality defined below.
For a perfectly isotropic space, . As the space becomes increasingly anisotropic (e.g. as the domainant eigenvalue ), . The Johnson-Lindenstrauss lemma’s distance-preserving bounds degrade heavily as drops relative to (as will be formalized later).
In the context of representation degradation in Transformers, anisotropy is most rigorously evaluated by the expectation of cosine similarity between independent feature vectors. If we draw two independent representations and from the dataset, we measure this as shown below.
In a fully isotropic space, orthogonal directions dominate in high dimensions, and this expectation strictly approaches . In an anisotropic space, the mean vector shifts away from the origin and representations cluster into a narrow cone, causing . This specific formulation is what proves fatal when piping Transformer outputs into HDC models (as will be formalized later).
Why Hyperdimensional Computing needs Isotropic Feature Spaces
Hyperdimensional Computing relies on random projections to map data into a high-dimensional space, typically . The theoretical justification for why this random mapping preserves semantic information lies in the Johnson-Lindenstrauss Lemma. The JL lemma states that for any set of points , and for any , there exists a linear mapping (where ) such that all pairwise Euclidean distances are preserved within a factor of , formalized as follows.
In practice, is implemented as a random projection matrix where entries are sampled from an isotropic distribution (e.g. ).
The JL lemma guarantees that relative distances are preserved, but it makes no guarantees about the absolute scale of those distances relative to the noise floor of the system, which is where anisotropy breaks HDC. In an anisotropic space, the effective dimensionality . The dataset is dominated by a principle component vector , meaning any two distinct feature vectors and can be decomposed into the large shared component and a tiny orthogonal signal component, formalized below where .
Because the random projection is linear, projecting these vectors yields the following results.
While the JL lemma technically preserves the tiny distance , the representations and are overwhelmingly dominated by the shared vector, so their cosine similarity in the projected space approaches .
This geometric scale is fatal for HDC because HDC models do not just operate on continuous random projections, but instead also heavily rely on low-precision quantizations (which will be bipolarization here) to achieve computational efficiency. The standard HDC encoding step applies a sign function to the projection.
Because , the sign of the summation is almost entirely determined by . The distinguishing signal acts as negligible noise that fails to flip the sign boundary. Because HDC lacks backpropagation to adjust and “learn” to scale up the minor distinguishing features, the model is fundamentally blind to them. Isotropic spaces are strictly required by definition to have no single dimension dominate the pre-quantization projection, leading to robust feature spaces that work under HDC pipelines.
Convolutional Neural Networks learn Isotropic Features
The paper The Singular Values of Convolutional Layers provides a rigorous framework showing that the preservation of isotropy in Convolutional Neural Networks is a direct consequence of their architectural inductive biases. Specifically, the weight-sharing mechanism and the constraint of local receptive fields prevent the representation collapse observed in global attention mechanisms.
The Convolutional Operator as a Toeplitz Matrix
A convolutional layer can be represented as a linear operator acting on the input feature map . If we consider a 1D convolution with a filter , the operation is equivalent to matrix-vector multiplication , where is a Toeplitz matrix defined by . If we assume circular boundaries (padding), becomes a circulant matrix. A fundamental property of circulant matrices is that they are diagonalized by the Discrete Fourier Transform (DFT) matrix , formalized as follows where is the Fourier transform of the filter , and is the conjugate transpose of .
If the input has a stationary covariance structure diagonalizable by (i.e., ), the covariance after linear convolution is exactly
This rigorously proves that the variance is modulated only by the filter’s frequency magnitude , preventing the arbitrary dense mixing that leads to rank collapse in global attention mechanisms. The inductive bias here is translational invariance, meaning the same local, band-limited operation applies regardless of position.
Spectral Stability and Rank Preservation
Theoretical analysis shows that the spectral properties of CNNs avoid anisotropy through two primary mechanisms.
- Filter Localization and Bounded Singular Values: Because the filter has local support (), its Fourier transform cannot be infinitely sharp due to the uncertainty principle of the Fourier transform. Therefore, the singular values of , which are bounded by the maximum frequency magnitude , remain relatively uniform. There is no mathematical mechanism in a local, band-limited filter to push a single singular value to dominate the entire matrix, effectively upper-bounding the condition number and keeping the spectrum of the resulting feature representation flat.
- Avoidance of Global Normalization: In Transformers, the Softmax bottleneck forces the attention distribution to sharpen, eventually concentrating weight on a few dominant tokens, which is the geometric origin of the “coning” effect. In CNNs, there is no global Softmax over the spatial or feature dimensions in the layer operation itself. The interaction is limited strictly to the local neighborhood.
Formally, consider the covariance at layer . In modern deep networks, we must account for the non-linear activation function , meaning the covariance update between neighboring layers can be defined as follows.
For homogeneous activation functions like ReLU (where for ), the non-linearity attenuates the variance by a constant factor but preserves the diagonal dominance of the underlying covariance matrix. Because is a localized, translation-invariant operator, it does not possess the massive singular values that characterize global attention matrices. Consequently, the condition number of does not grow exponentially with depth as it does in Transformers. The variance remains distributed across the spectral components of the image, preserving the effective dimensionality described in the previous section.
Consequences
In summary, the paper confirms that the CNN architecture functions as a stationary kernel. A kernel is stationary if it depends only on the shift between inputs, i.e. . Because convolutions are translationally invariant, the expected dot product between two shifted patches relies purely on their relative distance. This spatial stationarity mathematically guarantees that the feature space does not collapse into a single preferred spatial location or dominant direction. By avoiding the global coupling of features (which invariably introduces bias toward the “most frequent” patterns in the training data) CNNs maintain an isotropic distribution where the signal-to-noise ratio is preserved across the entire dimensionality of the manifold.
Transformers learn Anisotropic Features
While Convolutional Neural Networks preserve isotropy through localized, stationary operations, Transformers are driven by a mechanism that does the exact opposite.
The paper Anisotropy Is Inhernet to Self-Attention in Trasformers provides a rigorous theoretical foundation showing that the representation degeneration problem, often referred to as the “coning effect”, is not an artifact of the specific loss functions or datasets, but a fundamental geometric consequence of the self-attention operator itself.
Self-Attention as a Row-Stochastic Contraction
To understand the geometric collapse, we model the standard self-attention mechanism. Given a sequence of token embeddings , and projection matrices for queries and keys , the attention matrix is computed as follows.
Crucially, the softmax function is applied row-wise. This guarantees that is a strictly positive matrix where every row sums exactly to (meaning ). The output of the attention head is then . Because is a row-stochastic matrix, the operation means that every output token representation is a convex combination of the value vectors. Geometrically, taking convex combinations of a set of points pulls all resulting points strictly inside the convex hull of the original set. Over successive layers, this acts as a low-pass filter or a contraction mapping, causing the pairwise distances between token representations to strictly decrease.
Perron-Frobenius and Directional Collapse
Because the attention matrix has strictly positive entries, the Perron-Frobenius theorem dictates its spectral properties. The matrix has a unique, strictly positive dominant eigenvalue of , associated with the constant eigenvector . All other eigenvalues are strictly less than in absolute value.
When this operator is applied iteratively across the depth of a Transformer, the spectral components associated with the smaller eigenvalues decay exponentially. The representations are inevitably pulled toward the dominant eigenvector. As , the token representations converge to a rank-1 state, formalized below where is a single, dominant contextual vector.
In practice with finite layers, the space doesn’t collapse entirely to rank-1, but the covariance matrix becomes massively skewed, so a single dominant eigenvalue emerges.
The Shifted Mean
This contraction does not pull the representations toward the origin, but rather toward an arbitrary nonzero vector. Modern Transformer MLPs rely on non-negative or one-sided activation functions (e.g., ReLU, GeLU). Because the attention matrix applies a strictly positive convex combination over these activated states (and because standard architectures lack a mechanism to strictly re-center the mean to zero post-attention) the expected value of the embeddings drifts into the positive orthant. Consequently, the mean vector of the embeddings shifts heavily away from the origin ().
When the mean is far from the origin and the variance is iteratively squeezed into a dominant direction by the row-stochastic attention matrix, the feature space forms a narrow cone. Recall the cosine anisotropy formulation from the first section:
As the vectors structurally cluster around the shifted mean vector , the angle between any two independent representations and approaches zero. This mathematical skew causes the expected cosine similarity to approach , effectively destroying the spatial orthogonality.
Consequences
In summary, the transformer’s inductive bias is designed to globally route information and merge contexts, which mathematically necessitates a highly anisotropic space (). If these skewed representations are passed into an HDC random projection matrix, the guarantees from the JL lemma fail (as demonstrated in the earlier mathematical example). The distinguishing features of the tokens are completely overwhelmed by the dominant spatial cone, causing catastrophic aliasing when the hypervectors are quantized.
Conclusion
Hyperdimensional Computing is not fundamentally incompatible with modern deep learning, but it is geometrically rigid. By understanding the spectral properties of the architectures we use, leveraging the natural stationarity of CNNs, or explicitly correcting the row-stochastic collapse of Transformers, we can design hybrid models that capitalize on both deep contextual understanding and highly efficient, robust symbolic reasoning.