{
 "id": "ep3654h8r5",
 "slug": "sparse-principal-component-analysis",
 "title": "Sparse principal component analysis",
 "updated": "2026-10-15",
 "topic_path": [
  {
   "id": "physical",
   "label": "Physical world and mathematics",
   "api_url": "https://www.edgepedia.org/api/v1/topics/physical"
  },
  {
   "id": "physical.math",
   "label": "Mathematics and statistics",
   "api_url": "https://www.edgepedia.org/api/v1/topics/physical.math"
  },
  {
   "id": "physical.math.statistics",
   "label": "Statistics and probability",
   "api_url": "https://www.edgepedia.org/api/v1/topics/physical.math.statistics"
  },
  {
   "id": "physical.math.statistics.multivariate-analysis",
   "label": "Multivariate association and dimension reduction",
   "api_url": "https://www.edgepedia.org/api/v1/topics/physical.math.statistics.multivariate-analysis"
  },
  {
   "id": "physical.math.statistics.multivariate-analysis.alpha-mo-to-w",
   "label": "Titles Mo to W",
   "api_url": "https://www.edgepedia.org/api/v1/topics/physical.math.statistics.multivariate-analysis.alpha-mo-to-w"
  }
 ],
 "geo": [
  {
   "id": "geo.nongeo.t2001.physical.math.statistics",
   "label": "Non-geographic · 2001 to 2020: Statistics and probability",
   "api_url": "https://www.edgepedia.org/api/v1/geo/geo.nongeo.t2001.physical.math.statistics",
   "path": [
    {
     "id": "geo.nongeo",
     "label": "Non-geographic",
     "api_url": "https://www.edgepedia.org/api/v1/geo/geo.nongeo"
    },
    {
     "id": "geo.nongeo.t2001",
     "label": "Non-geographic · 2001 to 2020",
     "api_url": "https://www.edgepedia.org/api/v1/geo/geo.nongeo.t2001"
    },
    {
     "id": "geo.nongeo.t2001.physical",
     "label": "Physical world and mathematics",
     "api_url": "https://www.edgepedia.org/api/v1/geo/geo.nongeo.t2001.physical"
    },
    {
     "id": "geo.nongeo.t2001.physical.math",
     "label": "Mathematics and statistics",
     "api_url": "https://www.edgepedia.org/api/v1/geo/geo.nongeo.t2001.physical.math"
    },
    {
     "id": "geo.nongeo.t2001.physical.math.statistics",
     "label": "Statistics and probability",
     "api_url": "https://www.edgepedia.org/api/v1/geo/geo.nongeo.t2001.physical.math.statistics"
    }
   ]
  }
 ],
 "excerpt": "Sparse principal component analysis (sparse PCA) is a statistical method that makes PCA components depend on only a few variables, trading some explained variance for interpretability.",
 "snippet": "Sparse principal component analysis (sparse PCA) is a statistical method that makes PCA components depend on only a few variables, trading some explained variance for interpretability.",
 "node": "physical.math.statistics.multivariate-analysis.alpha-mo-to-w",
 "markdown": "# Sparse principal component analysis\n\nSparse principal component analysis (sparse PCA) is a statistical method that computes principal components in which a specified representation, such as the weights or the loadings, is made sparse, with most of its entries constrained to be exactly zero, so that each component is built from a small, interpretable subset of variables while still summarizing as much variance as the sparsity allows. [Sparse PCA](https://www.edgepedia.org/sparse-pca) trades a controlled amount of explained variance for loadings that name the variables involved.<sup>[1](https://doi.org/10.1198/106186006x113430)</sup> A further complication is that in sparse PCA the weights, loadings, and right singular vectors are no longer mathematically equivalent, so different formulations of the same idea produce genuinely different answers.<sup>[2](https://link.springer.com/article/10.3758/s13428-023-02099-0)</sup><sup> • </sup><sup>[3](https://link.springer.com/article/10.1007/s11336-021-09773-2)</sup>\n\n| Key fact | Detail |\n|---|---|\n| Output | Components with many loadings set to exactly zero; in ordinary PCA weights, loadings, and singular vectors coincide, in sparse PCA they do not<sup>[2](https://link.springer.com/article/10.3758/s13428-023-02099-0)</sup> |\n| Core formulation | Maximize \\( z^{T}\\Sigma z - \\rho\\,\\mathrm{Card}(z) \\), where \\( \\Sigma \\) is the sample covariance matrix and \\( \\rho \\) penalizes the number of nonzero entries<sup>[4](https://jmlr.org/papers/volume9/aspremont08a/aspremont08a.pdf)</sup> |\n| Complexity | The optimization problem is NP-hard, so practical algorithms are greedy, alternating, or relaxation-based<sup>[4](https://jmlr.org/papers/volume9/aspremont08a/aspremont08a.pdf)</sup> |\n| Variance cost example | On the pitfall data, SPCA explained 75.8% of variance over six components versus 78.2% for SCoTLASS, with only 7, 4, 4, 1, 1, and 1 nonzero loadings<sup>[1](https://doi.org/10.1198/106186006x113430)</sup> |\n| Gene expression example | On Ramaswamy's data (16,063 genes, 144 samples), keeping 2.5% of genes lowered explained variance of the leading component only from 46% to 40%<sup>[1](https://doi.org/10.1198/106186006x113430)</sup> |\n| Software | R package elasticnet for SPCA; scikit-learn's SparsePCA with L1 penalty parameter alpha and 'lars' or 'cd' solvers<sup>[1](https://doi.org/10.1198/106186006x113430)</sup><sup> • </sup><sup>[5](https://scikit-learn.org/1.8/modules/generated/sklearn.decomposition.SparsePCA.html)</sup> |\n| Fast power method | GPower's single-unit algorithms cost \\( O(n \\cdot p) \\) per iteration for n samples and p variables<sup>[6](https://www.jmlr.org/papers/volume11/journee10a/journee10a.pdf)</sup> |\n\n## How it works\n\nOrdinary PCA can be written as a regression-type optimization problem. The SPCA method of Hui Zou, Trevor Hastie, and [Robert Tibshirani](https://www.edgepedia.org/robert-tibshirani) exploits this: it adds lasso (L1) and ridge penalties to the regression form, so the lasso drives most regression coefficients, and hence the component weights, to exactly zero; when the lasso penalty vanishes the criterion reduces to exact PCA.<sup>[1](https://doi.org/10.1198/106186006x113430)</sup> The lasso is the [L1-penalized regression](https://www.edgepedia.org/lasso-statistics) estimator of Robert Tibshirani<sup>[7](https://doi.org/10.1111/j.2517-6161.1996.tb02080.x)</sup>, and the elastic net of Zou and Hastie combines L1 and L2 penalties.<sup>[8](https://doi.org/10.1111/j.1467-9868.2005.00503.x)</sup>\n\nA second, direct formulation treats sparsity as a cardinality constraint on the loading vector: maximize \\( z^{T}\\Sigma z \\) subject to \\( \\|z\\|_2 = 1 \\) and a limit on \\( \\mathrm{Card}(z) \\); a related penalized tradeoff version maximizes \\( z^{T}\\Sigma z - \\rho\\,\\mathrm{Card}(z) \\) over unit-norm \\( z \\), which need not attain every cardinality level for some choice of \\( \\rho \\).<sup>[4](https://jmlr.org/papers/volume9/aspremont08a/aspremont08a.pdf)</sup> This problem is NP-hard: the NP-hard subset selection problem for ordinary least squares reduces to a sparse generalized eigenvalue problem, of which sparse PCA is an instance.<sup>[4](https://jmlr.org/papers/volume9/aspremont08a/aspremont08a.pdf)</sup> The DSPCA approach relaxes it to a convex semidefinite program by replacing the nonconvex constraint \\( \\mathrm{Card}(X) \\le k^{2} \\) with the convex constraint \\( \\mathbf{1}^{T}|X|\\mathbf{1} \\le k \\) after dropping a rank constraint.<sup>[4](https://jmlr.org/papers/volume9/aspremont08a/aspremont08a.pdf)</sup>\n\n## How it is done\n\nThe main algorithmic families differ in what they penalize and how they optimize.\n\n**SCoTLASS.** Jolliffe, Trendafilov, and Uddin's SCoTLASS modifies the original PCA problem to satisfy the lasso penalty, yielding sparse weights.<sup>[9](https://doi.org/10.1198/1061860032148)</sup> It is not a convex optimization problem and was computationally costly in its original form.<sup>[1](https://doi.org/10.1198/106186006x113430)</sup>\n\n**SPCA by alternating elastic net.** Zou, Hastie, and Tibshirani solve their criterion by alternating minimization: one update is an orthogonal [Procrustes](https://www.edgepedia.org/procrustes) problem, the other an elastic net regression solvable by LARS-EN, cyclic coordinate descent, or proximal gradient methods.<sup>[1](https://doi.org/10.1198/106186006x113430)</sup><sup> • </sup><sup>[3](https://link.springer.com/article/10.1007/s11336-021-09773-2)</sup>\n\n**DSPCA.** The semidefinite relaxation solves a penalized program, maximize \\( \\mathrm{Tr}(\\Sigma X) - \\rho\\,\\mathbf{1}^{T}|X|\\mathbf{1} \\) subject to trace and positive-semidefinite constraints, and produced components explaining nearly the same variance as SPCA with fewer nonzero loadings.<sup>[10](https://proceedings.neurips.cc/paper_files/paper/2004/file/8e065119c74efe3a47aec8796964cf8b-Paper.pdf)</sup>\n\n**PMD and SPC.** Witten, Tibshirani, and Hastie's penalized matrix decomposition computes a rank-K approximation under penalties on the singular vectors; an L1 penalty on \\( v \\) but not \\( u \\) yields a sparse PCA method called SPC, and for one component its criterion is equivalent to SCoTLASS, giving an efficient biconvex alternating algorithm.<sup>[11](https://doi.org/10.1093/biostatistics/kxp008)</sup>\n\n**GPower.** Single-unit and block sparse PCA can be formulated as maximization of a convex function on a compact set, with \\( \\gamma = 0 \\) recovering the first principal component, and solved with gradient and power methods; on random and gene expression test problems GPower outperformed SPCA, approximate greedy search, and sPCA-rSVD in solution quality and speed.<sup>[6](https://www.jmlr.org/papers/volume11/journee10a/journee10a.pdf)</sup>\n\n**Greedy and exact methods.** A greedy algorithm based on convexity of the largest eigenvalue computes a full solution path over all sparsity levels at total cost \\( O(n^{3}) \\).<sup>[4](https://jmlr.org/papers/volume9/aspremont08a/aspremont08a.pdf)</sup>\n\nSparsity is controlled by a penalty parameter: \\( \\rho \\) in the cardinality formulation, \\( \\gamma \\) in GPower's \\( \\ell_{1} \\) criterion, and alpha in scikit-learn's SparsePCA (default 1, with ridge shrinkage via ridge_alpha).<sup>[4](https://jmlr.org/papers/volume9/aspremont08a/aspremont08a.pdf)</sup><sup> • </sup><sup>[6](https://www.jmlr.org/papers/volume11/journee10a/journee10a.pdf)</sup><sup> • </sup><sup>[5](https://scikit-learn.org/1.8/modules/generated/sklearn.decomposition.SparsePCA.html)</sup> Larger penalties mean fewer nonzero loadings and less explained variance. Tuning matters: applying sparse PCA with an overestimated penalty invariably destroys the signal in single-cell data, while a recent random matrix theory criterion based on biwhitening selects the sparsity level automatically, rendering the method nearly parameter-free.<sup>[12](https://arxiv.org/abs/2509.15429)</sup>\n\n## Origin\n\nTwo precursors tried to simplify ordinary PCA without changing its objective. [Varimax rotation](https://www.edgepedia.org/varimax-rotation), programmed by Henry F. Kaiser in 1959, rotates components to concentrate loadings on fewer variables<sup>[13](https://doi.org/10.1177/001316445901900314)</sup>, and Cadima and Jolliffe's 1995 analysis showed that simply thresholding small loadings is an ad hoc and potentially misleading substitute.<sup>[14](https://doi.org/10.1080/757584614)</sup> The modern sparse formulations began with SCoTLASS, the lasso-constrained modified PCA of Jolliffe, Trendafilov, and Uddin (2003, Journal of Computational and Graphical Statistics)<sup>[9](https://doi.org/10.1198/1061860032148)</sup>, followed by the DSPCA semidefinite relaxation<sup>[10](https://proceedings.neurips.cc/paper_files/paper/2004/file/8e065119c74efe3a47aec8796964cf8b-Paper.pdf)</sup>, the regression-based SPCA of Zou, Hastie, and Tibshirani (2006, Journal of Computational and Graphical Statistics)<sup>[1](https://doi.org/10.1198/106186006x113430)</sup>, and the elastic net it relies on (Zou and Hastie, 2005, JRSS-B).<sup>[8](https://doi.org/10.1111/j.1467-9868.2005.00503.x)</sup>\n\n## Variants\n\nThe most consequential distinction is between sparse loadings and sparse weights: methods that constrain the loadings (as USLPCA does) and methods that constrain the weights (as SPCA does) are not equivalent, and results depend heavily on the choice.<sup>[3](https://link.springer.com/article/10.1007/s11336-021-09773-2)</sup> sPCA-rSVD of Shen and Huang (2007) obtains sparse components through regularized low-rank matrix approximation and was the preferred sparse-loading method for recovering sparseness structure in a method comparison.<sup>[15](https://doi.org/10.1016/j.jmva.2007.06.007)</sup><sup> • </sup><sup>[3](https://link.springer.com/article/10.1007/s11336-021-09773-2)</sup> A sparse-loadings method known as USLPCA recovered zero versus nonzero parameters better than the sparse-weights SPCA under all data-generation schemes in simulation, even when data were generated from the sparse-weights model.<sup>[2](https://link.springer.com/article/10.3758/s13428-023-02099-0)</sup> Robust sparse PCA, developed by Christophe Croux, Peter Filzmoser, and Heinrich Fritz (Technometrics, 2013), combines sparsity with robustness to outliers.<sup>[16](https://doi.org/10.1080/00401706.2012.727746)</sup>\n\n## Applications\n\nSparse PCA is used wherever many correlated variables must be reduced to a few interpretable components. In cancer research it reduces dimension and selects important variables simultaneously in high-dimensional gene expression data; published approaches fall into variance maximization, reconstruction error minimization, SVD, and probabilistic modeling families.<sup>[17](https://pmc.ncbi.nlm.nih.gov/articles/PMC4692276/)</sup> In finance, sparser loadings mean fewer fixed transaction costs in principal-component trading strategies.<sup>[10](https://proceedings.neurips.cc/paper_files/paper/2004/file/8e065119c74efe3a47aec8796964cf8b-Paper.pdf)</sup> In single-cell RNA-seq, an RMT-guided sparse PCA benchmarked across seven sequencing technologies and four algorithms outperformed PCA-, autoencoder-, and diffusion-based methods on cell-type classification.<sup>[12](https://arxiv.org/abs/2509.15429)</sup>\n\n## Limitations and alternatives\n\n**Variance and orthogonality.** Sparsity costs explained variance, and SPCA does not enforce uncorrelated components, so modified components can be correlated and total variance must be computed with an adjusted regression-projection formula.<sup>[1](https://doi.org/10.1198/106186006x113430)</sup>\n\n**Local optima and tuning.** SPCA and USLPCA are non-convex alternating procedures prone to local optima, so multiple random starting values should be used; the sparse-weights model also has an indeterminacy problem, since different weight matrices can yield the same component scores.<sup>[2](https://link.springer.com/article/10.3758/s13428-023-02099-0)</sup> Many sparse PCA algorithms lack guaranteed convergence, and some fail in memory or run very slowly.<sup>[3](https://link.springer.com/article/10.1007/s11336-021-09773-2)</sup>\n\n**Deflation artifacts.** Deflation-based methods can introduce artifacts or unexpected variance from the second component onward, even for noise-free data, hampering interpretation.<sup>[18](https://www.sciencedirect.com/science/article/abs/pii/S016974392030647X)</sup>\n\n**Thresholding pitfalls.** Thresholding ordinary PCA loadings is misleading: the selected loadings would differ if the others were truly zero, larger loadings often correspond to highly correlated variables, and the threshold choice is subjective.<sup>[19](https://ar5iv.labs.arxiv.org/html/2105.13581)</sup><sup> • </sup><sup>[14](https://doi.org/10.1080/757584614)</sup>\n\n**Exact computation at scale.** Exact mixed-integer semidefinite programs with branch-and-cut, and their approximation algorithms with approximation ratios, cover hundreds of features optimally and thousands near-optimally.<sup>[20](https://par.nsf.gov/biblio/10536704)</sup> A 2026 [Annals of Statistics](https://www.edgepedia.org/annals-of-statistics) paper formulates sparse PCA as a mixed integer program under the spiked covariance model with statistical guarantees for estimation error and support recovery, and its custom algorithm handles up to 20,000 features in minutes, versus roughly a thousand features for prior MIP algorithms.<sup>[21](https://doi.org/10.1214/25-AOS2551)</sup>\n\n**Alternatives.** Rotation remains the classical route to interpretable components: varimax rotation maximizes the Kaiser criterion, the variance of squared loadings, and a 2025 single-cell method (sciRED) uses PCA with varimax rotation on Pearson residuals as an alternative interpretable decomposition.<sup>[22](https://www.nature.com/articles/s41467-025-57157-2)</sup>\n\n## References\n\n1. [Hui Zou, Trevor Hastie, Robert Tibshirani (2006). Sparse Principal Component Analysis. Journal of Computational and Graphical Statistics.](https://doi.org/10.1198/106186006x113430)\n2. [A critical assessment of sparse PCA: why weights are not loadings (Behavior Research Methods)](https://link.springer.com/article/10.3758/s13428-023-02099-0)\n3. [A Guide for Sparse PCA: Model Comparison and Applications (Psychometrika)](https://link.springer.com/article/10.1007/s11336-021-09773-2)\n4. [Optimal Solutions for Sparse Principal Component Analysis (d'Aspremont, Bach & El Ghaoui, JMLR 2008)](https://jmlr.org/papers/volume9/aspremont08a/aspremont08a.pdf)\n5. [SparsePCA, scikit-learn 1.8.0 documentation](https://scikit-learn.org/1.8/modules/generated/sklearn.decomposition.SparsePCA.html)\n6. [Generalized Power Method for Sparse Principal Component Analysis (Journée, Nesterov, Richtárik, Sepulchre, JMLR 2010)](https://www.jmlr.org/papers/volume11/journee10a/journee10a.pdf)\n7. [Robert Tibshirani (1996). Regression Shrinkage and Selection Via the Lasso. Journal of the Royal Statistical Society Series B (Statistical Methodology).](https://doi.org/10.1111/j.2517-6161.1996.tb02080.x)\n8. [Hui Zou, Trevor Hastie (2005). Regularization and Variable Selection Via the Elastic Net. Journal of the Royal Statistical Society Series B (Statistical Methodology).](https://doi.org/10.1111/j.1467-9868.2005.00503.x)\n9. [Ian T Jolliffe, Nickolay T Trendafilov, Mudassir Uddin (2003). A Modified Principal Component Technique Based on the LASSO. Journal of Computational and Graphical Statistics.](https://doi.org/10.1198/1061860032148)\n10. [A Direct Formulation for Sparse PCA Using Semidefinite Programming (d'Aspremont, El Ghaoui, Jordan & Lanckriet, NIPS 2004)](https://proceedings.neurips.cc/paper_files/paper/2004/file/8e065119c74efe3a47aec8796964cf8b-Paper.pdf)\n11. [D. M. Witten, R. Tibshirani, T. Hastie (2009). A penalized matrix decomposition, with applications to sparse principal components and canonical correlation analysis. Biostatistics.](https://doi.org/10.1093/biostatistics/kxp008)\n12. [Random Matrix Theory-guided sparse PCA for single-cell RNA-seq data (arXiv 2025)](https://arxiv.org/abs/2509.15429)\n13. [Henry F. Kaiser (1959). Computer Program for Varimax Rotation in Factor Analysis. Educational and Psychological Measurement.](https://doi.org/10.1177/001316445901900314)\n14. [Jorge Cadima, Ian T. Jolliffe (1995). Loading and correlations in the interpretation of principle compenents. Journal of Applied Statistics.](https://doi.org/10.1080/757584614)\n15. [Haipeng Shen, Jianhua Z. Huang (2007). Sparse principal component analysis via regularized low rank matrix approximation. Journal of Multivariate Analysis.](https://doi.org/10.1016/j.jmva.2007.06.007)\n16. [Christophe Croux, Peter Filzmoser, Heinrich Fritz (2013). Robust Sparse Principal Component Analysis. Technometrics.](https://doi.org/10.1080/00401706.2012.727746)\n17. [Sparse principal component analysis in cancer research](https://pmc.ncbi.nlm.nih.gov/articles/PMC4692276/)\n18. [All sparse PCA models are wrong, but some are useful. Part II: Limitations and problems of deflation (Chemometrics and Intelligent Laboratory Systems)](https://www.sciencedirect.com/science/article/abs/pii/S016974392030647X)\n19. [Sparse Principal Components Analysis: a Tutorial (Merola; LS SPCA)](https://ar5iv.labs.arxiv.org/html/2105.13581)\n20. [Exact and Approximation Algorithms for Sparse Principal Component Analysis (Li & Xie, INFORMS Journal on Computing, NSF PAR record)](https://par.nsf.gov/biblio/10536704)\n21. [Sparse PCA: A new scalable estimator based on integer programming (Annals of Statistics, 2026)](https://doi.org/10.1214/25-AOS2551)\n22. [Interpretable single-cell factor decomposition using sciRED (Nature Communications, 2025)](https://www.nature.com/articles/s41467-025-57157-2)\n\n---\n*Topic: Encyclopedia › Physical world and mathematics › Mathematics and statistics › Statistics and probability › Multivariate association and dimension reduction › Titles Mo to W*\n\n*Initially written Sep 29, 2026 · Edited: Oct 15, 2026*\n\n*Copyright 2026 EdgeChat AI, a subsidiary of Biostate AI.*\n\nLicense: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license\n",
 "same_as": [],
 "url": "https://www.edgepedia.org/sparse-principal-component-analysis",
 "markdown_url": "https://www.edgepedia.org/sparse-principal-component-analysis.md",
 "license": {
  "name": "Edgepedia Community License 1.0",
  "url": "https://www.edgepedia.org/edgepedia/license",
  "summary": "Free with credit, commercial use included. AI training is open to everyone. For other uses, organizations over USD 100M in revenue or 100M monthly users license separately.",
  "spdx": "LicenseRef-Edgepedia-Community-1.0"
 },
 "credit": "\"Sparse principal component analysis\", Edgepedia (EdgeChat), https://www.edgepedia.org/sparse-principal-component-analysis. Edgepedia Community License 1.0.",
 "credit_md": "\"[Sparse principal component analysis](https://www.edgepedia.org/sparse-principal-component-analysis)\", Edgepedia (EdgeChat), [https://www.edgepedia.org/sparse-principal-component-analysis](https://www.edgepedia.org/sparse-principal-component-analysis). [Edgepedia Community License 1.0](https://www.edgepedia.org/edgepedia/license).",
 "credit_html": "\"<a href=\"https://www.edgepedia.org/sparse-principal-component-analysis\">Sparse principal component analysis</a>\", Edgepedia (EdgeChat), <a href=\"https://www.edgepedia.org/sparse-principal-component-analysis\">https://www.edgepedia.org/sparse-principal-component-analysis</a>. <a href=\"https://www.edgepedia.org/edgepedia/license\">Edgepedia Community License 1.0</a>.",
 "speakable": "Sparse principal component analysis is a statistical method that makes PCA components depend on only a few variables, trading some explained variance for interpretability."
}
