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 · 6 min read ·Role-specific ·Intermediate

Visual quick review

Visual first · depth when needed

Separate cross-feature covariance created by shared latent factors from feature-specific variance created by diagonal noise, then identify the noise constraint for FA, PPCA, and PCA.

Preparing the visual…

Summary

Factor analysis (FA) is a latent linear-Gaussian model: each observation is a linear map of a few low-dimensional latent factors plus Gaussian noise. Probabilistic PCA (PPCA) is the special case with isotropic noise, and classical PCA falls out as its zero-noise / maximum-likelihood limit.

This is the model that turns PCA from “an eigen-decomposition trick” into “a probabilistic generative model,” which is the framing senior interviewers want. It connects dimensionality reduction to the EM algorithm, to VAEs (a nonlinear PPCA), and to the generative-vs-discriminative discussion. It’s also a clean example of how a prior + likelihood recovers a classical algorithm as a limiting case.

The generative model

Latent factor with , observation :

is the factor loading matrix (the directions), and is the noise covariance. Marginalizing gives a Gaussian with low-rank-plus-structured covariance:

Learning objective

Separate covariance shared through the factors from noise unique to each feature

Factor-model graph and covariance decomposition A shared latent factor z has solid arrows to observed features x1, x2, and x3. Separate noises epsilon1, epsilon2, and epsilon3 have dashed arrows to one feature each. Below, the covariance of x is decomposed into W W transpose, a full three-by-three matrix that creates variance and cross-feature covariance, plus Psi, a diagonal matrix that adds only feature-specific variance. Factor analysis permits different diagonal noise values, probabilistic PCA uses one shared sigma squared value, and classical PCA is the 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
Read it this way: follow the solid arrows first: one latent vector reaches every feature, so WWᵀ can fill both diagonal and off-diagonal covariance cells. Each dashed noise path reaches only one feature, so Ψ adds variance only on the diagonal. FA lets those diagonal additions differ; PPCA ties them to one σ²; PCA is the zero-noise limit. The construction is original and checked against Tipping and Bishop (1999) and Ghahramani and Hinton (1996).

The whole model is the claim: the correlations between observed variables are explained by a few shared latent factors; whatever is left is independent per-feature noise.

FA vs PPCA vs PCA: it’s all about

ModelNoise covariance Consequence
Factor analysisdiagonal per-feature noise; scale-invariant; models unique variances
Probabilistic PCAisotropic one shared noise level; MLE has closed form via eigendecomposition
Classical PCA limitdeterministic projection onto top- eigenvectors

For interviews, distinguish the noise models: FA has diagonal noise covariance, while PPCA uses the same isotropic noise for every feature. FA is invariant to rescaling individual features. PCA and PPCA are sensitive to feature scaling, which is why inputs are usually standardized first.

Fitting it

  • PPCA has a closed-form MLE: is recovered from the top- eigenvectors of the sample covariance scaled by , with = average of the discarded eigenvalues. So PPCA ≈ PCA plus a noise estimate.
  • FA has no closed form (the diagonal couples things); it’s fit with EM: the E-step infers the posterior over factors , the M-step updates and . This is a textbook EM application.

Why the probabilistic version is worth it

Recasting PCA as a model buys you things plain PCA can’t do:

  • A proper likelihood → principled model comparison and a way to choose .
  • Natural handling of missing data (marginalize unobserved dimensions in EM).
  • A generative model you can sample from.
  • Mixtures of PPCA/FA for non-linear, multi-modal structure.
  • The conceptual bridge to the VAE, which is “PPCA with a neural-network decoder and amortized inference.”

What an interviewer expects you to say

  1. Write the latent linear-Gaussian generative model and the marginal covariance .
  2. State the difference: FA = diagonal noise, PPCA = isotropic noise, PCA = zero-noise limit of PPCA.
  3. Explain the practical consequence: FA is scale-invariant; PCA/PPCA require feature standardization.
  4. Know that PPCA has a closed-form (eigendecomposition) MLE while FA needs EM.
  5. Bonus: connect to VAEs (nonlinear PPCA) and note the probabilistic framing enables missing data, model selection, and sampling.

Common confusions

  • “FA and PCA are the same.” FA models per-feature (diagonal) noise and explains covariance; PCA maximizes retained variance and assumes isotropic/zero noise. They give different loadings unless noise is uniform.
  • “PPCA is fancier PCA with no payoff.” The payoff is the likelihood: model selection, missing data, sampling, mixtures.
  • “The factors are unique.” is only identifiable up to rotation (you can rotate and absorb it into ), hence “factor rotation” (varimax) for interpretability.
  • “FA needs scaling like PCA.” FA is invariant to per-feature rescaling because its diagonal noise absorbs scale; PCA is not.

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