Dimensionality Reduction

Introduction

Modern datasets often contain hundreds or thousands of variables. A genomics study might measure expression levels of 20 20,000 000 genes; an image may consist of millions of pixels; a text corpus may track frequencies of tens of thousands of words. Working directly with such high-dimensional data creates both computational and statistical challenges.

Dimensionality reduction addresses these challenges by finding lower-dimensional representations that capture the essential structure of high-dimensional data. The goal is to reduce the number of variables while preserving as much relevant information as possible—retaining variance, preserving distances, or maintaining neighborhood relationships.

Beyond efficiency, dimensionality reduction supports visualization (projecting to two or three dimensions), noise reduction, feature extraction, and mitigation of the curse of dimensionality.

The Curse of Dimensionality

The curse of dimensionality refers to phenomena that arise in high-dimensional spaces.

One manifestation is sparsity. The volume of a space grows exponentially with dimension. In a unit hypercube in d d dimensions, achieving average spacing ε epsilon requires on the order of (1/ε)d open paren 1 divided by epsilon close paren to the d-th power points.

Another phenomenon is distance concentration. For independent random vectors X1,…,Xn∈Rd X sub 1 comma dot dot dot comma X sub n is a member of R to the d-th power, max⁡(∥)⁢Xi∥−min⁡(∥)⁢Xi∥min⁡(∥)⁢Xi∥→0⁢as ⁢d→∞ the fraction with numerator max of open paren parallel to close paren X sub i times the metric of negative min of open paren parallel to close paren X sub i and denominator min of open paren parallel to close paren X sub i parallel to right arrow 0 attoseconds d right arrow infinity.

Distances become nearly indistinguishable, weakening nearest-neighbor methods.

Dimensionality reduction alleviates these effects by projecting data into lower-dimensional subspaces where structure is more meaningful.

Linear Dimensionality Reduction

Given x1,…,xn∈Rd x sub 1 comma dot dot dot comma x sub n is a member of R to the d-th power, a linear projection to Rk R to the k-th power (with k<d k is less than d) has the formyi=WT⁢xi, y sub i equals W to the T power x sub i comma where W∈Rd×k W is a member of R raised to the d times k power.

Principal Component Analysis

PCA finds orthogonal directions of maximal variance.

Assume centered data x¯=1n⁢∑xi=0 x bar equals 1 over n the sum of x sub i equals 0. The first principal component solves w1=arg⁡(max⁡(1n))⁢∑i=1nwT⁢xi=arg⁡(max⁡(wT))⁢S⁢w, w sub 1 equals the arg of open paren max of open paren 1 over n close paren close paren the sum from i equals 1 to n of w to the T power x sub i equals the arg of open paren max of open paren w to the T power close paren close paren S w comma where S=1n⁢∑(xi)⁢xiT S equals 1 over n the sum of open paren x sub i close paren x sub i to the T power.

Using Lagrange multipliers, S⁢w=λ⁢w S w equals lamda w.

Thus principal components are eigenvectors of S S, ordered by eigenvalue magnitude.

Reconstruction View

Projection onto the first k k components yields reconstruction x^i=∑j=1k(wjT⁢xi)⁢wj, x hat sub i equals the sum from j equals 1 to k of open paren w sub j to the T power x sub i close paren w sub j comma

with mean squared error

1n⁢∑‖xi-x^i‖2=∑j=k+1dλj. 1 over n the sum of the metric of x sub i minus x hat sub i squared equals the sum from j equals k plus 1 to d of lamda sub j period

PCA via SVD

Let X X be the centered data matrix. Its SVD:

X=U⁢Σ⁢VT X equals U Sigma V to the T power.

Columns of V V are principal components, and eigenvalues satisfy λj=σj2/n lamda sub j equals sigma sub j squared divided by n.

The projected data equals X⁢Vk X V sub k.

Variance Explained

∑j=1kλj∑j=1dλj=∑j=1kσj2∑j=1dσj2 the fraction with numerator the sum from j equals 1 to k of lamda sub j and denominator the sum from j equals 1 to d of lamda sub j equals the fraction with numerator the sum from j equals 1 to k of sigma sub j squared and denominator the sum from j equals 1 to d of sigma sub j squared.

Singular Value Decomposition

Any m×n m times n matrix A A satisfies A=U⁢Σ⁢VT. A equals U Sigma V to the T power period

Truncated SVD: A≈Ak=Uk⁢Σk⁢VkT A almost equals A sub k equals U sub k Sigma sub k V sub k to the T power.

Eckart–Young theorem:

‖A−Ak‖F=∑j=k+1rσj2,‖A−Ak‖2=σk+1 the metric of A minus A sub k sub F equals the square root of the sum from j equals k plus 1 to r of sigma sub j squared comma the metric of A minus A sub k sub 2 equals sigma sub k plus 1.

Other Linear Methods

Factor Analysis

x=Λ⁢f+ϵ,Cov⁡(x)=Λ⁢ΛT+Ψ x equals Lamda f plus epsilon comma Cov of x equals Lamda Lamda to the T power plus Psi.

Linear Discriminant Analysis

J⁡(w)=wT⁢SB⁢wwT⁢SW⁢w J of w equals w to the T power S sub B w over w to the T power S sub W w.

Solution: leading eigenvector of SW−1⁢SB S sub W to the negative 1 power S sub B.

Nonlinear Methods

Multidimensional Scaling

Stress=∑(di⁢j−‖yi−yj‖)∑di⁢j2 Stress equals the square root of the fraction with numerator the sum of open paren d sub i j minus the metric of y sub i minus y sub j close paren and denominator the sum of d sub i j squared.

Isomap

Uses geodesic distances and MDS.

Locally Linear Embedding

∑(xi−∑(wi⁢j)⁢xj) the sum of open paren x sub i minus the sum of open paren w sub i j close paren x sub j close paren.

t-SNE

pj|i=exp⁡(−∥xi−xj∥2/2⁢σi2)∑exp⁡(−∥xi−xk∥2/2⁢σi2) p sub j divides i equals the fraction with numerator the exp of open paren negative the metric of x sub i minus x sub j squared divided by 2 sigma sub i squared close paren and denominator the sum of the exp of open paren negative the metric of x sub i minus x sub k squared divided by 2 sigma sub i squared close paren.

qi⁢j=(1+∥yi−yj∥2)−1∑(1+∥yk−yl∥2) q sub i j equals the fraction with numerator open paren 1 plus the metric of y sub i minus y sub j squared close paren to the negative 1 power and denominator the sum of open paren 1 plus the metric of y sub k minus y sub l squared close paren.

Minimizes KL divergence.

UMAP

Constructs a fuzzy simplicial complex and optimizes a low-dimensional embedding.

Practical Considerations

Centering is essential for PCA. Scaling is necessary when variables differ in units.

Full SVD costs O⁡(min⁡(n⁢d2,n2⁢d)) O of open paren min of open paren n d squared comma n squared d close paren close paren. Truncated methods reduce cost to O⁢(n⁢dk) O times open paren n d k close paren.

PCA allows out-of-sample projection via learned components; many nonlinear methods do not.

Applications

PCA supports image compression, genomics population analysis, latent semantic analysis, financial factor modeling, and single-cell visualization.

Summary

Dimensionality reduction maps high-dimensional data to lower-dimensional representations while preserving structure. PCA remains the primary linear method due to simplicity and interpretability. Nonlinear methods such as t-SNE and UMAP reveal manifold structure for visualization. The appropriate method depends on the objective, data geometry, and computational constraints.