AI Glossary / AI and machine learning / Intermediate
Whitening transformation
Definition
A whitening transformation linearly transforms centered numerical data so that its covariance matrix becomes the identity matrix, when the required covariance is well defined and nonsingular. The transformed variables have unit variance and zero pairwise covariance.
What it means
Features often have different scales and move together. Whitening removes this second-order structure by combining a change of directions with rescaling. The resulting cloud is sometimes described as spherical because its covariance has equal scale in every direction.
Whitening does not generally make variables statistically independent, turn data into a Gaussian distribution or eliminate all useful relationships. It also differs from standardizing each feature separately: standardization adjusts individual scales but usually leaves correlations between features intact.
How it works
First estimate the mean and covariance using the training data. Subtract the mean. If the covariance has an eigendecomposition with positive eigenvalues, rotate into its eigenvector directions and divide each coordinate by the square root of its corresponding eigenvalue. This produces PCA-whitened coordinates.
Other transformations can also whiten the same data. ZCA whitening rotates the scaled coordinates back toward the original coordinate system. There is rotational freedom: multiple transformations can produce identity covariance while preserving different relationships to the original variables.
Very small eigenvalues can amplify noise when inverted. Singular covariance prevents full-dimensional ordinary whitening, so a method may reduce dimension or regularize. Fit the transformation on training data and apply the same fitted mapping to validation and future data to avoid leaking evaluation information.
Three practical examples
- Signal processing: Engineers remove correlations among recorded channels before applying a method whose assumptions or optimization benefit from decorrelated inputs.
- Statistical modeling: A researcher compares a model's behavior with and without whitening, checking whether rescaling low-variance directions amplifies measurement noise.
- Feature analysis: A team visualizes a correlated two-variable dataset before and after transformation to understand the distinction between separate standardization and joint decorrelation.
Think of it this way
Think of an elongated, tilted cloud of points being rotated and stretched into a rounder cloud. That describes its covariance geometry, not every detail of its shape. A curved or multimodal distribution can remain curved or multimodal even after its second-order statistics have been whitened.
Worked example
Suppose two already centered, uncorrelated variables have covariance matrix with diagonal entries 4 and 9 and zero off-diagonal entries. Dividing the first variable by 2 and the second by 3 gives variances 4/4=1 and 9/9=1, while their covariance remains zero.
For a particular centered observation (4, 3), the transformed coordinates are (2, 1). In this special uncorrelated example, separate rescaling is sufficient.
If the original variables were correlated, that same rescaling would generally leave a nonzero covariance. A rotation or other mixing transformation would be needed. The calculation uses a known covariance for clarity; estimated covariance and regularization introduce additional practical considerations.
Illustrative case study
Fictional case: Sensorline receives measurements from several channels that respond to the same environmental changes. Its analyst tests whitening before an anomaly detector.
The detector begins flagging tiny fluctuations in a nearly constant channel because its low-variance direction was heavily amplified. The team inspects eigenvalues, applies a justified regularization choice and compares held-out alert behavior with the original feature representation. It documents the fitted mean and transformation with the model. This invented case demonstrates a failure mode rather than an automatic benefit.
Common misconceptions and mistakes
Zero correlation is weaker than independence except under additional conditions, such as a jointly Gaussian distribution. Whitening cannot be used as general proof that features no longer depend on one another.
It is also not always beneficial. Variance differences may carry useful information, and noisy low-variance directions can become influential after scaling. Do not compute a transformation using the full dataset before splitting for evaluation. Finally, PCA dimension reduction and PCA whitening are different operations: one discards directions, while the other rescales retained directions.
Business use
Businesses may encounter whitening inside signal-analysis, image-processing or statistical pipelines. The practical question is whether it improves the intended task under realistic evaluation, not whether identity covariance looks mathematically tidy.
Keep the transformation versioned with the model, including feature order, mean, covariance estimate and regularization settings. Monitor whether new data differs enough that the old mapping becomes unsuitable. When explaining results, remember that transformed coordinates may mix original variables, making direct feature interpretation less straightforward.
People also ask
Is whitening the same as standard scaling?
No. Standard scaling usually treats each feature separately, while whitening also addresses cross-feature covariance.
Does whitening guarantee independence?
No. It removes pairwise covariance, not every form of statistical dependence.
What happens if covariance has a zero eigenvalue?
Ordinary full-dimensional inverse scaling is undefined; dimensionality reduction or another carefully specified treatment is needed.
Check your understanding
Two features each have variance one but correlation 0.8. Are they already whitened?
Answer: No. Their covariance matrix still has nonzero off-diagonal entries, so it is not the identity matrix.
Related terms
- Covariance matrix
- Standardization
- Principal component analysis
- Regularization
- Data leakage
- decorrelation
- ZCA whitening
- eigendecomposition
Learn next
Generate or sketch a tilted two-dimensional point cloud. Compare standardization with PCA whitening and calculate both covariance matrices. Then add a nearly redundant feature and inspect the small eigenvalue. Study how regularization changes the transformation and why the fitted mapping belongs inside the training pipeline.
More in AI and machine learning
- Weighted majority algorithm (machine learning) - The weighted majority algorithm combines predictions from several experts by assigning each a weight, predicting with the weighted vote and reducing the...
- Weighted sum - A weighted sum adds values after multiplying each by an associated weight.
- Wetware computer - A wetware computer uses living biological material as part of its information-processing system.
- Winner-take-all in action selection - Winner-take-all in action selection is a decision mechanism in which competing action candidates are compared and one is selected to control behavior.
- Winnow (algorithm) - Winnow is a family of online linear-threshold learning algorithms that adjust feature weights multiplicatively after prediction errors.
- Wisdom of the crowd - Wisdom of the crowd is the idea that combining judgments from multiple contributors can produce a useful collective estimate.
Sources
Kessy, Lewin and Strimmer, Optimal whitening and decorrelation: https://arxiv.org/pdf/1512.00809 (introduction, rotational freedom and PCA/ZCA formulas consulted). Published article: https://doi.org/10.1080/00031305.2016.1277159. These passages support identity covariance under the stated positive-definite assumptions; finite-sample and regularized transformations require the qualifications explained above.
Previous: Whitelist Next: Whittle likelihood