Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2026 Jun 10.
Published before final editing as: J Comput Graph Stat. 2026 May 29:10.1080/10618600.2026.2653766. doi: 10.1080/10618600.2026.2653766

Empirical Bayes Covariance Decomposition, and a Solution to the Multiple Tuning Problem in Sparse PCA

Joonsuk Kang a, Matthew Stephens b
PMCID: PMC13249372  NIHMSID: NIHMS2181858  PMID: 42272641

Abstract

Sparse Principal Components Analysis (PCA) has been proposed as a way to improve both interpretability and reliability of PCA. However, use of sparse PCA in practice is hindered by the difficulty of tuning the multiple hyperparameters that control the sparsity of different PCs (the “multiple tuning problem”, MTP). Here we present a solution to the MTP using Empirical Bayes methods. We first introduce a general formulation for penalized PCA of a data matrix X, which includes some existing sparse PCA methods as special cases. We show that this formulation also leads to a penalized decomposition of the covariance (or Gram) matrix, XTX. We introduce empirical Bayes versions of these penalized problems, in which the penalties are determined by prior distributions that are estimated from the data by maximum likelihood rather than cross-validation. The resulting “Empirical Bayes Covariance Decomposition” provides a principled and efficient solution to the MTP in sparse PCA, and one that can be immediately extended to incorporate other structural assumptions (e.g., non-negative PCA). We illustrate the effectiveness of this approach on both simulated and real data examples.

Keywords: Covariance decomposition, Dimension reduction, Empirical Bayes, Factor analysis, Multiple tuning problem, Sparse principal component analysis

1. Introduction

Principal components analysis (PCA, Pearson 1901) is a popular dimension reduction technique for revealing structure in data. However, when applied to large datasets, PCA results are often difficult to interpret. To address this, many authors have considered modifications of PCA that use sparsity to help produce more interpretable results. Early versions of this idea arose in the literature on Factor Analysis, where practitioners applied rotations to post-process results from PCA, or related techniques, to obtain sparse solutions; see Rohe and Zeng (2023) for interesting background and discussion. More recently, many authors have introduced “sparse PCA” (sPCA) methods that directly incorporate notions of sparsity into the inference problem (e.g., d’Aspremont et al. 2004; Zou et al. 2006; Witten et al. 2009; Journée et al. 2010; Ma 2013).

There exist several different characterizations of PCA, which are equivalent, but lead to different sparse versions (Zou and Xue 2018; Guerra-Urzola et al. 2021). One characterization of PCA (Jolliffe 2002, section 3.5), and the one we focus on here, is that PCA finds a rank-K approximation of an N-by-P data matrix X,

X≈ZLT=∑k=1KzklkT (1)

where Z is an N-by-K orthogonal matrix ZTZ=IK,L is a P-by-K matrix, and zk,lk denote their kth columns respectively. Informally, the orthogonality of Z means also that

XTX≈LZTZLT=LLT=∑k=1KlklkT. (2)

Thus, PCA simultaneously provides an approximate decomposition of the data matrix (1) and of the covariance matrix (2) into a sum of K parts. Similarly, some sparse versions of PCA (e.g., Witten et al. 2009; Journée et al. 2010) provide sparse versions of these decompositions, in which the matrix L is sparse. Assuming sparsity of L can improve accuracy of the estimated L, and help make these decompositions more interpretable.

An important practical issue in sPCA is deciding how sparse to make each vector lk. A natural idea is to have the sparsity of each lk be controlled by a hyperparameter that is tuned by cross-validation (CV). However, simultaneously tuning K hyperparameters by CV becomes computationally impractical for moderate K (Zou and Xue 2018; Feng and Simon 2020). We call this the “Multiple Tuning Problem” (MTP).

Here we present a novel sPCA method that solves the MTP by leveraging the empirical Bayes (EB) framework. Within the EB framework, penalties come from priors, whose hyperparameters are learned from data. This approach, which seamlessly integrates hyperparameter tuning into the fitting algorithm, offers a compelling computationally-practical alternative to tuning hyperparameters by CV. The EB approach is quite flexible, and although we focus here on sparsity, it could also be used to impose constraints such as non-negativity on L. Our approach differs from previous EB approaches to matrix factorization (Wang and Stephens 2021; Zhong et al. 2022) in providing a sparse covariance decomposition (2) as well as a data matrix decomposition (1), and so we call it “Empirical Bayes Covariance Decomposition” (EBCD).

The remainder of the paper is organized as follows. Section 2 introduces a simple and general penalized PCA criterion and a corresponding optimization algorithm, and shows how the criterion can also be interpreted as a penalized covariance decomposition problem. Section 3 introduces the empirical Bayes formulation, Section 4 discusses practical considerations and Section 5 presents empirical results. Finally, Section 6 discusses extensions beyond sparsity.

2. A Penalized PCA Criterion, and Its Corresponding Penalized Covariance Decomposition Criterion

2.1. A Penalized PCA Criterion

To formalize (1) above, one characterization of PCA (Jolliffe 2002, section 3.5) is that it finds the best rank-K approximation of X in the sense that it solves the following optimization problem:

minZ∈𝒮(N,K),L∈M(P,K)12X−ZLTF2subjecttoLTLisdiagonal. (3)

where ℳ(N,K) denote the set of N-by-K real matrices, 𝒮(P,K)=M∈ℳ(P,K):MTM=IK denote the set of P-by-K orthonormal matrices, and ‖A‖F denotes the Frobenius norm of the matrix A. The matrices Z and L are sometimes called the component score and component loading matrices respectively. The diagonal restriction on LTL can be equivalently phrased as assuming L is orthogonal.

Based on (3), we propose the following penalized PCA criterion, obtained by replacing the orthogonality restriction on L with a penalty term, which might, for example, encourage L to be sparse:

minZ∈𝒮(N,K),L∈M(P,K)hP,λ(L,Z;X)≔12X−ZLTF2+∑k=1KPlk;λk (4)

where lk is the kth column of the matrix L and P(⋅;λ) is a penalty function with hyperparameter λ whose value determines the strength of the penalty. The multiple tuning problem (MTP) described in the Introduction refers to the difficulty of appropriately tuning the K hyperparameters λ=λ1,…,λK. In this section we assume λ to be fixed and known; in the next section we address how it can be automatically tuned using EB methods, thus addressing the MTP.

2.2. A Penalized Covariance Decomposition Criterion

Solving (4) yields an approximate decomposition of the data matrix X≈ZLT with L sparse (assuming that the penalty P is sparsity-inducing). As outlined in the Introduction (2), because of the orthonormality constraint Z∈𝒮(N,K), this also yields an approximate decomposition XTX≈LLT with L sparse. This result is formalized in the following theorem (see Supplementary Appendix B for proof):

Theorem 1. Let (Zˆ,Lˆ) denote a solution to (4). Then Lˆ also solves

Lˆ∈argminL∈ℳ(P,K)12d*XTX,LLT2+∑k=1KPlk;λk (5)

where d* denotes the Bures-Wasserstein distance between two symmetric positive semi-definite (PSD) matrices (Bhatia et al. 2019).

Theorem 1 characterizes LˆLˆT as an optimal (penalized) approximation to the Gram matrix XTX. If X has centered columns then the Gram matrix is proportional to the covariance matrix, and so we call (5) a “penalized covariance matrix criterion”. Simultaneously providing an approximation to both XTX and X could be seen as a fundamental characteristic of PCA that is not generally shared by other matrix factorization methods. For this reason we view the orthonormality constraint on Z, which is crucial to Theorem 1, as a fundamental feature that distinguishes our work here from similar approaches that do not have this constraint (e.g., Wang and Stephens 2021; Zhong et al. 2022).

We emphasize two main contributions of Theorem 1. The first is conceptual: it characterizes the sense in which solving (4) finds an L such that the penalty is small and LLT≈XTX. Although our focus here is on sparsity-inducing penalties, the result applies more generally. For example, Theorem 1 shows that solving (4) with a penalty that disallows negative entries in L (see Li et al. 2021) is a form of symmetric non-negative matrix factorization (He et al. 2011). The second contribution is computational. The Theorem shows that the optimal Lˆ depends on X only through XTX. Thus, the Lˆ for an observed data matrix Xobs can be found by solving (4) using X=C for any C such that CTC=XobsTXobs. This allows Lˆ to be computed given access only to XobsTXobs, and not Xobs; it could also have computational benefits if P≪N since C can be a P×P matrix, much smaller than the N×P matrix Xobs. (Computationally, (5) is less convenient to deal with than (4), so all our algorithms work by solving the latter.)

2.3. Uniting Previous Sparse PCA Methods

Although (4) provides a natural formulation of sPCA, most previous methods have not been explicitly framed as optimizing this criterion; see Van Deun et al. (2011) for an exception. Nonetheless, several previous sPCA methods are either equivalent to, or closely related to, solving (4) with some choice of penalty.

The sparse principal components (SPC) method of Witten et al. (2009) (their Algorithm 2) can be interpreted as a greedy algorithm for solving (4) with an L1 penalty Plk;λk=λklk1). Specifically, their Algorithm 2 solves a rank-1 (K=1) version of the problem to obtain the first sparse PC, and then obtains subsequent components by “deflation” (Mackey 2008).

Similarly, the generalized power (GPower) method of Journée et al. (2010) is closely connected to solving (4) with an Elastic Net (EN) penalty (Zou and Hastie 2005), Plk;λk=λk,1lk1+λk,2lk22. Specifically, with an EN penalty, the criterion (4) can be written as

maxμ1,…,μKmaxZ:ZTZ=IK,L:lk=μktrXTZLT−∑k=1Kλk,1lk1−∑k=1K12+λk,2μk2. (6)

The GPower criterion coincides with the inner maximization over Z and L under the restriction ZTZ=IK,lk=μk. (In GPower the column-wise vector norms μ1,…,μK are considered as hyperparameters that must be pre-specified, whereas our formulation suggests an alternative approach where λk,2 are pre-specified and the μk are maximized over.)

Finally, the USLPCA method of Adachi and Trendafilov (2016) is closely related to (4) with an L0 penalty (Plk;λ=λIk0) and using the same hyperparameter λ for all columns; the main difference is that they use a constraint formulation rather than a penalty.

2.4. BISPCA, a “Block” Algorithm for Penalized PCA

A natural strategy for optimizing the penalized PCA criterion (4) is block coordinate descent, alternating between minimizing over Z with L fixed (the “rotation” step) and over L with Z fixed (the “shrinkage” step). We call this approach the Block-Iterative-Shrinkage PCA (BISPCA) algorithm. We briefly outline the two main steps in this algorithm.

2.4.1. Optimizing Over Z (Rotation Step)

Optimizing hP,λ(L,Z;X) over Z does not depend on the penalty, and has a well-known solution based on the polar decomposition (e.g., Zou et al. 2006): ZˆL,X≔Polar.U(XL), where Polar.U is defined as follows.

Definition 1 (U factor of Polar decomposition). For M any real-valued matrix, with SVD M=UDVT, define Polar. U(M)≔UVT.

2.4.2. Optimizing Over L (Shrinkage Step)

To simplify this step we assume that the penalty term is separable, in that ∑kPlk;λk=∑p,kρlp,k;λk for some 1-dimensional penalty function ρ. Optimizing hP,λ(L,Z;X) over L then splits into PK independent problems, and

lˆp,k=argminl12l−θp,k2+ρl;λk, (7)

where θp,k≔xpTzk. The solution to this problem, Sρθp,k;λk, depends on the penalty function ρ⋅;λk, and is referred to as the “proximal operator” of ρ⋅;λk. It has a closed-form solution for some widely-used penalties. Common examples include the soft thresholding operator for the L1 penalty and the hard thresholding operator for the L0 penalty (Parikh and Boyd 2014).

2.5. Connections with Other Algorithms

Table 1 summarizes the BISPCA algorithm, and compares it with previous sPCA algorithms, highlighting their shrinkage, rotation, and deflation steps, as well as the role of penalty hyperparameters.

Table 1.

Sparse PCA algorithms. Sρ⋅;λk denotes the proximal operator of the penalty function ρ⋅;λk, and S1 denotes the soft thresholding operator, which is the proximal operator of the L1 penalty. We use Sρ(A;λ) to denote the vector whose kth element is Sρak;λk. the U factor of the polar decomposition is denoted as polar.U, and the Q factor of the QR decomposition is denoted as QR.Q.Z⊥ represents an orthonormal basis that is orthogonal to 2. the function G calculates the estimated prior from the empirical bayes normal means model, and the function S returns the corresponding posterior mean vector (see definition 2). For simplicity all methods except EBCD-MM are presented in their form for fixed values of the penalty hyperparameters, without tuning; EBCD-MM is self-tuning because it updates the priors gk.

Method Shrinkage step Rotation step Deflation step
BISPCA(Section 2, this paper) Ik←SρXTzk;λk
[equivalently, L←SρXTPolar.UXL;λ]
Z←Polar.UXL NA
SPC(Witten et al., 2009) Ik←S1RkTzk;λk θk←Zk−1⊥TRkIkZk−1−TRkIk2zk←Zk−1⊥θk Rk=X−∑k′=1k−1Zk′Ik′T
GPower(Journée et al., 2010) Ik←S1XTzk;λk,1Ik←μkIk/Ik2 Z←Polar.UXL NA
ITSPCA(Ma, 2013) L←QR.QSρXTXL;λ NA
EBCD-MM(Section 3, this papa) gk←GXTzk,1/τ,𝒢I¯k←SXTzk,1/τ,gk Z←Polar.UXL¯ NA

With no penalty (or constant penalty) BISPCA is a simple variation on the standard “orthogonal iteration” method for standard PCA (Wilkinson 1965; Golub and Van Loan 2013). Specifically, in this case the BISPCA updates simplify to Z←Polar.U(XXTZ), whereas standard orthogonal iteration uses Z←QR.Q(XXTZ) where QR.Q denotes the orthogonal Q factor of the QR decomposition. That is, BISPCA simply uses Polar.U as an alternative orthogonalization to QR.Q. Under mild conditions, under either of these iterates, the range of Z converges to the leading eigenspace of XXT.

With an L1 penalty, the proximal operator Sρ is soft thresholding, and BISPCA is closely related to both SPC and GPower algorithms, which also alternate between rotation and soft-thresholding steps. The key difference between BISPCA and SPC is that BISPCA optimizes over all columns of L jointly, whereas SPC optimizes them sequentially (i.e., in a greedy way). The difference between the BISPCA algorithm (with L1 penalty) and GPower is that GPower adds a normalization step lk←μklk/lk2, which requires specifying the column norms μk. (Recall that GPower corresponds to an EN penalty, which explains this need to specify additional parameters.)

Finally, we contrast BISPCA with the iterative thresholding sparse PCA (ITSPCA) algorithm of Ma (2013). Whereas ITSPCA iterates L←QR.QSρXTXL;λ, BISPCA iterates L←SρXTPolar.U(XL);λ where Sρ(M;λ) denotes applying the proximal operator to each column of the matrix M, that is, Sρ(M;λ)=Sρm1;λ1,…,SρmK;λK. Written this way, the updates appear similar, but with a different order of the shrinkage and orthogonalization steps, and with different orthogonalization approaches (QR.Q vs Polar.U). A conceptual advantage of BISPCA is that it is designed to optimize an explicit objective function (4); in contrast ITSPCA is simply an algorithmic modification of orthogonal iteration, and it is unclear what it optimizes or whether it is guaranteed to converge. Furthermore, because ITSPCA enforces orthogonality after shrinkage, sparsity of the final L is not guaranteed.

3. An Empirical Bayes Solution to the MTP

An important problem remains: choosing the penalty function and tuning its hyperparameters, particularly when different components require different sparsity levels. Here we propose an Empirical Bayes solution to these problems, in which the penalty is determined by a prior distribution, and the “tuning” takes place by estimating the prior distribution from the data. This is accomplished by a simple modification of the iterative BISPCA algorithm.

3.1. The EBCD Model

Motivated by the criterion (4) we consider the following empirical Bayes (EB) model:

X=ZLT+E (8)
lp,k~indepgk∈𝒢 (9)
en,p~iidN(⋅;0,1/τ) (10)

where Z∈𝒮(N,K), and L is independent of E. We refer to this as an EB model because the column-wise prior distributions g≔gkk=1K are to be estimated from the data (subject to the constraint that they come from some prespecified prior family 𝒢, which may be parametric or nonparametric). The model is closely related to the EBMF model of Wang and Stephens (2021), and the EB-PCA model of Zhong et al. (2022), but with the key difference that our model replaces a prior on Z with an orthonormality constraint. We will show that fitting this model is equivalent to optimizing a penalized criterion (4) (or (5)) with a penalty whose form is estimated from the data. Consequently, it is also equivalent to optimizing a penalized covariance decomposition criterion (5). This latter property distinguishes it from the EBMF model, and so we refer to the model (8)–(10) as the “Empirical Bayes Covariance Decomposition” (EBCD) model.

3.2. Fitting the EBCD Model

3.2.1. A Unified Optimization Approach: ELBO Maximization

A standard EB approach to fitting (8)–(10) would usually be phrased as a two-step procedure: (i) estimate (gˆ,Zˆ,τˆ) by maximizing marginal log-likelihood

(gˆ,Zˆ,τˆ)≔argmaxg,Z,τlog∫p(X∣Z,L,τ)p(L∣g)dL (11)

and (ii) compute the conditional posterior for L,

qˆ(L)≔p(L∣gˆ,Zˆ,τˆ,X)∝gˆ(L)p(X∣Zˆ,L,τˆ). (12)

One might typically report the mean of qˆ,Lˆ≔Eqˆ(L) as a point estimate for L.

The two-step procedure (11)–(12) can be usefully rephrased as solving a single optimization problem (e.g., see Supplementary Appendix B1.1. in Wang et al. 2020):

(gˆ,Zˆ,τˆ,qˆ)=argmaxg∈𝒢,Z,τ,qF(g,Z,τ,q) (13)

where

F(g,Z,τ,q)≔Eqlogp(X∣Z,L,τ)−KL(q‖g). (14)

Here, q can be any distribution on L,Eq denotes expectation over L having distribution q, and KL(q‖g)=Eqlogq(L)g(L) denotes the KL divergence from g to q. The function F is often referred to as the “evidence lower bound” (ELBO) (While the ELBO is often used in the context of variational approximations, note that here we do not impose any constraint on q, so optimizing F is exactly equivalent to the two-step EB procedure (11)–(12).

3.2.2. Preliminary: EBNM Problems

Similarly to Wang and Stephens (2021), optimizing F over g,q ends up requiring the solution to a simpler EB problem known as the “empirical Bayes normal means” problem. That is, one needs a function, EBNM, defined as follows.

Definition 2. Let EBNMx,s2,𝒢 denote a function that returns the EB solution to the following normal means model:

xp∣ηp,s2~indepNxp;ηp,s2 (15)
ηp~iidg∈𝒢, (16)

for p=1,…,P where 𝒢 is a pre-specified prior family. More precisely,

EBNMx,s2,𝒢≔argmaxg∈𝒢,qEqlogpx∣η,s2−KL(q‖g) (17)

where the optimization of q is over all possible distributions on η=η1,…,ηP and KL(q‖g)=Eqlogq(L)g(L) denotes the KL divergence from g to q.

Efficient EBNM solver implementations exist for a wide range of prior families 𝒢; see Willwerscheid et al. (2025).

3.2.3. ELBO Maximization with EBNM Solvers

With the EBNM function in hand, F can be optimized as in the following Proposition (see Supplementary Appendix C for proof).

Proposition 1. Maximizing the evidence lower bound F(g,Z,τ,q) (14) subject to ZTZ=IK can be achieved by iteratively updating (g,q), updating Z, and updating τ, as follows:

EBNMstep:foreachk∈[K],gk,qk←EBNMXTzk,1/τ,𝒢, (18)
Rotationstep:Z←Polar.U(XL¯), (19)
Precisionstep:τ←NP/‖X−ZL¯T‖F2+‖V‖1,1 (20)

Here L¯=Eq(L),V is the matrix with vp,k=Varqklp,k, and ‖V‖1,1=∑p=1P∑k=1Kvp,k.

This algorithm is similar to that for EBMF in Wang and Stephens (2021), but with the important distinction that here, due to the orthogonality constraint on Z, the EBNM updates for l1,…,lK decouple and can be carried out independently.

To clarify the connection with the penalized PCA algorithms, fix τ and separate the EBNM step into estimation of the prior and computation of the posterior mean: let Gx,s2,𝒢 denote the optimal prior returned by EBNMx,s2,𝒢, and Sx,s2,g≔Eη∣x,s2,g denote the corresponding posterior mean. Then the updates (18)–(19) can be rewritten as

gk←GXTzk,1/τ,𝒢 (21)
l¯k←SXTzk,1/τ,gk (22)
Z←Polar.UXL¯. (23)

We call this algorithm EBCD-MM because it can be framed as a “minorization-maximization” (MM) algorithm to optimize the EBCD criterion, the minorization being given by F in (14). Comparing EBCD-MM with BISPCA (Table 1), we see that in EBCD-MM Sx,s2,g plays the same role as the proximal operator in BISPCA. For certain classes of prior 𝒢, including the point-Laplace prior we use later, S is a shrinkage operator satisfying Sx,s2,g≤|x| elementwise. In EBCD, the form and strength of this shrinkage are determined by the data through the estimated priors gk and precision τ. Estimating these quantities automatically tunes the penalty parameters, solving the MTP.

3.3. Connecting EBCD and Penalized Criteria

The algorithmic similarity between EBCD-MM and BISPCA reflects a deeper connection: for fixed g,τ, EBCD is a penalized PCA approach, with a penalty that depends on g,τ. This is formalized in the following Proposition:

Proposition 2. Define

F~g,Z,τ,L¯≔maxq:EqL=L¯Fg,Z,τ,q. (24)

Then

F~(g,Z,τ,L¯)=−12X−ZL¯TF2+∑k,pPτ,gkl‾pkτ (25)

where the penalty terms are given by

Pτ,g(l‾)=N2Kτlog2πτ+12minq:Eq[l]=l‾varq(l)+2τKL(q‖g). (26)

Although the penalty Pτ,g does not, in general, have a closed form, it does have some convenient properties; for example, its proximal operator Sρ is the posterior mean from a normal means problem, which has a closed form for many choices of prior g. See Kim et al. (2024) for some other relevant results.

Since EBCD is a penalized PCA method, the ideas from Section 2.2 apply. Thus EBCD is also a penalized covariance decomposition, and the solution for an observed data matrix Xobs can be computed by applying the EBCD-MM algorithm to X=C where C is any matrix such that CTC=XobsTXobs. (The results from Section 2.2 concern fixed g,τ, but it is straightforward to extend these results to estimating g,τ). Note that step (20) requires N, the number of rows of Xobs, which may differ from the number of rows of C.

3.4. Variations and Extensions

Supplementary Appendix E describes variations of EBCD that rescale the orthogonality constraint on Z (which yields a formulation with a natural population interpretation) and extend the model to allow for column-wise variances.

4. Practical Issues

4.1. Initialization

Both the penalized PCA criterion and the EBCD criterion are non-convex, so solutions may depend on initialization. We adopt a simple and effective greedy strategy that sequentially adds columns to L and Z. Each step is initialized using a rank-one (unpenalized) truncated SVD of the current residual matrix. To enforce that the newly added column zk is orthogonal to the existing columns of Zk−1, we use the rotation step of SPC (Witten et al. 2009) (see Table 1) as our “greedy rotation step”:

zk←NgreedyrotationZk−1,Rk,lk≔NZk−1⊥Zk−1⊥TRklkZk−1⊥TRklk2. (27)

After K columns have been added the criterion can be further optimized by applying EBCD-MM, a process referred to as “backfitting” in Wang and Stephens (2021). For completeness we give the full procedure in Algorithm 1.

4.2. Choice of K

As noted in Wang and Stephens (2021), the EB approach provides a way to automatically select K. Provided the prior family 𝒢 includes the distribution δ0, a point mass at 0, then the EBCD criterion may be optimized with some gk=δ0, and hence l¯k=0. Algorithmically, the greedy procedure in Algorithm 1 can be terminated the first time that l¯0=0, providing an automatic way to stop adding factors. Alternatively the algorithm can, of course, be run with a user-specified choice of K.

4.3. Choice of Prior

The posterior mean shrinkage operator S in EBCD depends on the prior g, thus on the choice of the prior family 𝒢. For sparse PCA one would choose a sparsity-inducing prior family; one could alternatively use non-negative prior families to induce non-negative PCA, or fully nonparametric prior families (as in Zhong et al. 2022) for a more flexible regularized PCA, although we do not explore these options further here.

While several choices of sparse family are possible, here we use the “point Laplace” prior, a spike and slab prior with Laplace slab, as it offers a wide range of shrinkage behaviors while remaining computationally convenient:

𝒢=g:g(x)=(1−π)δ0(x)+πLaplacex;0,bforsomeπ∈[0,1],b>0} (28)

where Laplace (⋅;μ,b) denotes the Laplace density with location μ and scale b. Varying the prior parameters (π,b) allows for flexible shrinkage behaviors (Figure 1). We refer to EBCD with this specific prior as EBCD-pl.

Figure 1.

Figure 1.

Examples of posterior mean shrinkage operator Sx,s2=1,g=g(⋅;π,b) induced by laplace slab priors g(x;π,b)=(1−π)Δ0(x)+π Laplace (x;0,b). Note how π controls shrinkage near 0 (small π yielding more shrinkage), while the scale parameter controls shrinkage further away from 0.

4.

5. Empirical Results

5.1. Simulation

We compare EBCD-pl with several competing methods, including PCA, L1-penalized PCA (our penalized PCA criterion (4) with an L1 penalty), SPC, GPower, and empirical Bayes matrix factorization. To avoid the MTP, we implemented a single tuning parameter for L1-penalized PCA and GPower; we applied SPC with a deflation scheme and greedy hyperparameter optimization. Following Journée et al. (2010) we fix GPower hyperparameters μ1,μ2=(1,0.5).

We also compare with EBCD-l (EBCD with column-wise Laplace priors), EBMF-n/l (EBMF with column-wise normal priors on Z and column-wise Laplace priors on L), EBMF-n/pl (EBMF with column-wise normal priors on Z and column-wise point-Laplace priors on L), and empirical Bayes PCA (EB-PCA). Although we believe that Laplace priors are not sufficiently expressive for sparse PCA, we include EBCD-l and EBMF-n/l to facilitate comparison with L1-penalty-based methods. Similarly, we include EBMF-n/pl to compare with EBCD-pl and assess the impact of orthogonality restriction.

We consider two simulation settings, each with x1,…,x50~N500(0,Σ), where the 500 × 500 covariance matrix Σ is given by:

Setting1.Σ=399v1v1T+299v2v2T+I500

where the PCs v1,v2 are given by v1,j=1j∈[1,10]/10 and v2,j=1j∈[11,20]/10. This setting comes from Shen and Huang (2008) and Journée et al. (2010);

Setting2.Σ=9v1v1T+7v2v2T+4v3v3T+I500

where v1,j=1j∈[1,10]/10,v2,j=1j∈[11,50]/40, and v3,j=1j∈[51,150]/100. This setting illustrates the effect of non-equal sparsity level in the PCs.

For each setting we simulate 50 datasets and measure performance by three measures: i) the angle between the true PC and its estimate: for each PC i, the angle is defined as di=∠vi,iˆi/π2 where ∠(⋅,⋅) denotes the angle between two vectors; ii) the difference between the population covariance matrix and the estimated 1NLˆLˆT:dcov=Σ−1NLˆLˆTF; iii) the distance with optimal rotation, which measures the proximity of two subspaces: dor=minR∈𝒪K×K‖L~R−V‖F where 𝒪K×K is the set of K-by-K orthonormal matrices, V is v1,v2 in Simulation 1 and v1,v2,v3 in Simulation 2, and L~ is an orthonormal basis of the subspace spanned by estimated loading Lˆ.

The run-time for EBCD-pl was comparable to that of other sPCA methods. (In Simulation 1, average run-times for each dataset were: EBCD-pl 2.40s, EBCD-l 0.56s, EBMF-n/pl 0.19s, EBMF-n/l 0.20s, SPC 1.47s, GPower 0.11s, L1-penalized PCA 0.43s, EB-PCA 0.28s, and PCA 0.01s. For Simulation 2, average run-times were EBCD-pl 2.33s, EBCD-l 2.45s, EBMF-n/pl 0.25s, EBMF-n/l 0.19s, SPC 2.44s, L1-penalized PCA 1.51s, EB-PCA 0.64s, and PCA 0.01s.) Note that L1-penalized PCA and GPower with equality restriction were optimized over a one-dimensional hyperparameter grid, not over a two-dimensional or three-dimensional grid, which could increase the run-time substantially. Runtimes can vary across software environments, so comparisons should be interpreted qualitatively.

Figure 2 summarizes the results. EBCD-pl outperforms other methods, with L1-penalized PCA ranking second. The benefits of EBCD-pl over L1-penalized PCA are most pronounced in Simulation 2, where the true PCs have different sparsity levels. However, even in this setting, the performance of L1-penalized PCA is impressive despite the equality restriction on the penalty. The superiority of L1-penalized PCA over SPC is presumably due in part to its use of a joint optimization scheme in place of a greedy/sequential approach. Its superiority compared with the GPower method may reflect difficulty in selecting the hyperparameter μ in GPower. Indeed, we excluded GPower results in Simulation 2 as we found it hard to specify this parameter.

Figure 2.

Figure 2.

Simulation results comparing the performance of different methods in terms of three measures: angle between true and estimated principal components (PCs), difference between population covariance matrix and estimated covariance matrix, and distance with optimal rotation.

The performance differences between EBCD-pl and EBCD-l highlight the importance of selecting a flexible prior family. While EBCD-l and L1-penalized PCA perform similarly in Simulation 1, EBCD-l tends to outperform in Simulation 2, underscoring the increasing restrictiveness of the equality constraint. In Simulation 1, EBMF-n/pl and EBMF-n/l perform similarly to EBCD-pl and EBCD-l, respectively. However, in Simulation 2 their performance declines due to the omission of one, two, or even all three factors during estimation. This result illustrates the impact of the orthogonality assumption in EBCD.

5.2. Stock Market Data

To illustrate our method’s effectiveness in producing interpretable results, we applied EBCD-pl to S&P500 sector returns from January 1, 2020, to November 29, 2022, covering the COVID pandemic. The data consist of daily log returns for N=734 trading days across P=11 Global Industry Classification Standard (GICS) sectors. The time period and GICS sectors match those analyzed in an article in The Economist (2022).

We applied EBCD-pl, EBCD-l, L1-penalized PCA, SPC and classical PCA to these data. The first three classical PCs explain 90.54% of total variance, with a sharp drop-off in signal after this point (the first five PCs explain 72.49%, 11.91%, 6.14%, 2.40%, and 1.66%) and so we focus comparisons on the first three PCs. The L1-penalized PCA and SPC results are almost identical to the PCA result. In contrast the three PCs estimated by EBCD-pl differ from classical PCA, both in their PVEs (66.99%, 16.35%, and 7.13%) and in the qualitative features of their loadings after the first PC (Figure 3).

Figure 3.

Figure 3.

Comparison of PCA loadings with posterior mean loadings from EBCD-pl (after post-processing to have unit norm).

The results of EBCD-pl and EBCD-l are similar for these data, but EBCD-pl produces slightly sparser results, as expected given the differences in the expressiveness of the two prior distributions. For example, the loadings for information technology and consumer staples in PC2, and the loadings for health care and materials in PC3, illustrate this difference. Comparing EBCD-l with L1-penalized PCA, the equality restriction appears too restrictive in this setting, as it fails to account for the varying sparsity levels across the principal components.

We attribute the difference in behavior between EBCD-pl (and EBCD-l) vs SPC as primarily due to the fact that SPC uses a greedy/sequential optimization approach, whereas EBCD-pl performs joint optimization. When signal is strong, sequentially estimated sparse PCs may not deviate much from classical PCs. In contrast, the joint optimization in the EBCD-pl algorithm (backfitting stage in Algorithm 1) allows EBCD-pl to move some of the explanatory power of the first PC to other PCs in order to increase sparsity. Interestingly this is done at almost no expense of total PVE explained by the first three PCs: cumulatively, the three EBCD-pl PCs explain 90.47% of the variation, very similar to the 90.54% of classical PCA. This highlights a benefit of joint optimization methods for sparse PCA, compared with the widely-used sequential schemes.

The first PC (both classical and EBCD-pl) loads roughly equally on all sectors, and so captures the tendency of sectors to move together as the market varies. To describe the loadings on the second and the third EBCD-pl PCs, we group the sectors into four groups: energy, materials, industrials, and financials (EMIF); consumer staples, utilities, real estate (SUR); information technology, consumer discretionary, and communication services (TDC); and health care. The second EBCD-pl PC captures the EMIF sector, and the third EBCD-pl PC captures the contrast between SUR and TDC.

These EBCD-pl results can be interpreted in the context of the Fama-French three-factor model (Fama and French 1993), which is the standard model in finance that explains variation in stock prices by three factors: the market factor (roughly, overall average performance of all stocks), the size factor (SMB, for small minus big, contrasting stocks with small vs big market capitalization), and the growth/value factor (HML, for high minus low, contrasting high value stocks, which have high book-to-market value ratio, with growth stocks which have low book-to-market ratio). The first EBCD-pl PC captures the market factor, whereas the second and third PCs partition the sectors into three groups: the TDC group contains the growth sectors; the EMIF group contains the strong value sectors with smaller sizes and the SUR group contains the moderately value sectors with larger sizes. This is illustrated graphically in Figure 4, which shows each sector in the Fama-French SMB-HML plane (data from the Data Library maintained by Kenneth R. French), colored according to loading on the second and third PCs. The colorings for EBCD-pl PCs clearly capture contiguous regions of the plane. In contrast the classic PCs do not align so closely with the Fama-French factors; in particular the third PC groups the energy sector with TDC, which do not fall together in the SMB-HML plane.

Figure 4.

Figure 4.

Sectors projected on the SMB-HML plane. Each sector is positioned according to its loadings on the Fama-French SMB and HML factors, and is colored based on its loadings on the second and third principal components (PCs) from the EBCD-pl method (or PCA).

6. Discussion

We introduced a simple penalized PCA criterion, (4) that unites some existing sparse PCA methods (SPC and GPower). We showed that this criterion has the property of simultaneously providing a decomposition of both the data matrix and the covariance, or Gram, matrix. To address the challenge of tuning multiple hyperparameters, we proposed an empirical Bayes approach that integrates hyperparameter tuning directly within the algorithm. The result is an empirical Bayes approach to covariance decomposition (EBCD), which we found in simulations can outperform existing methods for sparse PCA.

While we have focused here on sparsity, our EBCD approach is quite general, and other structures can be easily incorporated simply by changing the prior family used. For example, replacing the point-Laplace prior family we used here with a point-Exponential prior family immediately leads to a new EB method for sparse, non-negative PCA (Zass and Shashua 2006) and, simultaneously, a version of semi-nonnegative matrix factorization (Ding et al. 2010). The non-negative constraint may provide more interpretable covariance decompositions in many applications; see Li et al. (2021) for interesting recent work in this direction. Another interesting possibility to improve interpretation is to use binary or near-binary priors, which would lead to empirical Bayes versions of additive clustering (Shepard and Arabie 1979); see also Kueng and Tropp (2021); Sørensen et al. (2022); Kolomvakis and Gillis (2023); Liu et al. (2023). Similarly, one could obtain an EB version of “functional PCA” (Ramsay and Silverman 2005) by replacing the sparse prior with a “spatial” prior that encourages ηi−ηi+1 (in Definition 2) to be typically small. EBNM solvers for a range of priors are implemented in the EBNM package (Willwerscheid et al. 2025), and an EBNM solver for a spatial prior is implemented using wavelet methods in Xing et al. (2021), and any of these could be immediately plugged into Algorithm 1. It is, however, possible that some prior families may require careful attention to initialization to yield good performance.

Supplementary Material

Supp 1

Supplementary materials for this article are available online. Please go to www.tandfonline.com/r/JCGS.

Funding

This work was supported by the NHGRI at the National Institutes of Health under award number 5R01HG002585.

Footnotes

Disclosure Statement

The authors report there are no competing interests to declare.

References

  1. Adachi K, and Trendafilov NT (2016), “Sparse Principal Component Analysis Subject to Prespecified Cardinality of Loadings,” Computational Statistics, 31, 1403–1427. DOI: 10.1007/s00180-015-0608-4. [DOI] [Google Scholar]
  2. Bhatia R, Jain T, and Lim Y (2019), “On the Bures–Wasserstein Distance between Positive Definite Matrices,” Expositiones Mathematicae, 37, 165–191. DOI: 10.1016/j.exmath.2018.01.002. [DOI] [Google Scholar]
  3. d’Aspremont A, Ghaoui L, Jordan M, and Lanckriet G (2004), “A Direct Formulation for Sparse PCA Using Semidefinite Programming,” in Advances in Neural Information Processing Systems (Vol. 17), Cambridge, MA: MIT Press. [Google Scholar]
  4. Ding CH, Li T, and Jordan MI (2010), “Convex and Semi-Nonnegative Matrix Factorizations,” IEEE Transactions on Pattern Analysis and Machine Intelligence, 32, 45–55. DOI: 10.1109/TPAMI.2008.277. [DOI] [PubMed] [Google Scholar]
  5. Economist. (2022), “America’s Best Firms…and the Rest: New Winners and Losers Are Emerging after Three Turbulent Years,” The Economist, 445, 63–65. [Google Scholar]
  6. Fama EF, and French KR (1993), “Common Risk Factors in the Returns on Stocks and Bonds,” Journal of Financial Economics, 33, 3–56. DOI: 10.1016/0304-405X(93)90023-5. [DOI] [Google Scholar]
  7. Feng J, and Simon N (2020), “An Analysis of the Cost of Hyperparameter Selection via Split-Sample Validation, with Applications to Penalized Regression,” Statistica Sinica, 30, 511–530. DOI: 10.5705/ss.202017.0310. [DOI] [Google Scholar]
  8. Golub GH, and Van Loan CF (2013), “Matrix Computations,” in Johns Hopkins Studies in the Mathematical Sciences (4th ed.), Baltimore: The Johns Hopkins University Press. [Google Scholar]
  9. Guerra-Urzola R, Van Deun K, Vera JC, and Sijtsma K (2021), “A Guide for Sparse PCA: Model Comparison and Applications,” Psychometrika, 86, 893–919. DOI: 10.1007/s11336-021-09773-2. [DOI] [PMC free article] [PubMed] [Google Scholar]
  10. He Z, Xie S, Zdunek R, Zhou G, and Cichocki A (2011), “Symmetric Nonnegative Matrix Factorization: Algorithms and Applications to Probabilistic Clustering,” IEEE Transactions on Neural Networks, 22, 2117–2131. [DOI] [PubMed] [Google Scholar]
  11. Jolliffe IT (2002), “Principal Component Analysis,” in Springer Series in Statistics (2nd ed.), New York: Springer. [Google Scholar]
  12. Journée M, Nesterov Y, Richtárik P, and Sepulchre R (2010), “Generalized Power Method for Sparse Principal Component Analysis,” Journal of Machine Learning Research, 11, 517–553. [Google Scholar]
  13. Kim Y, Wang W, Carbonetto P, and Stephens M (2024), “A Flexible Empirical Bayes Approach to Multiple Linear Regression and Connections with Penalized Regression,” Journal of Machine Learning Research, 25, 1–59.41334350 [Google Scholar]
  14. Kolomvakis C, and Gillis N (2023), “Robust Binary Component Decompositions,” in ICASSP 2023–2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 1–5. [Google Scholar]
  15. Kueng R, and Tropp JA (2021), “Binary Component Decomposition Part i: The Positive-Semidefinite Case,” SIAM Journal on Mathematics of Data Science, 3, 544–572. DOI: 10.1137/19M1278612. [DOI] [Google Scholar]
  16. Li Y, Zhu R, Qu A, Ye H, and Sun Z (2021), “Topic Modeling on Triage Notes with Semiorthogonal Nonnegative Matrix Factorization,” Journal of the American Statistical Association, 116, 1609–1624. DOI: 10.1080/01621459.2020.1862667. [DOI] [Google Scholar]
  17. Liu Y, Carbonetto P, Willwerscheid J, Oakes SA, Macleod KF, and Stephens M (2023). Dissecting tumor transcriptional heterogeneity from single-cell RNA-seq data by generalized binary covariance decomposition. bioRxiv. [DOI] [PMC free article] [PubMed] [Google Scholar]
  18. Ma Z (2013), “Sparse Principal Component Analysis and Iterative Thresholding,” Annals of Statistics, 41, 772–801. DOI: 10.1214/13-AOS1097. [DOI] [Google Scholar]
  19. Mackey L (2008), “Deflation Methods for Sparse PCA,” in Advances in Neural Information Processing Systems (Vol. 21), Red Hook, NY: Curran Associates. [Google Scholar]
  20. Parikh N, and Boyd S (2014), “Proximal Algorithms,” Foundations and Trends in Optimization, 1, 127–239. DOI: 10.1561/2400000003. [DOI] [Google Scholar]
  21. Pearson K (1901), “LIII. On Lines and Planes of Closest Fit to Systems of Points in Space,” London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science, 2, 559–572. DOI: 10.1080/14786440109462720. [DOI] [Google Scholar]
  22. Ramsay J, and Silverman B (2005), “Principal Components Analysis for Functional Data,” in Functional Data Analysis, pp. 147–172, New York, NY: Springer. [Google Scholar]
  23. Rohe K, and Zeng M (2023), “Vintage Factor Analysis with Varimax Performs Statistical Inference,” Journal of the Royal Statistical Society Series B: Statistical Methodology, 85, 1037–1060. DOI: 10.1093/jrsssb/qkad029. [DOI] [PMC free article] [PubMed] [Google Scholar]
  24. Shen H, and Huang JZ (2008), “Sparse Principal Component Analysis via Regularized Low Rank Matrix Approximation,” Journal of Multivariate Analysis, 99, 1015–1034. DOI: 10.1016/j.jmva.2007.06.007. [DOI] [Google Scholar]
  25. Shepard RN, and Arabie P (1979), “Additive Clustering: Representation of Similarities as Combinations of Discrete Overlapping Properties,” Psychological Review, 86, 87–123. DOI: 10.1037/0033-295X.86.2.87. [DOI] [Google Scholar]
  26. Sørensen M, Sidiropoulos ND, and Swami A (2022), “Overlapping Community Detection via Semi-Binary Matrix Factorization: Identifiability and Algorithms,” IEEE Transactions on Signal Processing, 70, 4321–4336. [Google Scholar]
  27. Van Deun K, Wilderjans TF, Van Den Berg RA, Antoniadis A, and Van Mechelen I (2011), “A Flexible Framework for Sparse Simultaneous Component Based Data Integration,” BMC Bioinformatics, 12, 448. DOI: 10.1186/1471-2105-12-448. [DOI] [PMC free article] [PubMed] [Google Scholar]
  28. Wang G, Sarkar A, Carbonetto P, and Stephens M (2020), “A Simple New Approach to Variable Selection in Regression, with Application to Genetic Fine Mapping,” Journal of the Royal Statistical Society. Series B, Statistical Methodology, 82, 1273–1300. DOI: 10.1111/rssb.12388. [DOI] [PMC free article] [PubMed] [Google Scholar]
  29. Wang W, and Stephens M (2021), “Empirical Bayes Matrix Factorization,” Journal of Machine Learning Research, 22, 1–40. [PMC free article] [PubMed] [Google Scholar]
  30. Wilkinson JHJH (1965), The Algebraic Eigenvalue Problem, Oxford: Clarendon Press. [Google Scholar]
  31. Willwerscheid J, Carbonetto P, and Stephens M (2025), “Ebnm: An R Package for Solving the Empirical Bayes Normal Means Problem Using a Variety of Prior Families,” Journal of Statistical Software, 114, 1–32. DOI: 10.18637/jss.v114.i03. [DOI] [PMC free article] [PubMed] [Google Scholar]
  32. Witten DM, Tibshirani R, and Hastie T (2009), “A Penalized Matrix Decomposition, with Applications to Sparse Principal Components and Canonical Correlation Analysis,” Biostatistics (Oxford, England), 10, 515–534. DOI: 10.1093/biostatistics/kxp008. [DOI] [PMC free article] [PubMed] [Google Scholar]
  33. Xing Z, Carbonetto P, and Stephens M (2021), “Flexible Signal Denoising via Flexible Empirical Bayes Shrinkage,” Journal of Machine Learning Research, 22, 4153–4180. [PMC free article] [PubMed] [Google Scholar]
  34. Zass R and Shashua A (2006). Nonnegative Sparse PCA. Advances in Neural Information Processing Systems. [Google Scholar]
  35. Zhong X, Su C, and Fan Z (2022), “Empirical Bayes PCA in High Dimensions,” Journal of the Royal Statistical Society: Series B (Statistical Methodology), 84, 853–878. DOI: 10.1111/rssb.12490. [DOI] [Google Scholar]
  36. Zou H, and Hastie T (2005), “Regularization and Variable Selection via the Elastic Net,” Journal of the Royal Statistical Society Series B: Statistical Methodology, 67, 301–320. DOI: 10.1111/j.1467-9868.2005.00503.x. [DOI] [Google Scholar]
  37. Zou H, and Xue L (2018), “A Selective Overview of Sparse Principal Component Analysis,” Proceedings of the IEEE, 106, 1311–1320. DOI: 10.1109/JPROC.2018.2846588. [DOI] [Google Scholar]
  38. Zou H, Hastie T, and Tibshirani R (2006), “Sparse Principal Component Analysis,” Journal of Computational and Graphical Statistics, 15, 265–286. DOI: 10.1198/106186006X113430. [DOI] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Supp 1

RESOURCES