Pith

open record

sign in

arxiv: 2606.29104 · v1 · pith:3MABZVL7 · submitted 2026-06-27 · stat.CO · stat.ME· stat.ML

spca: An R package to Compute Least Squares Sparse Principal Components

Reviewed by Pith T0 review T1 audit T2 compute T3 formal T4 kernel 2026-06-30 07:55 UTCgrok-4.3pith:3MABZVL7record.jsonopen to challenge →

classification stat.CO stat.MEstat.ML
keywords sparse principal component analysisLS-SPCAR packagevariable selectionexplained varianceuncorrelated componentsmatrix computationsforward selection
0
0 comments X

The pith

The spca R package implements LS-SPCA to produce uncorrelated sparse principal components that maximize explained variance.

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

This paper introduces the R package spca for least squares sparse principal component analysis. LS-SPCA creates sparse versions of principal components that stay uncorrelated with each other and explain as much variance as possible while staying close to the directions found by ordinary principal components. The package also supplies faster variants that permit mild correlations among the sparse components, which can use fewer variables yet still match or exceed the variance explained by the strictly uncorrelated versions. Variable selection can proceed by forward selection, stepwise selection, or backward elimination, with stopping rules tied to cumulative variance explained or correlation with the standard components. The code runs on an efficient C++ backend that handles both tall and wide data matrices, and the package supplies comparison, grouping, and plotting tools.

Core claim

LS-SPCA generates uncorrelated sparse principal components (sPCs) that effectively maximize the explained variance while maintaining strong correlations with standard principal components (PCs). The framework also includes more computationally efficient variants that produce mildly correlated sPCs, which often have lower cardinality while explaining equal or greater variance than the LS-SPCA optimal sPCs.

What carries the argument

The LS-SPCA framework that applies variable selection (simple forward, stepwise forward, or backward elimination) together with stopping rules based on cumulative variance explained or R-squared with the ordinary principal components.

If this is right

  • Analysts obtain sparse loadings that remain orthogonal and therefore preserve the additive variance decomposition of ordinary PCA.
  • Faster variants trade strict uncorrelatedness for lower cardinality while preserving or increasing explained variance.
  • Users can compare multiple spca solutions on the same data and convert foreign SPCA results into the package's object format.
  • The C++ engines allow direct application to large tall or fat matrices without custom coding.

Where Pith is reading between the lines

These are editorial extensions of the paper, not claims the author makes directly.

  • The same selection logic could be applied to other orthogonal decomposition methods such as canonical correlation analysis to enforce sparsity.
  • In settings with many redundant predictors, the uncorrelated constraint may reduce instability when the sparse components are used as regressors in a second stage.
  • Simulation studies that plant known sparse structures and measure recovery rates would test whether the stopping rules consistently select the planted variables.

Load-bearing premise

Variable selection procedures paired with variance or R-squared stopping rules will produce sparse components whose claimed uncorrelatedness and variance properties hold on real data without further adjustment.

What would settle it

On a dataset where the sparse components produced by spca explain less total variance than the first k standard principal components or show correlations among themselves above the level allowed by the chosen variant, the performance claims would not hold.

Figures

Figures reproduced from arXiv: 2606.29104 by Giovanni Maria Merola.

Figure 1
Figure 1. Figure 1: Screeplot and qq-plot with a fitted line. [PITH_FULL_IMAGE:figures/full_fig_p008_1.png] view at source ↗
Figure 2
Figure 2. Figure 2: Bar plots of the contributions of each sPC. [PITH_FULL_IMAGE:figures/full_fig_p012_2.png] view at source ↗
Figure 3
Figure 3. Figure 3: Circular bar plots of the contributions of each sPC. [PITH_FULL_IMAGE:figures/full_fig_p013_3.png] view at source ↗
Figure 4
Figure 4. Figure 4: Heat maps of the contributions of each sPC compared with the corresponding PCs [PITH_FULL_IMAGE:figures/full_fig_p013_4.png] view at source ↗
Figure 5
Figure 5. Figure 5: Bar plots of the contributions of two different spca fits. [PITH_FULL_IMAGE:figures/full_fig_p017_5.png] view at source ↗
Figure 6
Figure 6. Figure 6: Bar plots of the contributions filled by groups. [PITH_FULL_IMAGE:figures/full_fig_p018_6.png] view at source ↗
read the original abstract

This paper introduces the R package spca, which provides a computational framework for least squares sparse principal component analysis (LS-SPCA). Unlike other SPCA methods, LS-SPCA generates uncorrelated sparse principal components (sPCs) that effectively maximize the explained variance while maintaining strong correlations with standard principal components (PCs). The framework also includes more computationally efficient variants that produce mildly correlated sPCs, which often have lower cardinality while explaining equal or greater variance than the LS-SPCA optimal sPCs. The spca package is built on an efficient C++ backend for matrix computations, with distinct engines for tall and fat matrices, and a flexible R frontend. The user interface offers several options for computing sPCs, such as deciding whether sparsification should stop when a threshold for cumulative variance explained or R2 with the PCs is reached, and choosing between simple forward selection, stepwise forward selection, or backward elimination for variable selection. In addition to the print(), summary(), and plot() methods, the package includes tools for comparing different "spca" solutions, grouping sparse loadings, and representing foreign SPCA solutions as "spca" objects. This article demonstrates with real datasets the use of the package in a typical LS-SPCA workflow and briefly contrasts LS-SPCA with conventional SPCA solutions . Then it compares different LS-SPCA solutions obtained from the dataset. Finally, the performance of spca on large tall and fat matrices is discussed, showing that spca offers a computationally efficient alternative for computing interpretable sPCs.

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, simulated authors' rebuttal, and a circularity audit. Tearing a paper down is the easy half of reading it; the pith above is the substance, this is the friction.

Referee Report

2 major / 1 minor

Summary. The manuscript introduces the R package 'spca' for least-squares sparse principal component analysis (LS-SPCA). It claims that LS-SPCA produces uncorrelated sparse principal components (sPCs) that maximize explained variance while retaining strong correlations with ordinary PCs; it also describes computationally cheaper variants that allow mild correlations and often achieve lower cardinality with equal or greater variance. The package supplies a C++ backend with separate engines for tall and fat matrices, three variable-selection engines (simple forward, stepwise forward, backward elimination), and two stopping rules (cumulative variance or R² threshold). The paper demonstrates typical workflows on real data, compares LS-SPCA solutions, and reports timing results on large matrices.

Significance. If the implemented procedures reliably deliver the stated statistical properties, the package would supply a practical, computationally efficient tool for interpretable sparse PCA in high-dimensional settings. The C++ backend and dual tall/fat engines address a genuine performance gap, and the comparison utilities could facilitate adoption. The work is primarily a software contribution rather than a new methodological derivation.

major comments (2)
  1. [Abstract / LS-SPCA framework description] Abstract and § on LS-SPCA framework: the central claim that the three variable-selection engines stopped by cumulative-variance or R² thresholds 'generate uncorrelated sparse principal components that effectively maximize the explained variance' is presented without any derivation, orthogonality proof, or guarantee that the selected support preserves exact uncorrelatedness or attains a global variance optimum. The skeptic note correctly identifies this as an unverified assumption; demonstrations on real data alone do not establish the property for arbitrary inputs.
  2. [Demonstration / performance sections] Demonstration and performance sections: no tables or quantitative results are supplied that report the actual pairwise correlations among the computed sPCs, the difference in explained variance relative to dense PCs, or the cardinality-variance trade-off for the 'mildly correlated' variants on the real datasets used. Without these metrics the reader cannot verify that the advertised properties hold in practice.
minor comments (1)
  1. [Abstract] The sentence 'Then it compares different LS-SPCA solutions obtained from the dataset' is grammatically incomplete; rephrase for clarity.

Simulated Author's Rebuttal

2 responses · 0 unresolved

We thank the referee for the constructive comments on our manuscript describing the spca R package. We address each major comment below.

read point-by-point responses
  1. Referee: [Abstract / LS-SPCA framework description] Abstract and § on LS-SPCA framework: the central claim that the three variable-selection engines stopped by cumulative-variance or R² thresholds 'generate uncorrelated sparse principal components that effectively maximize the explained variance' is presented without any derivation, orthogonality proof, or guarantee that the selected support preserves exact uncorrelatedness or attains a global variance optimum. The skeptic note correctly identifies this as an unverified assumption; demonstrations on real data alone do not establish the property for arbitrary inputs.

    Authors: The manuscript is a software contribution describing an implementation of the LS-SPCA method. The core statistical properties (uncorrelated sPCs that maximize explained variance) follow from the least-squares formulation in the original LS-SPCA literature; the package simply provides efficient engines to compute them. We acknowledge that the current text does not re-derive these properties or prove that the heuristic variable-selection procedures (forward, stepwise, backward) with early stopping always preserve exact uncorrelatedness or attain a global optimum. We will revise the abstract and framework section to (i) add explicit citations to the methodological papers establishing the LS-SPCA guarantees, (ii) clarify that the three selection engines are heuristics that approximate the optimal support, and (iii) distinguish the exact LS-SPCA solutions from the computationally cheaper mildly-correlated variants. This addresses the concern without misrepresenting the software focus of the paper. revision: yes

  2. Referee: [Demonstration / performance sections] Demonstration and performance sections: no tables or quantitative results are supplied that report the actual pairwise correlations among the computed sPCs, the difference in explained variance relative to dense PCs, or the cardinality-variance trade-off for the 'mildly correlated' variants on the real datasets used. Without these metrics the reader cannot verify that the advertised properties hold in practice.

    Authors: We agree that the absence of these quantitative metrics limits the reader's ability to verify the claimed properties on the example data. In the revised manuscript we will add tables (and accompanying text) in the demonstration section that report: (a) pairwise correlations among the computed sPCs for each variant, (b) the difference in explained variance relative to the corresponding dense PCs, and (c) the cardinality-variance trade-off curves for both the uncorrelated LS-SPCA solutions and the mildly correlated variants, using the same real datasets already presented. revision: yes

Circularity Check

0 steps flagged

Software implementation paper with no derivation chain

full rationale

The manuscript describes an R package for LS-SPCA, its user interface, variable-selection engines, and performance on real data. No new mathematical derivations, predictions, or first-principles results are claimed that could reduce to fitted inputs or self-citations. All central statements concern computational functionality and empirical demonstrations rather than tautological reductions. No load-bearing self-citations or ansatzes appear in the provided text.

Axiom & Free-Parameter Ledger

0 free parameters · 0 axioms · 0 invented entities

The contribution is a software package implementing an existing method; no new free parameters are fitted, no additional axioms are invoked beyond standard linear algebra, and no new entities are postulated.

pith-pipeline@v0.9.1-grok · 5799 in / 1247 out tokens · 30878 ms · 2026-06-30T07:55:09.208791+00:00 · methodology

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Reference graph

Works this paper leans on

27 extracted references · 4 canonical work pages

  1. [1]

    Camacho and A.K

    J. Camacho and A.K. Smilde and E. Saccenti and J.A. Westerhuis , title =. Chemometrics and Intelligent Laboratory Systems , volume =. 2020 , issn =. doi:https://doi.org/10.1016/j.chemolab.2019.103907 , publisher =

  2. [2]

    Chemometrics and Intelligent Laboratory Systems , volume=

    Camacho, J and Smilde, AK and Saccenti, E and Westerhuis, JA and Bro, Rasmus , title=. Chemometrics and Intelligent Laboratory Systems , volume=. 2021 , publisher=

  3. [3]

    Camacho and A.K

    J. Camacho and A.K. Smilde and E. Saccenti and J.A. Westerhuis and R. Bro , title =. Chemometrics and Intelligent Laboratory Systems , volume =. 2025 , issn =. doi:https://doi.org/10.1016/j.chemolab.2025.105498 , publisher=

  4. [4]

    , journal =

    d'Aspremont, Alexandre and Bach, Francis and Ghaoui, Laurent E. , journal =. Optimal Solutions for Sparse Principal Component Analysis , volume =

  5. [5]

    Multivariate Behavioral Research , volume =

    Carla Ferrara and Francesca Martella and Maurizio Vichi , title =. Multivariate Behavioral Research , volume =. 2019 , publisher =

  6. [6]

    , journal =

    Hotelling, H. , journal =. Analysis of a Complex of Statistical Variables with Principal Components , volume =

  7. [7]

    Annals of Statistics , volume =

    Johnstone, Iain , title =. Annals of Statistics , volume =. 2001 , doi =

  8. [8]

    Australia & New Zealand Journal of Statistics , year =

    Merola, Giovanni Maria , title =. Australia & New Zealand Journal of Statistics , year =

  9. [9]

    Projection sparse principal component analysis: An efficient least squares method

    Merola, Giovanni Maria and Chen, Gemai. Projection sparse principal component analysis: An efficient least squares method. Journal of Multivariate Analysis. 2019

  10. [10]

    Journal of Applied Statistics , volume=

    SIMPCA: a framework for rotating and sparsifying principal components , author=. Journal of Applied Statistics , volume=. 2020 , publisher=

  11. [11]

    , title =

    Merola, Giovanni M. , title =. 2026 , version =. doi:10.5281/zenodo.18829364 , url =

  12. [12]

    and Weiss, Y

    Moghaddam, B. and Weiss, Y. and Avidan, S. , title =. Advances in Neural Information Processing Systems , year =

  13. [13]

    , year =

    Pearson, K. , year =. Philosophical Magazine , volume =

  14. [14]

    2025 , url =

    R: A Language and Environment for Statistical Computing , author =. 2025 , url =

  15. [15]

    and Jolliffe, I

    Trendafilov, N. and Jolliffe, I. , title =. Computational Statistics and Data Analysis , volume =. 2006 , pages =

  16. [16]

    Ninth interface symposium computer science and statistics , pages=

    Probability plotting points for principal components , author=. Ninth interface symposium computer science and statistics , pages=. 1976 , organization=

  17. [17]

    2021 , month =

    Winkler, Anderson Marcelo , title =. 2021 , month =

  18. [18]

    and Hastie, T

    Zou, H. and Hastie, T. and Tibshirani, R. , title =. Journal of Computational and Graphical Statistics , volume =

  19. [19]

    Proceedings of the IEEE , volume=

    Zou, Hui and Xue, Lingzhou , title=. Proceedings of the IEEE , volume=. 2018 , publisher=

  20. [20]

    Journal of Machine Learning Research , year =

    abess: A Fast Best Subset Selection Library in Python and R , author =. Journal of Machine Learning Research , year =

  21. [21]

    2025 , note =

    abess: Fast Best Subset Selection , author =. 2025 , note =. doi:10.32614/CRAN.package.abess , url =

  22. [22]

    and Swineford, Frances , title =

    Holzinger, Karl J. and Swineford, Frances , title =. 1939 , series =

  23. [23]

    Raw data from online personality tests , year =

  24. [24]

    2024 , note =

    plsgenomics: PLS Analyses for Genomics , author =. 2024 , note =

  25. [25]

    2025 , note =

    Revelle, William , title =. 2025 , note =

  26. [26]

    2020 , note =

    elasticnet: Elastic-Net for Sparse Estimation and Sparse PCA , author =. 2020 , note =

  27. [27]

    2026 , note =

    pls: Partial Least Squares and Principal Component Regression , author =. 2026 , note =