Skip to content
mlmentorship

Factor analysis and probabilistic PCA

Factor analysis uses latent factors with per-feature noise. Probabilistic PCA uses isotropic noise and recovers classical PCA in its zero-noise limit.

Published · 7 min read ·Role-specific ·Intermediate
Reading depth

Summary

Factor analysis explains shared covariance through latent Gaussian factors and feature-specific measurement noise. Probabilistic PCA ties those noise variances together. Recognize the model when several measurements share variation but have different residual uncertainties.

Given two measurements, infer one hidden factor without treating either measurement as exact. Use the teaching fixture , zero mean, noise variances , and observation .

The generative model

Let , , and . The factor and measurement noise are independent:

is the observation mean; is diagonal with strictly positive entries. The loadings send each factor into the measured features. Marginalizing the factors gives

Learning objective

Shared factors explain covariance; independent noise adds only diagonal variance

Shared exposure creates off-diagonal covarianceFor one unit-variance factor with loadings (1,2), the shared covariance is [[1,2],[2,4]]. Independent noise adds diagonal terms only.One shared factor contributes to allasset pairsShared 1Shared 2Shared 2Shared 4Independent noise adds only todiagonal entries.Blue areas: shared covariance. Redmarks: private noise.
Derivation
Factor-model graph and covariance decomposition A shared latent factor z reaches three features through loading arrows. Independent noises reach only their own features. The covariance is W W transpose plus diagonal Psi. Factor analysis permits unequal noise variances; probabilistic PCA ties them. Fitted PPCA has PCA's principal subspace at finite noise. Deterministic projection is a separate zero-noise limit. GENERATIVE VIEW · xᵢ = wᵢᵀz + μᵢ + εᵢ latent zshared cause loading w₁w₂w₃ feature x₁feature x₂feature x₃ unique noise ε₁unique noise ε₂unique noise ε₃ MARGINAL VIEW · Cov(x) = WWᵀ + Ψ = w₁·w₁w₁·w₂w₁·w₃ w₂·w₁w₂·w₂w₂·w₃ w₃·w₁w₃·w₂w₃·w₃ + ψ₁00 0ψ₂0 00ψ₃ WWᵀ · shared covarianceΨ · unique variance only FAψ₁, ψ₂, ψ₃may differ PPCAψᵢ = σ²same for every i PCA limitσ² → 0no noise
Two-feature teaching fixture
Shared WWᵀNoise ΨTotal C
[[4, 2], [2, 1]][[1, 0], [0, 4]][[5, 2], [2, 5]]
Read it this way: shared factor paths create both variance and covariance; each noise path adds only its feature's variance. The table applies that decomposition to two features. PPCA ties noise variances, but its fitted principal subspace already matches PCA at finite noise. Deterministic projection is a separate zero-noise limit. The original drawing retains its Tipping-Bishop (1999) and Ghahramani-Hinton (1996) provenance.
Check: Why can independent unique noise alter variances but not explain cross-feature covariance?
Read it this way: For one unit-variance factor with loadings (1,2), the shared covariance is [[1,2],[2,4]]. Independent noise adds diagonal terms only.
Can independent asset noise add an off-diagonal covariance term?

Work the posterior

The shared contribution is . Adding gives , whose eigenvalues are and . The off-diagonal value comes entirely from the shared factor.

Completing the square in the Gaussian log density gives posterior covariance and mean :

Here the prior contributes precision ; the measurements contribute and . Therefore

The noisier second feature supplies less precision. The prior shrinks the mean below the unregularized projection coefficient . Neither the inferred coordinate nor its name establishes a causal explanation.

FA vs PPCA vs PCA: it’s all about

ModelNoise covariance Consequence
Factor analysisPositive diagonalSeparate residual variances
Probabilistic PCAShared residual variance; spectral likelihood fit
Classical PCANo probabilistic noise requirementMinimum squared reconstruction error

Tie the measurement noise

New task: require while keeping and fixed.

Picture and change: replace the unequal noise entries, then recompute both covariance and posterior precision.

Check: , , and . Reusing would retain the wrong measurement weights.

Use when: one shared residual scale is an intended modeling restriction.

Predict an unobserved feature

New task: observe only and predict .

Picture and change: condition using only the observed loading row and noise entry. Keep the missing feature’s independent noise when predicting it.

Check: has mean and variance . Consequently, has mean and variance . Using only would omit future measurement noise.

Use when: incomplete observations have a justified observation model; missingness need not be harmless.

Fitting it

For , order the sample covariance eigenvalues . At a regular PPCA likelihood solution,

where is orthogonal. For our covariance, and . The principal subspace already matches PCA; positive noise does not prevent that agreement. Sending noise to zero separately can make the observation density singular. FA generally uses iterative likelihood fitting, including EM.

Why the probabilistic version is worth it

Likelihood supports held-out comparison, not automatic rank selection without an overfitting policy. Marginals support missing-feature prediction; the generative model supports sampling and mixtures of local factor models. VAEs extend the decoder and inference family, not the exact Gaussian conditioning identity.

What an interviewer expects you to say

Rescale by ten. Which parameters must change?

Answer

With , use , , , and . An unrestricted diagonal-noise family remains compatible; fixed penalties or constraints may not. Isotropic noise generally stops being isotropic.

Common confusions

For orthogonal , and have identical observed covariance. Factor axes are not uniquely identified causes; even one factor permits a sign reversal.


Related: SVD and PCA, Expectation-maximization, Gaussian mixture models, Variational autoencoders.