Module contents
Lesson 13 of 24Advanced 105 min

Independent component analysis

Independent component analysis, identifiability, whitening and separation algorithms.

After this lesson you can

  • Explain blind source separation and its unavoidable ambiguities.
  • Derive ICA identifiability and the role of non-Gaussianity.
  • Apply whitening and independent-component algorithms.
  • Evaluate separation and understand practical limitations.

Before you start

Motivation: signals arriving mixed together

At a party three people speak and three microphones are placed around the room. Each microphone records a weighted sum of the voices, with weights depending on distance. You want the voices, not sums, and know neither weights nor voices. This is the cocktail party problem, and surprisingly one assumption about the voices makes it solvable.

The same setup appears in very different places:

  • EEG and MEG. Each scalp electrode records a linear, instantaneous superposition (at EEG frequencies tissue conduction is almost static) of brain sources and artifacts: blinks, eye movements, muscle activity, electrical mains. Makeig, Bell, Jung and Sejnowski (1996) applied this method to EEG, and Jung et al. (2000) proposed artifact removal, now its most common use: separate components, discard blink components and reconstruct without them.
  • Markets. Many assets’ returns move together because they respond to a few common shocks. If shocks are independent and heavy-tailed, one can try to recover them as independent components; Back and Weigend (1997) were among the first to apply this to stock returns. In causality, LiNGAM uses the same idea to orient causal graph arrows when noise is non-Gaussian (see the causality module).

The previous lesson ended at an impasse: factor analysis identifies the factors’ subspace, but not the factors, because every rotation gives the same likelihood. Independent component analysis (ICA) escapes through one idea: require components to be independent and non-Gaussian. Before formalizing anything, listen.

InteractiveThe cocktail party problem
Sources s\mathbf{s} (hidden)
s1
s2
s3
Microphones x=As\mathbf{x} = \mathbf{A}\mathbf{s}
x1
x2
x3
ICA: s^=Wx\hat{\mathbf{s}} = \mathbf{W}\mathbf{x}
ŝ1
s^1≈−s3\hat s_1 \approx -s_3 (impulses)
ŝ2
s^2≈−s2\hat s_2 \approx -s_2 (sawtooth)
ŝ3
s^3≈s1\hat s_3 \approx s_1 (tone)
  • s1: tone (kurtosis −1.5)
  • s2: sawtooth (kurtosis −1.2)
  • s3: impulses (kurtosis 112.4)
Mixing matrix A\mathbf{A}
12000 (1500 ms)
Amari index of WA\mathbf{W}\mathbf{A} (0 = perfect separation)0.0040.004
det⁡A\det \mathbf{A}1.1901.190
FastICA iterations7
∣corr(s^i,sπ(i))∣|\mathrm{corr}(\hat s_i, s_{\pi(i)})|1.000⋅1.000⋅1.0001.000 · 1.000 · 1.000
All three sources are recovered, in a different order, with 2 signs flipped. ICA identifies independence and leaves source order and sign ambiguous.
Three synthetic sources sampled at 8000 Hz for 1.5 s (12000 samples), centered with variance 1: a 330 Hz tone, a 110 Hz sawtooth and impulsive noise (each sample is normal with probability 0.03, zero otherwise). Mixtures are x=As\mathbf{x} = \mathbf{A}\mathbf{s} using your editable matrix, and separation uses symmetric FastICA with G=log⁡cosh⁡G = \log\cosh after centering and whitening, running in your browser; it estimates from the first nn samples of a fixed permutation of time indices and applies it to the whole signal. Press ▶ on each trace to listen. Note output order and signs, then try 'Two identical microphones' and reduce nn to 40.

All three outputs return almost perfectly (correlation above 0.99 with sources), but in a different order and with some signs flipped. This is not an algorithm defect: no method can know which voice was “first.” When two microphones record the same thing, however, nothing can be done: three sources do not fit into two distinct mixtures. These observations form the theory’s skeleton.

The model and its ambiguities

Three comments on assumptions. First, mean is no problem: E[x]=AE[s]\E[\vb{x}] = \mat{A}\E[\vb{s}] is subtracted initially and restored at the end, so data are centered. Second, the model treats nn observations as an iid sample of x\vb{x}: time order plays no role, and shuffling instants does not change the solution (hence the widget estimates from permuted instants). Third, there is no noise: x\vb{x} is exactly As\mat{A}\vb{s}. Variants with noise, more sources than sensors or temporal structure appear at the end.

On data orientation: the course convention is one observation per row, X∈Rn×d\mat{X} \in \R^{n \times d}, making the model X=SA⊤\mat{X} = \mat{S}\mat{A}\T. Cells use the ICA literature orientation, one row per sensor and one column per time (d×nd \times n), stated in each.

What the model cannot know

If D\mat{D} is invertible diagonal and Π\mat{\Pi} a permutation matrix,

x=As=(AΠ⊤D−1)(DΠs),\vb{x} = \mat{A}\vb{s} = \big(\mat{A}\mat{\Pi}\T\mat{D}\inv\big)\big(\mat{D}\mat{\Pi}\vb{s}\big),

and DΠs\mat{D}\mat{\Pi}\vb{s} also has independent components: the same sources reordered and rescaled. Both pairs (A,s)(\mat{A}, \vb{s}) and (AΠ⊤D−1,DΠs)(\mat{A}\mat{\Pi}\T\mat{D}\inv, \mat{D}\mat{\Pi}\vb{s}) generate exactly the same distribution of x\vb{x}, so no method, with any amount of data, can distinguish them. At best, the global matrix P=WA\mat{P} = \mat{W}\mat{A} is a scaled permutation:

WA=DΠ.\mat{W}\mat{A} = \mat{D}\mat{\Pi}.

This gives three ambiguities:

  • Scale. Multiplying a source by cc and dividing its column of A\mat{A} by cc changes nothing. Fix it by convention: E[si2]=1\E[s_i^2] = 1.
  • Sign. What remains of scaling after that convention (c=−1c = -1). If useful, fix it by another convention: for example the largest absolute entry in each column of A\mat{A} is positive, or each source has positive skewness.
  • Order. Sources have no natural order. Unlike PCA, where variance orders components, here all have variance 1 by convention. They can be ordered afterward by any criterion (non-Gaussianity, column norm of A\mat{A} before normalization), but the model prefers none.

Conventions resolve scale and sign as presentation issues; permutation requires external information (knowing whose voice a source is). None prevents practical use: removing a blink from EEG only requires identifying which component is the blink.

Measuring success: the Amari index

If the goal is P=WA\mat{P} = \mat{W}\mat{A} shaped like a scaled permutation, error should measure how far P\mat{P} is from that form without penalizing unavoidable ambiguities. The Amari index (Amari, Cichocki and Yang, 1996) does so row by row and column by column:

E(P)=12d(d−1)[∑i=1d(∑j=1d∣pij∣max⁡k∣pik∣−1)+∑j=1d(∑i=1d∣pij∣max⁡k∣pkj∣−1)].E(\mat{P}) = \frac{1}{2d(d-1)}\left[\sum_{i=1}^{d}\Big(\sum_{j=1}^{d}\frac{\abs{p_{ij}}}{\max_k \abs{p_{ik}}} - 1\Big) + \sum_{j=1}^{d}\Big(\sum_{i=1}^{d}\frac{\abs{p_{ij}}}{\max_k \abs{p_{kj}}} - 1\Big)\right].

Each parenthesis is 0 if its row (or column) has one nonzero entry, and d−1d - 1 if all are equal in absolute value. Hence:

  • 0≤E(P)≤10 \le E(\mat{P}) \le 1, with E=0E = 0 if and only if each row and column of P\mat{P} has exactly one nonzero entry, namely P=DΠ\mat{P} = \mat{D}\mat{\Pi}; and E=1E = 1 if all entries have the same absolute value.
  • It is invariant to permuting rows of W\mat{W} or changing their signs, likewise columns of A\mat{A}: order and sign are not penalized. Scale needs care: zero is preserved by row rescaling (a DΠ\mat{D}\mat{\Pi} remains one), but outside perfect solutions, rescaling a row changes column ratios and the index. Thus calculate with unit-variance normalized outputs, the scale convention.
  • In two dimensions it has a geometric reading: for rotation angle ∣θ∣≤45°\abs{\theta} \le 45°, E=∣tan⁡θ∣E = \abs{\tan\theta} because each row and column contributes ∣tan⁡θ∣\abs{\tan\theta}, four terms divided by 2d(d−1)=42d(d-1) = 4. Index 0.026 is an error of 1.5°1.5°.

Normalization by 2d(d−1)2d(d-1), placing the index in [0,1][0, 1], is common; other works use the unnormalized sum or squared entries. Always compare using the same convention.

CodeThe Amari index
Implement amari_index(W, A), accepting estimated separation matrix W and mixing matrix A (both d×dd \times d) and returning the normalized Amari index of P=WA\mathbf{P} = \mathbf{W}\mathbf{A}, a float in [0,1][0, 1]. Tests check it is 0 for perfect separation in any order and scale, invariant to permutations and sign changes of rows of W\mathbf{W} and columns of A\mathbf{A}, equals tan⁡θ\tan\theta for a plane rotation of θ=30°\theta = 30°, and equals 1 when all entries are equal.
import numpy as np

def amari_index(W, A):
  P = np.abs(np.asarray(W, float) @ np.asarray(A, float))
  d = P.shape[0]
  # tu código: cociente de cada |p_ij| por el máximo de su fila y de su columna,
  # sumas menos 1 y normalización por 2 d (d - 1)
  return 0.0
Shift+Enter to run

Why uncorrelated is not enough

Almost every ICA algorithm first whitens data: linearly transforms them to identity covariance. With C=Cov⁡(x)=EΛE⊤\mat{C} = \Cov(\vb{x}) = \mat{E}\mat{\Lambda}\mat{E}\T, common choices are PCA whitening V=Λ−1/2E⊤\mat{V} = \mat{\Lambda}^{-1/2}\mat{E}\T and symmetric (ZCA) whitening V=C−1/2=EΛ−1/2E⊤\mat{V} = \mat{C}^{-1/2} = \mat{E}\mat{\Lambda}^{-1/2}\mat{E}\T. Any V\mat{V} with VCV⊤=I\mat{V}\mat{C}\mat{V}\T = \mat{I} works, and all differ by left multiplication by an orthogonal matrix.

Proof

I=Cov⁡(z)=QCov⁡(s)Q⊤=QQ⊤\mat{I} = \Cov(\vb{z}) = \mat{Q}\Cov(\vb{s})\mat{Q}\T = \mat{Q}\mat{Q}\T. If y=Uz\vb{y} = \mat{U}\vb{z} must also have identity covariance, UU⊤=I\mat{U}\mat{U}\T = \mat{I}. Orthogonal group O(d)O(d) has dimension d(d−1)/2d(d-1)/2.

∎

Whitening therefore solves half the problem: in two dimensions four unknown numbers become one angle. But that angle cannot be fixed by second-order moments: for any orthogonal U\mat{U}, Uz\mat{U}\vb{z} retains identity covariance, uncorrelated unit-variance components. Uncorrelatedness is all PCA and Gaussian factor analysis know to require, and here it distinguishes nothing.

What does independence add? It examines higher-order moments. If y1,y2y_1, y_2 are independent, E[y12y22]=E[y12]E[y22]=1\E[y_1^2 y_2^2] = \E[y_1^2]\E[y_2^2] = 1; uncorrelated but dependent variables can violate this. For two iid unit-variance sources with excess kurtosis κ\kappa (defined below) rotated by angle θ\theta, expanding the product gives

E[z12z22]=1+κ2sin⁡22θ,\E[z_1^2 z_2^2] = 1 + \tfrac{\kappa}{2}\sin^2 2\theta,

which equals 1 only at angles aligning z\vb{z} with sources (or if κ=0\kappa = 0). The cell checks this with two uniform sources whose cloud is a square:

[ ]Whitening leaves a rotated square (data orientation d × n)Browser
import numpy as np

rng = np.random.default_rng(1)
n = 20_000
S = rng.uniform(-np.sqrt(3), np.sqrt(3), size=(2, n))     # dos fuentes uniformes de varianza 1
A = np.array([[1.0, 0.8], [0.3, 1.0]])
X = A @ S                                                  # una fila por sensor

Xc = X - X.mean(axis=1, keepdims=True)
C = Xc @ Xc.T / n
lam, E = np.linalg.eigh(C)
V = E @ np.diag(lam ** -0.5) @ E.T                         # blanqueado simétrico C^(-1/2)
Z = V @ Xc
Q = V @ A
th = np.degrees(np.arctan2(Q[1, 0], Q[0, 0]))

print("Cov(z):\n", np.round(Z @ Z.T / n, 4))
print("Q Q^T:\n", np.round(Q @ Q.T, 3))
print(f"la primera columna de Q forma {th:.1f} grados con el eje: los datos blanqueados son el cuadrado de las fuentes girado")
print(f"E[z1² z2²] = {np.mean(Z[0]**2 * Z[1]**2):.3f}   frente a E[s1² s2²] = {np.mean(S[0]**2 * S[1]**2):.3f}")
for ang in (0, 15, 30, 45):
    c, s = np.cos(np.radians(ang)), np.sin(np.radians(ang))
    Y = np.array([[c, s], [-s, c]]) @ S                    # fuentes giradas ang grados
    print(f"giro de {ang:2d}°: corr(y1, y2) = {np.corrcoef(Y)[0, 1]:+.3f}   E[y1² y2²] = {np.mean(Y[0]**2 * Y[1]**2):.3f}")

Output tells the whole story. Covariance of z\vb{z} is identity and so is QQ⊤\mat{Q}\mat{Q}\T, up to sampling error in covariance of s\vb{s}. Rotated sources remain uncorrelated at any angle, but E[y12y22]\E[y_1^2 y_2^2] falls from 1 to 0.4 between 0°0° and 45°45°: rotated projections depend on one another, detected by the fourth-order statistic. ICA searches for the rotation where dependence disappears.

Identifiability: at most one Gaussian source

There is a case where rotation can never be found: Gaussian sources. If s∼N(0,I)\vb{s} \sim \Normal(\vb{0}, \mat{I}), its density (2π)−d/2e−∥s∥2/2(2\pi)^{-d/2}e^{-\norm{\vb{s}}^2/2} depends only on norm, so Us\mat{U}\vb{s} has the same distribution for every orthogonal U\mat{U} (you prove this step by step in the first exercise). Then x=As=(AU⊤)(Us)\vb{x} = \mat{A}\vb{s} = (\mat{A}\mat{U}\T)(\mat{U}\vb{s}) with Us\mat{U}\vb{s} also standard Gaussian, and every U\mat{U} explains the data equally well. The whitened cloud is a disk, and a disk has no preferred axes.

This is exactly factor analysis’s rotational ambiguity, not coincidentally: the linear Gaussian latent-variable model assumes Gaussian factors. Viewed this way, ICA is noiseless factor analysis with non-Gaussian factors, and non-Gaussianity breaks the symmetry. The precise result is due to Comon (1994), based on a classical normal-characterization theorem.

That is, two linear combinations of independent variables sharing a non-Gaussian variable are never independent. This gives a short identifiability proof.

Proof

Let P=WA\mat{P} = \mat{W}\mat{A} be invertible, so yi=∑kpiksky_i = \sum_k p_{ik}s_k. Call gg the Gaussian source’s index, if any.

  1. If two rows i≠ji \neq j had nonzero entries in the same column k≠gk \neq g, independence of yiy_i and yjy_j and Darmois-Skitovich would force sks_k to be Gaussian, contrary to assumption. Thus each column k≠gk \neq g has at most one nonzero entry, and invertibility of P\mat{P} makes it exactly one.
  2. These d−1d - 1 columns have their nonzero entries in different rows: if two shared a row, they would be proportional to the same canonical vector and P\mat{P} singular. They occupy d−1d - 1 rows, leaving row rr zero outside column gg; since it cannot be zero, prg≠0p_{rg} \neq 0.
  3. It remains to show column gg has no other nonzero entries. If pig≠0p_{ig} \neq 0 for some i≠ri \neq r, then Cov⁡(yi,yr)=pig prgVar⁡(sg)≠0\Cov(y_i, y_r) = p_{ig}\,p_{rg}\Var(s_g) \neq 0 because other sources do not appear in yry_r; correlated variables are not independent. Contradiction.

Each row and column of P\mat{P} has exactly one nonzero entry: P=DΠ\mat{P} = \mat{D}\mat{\Pi}. If there is no Gaussian source, step 1 applies to every column and the rest is the same.

∎

Notice what this says and does not say. Pairwise independence of outputs suffices for full independence: the algorithm can optimize a pairwise measure. “At most one Gaussian” is necessary and precise: with two or more Gaussian sources, non-Gaussian sources remain identifiable and so does the subspace spanned by Gaussian ones, but not a basis inside it. The theorem concerns the distribution: the solution is unique with unlimited data, not how much data is needed to find it.

[ ]Laplace versus Gaussian sources: six samples of the same modelBrowser
import numpy as np
import warnings
from sklearn.decomposition import FastICA

def amari(P):
    P = np.abs(np.asarray(P, float))
    d = P.shape[0]
    filas = (P / P.max(axis=1, keepdims=True)).sum(axis=1) - 1
    columnas = (P / P.max(axis=0, keepdims=True)).sum(axis=0) - 1
    return (filas.sum() + columnas.sum()) / (2 * d * (d - 1))

n = 5000
A = np.array([[1.0, 0.8], [0.3, 1.0]])
res = {"Laplace": [], "gaussianas": []}
for r in range(6):
    g = np.random.default_rng(10 + r)                     # una muestra nueva del mismo modelo en cada vuelta
    for nombre, S in (("Laplace", g.laplace(size=(2, n)) / np.sqrt(2)), ("gaussianas", g.normal(size=(2, n)))):
        with warnings.catch_warnings():
            warnings.simplefilter("ignore")
            ica = FastICA(n_components=2, whiten="unit-variance", random_state=0, max_iter=1000).fit((A @ S).T)
        res[nombre].append(amari(ica.components_ @ A))   # components_ es la W completa (incluye el blanqueado)
for nombre, v in res.items():
    print(f"{nombre:10s} índice de Amari:", " ".join(f"{a:.3f}" for a in v),
          "  error angular:", " ".join(f"{np.degrees(np.arctan(a)):4.1f}°" for a in v))

(Scikit-learn uses one row per observation, hence the transpose.) With Laplace sources, six samples give Amari indices between 0.002 and 0.016, errors under one degree due to finite sample size that shrink with more data. With Gaussian sources each sample leads to a different rotation, with errors between 4°4° and 39°39° unrelated to A\mat{A}: finite-sample contrast has spurious extrema from sampling noise, and the algorithm stops at one. More data flatten these extrema but reveal no good one: the estimate converges to nothing.

Mixing makes distributions more Gaussian

What criterion finds the right rotation? Intuition comes from the central limit theorem: a sum of many independent variables is approximately Gaussian. A mixture y=w⊤z=q⊤sy = \vb{w}\T\vb{z} = \vb{q}\T\vb{s} (with q=Q⊤w\vb{q} = \mat{Q}\T\vb{w}) sums independent sources and is more Gaussian than each one, except when q\vb{q} has one nonzero entry, meaning yy is a source. Maximizing non-Gaussianity of yy retraces the path.

This can be made exact with cumulants. The cumulant-generating function of an independent sum is additive, Ky(t)=∑iKsi(qit)K_y(t) = \sum_i K_{s_i}(q_i t), so order-rr cumulant satisfies κr(y)=∑iqir κr(si)\kappa_r(y) = \sum_i q_i^r\,\kappa_r(s_i). With ∥q∥=1\norm{\vb{q}} = 1, variance of yy is 1 and its fourth cumulant is excess kurtosis:

Proof

The formula is cumulant additivity. For the bound, ∣∑iqi4κi∣≤∑iqi4∣κi∣≤max⁡i∣κi∣∑iqi4\abs{\sum_i q_i^4\kappa_i} \le \sum_i q_i^4\abs{\kappa_i} \le \max_i\abs{\kappa_i}\sum_i q_i^4 and ∑iqi4≤(∑iqi2)2=1\sum_i q_i^4 \le (\sum_i q_i^2)^2 = 1, with equality in the last inequality only if at most one qiq_i is nonzero (cross products qi2qj2q_i^2 q_j^2 must vanish).

∎

In two dimensions, with two sources of equal kurtosis κ\kappa, a projection at angle θ\theta from the first has kurtosis κ(cos⁡4θ+sin⁡4θ)=κ(1−12sin⁡22θ)\kappa(\cos^4\theta + \sin^4\theta) = \kappa\big(1 - \tfrac12\sin^2 2\theta\big): source kurtosis at 0°0° and 90°90°, half at 45°45°. You will see this in the second widget. First, inspect the many-source limit:

InteractiveMixing makes distributions more Gaussian
Histogram of yk=(s1+⋯+sk)/ky_k = (s_1 + \dots + s_k)/\sqrt{k}, 20000 samples
  • sample of yₖ
  • N(0, 1)
Excess kurtosis of yky_k by number of sources kk
  • κ/k con κ = 3.0
  • sample (8000 per k, active point from the histogram)
Distribution of each source
1
Sample excess kurtosis2.812
Theory κ/k\kappa/k3.0003.000
JG×103J_G \times 10^31.2131.213
A single Laplace variable has excess kurtosis 3.0, and its histogram is far from a bell curve. Increase kk.
Normalized sum yk=(s1+⋯+sk)/ky_k = (s_1 + \dots + s_k)/\sqrt{k} of kk independent copies of a mean-0, variance-1 law: uniform on [−3,3][-\sqrt3, \sqrt3], binary ±1\pm1, Laplace or centered exponential. The histogram uses 20000 samples of yky_k and the right plot 8000 samples per kk (all generated in your browser with fixed seeds). Dashed curve is the theorem's exact κ/k\kappa/k prediction. Start with Laplace and k=1k = 1, increase kk and watch kurtosis fall; then try exponential, whose skewness falls as 2/k2/\sqrt{k}, much more slowly.

Kurtosis falls as 1/k1/k and skewness as 1/k1/\sqrt{k}, so Gaussianization is slower for asymmetric sources. Read the theorem carefully: mixture kurtosis does not exceed the largest source kurtosis, not that every mixture has less kurtosis than each source. Mix a highly non-Gaussian source with an almost Gaussian one and the mixture is less Gaussian than the latter. The bound guarantees the maximum occurs at a source. Entropy rather than kurtosis gives the same conclusion for any law with a density: the entropy power inequality in Lieb’s (1978) form says h(∑iqisi)≥∑iqi2 h(si)h(\sum_i q_i s_i) \ge \sum_i q_i^2\,h(s_i) if ∥q∥=1\norm{\vb{q}} = 1, hence the negentropy below satisfies J(y)≤∑iqi2J(si)≤max⁡iJ(si)J(y) \le \sum_i q_i^2 J(s_i) \le \max_i J(s_i).

Measures of non-Gaussianity

We need a number expressing distance from Gaussianity. Two families dominate practice, a choice between simplicity and robustness. All are non-Gaussianity measures of standardized yy (mean 0, variance 1), what projection w⊤z\vb{w}\T\vb{z} produces with ∥w∥=1\norm{\vb{w}} = 1.

Kurtosis

kurt⁡(y)=E[(y−Ey)4]Var⁡(y)2−3=E[y4]−3if Ey=0, Var⁡y=1.\operatorname{kurt}(y) = \frac{\E[(y - \E y)^4]}{\Var(y)^2} - 3 = \E[y^4] - 3 \quad \text{if } \E y = 0,\ \Var y = 1.

It is 0 for a Gaussian. Laws with kurt⁡<0\operatorname{kurt} < 0 are sub-Gaussian: light tails, spread-out mass, such as uniform or sinusoidal. Those with kurt⁡>0\operatorname{kurt} > 0 are super-Gaussian: sharp peak and heavy tails, like Laplace (kurt⁡=3\operatorname{kurt} = 3) or a sparse signal almost always zero, such as voice or cocktail-party impulsive noise. Jensen’s inequality gives E[y4]≥(E[y2])2=1\E[y^4] \ge (\E[y^2])^2 = 1, so kurt⁡≥−2\operatorname{kurt} \ge -2, equality only for symmetric binary ±1\pm1. As a cumulant it is additive for mixtures, enabling the theorem, and its sample version costs one pass.

Its drawback is serious: dependence on y4y^4. One observation five standard deviations out contributes 54=6255^4 = 625 to the sum of fourth powers, as much as hundreds of normal observations. Sample kurtosis measures outliers more than distribution shape, and its variance depends on the eighth moment.

Negentropy

The “correct” measure comes from information theory. Among densities with fixed variance, Gaussian has maximum differential entropy (maximum entropy principle). Negentropy

J(y)=h(ν)−h(y),ν∼N(0,Var⁡y),J(y) = h(\nu) - h(y), \qquad \nu \sim \Normal(0, \Var y),

is therefore nonnegative, zero only when yy is Gaussian, and unchanged if the variable yy is rescaled. It is optimal in a precise sense (soon you will see minimizing mutual information is equivalent to maximizing summed negentropies), but estimating h(y)h(y) requires estimating a density.

Practical approximations replace density with a few moments. The classic Gram-Charlier expansion (Jones and Sibson, 1987) is

J(y)≈112E[y3]2+148kurt⁡(y)2,J(y) \approx \tfrac{1}{12}\E[y^3]^2 + \tfrac{1}{48}\operatorname{kurt}(y)^2,

inheriting kurtosis fragility. Hyvärinen (1998) proposed replacing polynomials with slowly growing functions: for nonquadratic GG,

J(y)∝(E[G(y)]−E[G(ν)])2=:JG(y),ν∼N(0,1),J(y) \propto \big(\E[G(y)] - \E[G(\nu)]\big)^2 =: J_G(y), \qquad \nu \sim \Normal(0, 1),

with two recommended choices (Hyvärinen and Oja, 2000):

G1(u)=1alog⁡cosh⁡(au), 1≤a≤2,G2(u)=−e−u2/2.G_1(u) = \tfrac{1}{a}\log\cosh(a u),\ 1 \le a \le 2, \qquad G_2(u) = -e^{-u^2/2}.

The approximation fits the maximum-entropy density compatible with E[G(y)]\E[G(y)], and is good when yy is not too far from Gaussian. log⁡cosh⁡u\log\cosh u behaves as u2/2u^2/2 near 0 and ∣u∣−log⁡2\abs{u} - \log 2 far away: an outlier weighs linearly, not to the fourth power. Two rigor warnings. JGJ_G is an approximation, not a characterization: non-Gaussian laws can have E[G(y)]=E[G(ν)]\E[G(y)] = \E[G(\nu)] for a particular GG, invisible to that GG. And constant E[G(ν)]\E[G(\nu)] must be calculated: for G2G_2 it is exactly −1/2-1/\sqrt2, while log⁡cosh⁡\log\cosh has no simple closed form, so the cell integrates it.

[ ]Kurtosis and J_G for several laws and an outlier’s effectBrowser
import numpy as np
from scipy import integrate, stats

def logcosh(u):
    a = np.abs(u)
    return a + np.log1p(np.exp(-2 * a)) - np.log(2)       # log cosh estable para |u| grande

E_G_nu = integrate.quad(lambda u: logcosh(u) * stats.norm.pdf(u), -40, 40)[0]
print(f"E[log cosh(nu)], nu ~ N(0, 1): {E_G_nu:.6f}\n")

def estandariza(y):
    return (y - y.mean()) / y.std()

def curtosis(y):
    return np.mean(estandariza(y) ** 4) - 3

def J_G(y):
    return (np.mean(logcosh(estandariza(y))) - E_G_nu) ** 2

rng = np.random.default_rng(0)
n = 200_000
leyes = {
    "gaussiana": rng.normal(size=n),
    "Laplace": rng.laplace(size=n),
    "binaria ±1": rng.choice([-1.0, 1.0], n),
    "seno, fase al azar": np.sin(2 * np.pi * rng.uniform(size=n)),
    "impulsiva, p = 0.03": rng.normal(size=n) * (rng.uniform(size=n) < 0.03),
}
for nombre, y in leyes.items():
    print(f"{nombre:20s} curtosis {curtosis(y):7.3f}   J_G x 1000 {1e3 * J_G(y):7.3f}")

y = rng.laplace(size=1000)
y_atipico = y.copy()
y_atipico[0] = 12 * y.std()                                 # un único dato a 12 desviaciones típicas
print()
for nombre, v in [("1000 datos de Laplace", y), ("los mismos con un atípico", y_atipico)]:
    print(f"{nombre:26s} curtosis {curtosis(v):7.3f}   J_G x 1000 {1e3 * J_G(v):7.3f}")

The table confirms theoretical values (kurtosis 0, 3, −2-2 and −1.5-1.5 for Gaussian, Laplace, binary and sinusoidal; the last because E[sin⁡4]=3/8\E[\sin^4] = 3/8 and E[sin⁡2]=1/2\E[\sin^2] = 1/2) and shows impulsive noise, almost always zero, is extremely super-Gaussian. Note JGJ_G orders differently from kurtosis: binary has over twice Laplace’s JGJ_G with smaller absolute kurtosis (2 versus 3), while sinusoid and Laplace, with opposite kurtosis signs, have nearly equal JGJ_G. These measure different distances from Gaussianity; either works for ICA if nonzero on sources. The last part shows kurtosis fragility twice. With 1000 Laplace observations, sample kurtosis is 1.7, far from theoretical 3: its estimate is highly variable because it depends on tails. One observation twelve standard deviations out multiplies it almost tenfold (to 16.6), while JGJ_G grows less than fourfold: it also changes because non-Gaussian signal is small with a thousand observations, but the outlier enters log⁡cosh⁡\log\cosh by absolute value rather than fourth power. Ultimately what matters is whether it changes the estimated direction, measured in the lab.

With these two measures you can search for rotation by hand.

InteractiveSearch for the most non-Gaussian rotation
Whitened data z\mathbf{z} and direction w(θ)\mathbf{w}(\theta)
  • direction of s₁
  • direction of s₂
  • w(θ)
Histogram of y=w⊤zy = \mathbf{w}^\top\mathbf{z} and N(0,1)\mathcal{N}(0, 1) density
Excess kurtosis of y by θ (degrees)
Approximate negentropy JGJ_G by θ
θ in degrees, with JGJ_G on the vertical axis in thousandths.
Sources
10.0°
Excess kurtosis of yy−0.836−0.836
JG(y)×103J_G(y) \times 10^30.2760.276
Distance to the nearest source direction25.6°
∣corr∣|\mathrm{corr}| of yy with s1s_1 and s2s_20.902⋅0.4010.902 · 0.401
This projection mixes both sources, so its histogram is closer to the Gaussian bell curve. Find the angle where JGJ_G is largest.
1000 pairs of independent unit-variance sources (uniform, Laplace, one uniform and one Gaussian, or two Gaussians; same seeds throughout), mixed with A=(10.80.31)\mathbf{A} = \begin{pmatrix} 1 & 0.8 \\ 0.3 & 1 \end{pmatrix} and whitened with sample covariance. For each direction w(θ)=(cos⁡θ,sin⁡θ)\mathbf{w}(\theta) = (\cos\theta, \sin\theta), project y=w⊤zy = \mathbf{w}\T\mathbf{z} and calculate its histogram, kurtosis and JGJ_G with G=log⁡cosh⁡G = \log\cosh; lower curves sweep θ\theta from 0°0° to 180°180° in 0.5°0.5° steps. Dashed lines are directions where yy is proportional to a source. Start at 10°10°, rotate to maximum JGJ_G, then switch to 'Gaussian'.

With uniform sources the whitened cloud is a rotated square, whose axes project to the sources: kurtosis reaches its minimum there (they are sub-Gaussian) and JGJ_G its maximum. At 45°45° kurtosis halves as predicted by κ(1−12sin⁡22θ)\kappa(1 - \tfrac12\sin^2 2\theta), and the histogram looks more bell-shaped. With Laplace sources kurtosis changes sign but the story is the same, and JGJ_G, a square, peaks in the same place without knowing the sign. With one Gaussian, the maximum still marks the non-Gaussian source and the Gaussian is the orthogonal direction. With two Gaussians both curves are flat except for sample noise: no direction exists to find.

FastICA: a Newton method without a step size

To estimate one component, optimize E[G(w⊤z)]\E[G(\vb{w}\T\vb{z})] on the unit sphere: maximize if the target has E[G(s)]>E[G(ν)]\E[G(s)] > \E[G(\nu)], minimize otherwise (maximizing JGJ_G does both). Projected gradient ascent is possible, but requires choosing step size, knowing the sign and waiting. FastICA (Hyvärinen and Oja, 1997; Hyvärinen, 1999) uses whitening for something better.

At an optimum with constraint ∥w∥2=1\norm{\vb{w}}^2 = 1, Lagrange conditions are

F(w)=E[z g(w⊤z)]−βw=0,β=E[(w⊤z) g(w⊤z)],F(\vb{w}) = \E\big[\vb{z}\,g(\vb{w}\T\vb{z})\big] - \beta\vb{w} = \vb{0}, \qquad \beta = \E\big[(\vb{w}\T\vb{z})\,g(\vb{w}\T\vb{z})\big],

with g=G′g = G'. Solving F=0F = \vb{0} by Newton’s method requires Jacobian E[zz⊤g′(w⊤z)]−βI\E[\vb{z}\vb{z}\T g'(\vb{w}\T\vb{z})] - \beta\mat{I}, a d×dd \times d matrix to invert each step. The key observation: since z\vb{z} is whitened, approximate that Jacobian by a multiple of identity; Newton’s step then simplifies to fixed-point iteration

 w←E[z g(w⊤z)]−E[g′(w⊤z)] w,w←w/∥w∥ \boxed{\ \vb{w} \leftarrow \E\big[\vb{z}\,g(\vb{w}\T\vb{z})\big] - \E\big[g'(\vb{w}\T\vb{z})\big]\,\vb{w}, \qquad \vb{w} \leftarrow \vb{w}/\norm{\vb{w}}\ }

which is one-unit FastICA. Derivation details (what is approximated and why the Newton factor disappears) are in exercise 2. Iterate until ∣wnew⊤wold∣\abs{\vb{w}_{\text{new}}\T\vb{w}_{\text{old}}} is within tolerance of 1: absolute value handles sign oscillation of w\vb{w} without direction change.

With G(u)=u4/4G(u) = u^4/4 (kurtosis), iteration is w←E[z(w⊤z)3]−3w\vb{w} \leftarrow \E[\vb{z}(\vb{w}\T\vb{z})^3] - 3\vb{w}; with log⁡cosh⁡\log\cosh, g=tanh⁡g = \tanh and g′=1−tanh⁡2g' = 1 - \tanh^2; with G2G_2, g(u)=u e−u2/2g(u) = u\,e^{-u^2/2} and g′(u)=(1−u2) e−u2/2g'(u) = (1 - u^2)\,e^{-u^2/2}. Hyvärinen and Oja (2000) summarize its properties under the ICA model: convergence is cubic, or at least quadratic (proof in Hyvärinen, 1999), versus linear convergence of gradient methods; no step size needs choosing; and any nonquadratic GG finds sources of almost any non-Gaussian law, sub- or super-Gaussian, without specifying which.

InteractiveFastICA fixed point
w\mathbf{w} on the unit circle
  • fixed point
  • gradient
  • contrast by direction
Angular error in degrees by iteration (log scale)
Errors below 10⁻⁸ degrees are plotted at the bottom of the chart.
iteration 30
Sources
Contrast GG
100°
1.00
Steps to error < 0.001° (fixed point)4
Steps to error < 0.001° (gradient)more than 30
After 30 steps, the fixed-point method is less than 10⁻⁸° from the sample fixed point and gradient ascent is 2.634° away.
5000 pairs of independent unit-variance sources (uniform or Laplace), mixed with A=(10.60.21)\mathbf{A} = \begin{pmatrix} 1 & 0.6 \\ 0.2 & 1 \end{pmatrix} and whitened using sample covariance; iterations run in your browser. Magenta is fixed-point iteration and blue projected gradient ascent w←normalizar(w+ηγ E[z g(w⊤z)])\mathbf{w} \leftarrow \mathrm{normalizar}(\mathbf{w} + \eta\gamma\,\mathbb{E}[\mathbf{z}\,g(\mathbf{w}\T\mathbf{z})]) with γ=signo(E[G(y)]−E[G(ν)])\gamma = \mathrm{signo}(\mathbb{E}[G(y)] - \mathbb{E}[G(\nu)]). The gray curve around the circle grows with JGJ_G by direction, and dashed lines are sample fixed points. Right: angular error on logarithmic scale. Play iterations; then raise η\eta to 30 and switch to kurtosis.

With uniform sources and log⁡cosh⁡\log\cosh, fixed point drops from about 21°21° to below 10−310^{-3} degrees in four steps and continues to rounding; gradient with η=1\eta = 1 remains over two degrees away after thirty. Raising η\eta does not always fix gradient: with Laplace and η=10\eta = 10, or kurtosis and any η≥1\eta \ge 1 for uniform sources, it overshoots and ends in the intermediate direction, 45°45° from sources, also a stationary contrast point. Fixed point has no such problem in any case. The plot shows a detail absent from asymptotic theory: after the first step, fixed-point error is neither squared nor cubed, but multiplied by an almost constant factor each step (about 0.025 for uniform with log⁡cosh⁡\log\cosh, and 0.13 for Laplace with kurtosis; the widget calculates it). The convergence proof uses exact expectations under the model, where cross moments of independent sources such as E[s1s2 g′(s1)]\E[s_1 s_2\,g'(s_1)] vanish along with the first-order error term. In finite samples those averages are not zero but sampling fluctuations, so final convergence becomes linear with a factor expected to shrink as nn grows. The cell measures this by numerically differentiating the fixed-point map at its fixed point, giving exactly that factor:

[ ]Fixed point linear convergence factor shrinks with nBrowser
import numpy as np

def factor_lineal(n, rep):
    rng = np.random.default_rng(rep)
    S = rng.uniform(-np.sqrt(3), np.sqrt(3), (2, n))       # dos uniformes, como en el widget
    X = np.array([[1.0, 0.6], [0.2, 1.0]]) @ S
    X -= X.mean(axis=1, keepdims=True)
    lam, E = np.linalg.eigh(X @ X.T / n)
    Z = E @ np.diag(lam ** -0.5) @ E.T @ X

    def paso(a):                                           # punto fijo con log cosh, en ángulos
        w = np.array([np.cos(a), np.sin(a)])
        t = np.tanh(w @ Z)
        w2 = (Z * t).mean(axis=1) - (1 - t * t).mean() * w
        return np.arctan2(w2[1], w2[0])

    a = 1.2
    for _ in range(20):
        a = paso(a)
    h = 1e-4
    d = (paso(a + h) - paso(a - h) + np.pi) % (2 * np.pi) - np.pi   # diferencia de ángulos módulo 2 pi
    d = (d + np.pi / 2) % np.pi - np.pi / 2                          # módulo pi: el signo de w no importa
    return abs(d / (2 * h))

for n in (1000, 10_000, 100_000):
    f = [factor_lineal(n, r) for r in range(4)]
    print(f"n = {n:6d}: factor por paso en 4 muestras = {np.round(f, 4)}   mediana {np.median(f):.4f}")

The factor is small and decreases with sample size, although it varies greatly between samples: its median falls from 0.017 with 1000 observations to 0.004 with 100000. In practice the difference from asymptotic convergence is one or two extra steps.

Multiple components: deflation and symmetric orthogonalization

To estimate multiple rows of W\mat{W}, prevent all from converging to the same source. Since Q\mat{Q} is orthogonal, target directions are orthonormal, enforced in two ways:

  • Deflation: estimate one by one; after every fixed-point step for unit pp, subtract projection onto previous ones, wp←wp−∑j<p(wp⊤wj)wj\vb{w}_p \leftarrow \vb{w}_p - \sum_{j < p}(\vb{w}_p\T\vb{w}_j)\vb{w}_j (Gram-Schmidt), and normalize. This is classical projection pursuit. Its drawback is inheriting earlier estimation errors: each new component is sought in the orthogonal complement of previous, already slightly deviated ones.
  • Symmetric orthogonalization: take a fixed-point step for all rows together, then replace W\mat{W} by
W←(WW⊤)−1/2W,\mat{W} \leftarrow (\mat{W}\mat{W}\T)^{-1/2}\mat{W},

the orthogonal factor of W\mat{W}‘s polar decomposition and therefore the closest orthogonal matrix to W\mat{W} in Frobenius norm. No component is privileged, errors do not accumulate, and the step parallelizes.

With whitened data, full separation matrix is Wtotal=WV\mat{W}_{\text{total}} = \mat{W}\mat{V} and estimated mixture is its inverse A^=V−1W⊤\hat{\mat{A}} = \mat{V}\inv\mat{W}\T.

Lab: FastICA from scratch

The following cells implement the full algorithm in NumPy and compare with scikit-learn. Signals are the cocktail-party sources, regenerated here in NumPy (not the widget’s samples, which use its own generator). Matrices use d×nd \times n orientation: one row per sensor.

[ ]Sources, mixing and whiteningBrowser
import numpy as np

fs = 8000
t = np.arange(12_000) / fs
rng = np.random.default_rng(7)
s1 = np.sin(2 * np.pi * 330 * t)                                   # tono
s2 = 2 * ((110 * t + 0.25) % 1) - 1                                # diente de sierra
s3 = rng.normal(size=t.size) * (rng.uniform(size=t.size) < 0.03)   # ruido impulsivo
S = np.vstack([s1, s2, s3])
S = (S - S.mean(axis=1, keepdims=True)) / S.std(axis=1, keepdims=True)
A = np.array([[1.0, 0.5, 0.4], [0.6, 1.0, -0.3], [-0.4, 0.5, 1.0]])
X = A @ S

def curt(Y):
    Yc = Y - Y.mean(axis=1, keepdims=True)
    return (Yc ** 4).mean(axis=1) / Yc.var(axis=1) ** 2 - 3

def blanquear(X):
    """Centra y blanquea con PCA: z = Lambda^(-1/2) E^T (x - mu). Devuelve z, V y mu."""
    mu = X.mean(axis=1, keepdims=True)
    Xc = X - mu
    lam, E = np.linalg.eigh(Xc @ Xc.T / Xc.shape[1])
    V = np.diag(lam ** -0.5) @ E.T
    return V @ Xc, V, mu

def amari(P):
    P = np.abs(np.asarray(P, float))
    d = P.shape[0]
    filas = (P / P.max(axis=1, keepdims=True)).sum(axis=1) - 1
    columnas = (P / P.max(axis=0, keepdims=True)).sum(axis=0) - 1
    return (filas.sum() + columnas.sum()) / (2 * d * (d - 1))

Z, V, mu = blanquear(X)
print("curtosis de las fuentes:", np.round(curt(S), 2))
print("curtosis de las mezclas:", np.round(curt(X), 2))
print("covarianza de z:\n", np.round(Z @ Z.T / Z.shape[1], 6))

Source kurtoses are −1.5-1.5 (tone), −1.2-1.2 (sawtooth) and almost 100 (impulses); mixtures are 0.660.66, −0.33-0.33 and 50.150.1. The impulse-dominated mixture halves, and the other two are closer to zero than tone and sawtooth, one with positive sign from received impulsive noise. No mixture exceeds the largest absolute source kurtosis: the mixture-kurtosis theorem in action.

[ ]FastICA by deflation with log coshBrowser
TANH = (np.tanh, lambda u: 1 - np.tanh(u) ** 2)              # g y g' para G = log cosh

def fastica_deflacion(Z, G=TANH, max_iter=200, tol=1e-10, semilla=0):
    g, gp = G
    d, n = Z.shape
    rng = np.random.default_rng(semilla)
    W = np.zeros((d, d))
    iteraciones = []
    for p in range(d):
        w = rng.normal(size=d)
        w -= W[:p].T @ (W[:p] @ w)
        w /= np.linalg.norm(w)
        for it in range(1, max_iter + 1):
            y = w @ Z
            w_nuevo = (Z * g(y)).mean(axis=1) - gp(y).mean() * w     # paso de punto fijo
            w_nuevo -= W[:p].T @ (W[:p] @ w_nuevo)                     # Gram-Schmidt contra las ya halladas
            w_nuevo /= np.linalg.norm(w_nuevo)
            cambio = abs(abs(w_nuevo @ w) - 1)
            w = w_nuevo
            if cambio < tol:
                break
        W[p] = w
        iteraciones.append(it)
    return W, iteraciones

W_def, it_def = fastica_deflacion(Z)
print("iteraciones por componente:", it_def)
print(f"índice de Amari de W V A: {amari(W_def @ V @ A):.4f}")
print("P = W V A:\n", np.round(W_def @ V @ A, 3))

Three components in a handful of iterations each (the last needs almost none: in three dimensions, after fixing two orthonormal directions the third is determined up to sign). Matrix P\mat{P} is a signed permutation, with misplaced entries of order 10−310^{-3}: exactly the DΠ\mat{D}\mat{\Pi} form allowed by the identifiability theorem, with ∣dii∣=1\abs{d_{ii}} = 1 under the unit-variance convention.

[ ]Symmetric FastICA and comparison with scikit-learnBrowser
from sklearn.decomposition import FastICA

def orto_simetrica(W):
    lam, E = np.linalg.eigh(W @ W.T)
    return E @ np.diag(lam ** -0.5) @ E.T @ W                 # (W W^T)^(-1/2) W

def fastica_simetrica(Z, G=TANH, max_iter=200, tol=1e-10, semilla=0):
    g, gp = G
    d, n = Z.shape
    W = orto_simetrica(np.random.default_rng(semilla).normal(size=(d, d)))
    for it in range(1, max_iter + 1):
        Y = W @ Z
        W_nuevo = orto_simetrica(g(Y) @ Z.T / n - np.diag(gp(Y).mean(axis=1)) @ W)
        cambio = np.max(np.abs(np.abs(np.sum(W_nuevo * W, axis=1)) - 1))
        W = W_nuevo
        if cambio < tol:
            break
    return W, it

W_sim, it_sim = fastica_simetrica(Z)
print(f"simétrica: {it_sim} iteraciones, índice de Amari {amari(W_sim @ V @ A):.4f}")

ica = FastICA(n_components=3, algorithm="parallel", fun="logcosh", whiten="unit-variance",
              random_state=0, tol=1e-10, max_iter=1000)
S_sk = ica.fit_transform(X.T).T                               # scikit-learn: una fila por observación
print(f"scikit-learn: {ica.n_iter_} iteraciones, índice de Amari {amari(ica.components_ @ A):.4f}")
Y_sim = W_sim @ Z
C = np.corrcoef(np.vstack([Y_sim, S_sk]))[:3, 3:]
print("|corr| entre nuestras salidas y las de scikit-learn:\n", np.round(np.abs(C), 4))

The symmetric version and scikit-learn reach the same point: identical Amari index to four digits and outputs with absolute correlation 1 in a different order (the table is a permutation). This is no accident: with algorithm="parallel" scikit-learn executes the same symmetric iteration, and both reach the same sample fixed point from different starts.

How much data is needed, and how much does deflation lose? The next two cells measure it. The first repeats separation on random signal subsets; the second compares deflation and symmetric methods on 20 six-source problems (three uniform and three Laplace, with random Gaussian mixtures and 1000 samples).

[ ]Separation quality versus sample countBrowser
for m in [100, 200, 500, 1000, 3000, 12_000]:
    errores = []
    for r in range(20):
        idx = np.random.default_rng(100 + r).choice(X.shape[1], m, replace=False)
        Zm, Vm, _ = blanquear(X[:, idx])
        Wm, _ = fastica_simetrica(Zm, semilla=r)
        errores.append(amari(Wm @ Vm @ A))
    print(f"n = {m:6d}: índice de Amari mediano {np.median(errores):.4f}")
[ ]Deflation versus symmetric orthogonalization with six sourcesBrowser
res = {"deflación": [], "simétrica": []}
for r in range(20):
    g = np.random.default_rng(1000 + r)
    S6 = np.vstack([g.laplace(size=1000) / np.sqrt(2) if i % 2 else g.uniform(-np.sqrt(3), np.sqrt(3), 1000)
                    for i in range(6)])
    A6 = g.normal(size=(6, 6))
    Z6, V6, _ = blanquear(A6 @ S6)
    res["deflación"].append(amari(fastica_deflacion(Z6, semilla=r)[0] @ V6 @ A6))
    res["simétrica"].append(amari(fastica_simetrica(Z6, semilla=r)[0] @ V6 @ A6))
for k, v in res.items():
    print(f"{k:10s} índice de Amari medio {np.mean(v):.4f}   mediano {np.median(v):.4f}")
print(f"la simétrica es mejor en {sum(a > b for a, b in zip(res['deflación'], res['simétrica']))} de 20 problemas")

Error decreases steadily with nn: at 100 samples the index is about 0.04, and at 12000 below 0.002. With sources this non-Gaussian, a hundred samples already permit usable separation; nearly Gaussian sources need many more because the algorithm’s signal is small relative to moment-sampling error. Symmetric orthogonalization yields lower mean error than deflation on these problems, as error accumulation predicts.

A robust contrast

The lab’s last cell tests the kurtosis warning. Two uniform sources, 2000 samples and a few outliers at six times the data standard deviation in random directions; separate with symmetric FastICA and three contrasts: kurtosis (G=u4/4G = u^4/4), log⁡cosh⁡\log\cosh and G2=−e−u2/2G_2 = -e^{-u^2/2}.

[ ]Outliers: kurtosis versus log cosh and G2Browser
CUBO = (lambda u: u ** 3, lambda u: 3 * u ** 2)                        # G = u^4/4 (curtosis)
GAUSS = (lambda u: u * np.exp(-u ** 2 / 2), lambda u: (1 - u ** 2) * np.exp(-u ** 2 / 2))
A2 = np.array([[1.0, 0.8], [0.3, 1.0]])
print("atípicos   curtosis   log cosh   G2      (índice de Amari mediano en 10 repeticiones)")
for k in [0, 1, 3, 10]:
    res = []
    for r in range(10):
        g = np.random.default_rng(50 + r)
        X2 = A2 @ g.uniform(-np.sqrt(3), np.sqrt(3), (2, 2000))
        ang = g.uniform(0, 2 * np.pi, k)
        X2[:, :k] = 6 * X2.std() * np.vstack([np.cos(ang), np.sin(ang)])
        Z2, V2, _ = blanquear(X2)
        res.append([amari(fastica_simetrica(Z2, G)[0] @ V2 @ A2) for G in (CUBO, TANH, GAUSS)])
    m = np.median(res, axis=0)
    print(f"{k:5d}      {m[0]:.3f}      {m[1]:.3f}      {m[2]:.3f}")

Without outliers all three contrasts separate well. With one outlier among 2000 observations, kurtosis already fails (index 0.45, about 24°24° error in two dimensions), while log⁡cosh⁡\log\cosh and G2G_2 remain below 0.02. With ten such extreme outliers, log⁡cosh⁡\log\cosh also yields and only G2G_2, which almost ignores large values because g(u)=u e−u2/2→0g(u) = u\,e^{-u^2/2} \to 0, holds up (0.088, about 5°5°). This is Hyvärinen and Oja’s (2000) recommendation: log⁡cosh⁡\log\cosh for general use, G2G_2 with outliers or very super-Gaussian sources, kurtosis only for sub-Gaussian sources and clean data.

Maximum likelihood, Infomax and mutual information

FastICA was motivated by non-Gaussianity. Two other classic routes lead to ICA, and all three are the same objective viewed from different sides.

Maximum likelihood

If source densities pip_i were known, model x=As\vb{x} = \mat{A}\vb{s} with W=A−1\mat{W} = \mat{A}\inv would give, by change of variables (the Jacobian of s=Wx\vb{s} = \mat{W}\vb{x} is W\mat{W}),

px(x)=∣det⁡W∣∏i=1dpi(wi⊤x),p_{\vb{x}}(\vb{x}) = \abs{\det\mat{W}}\prod_{i=1}^{d}p_i(\vb{w}_i\T\vb{x}),

with wi⊤\vb{w}_i\T row ii of W\mat{W}. Mean sample log-likelihood is

1nℓ(W)=1n∑t=1n∑i=1dlog⁡pi(wi⊤xt)+log⁡∣det⁡W∣.\frac1n\ell(\mat{W}) = \frac1n\sum_{t=1}^{n}\sum_{i=1}^{d}\log p_i(\vb{w}_i\T\vb{x}_t) + \log\abs{\det\mat{W}}.

The log⁡∣det⁡W∣\log\abs{\det\mat{W}} term prevents trivial solution W→0\mat{W} \to \mat{0} and forces rows not to repeat. With a large sample, 1nℓ\frac1n\ell tends to its expectation, which decomposes revealingly.

E[1nℓ(W)]=E[log⁡pW(x)]=−h(x)−KL⁡(p⋆ ∥ pW)\begin{aligned} \E\Big[\tfrac1n\ell(\mat{W})\Big] &= \E\big[\log p_{\mat{W}}(\vb{x})\big] \\ &= -h(\vb{x}) - \KL\big(p^{\star} \,\|\, p_{\mat{W}}\big) \end{aligned}
pWp_{\mat{W}} is the model density and p⋆p^\star true data density. Add and subtract E[log⁡p⋆(x)]=−h(x)\E[\log p^\star(\vb{x})] = -h(\vb{x}).
1/4

The last line (Cardoso, 1998) says three things. With exact models pip_i, maximizing likelihood exactly minimizes output mutual information. Otherwise a marginal-mismatch term is added, potentially moving the maximum. And the absolute mutual-information minimum (zero) is attained only at separation, by identifiability.

Mutual information and negentropy

Mutual information can also be written with entropies: I(y1,…,yd)=∑ih(yi)−h(y)I(y_1, \dots, y_d) = \sum_i h(y_i) - h(\vb{y}), and since y=Wx\vb{y} = \mat{W}\vb{x}, h(y)=h(x)+log⁡∣det⁡W∣h(\vb{y}) = h(\vb{x}) + \log\abs{\det\mat{W}}. With whitened data and orthogonal W\mat{W}, log⁡∣det⁡W∣=0\log\abs{\det\mat{W}} = 0 and each yiy_i has variance 1, so h(yi)=h(ν)−J(yi)h(y_i) = h(\nu) - J(y_i):

I(y1,…,yd)=constant−∑i=1dJ(yi).I(y_1, \dots, y_d) = \text{constant} - \sum_{i=1}^{d} J(y_i).

Minimizing mutual information between whitened outputs equals maximizing their summed negentropies. This is Comon’s (1994) contrast and FastICA’s justification: each unit maximizes (an approximation of) its negentropy, with orthogonality doing the rest.

Infomax

Bell and Sejnowski (1995) reached the same point from neuroscience. They proposed a one-layer network u=Wx\vb{u} = \mat{W}\vb{x} followed by increasing nonlinearities yi=σi(ui)y_i = \sigma_i(u_i) in [0,1][0, 1], trained to maximize output entropy h(y)h(\vb{y}), which in a noiseless network maximizes transmitted information (hence Infomax). By change of variables,

h(y)=h(x)+log⁡∣det⁡W∣+∑iE[log⁡σi′(wi⊤x)],h(\vb{y}) = h(\vb{x}) + \log\abs{\det\mat{W}} + \sum_i \E\big[\log\sigma_i'(\vb{w}_i\T\vb{x})\big],

which is expected ICA log-likelihood with pi=σi′p_i = \sigma_i', plus a constant. Infomax is maximum likelihood with the source model fixed by the nonlinearity (Cardoso, 1997; Pearlmutter and Parra, 1997): logistic sigmoid corresponds to a super-Gaussian logistic density with excess kurtosis 1.2.

The gradient of 1nℓ\frac1n\ell is W−⊤−E[φ(y)x⊤]\mat{W}^{-\top} - \E[\varphi(\vb{y})\vb{x}\T], with φi=−(log⁡pi)′\varphi_i = -(\log p_i)' the score function. Right multiplication by W⊤W\mat{W}\T\mat{W} gives the natural or relative gradient (Amari, Cichocki and Yang, 1996; Cardoso and Laheld, 1996),

ΔW=η (I−E[φ(y)y⊤])W,\Delta\mat{W} = \eta\,\big(\mat{I} - \E[\varphi(\vb{y})\vb{y}\T]\big)\mat{W},

which needs no inverse of W\mat{W} and is equivariant: its behavior depends on global matrix WA\mat{W}\mat{A}, not A\mat{A}, so ill-conditioned mixing does not slow it. FastICA after whitening shares this property, visible in the cocktail: “nearly singular” mixing with det⁡A=0.036\det\mat{A} = 0.036 gives the same Amari index as the original.

When the source model has the wrong sign

Likelihood decomposition warns: wrong pip_i can move the maximum. The serious error is not exact density shape, but its type. With whitened data and orthogonal W\mat{W}, a super-Gaussian model such as log⁡p(u)=−u22−log⁡cosh⁡u+c\log p(u) = -\tfrac{u^2}{2} - \log\cosh u + c makes likelihood maximization minimize ∑iE[log⁡cosh⁡yi]\sum_i\E[\log\cosh y_i] (the quadratic term is constant over rotations), favoring projections with more mass near zero. If sources are sub-Gaussian, the most “peaked” projections are mixtures, not sources. Extended Infomax (Lee, Girolami and Sejnowski, 1999) resolves this by choosing per component between φ(u)=u+tanh⁡u\varphi(u) = u + \tanh u (super-Gaussian) and φ(u)=u−tanh⁡u\varphi(u) = u - \tanh u (sub-Gaussian), based on the sign of E[sech⁡2yi] E[yi2]−E[yitanh⁡yi]\E[\operatorname{sech}^2 y_i]\,\E[y_i^2] - \E[y_i\tanh y_i].

[ ]Infomax with fixed and extended source modelsBrowser
def logcosh_(u):
    a = np.abs(u)
    return a + np.log1p(np.exp(-2 * a)) - np.log(2)

def infomax(Z, modo, iters=400, eta=0.3):
    """Gradiente natural de la verosimilitud con phi(u) = u + k tanh(u), k = +1 (super) o elegido por Infomax extendido."""
    d, n = Z.shape
    W = np.eye(d)
    for _ in range(iters):
        Y = W @ Z
        th = np.tanh(Y)
        if modo == "fijo":
            k = np.ones(d)
        else:
            k = np.sign((1 - th ** 2).mean(axis=1) * (Y ** 2).mean(axis=1) - (th * Y).mean(axis=1))
        Phi = Y + k[:, None] * th
        W = W + eta * (np.eye(d) - Phi @ Y.T / n) @ W
    return W, k

A2 = np.array([[1.0, 0.8], [0.3, 1.0]])
for nombre in ["Laplace", "uniformes"]:
    g = np.random.default_rng(3)
    S2 = g.laplace(size=(2, 5000)) / np.sqrt(2) if nombre == "Laplace" else g.uniform(-np.sqrt(3), np.sqrt(3), (2, 5000))
    Z2, V2, _ = blanquear(A2 @ S2)
    for modo in ["fijo", "extendido"]:
        W2, k = infomax(Z2, modo)
        print(f"fuentes {nombre:9s} Infomax {modo:9s}: índice de Amari {amari(W2 @ V2 @ A2):.3f}   tipo elegido {k}")
    Qs = V2 @ A2
    U, _, Vt = np.linalg.svd(Qs)
    R0 = (U @ Vt).T                                           # rotación que alinea z con las fuentes
    valores = []
    for ang in (0, 15, 30, 45):
        c, s = np.cos(np.radians(ang)), np.sin(np.radians(ang))
        Y = np.array([[c, -s], [s, c]]) @ R0 @ Z2
        valores.append(-logcosh_(Y).sum(axis=0).mean())
    print(f"   log-verosimilitud del modelo supergaussiano (sin constantes) a 0, 15, 30 y 45 grados de las fuentes: "
          + ", ".join(f"{v:.4f}" for v in valores))

With Laplace sources both versions separate, and super-Gaussian model likelihood decreases away from sources: its maximum is where it should be. With uniform sources fixed-model Infomax ends near index 1, almost 45°45° rotation in two dimensions, the worst possible: the wrong model’s likelihood increases away from sources and peaks at the most complete mixture. Extended Infomax detects the correct type (k=−1k = -1 for both uniform) and separates. Note cost: natural gradient received 400 iterations with a manually chosen step, while FastICA solved the cocktail in fewer than ten. FastICA avoids this sign issue because its iteration converges to extrema of E[G]\E[G], maxima or minima.

Lab: ICA on natural-image patches

What “sources” exist in an image? Cut a photo into small patches and treat each patch as a linear mixture of “basis functions” with independent coefficients; ICA estimates those functions. Bell and Sejnowski (1997) did this with natural-scene patches and found localized, oriented filters like edge detectors; van Hateren and van der Schaaf (1998) showed quantitative similarity to receptive fields of primary visual cortex simple cells. PCA on the same data gives global functions resembling a Fourier basis.

The lab uses scikit-learn’s two example photos (a Chinese temple and a flower), extracts 6000 grayscale 12×1212 \times 12 pixel patches, subtracts each patch’s mean (average brightness is irrelevant), reduces to 48 dimensions with whitened PCA, and applies FastICA to whitened data. Data use scikit-learn orientation, one row per patch.

[ ]12 × 12 patches and PCA whiteningBrowser
import numpy as np
from sklearn.datasets import load_sample_images
from sklearn.decomposition import FastICA, PCA

grises = [im.astype(float).mean(axis=2) for im in load_sample_images().images]
rng = np.random.default_rng(0)
p, N = 12, 6000
parches = []
for k in range(N):
    g = grises[k % 2]
    i = rng.integers(0, g.shape[0] - p + 1)
    j = rng.integers(0, g.shape[1] - p + 1)
    parches.append(g[i:i + p, j:j + p].ravel())
Xp = np.array(parches)
Xp -= Xp.mean(axis=1, keepdims=True)                         # quita el brillo medio de cada parche

pca = PCA(n_components=48, whiten=True, random_state=0).fit(Xp)
Zp = pca.transform(Xp)                                       # 6000 x 48, covarianza identidad
print("tamaño de las imágenes:", [g.shape for g in grises])
print(f"varianza explicada por 48 de las {p * p} componentes: {pca.explained_variance_ratio_.sum():.3f}")
[ ]FastICA on whitened patchesBrowser
ica_p = FastICA(whiten=False, fun="logcosh", max_iter=400, tol=1e-4, random_state=0)
Sp = ica_p.fit_transform(Zp)                                 # coeficientes independientes, 6000 x 48
print("iteraciones de FastICA:", ica_p.n_iter_)

E_p = pca.components_                                        # 48 x 144, direcciones de PCA
escala = np.sqrt(pca.explained_variance_)
base_pca = E_p.T * escala                                    # columnas: componentes de PCA en píxeles
base_ica = base_pca @ ica_p.components_.T                    # columnas: funciones base de ICA en píxeles

def participacion(B):
    """Fracción de píxeles que usa cada función base: (sum b^2)^2 / sum b^4 / número de píxeles."""
    return (B ** 2).sum(axis=0) ** 2 / (B ** 4).sum(axis=0) / B.shape[0]

def curt_cols(Y):
    Y = (Y - Y.mean(axis=0)) / Y.std(axis=0)
    return (Y ** 4).mean(axis=0) - 3

print(f"fracción de píxeles usados (mediana): ICA {np.median(participacion(base_ica)):.3f}   PCA {np.median(participacion(base_pca)):.3f}")
print(f"curtosis de los coeficientes (mediana): ICA {np.median(curt_cols(Sp)):.1f}   PCA {np.median(curt_cols(Zp)):.1f}")
[ ]ICA and PCA basis functionsBrowser
import matplotlib.pyplot as plt

fig, ejes = plt.subplots(6, 16, figsize=(10, 4.4))
for k in range(48):
    for fila0, B in ((0, base_ica), (3, base_pca)):
        ax = ejes[fila0 + k // 16, k % 16]
        b = B[:, k].reshape(p, p)
        m = np.abs(b).max()
        ax.imshow(b, cmap="gray", vmin=-m, vmax=m)
        ax.set_xticks([]); ax.set_yticks([])
fig.text(0.5, 0.97, "ICA: 48 funciones base, en el orden arbitrario en que salen", ha="center")
fig.text(0.5, 0.48, "PCA: 48 primeras componentes, por varianza decreciente", ha="center")
plt.subplots_adjust(hspace=0.15, wspace=0.08, top=0.94, bottom=0.02)
plt.show()

The figure shows ICA basis functions above and PCA below. PCA functions are global: they occupy the whole patch with increasing two-dimensional frequency patterns, like a Fourier basis, because natural images are approximately stationary and their covariance depends only on pixel displacement. ICA functions are largely localized and oriented: an edge or bar at a specific position and angle; others are oriented grids, mostly from the temple roof’s repetitive texture, showing the bias of only two photos. Two cell statistics quantify it: ICA functions use a smaller pixel fraction (median 0.31 versus 0.38 for PCA), and their coefficients are much more super-Gaussian (median kurtosis 20.8 versus 10.9), hence sparser: usually near zero and occasionally large. Arbitrary ICA component order is no oversight: the model does not order sources.

The deep-learning connection is direct. Olshausen and Field’s (1996) sparse coding, in the next lesson, reaches similar functions from another objective, and first-layer filters of convolutional networks trained on natural images (Krizhevsky, Sutskever and Hinton, 2012, show them in figure 3) look like the same oriented edges and grids.

Limits: delays, more sources than sensors and nonlinear ICA

Model x=As\vb{x} = \mat{A}\vb{s} is instantaneous, square, noiseless and linear. Each assumption has a limit.

Convolutive mixtures. In a real room, each source’s sound reaches each microphone with delay and echoes: xi(t)=∑j∑τaij(τ) sj(t−τ)x_i(t) = \sum_j\sum_\tau a_{ij}(\tau)\,s_j(t - \tau). For instantaneous ICA, a delayed source is another source: if sjs_j samples are independent in time, sj(t)s_j(t) and sj(t−τ)s_j(t - \tau) are independent variables, making the problem have more sources than sensors.

[ ]A delayed mixture breaks instantaneous ICABrowser
import warnings

rng = np.random.default_rng(9)
n = 20_000
Sc = rng.laplace(size=(2, n)) / np.sqrt(2)

def retrasa(s, k):
    return np.concatenate([np.zeros(k), s[:-k]]) if k else s

for k in [0, 1, 3, 10]:
    Xc_ = np.vstack([Sc[0] + 0.7 * retrasa(Sc[1], k), Sc[1] + 0.7 * retrasa(Sc[0], k)])
    with warnings.catch_warnings():
        warnings.simplefilter("ignore")
        Yc = FastICA(n_components=2, whiten="unit-variance", random_state=0, max_iter=1000).fit_transform(Xc_.T).T
    Cc = np.abs(np.corrcoef(np.vstack([Yc, Sc]))[:2, 2:])
    print(f"retardo de {k:2d} muestras: |corr| de cada salida con su mejor fuente = {np.round(Cc.max(axis=1), 3)}")

Without delay, outputs reproduce sources with correlation essentially 1. A delay of one sample already makes separation incomplete, and increasing it does not worsen matters further because with memoryless sources any delay creates the same number of “new” sources. The standard solution is frequency domain: short-time Fourier transform converts convolution into a product per band; apply complex ICA band by band (Smaragdis, 1998), then solve a problem absent from the instantaneous model: permutation and scale may differ by band, and must be aligned. The short-time transform also analyzes audio in the multimodal AI module, where neural speech and music separators generalize this approach.

More sources than sensors. If A\mat{A} is d×md \times m with m>dm > d, no linear W\mat{W} recovers sources (as in the cocktail with two identical microphones). Mixing can still be estimated under suitable conditions, but recovery requires an additional assumption, typically sparsity, and nonlinear inference: sparse coding in the next lesson.

Temporal structure and noise. ICA ignores sample order. If sources have distinct autocorrelations, they can be separated using only second-order statistics, jointly diagonalizing covariances at several lags (AMUSE, Tong et al., 1991; SOBI, Belouchrani et al., 1997), even if Gaussian. With additive noise, x=As+n\vb{x} = \mat{A}\vb{s} + \vb{n}, whitening is biased and sources cannot be exactly recovered even with known A\mat{A}; Gaussian-noise-corrected FastICA versions exist.

Nonlinear ICA. If x=f(s)\vb{x} = \vb{f}(\vb{s}) with invertible nonlinear f\vb{f}, the problem is no longer identified: Hyvärinen and Pajunen (1999) showed that any random vector admits infinitely many nonlinear transformations producing independent components, most unrelated to sources. Independence, sufficient linearly, is insufficient nonlinearly. The solution almost twenty years later adds auxiliary information (time index, segment label, related observation) and estimates with contrastive learning: Hyvärinen and Morioka (2016) and Hyvärinen, Sasaki and Turner (2019) showed nonlinear ICA becomes identifiable again. This bridges to contrastive learning identifiability at the module’s end.

Causality. If x=Bx+e\vb{x} = \mat{B}\vb{x} + \vb{e} with B\mat{B} the matrix of an acyclic graph and independent non-Gaussian noise eie_i, then x=(I−B)−1e\vb{x} = (\mat{I} - \mat{B})\inv\vb{e} is an ICA model. ICA estimates I−B\mat{I} - \mat{B} up to permutation and scale, and acyclicity fixes the permutation: LiNGAM (Shimizu et al., 2006) identifies causal direction where Gaussian methods only see correlations.

Common mistakes

Exercises

ProofGaussian sources are not identifiable
Prove: If s∼N(0,Id)\vb{s} \sim \mathcal{N}(\vb{0}, \mat{I}_d) and U\mat{U} is orthogonal, then Us∼N(0,Id)\mat{U}\vb{s} \sim \mathcal{N}(\vb{0}, \mat{I}_d). Consequently in model x=As\vb{x} = \mat{A}\vb{s} with standard Gaussian sources, A\mat{A} is not identified even up to scale, sign and permutation.
0
Let y=Us\vb{y} = \mat{U}\vb{s}, with UU⊤=U⊤U=I\mat{U}\mat{U}^\top = \mat{U}^\top\mat{U} = \mat{I}.

Step 1 of 4. Which property of s\vb{s}'s density is key?

ProofFastICA as approximate Newton's method
Prove: Let z\vb{z} be whitened (E[z]=0\E[\vb{z}] = \vb{0}, E[zz⊤]=I\E[\vb{z}\vb{z}^\top] = \mat{I}) and GG smooth with g=G′g = G'. An approximate Newton step for extrema of E[G(w⊤z)]\E[G(\vb{w}^\top\vb{z})] subject to ∥w∥2=1\norm{\vb{w}}^2 = 1, followed by normalization, is w←E[z g(w⊤z)]−E[g′(w⊤z)] w\vb{w} \leftarrow \E[\vb{z}\,g(\vb{w}^\top\vb{z})] - \E[g'(\vb{w}^\top\vb{z})]\,\vb{w}, w←w/∥w∥\vb{w} \leftarrow \vb{w}/\norm{\vb{w}}.
0
Write y=w⊤zy = \vb{w}^\top\vb{z} for short.

Step 1 of 4. What condition does an extremum of E[G(y)]\E[G(y)] on the sphere satisfy?

NumericKurtosis of a uniform distribution
Calculate excess kurtosis of a variable uniformly distributed on [a,b][a, b] with a<ba < b.
NumericKurtosis of a mixture
Independent mean-0 unit-variance sources s1s_1 uniform and s2s_2 Laplace are mixed as y=0.6 s1+0.8 s2y = 0.6\,s_1 + 0.8\,s_2. What is excess kurtosis of yy? (Four decimals.)
NumericImpulsive noise
An impulsive source is s=b gs = b\,g with independent b∼Bern⁡(p)b \sim \Bern(p) and g∼N(0,1)g \sim \mathcal{N}(0, 1): usually zero and, with probability pp, normal. What is its excess kurtosis for p=0.1p = 0.1?
NumericReading the Amari index
You separate two sources and global matrix P=WA\mat{P} = \mat{W}\mat{A} is, up to scale, a plane rotation with Amari index 0.5. What angle in degrees separates it from the nearest perfect separation?
QuizUnavoidable ambiguities and conventions
In model x=As\mathbf{x} = \mathbf{A}\mathbf{s} with invertible A\mathbf{A} and independent sources, at most one Gaussian, which statements are correct?

More than one answer may be correct.

QuizIs it identifiable?
In which scenarios are all sources identified (up to scale, sign and order) with unlimited data?

More than one answer may be correct.

QuizLikelihood, Infomax and mutual information
You estimate ICA by maximum likelihood with a fixed super-Gaussian source model log⁡p(u)=−u2/2−log⁡cosh⁡u+c\log p(u) = -u^2/2 - \log\cosh u + c on whitened data. Which statements are correct?

More than one answer may be correct.

Summary

Key idea
ICA estimates W\mat{W} with independent components of y=Wx\vb{y} = \mat{W}\vb{x}. Whitening reduces the problem to a rotation that second-order moments cannot fix; non-Gaussianity can, because mixing approaches Gaussianity. With at most one Gaussian source, the solution is unique up to scale, sign and order (Comon), and FastICA finds it using a step-size-free Newton method on a robust negentropy approximation.
  • Model and ambiguities. x=As\vb{x} = \mat{A}\vb{s} with independent sources and invertible A\mat{A}. At best WA=DΠ\mat{W}\mat{A} = \mat{D}\mat{\Pi}; scale and sign are fixed by convention, order has no natural choice. The Amari index measures distance from that form without penalizing ambiguities (in 2D, tan⁡θ\tan\theta).
  • Whitening. z=Vx\vb{z} = \mat{V}\vb{x} with Cov⁡(z)=I\Cov(\vb{z}) = \mat{I} leaves z=Qs\vb{z} = \mat{Q}\vb{s} with orthogonal Q\mat{Q}: from d2d^2 unknowns to d(d−1)/2d(d-1)/2. Uncorrelatedness cannot distinguish rotations; independence can.
  • Identifiability. Gaussian sources: rotational invariance, the same ambiguity as factor analysis. At most one Gaussian: identifiable (Comon, using Darmois-Skitovich), and pairwise independence suffices.
  • Non-Gaussianity. Kurtosis is additive and cheap but fragile to outliers. Negentropy is natural; JG∝(E[G(y)]−E[G(ν)])2J_G \propto (\E[G(y)] - \E[G(\nu)])^2 with G=log⁡cosh⁡G = \log\cosh or −e−u2/2-e^{-u^2/2} is its robust approximation.
  • FastICA. w←E[z g(w⊤z)]−E[g′(w⊤z)] w\vb{w} \leftarrow \E[\vb{z}\,g(\vb{w}\T\vb{z})] - \E[g'(\vb{w}\T\vb{z})]\,\vb{w} and normalize: Newton with Jacobian approximated by an identity multiple, cubic or quadratic convergence under the model, no step size. Multiple components via deflation (errors accumulate) or symmetric orthogonalization (WW⊤)−1/2W(\mat{W}\mat{W}\T)^{-1/2}\mat{W}.
  • Three faces of one objective. Expected likelihood is −h(x)−I(y)−∑iKL⁡(pyi ∥ pi)-h(\vb{x}) - I(\vb{y}) - \sum_i\KL(p_{y_i} \,\|\, p_i); Infomax is maximum likelihood with pi=σi′p_i = \sigma_i'; on whitened data minimum mutual information is maximum summed negentropy. A wrong source-model type (sub- or super-Gaussian) makes the maximum a mixture.
  • Limits. Delays (frequency ICA), more sources than sensors (sparsity, next lesson), temporal structure (SOBI), noise and nonlinear ICA, unidentifiable without auxiliary information: contrastive learning rescues it at the module’s end.