Second-order statistics determine the mixing matrix up to a rotation. Whitening, PCA reduction, and why a rotation is exactly what higher-order statistics must find.
Chapter 1第 1 章 counted parameters. For a square model with unit-variance sources, the covariance Cx=AA⊤ supplies n(n+1)/2 numbers about the n2 entries of A, and every AQ with Q orthogonal has the same covariance (Section 1.4第 1.4 节). This chapter turns the count into a procedure. Whitening uses the covariance to remove everything except a rotation: after whitening, the mixing matrix is orthogonal, and ICA reduces to a search over orthogonal matrices.
Most algorithms in this book use this reduction, from the angle search of Section 1.5第 1.5 节 to FastICA (Chapter 8第 8 章) and JADE (Chapter 9第 9 章); Comon (1994) built his ICA algorithm on it, and Hyvärinen, Karhunen and Oja (2001) give a textbook account. Figure 3.1图 3.1 shows its geometry. The reduction also has costs, which the second half of the chapter examines. When there are more sensors than sources, whitening is where the dimension is reduced and where noise enters (Section 3.6第 3.6 节). And because whitening is fixed before the rotation is estimated, its sampling error can never be corrected afterwards (Section 3.7第 3.7 节).
Let x∈Rm have finite second moments. Centering replaces x by x−E[x]; in the model x=As this removes the source means, which can be restored at the end as WE[x] (Section 1.2第 1.2 节). From now on x has zero mean and covariance Cx=E[xx⊤]. Under the model, the source covariance Cs=E[ss⊤] is diagonal because the sources are independent, and
which equals AA⊤ for unit-variance sources. The covariance is symmetric and positive semidefinite, and its rank equals that of A, which is n under Assumption 1.1假设 1.1. It is positive definite when m=n. When m>n it is singular in the noise-free model, and its null space is the orthogonal complement of the column space of A.
对单位方差的源,它等于 AA⊤。协方差是对称半正定矩阵,其秩等于 A 的秩,在Assumption 1.1假设 1.1下为 n。当 m=n 时它正定。当 m>n 时,在无噪声模型中它是奇异的,其零空间是 A 列空间的正交补。
From samples x(1),…,x(T), collected as the columns of X∈Rm×T, the sample mean xˉ=T1∑tx(t) and the sample covariance
replace their population counterparts. Dividing by T−1 instead of T makes C^x unbiased; for ICA the choice is immaterial, since it rescales all whitened outputs by the same constant. When fourth moments are finite, each entry of C^x has a standard error of order T−1/2, a fact that returns in Section 3.7第 3.7 节. Because the centered samples sum to zero, C^x has rank at most T−1, so it is singular whenever m≥T, and a reduction of dimension is then unavoidable. This is the situation in temporal ICA of fMRI, where the voxels play the role of sensors (Section 14.3第 14.3 节).
Numerically, the eigenvectors and eigenvalues of C^x are best obtained from the singular value decomposition X~=EΓF⊤: the eigenvectors are the columns of E and the eigenvalues are γi2/T. This avoids forming X~X~⊤, which squares the condition number (Golub & Van Loan, 2013).
在数值计算上,C^x 的特征向量与特征值最好通过奇异值分解 X~=EΓF⊤ 求得:特征向量是 E 的各列,特征值为 γi2/T。这样可以避免显式构造 X~X~⊤,后者会把条件数平方(Golub & Van Loan, 2013)。
A random vector is white if its components are uncorrelated and have unit variance. Whitening transforms the data linearly so that they become white.
若一个随机向量的各分量互不相关且方差为一,则称它是白的。白化就是对数据作线性变换,使之变白。
Definition 3.1 (whitening)定义 3.1(白化)
Let x∈Rm have zero mean and covariance Cx. A matrix V∈Rk×m is a whitening matrix for x if z=Vx satisfies E[zz⊤]=VCxV⊤=Ik. The vector z is then called white, or sphered.
设 x∈Rm 均值为零,协方差为 Cx。若 z=Vx 满足 E[zz⊤]=VCxV⊤=Ik,则称矩阵 V∈Rk×m 为 x 的白化矩阵,称 z 是白的,或球化的。
Since rank(VCxV⊤)≤rankCx, necessarily k≤rankCx. In the noise-free model rankCx=n, and whitening to k=n components loses no information, because x lies almost surely in the n-dimensional column space of Cx. Write the eigendecomposition of the covariance as Cx=EΛE⊤, with E orthogonal and Λ=diag(λ1,…,λm), λ1≥⋯≥λm≥0 (Section A.3第 A.3 节). Suppose first that m=n, so that all eigenvalues are positive. Three whitening matrices are in common use:
由于 rank(VCxV⊤)≤rankCx,必有 k≤rankCx。在无噪声模型中 rankCx=n,而白化到 k=n 个分量不会丢失任何信息,因为 x 几乎必然落在 Cx 的 n 维列空间里。把协方差的特征分解写成 Cx=EΛE⊤,其中 E 正交,Λ=diag(λ1,…,λm),λ1≥⋯≥λm≥0(Section A.3第 A.3 节)。先设 m=n,于是所有特征值都为正。常用的白化矩阵有三种:
PCA whitening, V=Λ−1/2E⊤. The data are projected onto the principal axes, and each principal component is divided by its standard deviation.
Symmetric (ZCA) whitening, V=Cx−1/2=EΛ−1/2E⊤: PCA whitening followed by the rotation E back to the original axes. Bell and Sejnowski (1997) named it ZCA, for zero-phase component analysis. Among all whitening matrices it changes the data least, in the sense that it minimizes E∥Vx−x∥2 (Exercise 3.3习题 3.3; Kessy, Lewin and Strimmer (2018) discuss this and other optimality properties).
Cholesky whitening, V=L−1, where Cx=LL⊤ with L lower triangular with a positive diagonal. Since L−1 is also lower triangular, z1 depends only on x1, z2 on x1 and x2, and so on: Cholesky whitening is the Gram–Schmidt orthonormalization of x1,…,xm in the inner product E[uv] (Exercise 3.1习题 3.1).
Each of them satisfies VCxV⊤=I; for PCA whitening, for instance, Λ−1/2E⊤(EΛE⊤)EΛ−1/2=I. They are far from the only ones, but the set of all whitening matrices has a simple structure.
Proposition 3.2 (whitening matrices differ by rotations)命题 3.2(白化矩阵之间只差一个旋转)
Let Cx be positive definite and let V1∈Rm×m be a whitening matrix. Then the m×m whitening matrices are exactly the matrices QV1 with Q orthogonal. In particular, any two m×m whitening matrices satisfy V2=QV1 with Q=V2V1−1 orthogonal, and the corresponding white vectors satisfy z2=Qz1.
(QV1)Cx(QV1)⊤=QQ⊤=I, so every QV1 whitens. Conversely, V1CxV1⊤=I shows that the square matrix V1 is invertible and that Cx=V1−1V1−⊤. If V2 also whitens, then Q=V2V1−1 satisfies QQ⊤=V2V1−1V1−⊤V2⊤=V2CxV2⊤=I.
Example 3.3 (three whitening matrices)例 3.3(三种白化矩阵)
Let Cx=(2112). Its eigenvalues are 3 and 1, with eigenvectors (1,1)⊤/2 and (−1,1)⊤/2, so E=21(11−11) is the rotation by 45°. The Cholesky factor is L=(21/203/2), and the three whitening matrices are
Numerically, Vzca≈(0.789−0.211−0.2110.789). As Proposition 3.2命题 3.2 predicts, they differ by rotations: Vzca=EVpca, the rotation by 45°, and Vchol=QVpca with Q=(3/21/2−1/23/2), the rotation by 30°. Choosing the opposite sign for an eigenvector multiplies Vpca on the left by a diagonal matrix of signs, that is, by a reflection, which is again an orthogonal factor.
Figure 3.1图 3.1 applies the three transforms to a mixture of two uniform sources. Each whitened cloud is a square, the image of the source square under an orthogonal matrix, and the three squares differ by rotations.
Figure 3.1. A mixture of two independent uniform sources with the principal axes of its covariance (a), and three whitened versions computed from the sample covariance (T=1500): PCA whitening (b), ZCA whitening (c) and Cholesky whitening (d). The arrows mark the columns of the whitened mixing matrix VA, which are orthogonal and parallel to the edges of each square. The three squares differ only by rotations; ICA must still find the rotation that aligns the arrows with the axes.图 3.1 两个独立均匀分布源的混合及其协方差的主轴(a),以及由样本协方差(T=1500)算出的三种白化结果:PCA 白化(b)、ZCA 白化(c)与 Cholesky 白化(d)。箭头标出白化后混合矩阵 VA 的列,它们相互正交,并与各正方形的边平行。三个正方形之间只差旋转;ICA 仍需找到把箭头转到坐标轴上的那个旋转。
Now apply a whitening matrix to the ICA model. If V∈Rn×m whitens x=As, then
现在把白化矩阵作用到 ICA 模型上。若 V∈Rn×m 是 x=As 的白化矩阵,则
z=Vx=A~s,A~=VA∈Rn×n.(3.2)
The whitened data follow an ICA model with the same sources and a square mixing matrix A~, which turns out to be orthogonal.
白化后的数据服从一个源不变、混合矩阵为方阵 A~ 的 ICA 模型,而 A~ 恰好是正交的。
Proposition 3.4 (the whitened mixing matrix is orthogonal)命题 3.4(白化后的混合矩阵是正交的)
Let x=As with A∈Rm×n of full column rank and E[ss⊤]=I, and let V∈Rn×m be a whitening matrix for x. Then A~=VA is orthogonal. If instead E[ss⊤]=D2 with D diagonal and positive, then A~D is orthogonal.
设 x=As,A∈Rm×n 列满秩,E[ss⊤]=I,并设 V∈Rn×m 是 x 的白化矩阵。则 A~=VA 是正交矩阵。若改设 E[ss⊤]=D2,其中 D 是对角元为正的对角矩阵,则 A~D 是正交矩阵。
Proof.证明
I=E[zz⊤]=VAE[ss⊤]A⊤V⊤=A~A~⊤, and a square matrix with A~A~⊤=I is orthogonal. With E[ss⊤]=D2, the same computation gives (A~D)(A~D)⊤=I.
Three consequences follow. First, all white versions of the data differ by rotations, also when m>n: if V1 and V2 both whiten, then zk=A~ks with A~k orthogonal, so z2=A~2A~1⊤z1. Second, ICA on whitened data is a search over orthogonal matrices. An orthogonal unmixing matrix U for z yields the global matrix P=UA~, which is again orthogonal; an orthogonal matrix of the form ΠD must have D=diag(±1) (Section A.2第 A.2 节), so the separating orthogonal matrices are exactly U=ΠDA~⊤ with ΠD a signed permutation. (As elsewhere in the book, we loosely call such matrices rotations; strictly, those with determinant −1 also contain a reflection.) Whitening has fixed the scale of every output, E[yi2]=1, and only signs and order remain free. Third, the unmixing matrix for x factors as
where O(n) is the group of n×n orthogonal matrices. For m=n, the parameter count of Section 1.4第 1.4 节 is now explicit: the n2 entries of W split into the n(n+1)/2 numbers fixed by the covariance through V and the n(n−1)/2 parameters of U, the dimension of O(n) (Section A.2第 A.2 节). That is one angle for n=2, three for n=3, and 45 for n=10, against 100 entries of W. Second-order statistics thus do more than half of the work. What remains is a rotation, and estimating it is the task of the higher-order methods of Parts II and III.
Different whitening matrices give different, but rotation-equivalent, whitened mixing matrices. ZCA whitening gives a particularly natural one: for unit-variance sources and m=n, A~=Cx−1/2A=(AA⊤)−1/2A is the orthogonal factor of the polar decomposition of A, which is the orthogonal matrix closest to A (Proposition A.4命题 A.4). When the mixing is mild, with A close to the identity, ZCA-whitened data are therefore already nearly separated. For the A used in Figure 3.1图 3.1, this A~ is a rotation by about 6°, visible in panel (c).
不同的白化矩阵给出不同的、但彼此只差旋转的白化混合矩阵。ZCA 白化给出的那一个尤其自然:对单位方差的源且 m=n,A~=Cx−1/2A=(AA⊤)−1/2A 正是 A 的极分解中的正交因子,也就是离 A 最近的正交矩阵(Proposition A.4命题 A.4)。因此当混合较弱、A 接近单位阵时,ZCA 白化后的数据已经接近分离。对Figure 3.1图 3.1所用的 A,这个 A~ 是约 6° 的旋转,在(c)中可以看到。
Methods that estimate W directly among all invertible matrices, such as maximum likelihood with the natural gradient (Chapter 7第 7 章), do not need this reduction, although they are often run on whitened data. What the orthogonality constraint costs is examined in Section 3.7第 3.7 节.
3.5Why second-order statistics cannot do more为什么二阶统计量做不到更多
After whitening, the covariance is used up. For every orthogonal U, the output y=Uz is again white, E[yy⊤]=UU⊤=I, so no criterion that depends on the data only through their covariance can prefer one rotation to another. To find U, ICA must use statistics of order higher than two or, if the sources are time series, their temporal structure.
For Gaussian sources nothing else is available. If s∼N(0,I), then z=A~s∼N(0,I) and y=Uz∼N(0,I) for every orthogonal U (Exercise 1.3习题 1.3). The distribution of the outputs does not depend on U at all, so every rotation is an equally good answer, and higher-order statistics cannot help, since all cumulants of order three and higher vanish (Proposition 2.8命题 2.8).
对高斯源,除协方差之外别无可用的信息。若 s∼N(0,I),则 z=A~s∼N(0,I),并且对任意正交矩阵 U 都有 y=Uz∼N(0,I)(Exercise 1.3习题 1.3)。输出的分布与 U 完全无关,每个旋转都是同样好的答案;高阶统计量也帮不上忙,因为三阶及以上的累积量全为零(Proposition 2.8命题 2.8)。
For non-Gaussian sources the higher-order cumulants are not rotation invariant. By (2.3) applied to z=A~s, the kurtosis of the projection onto a unit vector w is
对非高斯源,高阶累积量在旋转下不再不变。把 (2.3) 用于 z=A~s,可得 z 在单位向量 w 上投影的峭度:
kurt(w⊤z)=p=1∑nκp(w⊤a~p)4,
where a~p is the p-th column of A~. If some κp=0, this function is not constant on the unit sphere: with q=A~⊤w and ep the p-th coordinate vector, its values at q=ep and at q=(ep+er)/2 are κp and (κp+κr)/4, and these can all be equal only if every κp is zero. Fourth-order statistics therefore distinguish directions, and Chapter 5第 5 章 proves that the local maxima of ∣kurt(w⊤z)∣ are exactly the directions ±a~p of the sources with nonzero kurtosis (Theorem 5.3定理 5.3).
Between the two extremes, Chapter 4第 4 章 shows that a single Gaussian source does no harm, whereas with k≥2 Gaussian sources any rotation within the subspace they span leaves the distribution of z unchanged, so only that subspace can be identified (Section 4.4第 4.4 节). The special role of the Gaussian is no accident: if a random vector with n≥2 independent components has a distribution that is invariant under all rotations, its components are Gaussian with a common variance (Exercise 3.5习题 3.5).
Second-order statistics can do more when the samples are not i.i.d. If the sources are stationary time series, the lagged covariances of the whitened data are
当样本不再独立同分布时,二阶统计量可以做得更多。若各源是平稳时间序列,白化数据的时滞协方差为
Cz(τ)=E[z(t)z(t−τ)⊤]=A~diag(ρ1(τ),…,ρn(τ))A~⊤,
where ρi(τ)=E[si(t)si(t−τ)] is the autocorrelation of source i. These matrices are not invariant under rotation. They determine A~ up to a signed permutation as soon as, for every pair of sources, the two autocorrelation functions differ at some lag, even if all sources are Gaussian; this is the basis of AMUSE and SOBI (Chapter 9第 9 章, Theorem 9.6定理 9.6). Under the i.i.d. model of Assumption 1.1假设 1.1, however, the covariance is all that second-order statistics provide.
When there are more sensors than sources, m>n, whitening also reduces the dimension. In the noise-free model, Cx=AA⊤ has rank n, and its column space, the signal subspace, is the column space of A. Let λ1≥⋯≥λn>0 be its nonzero eigenvalues, En∈Rm×n the corresponding orthonormal eigenvectors and Λn=diag(λ1,…,λn), so that Cx=EnΛnEn⊤. Then V=Λn−1/2En⊤∈Rn×m satisfies VCxV⊤=I, and by Proposition 3.4命题 3.4VA is an n×n orthogonal matrix. The reduction discards the m−n directions in which the data have no variance.
Real data contain noise, and the eigenvalues beyond the n-th are then no longer zero. The simplest model in which the analysis stays exact adds isotropic noise.
真实数据含有噪声,第 n 个以后的特征值不再为零。能让分析保持精确的最简单模型,是加上各向同性的噪声。
Proposition 3.5 (PCA with isotropic noise)命题 3.5(各向同性噪声下的 PCA)
Let x=As+n, where A∈Rm×n has full column rank, E[ss⊤]=I, and the noise n is independent of s with E[n]=0 and E[nn⊤]=σ2Im. Let d1≥⋯≥dn>0 be the nonzero eigenvalues of AA⊤, and let En and Λn hold the leading n eigenvectors and eigenvalues of Cx. Then:
设 x=As+n,其中 A∈Rm×n 列满秩,E[ss⊤]=I,噪声 n 与 s 独立,E[n]=0,E[nn⊤]=σ2Im。设 d1≥⋯≥dn>0 是 AA⊤ 的非零特征值,En 与 Λn 分别是 Cx 的前 n 个特征向量与特征值。则:
the eigenvalues of Cx are λi=di+σ2 for i≤n and λi=σ2 for i>n;
the columns of En span the column space of A;
V=Λn−1/2En⊤ whitens x, but (VA)(VA)⊤=I−σ2Λn−1, so VA is not orthogonal when σ2>0;
with V=(Λn−σ2I)−1/2En⊤, the matrix VA is orthogonal, and Vx=VAs+Vn, where the noise term has covariance σ2(Λn−σ2I)−1.
Cx 的特征值为:i≤n 时 λi=di+σ2,i>n 时 λi=σ2;
En 的各列张成 A 的列空间;
V=Λn−1/2En⊤ 能白化 x,但 (VA)(VA)⊤=I−σ2Λn−1,所以当 σ2>0 时 VA 不是正交矩阵;
取 V=(Λn−σ2I)−1/2En⊤,则 VA 正交,且 Vx=VAs+Vn,其中噪声项的协方差为 σ2(Λn−σ2I)−1。
Proof.证明
Write AA⊤=EnDEn⊤ with D=diag(d1,…,dn), where the columns of En are orthonormal and span the column space of A. Then Cx=AA⊤+σ2I=En(D+σ2I)En⊤+σ2(I−EnEn⊤), where I−EnEn⊤ is the orthogonal projector onto the complement of the column space. This displays the eigenvalues and eigenvectors, proving 1 and 2; since dn>0, the leading n eigenvalues are separated from σ2, so the leading eigenspace is uniquely determined. Next, En⊤AA⊤En=D=Λn−σ2I, so for V=MEn⊤ with M diagonal, (VA)(VA)⊤=M(Λn−σ2I)M and VCxV⊤=MΛnM. The choice M=Λn−1/2 gives 3. The choice M=(Λn−σ2I)−1/2 gives 4, with noise covariance σ2VV⊤=σ2M2.
记 AA⊤=EnDEn⊤,D=diag(d1,…,dn),其中 En 的各列标准正交并张成 A 的列空间。则 Cx=AA⊤+σ2I=En(D+σ2I)En⊤+σ2(I−EnEn⊤),其中 I−EnEn⊤ 是到列空间正交补上的正交投影。这个式子直接给出了特征值与特征向量,从而证明了 1 与 2;由于 dn>0,前 n 个特征值与 σ2 分得开,所以前 n 维特征子空间是唯一确定的。其次,En⊤AA⊤En=D=Λn−σ2I,所以对 V=MEn⊤(M 为对角矩阵),有 (VA)(VA)⊤=M(Λn−σ2I)M,VCxV⊤=MΛnM。取 M=Λn−1/2 得 3;取 M=(Λn−σ2I)−1/2 得 4,此时噪声协方差为 σ2VV⊤=σ2M2。
PCA thus recovers the signal subspace exactly, even with noise, and discards the noise in the m−n complementary directions; this is the main denoising effect of the reduction. The noise inside the signal subspace remains. Ordinary whitening then produces a whitened mixing matrix that is not quite orthogonal, so even the best rotation leaves a bias. The bias-corrected whitening of item 4 needs an estimate of σ2, such as the average of the m−n smallest eigenvalues, which is the maximum-likelihood estimate in probabilistic PCA (Tipping & Bishop, 1999). Noisy ICA is the subject of Section 11.2第 11.2 节.
In practice n is unknown and must be read off the eigenvalues of the sample covariance, where the noise eigenvalues are no longer equal. Even pure white noise spreads them out: if m/T→γ∈(0,1], the eigenvalues of the sample covariance of white noise with variance σ2 fill the interval [σ2(1−γ)2,σ2(1+γ)2] (Marčenko & Pastur, 1967). With m=250 sensors and T=1000 samples, for example, the noise eigenvalues range from about 0.25σ2 to 2.25σ2, and a weak source can hide among them. Section 11.3第 11.3 节 discusses how to choose n. In spatial ICA of fMRI, the role of the m sensors is played by the time points, and PCA reduces them to far fewer components before ICA is run (Chapter 14第 14 章).
With finite T, whitening uses the sample covariance. The whitened sample z^(t)=V^x(t) is then exactly white, T1∑tz^(t)z^(t)⊤=I after centering, but the whitened mixing matrix V^A is orthogonal only up to an error of order T−1/2 (for sources with finite fourth moments). An orthogonal method estimates an orthogonal U, so its outputs y(t)=Uz^(t) are exactly uncorrelated in the sample. The true sources are not: their sample covariance C^s differs from I by sampling fluctuations. The constraint imposes a property that the sources do not have, and the resulting error passes into the separation, where no choice of U can remove it. The following proposition makes this precise; the notation OP is recalled in Section A.8第 A.8 节.
Proposition 3.6 (the whitening floor)命题 3.6(白化带来的误差下限)
Let x(t)=As(t), t=1,…,T, with A∈Rn×n invertible and i.i.d. source vectors whose components are independent with zero mean and unit variance. Let W^=UV^, where V^ whitens the sample covariance of the x(t) exactly and U is orthogonal, possibly depending on the data. Then the global matrix P^=W^A satisfies P^C^sP^⊤=I, where C^s is the sample covariance of the sources. Suppose that, after the order and signs of the outputs have been fixed, P^=I+ε with ε=OP(T−1/2). Then for every pair i=j, T(εij+εji) converges in distribution to N(0,1). Consequently, if (Tεij,Tεji) converges in distribution to a limit with variances vij and vji, then vij+vji≥21.
Centering commutes with A, so the sample covariance of the observations is C^x=AC^sA⊤, and P^C^sP^⊤=UV^C^xV^⊤U⊤=UU⊤=I. Write C^s=I+Δ. For i=j, Δij=T1∑tsi(t)sj(t)−sˉisˉj. The first term is an average of i.i.d. variables with mean 0 and variance E[si2]E[sj2]=1, so T times it converges to N(0,1) by the central limit theorem, and the second term is OP(1/T). By the law of large numbers Δ→0 in probability. Expanding (I+ε)(I+Δ)(I+ε)⊤=I gives ε+ε⊤+Δ=−(εΔ+Δε⊤+εε⊤+εΔε⊤), and the right-hand side is oP(T−1/2), since each term is a product of a factor of order T−1/2 and a factor tending to zero. Hence T(εij+εji)=−TΔij+oP(1), which converges to N(0,1). Finally, if (Tεij,Tεji) converges to (X,Y), then X+Y∼N(0,1), and 1=Var(X+Y)≤2Var(X)+2Var(Y) because Var(X+Y)+Var(X−Y)=2Var(X)+2Var(Y).
In the terms of Chapter 10第 10 章, where the interference-to-signal ratio is ISRij=E[εij2] (Definition 10.2定义 10.2), every orthogonal method has ISRij+ISRji≥1/(2T) to first order, whatever its contrast function and whatever the source distributions, and a method that treats the two entries alike has ISRij≥1/(4T). (Here ε=P^−I keeps its diagonal; the gain error of Definition 10.1定义 10.1, P^ij/P^ii, differs from εij by OP(1/T), so the two definitions give the same ISR to first order.) Cardoso (1994) pointed out this limit of orthogonal source separation (see also Cardoso, 1998). It is attained by an oracle that knows A: the rotation that brings UV^A closest to I gives P^=C^s−1/2, which for sources with finite fourth moments equals I−21Δ+OP(1/T), so that εij≈εji≈−21Δij (Exercise 3.6习题 3.6). The simulation below whitens a uniform and a Laplacian source with the sample covariance and applies this oracle rotation.
import numpy as np
rng = np.random.default_rng(1)
A = np.array([[1.0, 0.6],
[0.4, 1.0]])
T, runs = 1000, 10000
err = np.zeros(runs)
for r in range(runs):
S = np.vstack([rng.uniform(-np.sqrt(3), np.sqrt(3), T), # unit variance
rng.laplace(0.0, 1 / np.sqrt(2), T)])
X = A @ S
X = X - X.mean(axis=1, keepdims=True)
d, E = np.linalg.eigh(X @ X.T / T)
V = np.diag(d ** -0.5) @ E.T # PCA whitening, sample covariance
M = V @ A # whitened mixing, nearly orthogonal
Um, _, Vmt = np.linalg.svd(M)
U = (Um @ Vmt).T # oracle: U @ M closest to I
P = U @ M # best orthogonal global matrix
err[r] = P[0, 1]**2 + P[1, 0]**2
mean, se = T * err.mean(), T * err.std() / np.sqrt(runs)
print(f"T * E[eps12^2 + eps21^2] = {mean:.3f} +/- {se:.3f}")
It prints TE[ε122+ε212]=0.512±0.007, in agreement with the predicted 21 up to Monte Carlo error and terms of order 1/T. An algorithm that must estimate the rotation from the data cannot do better, and in general it does worse: it attains the floor only when its estimate of the rotation has no first-order error of its own. Symmetric FastICA with g(u)=u3 applied to binary sources is such a case, because s3=s reduces its estimating equations, to first order, to εij=εji; for other sources it is less accurate ((10.11)). Methods that are not constrained to be orthogonal, such as maximum likelihood with the natural gradient (Chapter 7第 7 章), have no such floor, and for sources with large Fisher information the Cramér–Rao bound (Theorem 10.10定理 10.10) lies far below it. For nearly Gaussian sources, in contrast, the error of estimating the rotation dominates and the floor matters little.
Conditioning. In the noise-free model, the conditioning of A plays no role for orthogonal methods: whatever A is, the whitened data are V^As=QC^s−1/2s for some orthogonal Q (Exercise 3.6习题 3.6). Noise changes this. In the setting of Proposition 3.5命题 3.5 with m=n, ordinary whitening leaves noise with covariance σ2Λ−1 in the whitened data, so the share of noise along the i-th principal direction is σ2/λi. If A is ill-conditioned, for example because two of its columns are nearly collinear, some λi is small, and the corresponding whitened coordinate is dominated by noise. A large ratio λ1/λn is therefore a warning sign, and a reason to reconsider the number of components (Chapter 11第 11 章).
条件数。在无噪声模型中,A 的条件数对正交方法没有影响:无论 A 是什么,白化后的数据都是 V^As=QC^s−1/2s,其中 Q 为某个正交矩阵(Exercise 3.6习题 3.6)。噪声会改变这一点。在Proposition 3.5命题 3.5的设定下取 m=n,普通白化后数据中残留的噪声协方差为 σ2Λ−1,所以第 i 个主方向上噪声所占的比例为 σ2/λi。若 A 病态,例如它有两列几乎共线,则某个 λi 很小,相应的白化坐标几乎全是噪声。因此 λ1/λn 很大是一个警示信号,提醒我们重新考虑成分的个数(Chapter 11第 11 章)。
Key points
本章要点
A whitening matrix satisfies VCxV⊤=I. PCA (Λ−1/2E⊤), ZCA (Cx−1/2) and Cholesky (L−1) whitening differ only by orthogonal factors, and all white versions of the data differ by rotations.
For unit-variance sources the whitened mixing matrix A~=VA is orthogonal. ICA reduces to finding a rotation U, with W=UV; the rotation has n(n−1)/2 parameters, and the remaining ambiguity is a signed permutation.
White data stay white under every rotation, and Gaussian data are rotation invariant in distribution. For i.i.d. samples second-order statistics cannot determine U; higher-order statistics can, when the sources are non-Gaussian.
When m>n, PCA recovers the signal subspace even with isotropic noise; ordinary whitening then leaves VA slightly non-orthogonal, which bias-corrected whitening repairs.
With finite samples, orthogonal methods inherit the error of the sample covariance: ISRij+ISRji≥1/(2T) to first order, whatever the contrast.
Let Cx=(1ρρ1) with ∣ρ∣<1. Find the Cholesky whitening matrix and show that z1=x1 and z2=(x2−ρx1)/1−ρ2. Interpret z2 in terms of linear regression.
The matrix L=(1ρ01−ρ2) is lower triangular with a positive diagonal and LL⊤=(1ρρρ2+1−ρ2)=Cx. Its inverse is L−1=(1−ρ/1−ρ201/1−ρ2), which gives the stated z1 and z2. The best linear predictor of x2 from x1 is (E[x1x2]/E[x12])x1=ρx1, with residual variance 1−ρ2, so z2 is the standardized regression residual. This is the Gram–Schmidt step: remove from x2 its component along z1, then normalize. With more variables, zk is the standardized residual of xk regressed on x1,…,xk−1.
For a square model with n=10 unit-variance sources, how many numbers does the covariance determine, and how many parameters does the rotation U have? Show that an orthogonal matrix of the form ΠD, with Π a permutation matrix and D diagonal, has D=diag(±1), and count the orthogonal matrices U that separate a given whitened mixture. How many of them are rotations in the strict sense, with determinant +1?
对 n=10 个单位方差源的方阵模型,协方差确定了多少个数?旋转 U 有多少个参数?证明形如 ΠD(Π 为置换矩阵,D 为对角矩阵)的正交矩阵必有 D=diag(±1),并数一数能分离给定白化混合的正交矩阵 U 有多少个,其中又有多少个是行列式为 +1 的严格意义上的旋转。
Show solution查看解答
The covariance is symmetric, so it determines n(n+1)/2=55 numbers; the rotation has n(n−1)/2=45 parameters, and 55+45=100=n2. If ΠD is orthogonal, then I=(ΠD)⊤(ΠD)=DΠ⊤ΠD=D2, so every di2=1. The separating orthogonal matrices are U=ΠDA~⊤, with Π one of n! permutations and D one of 2n sign patterns. Distinct pairs (Π,D) give distinct matrices ΠD, since the position of the nonzero entry in each column determines Π and its sign determines D. There are therefore 2nn!=210⋅10!=3715891200 separating orthogonal matrices for n=10, all equally good answers. Exactly half of them, 2n−1n!=1857945600, have determinant +1, because changing one sign in D changes the sign of detU=det(Π)det(D)det(A~⊤).
Let Cx be positive definite (m=n). Show that among all m×m whitening matrices, V=Cx−1/2 is the unique minimizer of E∥Vx−x∥2. Deduce that for unit-variance sources, ZCA whitening gives the whitened mixing matrix (AA⊤)−1/2A.
By Proposition 3.2命题 3.2, V=QCx−1/2 with Q orthogonal. Then E∥Vx−x∥2=tr(VCxV⊤)−2tr(VCx)+tr(Cx)=n+tr(Cx)−2tr(QCx1/2), so we must maximize tr(QCx1/2). With Cx1/2=∑iλi1/2eiei⊤, where the ei are the orthonormal eigenvectors (the columns of E), we get tr(QCx1/2)=∑iλi1/2ei⊤Qei≤∑iλi1/2, because ∣ei⊤Qei∣≤∥ei∥∥Qei∥=1. Equality requires ei⊤Qei=1, which for unit vectors means Qei=ei, for every i; hence Q=I. For x=As with E[ss⊤]=I, Cx=AA⊤ and A~=Cx−1/2A=(AA⊤)−1/2A, the orthogonal polar factor of A (Proposition A.4命题 A.4).
由Proposition 3.2命题 3.2,V=QCx−1/2,Q 正交。于是 E∥Vx−x∥2=tr(VCxV⊤)−2tr(VCx)+tr(Cx)=n+tr(Cx)−2tr(QCx1/2),问题化为最大化 tr(QCx1/2)。由 Cx1/2=∑iλi1/2eiei⊤(ei 是标准正交的特征向量,即 E 的各列)得 tr(QCx1/2)=∑iλi1/2ei⊤Qei≤∑iλi1/2,因为 ∣ei⊤Qei∣≤∥ei∥∥Qei∥=1。等号要求对每个 i 都有 ei⊤Qei=1,对单位向量而言这意味着 Qei=ei;因此 Q=I。对 E[ss⊤]=I 的 x=As,Cx=AA⊤,于是 A~=Cx−1/2A=(AA⊤)−1/2A,即 A 的正交极因子(Proposition A.4命题 A.4)。
Exercise 3.4习题 3.4intermediate进阶
Let m=3, n=1 and x=as+n with a=(1,2,2)⊤, E[s2]=1 and E[nn⊤]=I3. Find the eigenvalues of Cx, the PCA whitening matrix V=λ1−1/2e1⊤, where e1 is a unit eigenvector for the largest eigenvalue λ1, and Va, and the bias-corrected version of Proposition 3.5命题 3.5. What are the signal and noise variances of the whitened output?
Here Cx=aa⊤+I. Since ∥a∥2=9, the matrix aa⊤ has eigenvalue 9 with eigenvector e1=a/3 and eigenvalue 0 on the plane orthogonal to a, so Cx has eigenvalues 10,1,1, as item 1 of the proposition predicts with d1=9 and σ2=1. PCA whitening uses V=10−1/2a⊤/3 and gives Va=9/(310)=3/10≈0.949, so (Va)2=0.9=1−σ2/λ1; a 1×1 orthogonal matrix is ±1, so Va is not orthogonal. The bias-corrected V=(10−1)−1/2a⊤/3 gives Va=9/9=1. For PCA whitening the output Vx=(Va)s+Vn has signal variance 0.9 and noise variance VV⊤=9/90=0.1, which add up to 1; the signal-to-noise ratio is 9=d1/σ2, the same for any rescaling of V.
Let s=(s1,s2)⊤ have independent components, and suppose that Qs has the same distribution as s for every rotation Q of the plane. Prove that s1 and s2 are both N(0,σ2) for a common σ2≥0, where σ2=0 means s1=s2=0. Extend the result to n>2 components. (Hint: show that φs(ω) depends only on ∥ω∥ and use Proposition 2.5命题 2.5.)
By the rule for linear maps, φQs(ω)=φs(Q⊤ω), so invariance gives φs(Q⊤ω)=φs(ω) for all rotations, and φs(ω)=g(∥ω∥) for some function g on [0,∞). The rotation by π maps s to −s, so φs is real. By independence φs(ω)=φ1(ω1)φ2(ω2); setting ω2=0 gives φ1(ω1)=g(∣ω1∣), and likewise φ2(ω2)=g(∣ω2∣). Hence g(a2+b2)=g(∣a∣)g(∣b∣) for all real a and b. Let h(t)=g(t) for t≥0. Then h(t+u)=h(t)h(u), h is continuous and real, and h(0)=1. Since h(t)=h(t/2)2≥0, and h(t0)=0 would force h(t0/2k)=0 for all k, contradicting continuity at 0, h is positive. So logh is a continuous solution of Cauchy's equation f(t+u)=f(t)+f(u) on [0,∞), hence linear: h(t)=ect. Because ∣h∣≤1, c≤0; write c=−σ2/2. Then φ1(ω)=φ2(ω)=e−σ2ω2/2, the characteristic function of N(0,σ2), and uniqueness gives the claim. For n>2, the rotations acting on two coordinates i and j and fixing the others are orthogonal matrices, and they rotate the pair (si,sj) in its plane. Applying the two-dimensional result to every pair shows that all components are N(0,σ2) with one common σ2.
In the setting of Proposition 3.6命题 3.6, assume that C^s is positive definite and that the sources have finite fourth moments. (a) Show that V^A=QC^s−1/2 for some orthogonal Q. (b) Show that the oracle rotation, which minimizes ∥UV^A−I∥F over orthogonal U, gives P^=C^s−1/2, and that it attains vij=vji=41. (c) Suppose the rotation step is a function U(Z^) of the whitened data matrix with U(QZ^)=U(Z^)Q⊤ for every orthogonal Q. Show that P^ then depends only on the sources, not on A.
(a) As in the proof of the proposition, V^AC^sA⊤V^⊤=V^C^xV^⊤=I. Hence Q=V^AC^s1/2 satisfies QQ⊤=I, so Q is orthogonal and V^A=QC^s−1/2. (b) ∥UQC^s−1/2−I∥F2=tr(C^s−1)+n−2tr(UQC^s−1/2). As in Exercise 3.3习题 3.3, tr(RM)≤tr(M) for orthogonal R and positive definite M, with equality only for R=I, so the minimum is at UQ=I, where P^=UV^A=C^s−1/2. With C^s=I+Δ and Δ=OP(T−1/2) (by the central limit theorem, since fourth moments are finite), (I+Δ)−1/2=I−21Δ+OP(1/T), so εij=−21Δij+OP(1/T) for i=j, and Tεij→N(0,41) because TΔij→N(0,1). Thus vij+vji=21, the bound of the proposition. (c) Let S~ be the centered source matrix. The whitened data are Z^=V^AS~=QZˇ with Zˇ=C^s−1/2S~, which depends only on the sources. Then U(Z^)=U(Zˇ)Q⊤ and P^=U(Z^)V^A=U(Zˇ)Q⊤QC^s−1/2=U(Zˇ)C^s−1/2, which does not involve A. The accuracy of such a method is the same for every mixing matrix, the same equivariance property that the natural gradient has (Proposition 7.1命题 7.1).
Bell, A. J., & Sejnowski, T. J. (1997). The “independent components” of natural scenes are edge filters. Vision Research, 37(23), 3327–3338.
Cardoso, J.-F. (1994). On the performance of orthogonal source separation algorithms. In Proceedings of EUSIPCO-94 (pp. 776–779). Edinburgh.
Cardoso, J.-F. (1998). Blind signal separation: statistical principles. Proceedings of the IEEE, 86(10), 2009–2025.
Comon, P. (1994). Independent component analysis, a new concept? Signal Processing, 36(3), 287–314.
Golub, G. H., & Van Loan, C. F. (2013). Matrix Computations (4th ed.). Johns Hopkins University Press.
Hyvärinen, A., Karhunen, J., & Oja, E. (2001). Independent Component Analysis. Wiley.
Kessy, A., Lewin, A., & Strimmer, K. (2018). Optimal whitening and decorrelation. The American Statistician, 72(4), 309–314.
Marčenko, V. A., & Pastur, L. A. (1967). Distribution of eigenvalues for some sets of random matrices. Mathematics of the USSR-Sbornik, 1(4), 457–483.
Tipping, M. E., & Bishop, C. M. (1999). Probabilistic principal component analysis. Journal of the Royal Statistical Society: Series B, 61(3), 611–622.