Whitening changes meanings of embedding norms in foundation models

Whitening Inverts the Hierarchy: What the Norm of a Whitened Embedding Measures

Machine LearningArtificial Intelligence

Summary

When analyzing AI models, people often transform data embeddings through a process called whitening and measure their size to guess how unusual the data is. The authors show that this size measure doesn’t match a simple bell curve model as many assumed and actually focuses on parts that mostly contain noise. Instead of indicating probability, this transformed size better reflects how different or atypical a data point is compared to usual samples. This insight explains why the measure works well to find unusual data but can mislead when used as a direct probability estimate.

What this means in practice

  • For machine learning engineers: Evaluate sample atypicality using whitened embedding norms for improved anomaly detection across different foundation models.
  • For data quality teams: Use whitened norm measures to rank and detect outliers in large datasets without retraining models or complex density estimation.

Authors

Mohammed Ahnouch, Lotfi Elaachak

Abstract

Whitening a foundation-model embedding and using its squared norm as a training-free likelihood surrogate is motivated by the observation that whitened coordinates often appear approximately standard normal. We show that this observation follows from the projection central limit theorem and therefore does not imply a Gaussian joint distribution. Across multiple encoders and three training objectives, we find systematic over-dispersion of the whitened radius relative to the Gaussian reference, including against distributional clones with identical mean and covariance. We further show that the commonly reported agreement between empirical and theoretical norm statistics is an algebraic consequence of in-sample whitening and does not constitute evidence for Gaussianity. We identify the mechanism behind this behavior: whitening reverses the encoder's spectral hierarchy, shifting the contribution to the squared norm toward near-degenerate directions that encode predominantly noise. In these directions, the dominant variability is governed by a single input-dependent scale. We estimate this scale from two moments and use it to predict, without additional free parameters, the cross-dependence between disjoint spectral halves. These results indicate that the squared whitened norm is better interpreted as a Mahalanobis measure of semantic atypicality than as a log-likelihood. This interpretation explains both its practical effectiveness and its calibration failures: the statistic can rank and detect atypical samples consistently with nonparametric density estimates and across encoders trained with different objectives, while Gaussian tail thresholds can be inaccurate by orders of magnitude. etc.