Skip to content

Probabilistic and sparse PCA

Distinguish a Gaussian latent-variable model from sparse loading objectives, with checked examples of posterior shrinkage and the variance cost of selecting fewer features.

Probabilistic PCA (PPCA) gives principal component analysis a Gaussian latent-variable model with equal residual variance in every feature direction. Sparse PCA changes the fitting problem to favour component loadings with exact zeros. For a quant compressing a panel of market measurements, the distinction is practical: PPCA supplies a probability model and uncertainty about hidden coordinates; sparsity makes a component depend on fewer recorded features. They are two extensions, and either can be used without the other.
Ordinary PCA performs linear dimensionality reduction. For centred observations with covariance matrix SS, its first unit loading vector maximises vTSv\mathbf{v}^{T}S\mathbf{v}. Subsequent orthogonal directions capture the largest remaining variances. A loading says how a feature enters a component; a score is the resulting coordinate for one observation.

PPCA separates latent signal from isotropic noise

Let x∈Rp\mathbf{x}\in\mathbb{R}^{p} be an observation and z∈Rq\mathbf{z}\in\mathbb{R}^{q} a hidden coordinate, with q<pq<p. The model is

x=μ+Wz+ϵ,z∼N(0,Iq),ϵ∼N(0,σ2Ip),\mathbf{x}=\boldsymbol{\mu}+W\mathbf{z}+\boldsymbol{\epsilon},\qquad \mathbf{z}\sim\mathcal{N}(\mathbf{0},I_q),\qquad \boldsymbol{\epsilon}\sim\mathcal{N}(\mathbf{0},\sigma^2I_p),

with independent latent coordinates and noise. Integrating out z\mathbf{z} gives

x∼N(μ,C),C=WWT+σ2Ip.\mathbf{x}\sim\mathcal{N}(\boldsymbol{\mu},C),\qquad C=WW^T+\sigma^2I_p.
“Isotropic” means the same noise variance in every direction. General factor analysis instead allows a diagonal residual covariance with different feature-specific variances. This distinction is about the noise model, not sparse loadings. See the maintainers’ comparison of factor analysis and PPCA.

For complete data, use covariance SS calculated with divisor nn and descending eigenvalues λ1,…,λp\lambda_1,\ldots,\lambda_p. At a nondegenerate maximum-likelihood solution,

σ^2=1p−q∑j=q+1pλj,W^=Uq(Λq−σ^2Iq)1/2R.\widehat{\sigma}^2=\frac{1}{p-q}\sum_{j=q+1}^{p}\lambda_j, \qquad \widehat{W}=U_q(\Lambda_q-\widehat{\sigma}^2I_q)^{1/2}R.
Here UqU_q contains the leading eigenvectors, Λq\Lambda_q their eigenvalues and RR is orthogonal. Thus PPCA recovers the principal subspace, while latent orientation remains ambiguous. Its loading matrix is not generally the unit PCA loading matrix. These results and the posterior below are derived in Tipping and Bishop (1999), Section 3.

A hidden coordinate is not a raw PCA score

Take two centred, dimensionless features with stipulated population covariance
C=(4001),q=1.C=\begin{pmatrix}4&0\\0&1\end{pmatrix},\qquad q=1.

One exact PPCA representation is σ2=1\sigma^2=1 and W=(3,0)TW=(\sqrt{3},0)^T. Feature 1 has signal variance 33 plus noise variance 11; feature 2 has only noise variance 11. These are model assumptions for a synthetic example, not estimated market quantities.

For an observed x=(2,1)T\mathbf{x}=(2,1)^T, set M=WTW+σ2IqM=W^TW+\sigma^2I_q. Gaussian conditioning gives

E[z∣x]=M−1WT(x−μ)=34 2=32≈0.866,\mathbb{E}[\mathbf{z}\mid\mathbf{x}] =M^{-1}W^T(\mathbf{x}-\boldsymbol{\mu}) =\frac{\sqrt{3}}{4}\,2 =\frac{\sqrt{3}}{2}\approx0.866,

and posterior latent variance σ2M−1=1/4\sigma^2M^{-1}=1/4. The ordinary PCA score along (1,0)T(1,0)^T is 22. The two coordinates use different scales, and PPCA inference also incorporates noise. Multiplying the posterior mean by WW gives the conditional mean of the latent signal, (1.5,0)T(1.5,0)^T; the ordinary orthogonal projection is (2,0)T(2,0)^T. Neither numerical difference indicates that a PCA direction was misidentified.

Two separate synthetic examples: PPCA decomposes feature variances 4 and 1 into signal variances 3 and 0 plus noise variance 1 each; its latent posterior mean at (2,1) is 0.866 with variance 0.25. For covariance with diagonal 2 and off-diagonal 1, a dense unit loading captures variance 3, versus 2 for a one-coordinate unit loading.
Two separate synthetic examples: PPCA decomposes feature variances 4 and 1 into signal variances 3 and 0 plus noise variance 1 each; its latent posterior mean at (2,1) is 0.866 with variance 0.25. For covariance with diagonal 2 and off-diagonal 1, a dense unit loading captures variance 3, versus 2 for a one-coordinate unit loading.
Original population examples with dimensionless features. Left: equal noise variance does not imply equal total variance. Right: limiting a component to one feature sacrifices projected variance in this example; it does not illustrate a fitted penalty path.

Sparse PCA changes what a component may use

Sparse PCA seeks loadings with fewer nonzero entries. A particular method must specify its objective, constraints and normalisation. For example, Zou, Hastie and Tibshirani (2006), Section 3.2 use the regression-type criterion
min⁡A,B  ∥X−XBAT∥F2+λ∑j=1q∥βj∥22+∑j=1qλ1,j∥βj∥1,ATA=Iq.\min_{A,B}\; \lVert X-XBA^T\rVert_F^2 +\lambda\sum_{j=1}^{q}\lVert\boldsymbol{\beta}_j\rVert_2^2 +\sum_{j=1}^{q}\lambda_{1,j}\lVert\boldsymbol{\beta}_j\rVert_1, \qquad A^TA=I_q.
XX has centred observations in rows; AA and BB are p×qp\times q, and βj\boldsymbol{\beta}_j is column jj of BB. The L1 penalty encourages zeros; nonzero fitted columns of BB are normalised to give sparse loadings. Orthogonality of AA does not imply orthogonal sparse loadings or uncorrelated component scores. The authors discuss the resulting variance-accounting problem in Section 3.4: simply adding correlated score variances can overstate distinct information captured.
A small calculation isolates the cost of restricting support. For a different population covariance,
S=(2112),S=\begin{pmatrix}2&1\\1&2\end{pmatrix},

the dense leading unit loading (1,1)T/2(1,1)^T/\sqrt{2} captures variance 33. If a unit loading must have exactly one nonzero entry, it must choose one coordinate, capturing variance 22. Relative to total variance 44, those single-component shares are 75%75\% and 50%50\%. This is an explicit support constraint, not the output of an unspecified sparse PCA implementation. Either coordinate is equally good here: sparsity does not ensure a unique selected feature.

Other methods solve different problems. For instance, scikit-learn’s SparsePCA uses a dictionary-learning reconstruction objective with an L1 penalty, rather than the criterion displayed above. A package name alone does not determine how scores, reconstruction and explained variance should be compared.

For market data, choose feature units and scaling deliberately: rescaling changes both the variance geometry and the effective cost of penalising coefficients. A sparse loading is an interpretable measurement recipe, not evidence that excluded variables have no economic role. A Gaussian PPCA fit likewise does not establish Gaussian tails or equal residual noise in observed returns.

For the underlying projection geometry, Principal Component Analysis and the SVD View derives the maximum-variance direction and reconstruction interpretation. The preview is public; the full lesson requires membership.

Sources

Last updated
  • pca
  • latent variable models
  • sparse loadings
  • dimensionality reduction
  • regularisation
← Back to the glossaryBack to top ↑