Independent Component Analysis
PCA finds uncorrelated directions. ICA finds statistically independent ones, a stronger condition that actually recovers the original mixed-together signals.
Why Does This Exist?
PCA finds directions that are uncorrelated — linearly unrelated, meaning zero covariance between them. That's a real property, and it's a much weaker one than it sounds. Two signals can have exactly zero correlation while still being deeply, obviously related in a nonlinear way, and PCA's axes have no mechanism to notice that relationship or to untangle it.
Here's the case we'll carry down the page: the classic cocktail party problem. Two people are speaking at once, and two microphones placed at different spots in the room each pick up a different blend of both voices — not because the voices are correlated with each other (they aren't; they're two independent conversations), but because physical mixing scrambled them together at each microphone. You have two recordings, each a mixture, and you want the two original voices back. PCA's uncorrelated axes give you two new signals that are each still a blend of both voices — better decorrelated, not actually unmixed. Independent component analysis is built specifically to undo the mixing rather than merely rotate it.
Think of It Like This
Two paint colors mixed in two different ratios
Two jars hold pure paint: one red, one blue. Someone pours a bit of each into two glasses, but in different ratios — glass one is mostly red with a little blue, glass two is mostly blue with a little red. You're handed the two mixed glasses and asked for the two pure colors back.
Looking for whichever combination "spreads the colors out most" doesn't get you red and blue — it gets you some other blend that happens to vary the most across the two glasses, which is not the same question. What actually recovers red and blue is knowing that pure red and pure blue are two genuinely separate, independent things, and working backward through the specific mixing ratios to undo them. ICA does exactly that: it assumes the original sources are statistically independent, and searches for the unmixing that makes the recovered signals as independent from each other as the paint colors actually were.
How It Actually Works
A stronger condition than PCA ever asks for
Uncorrelated means no linear relationship: knowing one signal's value gives you no help predicting the mean of the other. Statistically independent is stronger — knowing one signal's value gives you no help predicting anything about the other's distribution at all, linear or not. Independent signals are always uncorrelated; uncorrelated signals are not always independent. ICA searches specifically for a linear unmixing that makes the recovered components as close to fully independent as it can get them, which is a meaningfully harder target than PCA's decorrelation.
Why independence needs a proxy: non-Gaussianity
Independence itself is hard to optimize directly, so ICA leans on a mathematical fact instead: by the central limit theorem, a mixture of independent signals looks more Gaussian than any one of the original signals did on its own — mixing pushes distributions toward the bell curve, the same way summing many independent random effects does. Reversing that logic, maximizing non-Gaussianity of a recovered signal is a workable stand-in for maximizing its independence from the rest: if you're unmixing correctly, each recovered signal should look less like a mixture and more like whatever oddly-shaped distribution the true speech source actually has. FastICA, the common practical algorithm, optimizes exactly this non-Gaussianity proxy.
What has to be true before any of this works
ICA needs at least as many microphones as speakers — you cannot unmix more sources than you have independent recordings of them. It also can't recover the original volume or the original left-right order: any recovered source could be scaled or flipped in sign, and the recovered components come back in no particular order, since nothing in the setup tells the algorithm which voice was "first". And it explicitly requires the true sources to be non-Gaussian; mix two genuinely Gaussian signals and ICA has no non-Gaussianity signal left to climb, and it cannot separate them even in principle.
Show Me the Code
Two synthetic "speakers" — a sine wave and a square wave — mixed into two microphone recordings, unmixed two ways.
import numpy as npfrom sklearn.decomposition import FastICA, PCA
rng = np.random.default_rng(1)t = np.linspace(0, 8, 2000)source1 = np.sin(2 * t) # speaker onesource2 = np.sign(np.sin(3 * t)) # speaker twosources = np.c_[source1, source2]
mixing = np.array([[0.6, 0.4], [0.5, 0.7]]) # two microphones, each a different blendmixed = sources @ mixing.T
pca_out = PCA(n_components=2).fit_transform(mixed)ica_out = FastICA(n_components=2, random_state=0).fit_transform(mixed)
def best_match_corr(recovered: np.ndarray) -> list[float]: corr = np.abs(np.corrcoef(recovered.T, sources.T)[:2, 2:]) return [round(float(corr[i, j]), 2) for i, j in [(0, corr[0].argmax()), (1, corr[1].argmax())]]
print(f"PCA components, best correlation to a true source each: {best_match_corr(pca_out)}")print(f"ICA components, best correlation to a true source each: {best_match_corr(ica_out)}")# -> PCA components, best correlation to a true source each: [0.85, 0.8]# -> ICA components, best correlation to a true source each: [1.0, 1.0]PCA's uncorrelated axes each still resemble a blend of both sources — a correlation around 0.8, not a clean recovery. ICA's components come back matching each original source almost perfectly, at correlation 1.0, because it searched for the unmixing rather than settling for decorrelation.
Watch Out For
Expecting ICA to hand back sources in a predictable order or scale
A recovered component's sign, scale, and position in the output are all arbitrary — rerun the algorithm with a different seed and the "first" component might come back as what was previously the second, flipped in sign. Code that assumes component zero is always "the speech" and component one is always "the noise" will silently swap its labels between runs. Match recovered components to known references by correlation or a domain-specific check, never by their position in the output array.
Applying ICA when the true sources are close to Gaussian
ICA's separation mechanism depends on the true sources being non-Gaussian; feed it mixtures of genuinely Gaussian signals and there is no non-Gaussianity signal to climb, so the algorithm can converge to an answer that looks plausible while not actually recovering anything real. Check the recovered components' distributions for a visibly non-Gaussian shape — most natural signals like speech and most sensor artifacts qualify — before trusting a separation result on data that might not.
The Quick Version
- Uncorrelated is a weaker property than independent: independent signals are always uncorrelated, but uncorrelated signals can still be related in nonlinear ways.
- ICA searches for the linear unmixing that makes recovered components as statistically independent as possible, rather than merely decorrelating them the way PCA does.
- Independence is hard to optimize directly, so ICA maximizes non-Gaussianity instead, since mixtures of independent signals look more Gaussian than the sources that made them.
- ICA needs at least as many recordings as sources, and it cannot recover original scale, sign, or ordering — only the shape of each source.
- The method requires the true sources to be non-Gaussian; it provably cannot separate mixtures of genuinely Gaussian signals.
What to Read Next
- Principal Component Analysis is the decorrelation-only method this page's stronger independence criterion is built to go beyond.
- Singular Value Decomposition is the linear-algebra machinery both PCA and the mixing model in this page's cocktail-party setup rely on.
- Matrix Factorization is a different way of splitting one matrix into meaningful factors, worth contrasting against ICA's unmixing.
- Definitions worth a look: Covariance and Standardization.