Abstract
Statistical methods often make assumptions about independence between the samples or features of a dataset. Yet correlation structure is ubiquitous in real data, so these assumptions are often not met in practice. Whitening transformations are widely applied to remove this correlation structure. Existing approaches to whitening are based on standard linear algebra, rather than a probabilistic model, and application to high dimensional datasets with samples and features is problematic as approaches or exceeds . Moreover, the computational time becomes prohibitive since the naive transform is cubic in . Here we propose a probabilistic model for data whitening and examine its properties based on first principles as increases. We demonstrate the statistical properties of the probabilistic model and derive a remarkably efficient algorithm that is linear instead of cubic time in the number of features. We examine the out-of-sample performance of the probabilistic whitening model on simulated data, and real genotype data. 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.
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 [1]. In general, for a data matrix with samples and 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. Covariance and their corresponding whitening matrices, along with correlation and their corresponding ‘decorrelating’ matrices, play a central role in many standard analysis methods such as multivariate regression, canonical correlation analysis, linear and quadratic discriminate analysis, Gaussian mixture models, Maholanobis distance, multivariate outlier detection, and independent component analysis [2–4], linear mixed models [5, 6], as well as deep learning applications [7–9].
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 [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.
Beyond general applications in statistical analysis, the field of statistical genetics makes extensive use of 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 [10]. It is common practice to estimate the correlation matrices from an external ‘reference panel’ of samples not included in the study of interest [10]. 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 [11, 12], statistical fine-mapping [13–15], imputing z-statistics [16], detecting anomalous z-statistics [17], multiple testing correction [18], identifying genome annotations enriched for risk variants [19], and simulating knockoff datasets with similar correlation structure [20]. 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 [21].
Direct estimation of covariance and precision matrices is a huge field of research [22–24]. 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 [25, 26], or ensure sparsity of the covariance matrix and its inverse by shrinking regression coefficients corresponding to partial correlation coefficients [27]. Others regularize the condition number [28]. 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 [29, 30]. Stein-type estimators use a convex combination between the sample covariance and a target matrix [25, 26, 31]. 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 [32–36].
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 [3, 4]. 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 [37, 38]. 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 [40]. We apply the whitening transformation to a genome-wide association study of schizophrenia [41], 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. Results
2.1. Introduction to whitening transformations
Consider observed data with samples and features drawn from a distribution with mean vector , identity covariance between rows, and covariance between features given by . Let
| (1) |
indicate these properties without specifying particular distributional assumptions. Transforming the data by the non-unique whitening matrix produces mean and covariances according to
| (2) |
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
| (3) |
with singular values , so that the eigen decomposition of the sample covariance is and the whitening matrix transforms the data to have identity covariance (SI 5.1).
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 (Figure 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.
Figure 1: Intuition for data whitening transformation.
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 . An exact whitening transformation that produces an identity covariance matrix is only possible when 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 , 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 identify by some metric (SI 5.2).
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 distribution1 with unknown mean, identity covariance between rows, and unknown covariance between columns. 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 [42]. Formally,
| (4) |
| (5) |
where is the target matrix of the prior and . Based on this model, the posterior expectation of the covariance is
| (6) |
| (7) |
where is the sample covariance matrix and by definition [32–35] The posterior expectation is therefore a convex combination between the sample covariance, , and the prior target matrix, .
Setting the target matrix to be symmetric positive definite (SPD) ensures that the posterior expected covariance is also SPD [33]. Restricting 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 [25, 26, 33–35, 43] we set the target matrix to be where is the average variance across all features. This gives the important special case we consider here with
| (8) |
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 motived 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 (SI 5.3).
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 [25] and Schäfer and Strimmer [26] 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 [31, 43, 44]. Others use a probabilistic model [32–35], cross-validation [45, 46] or the out-of-sample likelihood [47, 48]. 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
| (9) |
so the marginal distribution is multivariate Student-t [42]. The hyperparameter , and therefore , can be estimated directly from data using an empirical Bayes approach by maximizing (SI 5.4). 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 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, .
Based on the singular value decomposition of the observed data, the eigen decomposition of is
| (10) |
| (11) |
Therefore the eigen vectors of are the same as for the sample covariance matrix, but the eigenvalues are shrunk 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.5. 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
| (12) |
Given the observed data, , estimate the covariance matrix as and apply the whitening transformation so that
| (13) |
Since converges to as for a fixed [33], the whitening transform recovers the original signal according to
| (14) |
The whitening transformation can then be expressed in terms of singular vectors and modified singular values according to
| (15) |
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 (SI 5.5), and interpret the effect of on the effective number of parameters used in covariance estimation (SI 5.6).
2.6. 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 [49], average correlation, average squared correlation [50], effective variance [51], effective number of features [52] are easily computed (SI 5.7).
Table 1: Computing scalar summary statistics of correlation matrices.
Terms are defined in the text except for letting the shrunken eigen-values be , and the mean shrunken eigen-value be . Let be a vector of length with all entries having value 1.
2.7. Computational methods for data whitening
The computational time for applying the standard whiting transformation, even in the low dimensional setting, can quickly become intractable for moderate . The time complexity of the standard algorithm is (SI 5.8), and becomes very expensive for and can be intractable for features. Yet the entire procedure can be substantially accelerated using properties 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 , 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.
Table 2:
Computational and memory complexity of whitening methods for samples and features using a rank transformation.
| Method | Decomposition | Estimate | Transform | Total | Memory |
|---|---|---|---|---|---|
| Standard | |||||
| GIW-EB | |||||
| GIW-EB | |||||
| GIW-EB, low rank |
2.7.1. Accelerating computation in the low dimensional setting
2.7.2. Accelerating computation in the high dimensional setting
The standard formulation of the data whitening transformation does not apply to the high dimensional setting of 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 , and is infeasible for large typical in real datasets.
In general, the rank, , 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 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 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 theorem and discuss special cases and applications. The theorem 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. [6] (SI 5.9).
Theorem 1.
Let be a symmetric positive semi-definite matrix, with positive eigen values. Let the eigen decomposition of be where for . 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
| (16) |
where and indicate the first eigen-vectors and values, respectively, and and are arbitrary matrices, is a positive scalar, and is the p-dimensional identity matrix.
Applying Theorem 1 to the whiting transform, and using the decomposition
| (17) |
restated here from Equation (11), it follows that
| (18) |
| (19) |
where stores the first eigen vectors of corresponding to the right singular vectors of , and are the first 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 Theorem 1 is , once the SVD is already computed. In probabilistic data whitening in Equation (19), and so the time complexity reduces to .
In general, the whitening transformation can be applied in time after the SVD is computed. When the first singular vectors and values are computed using the standard SVD, then , 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.7.3. Scaling to the ultra-high dimensional setting
While this algorithm is now linear in , it is still quadratic in the number of samples, . Yet empirical data can often be well approximated as a low rank matrix [53]. As and 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 approximation of the observed data [54]. 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 and , and dependent on the rank approximation chosen by the analyst.
2.8. Beyond the whitening transformation
While this work focuses on the whitening transformation, applying Theorem 1 with other values for the general exponent α are also useful in practice. In the context of probabilistic whitening transformation with variables defined as in Equation (19), four common operations involving can be accelerated:
gives the posterior expected covariance matrix.
gives the corresponding precision matrix.
gives the whitening transformation.
gives the ‘coloring matrix’ so that post-multiplying by produces a correlation of between columns.
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 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 (Figure 2A). 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, the whitening high-dimensional data using the GIW-EB method can produce lower out-of-sample error than other methods. For example, in a simulation Scenario 3 (described below), both full and low rank GIW-EB give estimated values of that approach the optimal value while other methods give values that are too small and have higher error (Figure 2B).
Figure 2: Performance of probabilistic whitening transformation.
A) Run times are shown for standard (green), GIW-EB (red) and low rank GIW-EB with (dark red) whitening transformations. Results shown for samples and an increasing number of features. Points indicate observed wall time and lines show loess smooth. B) The empirical out-of-sample root mean squared error for a simulated dataset across the range of values is shown by the black curve. The value giving the lowest error is show by the purple point. Values of estimated by other methods are shown by vertical lines.
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 and the number of features increasing from 20 to 2000, with correlation between features in each of 4 scenarios:
constant correlation of
auto-correlation with
4 blocks of constant correlation of
4 blocks of auto-correlation with
In Scenario 3, most methods show equivalent performance for small values of , error increases as approaches , and then error decreases and converges to the optimal root mean squared error (Figure 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 and error only increases with . Using the pseudoinverse improves performance when , 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 and the low rank GIW-EB with k = 50 outperforms other methods for moderate . Both full and low rank GIW-EB give errors that decrease with and avoids the increase in error at seen with other shrinkage methods.
Figure 3: Out-of-sample performance of whitening transformation.
Simulated data for 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 values in the 4 simulation scenarios (Figure S1-4). The low rank GIW-EB method is competitive in Scenarios 1 and 3, were the true covariance is low rank.
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 [40]. 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 [55]. The whitening transform was trained on half of the samples and evaluated on the other half. Despite the genetic data not being multivariate normal, shrinkage methods performed well across most windows in European individuals (Figure 4A). The GIW-EB matches or is competitive with other methods that estimate from the data. The low rank GIW-EB method with 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 (Figure 4B). Error profiles and computational time was similar for individuals of African and Asian ancestry (Figure S5).
Figure 4: Out-of-sample whitening performance on genetic data.
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, Pasaniuc, et al. [16] 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. This is substantially faster and cheaper than performing ‘genotype imputation’ on the full dataset [56].
Imputing z-statistics from unobserved variants can be stated in terms of out-of-sample whitening (SI 5.10), 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 [41]. Z-statistics for 15M variants were imputed using a reference panel of 407 unrelated individuals of European ancestry from the 1000 Genomes Project [40] 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 ≥ 5%. GIW-EB gave high imputation accuracy across a broad range of z-statistic values (Figure 5A), and give smallest genome-wide root mean squared error (Figure 5B). Imputation error increases for small minor allele frequencies (MAF), and GIW-EB gives the smallest squared error across the range of MAF values (Figure 5C). Given 407 samples and a mean of ∼ 3100 variants in each genome window, the low rank GIW-EB with 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 (Figure 5D). Overall, GIW-EB method is the most accurate and fastest approach to impute GWAS summary statistics.
Figure 5: Imputation of 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. [57] 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 [58]. 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 (Figure 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[59]. TSPAN14 and TYK2 have been implicated in risk for Alzheimer’s disease [60], and here we identify tandem repeats with a stronger association with gene expression than SNPs in the region.
Figure 6: Imputation of eQTL summary statistics in human brain implicates tandem repeats..
Results are shown for A) C9orf72, B) TSPAN14, and C) TYK2. 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 ≥ 100 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.
Supplementary Material
Acknowledgements:
We thank Bernie Devlin for valuable feedback.
Funding:
This work was supported by NIA and NINDS grant U24AG087563
Footnotes
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.
Competing interests: The authors declare no competing interest.
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.
References
- [1].Kessy A., Lewin A., and Strimmer K. (2018). Optimal Whitening and Decorrelation. American Statistician 72, 309–314. [Google Scholar]
- [2].Hastie T., Tibshirani R., and Friedman J. (2009). The Elements of Statistical Learning. Springer Series in Statistics. (New York, NY: Springer; ) 2nd edition. [Google Scholar]
- [3].Murphy K. P. (2012). Machine learning: a probabilistic perspective. (Cambridge, Massachusetts: MIT Press; ). [Google Scholar]
- [4].Bishop C. M. (2006). Pattern Recognition and Machine Learning. (New York: Springer Science; ). [Google Scholar]
- [5].Hoffman G. E. (2013). Correcting for Population Structure and Kinship Using the Linear Mixed Model: Theory and Extensions. PLoS ONE 8, e75707. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [6].Lippert C., Listgarten J., Liu Y., Kadie C. M., Davidson R. I., and Heckerman D. (2011). FaST linear mixed models for genome-wide association studies. Nature Methods 8, 833–835. [DOI] [PubMed] [Google Scholar]
- [7].Krizhevsky A. and Hinton G. (2009). Learning Multiple Layers of Features from Tiny Images. Technical Report, University of Toronto. [Google Scholar]
- [8].Wadia N. S., Duckworth D., Schoenholz S. S., Dyer E., and Sohl-Dickstein J. (2021). Whitening and second order optimization both make information in the dataset unusable during training, and can reduce or prevent generalization. In Proceedings of the 38th International Conference on Machine Learning pp. 10617–10629. [Google Scholar]
- [9].Zhang S., Nezhadarya E., Fashandi H., Liu J., Graham D., and Shah M. (2021). Stochastic Whitening Batch Normalization. In IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) pp. 10973–10982. [Google Scholar]
- [10].Pasaniuc B. and Price A. L. (2017). Dissecting the genetics of complex traits using summary association statistics. Nature Reviews Genetics 18, 117–127. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [11].Vilhjalmsson B. J., Yang J., Kenny E. E., Schierup M. H., De Jager P., Patsopoulos N. A., McCarroll S., Daly M., Purcell S., Chasman D., et al. (2015). Modeling Linkage Disequilibrium Increases Accuracy of Polygenic Risk Scores. American Journal of Human Genetics 97, 576–592. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [12].Ge T., Chen C.-Y., Ni Y., Feng Y.-C. A., and Smoller J. W. (2019). Polygenic prediction via Bayesian regression and continuous shrinkage priors. Nature Communications 10, 1776. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [13].Zou Y., Carbonetto P., Wang G., and Stephens M. (2022). Fine-mapping from summary data with the “Sum of Single Effects” model. PLoS Genetics 18, 1–24. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [14].Hormozdiari F., Kostem E., Kang E. Y., Pasaniuc B., and Eskin E. (2014). Identifying causal variants at loci with multiple signals of association. Genetics 198, 497–508. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [15].Benner C., Spencer C. C., Havulinna A. S., Salomaa V., Ripatti S., and Pirinen M. (2016). FINEMAP: efficient variable selection using summary data from genome-wide association studies. Bioinformatics 32, 1493–1501. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [16].Pasaniuc B., Zaitlen N., Shi H., Bhatia G., Gusev A., Pickrell J., Hirschhorn J., Strachan D. P., Patterson N., and Price A. L. (2014). Fast and accurate imputation of summary statistics enhances evidence of functional enrichment. Bioinformatics (Oxford, England) 30, 2906–2914. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [17].Chen W., Wu Y., Zheng Z., Qi T., Visscher P. M., Zhu Z., and Yang J. (2021). Improved analyses of GWAS summary statistics by reducing data heterogeneity and errors. Nature Communications 12, 1–10. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [18].Davis J. R., Fresard L., Knowles D. A., Pala M., Bustamante C. D., Battle A., and Montgomery S. B. (2016). An Efficient Multiple-Testing Adjustment for eQTL Studies that Accounts for Linkage Disequilibrium between Variants. American Journal of Human Genetics 98, 216–224. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [19].Reshef Y. A., Finucane H. K., Kelley D. R., Gusev A., Kotliar D., Ulirsch J. C., Hormozdiari F., Nasser J., O’Connor L., van de Geijn B., et al. (2018). Detecting genome-wide directional effects of transcription factor binding on polygenic disease risk. Nature Genetics 50, 1483–1493. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [20].He Z., Liu L., Belloy M. E., Le Guen Y., Sossin A., Liu X., Qi X., Ma S., Gyawali P. K., Wyss-Coray T., et al. (2022). GhostKnockoff inference empowers identification of putative causal variants in genome-wide association studies. Nature Communications 13, 7209. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [21].Benner C., Havulinna A. S., Järvelin M. R., Salomaa V., Ripatti S., and Pirinen M. (2017). Prospects of Fine-Mapping Trait-Associated Genomic Regions by Using Summary Statistics from Genome-wide Association Studies. American Journal of Human Genetics 101, 539–551. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [22].Pourahmadi M. (2011). Covariance estimation: The GLM and regularization perspectives. Statistical Science 26, 369–387. [Google Scholar]
- [23].Pourahmadi M. (2013). High-Dimensional Covariance Estimation. Wiley Series in Probability and Statistics. (Hoboken, NJ, USA: John Wiley and Sons; ). [Google Scholar]
- [24].Fan J., Liao Y., and Liu H. (2016). An overview of the estimation of large covariance and precision matrices. The Econometrics Journal 19, C1–C32. [Google Scholar]
- [25].Ledoit O. and Wolf M. (2004). A well-conditioned estimator for large-dimensional covariance matrices. Journal of Multivariate Analysis 88, 365–411. [Google Scholar]
- [26].Schäfer J. and Strimmer K. (2005). A Shrinkage Approach to Large-Scale Covariance Matrix Estimation and Implications for Functional Genomics. Statistical Applications in Genetics and Molecular Biology 4. [DOI] [PubMed] [Google Scholar]
- [27].Friedman J., Hastie T., and Tibshirani R. (2008). Sparse inverse covariance estimation with the graphical lasso. Biostatistics (Oxford, England) 9, 432–41. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [28].Won J. h., Lim J., Kim S. j., and Rajaratnam B. (2013). Condition-number-regularized covariance estimation. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 75, 427–450. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [29].Fan J., Liao Y., and Mincheva M. (2013). Large covariance estimation by thresholding principal orthogonal complements. Journal of the Royal Statistical Society. Series B: Statistical Methodology 75, 603–680. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [30].Huang N. and Fryzlewicz P. (2019). NOVELIST estimator of large correlation and covariance matrices and their inverses. Test 28, 694–727. [Google Scholar]
- [31].Fisher T. J. and Sun X. (2011). Improved Stein-type shrinkage estimators for the high-dimensional multivariate normal covariance matrix. Computational Statistics and Data Analysis 55, 1909–1918. [Google Scholar]
- [32].Chen C.-F. (1979). Bayesian Inference for a Normal Dispersion Matrix and its Application to Stochastic Multiple Regression Analysis. Journal of the Royal Statistical Society: Series B (Methodological) 41, 235–248. [Google Scholar]
- [33].Leday G. G. and Richardson S. (2019). Fast Bayesian inference in large Gaussian graphical models. Biometrics 75, 1288–1298. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [34].Hannart A. and Naveau P. (2014). Estimating high dimensional covariance matrices: A new look at the Gaussian conjugate framework. Journal of Multivariate Analysis 131, 149–162. [Google Scholar]
- [35].Van Wieringen W. N. and Peeters C. F. (2016). Ridge estimation of inverse covariance matrices from high-dimensional data. Computational Statistics and Data Analysis 103, 284–303. [Google Scholar]
- [36].Kuismin M. and Sillanpää M. J. (2016). Use of Wishart Prior and Simple Extensions for Sparse Precision Matrix Estimation. PLOS ONE 11, e0148171. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [37].Roweis S. (1998). EM algorithms for PCA and SPCA. Advances in Neural Information Processing Systems pp. 626–632. [Google Scholar]
- [38].Tipping M. E. and Bishop C. M. (1999). Probabilistic principal component analysis. Journal of the Royal Statistical Society. Series B: Statistical Methodology 61, 611–622. [Google Scholar]
- [39].Strober B. J., Wen X., Wucher V., Kwong A., Lappalainen T., Li X., and Liang Y. (2020). The GTEx Consortium atlas of genetic regulatory effects across human tissues. Science 18, 1318–1330. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [40].1000 Genomes Project Consortium. (2015). A global reference for human genetic variation. Nature 526, 68–74. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [41].Trubetskoy V., Pardinas A. F., Qi T., Panagiotaropoulou G., Awasthi S., Bigdeli T. B., Bryois J., Chen C. Y., Dennison C. A., Hall L. S., et al. (2022). Mapping genomic loci implicates genes and synaptic biology in schizophrenia. Nature 604, 502–508. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [42].Gelman A., Carlin J. B., Stern H. S., and Rubin D. B. (2013). Bayesian Data Analysis. (CRC Press; ). [Google Scholar]
- [43].Touloumis A. (2015). Nonparametric Stein-type shrinkage covariance matrix estimators in high-dimensional settings. Computational Statistics and Data Analysis Data Analysis 83, 251–261. [Google Scholar]
- [44].Chen Y., Wiesel A., Eldar Y. C., and Hero A. O. (2010). Shrinkage algorithms for MMSE covariance estimation. IEEE Transactions on Signal Processing 58, 5016–5029. [Google Scholar]
- [45].Boileau P., Hejazi N. S., van der Laan M. J., and Dudoit S. (2023). Cross-Validated Loss-based Covariance Matrix Estimator Selection in High Dimensions. Journal of Computational and Graphical Statistics 32, 601–612. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [46].Tong J., Hu R., Xi J., Xiao Z., Guo Q., and Yu Y. (2018). Linear shrinkage estimation of covariance matrices using low-complexity cross-validation. Signal Processing 148, 223–233. [Google Scholar]
- [47].Theiler J. (2012). The incredible shrinking covariance estimator. In Proc. SPIE 8391, Automatic Target Recognition XXII pp. 83910P. [Google Scholar]
- [48].Hoffbeck J. P. and Landgrebe D. A. (1996). Covariance matrix estimation and classification with limited training data. IEEE Transactions on Pattern Analysis and Machine Intelligence 18, 763–767. [Google Scholar]
- [49].Ye J. (1998). On measuring and correcting the effects of data mining and model selection. Journal of the American Statistical Association 93, 120–131. [Google Scholar]
- [50].Watanabe J. (2022). Statistics of eigenvalue dispersion indices: Quantifying the magnitude of phenotypic integration. Evolution 76, 4–28. [DOI] [PubMed] [Google Scholar]
- [51].Peña D. and Rodríguez J. (2003). Descriptive measures of multivariate scatter and linear dependence. Journal of Multivariate Analysis 85, 361–374. [Google Scholar]
- [52].Liu G. and Liang K. Y. (1997). Sample size calculations for studies with correlated observations. Biometrics 53, 937–947. [PubMed] [Google Scholar]
- [53].Udell M. and Townsend A. (2019). Why Are Big Data Matrices Approximately Low Rank? SIAM Journal on Mathematics of Data Science 1, 144–160. [Google Scholar]
- [54].Baglama J. and Reichel L. (2005). Augmented Implicitly Restarted Lanczos Bidiagonalization Methods. SIAM Journal on Scientific Computing 27, 19–42. [Google Scholar]
- [55].Berisa T. and Pickrell J. K. (2016). Approximately independent linkage disequilibrium blocks in human populations. Bioinformatics 32, 283–285. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [56].Sun Q. and Li Y. (2025). Advances in haplotype phasing and genotype imputation. Nature Reviews Genetics pp. 1–15. [DOI] [PubMed] [Google Scholar]
- [57].Ziaei Jam H., Li Y., DeVito R., Mousavi N., Ma N., Lujumba I., Adam Y., Maksimov M., Huang B., Dolzhenko E., et al. (2023). A deep population reference panel of tandem repeat variation. Nature Communications 14, 6711. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [58].Zeng B., Bendl J., Kosoy R., Fullard J. F., Hoffman G. E., and Roussos P. (2022). Multi-ancestry eqtl meta-analysis of human brain identifies candidate causal variants for brain-related traits. Nature genetics 54, 161–169. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [59].Balendra R. and Isaacs A. M. (2018). C9orf72-mediated als and ftd: multiple pathways to disease. Nature Reviews Neurology 14, 544–558. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [60].Schwartzentruber J., Cooper S., Liu J. Z., Barrio-Hernandez I., Bello E., Kumasaka N., Young A. M., Franklin R. J., Johnson T., Estrada K., et al. (2021). Genome-wide meta-analysis, fine-mapping and integrative prioritization implicate new alzheimer’s disease risk genes. Nature genetics 53, 392–402. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [61].Rattanapornsompong K., Rinkrathok M., Sriwattanapong K., Shotelersuk V., and Porntaveetus T. (2024). Functional and pathogenic insights into cnnm4 variants in jalili syndrome. Scientific Reports 14, 29091. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [62].Warton D. I. (2008). Penalized normal likelihood and ridge regularization of correlation and covariance matrices. Journal of the American Statistical Association 103, 340–349. [Google Scholar]
- [63].Donoho D., Gavish M., and Johnstone I. (2018). Optimal shrinkage of eigenvalues in the spiked covariance model. The Annals of Statistics 46, 1742–1778. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [64].Han B., Duong D., Sul J. H., de Bakker P. I., Eskin E., and Raychaudhuri S. (2016). A general framework for meta-analyzing dependent studies with overlapping subjects in association mapping. Human Molecular Genetics 25, 1857–1866. [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.






