Figures
Abstract
Statistical methods often make assumptions about independence between the samples or features of a dataset, yet correlation structure is ubiquitous in real data. In statistical genetics, correlation between regression summary statistics due to linkage disequilibrium (LD) between nearby variants complicates downstream analysis. Many methods use LD reference panels to account for this correlation. Whitening transformations comprise a family of methods to remove correlation structure, and are used implicitly by many common models. Here we propose a probabilistic model for data whitening, and propose parameter estimates and efficient algorithms to improve statistical and computational performance. In an application to impute z-statistics from unobserved genetic variants from a genome-wide association study of schizophrenia, the probabilistic whitening transformation, had the lowest mean square error while being up to an order of magnitude faster than other methods. Using this approach, we also identify tandem repeats that explain genetic regulatory signals for disease-relevant genes. Analyses are implemented in our novel open source R packages decorrelate and imputez.
Author summary
Many statistical methods for analysis of regression summary statistics from genome-wide association statistics incorporate linkage disequilibrium matrices from a reference panel. Here, we examine whitening transformations, a general family of linear algebra operations that account for correlation structure. By examining the statistical properties and computational limitations of existing whitening transforms, we propose a novel approach to improve statistical performance and computational efficiency.
Citation: Hoffman GE, Dillard CP, Girdhar K, Roussos P (2026) Fast probabilistic whitening transformation for ultra-high dimensional genetic data. PLoS Genet 22(10): e1012320. https://doi.org/10.1371/journal.pgen.1012320
Editor: Xiang Zhou, Yale University, UNITED STATES OF AMERICA
Received: April 14, 2026; Accepted: September 17, 2026; Published: October 28, 2026
This is an open access article, free of all copyright, and may be freely reproduced, distributed, transmitted, modified, built upon, or otherwise used by anyone for any lawful purpose. The work is made available under the Creative Commons CC0 public domain dedication.
Data Availability: Code implementing the probabilistic whitening transformation with implicit covariance is available in the R package decorrelate from https://cran.r-project.org/package=decorrelate. Documentation is available at https://gabrielhoffman.github.io/decorrelate. Code implementing the imputation of summary statistics is available in the R package imputez available at https://gabrielhoffman.github.io/imputez. R packages have also been deposited at Zenodo: decorrelate https://doi.org/10.5281/zenodo.17426788, imputez https://doi.org/10.5281/zenodo.17426882. Code for simulation and analysis has been deposited at Zenodo https://doi.org/10.5281/zenodo.17427136 and https://doi.org/10.5281/ zenodo.17427128. Times were evaluated using 12 cores on a 48 core Intel Xeon Platinum 8462Y CPU @ 2.8GHz running R v4.3.3 linked to a parallelized Intel Math Kernel Library for linear algebra operations.
Funding: This work was supported by NIA and NINDS grant U24AG087563. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript. No authors received specific salaries from these funders beyond standard research support.
Competing interests: The authors have declared that no competing interests exist.
1 Introduction
Correlation structure is ubiquitous in real world datasets. Yet statistical models often make assumptions about independence between a dataset’s rows or columns that are not satisfied practice. Whitening transformations are a widely used preprocessing step to remove correlation structure in the data before performing other analyses. In general, for a data matrix with n samples and p features, the procedure computes the sample covariance matrix between features,
, and transforms the observed data by post-multiplying by the non-unique whitening matrix
defined using standard linear algebra [1]. Transforming rows instead follows a complementary procedure.
Whitening can be used explicitly in preprocessing, but more often it is used implicitly when a covariance matrix is used internally to account for non-independence of samples or features and the whitening is implied by the linear algebra of the internal calculations. Indeed, many widely used methods such as multivariate regression, canonical correlation analysis, linear and quadratic discriminate analysis, Gaussian mixture models, Maholanobis distance, multivariate outlier detection, and linear mixed models can be reframed using an implicit whitening transformation [2–6].
The field of statistical genetics makes extensive use of implicit whitening transformations in order to account for the correlation between nearby genetic variants. This correlation structure is termed ‘linkage disequlibirum’ or ‘LD’ and is a major complication in downstream analysis of regression summary statistics (i.e., coefficient estimates or z-statistics) from genome-wide association studies [7]. It is common practice to estimate the correlation matrices from an external ‘reference panel’ of samples not included in the study of interest [7]. These ‘out-of-sample‘estimates are then used either as a preprocessing step to transform the summary statistics to be approximately uncorrelated, or internally in a statistical model. This approach has become standard in the field for phenotype prediction [8,9], statistical fine-mapping [10–12], imputing z-statistics [13,14], detecting anomalous z-statistics [15], multiple testing correction [16], identifying genome annotations enriched for risk variants [17], and simulating knockoff datasets with similar correlation structure [18]. While the literature on whitening transformations has focused on estimating and applying the transform on the same data [1], an understanding of the performance of these out-of-sample applications has been lacking [19].
Here, we examine the explicit whitening transformation and its properties in order to improve performance in cases where it is used implicitly. This can improve out-of-sample performance when using modestly sized reference panels, and substantially reduce computational time.
For low dimensional data where seen in classical statistical settings, whitening transforms the data to have an identity sample covariance matrix. This procedure assumes that the true covariance matrix is known, or is well estimated by the sample covariance matrix. Yet the use of the sample covariance matrix for this transformation can be problematic for two distinct reasons. Computationally, evaluating the covariance matrix and creating the whitening matrix requires
memory and
time, which becomes infeasible for large p [1]. Statistically, the transformation must be adapted for the high dimensional case since the sample covariance matrix is no longer full rank or invertible. In modern high dimensional datasets, these computational and statistical limitations raise issues for the application of whitening transforms either as a preprocessing step, or a central part of widely used statistical methods.
Direct estimation of covariance and precision matrices is a huge field of research [20–22]. Many approaches apply regularization to ensure the estimated covariance or precision matrix has specific properties. Widely used methods apply regularization so that the estimated covariance matrix is positive definite by shrinking the sample eigen-values [23,24], or ensure sparsity of the covariance matrix and its inverse by shrinking regression coefficients corresponding to partial correlation coefficients [25]. Others regularize the condition number [26]. There have been many methods formulated as a convex combination of two matrices. Some methods use a convex combination between a non-sparse and sparse components [27,28]. Stein-type estimators use a convex combination between the sample covariance and a target matrix [23,24,29]. A probabilistic approach modeling the observed data as a multivariate Gaussian with an inverse Wishart prior on the covariance gives a posterior mean that is a convex combination between the sample covariance matrix and the prior scale matrix [30–34].
Yet whitening transformations used in a preprocessing step or internally in a statistical model do not require direct estimates of the covariance matrix. Instead, covariance matrices are merely nuisance parameters: essential to the model, but not of direct interest. In data whitening, only the transformed data, rather the covariance matrix itself, is of interest. Here we seek to account for the covariance, rather than estimate it directly, and we propose an implicit covariance approach. This important distinction motivates the probabilistic framework, statistical theory and computationally efficient algorithms we use here to perform whitening transformations without directly estimating the covariance or whitening matrices.
Bayesian or, more broadly, probabilistic formulations of existing techniques can lead to deeper understanding of model behavior, generalization of the model, regularization to incorporate prior knowledge, or incorporation into a hierarchical model [5,6]. Widely used Gaussian mixture models and extensions follow from a probabilistic formulation of the k-means problem, and probabilistic formulations of principal components analysis have long been influential in statistical machine learning [35,36]. Yet we are not aware of such a rigorous probabilistic formulation for the widely used whitening transformation.
Here we propose a probabilistic formulation of the whitening transformation under Gaussian noise, and incorporate regularization in the form of an inverse-Wishart prior distribution on the covariance matrix. This produces a well-known estimator with a single hyperparameter that can be efficiently estimated using an empirical Bayes approach. Using first principles of the probabilistic model, we give a direct interpretation of the hyperparameter and examine the statistical behavior of this whitening transformation. We demonstrate that the probabilistic whitening transformation does not require direct estimation of the covariance or whitening matrices, and derive a remarkably efficient approach to apply the transformation to ultra-high dimensional data.
We examine the empirical performance of the probabilistic whitening transformation on simulated data and genetic data from the 1000 Genomes Project [37]. We apply the whitening transformation to a genome-wide association study of schizophrenia [38], and impute z-statistics of unobserved variants using an external reference panel. Finally, we use this approach to impute genetic regulatory signals for tandem repeats effecting gene expression in the human brain.
2 Methods
In Section 2.1 we introduce the explicit whitening transformations, and in Section 2.2 we reframe them from the perspective of a probabilistic model. We consider estimating a tuning parameter using an empirical Bayes approach in Section 2.3, and consider statistical properties and interpretation of the probabilistic whitening transformation in Section 2.4. In Section 2.5, we consider computational methods to apply the probabilistic whitening transform in high and ultra-high dimensional settings. In Section 2.6, we apply the transform to the problem of imputing regression summary statistics of ungenotyped variants.
2.1 Introduction to whitening transformations
Consider observed data with n samples and p features drawn from a distribution with mean
, identity covariance between rows, and covariance between features given by
. Let
indicate these properties without specifying particular distributional assumptions. Transforming the data by the non-unique whitening matrix produces mean and covariances according to
where is known. This follows from the definition of covariance and the standard property that
. While it is common to assume a multivariate Gaussian distribution for the observed data, this transformation applies to the first two moments of any multivariate distribution. Applying this transformation scales and rotates the data to produce an identity covariance matrix. The whitening matrix is not uniquely defined and different transformation matrices result in different rotations all with identity covariance [1].
The sample covariance is , following mean centering of the columns. Let the singular value decomposition of the scaled observed data be
with singular values , so that the eigen decomposition of the sample covariance is
and the whitening matrix
transforms the data to have identity covariance (S1 File).
This definition of the whitening matrix minimizes the total squared distance between original and transformed data, and is termed the ‘zero-phase components analysis’ or ZCA whitening [1]. This three step transform, one for each matrix multiplication, can be interpreted as rotating, scaling, then unrotating the observed data to give an identity sample covariance (Fig 1). This whitening transform is the most intuitive since it returns the data to its original axes, and it is the foundation for the transformations we describe below.
A) Original data, B) Data rotated along principal components, C) Data rotated and scaled, D) Data rotated, scaled and rotated back to original axes. Green arrows indicate principal axes and lengths indicate eigen-values.
In practice, the true value of is not known and it must be estimated from the observed data Y. An exact whitening transformation that produces an identity covariance matrix is only possible when n > p so that that sample covariance matrix,
, is invertible. Even in this case, the transform can be unstable when the trailing singular-values are very small, since evaluating
becomes very unstable for small values of
and are sensitive to precision limitations in numerical linear algebra. In high dimensional data with n < p, the trailing singular values are exactly zero, so some form of regularization is needed. An exact whitening transformation no longer exists in these cases, we want to learn a transformation that that transformed data has a covariance close to identity by some metric (S1 File).
2.2 A probabilistic model for whitening transformations
Here we propose a whitening transform based on an probabilistic model of the observed data and demonstrate superior statistical performance compared to standard data whitening transformations [1], even in the low-dimension case where both are applicable. In proposing a probabilistic model, we consider the observed data to have a matrix normal distribution with unknown mean, identity covariance between rows, and unknown covariance between columns. (We use the matrix normal here in order to model covariance between columns while having independent rows, but the results remain unchanged when transposing the observed data and using the multivariate normal notation instead). We then place an inverse Wishart (IW) prior on the covariance matrix between columns. The normal assumption is of course natural for unbounded continuous data, and the IW is natural because it is the conjugate prior so that the posterior distribution of the covariance is also IW [39]. Formally,
where T is the target matrix of the prior and . Based on this model, the posterior expectation of the covariance is
where is the sample covariance matrix and
by definition [30–33] The posterior expectation is therefore a convex combination between the sample covariance,
, and the prior target matrix, T.
Setting the target matrix to be symmetric positive definite (SPD) ensures that the posterior expected covariance is also SPD [31]. Restricting T to be a minimally informative prior target corresponds to setting all prior covariances to zero. We focus here on the important case where the IW prior is centered around a scaled identity matrix, and we demonstrate that the estimate has exceptionally efficient computational scaling and produces estimates that are tractable to study analytically. Following previous work [23,24,31–33,40] we set the target matrix to be where
is the average variance across all p features. This gives the important special case we consider here with
where is defined as the posterior expected covariance from the probabilistic model.
In the important case of out-of-sample whitening where the whitening transform is learned from a training set before being applied to the observed data, the standard whitening transform motivated by linear algebra assumes the correlation structure of the training and observed data are the same. This is a strong assumption that is rarely satisfied in practice. The finite size of the training set means that correlation structure will differ from the observed data, so the standard whitening transform will overfit the training data. Instead, the probabilistic model substantially relaxes this central assumption, and assumes only that the training and observed data are drawn from the same distribution.
In practice, the shrinkage can be applied to the correlation matrix while retaining the diagonal variance terms (S1 File).
2.3 Estimating the shrinkage parameter
Covariance estimators that are convex combinations of the sample covariance and target matrices have received much attention. The estimator for depends on assumptions about the data and the specified loss function. Ledoit and Wolf [23] and Schäfer and Strimmer [24] propose minimizing the expected squared Frobenius loss between the true and estimated covariance matrices, then use a consistent estimate of
computed from the observed data. Further work extended this approach to improve estimation of
in the high dimensional setting [29,40,41]. Others use a probabilistic model [30–33], cross-validation [42,43] or the out-of-sample likelihood [44,45]. Yet these methods are designed for direct estimation of covariance or precision matrices, rather than data whitening.
Following the probabilistic formulation, we take a Bayesian approach to estimating , and we refer to this as the Gaussian Inverse Wishart empirical Bayes (GIW-EB) model. We integrate out the covariance matrix and maximize the likelihood of the observed data as a function of
. Due to the analytic properties of the Gaussian and IW distributions, the covariance matrix can be treated as a nuisance parameter and marginalized out according to
so the marginal distribution is multivariate Student-t [39]. The hyperparameter , and therefore
, can be estimated directly from data using an empirical Bayes approach by maximizing
(S1 File). Given the special form of the target matrix,
, we demonstrate that the data only enters the log-likelihood through the sample singular values. This has important implications for the probabilistic whitening transformation described below.
2.4 Properties and interpretation of the probabilistic whitening transformat
2.4.1 Properties of posterior expected covariance.
The behavior of this probabilistic whitening transformation corresponding to the posterior expected covariance in Equation (8) can be understood in terms of the spectral decomposition of the observed data matrix, Y.
Based on the singular value decomposition of the observed data, the eigen decomposition of is
Therefore the eigen vectors of are the same as for the sample covariance matrix, but the eigen-values are shrunk towards
so that the
eigen-value is
. Since
,
, and
, it follows that the eigen-values are always positive, so that
is aways positive definite and invertible, even when
is not.
2.4.2 Statistical properties of probabilistic whitening transformation.
The probabilistic whitening transformation can be understood in similar terms as the posterior expected covariance. Consider a fixed (i.e., non-random) latent data matrix with uncorrelated columns, and let the observed data
be generated by applying a rotation based on a symmetric positive definite covariance matrix
so that
Given the observed data, Y, estimate the covariance matrix as and apply the whitening transformation so that
Since converges to
as
for a fixed p [31], the whitening transform recovers the original signal according to
The whitening transformation can then be expressed in terms of singular vectors and modified singular values according to
The central statement in Equation (15) of the whitening transformation in terms of the original singular vectors and modified singular values has both important statistical and computational implications we discuss below.
The whitening transformation retains the original singular vectors and acts only by modifying the sample singular values. From here we can examine the behavior of the transformation as a function of , and interpret the effect of
on the effective number of parameters used in covariance estimation (S1 File).
2.4.3 Scalar summaries of the correlation or covariance matrix.
Common scalar summary statistics of covariance matrices can be computed efficiently based on the form of the spectral decomposition of (Table 1). Standard values like trace, log determinant and condition number can be computed easily from the shrunken eigen-values. In addition the effective degrees of freedom [46], average correlation, average squared correlation [47], effective variance [48], effective number of features [49] are easily computed (S1 File).
2.4.4 Beyond the whitening transformation.
Applying the transform for other values of the general exponent
are also useful in practice:
gives the whitening transformation.
gives the ‘coloring matrix’ so that post-multiplying by
produces a correlation of
between columns.
gives the posterior expected covariance matrix.
gives the corresponding precision matrix.
2.5 Computational methods for data whitening
The computational time for applying the standard whitening transformation, even in the low dimensional setting, can quickly become intractable for moderate p. The time complexity of the standard algorithm is (S1 File), and becomes very expensive for p > 100 and can be intractable for p > 2000 features. Yet the entire procedure can be substantially accelerated using properties of linear algebra (Table 2). It is not necessary to explicitly compute the sample covariance and whitening matrices and then transform the observed data. Equation (15) rephrases the whitened data in terms of modified singular values, and the original left and right singular vectors. This gives a substantially faster algorithm. In the low dimensional setting of n > p, computing the SVD of the observed data is
, estimating and applying the
and
is negligable, and evaluating the matrix products is
. The procedure is thus substantially reduced to
and uses
memory.
2.5.1 Accelerating computation in the high dimensional setting.
The standard formulation of the data whitening transformation does not apply to the high dimensional setting of n < p since the sample covariance matrix is no longer invertible. Some regularization of the singular values is necessary. The probabilistic whitening transformation indeed shrinks the singular values towards and addresses the statistical challenge of the high dimensional setting. Yet this computational approach is still quadratic in p, and is infeasible for large p typical in real datasets.
In general, the rank, r, of the sample covariance matrix is bounded above by . In the high dimensional setting, at most only
singular values are nonzero. Evaluating the SVD is
in this case only produces the first n singular vectors and values. So there remain
uncomputed singular vectors with corresponding singular values of zero. Directly computing these is impractical and, in fact, unnecessary.
Again, the key insight comes from Equation (15). Since all p singular values, including ones with value zero, are modified to be positive it seems that even left and right singular vectors with no variation (i.e., zero singular values) are required to compute the transformation. Yet here we demonstrate that in fact only non-zero singular values and their corresponding singular vectors are required. This insight further reduces the computational complexity of the entire transform.
The substantial improvement in computational complexity for the whitening transformation in the high dimensional settings comes from computing and using only singular vectors corresponding to nonzero singular values. The method is useful beyond this specific context, so here we derive a general identity and discuss special cases and applications. The identity is exact if all nonzero singular values are retained, and is approximate of only a partial set are retained. The derivation generalizes and simplifies the work of Lippert, et al. [3] (S1 File).
Identity 1. Let C be a symmetric positive semi-definite matrix, with
positive eigen values. Let the eigen decomposition of C be
where
for i > k. Let the eigen-vectors be partitioned as
, and the eigen-values be partitioned as
to separate the nonzero and zero components. Let raising a matrix to an exponent
correspond to raising the eigen-values of the matrix to
. Then
where V1 and indicate the first k eigen-vectors and values, respectively, and
and
are arbitrary matrices,
is a positive scalar, and
is the p-dimensional identity matrix.
Applying Identity 1 to the whitening transform, and using the decomposition
restated here from Equation (11), it follows that
where V1 stores the first k eigen vectors of corresponding to the right singular vectors of
, and
are the first k eigen values.
Using standard properties of matrix multiplication, the time complexity of evaluating these terms are defined as follows.
Corollary 1.1. Since the time complexity of multiplying and
matrices is
, the time to evaluate the general formulation of Identity 1 is
, once the SVD is already computed. In probabilistic data whitening in Equation (19), B = I and a = n so the time complexity reduces to
.
In general, the whitening transformation can be applied in time after the SVD is computed. When the first n singular vectors and values are computed using the standard SVD, then k = n, so the entire procedure is
, which is now linear in the number of features. This is a dramatic improvement from the naive method that is cubic in the number of features (Table 2).
2.5.2 Scaling to the ultra-high dimensional setting.
While this algorithm is now linear in p, it is still quadratic in the number of samples, n. Yet empirical data can often be well approximated as a low rank matrix [50]. As n and p increase but the dimension of the underlying signal remains fixed, it is not necessary to compute all singular values and vectors. Instead a rank
partial SVD can be computed in
time to provide a rank k approximation of the observed data [51]. Moreover, the algorithm in Equation (19) can also be evaluated in
time given the partial SVD (Table 2). The complexity of this approach is now linear in both n and p, and dependent on the rank k approximation chosen by the analyst.
2.6 Application to imputing z-statistics
Consider a matrix of p genetic variants from n individuals, and a vector of continuous trait values y. Standard analysis in genome-wide association studies performs a linear regression to test association of each genetic variant with the trait. Ignoring covariates here for simplicity, this estimates a regression coefficient for the
variant as
, and produces a corresponding z-statistic,
. Within a local genomic region, genetic variants can be highly correlated due to linkage disequilibrium (LD). Therefore, even if the
genetic variant is not directly observed, its z-statistic can be imputed from the set of observed z-statistics and the correlation structure between variants in the region. Following Pasaniuc, et al. [13], let
be the correlation matrix between all pairs of genetic variants, and partition the genetic variants into two sets with j storing indices with observed z-statistics and k storing indices without z-statistics. We would like to impute the values of
given observed values of
and
. If we model the z-statistics as a multivariate Gaussian
then the conditional distribution of given
is
The imputed z-statistics is then
This also works for logistic regression in case-control studies.
So far, we have assumed that the correlation matrix is known. But in practice, this ‘LD matrix’ is estimated from a ‘reference panel’ of a modest number of individuals that are not included in the genome-wide association study. Therefore, inverting
requires some regularization as p becomes large in comparison to n.
In the context of the current work, Equation (22) can be in interpreted as an out-of-sample whitening transformation of the observed z-statistics, , and the cross-correlation matrix,
. Letting
be the regularized estimate of the correlation matrix, then the imputed z-statistic is
Applying this transformation by producing directly is cubic time in
, the number of genetic variants in set j. But applying the high dimensional whitening transformation of Equation (19) reduces this time substantially to
when
. Imputation then depends on the observed z-statistics from the cross-correlation matrix, and the SVD of X.
This can be efficiently applied to real genotype data using Algorithm 1 to impute summary statistics at indices k given summary statistics for variants at indices j, and genotype data from the reference panel at indices that are the union of k and j. The algorithm is then applied to every window in the genome.
Algorithm 1 Impute summary statistics with probabilistic whitening
function whiten ▷ whiten matrix A given SVD and shrinkage parameters
return
end function
function ImputeZ (, Xunion(k,j))
▷ SVD of variants at indices j
▷ empirical Bayes estimate of shrinkage parameters
▷ compute cross-correlation matrix
whiten(
) ▷ whiten cross-correlation matrix
whiten(
) ▷ whiten vector of z-statistics
▷ imputed z-statistics for variants at indeces k
return
end function
3 Results
3.1 Performance on simulated data
The formulation of the probabilistic whitening transformation provides two advances of practical interest in analyses of large-scale datasets. First, the implicit covariance approach reduces computational time for high-dimensional data from the standard cubic time method that creates and then inverts the covariance matrix. For example, in simulations with n = 5000 and an increasing number of features the GIW-EB methods runs in < 2 min and the low rank GIW-EB with k = 50 runs in < 1 min, when the standard method becomes intractable both in terms of time and memory (Fig 2A).
Run times are shown for standard (green), GIW-EB (red) and low rank GIW-EB with k = 50 (dark red) whitening transformations. Results shown for n = 5000 samples and an increasing number of features. Points indicate observed wall time and lines show loess smooth.
Second, the probabilistic model motivates the empirical Bayes estimation of the shrinkage parameter which only uses the sample singular values of the data. Due to its probabilistic formulation, whitening high-dimensional data using the GIW-EB method can produce lower out-of-sample error than other methods. Since an exact whitening transformation produces an identity covariance matrix when applied to the data it was estimated from, the accuracy of an approximate whitening transformation can be evaluated by estimating it from a subset of the data and computing the empirical covariance after applying the transform to the rest of the dataset. This out-of-sample accuracy of the whitening transformation is captured by the root mean squared error of the difference between the empirical covariance of the transformed data and the identity matrix.
We consider simulations with data drawn from a multivariate Gaussian with n = 500 and the number of features p increasing from 20 to 2000, with correlation between features in each of 4 scenarios:
- 1) constant correlation of
- 2) auto-correlation with
- 3) 4 blocks of constant correlation of
- 4) 4 blocks of auto-correlation with
In Scenario 3, most methods show equivalent performance for small values of p, error increases as p approaches n, and then error decreases and converges to the optimal root mean squared error (Fig 3A). The ‘Oracle’ method, shown in black here, transforms the data using the true covariance, so it gives a lower bound on the error. Using a whitening transformation without shrinkage by setting performs poorly even for small p and error only increases with p. Using the pseudoinverse improves performance when p > n, but does not compete with shrinkage methods. Examining different approaches to estimate the shrinkage parameter, the GIW-EB method gives the smallest error across all values of p and the low rank GIW-EB with k = 50 outperforms other methods for moderate p. Both full and low rank GIW-EB give errors that decrease with p and avoids the increase in error at
seen with other shrinkage methods.
Simulated data for n = 500 sample are drawn from a multivariate normal distribution with known covariance matrix and 11 whitening transformations are then applied to 500 additional samples from the same distribution. Of these, 9 methods either estimate the shrinkage parameter from the data or use a fixed value. Setting
corresponds to no shrinkage, and pseudoinverse does not perform any shrinkage. The oracle method performs a whitening transformation using the true correlation matrix from which the data are simulated, and so gives the best out-of-sample performance. Performance is evaluated by comparing the correlation matrix of the transformed data to the identity matrix, and computing the root mean squared error (rMSE). A) rMSE of the whitening transformation for an increasing number of features B) Zoom-in on y-axis from (A). Points indicate observed values and lines show loess smooth.
Overall, the GIW-EB method consistently gives the lowest out-of-sample root mean square error across a range of p values in the four simulation scenarios (S1-S4 Figs). The low rank GIW-EB method is competitive in Scenarios 1 and 3, were the true covariance is low rank. GIW-EB shows the largest improvement compared to other methods when the correlation matrix is low rank, and the eigen-spectrum is dominated by the first few eigen-values.
3.2 Performance on genetic data from 1000 genomes project
Since many analyses of summary statistics from genome-wide association studies apply a whitening transformation estimated from an external reference panel, we evaluated the out-of-sample performance of these whitening transformations on genetic data from the 1000 Genomes Project [37]. Individuals of European, Asian and African ancestry were analyzed separately, and the whitening transformation was performed on independent LD blocks including varying number of genetic variants defined in each population [52]. The whitening transform was trained on half of the samples and evaluated on the other half. Despite the genetic data not being continuous or multivariate Gaussian, shrinkage methods performed well across most windows in European individuals (Fig 4A). The GIW-EB matches or is competitive with other methods that estimate from the data. The low rank GIW-EB method with k = 50 is most competitive for windows with < 1,500 variants. The GIW-EB methods and methods with fixed
values use the implicit covariance algorithm, and these give the best computational performance with a wall time of
5 min compared to 3–30 hours for the other methods (Fig 4B). Error profiles and computational time was similar for individuals of African and Asian ancestry, with GIW-EB giving lower error than fixing
in 75.2% to 91.2% of genome windows, depending on the population (S5 Fig).
A) Root mean squared error (rMSE) compared to baseline for European individuals stratified by the number of genetic variants in the LD window. Values indicate the values averaged across windows, and bars indicate the 95% confidence interval. When normalized rMSE values exceed the axes, the value is shown in white text. B) Wall time for each method shown on a log10 scale. Methods using GIW-EB or fixed values use the implicit covariance algorithm.
3.3 Application to imputing GWAS summary statistics
Genome-wide associations studies (GWAS) release summary statistics from their data corresponding to z-statistics from the set of genetic variants analyzed in the study. Since the number of genetic variants analyzed in the original study can vary widely, there has been interest in imputing z-statistics of additional variants observed in an external reference panel. Since the correlation between z-statistics of two genetic variants matches the linkage disequilibrium between the two variants, multiple groups have proposed a method to impute z-statistics from unobserved variants using the set of observed z-statistics and the correlation structure between variants in a genomic region [13,14]. This is substantially faster and cheaper than performing ‘genotype imputation‘on the full dataset [53].
Imputing z-statistics from unobserved variants can be stated in terms of out-of-sample whitening, and we evaluated the performance of different whitening methods on imputation accuracy. We used summary statistics for 5.6M variants from schizophrenia GWAS of 58K cases and 77K controls of European ancestry [38]. Z-statistics for 15M variants were imputed using a reference panel of 407 unrelated individuals of European ancestry from the 1000 Genomes Project [37] using a sliding window of 1 Mb and a flanking region of 250 kb across all autosomes. Accuracy was evaluated by comparing the imputed and observed z-statistic for 460K randomly selected variants with minor allele frequency . GIW-EB gave high imputation accuracy across a broad range of z-statistic values (Fig 5A), and give smallest genome-wide root mean squared error (Fig 5B). Imputation error increases for small minor allele frequencies (MAF), and GIW-EB gives the smallest squared error across the range of MAF values (Fig 5C). Given 407 samples and a mean of
variants in each genome window, the low rank GIW-EB with k = 50 was not a good approximation in this case. The GIW-EB methods and methods with fixed
values use the implicit covariance algorithm, and these give the best computational performance and require < 1 hr for genome-wide analysis for this reference panel compared to 4–126 hours for other methods (Fig 5D). Overall, GIW-EB method is the most accurate and fastest approach to impute GWAS summary statistics.
A) Imputed z-statistics plotted against the observed z-statistics for 461,707 SNPs. B) Root mean squared prediction error for each method. Red vertical dashed line indicates the value for GIW-EB. C) Square prediction error as a function of minor allele frequency. Smooth curves are fit by a generalized additive model that is the default in ggplot2::geom_smooth(). GIW-EB (k = 50) was excluded from this plot due to high imputation error. D) Compute time required for each method. When values exceed the axes, values are shown in text. Methods using GIW-EB or fixed values use the implicit covariance algorithm.
3.4 Application to impute eQTL signals for tandem repeats
Studies of genetic risk for disease and genetic regulation of gene expression have focused on common single nucleotide polymorphisms (SNPs) because they can be measured cheaply at scale. In recent work, Ziaei Jam, et al. [54] created a population reference panel including donors from 1000 Genomes Project of 1.7M tandem repeats that are not captured by existing panels. Here, we integrate this resource with summary statistics from a study of genetic regulation of gene expression in the human brain using almost 4K bulk RNA-seq samples [55]. As a proof of principle, we applied this approach to 3 disease-relevant genes with complex genome structure and we identified tandem repeats that explain the genetic regulatory signal (Fig 6). C9orf72 is a key risk gene for amyotrophic lateral sclerosis, with expansion of a intronic hexanucleotide repeat conferring disease risk and effecting gene expression [56] (S1 Table). TSPAN14 and TYK2 have been implicated in risk for Alzheimer’s disease [57], and here we identify tandem repeats with a stronger association with gene expression than SNPs in the region.
Black points indicate observed variants included in the original eQTL analysis, red points indicates imputed variants, and red triangles indicate imputed tandem repeats.
4 Discussion
The whitening transformation is a central, if often unstated, component of many widely used statistical methods. While many standard statistical methods have been reformulated with a probabilistic model, or extended to handle regularization and modern high dimensional datasets, the whitening transform has received less attention. The standard whitening transformation is limited by computational time, memory usage, and gives poor out-of-sample performance on modestly sized datasets. Regularizing the covariance estimate improves statistical performance, but is still very computationally demanding for high dimensional datasets.
We proposed a regularized probabilistic whitening transformation and examined its statistical properties based on the singular value decomposition of the data matrix. The particular form of the probabilistic formulation enables an implicit covariance approach that avoids direct estimation of the covariance matrix and reduces the computational time from cubic to linear in the number of features. This can reduce computational time by a factor of in practical applications.
In simulations and applications high-dimensional genotype data from the 1000 Genomes Project, we demonstrated that our GIW-EB method matches or exceeds other methods in out-of-sample whitening benchmarks. In an application to impute z-statistics from a schizophrenia GWAS, GIW-EB gave the best imputation performance. As a proof of principle, we demonstrate that z-statistic imputation powered by our GIW-EB whitening transform can identify tandem repeats explaining the genetic regulatory signals for disease-relevant genes for amyotrophic lateral sclerosis and Alzheimer’s disease.
As the scale of genomic datasets continues to increase, the implicit covariance approach of the probabilistic model will enables application of whitening transforms on high dimensional data where existing methods are intractable. Future applications include single cell gene expression and larger genetic references panels.
Analysis code
Code implementing the probabilistic whitening transformation with implicit covariance is available in the R package decorrelate from https://cran.r-project.org/package=decorrelate. Documentation is available at https://gabrielhoffman.github.io/decorrelate. Code implementing the imputation of summary statistics is available in the R package imputez available at https://gabrielhoffman.github.io/imputez. R packages have also been deposited at Zenodo: decorrelate https://doi.org/10.5281/zenodo.17426788, imputez https://doi.org/10.5281/zenodo.17426882. Code for simulation and analysis has been deposited at Zenodo https://doi.org/10.5281/zenodo.17427136 and https://doi.org/10.5281/zenodo.17427128. Times were evaluated using 12 cores on a 48 core Intel Xeon Platinum 8462Y CPU @ 2.8GHz running R v4.3.3 linked to a parallelized Intel Math Kernel Library for linear algebra operations.
Supporting information
S1 Table. Imputed z-statistics for tandem repeat EnsTR:chr9:27573485 associated with expression of C9orf72.
Due to the complexity of harmonizing tandem repeats identified in sequence data, the EnsembleTR reference panel [54] encodes the known hexanucleitude repeat near C9orf72 as a 62 bp reference allele (GCCCCGCCCCGGGCCCGCCCCCGGGCCCGCCCCGACCACGCCCCGGCCCCGGCCCCGGCCCC) with 25 alternative alleles. The 7 most common are shown here with their imputed z-statistics.
https://doi.org/10.1371/journal.pgen.1012320.s002
(PDF)
S1 Fig. Out-of-sample performance of whitening transformation.
Scenario 1: constant correlation. Details are given in Fig 3. A) Constant correlation matrix with used in this simulation. B) Observed and shrunk eigen-values from simulation of p = 1000 features. C,D) rMSE of the whitening transformation for an increasing number of features with a zoom-in on the y-axis. E,F) rMSE scaled by the rMSE of the untransformed data with a zoom-in on the y-axis. Points indicate observed values and lines show loess smooth.
https://doi.org/10.1371/journal.pgen.1012320.s003
(EPS)
S2 Fig. Out-of-sample performance of whitening transformation.
Scenario 2: auto-correlation. Details are given in Fig 3. A) Auto-correlation matrix with used in this simulation. B) Observed and shrunk eigen-values from simulation of p = 1000 features. C,D) rMSE of the whitening transformation for an increasing number of features with a zoom-in on the y-axis. E,F) rMSE scaled by the rMSE of the untransformed data with a zoom-in on the y-axis. Points indicate observed values and lines show loess smooth.
https://doi.org/10.1371/journal.pgen.1012320.s004
(EPS)
S3 Fig. Out-of-sample performance of whitening transformation.
Scenario 3: block constant correlation. Details are given in Fig 3. A) Block constant correlation matrix with used in this simulation. B) Observed and shrunk eigen-values from simulation of p = 1000 features. C,D) rMSE of the whitening transformation for an increasing number of features with a zoom-in on the y-axis. E,F) rMSE scaled by the rMSE of the untransformed data with a zoom-in on the y-axis. Points indicate observed values and lines show loess smooth.
https://doi.org/10.1371/journal.pgen.1012320.s005
(EPS)
S4 Fig. Out-of-sample performance of whitening transformation.
Scenario 4: block auto-correlation. Details are given in Fig 3. A) Block auto-correlation matrix with used in this simulation. B) Observed and shrunk eigen-values from simulation of p = 1000 features. C,D) rMSE of the whitening transformation for an increasing number of features with a zoom-in on the y-axis. E,F) rMSE scaled by the rMSE of the untransformed data with a zoom-in on the y-axis. Points indicate observed values and lines show loess smooth.
https://doi.org/10.1371/journal.pgen.1012320.s006
(EPS)
S5 Fig. Out-of-sample performance of whitening transformation on genotype data from the 1000 Genomes Project.
A) Root mean squared error (rMSE) compared to baseline for African and Asian individuals stratified by the number of genetic variants in the LD window. Values indicate the values averaged across windows, and bars indicate the 95% confidence interval. When normalized rMSE values exceed the axes, the value is shown in white text. B) Run time of each method shown on a scale. C) For each population, show the percentage of genome windows where the rMSE of GIW-EB is less than the rMSE from setting
.
https://doi.org/10.1371/journal.pgen.1012320.s007
(EPS)
References
- 1. Kessy A, Lewin A, Strimmer K. Optimal Whitening and Decorrelation. American Statistician. 2018;72(4):309–14.
- 2. Hoffman GE. Correcting for population structure and kinship using the linear mixed model: theory and extensions. PLoS One. 2013;8(10):e75707. pmid:24204578
- 3. Lippert C, Listgarten J, Liu Y, Kadie CM, Davidson RI, Heckerman D. FaST linear mixed models for genome-wide association studies. Nat Methods. 2011;8(10):833–5. pmid:21892150
- 4.
Hastie T, Tibshirani R, Friedman J. The Elements of Statistical Learning. 2nd ed. New York, NY: Springer. 2009.
- 5.
Bishop CM. Pattern Recognition and Machine Learning. New York: Springer Science. 2006.
- 6.
Murphy KP. Machine learning: a probabilistic perspective. Cambridge, Massachusetts: MIT Press. 2012.
- 7. Pasaniuc B, Price AL. Dissecting the genetics of complex traits using summary association statistics. Nat Rev Genet. 2017;18(2):117–27. pmid:27840428
- 8. Vilhjálmsson BJ, Yang J, Finucane HK, Gusev A, Lindström S, Ripke S, et al. Modeling Linkage Disequilibrium Increases Accuracy of Polygenic Risk Scores. Am J Hum Genet. 2015;97(4):576–92. pmid:26430803
- 9. Ge T, Chen C-Y, Ni Y, Feng Y-CA, Smoller JW. Polygenic prediction via Bayesian regression and continuous shrinkage priors. Nat Commun. 2019;10(1):1776. pmid:30992449
- 10. Zou Y, Carbonetto P, Wang G, Stephens M. Fine-mapping from summary data with the “Sum of Single Effects” model. PLoS Genet. 2022;18(7):e1010299. pmid:35853082
- 11. Hormozdiari F, Kostem E, Kang EY, Pasaniuc B, Eskin E. Identifying causal variants at loci with multiple signals of association. Genetics. 2014;198(2):497–508. pmid:25104515
- 12. Benner C, Spencer CCA, Havulinna AS, Salomaa V, Ripatti S, Pirinen M. FINEMAP: efficient variable selection using summary data from genome-wide association studies. Bioinformatics. 2016;32(10):1493–501. pmid:26773131
- 13. Pasaniuc B, Zaitlen N, Shi H, Bhatia G, Gusev A, Pickrell J, et al. Fast and accurate imputation of summary statistics enhances evidence of functional enrichment. Bioinformatics. 2014;30(20):2906–14. pmid:24990607
- 14. Rüeger S, McDaid A, Kutalik Z. Evaluation and application of summary statistic imputation to discover new height-associated loci. PLoS Genet. 2018;14(5):e1007371. pmid:29782485
- 15. Chen W, Wu Y, Zheng Z, Qi T, Visscher PM, Zhu Z, et al. Improved analyses of GWAS summary statistics by reducing data heterogeneity and errors. Nat Commun. 2021;12(1):7117. pmid:34880243
- 16. Davis JR, Fresard L, Knowles DA, Pala M, Bustamante CD, Battle A, et al. An Efficient Multiple-Testing Adjustment for eQTL Studies that Accounts for Linkage Disequilibrium between Variants. Am J Hum Genet. 2016;98(1):216–24. pmid:26749306
- 17. Reshef YA, Finucane HK, Kelley DR, Gusev A, Kotliar D, Ulirsch JC, et al. Detecting genome-wide directional effects of transcription factor binding on polygenic disease risk. Nat Genet. 2018;50(10):1483–93. pmid:30177862
- 18. He Z, Liu L, Belloy ME, Le Guen Y, Sossin A, Liu X, et al. GhostKnockoff inference empowers identification of putative causal variants in genome-wide association studies. Nat Commun. 2022;13(1):7209. pmid:36418338
- 19. Benner C, Havulinna AS, Järvelin M-R, Salomaa V, Ripatti S, Pirinen M. Prospects of Fine-Mapping Trait-Associated Genomic Regions by Using Summary Statistics from Genome-wide Association Studies. Am J Hum Genet. 2017;101(4):539–51. pmid:28942963
- 20. Pourahmadi M. Covariance Estimation: The GLM and Regularization Perspectives. Statist Sci. 2011;26(3):369–87.
- 21.
Pourahmadi M. High-Dimensional Covariance Estimation. Hoboken, NJ, USA: John Wiley and Sons. 2013.
- 22. Fan J, Liao Y, Liu H. An overview of the estimation of large covariance and precision matrices. The Econometrics Journal. 2016;19(1):C1–32.
- 23. Ledoit O, Wolf M. A well-conditioned estimator for large-dimensional covariance matrices. Journal of Multivariate Analysis. 2004;88(2):365–411.
- 24. Schäfer J, Strimmer K. A shrinkage approach to large-scale covariance matrix estimation and implications for functional genomics. Stat Appl Genet Mol Biol. 2005;4:Article32. pmid:16646851
- 25. Friedman J, Hastie T, Tibshirani R. Sparse inverse covariance estimation with the graphical lasso. Biostatistics. 2008;9(3):432–41. pmid:18079126
- 26. Won J-H, Lim J, Kim S-J, Rajaratnam B. Condition Number Regularized Covariance Estimation. J R Stat Soc Series B Stat Methodol. 2013;75(3):427–50. pmid:23730197
- 27. Fan J, Liao Y, Mincheva M. Large Covariance Estimation by Thresholding Principal Orthogonal Complements. J R Stat Soc Series B Stat Methodol. 2013;75(4):10.1111/rssb.12016. pmid:24348088
- 28. Huang N, Fryzlewicz P. NOVELIST estimator of large correlation and covariance matrices and their inverses. TEST. 2018;28(3):694–727.
- 29. Fisher TJ, Sun X. Improved Stein-type shrinkage estimators for the high-dimensional multivariate normal covariance matrix. Computational Statistics & Data Analysis. 2011;55(5):1909–18.
- 30. Chen C-F. Bayesian Inference for a Normal Dispersion Matrix and its Application to Stochastic Multiple Regression Analysis. Journal of the Royal Statistical Society Series B: Statistical Methodology. 1979;41(2):235–48.
- 31. Leday GGR, Richardson S. Fast Bayesian inference in large Gaussian graphical models. Biometrics. 2019;75(4):1288–98. pmid:31009060
- 32. Hannart A, Naveau P. Estimating high dimensional covariance matrices: A new look at the Gaussian conjugate framework. Journal of Multivariate Analysis. 2014;131:149–62.
- 33. van Wieringen WN, Peeters CFW. Ridge estimation of inverse covariance matrices from high-dimensional data. Computational Statistics & Data Analysis. 2016;103:284–303.
- 34. Kuismin M, Sillanpää MJ. Use of Wishart Prior and Simple Extensions for Sparse Precision Matrix Estimation. PLoS One. 2016;11(2):e0148171. pmid:26828427
- 35.
Roweis S. EM algorithms for PCA and SPCA. In: Advances in Neural Information Processing Systems, 1998. 626–32.
- 36. Tipping ME, Bishop CM. Probabilistic Principal Component Analysis. Journal of the Royal Statistical Society Series B: Statistical Methodology. 1999;61(3):611–22.
- 37. 1000 Genomes Project Consortium, Auton A, Brooks LD, Durbin RM, Garrison EP, Kang HM, et al. A global reference for human genetic variation. Nature. 2015;526(7571):68–74. pmid:26432245
- 38. Trubetskoy V, Pardiñas AF, Qi T, Panagiotaropoulou G, Awasthi S, Bigdeli TB, et al. Mapping genomic loci implicates genes and synaptic biology in schizophrenia. Nature. 2022;604(7906):502–8. pmid:35396580
- 39.
Gelman A, Carlin JB, Stern HS, Rubin DB. Bayesian Data Analysis. CRC Press. 2013.
- 40. Touloumis A. Nonparametric Stein-type shrinkage covariance matrix estimators in high-dimensional settings. Computational Statistics & Data Analysis. 2015;83:251–61.
- 41. Chen Y, Wiesel A, Eldar YC, Hero AO. Shrinkage Algorithms for MMSE Covariance Estimation. IEEE Trans Signal Process. 2010;58(10):5016–29.
- 42. Boileau P, Hejazi NS, van der Laan MJ, Dudoit S. Cross-Validated Loss-based Covariance Matrix Estimator Selection in High Dimensions. Journal of Computational and Graphical Statistics. 2023;32(2):601–12.
- 43. Tong J, Hu R, Xi J, Xiao Z, Guo Q, Yu Y. Linear shrinkage estimation of covariance matrices using low-complexity cross-validation. Signal Processing. 2018;148:223–33.
- 44.
Theiler J. The incredible shrinking covariance estimator. In: SPIE Proceedings, 2012. 83910P-83910P – 12. https://doi.org/10.1117/12.918718
- 45. Hoffbeck JP, Landgrebe DA. Covariance matrix estimation and classification with limited training data. IEEE Trans Pattern Anal Machine Intell. 1996;18(7):763–7.
- 46. Ye J. On Measuring and Correcting the Effects of Data Mining and Model Selection. Journal of the American Statistical Association. 1998;93(441):120–31.
- 47. Watanabe J. Statistics of eigenvalue dispersion indices: Quantifying the magnitude of phenotypic integration. Evolution. 2022;76(1):4–28. pmid:34679186
- 48. Peña D, Rodrı́guez J. Descriptive measures of multivariate scatter and linear dependence. Journal of Multivariate Analysis. 2003;85(2):361–74.
- 49. Liu G, Liang KY. Sample size calculations for studies with correlated observations. Biometrics. 1997;53(3):937–47. pmid:9290224
- 50. Udell M, Townsend A. Why Are Big Data Matrices Approximately Low Rank? SIAM Journal on Mathematics of Data Science. 2019;1(1):144–60.
- 51. Baglama J, Reichel L. Augmented Implicitly Restarted Lanczos Bidiagonalization Methods. SIAM J Sci Comput. 2005;27(1):19–42.
- 52. Berisa T, Pickrell JK. Approximately independent linkage disequilibrium blocks in human populations. Bioinformatics. 2016;32(2):283–5. pmid:26395773
- 53. Sun Q, Li Y. Advances in haplotype phasing and genotype imputation. Nat Rev Genet. 2026;27(2):155–69. pmid:40993437
- 54. Ziaei Jam H, Li Y, DeVito R, Mousavi N, Ma N, Lujumba I, et al. A deep population reference panel of tandem repeat variation. Nat Commun. 2023;14(1):6711. pmid:37872149
- 55. Zeng B, Bendl J, Kosoy R, Fullard JF, Hoffman GE, Roussos P. Multi-ancestry eQTL meta-analysis of human brain identifies candidate causal variants for brain-related traits. Nat Genet. 2022;54(2):161–9. pmid:35058635
- 56. Balendra R, Isaacs AM. C9orf72-mediated ALS and FTD: multiple pathways to disease. Nat Rev Neurol. 2018;14(9):544–58. pmid:30120348
- 57. Schwartzentruber J, Cooper S, Liu JZ, Barrio-Hernandez I, Bello E, Kumasaka N, et al. Genome-wide meta-analysis, fine-mapping and integrative prioritization implicate new Alzheimer’s disease risk genes. Nat Genet. 2021;53(3):392–402. pmid:33589840