Cosine similarity is often treated as a local comparison between one query embedding and one candidate. That interpretation becomes less informative when most vectors occupy a narrow set of directions. Unrelated items can then share a substantial common component, compressing the range of angles that retrieval uses to separate candidates.
This directional concentration is commonly described as embedding anisotropy. It is a property of a vector distribution, not a defect implied by any single similarity score. For developers, the practical issue is that a fixed cosine value has no universal meaning. Its usefulness depends partly on the geometry of the embedding population in which it was produced.
Isotropy is a distribution property
Consider embeddings x_1 ... x_n in d dimensions. If vectors are L2-normalized, each point lies on the unit hypersphere. Normalization fixes magnitude, but it does not make directions uniformly distributed.
A simple diagnostic starts with the mean vector:
mu = (1 / n) * sum_i x_iIf normalized embeddings point in balanced directions, their mean can be close to zero. A large mean norm indicates that many vectors share a directional component. This is only one diagnostic; a small mean does not prove isotropy because concentration can also appear along several opposing or higher-order directions.
The covariance matrix exposes more structure:
C = (1 / n) * sum_i (x_i - mu)(x_i - mu)^TIts eigenvalues describe variance along principal axes. If a small number of eigenvalues dominate, much of the dataset varies inside a restricted subspace. The exact spectrum expected from a useful representation depends on the model, data, and task, so no single eigenvalue ratio is a universal acceptance threshold.
Anisotropy changes the background similarity distribution
A retrieval score is easier to interpret when it is compared with scores produced by unrelated pairs from the same embedding population. If random pairs already have high cosine similarity, a query-candidate score that appears large in isolation may provide little separation from the background.
For normalized vectors a and b:
cos(a, b) = a · bSuppose both contain a shared component c plus item-specific residuals:
a = c + r_a
b = c + r_bThe dot product includes c · c as well as cross terms and r_a · r_b. A strong shared direction can therefore raise similarities across many pairs even when their residual components differ. Normalizing the final vectors does not remove that directional component; it only rescales each complete vector to unit length.
This affects threshold-based systems directly. A cosine cutoff calibrated on one embedding model or corpus can become inappropriate after the representation distribution changes. The same numerical threshold can correspond to a different false-match rate when the background score distribution shifts.
Global concentration and hubness are related but distinct
Directional concentration can contribute to uneven nearest-neighbor behavior, but anisotropy and hubness are not interchangeable diagnoses. Anisotropy describes how the vector population occupies directions or subspaces. Hubness describes candidates that occur unusually often in nearest-neighbor lists.
A dataset can show dominant directions without a small set of candidates becoming extreme hubs. It can also exhibit hubness for reasons that are not captured by a single global anisotropy statistic. Corpus density, local geometry, duplicate content, query distribution, and dimensional effects can all alter neighbor frequency.
That distinction changes what should be measured. Mean vectors, covariance spectra, and random-pair cosine distributions characterize global geometry. Neighbor occurrence counts characterize retrieval exposure. Treating either measurement as a substitute for the other can hide the actual failure mode.
Centering changes every cosine comparison
Subtracting the dataset mean is a common geometric transformation:
x'_i = x_i - muIf cosine similarity is used afterward, transformed vectors are typically normalized again before comparison. This can reduce a shared mean direction, but it also changes every pairwise angle. The operation is therefore not a neutral cleanup step.
The mean must also come from a defined reference population. A mean estimated from one corpus can differ from a mean estimated after the corpus composition changes. Applying a query transformation based on one population while candidate vectors use another transformation state creates an inconsistent retrieval space.
Centering can be useful when evaluation shows that the removed component acts as nuisance variation for the target task. It can also discard signal when the global direction carries information relevant to retrieval. The transformation should be treated as part of the representation pipeline, versioned with the embedding model and evaluated with the same relevance criteria as any other representation change.
Removing principal directions is a stronger intervention
Another approach projects vectors away from one or more dominant principal components. If u is a unit principal direction, removing its component from vector x gives:
x' = x - (x · u)uRemoving several directions repeats the projection for an orthonormal set of selected components. This directly suppresses variance along those axes and can make the remaining distribution less concentrated according to the chosen statistic.
The cost is equally direct: information represented along those axes is removed. A dominant component is not automatically noise. It may encode frequency, style, domain, syntax, or semantic structure that matters to the application. Variance magnitude alone cannot identify nuisance information.
The number of removed directions also cannot be selected from dimensionality alone. It is a task-dependent model choice. Retrieval evaluation should compare the unmodified representation with each candidate transformation while keeping the corpus, query set, similarity metric, and relevance judgments fixed.
Whitening changes scale as well as direction
Whitening goes beyond centering or dropping a few components. Given an eigendecomposition of the covariance matrix,
C = U Lambda U^Ta whitening transform can rescale centered coordinates using inverse square roots of the eigenvalues:
z = Lambda^(-1/2) U^T (x - mu)In the idealized full-rank case, this produces identity covariance on the population used to estimate the transform. In practice, very small eigenvalues make inverse scaling numerically sensitive, so implementations commonly need a regularization or truncation rule.
Whitening changes relative distances because low-variance directions receive more scale while high-variance directions receive less. That can expose distinctions hidden by dominant axes, but it can also amplify noise or representation dimensions that have little task value. Identity covariance is a geometric target, not a retrieval objective.
Any whitening parameters must remain identical for indexed candidates and incoming queries. Changing the fitted mean, eigenvectors, eigenvalue handling, or normalization procedure creates a new representation space and normally requires candidate vectors to be transformed again.
Measure geometry on the population that serves queries
Anisotropy statistics depend on the sample used to compute them. A mixed corpus spanning several domains can have a different mean and covariance spectrum from each domain considered separately. Query embeddings can also occupy a distribution different from stored document embeddings, especially in systems that use asymmetric encoders or distinct query and document prompts.
Useful diagnostics therefore keep population boundaries explicit. Corpus geometry answers how indexed vectors are arranged. Query geometry answers how incoming requests are arranged. Cross-similarity distributions show how those two populations interact.
A small set of measurements can reveal different aspects without pretending to produce a universal score: mean-vector norm, covariance eigenvalue spectrum, random-pair cosine distribution, and relevant-versus-nonrelevant score distributions. The final pair is especially significant because retrieval quality depends on separation tied to the application’s relevance definition, not on isotropy by itself.
Anisotropy is most actionable when it explains a concrete retrieval observation, such as compressed cosine scores or unstable thresholds. Geometry transformations can change those symptoms, but they also redefine the representation space. The useful boundary is therefore empirical: measure the concentration, change one representation assumption at a time, and keep the change only when task-level retrieval evidence supports it.