The ICA BookICA 学习书 Yuda Bi

Part V · Chapter 13第五部分 · 第 13 章

Nonlinear ICA非线性 ICA

Why general nonlinear ICA is not identifiable, and how temporal structure or auxiliary variables restore identifiability (TCL, PCL, iVAE).

为什么一般的非线性 ICA 不可辨识,以及时间结构或辅助变量如何恢复可辨识性(TCL、PCL、iVAE)。

13.1 Nonlinear mixing非线性混合

The linear model x=As\bx = \bA\bs is an idealization. Sensors saturate, images are formed through occlusion, shading and perspective, and the factors that generate natural data are rarely added together with fixed weights. The natural generalization keeps independent sources but replaces the matrix by a function:

线性模型 x=As\bx = \bA\bs 是一种理想化。传感器会饱和;图像经由遮挡、明暗与透视而形成;生成自然数据的各种因素,也很少以固定的权重简单相加。最自然的推广是保留相互独立的源,而把矩阵换成一个函数:

x=f(s),ps(s)=∏i=1npi(si),(13.1)\bx = \mathbf{f}(\bs), \qquad p_{\bs}(\bs) = \prod_{i=1}^n p_i(s_i),\tag{13.1}

where f ⁣:Rn→Rn\mathbf{f}\colon \R^n \to \R^n is an unknown invertible function, the mixing function. We assume as many observations as sources and, where needed, that f\mathbf f and f−1\mathbf f^{-1} are smooth. Nonlinear ICA seeks a function g\mathbf g such that the components of y=g(x)\by = \mathbf g(\bx) recover the sources. With f(s)=As\mathbf f(\bs) = \bA\bs this is ordinary ICA, which Chapter 4第 4 章 showed to be solvable up to scaling and permutation whenever at most one source is Gaussian.

其中 f ⁣:Rn→Rn\mathbf{f}\colon \R^n \to \R^n 是未知的可逆函数,称为混合函数。我们假设观测维数与源的个数相同,并在需要时假设 f\mathbf f 与 f−1\mathbf f^{-1} 都是光滑的。非线性 ICA 要找一个函数 g\mathbf g,使 y=g(x)\by = \mathbf g(\bx) 的各分量恢复出源。当 f(s)=As\mathbf f(\bs) = \bA\bs 时,这就是普通的 ICA;Chapter 4第 4 章已经证明,只要至多一个源是高斯的,它就能在尺度与置换的意义下求解。

Some ambiguity is unavoidable, and it is larger than in the linear case. Let π\pi be a permutation of {1,…,n}\{1, \dots, n\} and h1,…,hnh_1, \dots, h_n invertible scalar functions, and set s~i=hi(sπ(i))\tilde s_i = h_i(s_{\pi(i)}). Each s~i\tilde s_i is a function of a different source, so the s~i\tilde s_i are again independent. Write h\mathbf h for the invertible map s↦s~\bs \mapsto \tilde\bs; then x=f(s)=f~(s~)\bx = \mathbf f(\bs) = \tilde{\mathbf f}(\tilde\bs) with f~=f∘h−1\tilde{\mathbf f} = \mathbf f \circ \mathbf h^{-1}. The data cannot tell (f,s)(\mathbf f, \bs) from (f~,s~)(\tilde{\mathbf f}, \tilde\bs), so the best one can hope for is the following.

某种不确定性是无法避免的,而且比线性情形更大。设 π\pi 是 {1,…,n}\{1, \dots, n\} 的一个置换,h1,…,hnh_1, \dots, h_n 是可逆的标量函数,令 s~i=hi(sπ(i))\tilde s_i = h_i(s_{\pi(i)})。每个 s~i\tilde s_i 只是某一个源的函数,且所涉及的源各不相同,因此 s~i\tilde s_i 仍然相互独立。记 h\mathbf h 为可逆映射 s↦s~\bs \mapsto \tilde\bs,则 x=f(s)=f~(s~)\bx = \mathbf f(\bs) = \tilde{\mathbf f}(\tilde\bs),其中 f~=f∘h−1\tilde{\mathbf f} = \mathbf f \circ \mathbf h^{-1}。数据无法区分 (f,s)(\mathbf f, \bs) 与 (f~,s~)(\tilde{\mathbf f}, \tilde\bs),所以最理想的结果也只能是下面这种意义下的分离。

Definition 13.1 (separation and identifiability)定义 13.1(分离与可辨识性)

A function g\mathbf g separates the sources of the model (13.1) if there are a permutation π\pi and invertible scalar functions ϕ1,…,ϕn\phi_1, \dots, \phi_n such that gi(x)=ϕi(sπ(i))g_i(\bx) = \phi_i(s_{\pi(i)}) for every ii. Nonlinear ICA is identifiable within a class of models if, for every model in the class, every invertible g\mathbf g whose outputs are independent separates the sources.

若存在置换 π\pi 与可逆标量函数 ϕ1,…,ϕn\phi_1, \dots, \phi_n,使得对每个 ii 都有 gi(x)=ϕi(sπ(i))g_i(\bx) = \phi_i(s_{\pi(i)}),则称函数 g\mathbf g 分离了模型 (13.1) 的源。若在某一类模型中,对其中每个模型,每个使输出相互独立的可逆函数 g\mathbf g 都能分离源,则称非线性 ICA 在这一类模型中可辨识。

Two features of this definition matter later. First, the marginal distributions of the sources carry no information. With FiF_i the cumulative distribution function (CDF) of sis_i and Φ\Phi the standard Gaussian CDF, the map hi=Φ−1∘Fih_i = \Phi^{-1}\circ F_i turns any source with a continuous, strictly increasing CDF into a standard Gaussian variable (Exercise 13.1习题 13.1). Non-Gaussianity of the marginals, the basis of linear ICA, is therefore useless here. Second, since one may as well assume Gaussian sources, the rotational ambiguity of Gaussian vectors from Section 1.4第 1.4 节 is never far away. The next section turns this observation into a theorem.

这个定义有两点后面会用到。第一,源的边缘分布不携带任何信息。记 FiF_i 为 sis_i 的累积分布函数(CDF),Φ\Phi 为标准高斯分布的 CDF,则映射 hi=Φ−1∘Fih_i = \Phi^{-1}\circ F_i 能把任何 CDF 连续且严格递增的源变成标准高斯变量(Exercise 13.1习题 13.1)。线性 ICA 赖以成立的边缘非高斯性,在这里毫无用处。第二,既然不妨假设源都是高斯的,Section 1.4第 1.4 节中高斯向量的旋转不确定性便近在眼前。下一节把这一观察变成定理。

13.2 Independence is not enough仅有独立性是不够的

The basic tool is the probability integral transform: if a random variable uu has a continuous CDF FF, then F(u)F(u) is uniform on (0,1)(0, 1). Applying it one coordinate at a time, each time conditionally on the coordinates already processed, turns any random vector into one with independent uniform components. Write Fk∣1:k−1(⋅∣x1,…,xk−1)F_{k\mid 1:k-1}(\cdot \mid x_1, \dots, x_{k-1}) for the conditional CDF of xkx_k given x1,…,xk−1x_1, \dots, x_{k-1}, and define

基本工具是概率积分变换:若随机变量 uu 的 CDF FF 是连续的,则 F(u)F(u) 在 (0,1)(0, 1) 上均匀分布。逐个坐标地使用这一变换,每次都以已经处理过的坐标为条件,就能把任何随机向量变成分量独立且均匀分布的向量。记 Fk∣1:k−1(⋅∣x1,…,xk−1)F_{k\mid 1:k-1}(\cdot \mid x_1, \dots, x_{k-1}) 为给定 x1,…,xk−1x_1, \dots, x_{k-1} 时 xkx_k 的条件 CDF,定义

g1(x)=F1(x1),gk(x)=Fk∣1:k−1(xk∣x1,…,xk−1),k=2,…,n,(13.2)g_1(\bx) = F_1(x_1), \qquad g_k(\bx) = F_{k\mid 1:k-1}(x_k \mid x_1, \dots, x_{k-1}), \quad k = 2, \dots, n,\tag{13.2}

where F1F_1 is the CDF of x1x_1. This triangular map is often called the Darmois construction; Hyvärinen and Pajunen (1999) used it to show that nonlinear ICA always has solutions, and far too many of them. It is a nonlinear counterpart of Gram–Schmidt orthogonalization: the kk-th output keeps only what xkx_k adds to the coordinates before it, and for a Gaussian vector the construction reduces to Cholesky whitening followed by Φ\Phi (Exercise 13.2习题 13.2).

其中 F1F_1 是 x1x_1 的 CDF。这个三角形映射通常称为 Darmois 构造;Hyvärinen 与 Pajunen(1999)用它证明了非线性 ICA 总是有解,而且解多得过了头。它相当于 Gram–Schmidt 正交化的非线性版本:第 kk 个输出只保留 xkx_k 相对于前面各坐标新增的部分;对高斯向量而言,这一构造就退化为 Cholesky 白化再接上 Φ\Phi(Exercise 13.2习题 13.2)。

Theorem 13.2 (non-identifiability of nonlinear ICA)定理 13.2(非线性 ICA 的不可辨识性)

(a) Let x\bx be a random vector in Rn\R^n whose density is positive on an open convex set X\mathcal{X} and zero outside it. Then the map g\mathbf g of (13.2) is a bijection from X\mathcal X onto (0,1)n(0,1)^n, and y=g(x)\by = \mathbf g(\bx) is uniformly distributed on (0,1)n(0,1)^n. In particular y1,…,yny_1, \dots, y_n are independent.

(a) 设随机向量 x∈Rn\bx \in \R^n 的密度在某个开凸集 X\mathcal{X} 上处处为正、在其外为零。则 (13.2) 定义的映射 g\mathbf g 是从 X\mathcal X 到 (0,1)n(0,1)^n 的双射,且 y=g(x)\by = \mathbf g(\bx) 在 (0,1)n(0,1)^n 上均匀分布。特别地,y1,…,yny_1, \dots, y_n 相互独立。

(b) Let n≥2n \ge 2 and let s1,…,sns_1, \dots, s_n be independent, each with a CDF that is continuous and strictly increasing on an open interval carrying all of its probability. Then there is an invertible map h\mathbf h such that h(s)\mathbf h(\bs) has the same distribution as s\bs, so that its components are independent, while its first component is strictly increasing in s1s_1 and strictly decreasing in s2s_2. Consequently, for every invertible mixing function f\mathbf f, the map g=h∘f−1\mathbf g = \mathbf h \circ \mathbf f^{-1} produces independent outputs without separating the sources, and nonlinear ICA is not identifiable.

(b) 设 n≥2n \ge 2,s1,…,sns_1, \dots, s_n 相互独立,且每个 sis_i 的 CDF 在某个承载其全部概率的开区间上连续且严格递增。则存在可逆映射 h\mathbf h,使 h(s)\mathbf h(\bs) 与 s\bs 同分布(因而其分量相互独立),而它的第一个分量关于 s1s_1 严格递增、关于 s2s_2 严格递减。于是,对任何可逆混合函数 f\mathbf f,映射 g=h∘f−1\mathbf g = \mathbf h \circ \mathbf f^{-1} 的输出相互独立,却并没有分离源:非线性 ICA 不可辨识。

Proof.证明

(a) Let Xk\mathcal X_k be the projection of X\mathcal X onto the first kk coordinates, an open convex set, and let p1:kp_{1:k} be the marginal density of (x1,…,xk)(x_1, \dots, x_k); it is positive on Xk\mathcal X_k, because it integrates the density over a nonempty open set of the remaining coordinates. For fixed (x1,…,xk−1)∈Xk−1(x_1, \dots, x_{k-1}) \in \mathcal X_{k-1}, the values of xkx_k with (x1,…,xk)∈Xk(x_1, \dots, x_k) \in \mathcal X_k form an open interval, on which the conditional density p1:k/p1:k−1p_{1:k}/p_{1:k-1} is positive. So the conditional CDF of xkx_k, as a function of xkx_k, increases continuously and strictly from 0 to 1 across this interval, and every yk∈(0,1)y_k \in (0,1) has exactly one preimage xkx_k. Solving y=g(x)\by = \mathbf g(\bx) for x1,x2,…,xnx_1, x_2, \dots, x_n in turn shows that g\mathbf g is a bijection from X\mathcal X onto (0,1)n(0,1)^n.

(a) 记 Xk\mathcal X_k 为 X\mathcal X 在前 kk 个坐标上的投影,它是开凸集;记 p1:kp_{1:k} 为 (x1,…,xk)(x_1, \dots, x_k) 的边缘密度。由于它是把密度在其余坐标的一个非空开集上积分得到的,所以在 Xk\mathcal X_k 上为正。固定 (x1,…,xk−1)∈Xk−1(x_1, \dots, x_{k-1}) \in \mathcal X_{k-1},使 (x1,…,xk)∈Xk(x_1, \dots, x_k) \in \mathcal X_k 的 xkx_k 构成一个开区间,条件密度 p1:k/p1:k−1p_{1:k}/p_{1:k-1} 在这个区间上为正。因此 xkx_k 的条件 CDF 作为 xkx_k 的函数,在该区间上从 0 连续且严格地增加到 1,每个 yk∈(0,1)y_k \in (0,1) 恰有一个原像 xkx_k。依次对 x1,x2,…,xnx_1, x_2, \dots, x_n 求解 y=g(x)\by = \mathbf g(\bx),即知 g\mathbf g 是从 X\mathcal X 到 (0,1)n(0,1)^n 的双射。

Now fix kk and condition on (x1,…,xk−1)(x_1, \dots, x_{k-1}). Given these values, xkx_k has a continuous distribution with CDF Fk∣1:k−1(⋅∣x1,…,xk−1)F_{k\mid 1:k-1}(\cdot \mid x_1, \dots, x_{k-1}), so by the probability integral transform yky_k is uniform on (0,1)(0,1) whatever the conditioning values are. Its conditional distribution does not depend on (x1,…,xk−1)(x_1, \dots, x_{k-1}), so yky_k is independent of (x1,…,xk−1)(x_1, \dots, x_{k-1}), and hence of (y1,…,yk−1)(y_1, \dots, y_{k-1}), which is a function of these coordinates. Therefore, for all c1,…,ck∈(0,1)c_1, \dots, c_k \in (0,1),

再固定 kk,以 (x1,…,xk−1)(x_1, \dots, x_{k-1}) 为条件。给定这些值,xkx_k 服从 CDF 为 Fk∣1:k−1(⋅∣x1,…,xk−1)F_{k\mid 1:k-1}(\cdot \mid x_1, \dots, x_{k-1}) 的连续分布,由概率积分变换,无论条件取什么值,yky_k 都在 (0,1)(0,1) 上均匀分布。它的条件分布与 (x1,…,xk−1)(x_1, \dots, x_{k-1}) 无关,所以 yky_k 与 (x1,…,xk−1)(x_1, \dots, x_{k-1}) 独立,从而与作为这些坐标之函数的 (y1,…,yk−1)(y_1, \dots, y_{k-1}) 独立。于是对任意 c1,…,ck∈(0,1)c_1, \dots, c_k \in (0,1),

P(y1≤c1,…,yk≤ck)=ck P(y1≤c1,…,yk−1≤ck−1),P(y_1 \le c_1, \dots, y_k \le c_k) = c_k\,P(y_1 \le c_1, \dots, y_{k-1} \le c_{k-1}),

and by induction the joint CDF of y\by is c1c2⋯cnc_1 c_2 \cdots c_n, that of the uniform distribution on (0,1)n(0,1)^n.

归纳可得 y\by 的联合 CDF 为 c1c2⋯cnc_1 c_2 \cdots c_n,即 (0,1)n(0,1)^n 上均匀分布的 CDF。

(b) Let FiF_i be the CDF of sis_i. By the probability integral transform, zi=Φ−1(Fi(si))z_i = \Phi^{-1}(F_i(s_i)) is standard Gaussian, so z=(z1,…,zn)⊤∼N(0,I)\bz = (z_1, \dots, z_n)^\top \sim \Ncal(\bzero, \bI). Let Q\bQ rotate the first two coordinates by the angle π/4\pi/4 and leave the others unchanged; then Qz∼N(0,I)\bQ\bz \sim \Ncal(\bzero, \bI) as well (Exercise 1.3习题 1.3). Set hi(s)=Fi−1(Φ((Qz)i))h_i(\bs) = F_i^{-1}\bigl(\Phi((\bQ\bz)_i)\bigr), with Fi−1F_i^{-1} the inverse of FiF_i on its interval. The components of h(s)\mathbf h(\bs) are independent because those of Qz\bQ\bz are, and the ii-th has CDF FiF_i, so h(s)\mathbf h(\bs) has the distribution of s\bs. The map h\mathbf h is a composition of bijections, hence invertible. Finally (Qz)1=(z1−z2)/2(\bQ\bz)_1 = (z_1 - z_2)/\sqrt 2, so h1(s)=F1−1(Φ((Qz)1))h_1(\bs) = F_1^{-1}\bigl(\Phi((\bQ\bz)_1)\bigr) is strictly increasing in z1z_1, hence in s1s_1, and strictly decreasing in z2z_2, hence in s2s_2. Since g(x)=h(s)\mathbf g(\bx) = \mathbf h(\bs), the outputs of g\mathbf g are independent, yet g1(x)g_1(\bx) is not a function of any single source.

(b) 记 FiF_i 为 sis_i 的 CDF。由概率积分变换,zi=Φ−1(Fi(si))z_i = \Phi^{-1}(F_i(s_i)) 服从标准高斯分布,所以 z=(z1,…,zn)⊤∼N(0,I)\bz = (z_1, \dots, z_n)^\top \sim \Ncal(\bzero, \bI)。令 Q\bQ 把前两个坐标旋转 π/4\pi/4 角、其余坐标不变,则同样有 Qz∼N(0,I)\bQ\bz \sim \Ncal(\bzero, \bI)(Exercise 1.3习题 1.3)。令 hi(s)=Fi−1(Φ((Qz)i))h_i(\bs) = F_i^{-1}\bigl(\Phi((\bQ\bz)_i)\bigr),其中 Fi−1F_i^{-1} 是 FiF_i 在其区间上的反函数。由于 Qz\bQ\bz 的分量相互独立,h(s)\mathbf h(\bs) 的分量也相互独立,且第 ii 个分量的 CDF 为 FiF_i,所以 h(s)\mathbf h(\bs) 与 s\bs 同分布。h\mathbf h 是若干双射的复合,因而可逆。最后,(Qz)1=(z1−z2)/2(\bQ\bz)_1 = (z_1 - z_2)/\sqrt 2,所以 h1(s)=F1−1(Φ((Qz)1))h_1(\bs) = F_1^{-1}\bigl(\Phi((\bQ\bz)_1)\bigr) 关于 z1z_1 严格递增,从而关于 s1s_1 严格递增;关于 z2z_2 严格递减,从而关于 s2s_2 严格递减。由于 g(x)=h(s)\mathbf g(\bx) = \mathbf h(\bs),g\mathbf g 的输出相互独立,但 g1(x)g_1(\bx) 不是任何单个源的函数。

Part (a) applies to any random vector, mixture or not. Independent outputs therefore cannot certify that a nonlinear unmixing has found the sources, even when the mixing happens to be linear.

(a) 部分适用于任何随机向量,不论它是否来自混合。因此,即使混合恰好是线性的,输出相互独立也不能证明一个非线性解混找到了源。

Example 13.3 (the Darmois construction on a linear mixture)例 13.3(对线性混合做 Darmois 构造)

Let s1,s2s_1, s_2 be independent and uniform on (0,1)(0,1), and observe the linear mixture x1=s1x_1 = s_1, x2=s1+s2x_2 = s_1 + s_2, which linear ICA would separate. Apply the Darmois construction taking x2x_2 first. The sum of two independent uniforms has the triangular CDF F(c)=c2/2F(c) = c^2/2 for 0≤c≤10 \le c \le 1 and F(c)=1−(2−c)2/2F(c) = 1 - (2 - c)^2/2 for 1≤c≤21 \le c \le 2, and given x2=cx_2 = c, the variable x1x_1 is uniform on [max⁡(0,c−1),min⁡(1,c)][\max(0, c-1), \min(1, c)]. Hence

设 s1,s2s_1, s_2 相互独立,都在 (0,1)(0,1) 上均匀分布,观测到线性混合 x1=s1x_1 = s_1,x2=s1+s2x_2 = s_1 + s_2;线性 ICA 可以把它分开。现在先取 x2x_2、再取 x1x_1 做 Darmois 构造。两个独立均匀变量之和服从三角分布,其 CDF 为:0≤c≤10 \le c \le 1 时 F(c)=c2/2F(c) = c^2/2,1≤c≤21 \le c \le 2 时 F(c)=1−(2−c)2/2F(c) = 1 - (2 - c)^2/2;而给定 x2=cx_2 = c 时,x1x_1 在 [max⁡(0,c−1),min⁡(1,c)][\max(0, c-1), \min(1, c)] 上均匀分布。因此

y1=F(x2),y2=x1−max⁡(0, x2−1)min⁡(1, x2)−max⁡(0, x2−1).y_1 = F(x_2), \qquad y_2 = \frac{x_1 - \max(0,\, x_2 - 1)}{\min(1,\, x_2) - \max(0,\, x_2 - 1)}.

The support of x\bx is an open parallelogram, so by part (a) of Theorem 13.2定理 13.2, with the coordinates taken in the order x2,x1x_2, x_1, the outputs y1y_1 and y2y_2 are independent and uniform. Yet each depends on both sources.

x\bx 的支撑集是一个开平行四边形,所以按 x2,x1x_2, x_1 的坐标次序应用Theorem 13.2定理 13.2的 (a) 部分,输出 y1y_1 与 y2y_2 相互独立且均匀分布。但每个输出都同时依赖两个源。

The following script checks both claims on 10510^5 samples.

下面的脚本在 10510^5 个样本上检验这两点。

import numpy as np
from scipy import stats

rng = np.random.default_rng(1)
T = 100_000
s1 = rng.uniform(0, 1, T)                 # two independent sources
s2 = rng.uniform(0, 1, T)
x1, x2 = s1, s1 + s2                      # a linear mixture

# Darmois construction, taking x2 first and x1 second
y1 = np.where(x2 <= 1, x2**2 / 2, 1 - (2 - x2)**2 / 2)   # CDF of x2 (triangular)
lo, hi = np.maximum(0, x2 - 1), np.minimum(1, x2)         # given x2, x1 ~ U(lo, hi)
y2 = (x1 - lo) / (hi - lo)                                # conditional CDF of x1

# Test that (y1, y2) is uniform on the unit square: chi-square on a 10 x 10 grid
H, _, _ = np.histogram2d(y1, y2, bins=10, range=[[0, 1], [0, 1]])
chi2 = ((H - T / 100) ** 2 / (T / 100)).sum()
print(f"chi2 = {chi2:.1f} on 99 df, p = {stats.chi2.sf(chi2, 99):.2f}")
# ... yet each output depends on both sources
print(np.round(np.corrcoef([y1, y2, s1, s2])[:2, 2:], 2))

It prints χ2=91.3\chi^2 = 91.3 on 99 degrees of freedom (p=0.70p = 0.70; over repeated seeds the pp-values spread evenly over (0,1)(0,1), as they should under independence) and the correlations of (y1,y2)(y_1, y_2) with (s1,s2)(s_1, s_2), (0.700.700.67−0.67)\bigl(\begin{smallmatrix} 0.70 & 0.70 \\ 0.67 & -0.67 \end{smallmatrix}\bigr): both outputs depend strongly on both sources. In Figure 13.1图 13.1, lines of constant s1s_1 and of constant s2s_2, straight in the x\bx plane, become curves in the y\by square.

脚本输出 χ2=91.3\chi^2 = 91.3(自由度 99,p=0.70p = 0.70;换用不同的随机种子重复,pp 值均匀地散布在 (0,1)(0,1) 上,与独立性相符),以及 (y1,y2)(y_1, y_2) 与 (s1,s2)(s_1, s_2) 的相关系数 (0.700.700.67−0.67)\bigl(\begin{smallmatrix} 0.70 & 0.70 \\ 0.67 & -0.67 \end{smallmatrix}\bigr):两个输出都与两个源强相关。在Figure 13.1图 13.1 中,x\bx 平面里的 s1s_1 等值线与 s2s_2 等值线都是直线,到了 y\by 正方形中却成了曲线。

Left: points of a linear mixture filling a parallelogram, crossed by vertical lines of constant s1 and diagonal dashed lines of constant s2. Right: the Darmois outputs fill the unit square uniformly, and the same lines appear as S-shaped curves.
Figure 13.1. The Darmois construction applied to the linear mixture x1=s1x_1 = s_1, x2=s1+s2x_2 = s_1 + s_2 of two independent uniform sources. (a) The observations, with lines of constant s1s_1 (solid) and of constant s2s_2 (dashed). (b) The outputs y=g(x)\by = \mathbf g(\bx) are independent and uniform on the unit square, but the images of those lines are curved: each yiy_i mixes both sources.图 13.1 对两个独立均匀源的线性混合 x1=s1x_1 = s_1,x2=s1+s2x_2 = s_1 + s_2 做 Darmois 构造。(a) 观测数据,以及 s1s_1 等值线(实线)与 s2s_2 等值线(虚线)。(b) 输出 y=g(x)\by = \mathbf g(\bx) 在单位正方形上独立且均匀分布,但上述直线的像都是弯曲的:每个 yiy_i 都混合了两个源。

Part (b) of the theorem rests on a symmetry: a map that sends a distribution with independent components onto itself while mixing the coordinates. Rotations of N(0,I)\Ncal(\bzero, \bI) are the simplest such maps, but there are many more. Let R(α)\bR(\alpha) denote the rotation of the plane by the angle α\alpha and define

定理的 (b) 部分依赖于一种对称性:存在把分量独立的分布映到自身、同时又把坐标混在一起的映射。N(0,I)\Ncal(\bzero, \bI) 的旋转是这类映射中最简单的,但远不止于此。记 R(α)\bR(\alpha) 为平面上转角为 α\alpha 的旋转,定义

m(z)=R(β ∥z∥2) z,β∈R,\mathbf m(\bz) = \bR\bigl(\beta\,\|\bz\|^2\bigr)\,\bz, \qquad \beta \in \R,

which turns each circle centered at the origin by an angle proportional to its squared radius. If z∼N(0,I2)\bz \sim \Ncal(\bzero, \bI_2), then m(z)∼N(0,I2)\mathbf m(\bz) \sim \Ncal(\bzero, \bI_2) (Exercise 13.3习题 13.3): its components are independent standard Gaussians, although each depends on both z1z_1 and z2z_2 in a complicated way (Figure 13.2图 13.2). The map is smooth with a smooth inverse, so requiring g\mathbf g to be smooth does not remove the ambiguity. Composed with the componentwise maps Φ−1∘Fi\Phi^{-1}\circ F_i and their inverses, as in the proof of part (b), such measure-preserving maps produce a continuum of spurious solutions, which are smooth when f\mathbf f and f−1\mathbf f^{-1} are smooth and the source densities are smooth and positive on their intervals. Without further information, independence of the outputs says almost nothing about whether they are the sources.

它把每个以原点为圆心的圆旋转一个与半径平方成正比的角度。若 z∼N(0,I2)\bz \sim \Ncal(\bzero, \bI_2),则 m(z)∼N(0,I2)\mathbf m(\bz) \sim \Ncal(\bzero, \bI_2)(Exercise 13.3习题 13.3):它的两个分量是相互独立的标准高斯变量,但每个分量都以复杂的方式同时依赖 z1z_1 与 z2z_2(Figure 13.2图 13.2)。这个映射光滑且逆映射也光滑,所以要求 g\mathbf g 光滑并不能消除不确定性。像 (b) 部分的证明那样,把这类保测映射与逐分量映射 Φ−1∘Fi\Phi^{-1}\circ F_i 及其逆复合起来,就得到一整族连续变化的伪解;当 f\mathbf f 与 f−1\mathbf f^{-1} 光滑、源密度光滑且在各自区间上为正时,这些伪解也是光滑的。没有其他信息时,输出相互独立几乎不能说明它们是不是源。

Left: a Gaussian point cloud with a square grid of coordinate lines. Right: the point cloud after a rotation whose angle grows with the squared radius; it looks the same, but the grid lines are wound into spirals.
Figure 13.2. A measure-preserving map. (a) Samples of z∼N(0,I2)\bz \sim \Ncal(\bzero, \bI_2) with lines of constant z1z_1 (solid) and of constant z2z_2 (dashed). (b) The same samples after m(z)=R(β∥z∥2) z\mathbf m(\bz) = \bR(\beta\|\bz\|^2)\,\bz with β=0.4\beta = 0.4. The point cloud has the same distribution, with independent components, but the coordinate lines are wound into spirals.图 13.2 一个保测映射。(a) z∼N(0,I2)\bz \sim \Ncal(\bzero, \bI_2) 的样本,以及 z1z_1 等值线(实线)与 z2z_2 等值线(虚线)。(b) 同一批样本经 m(z)=R(β∥z∥2) z\mathbf m(\bz) = \bR(\beta\|\bz\|^2)\,\bz(β=0.4\beta = 0.4)变换后的结果。点云的分布不变,分量仍然独立,但坐标线被卷成了螺旋。

13.3 Restricting the mixing function限制混合函数

Theorem 13.2定理 13.2 leaves two ways forward: restrict the class of mixing functions, or give the sources more structure than independence. The oldest restriction is the post-nonlinear (PNL) model of Taleb and Jutten (1999), in which a linear mixture passes through an invertible nonlinearity in each sensor,

Theorem 13.2定理 13.2留下了两条出路:限制混合函数的类别,或者赋予源比独立性更多的结构。最早的限制是 Taleb 与 Jutten(1999)提出的后非线性(post-nonlinear, PNL)模型:线性混合在每个传感器中再经过一个可逆的非线性变换,

xi=fi(∑j=1naij sj),i=1,…,n,(13.3)x_i = f_i\Bigl(\sum_{j=1}^n a_{ij}\,s_j\Bigr), \qquad i = 1, \dots, n,\tag{13.3}

as happens when sensors respond nonlinearly, for instance by saturating. The separating structure mirrors the model: first a scalar nonlinearity gig_i in each channel, then a matrix, y=W g(x)\by = \bW\,\mathbf g(\bx), where g\mathbf g applies gig_i to the ii-th coordinate. If every composition gi∘fig_i \circ f_i is affine, what remains is a linear ICA problem. Taleb and Jutten (1999) showed that, under conditions on A\bA, the sources and the nonlinearities, independence of the outputs forces exactly this: each gi∘fig_i\circ f_i is affine and WA\bW\bA is a scaled permutation, so the sources are recovered up to the usual scaling, permutation and additive constants. The conditions have been weakened in later work, and we do not state them precisely here.

传感器响应非线性(例如饱和)时就是这种情形。分离结构与模型相对应:先在每个通道上作用一个标量非线性函数 gig_i,再乘以一个矩阵,即 y=W g(x)\by = \bW\,\mathbf g(\bx),其中 g\mathbf g 把 gig_i 作用于第 ii 个坐标。如果每个复合函数 gi∘fig_i \circ f_i 都是仿射的,剩下的就是一个线性 ICA 问题。Taleb 与 Jutten(1999)证明,在关于 A\bA、源和非线性函数的一定条件下,输出相互独立恰好迫使这一点成立:每个 gi∘fig_i\circ f_i 都是仿射的,且 WA\bW\bA 是带尺度的置换矩阵,于是源可以在通常的尺度、置换以及加性常数的意义下恢复。后来的工作放宽了这些条件,这里不再精确陈述。

The PNL model (13.3) escapes Theorem 13.2定理 13.2 because its separating structure, nn scalar functions and one matrix, is too rigid to reproduce maps that act jointly on several coordinates, such as the Darmois map or the spiral of Figure 13.2图 13.2. Restricting f\mathbf f to conformal maps has a similar effect: Hyvärinen and Pajunen (1999) gave a uniqueness result in two dimensions, and Buchholz, Besserve and Schölkopf (2022) extended such results to higher dimensions, in each case up to a small group of simple transformations. The price is generality, since the processes behind images or neural recordings are neither post-nonlinear nor conformal. The rest of the chapter keeps f\mathbf f arbitrary and adds structure to the sources instead.

PNL 模型 (13.3) 之所以能躲开Theorem 13.2定理 13.2,是因为它的分离结构(nn 个标量函数加一个矩阵)过于刚性,无法复现同时作用于多个坐标的映射,例如 Darmois 映射或Figure 13.2图 13.2 中的螺旋映射。把 f\mathbf f 限制为共形映射也有类似效果:Hyvärinen 与 Pajunen(1999)给出了二维情形的唯一性结果,Buchholz、Besserve 与 Schölkopf(2022)把这类结果推广到更高维,两者都是在一个由简单变换构成的小群的意义下唯一。代价是一般性:图像或神经记录背后的生成过程既不是后非线性的,也不是共形的。本章其余部分对 f\mathbf f 不加限制,转而给源增加结构。

13.4 Temporal structure: time-contrastive and permutation-contrastive learning时间结构:时间对比学习与置换对比学习

For linear ICA, temporal structure was an alternative to non-Gaussianity (Chapter 9第 9 章). For nonlinear ICA it becomes a source of identifiability in its own right. The methods of Hyvärinen and Morioka turn estimation into classification, using a simple fact about logistic regression. Suppose a classifier is trained on equal numbers of samples from two densities p1p_1 and p0p_0 and models the posterior probability of the first class as 1/(1+e−r(v))1/(1 + e^{-r(\bv)}). The true posterior is p1(v)/(p1(v)+p0(v))p_1(\bv)/(p_1(\bv) + p_0(\bv)), so the optimal regression function is the log-density ratio

对线性 ICA 而言,时间结构是非高斯性之外的另一种选择(Chapter 9第 9 章)。对非线性 ICA 而言,它本身就成了可辨识性的来源。Hyvärinen 与 Morioka 的方法把估计问题变成分类问题,所依据的是逻辑回归的一个简单事实。设用来自两个密度 p1p_1 与 p0p_0 的等量样本训练一个分类器,它把第一类的后验概率建模为 1/(1+e−r(v))1/(1 + e^{-r(\bv)})。真实后验是 p1(v)/(p1(v)+p0(v))p_1(\bv)/(p_1(\bv) + p_0(\bv)),所以最优的回归函数就是对数密度比

r∗(v)=log⁡p1(v)−log⁡p0(v).r^*(\bv) = \log p_1(\bv) - \log p_0(\bv).

With flexible models and enough data, logistic regression therefore learns a log-density ratio; this is the principle of noise-contrastive estimation (Gutmann & Hyvärinen, 2012). In nonlinear ICA the two densities share the same mixing function, and their ratio turns out to be blind to it.

因此,只要模型足够灵活、数据足够多,逻辑回归学到的就是对数密度比;这正是噪声对比估计的原理(Gutmann & Hyvärinen, 2012)。在非线性 ICA 中,两个密度共享同一个混合函数,而它们的比值恰好对这个混合函数“视而不见”。

Time-contrastive learning时间对比学习

Suppose the sources are nonstationary. The time series is divided into segments τ=1,…,K\tau = 1, \dots, K; within each segment the sources are independent, and their log-densities change from segment to segment through an exponential family,

假设源是非平稳的。把时间序列分成 τ=1,…,K\tau = 1, \dots, K 共 KK 段;在每一段内各源相互独立,而它们的对数密度通过一个指数族随段而变:

log⁡pτ(si)=qi,0(si)+λi(τ) qi(si)−log⁡Zi(τ),(13.4)\log p_\tau(s_i) = q_{i,0}(s_i) + \lambda_i(\tau)\,q_i(s_i) - \log Z_i(\tau),\tag{13.4}

where qi,0q_{i,0} and qiq_i are fixed functions, λi(τ)\lambda_i(\tau) is a modulation parameter and Zi(τ)Z_i(\tau) a normalizing constant. With qi,0=0q_{i,0} = 0 and qi(s)=−s2/2q_i(s) = -s^2/2, for instance, λi(τ)\lambda_i(\tau) is the inverse variance of source ii in segment τ\tau: the sources are Gaussian with power that fluctuates over time. Time-contrastive learning (TCL; Hyvärinen & Morioka, 2016) trains a multinomial logistic regression to predict the segment label from the observation,

其中 qi,0q_{i,0} 与 qiq_i 是固定的函数,λi(τ)\lambda_i(\tau) 是调制参数,Zi(τ)Z_i(\tau) 是归一化常数。例如取 qi,0=0q_{i,0} = 0,qi(s)=−s2/2q_i(s) = -s^2/2,则 λi(τ)\lambda_i(\tau) 就是源 ii 在第 τ\tau 段内方差的倒数:源是高斯的,但功率随时间起伏。时间对比学习(time-contrastive learning, TCL;Hyvärinen & Morioka, 2016)训练一个多项逻辑回归,从观测预测它所在的段:

P(τ∣x)=exp⁡(wτ⊤h(x)+bτ)∑τ′=1Kexp⁡(wτ′⊤h(x)+bτ′),(13.5)P(\tau \mid \bx) = \frac{\exp\bigl(\bw_\tau^\top\mathbf h(\bx) + b_\tau\bigr)}{\sum_{\tau'=1}^K \exp\bigl(\bw_{\tau'}^\top\mathbf h(\bx) + b_{\tau'}\bigr)},\tag{13.5}

where h ⁣:Rn→Rn\mathbf h\colon \R^n \to \R^n is a feature extractor, in practice a neural network, trained jointly with the weights wτ\bw_\tau and biases bτb_\tau.

其中 h ⁣:Rn→Rn\mathbf h\colon \R^n \to \R^n 是特征提取器,实践中是一个神经网络,与权重 wτ\bw_\tau 和偏置 bτb_\tau 一起训练。

Proposition 13.4 (time-contrastive learning)命题 13.4(时间对比学习)

Assume that x=f(s)\bx = \mathbf f(\bs) with f\mathbf f invertible and both f\mathbf f and f−1\mathbf f^{-1} differentiable; that within each segment the sources are independent with log-densities (13.4), no qi(si)q_i(s_i) being almost surely constant; and that the (K−1)×n(K-1) \times n matrix L\mathbf L with entries Lτi=λi(τ+1)−λi(1)L_{\tau i} = \lambda_i(\tau + 1) - \lambda_i(1) has rank nn. If the classifier (13.5) equals the true posterior P(τ∣x)P(\tau\mid\bx), then there are an invertible n×nn \times n matrix B\bB and a vector d\mathbf d such that

设 x=f(s)\bx = \mathbf f(\bs),其中 f\mathbf f 可逆,且 f\mathbf f 与 f−1\mathbf f^{-1} 均可微;在每一段内各源相互独立,对数密度为 (13.4),且没有哪个 qi(si)q_i(s_i) 几乎必然为常数;(K−1)×n(K-1) \times n 矩阵 L\mathbf L(元素为 Lτi=λi(τ+1)−λi(1)L_{\tau i} = \lambda_i(\tau + 1) - \lambda_i(1))的秩为 nn。若分类器 (13.5) 等于真实后验 P(τ∣x)P(\tau\mid\bx),则存在可逆的 n×nn \times n 矩阵 B\bB 与向量 d\mathbf d,使得

q(s)=B h(x)+d,q(s)=(q1(s1),…,qn(sn))⊤.\bq(\bs) = \bB\,\mathbf h(\bx) + \mathbf d, \qquad \bq(\bs) = \bigl(q_1(s_1), \dots, q_n(s_n)\bigr)^\top.

Proof.证明

Let πτ\pi_\tau be the proportion of samples in segment τ\tau. By Bayes' rule P(τ∣x)∝πτ pτ(x)P(\tau\mid\bx) \propto \pi_\tau\,p_\tau(\bx), so equating the log-odds of segment τ\tau against segment 1 under the classifier and under the truth gives

记 πτ\pi_\tau 为第 τ\tau 段样本所占的比例。由 Bayes 公式,P(τ∣x)∝πτ pτ(x)P(\tau\mid\bx) \propto \pi_\tau\,p_\tau(\bx),所以令分类器与真实后验中第 τ\tau 段相对第 1 段的对数几率相等,得到

(wτ−w1)⊤h(x)+bτ−b1=log⁡pτ(x)−log⁡p1(x)+log⁡πτπ1.(\bw_\tau - \bw_1)^\top\mathbf h(\bx) + b_\tau - b_1 = \log p_\tau(\bx) - \log p_1(\bx) + \log\frac{\pi_\tau}{\pi_1}.

By the change-of-variables formula, with s=f−1(x)\bs = \mathbf f^{-1}(\bx) and J\mathbf J denoting a Jacobian matrix,

由变量替换公式,记 s=f−1(x)\bs = \mathbf f^{-1}(\bx),J\mathbf J 表示 Jacobian 矩阵,则

log⁡pτ(x)=∑i=1nlog⁡pτ(si)+log⁡∣det⁡Jf−1(x)∣.\log p_\tau(\bx) = \sum_{i=1}^n \log p_\tau(s_i) + \log\bigl|\det \mathbf J_{\mathbf f^{-1}}(\bx)\bigr|.

The Jacobian term is the same in every segment and cancels from the difference of log-densities, and so do the qi,0q_{i,0}; by (13.4),

Jacobian 项在各段中都相同,在对数密度之差中被消去,qi,0q_{i,0} 也一样;由 (13.4),

log⁡pτ(x)−log⁡p1(x)=∑i=1n(λi(τ)−λi(1)) qi(si)−∑i=1nlog⁡Zi(τ)Zi(1).\log p_\tau(\bx) - \log p_1(\bx) = \sum_{i=1}^n \bigl(\lambda_i(\tau) - \lambda_i(1)\bigr)\,q_i(s_i) - \sum_{i=1}^n \log\frac{Z_i(\tau)}{Z_i(1)}.

Stacking the equations for τ=2,…,K\tau = 2, \dots, K gives L q(s)=W~h(x)+b~\mathbf L\,\bq(\bs) = \tilde\bW\mathbf h(\bx) + \tilde{\mathbf b}, where W~\tilde\bW has rows (wτ−w1)⊤(\bw_\tau - \bw_1)^\top and b~\tilde{\mathbf b} collects the constants. Because L\mathbf L has full column rank, its pseudo-inverse satisfies L+L=I\mathbf L^+\mathbf L = \bI, and multiplying by L+\mathbf L^+ gives the claim with B=L+W~\bB = \mathbf L^+\tilde\bW and d=L+b~\mathbf d = \mathbf L^+\tilde{\mathbf b}. Finally, if B\bB were singular, some vector c≠0\mathbf c \neq \bzero would satisfy c⊤B=0⊤\mathbf c^\top\bB = \bzero^\top, and c⊤q(s)=c⊤d\mathbf c^\top\bq(\bs) = \mathbf c^\top\mathbf d would be almost surely constant within a segment. That is impossible: for an index ii with ci≠0c_i \neq 0, qi(si)q_i(s_i) would then almost surely equal a function of the other components, which are independent of it, and a random variable independent of itself is almost surely constant. Hence B\bB is invertible.

把 τ=2,…,K\tau = 2, \dots, K 的方程堆叠起来,得到 L q(s)=W~h(x)+b~\mathbf L\,\bq(\bs) = \tilde\bW\mathbf h(\bx) + \tilde{\mathbf b},其中 W~\tilde\bW 的各行为 (wτ−w1)⊤(\bw_\tau - \bw_1)^\top,b~\tilde{\mathbf b} 汇集了各常数项。由于 L\mathbf L 列满秩,其伪逆满足 L+L=I\mathbf L^+\mathbf L = \bI,左乘 L+\mathbf L^+ 即得结论,其中 B=L+W~\bB = \mathbf L^+\tilde\bW,d=L+b~\mathbf d = \mathbf L^+\tilde{\mathbf b}。最后,若 B\bB 奇异,则存在向量 c≠0\mathbf c \neq \bzero 使 c⊤B=0⊤\mathbf c^\top\bB = \bzero^\top,于是在一段之内 c⊤q(s)=c⊤d\mathbf c^\top\bq(\bs) = \mathbf c^\top\mathbf d 几乎必然为常数。这不可能:取 ci≠0c_i \neq 0 的下标 ii,则 qi(si)q_i(s_i) 几乎必然等于其余分量的某个函数,而其余分量与它独立;与自身独立的随机变量几乎必然为常数,矛盾。故 B\bB 可逆。

This is a slight generalization of Theorem 1 of Hyvärinen and Morioka (2016), with the same proof. The cancellation of the Jacobian is the heart of the matter: in the likelihood of a single segment, log⁡∣det⁡Jf−1∣\log|\det\mathbf J_{\mathbf f^{-1}}| is an unknown function that can absorb almost anything, but a ratio of two densities generated by the same mixing function does not contain it. The rank condition on L\mathbf L is a sufficient variability requirement: at least n+1n + 1 segments, with source distributions that change in sufficiently different ways (Exercise 13.4习题 13.4). It remains to undo B\bB. The qi(si)q_i(s_i) are independent within each segment, but generally not when the segments are pooled, because the pooled density is a mixture of product densities. The natural last step is therefore a linear method that uses the nonstationarity: within segment τ\tau the covariance matrix of h(x)\mathbf h(\bx) equals B−1\bB^{-1} times a diagonal matrix times B−⊤\bB^{-\top}, so joint diagonalization of the segment-wise covariance matrices recovers the qi(si)q_i(s_i) (Chapter 9第 9 章), provided no two of them have proportional variance profiles across segments. An ordinary ICA of the pooled features is exact only when the pooled qi(si)q_i(s_i) are independent and non-Gaussian. Note that qi(si)q_i(s_i) need not be an invertible function of sis_i: with qi(s)=−s2/2q_i(s) = -s^2/2 the sign of sis_i is lost.

这是 Hyvärinen 与 Morioka(2016)定理 1 的一个小推广,证明完全相同。Jacobian 被消去是问题的关键:在单独一段的似然中,log⁡∣det⁡Jf−1∣\log|\det\mathbf J_{\mathbf f^{-1}}| 是一个几乎什么都能吸收的未知函数,而由同一混合函数生成的两个密度之比根本不含这一项。关于 L\mathbf L 的秩条件是一种充分变化性要求:至少要有 n+1n + 1 段,而且各源分布的变化方式要足够不同(Exercise 13.4习题 13.4)。剩下的是去掉 B\bB。各 qi(si)q_i(s_i) 在每一段内相互独立,但把各段合并后一般并不独立,因为合并后的密度是若干乘积密度的混合。因此最后一步宜采用利用非平稳性的线性方法:在第 τ\tau 段内,h(x)\mathbf h(\bx) 的协方差矩阵等于 B−1\bB^{-1} 乘一个对角矩阵再乘 B−⊤\bB^{-\top},所以只要没有两个 qi(si)q_i(s_i) 的方差随段变化的轮廓成比例,对各段协方差矩阵做联合对角化就能恢复各 qi(si)q_i(s_i)(Chapter 9第 9 章)。只有当合并后的 qi(si)q_i(s_i) 相互独立且非高斯时,对合并数据做普通 ICA 才是精确的。注意 qi(si)q_i(s_i) 未必是 sis_i 的可逆函数:当 qi(s)=−s2/2q_i(s) = -s^2/2 时,sis_i 的符号就丢失了。

Permutation-contrastive learning置换对比学习

Permutation-contrastive learning (PCL; Hyvärinen & Morioka, 2017) assumes instead that the sources are stationary with temporal dependence. It discriminates pairs of consecutive observations (x(t),x(t−1))(\bx(t), \bx(t-1)) from pairs (x(t),x(t∗))(\bx(t), \bx(t^*)) with a randomly chosen time t∗t^*, which have the same marginals but no temporal dependence. Its regression function is a sum of terms BiB_i, each depending only on one learned feature hih_i at the two time points. Hyvärinen and Morioka proved that the learned hih_i recover the sources up to permutation and componentwise invertible transformations if f\mathbf f is a bijection that is twice differentiable with a twice differentiable inverse, the sources are mutually independent, stationary and ergodic processes, and each source is

置换对比学习(permutation-contrastive learning, PCL;Hyvärinen & Morioka, 2017)则假设源是平稳的、但在时间上相互依赖。它区分相邻时刻的观测对 (x(t),x(t−1))(\bx(t), \bx(t-1)) 与随机选取时刻 t∗t^* 构成的观测对 (x(t),x(t∗))(\bx(t), \bx(t^*));后者的边缘分布相同,但没有时间依赖。它的回归函数是若干项 BiB_i 之和,每一项只依赖于一个学到的特征 hih_i 在两个时刻的取值。Hyvärinen 与 Morioka 证明:若 f\mathbf f 是二阶可微且逆映射也二阶可微的双射,各源是相互独立的平稳遍历过程,并且每个源都满足下面两个条件,则学到的 hih_i 能在置换与逐分量可逆变换的意义下恢复源:

  • Uniformly dependent: writing p(a,b)p(a, b) for the joint density of si(t)s_i(t) and si(t−1)s_i(t-1), the cross-derivative ∂2log⁡p(a,b)/∂a ∂b\partial^2 \log p(a, b)/\partial a\,\partial b exists, is continuous and is nonzero everywhere.
  • Not quasi-Gaussian: this cross-derivative is not of the form c α(a) α(b)c\,\alpha(a)\,\alpha(b) for a constant cc and a function α\alpha.
  • 一致依赖:记 p(a,b)p(a, b) 为 si(t)s_i(t) 与 si(t−1)s_i(t-1) 的联合密度,交叉导数 ∂2log⁡p(a,b)/∂a ∂b\partial^2 \log p(a, b)/\partial a\,\partial b 存在、连续且处处非零。
  • 非拟高斯:这个交叉导数不能写成 c α(a) α(b)c\,\alpha(a)\,\alpha(b) 的形式,其中 cc 为常数,α\alpha 为某个函数。

A stationary Gaussian autoregressive process has a constant cross-derivative and is therefore quasi-Gaussian. For quasi-Gaussian sources PCL recovers only an invertible linear mixture of transformed sources, which a further linear step must unmix (Hyvärinen & Morioka, 2017).

平稳的高斯自回归过程的交叉导数是常数,因而是拟高斯的。对拟高斯的源,PCL 只能恢复变换后各源的一个可逆线性混合,还需要再做一步线性解混(Hyvärinen & Morioka, 2017)。

13.5 Auxiliary variables and generalized contrastive learning辅助变量与广义对比学习

TCL and PCL share a structure. In both, an observed variable, the segment label τ\tau in TCL and the past observation x(t−1)\bx(t-1) in PCL, changes the distribution of the sources without changing the mixing function. Hyvärinen, Sasaki and Turner (2019) made this the definition of the model: the sources are conditionally independent given an observed auxiliary variable u\bu,

TCL 与 PCL 有共同的结构。两者都有一个观测到的变量(TCL 中是段标号 τ\tau,PCL 中是前一时刻的观测 x(t−1)\bx(t-1)),它改变源的分布,却不改变混合函数。Hyvärinen、Sasaki 与 Turner(2019)把这一点直接作为模型的定义:给定一个观测到的辅助变量 u\bu,各源条件独立,

x=f(s),log⁡p(s∣u)=∑i=1nqi(si,u),(13.6)\bx = \mathbf f(\bs), \qquad \log p(\bs \mid \bu) = \sum_{i=1}^n q_i(s_i, \bu),\tag{13.6}

where f\mathbf f does not depend on u\bu. The auxiliary variable can be a time index or segment label, a past observation, a class label, a stimulus, or a simultaneously recorded second modality. The sources need not be marginally independent. Estimation is by generalized contrastive learning (GCL): a logistic regression discriminates true pairs (x,u)(\bx, \bu) from pairs (x,u∗)(\bx, \bu^*) in which u∗\bu^* is drawn independently of x\bx, for instance by shuffling the observed values of u\bu, using a regression function of the form

其中 f\mathbf f 与 u\bu 无关。辅助变量可以是时间标号或段标号、过去的观测、类别标签、刺激,或者同时记录的另一种模态。各源不必边缘独立。估计方法是广义对比学习(generalized contrastive learning, GCL):用逻辑回归区分真实的配对 (x,u)(\bx, \bu) 与配对 (x,u∗)(\bx, \bu^*),其中 u∗\bu^* 的抽取与 x\bx 独立(例如把观测到的 u\bu 值随机打乱),回归函数取如下形式:

r(x,u)=∑i=1nβi(hi(x),u).(13.7)r(\bx, \bu) = \sum_{i=1}^n \beta_i\bigl(h_i(\bx), \bu\bigr).\tag{13.7}

By the principle of Section 13.4第 13.4 节, the optimal regression function is

由Section 13.4第 13.4 节中的原理,最优的回归函数是

r∗(x,u)=log⁡p(x,u)p(x) p(u)=log⁡p(x∣u)−log⁡p(x).r^*(\bx, \bu) = \log\frac{p(\bx, \bu)}{p(\bx)\,p(\bu)} = \log p(\bx \mid \bu) - \log p(\bx).

To state the identifiability result, write qi′q_i' and qi′′q_i'' for the first and second derivatives of qi(si,u)q_i(s_i, \bu) with respect to sis_i, and collect their values at (si,u)(s_i, \bu) in a vector of length 2n2n:

为了陈述可辨识性结果,用 qi′q_i'、qi′′q_i'' 表示 qi(si,u)q_i(s_i, \bu) 关于 sis_i 的一阶与二阶导数,并把它们在 (si,u)(s_i, \bu) 处的值排成一个长度为 2n2n 的向量:

ω(s,u)=(q1′,…,qn′, q1′′,…,qn′′)⊤.\bomega(\bs, \bu) = \bigl(q_1', \dots, q_n',\ q_1'', \dots, q_n''\bigr)^\top.

Theorem 13.5 (identifiability with an auxiliary variable; Hyvärinen, Sasaki & Turner, 2019)定理 13.5(辅助变量下的可辨识性;Hyvärinen, Sasaki & Turner, 2019)

Assume that

假设

  1. the data follow (13.6), with f\mathbf f invertible and both f\mathbf f and f−1\mathbf f^{-1} twice continuously differentiable;
  2. each qi(si,u)q_i(s_i, \bu) is twice continuously differentiable in sis_i for every u\bu;
  3. (sufficient variability) for every s∈Rn\bs \in \R^n there are 2n+12n + 1 values u0,u1,…,u2n\bu_0, \bu_1, \dots, \bu_{2n} of the auxiliary variable such that the 2n2n vectors ω(s,uj)−ω(s,u0)\bomega(\bs, \bu_j) - \bomega(\bs, \bu_0), j=1,…,2nj = 1, \dots, 2n, are linearly independent;
  4. the logistic regression with regression function (13.7) attains its optimum in the limit of infinite data, where the βi\beta_i and h\mathbf h are flexible enough to represent it and h\mathbf h is constrained to be invertible and twice continuously differentiable with a twice continuously differentiable inverse.
  1. 数据服从 (13.6),其中 f\mathbf f 可逆,且 f\mathbf f 与 f−1\mathbf f^{-1} 均二阶连续可微;
  2. 对每个 u\bu,qi(si,u)q_i(s_i, \bu) 关于 sis_i 二阶连续可微;
  3. (充分变化性)对每个 s∈Rn\bs \in \R^n,存在辅助变量的 2n+12n + 1 个取值 u0,u1,…,u2n\bu_0, \bu_1, \dots, \bu_{2n},使 2n2n 个向量 ω(s,uj)−ω(s,u0)\bomega(\bs, \bu_j) - \bomega(\bs, \bu_0)(j=1,…,2nj = 1, \dots, 2n)线性无关;
  4. 回归函数为 (13.7) 的逻辑回归在无穷数据的极限下达到最优,其中 βi\beta_i 与 h\mathbf h 足够灵活,能够表示最优解,并且 h\mathbf h 被约束为可逆、二阶连续可微、逆映射也二阶连续可微。

Then there are a permutation π\pi and invertible scalar functions ϕ1,…,ϕn\phi_1, \dots, \phi_n such that hi(x)=ϕi(sπ(i))h_i(\bx) = \phi_i(s_{\pi(i)}) for every ii: the features separate the sources in the sense of Definition 13.1定义 13.1.

则存在置换 π\pi 与可逆标量函数 ϕ1,…,ϕn\phi_1, \dots, \phi_n,使得对每个 ii 都有 hi(x)=ϕi(sπ(i))h_i(\bx) = \phi_i(s_{\pi(i)}):这些特征按Definition 13.1定义 13.1的意义分离了源。

Proof.证明

Write y=h(x)\by = \mathbf h(\bx) and v=f−1∘h−1\bv = \mathbf f^{-1}\circ\mathbf h^{-1}, so that s=v(y)\bs = \bv(\by) and v\bv is a twice continuously differentiable bijection of Rn\R^n. By the change-of-variables formula, log⁡p(x∣u)\log p(\bx\mid\bu) and log⁡p(x)\log p(\bx) equal ∑iqi(si,u)\sum_i q_i(s_i, \bu) and log⁡ps(s)\log p_{\bs}(\bs), respectively, plus the same term log⁡∣det⁡Jf−1(x)∣\log|\det\mathbf J_{\mathbf f^{-1}}(\bx)|, where psp_{\bs} is the marginal density of the sources. This term cancels in the optimal regression function, so that, as functions of y\by and for every u\bu,

记 y=h(x)\by = \mathbf h(\bx),v=f−1∘h−1\bv = \mathbf f^{-1}\circ\mathbf h^{-1},于是 s=v(y)\bs = \bv(\by),且 v\bv 是 Rn\R^n 上二阶连续可微的双射。由变量替换公式,log⁡p(x∣u)\log p(\bx\mid\bu) 与 log⁡p(x)\log p(\bx) 分别等于 ∑iqi(si,u)\sum_i q_i(s_i, \bu) 与 log⁡ps(s)\log p_{\bs}(\bs) 再加上同一项 log⁡∣det⁡Jf−1(x)∣\log|\det\mathbf J_{\mathbf f^{-1}}(\bx)|,其中 psp_{\bs} 是源的边缘密度。这一项在最优回归函数中相互抵消,因此作为 y\by 的函数,对每个 u\bu 都有

∑i=1nβi(yi,u)=∑i=1nqi(vi(y),u)−log⁡ps(v(y)).\sum_{i=1}^n \beta_i(y_i, \bu) = \sum_{i=1}^n q_i\bigl(v_i(\by), \bu\bigr) - \log p_{\bs}\bigl(\bv(\by)\bigr).

Subtract this identity at a second value u0\bu_0, and write Δ\Delta for the difference between the values at u\bu and at u0\bu_0. The last term cancels, and

用另一个取值 u0\bu_0 处的恒等式去减它,并用 Δ\Delta 表示在 u\bu 处与在 u0\bu_0 处的取值之差。最后一项被消去,得到

∑i=1nΔβi(yi)=∑i=1nΔqi(vi(y)).\sum_{i=1}^n \Delta\beta_i(y_i) = \sum_{i=1}^n \Delta q_i\bigl(v_i(\by)\bigr).

By assumptions 1, 2 and 4, the right side is twice continuously differentiable in y\by. The left side is a sum of functions of one coordinate each; since it is differentiable, so is each term, and its partial derivative with respect to yjy_j depends on yjy_j alone. Hence its mixed partial derivatives with respect to yjy_j and yj′y_{j'}, j≠j′j \neq j', vanish, and so do those of the right side. Computing the latter with the chain rule, and writing ∂j\partial_j for ∂/∂yj\partial/\partial y_j and c∈R2n\mathbf c \in \R^{2n} for the vector with entries ci=∂j∂j′vic_i = \partial_j\partial_{j'}v_i and cn+i=∂jvi ∂j′vic_{n+i} = \partial_j v_i\,\partial_{j'} v_i, gives

由假设 1、2、4,右边关于 y\by 二阶连续可微。左边是若干单坐标函数之和;既然它可微,每一项也可微,而且它对 yjy_j 的偏导数只依赖于 yjy_j。因此它对 yjy_j 与 yj′y_{j'}(j≠j′j \neq j')的混合偏导数为零,右边的混合偏导数也就为零。用链式法则计算右边的混合偏导数,记 ∂j\partial_j 为 ∂/∂yj\partial/\partial y_j,并记 c∈R2n\mathbf c \in \R^{2n} 为分量是 ci=∂j∂j′vic_i = \partial_j\partial_{j'}v_i 与 cn+i=∂jvi ∂j′vic_{n+i} = \partial_j v_i\,\partial_{j'} v_i 的向量,得到

(ω(s,u)−ω(s,u0))⊤c=0,s=v(y).\bigl(\bomega(\bs, \bu) - \bomega(\bs, \bu_0)\bigr)^\top \mathbf c = 0, \qquad \bs = \bv(\by).

This holds for every y\by and every pair u\bu, u0\bu_0; no smoothness of psp_{\bs} or of the βi\beta_i was needed. Fix y\by, let s=v(y)\bs = \bv(\by), and take the values u0,…,u2n\bu_0, \dots, \bu_{2n} of assumption 3 for this s\bs. With u=u1,…,u2n\bu = \bu_1, \dots, \bu_{2n} the identity says that c\mathbf c is orthogonal to 2n2n linearly independent vectors, so c=0\mathbf c = \bzero. In particular ∂jvi ∂j′vi=0\partial_j v_i\,\partial_{j'} v_i = 0 for all ii and all j≠j′j \neq j': each row of the Jacobian matrix Jv(y)\mathbf J_{\bv}(\by) has at most one nonzero entry. As Jv(y)\mathbf J_{\bv}(\by) is invertible, it has exactly one nonzero entry in each row and each column, and by continuity the position of these entries is the same for every y\by (Exercise 13.6习题 13.6). Hence each si=vi(y)s_i = v_i(\by) is a strictly monotonic function of a single coordinate yσ(i)y_{\sigma(i)}, for a permutation σ\sigma; inverting, hj(x)=yjh_j(\bx) = y_j is an invertible function of the single source sσ−1(j)s_{\sigma^{-1}(j)}, which is the claim with π=σ−1\pi = \sigma^{-1}.

这对每个 y\by 以及每一对 u\bu、u0\bu_0 都成立;整个推导不需要 psp_{\bs} 或 βi\beta_i 的任何光滑性。固定 y\by,令 s=v(y)\bs = \bv(\by),并对这个 s\bs 取假设 3 中的 u0,…,u2n\bu_0, \dots, \bu_{2n}。令 u=u1,…,u2n\bu = \bu_1, \dots, \bu_{2n},上式说明 c\mathbf c 与 2n2n 个线性无关的向量都正交,所以 c=0\mathbf c = \bzero。特别地,对所有 ii 与所有 j≠j′j \neq j' 有 ∂jvi ∂j′vi=0\partial_j v_i\,\partial_{j'} v_i = 0:Jacobian 矩阵 Jv(y)\mathbf J_{\bv}(\by) 的每一行至多有一个非零元。由于 Jv(y)\mathbf J_{\bv}(\by) 可逆,它每行每列恰有一个非零元,而且由连续性,这些非零元的位置对所有 y\by 都相同(Exercise 13.6习题 13.6)。因此存在置换 σ\sigma,使每个 si=vi(y)s_i = v_i(\by) 都是单个坐标 yσ(i)y_{\sigma(i)} 的严格单调函数;反过来,hj(x)=yjh_j(\bx) = y_j 是单个源 sσ−1(j)s_{\sigma^{-1}(j)} 的可逆函数,取 π=σ−1\pi = \sigma^{-1} 即为所证。

The theorem places no restriction on f\mathbf f. Its price is assumption 3: at every point, u\bu must act on the source distributions in at least 2n2n sufficiently different ways. This fails when each conditional log-density is an exponential family with a single sufficient statistic, as in (13.4) with λi(τ)\lambda_i(\tau) replaced by λi(u)\lambda_i(\bu): every difference ω(s,uk)−ω(s,u0)\bomega(\bs, \bu_k) - \bomega(\bs, \bu_0) is then a combination of the same nn vectors (Hyvärinen, Sasaki & Turner, 2019; Exercise 13.5习题 13.5). This is the situation of TCL, which is why Proposition 13.4命题 13.4 identified the sufficient statistics only up to a linear transformation. With two or more sufficient statistics per source, modulated in sufficiently independent ways, the assumption holds except in degenerate cases. TCL and PCL are special cases of GCL with u=τ\bu = \tau and u=x(t−1)\bu = \bx(t-1).

这个定理对 f\mathbf f 没有任何限制,代价是假设 3:在每一点,u\bu 都必须以至少 2n2n 种足够不同的方式作用于源的分布。若每个条件对数密度都是只有一个充分统计量的指数族,即把 (13.4) 中的 λi(τ)\lambda_i(\tau) 换成 λi(u)\lambda_i(\bu),这一点就不成立:此时每个差向量 ω(s,uk)−ω(s,u0)\bomega(\bs, \bu_k) - \bomega(\bs, \bu_0) 都是同样 nn 个向量的线性组合(Hyvärinen, Sasaki & Turner, 2019;Exercise 13.5习题 13.5)。这正是 TCL 的情形,也解释了为什么Proposition 13.4命题 13.4只能在线性变换的意义下辨识充分统计量。若每个源有两个或更多充分统计量,且它们以足够独立的方式被调制,则除退化情形外该假设都成立。TCL 与 PCL 是 GCL 在 u=τ\bu = \tau 与 u=x(t−1)\bu = \bx(t-1) 时的特例。

13.6 Identifiable variational autoencoders可辨识的变分自编码器

Contrastive methods learn the demixing h\mathbf h but neither the mixing function nor the source densities, and they assume noiseless data. Khemakhem, Kingma, Monti and Hyvärinen (2020) placed the auxiliary-variable model inside a latent-variable model that can be fitted by maximum likelihood. In the identifiable VAE (iVAE), the observation is a noisy function of the sources, x=f(s)+ε\bx = \mathbf f(\bs) + \bepsilon, where x∈Rd\bx \in \R^d with d≥nd \ge n, f\mathbf f is injective and the noise ε\bepsilon is independent of s\bs. Given u\bu, the sources are independent with exponential-family densities

对比学习方法学到的是解混函数 h\mathbf h,既不学混合函数,也不学源的密度,而且假设数据没有噪声。Khemakhem、Kingma、Monti 与 Hyvärinen(2020)把辅助变量模型放进一个可以用最大似然拟合的隐变量模型中。在可辨识变分自编码器(identifiable VAE, iVAE)中,观测是源的带噪函数 x=f(s)+ε\bx = \mathbf f(\bs) + \bepsilon,其中 x∈Rd\bx \in \R^d,d≥nd \ge n,f\mathbf f 是单射,噪声 ε\bepsilon 与 s\bs 独立。给定 u\bu,各源相互独立,且服从指数族密度

p(s∣u)=∏i=1nQi(si)Zi(u)exp⁡[∑j=1kTi,j(si) λi,j(u)].(13.8)p(\bs \mid \bu) = \prod_{i=1}^n \frac{Q_i(s_i)}{Z_i(\bu)}\exp\Bigl[\sum_{j=1}^k T_{i,j}(s_i)\,\lambda_{i,j}(\bu)\Bigr].\tag{13.8}

Here QiQ_i is a base measure, Zi(u)Z_i(\bu) a normalizing constant, the Ti,jT_{i,j} are sufficient statistics and the λi,j(u)\lambda_{i,j}(\bu) their natural parameters; stack them as T(s)∈Rnk\bT(\bs) \in \R^{nk} and λ(u)∈Rnk\boldsymbol\lambda(\bu) \in \R^{nk}. Sources that are Gaussian given u\bu, with means and variances that depend on u\bu, are the case k=2k = 2 with Ti,1(s)=sT_{i,1}(s) = s and Ti,2(s)=s2T_{i,2}(s) = s^2.

其中 QiQ_i 是基测度,Zi(u)Z_i(\bu) 是归一化常数,Ti,jT_{i,j} 是充分统计量,λi,j(u)\lambda_{i,j}(\bu) 是相应的自然参数;把它们分别排成 T(s)∈Rnk\bT(\bs) \in \R^{nk} 与 λ(u)∈Rnk\boldsymbol\lambda(\bu) \in \R^{nk}。给定 u\bu 时为高斯分布、均值与方差都随 u\bu 变化的源,对应于 k=2k = 2,Ti,1(s)=sT_{i,1}(s) = s,Ti,2(s)=s2T_{i,2}(s) = s^2。

Theorem 13.6 (Khemakhem et al., 2020)定理 13.6(Khemakhem et al., 2020)

Let two parameter values (f,T,λ)(\mathbf f, \bT, \boldsymbol\lambda) and (f~,T~,λ~)(\tilde{\mathbf f}, \tilde\bT, \tilde{\boldsymbol\lambda}) of this model give the same conditional distribution of x\bx given u\bu, for every u\bu. Assume that

设该模型的两组参数 (f,T,λ)(\mathbf f, \bT, \boldsymbol\lambda) 与 (f~,T~,λ~)(\tilde{\mathbf f}, \tilde\bT, \tilde{\boldsymbol\lambda}) 对每个 u\bu 都给出相同的条件分布 p(x∣u)p(\bx \mid \bu)。假设

  1. the set of points where the characteristic function of the noise density vanishes has measure zero;
  2. f\mathbf f is injective;
  3. each Ti,jT_{i,j} is differentiable almost everywhere, and for each ii the functions Ti,1,…,Ti,kT_{i,1}, \dots, T_{i,k} are linearly independent on every set of positive measure;
  4. (sufficient variability) there are nk+1nk + 1 values u0,…,unk\bu^0, \dots, \bu^{nk} of the auxiliary variable such that the nk×nknk \times nk matrix L\mathbf L with columns λ(ul)−λ(u0)\boldsymbol\lambda(\bu^l) - \boldsymbol\lambda(\bu^0), l=1,…,nkl = 1, \dots, nk, is invertible.
  1. 噪声密度的特征函数取零值的点集测度为零;
  2. f\mathbf f 是单射;
  3. 每个 Ti,jT_{i,j} 几乎处处可微,且对每个 ii,函数 Ti,1,…,Ti,kT_{i,1}, \dots, T_{i,k} 在任何正测度集上线性无关;
  4. (充分变化性)存在辅助变量的 nk+1nk + 1 个取值 u0,…,unk\bu^0, \dots, \bu^{nk},使以 λ(ul)−λ(u0)\boldsymbol\lambda(\bu^l) - \boldsymbol\lambda(\bu^0)(l=1,…,nkl = 1, \dots, nk)为列的 nk×nknk \times nk 矩阵 L\mathbf L 可逆。

Then there are an invertible nk×nknk \times nk matrix M\bM and a vector c\mathbf c such that, for all x\bx in the image of f\mathbf f,

则存在可逆的 nk×nknk \times nk 矩阵 M\bM 与向量 c\mathbf c,使得对 f\mathbf f 值域中的所有 x\bx 都有

T(f−1(x))=M T~(f~−1(x))+c.\bT\bigl(\mathbf f^{-1}(\bx)\bigr) = \bM\,\tilde\bT\bigl(\tilde{\mathbf f}^{-1}(\bx)\bigr) + \mathbf c.

We omit the proof. Its core is the argument of Proposition 13.4命题 13.4, applied after the noise has been removed by deconvolution, which assumption 1 permits: subtracting the log-densities at u0\bu^0 cancels the Jacobians and the base measures, and L\mathbf L is inverted. The same paper shows that M\bM is a block permutation matrix if k≥2k \ge 2, the Ti,jT_{i,j} are twice differentiable and f\mathbf f has all second-order cross-derivatives, and a scaled permutation if k=1k = 1, the Ti,1T_{i,1} are not monotonic and the partial derivatives of f\mathbf f are continuous. The sufficient statistics of each estimated source are then an affine function of those of a single true source, which for injective Ti=(Ti,1,…,Ti,k)\bT_i = (T_{i,1}, \dots, T_{i,k}) is separation in the sense of Definition 13.1定义 13.1. The extra conditions matter. With k=1k = 1, Ti,1(s)=sT_{i,1}(s) = s and Gaussian base measures, the sources given u\bu are N(λ(u),I)\Ncal(\boldsymbol\lambda(\bu), \bI), and Qs\bQ\bs is of the same form for every orthogonal Q\bQ, with means Qλ(u)\bQ\boldsymbol\lambda(\bu): the sources are identified only up to a rotation.

这里略去证明。其核心就是Proposition 13.4命题 13.4的论证,只是先要借助假设 1 用反卷积去掉噪声:减去 u0\bu^0 处的对数密度,消去 Jacobian 与基测度,再对 L\mathbf L 求逆。同一篇论文还证明:若 k≥2k \ge 2,Ti,jT_{i,j} 二阶可微,且 f\mathbf f 的所有二阶交叉偏导数存在,则 M\bM 是分块置换矩阵;若 k=1k = 1,Ti,1T_{i,1} 不单调,且 f\mathbf f 的各偏导数连续,则 M\bM 是带尺度的置换矩阵。此时每个估计源的充分统计量都是某一个真实源的充分统计量的仿射函数;当 Ti=(Ti,1,…,Ti,k)\bT_i = (T_{i,1}, \dots, T_{i,k}) 为单射时,这就是Definition 13.1定义 13.1意义下的分离。这些附加条件并非可有可无。取 k=1k = 1,Ti,1(s)=sT_{i,1}(s) = s,基测度为高斯,则给定 u\bu 时源服从 N(λ(u),I)\Ncal(\boldsymbol\lambda(\bu), \bI);对任何正交矩阵 Q\bQ,Qs\bQ\bs 也具有同样的形式,均值为 Qλ(u)\bQ\boldsymbol\lambda(\bu):源只能辨识到一个旋转。

The iVAE fits the model as a variational autoencoder (Kingma & Welling, 2014). A decoder represents pf(x∣s)=pε(x−f(s))p_{\mathbf f}(\bx\mid\bs) = p_{\bepsilon}(\bx - \mathbf f(\bs)), the prior is (13.8) with λ(u)\boldsymbol\lambda(\bu) computed by a neural network, and an encoder qϕ(s∣x,u)q_\phi(\bs\mid\bx, \bu) approximates the posterior. Training maximizes the evidence lower bound

iVAE 以变分自编码器(Kingma & Welling, 2014)的形式拟合这个模型。解码器表示 pf(x∣s)=pε(x−f(s))p_{\mathbf f}(\bx\mid\bs) = p_{\bepsilon}(\bx - \mathbf f(\bs)),先验为 (13.8),其中 λ(u)\boldsymbol\lambda(\bu) 由神经网络计算,编码器 qϕ(s∣x,u)q_\phi(\bs\mid\bx, \bu) 近似后验。训练时最大化证据下界

log⁡p(x∣u) ≥ Eqϕ(s∣x,u)[log⁡pf(x∣s)+log⁡p(s∣u)−log⁡qϕ(s∣x,u)],\log p(\bx \mid \bu) \ \ge\ \E_{q_\phi(\bs\mid\bx,\bu)}\bigl[\log p_{\mathbf f}(\bx \mid \bs) + \log p(\bs \mid \bu) - \log q_\phi(\bs \mid \bx, \bu)\bigr],

whose gap is the KL divergence from qϕ(s∣x,u)q_\phi(\bs \mid \bx, \bu) to the true posterior. If the encoder family contains the true posterior, maximizing the bound with infinite data recovers the parameters up to the equivalence of Theorem 13.6定理 13.6 (Khemakhem et al., 2020). An ordinary VAE, by contrast, has the unconditional prior N(0,I)\Ncal(\bzero, \bI), which rotations and measure-preserving maps such as m\mathbf m of Figure 13.2图 13.2 leave invariant. Composing the decoder with such a map leaves the likelihood unchanged, so an ordinary VAE cannot be identifiable; a prior that changes with u\bu breaks the symmetry.

两者之差就是 qϕ(s∣x,u)q_\phi(\bs \mid \bx, \bu) 相对真实后验的 KL 散度。若编码器族包含真实后验,则在无穷数据下最大化这个下界,能在Theorem 13.6定理 13.6的等价意义下恢复参数(Khemakhem et al., 2020)。相比之下,普通 VAE 的先验是与条件无关的 N(0,I)\Ncal(\bzero, \bI),旋转以及像Figure 13.2图 13.2 中 m\mathbf m 那样的保测映射都使它保持不变。把解码器与这样的映射复合,似然不变,所以普通 VAE 不可能可辨识;而随 u\bu 变化的先验打破了这种对称性。

13.7 Disentanglement and its limits解耦表示及其局限

Deep representation learning often aims for disentangled representations, in which each coordinate captures one independent factor of variation, such as pose, lighting or identity in images of faces. If the factors are independent and the data are a deterministic invertible function of them, this is exactly nonlinear ICA, and the results of this chapter apply. Locatello et al. (2019) proved that for every factorized density on Rd\R^d with d>1d > 1 there is an infinite family of bijections m\mathbf m such that m(s)\mathbf m(\bs) has the distribution of s\bs and every partial derivative ∂mi/∂sj\partial m_i/\partial s_j is nonzero almost everywhere: maps like the spiral of Figure 13.2图 13.2, which entangle every output with every factor while leaving the distribution unchanged. They concluded that unsupervised learning of disentangled representations is impossible without inductive biases on both the models and the data. A large experimental study in the same paper, with more than 12,000 trained models on seven data sets, found that well-disentangled models could not be identified reliably without supervision, and that results depended substantially on random seeds and hyperparameters.

深度表示学习常常追求解耦的表示,即每个坐标只刻画一个独立的变化因素,例如人脸图像中的姿态、光照或身份。如果各因素相互独立,而数据是它们的确定性可逆函数,这就恰好是非线性 ICA,本章的结论都适用。Locatello 等(2019)证明:对 Rd\R^d(d>1d > 1)上任何可分解的密度,都存在无穷多个双射 m\mathbf m,使 m(s)\mathbf m(\bs) 与 s\bs 同分布,且每个偏导数 ∂mi/∂sj\partial m_i/\partial s_j 几乎处处非零。这正是Figure 13.2图 13.2 中螺旋那样的映射:它让每个输出与每个因素都纠缠在一起,分布却保持不变。他们由此得出结论:若对模型和数据都没有归纳偏置,无监督地学习解耦表示是不可能的。同一篇论文中的大规模实验训练了 12,000 多个模型、涉及七个数据集,发现没有监督就无法可靠地挑出解耦良好的模型,而且结果在相当程度上取决于随机种子与超参数。

Nonlinear ICA theory says which inductive biases suffice: an observed auxiliary variable that modulates the sources (TCL, PCL, GCL, iVAE), or a restricted class of mixing functions (post-nonlinear, conformal). The guarantees have limits. They are asymptotic, assuming infinite data, flexible enough function classes and a global optimum; assumptions such as conditional independence given u\bu or sufficient variability can rarely be verified from data; and the sources are recovered only up to permutation and componentwise invertible transformations, so their scale, units and sometimes their sign are lost. Hyvärinen, Khemakhem and Morioka (2023) review the field and its connections to self-supervised learning.

非线性 ICA 理论回答了哪些归纳偏置是足够的:一个调制源分布的观测辅助变量(TCL、PCL、GCL、iVAE),或者一个受限的混合函数类(后非线性或共形映射)。这些保证都有局限。它们是渐近结论,假设数据无穷多、函数类足够灵活、优化达到全局最优;给定 u\bu 的条件独立、充分变化性之类的假设,很少能从数据中检验;而且源只能在置换与逐分量可逆变换的意义下恢复,其尺度、单位乃至符号都可能丢失。Hyvärinen、Khemakhem 与 Morioka(2023)综述了这一领域及其与自监督学习的联系。

Key points

本章要点

  • Nonlinear ICA models x=f(s)\bx = \mathbf f(\bs) with an invertible f\mathbf f. At best the sources are recovered up to permutation and componentwise invertible transformations, so the shape of their marginal distributions carries no information.
  • Without further assumptions the problem is not identifiable: the Darmois construction makes any random vector independent, and measure-preserving maps of N(0,I)\Ncal(\bzero, \bI) yield a continuum of spurious solutions for sources with continuous, strictly increasing CDFs, smooth ones when the source densities are smooth and positive.
  • Restricting the mixing function, as in post-nonlinear mixtures, restores identifiability at the cost of generality.
  • An observed auxiliary variable that modulates the source distributions makes a log-density ratio free of the unknown Jacobian; contrastive learning then recovers the sources under a sufficient-variability condition (TCL, PCL, GCL).
  • The iVAE gives comparable guarantees within a likelihood framework with noise; a VAE with an unconditional Gaussian prior is not identifiable.
  • The impossibility result for unsupervised disentanglement is the same non-identifiability; auxiliary variables and restricted mixing functions are inductive biases that resolve it.
  • 非线性 ICA 的模型是 x=f(s)\bx = \mathbf f(\bs),其中 f\mathbf f 可逆。最好的结果也只是在置换与逐分量可逆变换的意义下恢复源,因此源的边缘分布形状不携带任何信息。
  • 不加其他假设时问题不可辨识:Darmois 构造能把任何随机向量变得独立,N(0,I)\Ncal(\bzero, \bI) 的保测映射对 CDF 连续且严格递增的源都能给出一整族伪解;当源密度光滑且为正时,这些伪解也是光滑的。
  • 限制混合函数(例如后非线性混合)可以恢复可辨识性,代价是失去一般性。
  • 若有一个调制源分布的观测辅助变量,对数密度比就不再含未知的 Jacobian;在充分变化性条件下,对比学习能够恢复源(TCL、PCL、GCL)。
  • iVAE 在带噪声的似然框架中给出类似的保证;先验为与条件无关的高斯分布的 VAE 不可辨识。
  • 无监督解耦表示学习的不可能性结论,本质上就是同一种不可辨识性;辅助变量与受限的混合函数都是能消除它的归纳偏置。

13.8 Exercises习题

Exercise 13.1习题 13.1 basic基础

Let s1,…,sns_1, \dots, s_n be independent, π\pi a permutation and h1,…,hnh_1, \dots, h_n invertible scalar functions. (a) Show that s~i=hi(sπ(i))\tilde s_i = h_i(s_{\pi(i)}), i=1,…,ni = 1, \dots, n, are independent. (b) Let ss have a CDF FF that is continuous and strictly increasing on an open interval carrying all its probability. Show that Φ−1(F(s))∼N(0,1)\Phi^{-1}(F(s)) \sim \Ncal(0,1). What does this imply for the role of non-Gaussianity in nonlinear ICA?

设 s1,…,sns_1, \dots, s_n 相互独立,π\pi 是一个置换,h1,…,hnh_1, \dots, h_n 是可逆标量函数。(a) 证明 s~i=hi(sπ(i))\tilde s_i = h_i(s_{\pi(i)})(i=1,…,ni = 1, \dots, n)相互独立。(b) 设 ss 的 CDF FF 在某个承载其全部概率的开区间上连续且严格递增,证明 Φ−1(F(s))∼N(0,1)\Phi^{-1}(F(s)) \sim \Ncal(0,1)。这对非高斯性在非线性 ICA 中的作用意味着什么?

Show solution查看解答

(a) For any sets B1,…,BnB_1, \dots, B_n, the event {s~i∈Bi}\{\tilde s_i \in B_i\} equals {sπ(i)∈hi−1(Bi)}\{s_{\pi(i)} \in h_i^{-1}(B_i)\}. Since π\pi is a permutation, these nn events concern nn different sources, so by independence

(a) 对任意集合 B1,…,BnB_1, \dots, B_n,事件 {s~i∈Bi}\{\tilde s_i \in B_i\} 等于 {sπ(i)∈hi−1(Bi)}\{s_{\pi(i)} \in h_i^{-1}(B_i)\}。由于 π\pi 是置换,这 nn 个事件涉及 nn 个不同的源,由独立性得

P(⋂i=1n{s~i∈Bi})=∏i=1nP(sπ(i)∈hi−1(Bi))=∏i=1nP(s~i∈Bi).P\Bigl(\bigcap_{i=1}^n \{\tilde s_i \in B_i\}\Bigr) = \prod_{i=1}^n P\bigl(s_{\pi(i)} \in h_i^{-1}(B_i)\bigr) = \prod_{i=1}^n P(\tilde s_i \in B_i).

(b) Let F−1F^{-1} be the inverse of FF on its interval. For c∈(0,1)c \in (0,1) and t∈Rt \in \R,

(b) 记 F−1F^{-1} 为 FF 在其区间上的反函数。对 c∈(0,1)c \in (0,1) 与 t∈Rt \in \R,

P(F(s)≤c)=P(s≤F−1(c))=F(F−1(c))=c,P(Φ−1(F(s))≤t)=P(F(s)≤Φ(t))=Φ(t),\begin{aligned} P\bigl(F(s) \le c\bigr) &= P\bigl(s \le F^{-1}(c)\bigr) = F\bigl(F^{-1}(c)\bigr) = c, \\ P\bigl(\Phi^{-1}(F(s)) \le t\bigr) &= P\bigl(F(s) \le \Phi(t)\bigr) = \Phi(t), \end{aligned}

so F(s)F(s) is uniform on (0,1)(0,1) and Φ−1(F(s))\Phi^{-1}(F(s)) is standard Gaussian. Combining (a) and (b), any model (13.1) with such sources can be rewritten, with the mixing function f∘h−1\mathbf f \circ \mathbf h^{-1}, as a model with independent standard Gaussian sources. The shape of the marginals therefore says nothing about which directions are the sources; in contrast to linear ICA, non-Gaussianity cannot be what identifies them, and the information must come from restrictions on f\mathbf f or from additional structure such as an auxiliary variable.

所以 F(s)F(s) 在 (0,1)(0,1) 上均匀分布,Φ−1(F(s))\Phi^{-1}(F(s)) 服从标准高斯分布。结合 (a) 与 (b),任何具有这类源的模型 (13.1) 都可以改写为混合函数为 f∘h−1\mathbf f \circ \mathbf h^{-1}、源为独立标准高斯变量的模型。因此边缘分布的形状完全不能说明哪些方向是源;与线性 ICA 不同,非高斯性不可能用来辨识源,所需的信息只能来自对 f\mathbf f 的限制,或者来自辅助变量之类的额外结构。

Exercise 13.2习题 13.2 intermediate进阶

(a) Let x=(x1,x2)⊤\bx = (x_1, x_2)^\top be Gaussian with zero mean, unit variances and correlation ρ\rho, ∣ρ∣<1|\rho| < 1. Compute the Darmois construction (13.2) explicitly and verify directly that y1y_1 and y2y_2 are independent. (b) For a zero-mean Gaussian x∈Rn\bx \in \R^n with nonsingular covariance Cx=LL⊤\bC_{\bx} = \mathbf{L}\mathbf{L}^\top, L\mathbf{L} lower triangular with positive diagonal (Cholesky factor), show that the construction gives yk=Φ(zk)y_k = \Phi(z_k) with z=L−1x\bz = \mathbf{L}^{-1}\bx. (c) Let x=As\bx = \bA\bs with s∼N(0,I)\bs \sim \Ncal(\bzero, \bI) and A\bA invertible. When is each yky_k a function of a single source?

(a) 设 x=(x1,x2)⊤\bx = (x_1, x_2)^\top 是零均值、单位方差、相关系数为 ρ\rho(∣ρ∣<1|\rho| < 1)的高斯向量。显式写出 Darmois 构造 (13.2),并直接验证 y1y_1 与 y2y_2 独立。(b) 设 x∈Rn\bx \in \R^n 是零均值高斯向量,协方差 Cx=LL⊤\bC_{\bx} = \mathbf{L}\mathbf{L}^\top 非奇异,其中 L\mathbf{L} 是对角元为正的下三角矩阵(Cholesky 因子)。证明该构造给出 yk=Φ(zk)y_k = \Phi(z_k),其中 z=L−1x\bz = \mathbf{L}^{-1}\bx。(c) 设 x=As\bx = \bA\bs,s∼N(0,I)\bs \sim \Ncal(\bzero, \bI),A\bA 可逆。什么时候每个 yky_k 都只是单个源的函数?

Show solution查看解答

(a) x1∼N(0,1)x_1 \sim \Ncal(0,1), so y1=Φ(x1)y_1 = \Phi(x_1). Given x1x_1, x2∼N(ρx1,1−ρ2)x_2 \sim \Ncal(\rho x_1, 1 - \rho^2), so y2=Φ(z2)y_2 = \Phi(z_2) with z2=(x2−ρx1)/1−ρ2z_2 = (x_2 - \rho x_1)/\sqrt{1-\rho^2}. The variables z1=x1z_1 = x_1 and z2z_2 are jointly Gaussian with unit variances, and Cov⁡(x1,x2−ρx1)=ρ−ρ=0\Cov(x_1, x_2 - \rho x_1) = \rho - \rho = 0, so they are independent; y1=Φ(z1)y_1 = \Phi(z_1) and y2=Φ(z2)y_2 = \Phi(z_2) are functions of one each. (b) Since x=Lz\bx = \mathbf{L}\bz with L\mathbf{L} lower triangular, xk=∑j<kLkjzj+Lkkzkx_k = \sum_{j < k} L_{kj} z_j + L_{kk} z_k, where z1,…,zk−1z_1, \dots, z_{k-1} are functions of x1,…,xk−1x_1, \dots, x_{k-1} (and conversely), and zkz_k is independent of them because z∼N(0,I)\bz \sim \Ncal(\bzero, \bI). Hence, given x1,…,xk−1x_1, \dots, x_{k-1}, xkx_k is Gaussian with mean mk=∑j<kLkjzjm_k = \sum_{j<k} L_{kj}z_j and standard deviation LkkL_{kk}, and its conditional CDF evaluated at xkx_k is Φ((xk−mk)/Lkk)=Φ(zk)\Phi\bigl((x_k - m_k)/L_{kk}\bigr) = \Phi(z_k). Part (a) is the case L=(10ρ1−ρ2)\mathbf{L} = \bigl(\begin{smallmatrix} 1 & 0 \\ \rho & \sqrt{1-\rho^2}\end{smallmatrix}\bigr). (c) Now Cx=AA⊤=LL⊤\bC_{\bx} = \bA\bA^\top = \mathbf{L}\mathbf{L}^\top and z=L−1As=Qs\bz = \mathbf{L}^{-1}\bA\bs = \bQ\bs, where Q=L−1A\bQ = \mathbf{L}^{-1}\bA is orthogonal because QQ⊤=L−1AA⊤L−⊤=I\bQ\bQ^\top = \mathbf{L}^{-1}\bA\bA^\top\mathbf{L}^{-\top} = \bI. Each yk=Φ(zk)y_k = \Phi(z_k) is a function of a single source exactly when every row of Q\bQ has a single nonzero entry, that is, when Q\bQ is a signed permutation, or equivalently when A=LQ\bA = \mathbf{L}\bQ is lower triangular up to permuting and changing the signs of its columns. For a generic A\bA this fails: the construction returns independent outputs that are a rotation of the sources, which is precisely the Gaussian ambiguity of Section 1.4第 1.4 节.

(a) x1∼N(0,1)x_1 \sim \Ncal(0,1),所以 y1=Φ(x1)y_1 = \Phi(x_1)。给定 x1x_1,x2∼N(ρx1,1−ρ2)x_2 \sim \Ncal(\rho x_1, 1 - \rho^2),所以 y2=Φ(z2)y_2 = \Phi(z_2),其中 z2=(x2−ρx1)/1−ρ2z_2 = (x_2 - \rho x_1)/\sqrt{1-\rho^2}。变量 z1=x1z_1 = x_1 与 z2z_2 联合高斯、方差均为 1,且 Cov⁡(x1,x2−ρx1)=ρ−ρ=0\Cov(x_1, x_2 - \rho x_1) = \rho - \rho = 0,因此相互独立;而 y1=Φ(z1)y_1 = \Phi(z_1)、y2=Φ(z2)y_2 = \Phi(z_2) 各自只是其中一个的函数。(b) 由于 x=Lz\bx = \mathbf{L}\bz 且 L\mathbf{L} 为下三角,xk=∑j<kLkjzj+Lkkzkx_k = \sum_{j < k} L_{kj} z_j + L_{kk} z_k,其中 z1,…,zk−1z_1, \dots, z_{k-1} 是 x1,…,xk−1x_1, \dots, x_{k-1} 的函数(反之亦然),而由于 z∼N(0,I)\bz \sim \Ncal(\bzero, \bI),zkz_k 与它们独立。因此给定 x1,…,xk−1x_1, \dots, x_{k-1},xkx_k 服从均值为 mk=∑j<kLkjzjm_k = \sum_{j<k} L_{kj}z_j、标准差为 LkkL_{kk} 的高斯分布,它的条件 CDF 在 xkx_k 处的值为 Φ((xk−mk)/Lkk)=Φ(zk)\Phi\bigl((x_k - m_k)/L_{kk}\bigr) = \Phi(z_k)。(a) 正是 L=(10ρ1−ρ2)\mathbf{L} = \bigl(\begin{smallmatrix} 1 & 0 \\ \rho & \sqrt{1-\rho^2}\end{smallmatrix}\bigr) 的情形。(c) 此时 Cx=AA⊤=LL⊤\bC_{\bx} = \bA\bA^\top = \mathbf{L}\mathbf{L}^\top,z=L−1As=Qs\bz = \mathbf{L}^{-1}\bA\bs = \bQ\bs,其中 Q=L−1A\bQ = \mathbf{L}^{-1}\bA 是正交矩阵,因为 QQ⊤=L−1AA⊤L−⊤=I\bQ\bQ^\top = \mathbf{L}^{-1}\bA\bA^\top\mathbf{L}^{-\top} = \bI。每个 yk=Φ(zk)y_k = \Phi(z_k) 都只是单个源的函数,当且仅当 Q\bQ 的每一行只有一个非零元,即 Q\bQ 是带符号的置换矩阵;等价地,A=LQ\bA = \mathbf{L}\bQ 在对列作置换和变号之后是下三角矩阵。对一般的 A\bA 这并不成立:构造给出的独立输出是源的一个旋转,这正是Section 1.4第 1.4 节中高斯情形的不确定性。

Exercise 13.3习题 13.3 intermediate进阶

Let z∼N(0,I2)\bz \sim \Ncal(\bzero, \bI_2) and m(z)=R(β∥z∥2) z\mathbf m(\bz) = \bR(\beta\|\bz\|^2)\,\bz with β≠0\beta \neq 0. (a) Show that m(z)∼N(0,I2)\mathbf m(\bz) \sim \Ncal(\bzero, \bI_2). (b) Show that m\mathbf m is an infinitely differentiable bijection of R2\R^2 with an infinitely differentiable inverse. (c) Conclude that for two independent standard Gaussian sources and any smooth invertible mixing f\mathbf f, some smooth invertible g\mathbf g produces independent outputs without separating the sources.

设 z∼N(0,I2)\bz \sim \Ncal(\bzero, \bI_2),m(z)=R(β∥z∥2) z\mathbf m(\bz) = \bR(\beta\|\bz\|^2)\,\bz,β≠0\beta \neq 0。(a) 证明 m(z)∼N(0,I2)\mathbf m(\bz) \sim \Ncal(\bzero, \bI_2)。(b) 证明 m\mathbf m 是 R2\R^2 上无穷次可微的双射,且逆映射也无穷次可微。(c) 由此说明:对于两个独立的标准高斯源和任何光滑可逆的混合 f\mathbf f,都存在光滑可逆的 g\mathbf g,其输出相互独立却没有分离源。

Show solution查看解答

(a) Write z=r(cos⁡φ,sin⁡φ)⊤\bz = r(\cos\varphi, \sin\varphi)^\top. For z∼N(0,I2)\bz \sim \Ncal(\bzero, \bI_2), the radius rr and the angle φ\varphi are independent and φ\varphi is uniform on [0,2π)[0, 2\pi), because the density (2π)−1e−r2/2(2\pi)^{-1}e^{-r^2/2} does not depend on φ\varphi. The map sends (r,φ)(r, \varphi) to (r,φ+βr2 mod 2π)(r, \varphi + \beta r^2 \bmod 2\pi). Given rr, the shifted angle is again uniform on [0,2π)[0, 2\pi), whatever the shift, so it is independent of rr and uniform; the pair (radius, angle) of m(z)\mathbf m(\bz) therefore has the same joint law as that of z\bz, and so does m(z)\mathbf m(\bz). (b) The components of m(z)\mathbf m(\bz) are

(a) 记 z=r(cos⁡φ,sin⁡φ)⊤\bz = r(\cos\varphi, \sin\varphi)^\top。对 z∼N(0,I2)\bz \sim \Ncal(\bzero, \bI_2),由于密度 (2π)−1e−r2/2(2\pi)^{-1}e^{-r^2/2} 与 φ\varphi 无关,半径 rr 与角度 φ\varphi 相互独立,且 φ\varphi 在 [0,2π)[0, 2\pi) 上均匀分布。该映射把 (r,φ)(r, \varphi) 变为 (r,φ+βr2 mod 2π)(r, \varphi + \beta r^2 \bmod 2\pi)。给定 rr,无论平移多少,平移后的角度在 [0,2π)[0, 2\pi) 上仍均匀分布,因而与 rr 独立且均匀;所以 m(z)\mathbf m(\bz) 的(半径,角度)与 z\bz 的有相同的联合分布,m(z)\mathbf m(\bz) 与 z\bz 也就同分布。(b) m(z)\mathbf m(\bz) 的分量为

m1=cos⁡(β∥z∥2) z1−sin⁡(β∥z∥2) z2,m2=sin⁡(β∥z∥2) z1+cos⁡(β∥z∥2) z2,\begin{aligned} m_1 &= \cos(\beta\|\bz\|^2)\,z_1 - \sin(\beta\|\bz\|^2)\,z_2, \\ m_2 &= \sin(\beta\|\bz\|^2)\,z_1 + \cos(\beta\|\bz\|^2)\,z_2, \end{aligned}

compositions of polynomials with sin⁡\sin and cos⁡\cos, hence infinitely differentiable. A rotation preserves norms, so ∥m(z)∥=∥z∥\|\mathbf m(\bz)\| = \|\bz\|, and the map w↦R(−β∥w∥2) w\bw \mapsto \bR(-\beta\|\bw\|^2)\,\bw, infinitely differentiable for the same reason, inverts m\mathbf m. (With the angle β∥z∥\beta\|\bz\| instead, the map would fail to be twice differentiable at the origin.) (c) Let g=m∘f−1\mathbf g = \mathbf m \circ \mathbf f^{-1}, smooth and invertible with inverse f∘m−1\mathbf f\circ\mathbf m^{-1}. Then g(x)=m(s)\mathbf g(\bx) = \mathbf m(\bs) has independent standard Gaussian components by (a). But g1(x)=m1(s)g_1(\bx) = m_1(\bs) equals −sin⁡(βs22) s2-\sin(\beta s_2^2)\,s_2 when s1=0s_1 = 0, which varies with s2s_2, and equals cos⁡(βs12) s1\cos(\beta s_1^2)\,s_1 when s2=0s_2 = 0, which varies with s1s_1; so g1g_1 is a function of neither source alone, and g\mathbf g does not separate.

它们是多项式与 sin⁡\sin、cos⁡\cos 的复合,因而无穷次可微。旋转保持范数,所以 ∥m(z)∥=∥z∥\|\mathbf m(\bz)\| = \|\bz\|,而映射 w↦R(−β∥w∥2) w\bw \mapsto \bR(-\beta\|\bw\|^2)\,\bw(同理无穷次可微)就是 m\mathbf m 的逆。(若转角取 β∥z∥\beta\|\bz\|,映射在原点处就不是二阶可微的。)(c) 令 g=m∘f−1\mathbf g = \mathbf m \circ \mathbf f^{-1},它光滑可逆,逆为 f∘m−1\mathbf f\circ\mathbf m^{-1}。由 (a),g(x)=m(s)\mathbf g(\bx) = \mathbf m(\bs) 的分量是独立的标准高斯变量。但 g1(x)=m1(s)g_1(\bx) = m_1(\bs) 在 s1=0s_1 = 0 时等于 −sin⁡(βs22) s2-\sin(\beta s_2^2)\,s_2,随 s2s_2 变化;在 s2=0s_2 = 0 时等于 cos⁡(βs12) s1\cos(\beta s_1^2)\,s_1,随 s1s_1 变化。所以 g1g_1 不是任何单个源的函数,g\mathbf g 没有分离源。

Exercise 13.4习题 13.4 basic基础

In Proposition 13.4命题 13.4: (a) why must there be at least n+1n + 1 segments? (b) Suppose all sources are modulated in lockstep, λi(τ)=ai c(τ)\lambda_i(\tau) = a_i\,c(\tau) for constants aia_i and a function cc. Show that the rank condition fails for n≥2n \ge 2, however many segments there are. (c) Give a modulation with K=n+1K = n + 1 segments that satisfies it.

关于Proposition 13.4命题 13.4:(a) 为什么段数至少要有 n+1n + 1?(b) 设各源同步调制,即 λi(τ)=ai c(τ)\lambda_i(\tau) = a_i\,c(\tau),其中 aia_i 为常数、cc 为某个函数。证明当 n≥2n \ge 2 时,无论段数多少,秩条件都不成立。(c) 给出一个只有 K=n+1K = n + 1 段且满足秩条件的调制方式。

Show solution查看解答

(a) L\mathbf L has K−1K - 1 rows, and its rank cannot exceed its number of rows, so rank nn requires K−1≥nK - 1 \ge n. (b) Lτi=ai(c(τ+1)−c(1))L_{\tau i} = a_i\bigl(c(\tau+1) - c(1)\bigr), so L=δ a⊤\mathbf L = \boldsymbol\delta\,\mathbf a^\top with δτ=c(τ+1)−c(1)\delta_\tau = c(\tau + 1) - c(1) and a=(a1,…,an)⊤\mathbf a = (a_1, \dots, a_n)^\top, a matrix of rank at most 1. Intuitively, segments then differ only in overall loudness, which says nothing about how the loudness is shared among the sources. (c) Let λi(1)=1\lambda_i(1) = 1 for all ii, and in segment τ+1\tau + 1 (for τ=1,…,n\tau = 1, \dots, n) let only source τ\tau change, λτ(τ+1)=2\lambda_\tau(\tau + 1) = 2, λi(τ+1)=1\lambda_i(\tau + 1) = 1 for i≠τi \neq \tau. Then L=In\mathbf L = \bI_n, which has rank nn. With qi(s)=−s2/2q_i(s) = -s^2/2 this means that each source in turn has its variance halved while the others stay at variance 1.

(a) L\mathbf L 有 K−1K - 1 行,秩不超过行数,所以秩为 nn 要求 K−1≥nK - 1 \ge n。(b) Lτi=ai(c(τ+1)−c(1))L_{\tau i} = a_i\bigl(c(\tau+1) - c(1)\bigr),所以 L=δ a⊤\mathbf L = \boldsymbol\delta\,\mathbf a^\top,其中 δτ=c(τ+1)−c(1)\delta_\tau = c(\tau + 1) - c(1),a=(a1,…,an)⊤\mathbf a = (a_1, \dots, a_n)^\top,这个矩阵的秩至多为 1。直观地说,此时各段之间只有整体响度的差别,无法说明响度在各源之间如何分配。(c) 令所有 ii 都有 λi(1)=1\lambda_i(1) = 1;在第 τ+1\tau + 1 段(τ=1,…,n\tau = 1, \dots, n)只让源 τ\tau 变化:λτ(τ+1)=2\lambda_\tau(\tau + 1) = 2,i≠τi \neq \tau 时 λi(τ+1)=1\lambda_i(\tau + 1) = 1。则 L=In\mathbf L = \bI_n,秩为 nn。取 qi(s)=−s2/2q_i(s) = -s^2/2 时,这相当于让各源轮流把方差减半,而其他源的方差保持为 1。

Exercise 13.5习题 13.5 advanced硬核

(a) Let the sources be independent given u\bu with si∣u∼N(0,σi2(u))s_i \mid \bu \sim \Ncal(0, \sigma_i^2(\bu)). Compute ω(s,u)\bomega(\bs, \bu) and show that assumption 3 of Theorem 13.5定理 13.5 fails at every s\bs. (b) Now let si∣u∼N(μi(u),σi2(u))s_i \mid \bu \sim \Ncal(\mu_i(\bu), \sigma_i^2(\bu)). Exhibit 2n+12n + 1 values of (μi(u),σi2(u))i=1n(\mu_i(\bu), \sigma_i^2(\bu))_{i=1}^n for which the assumption holds at every s\bs.

(a) 设给定 u\bu 时各源独立,且 si∣u∼N(0,σi2(u))s_i \mid \bu \sim \Ncal(0, \sigma_i^2(\bu))。计算 ω(s,u)\bomega(\bs, \bu),并证明Theorem 13.5定理 13.5的假设 3 在每个 s\bs 处都不成立。(b) 现设 si∣u∼N(μi(u),σi2(u))s_i \mid \bu \sim \Ncal(\mu_i(\bu), \sigma_i^2(\bu))。给出 (μi(u),σi2(u))i=1n(\mu_i(\bu), \sigma_i^2(\bu))_{i=1}^n 的 2n+12n + 1 组取值,使该假设在每个 s\bs 处都成立。

Show solution查看解答

(a) With λi(u)=1/σi2(u)\lambda_i(\bu) = 1/\sigma_i^2(\bu),

(a) 记 λi(u)=1/σi2(u)\lambda_i(\bu) = 1/\sigma_i^2(\bu),则

qi(s,u)=−12λi(u) s2+12log⁡λi(u)−12log⁡2π,q_i(s, \bu) = -\tfrac12\lambda_i(\bu)\,s^2 + \tfrac12\log\lambda_i(\bu) - \tfrac12\log 2\pi,

so qi′=−λisq_i' = -\lambda_i s and qi′′=−λiq_i'' = -\lambda_i. Hence, with e1,…,e2n\be_1, \dots, \be_{2n} the standard basis of R2n\R^{2n},

所以 qi′=−λisq_i' = -\lambda_i s,qi′′=−λiq_i'' = -\lambda_i。于是,记 e1,…,e2n\be_1, \dots, \be_{2n} 为 R2n\R^{2n} 的标准基,有

ω(s,u)=−∑i=1nλi(u) (siei+en+i),\bomega(\bs, \bu) = -\sum_{i=1}^n \lambda_i(\bu)\,\bigl(s_i\be_i + \be_{n+i}\bigr),

and every difference ω(s,uk)−ω(s,u0)\bomega(\bs, \bu_k) - \bomega(\bs, \bu_0) lies in the span of the nn vectors siei+en+is_i\be_i + \be_{n+i}. At most nn of the 2n2n differences can be linearly independent, whatever the values uk\bu_k. (b) With λi=1/σi2\lambda_i = 1/\sigma_i^2, now qi′=−λi(s−μi)q_i' = -\lambda_i(s - \mu_i) and qi′′=−λiq_i'' = -\lambda_i. Take the baseline u0\bu_0 with all μi=0\mu_i = 0, λi=1\lambda_i = 1. For k=1,…,nk = 1, \dots, n, let uk\bu_k differ from the baseline only in μk=1\mu_k = 1: the difference is ek\be_k. For k=1,…,nk = 1, \dots, n, let un+k\bu_{n+k} differ from the baseline only in λk=2\lambda_k = 2 (variance 1/21/2): the difference is −skek−en+k-s_k\be_k - \be_{n+k}. These 2n2n differences are linearly independent for every s\bs. In a vanishing linear combination with coefficients aka_k for the first kind and bkb_k for the second, coordinate n+kn + k equals −bk-b_k, so all bk=0b_k = 0, and then all ak=0a_k = 0. Modulating the means as well as the variances supplies the missing nn directions.

并且每个差向量 ω(s,uk)−ω(s,u0)\bomega(\bs, \bu_k) - \bomega(\bs, \bu_0) 都落在 nn 个向量 siei+en+is_i\be_i + \be_{n+i} 张成的子空间中。无论 uk\bu_k 如何取,2n2n 个差向量中至多只有 nn 个线性无关。(b) 仍记 λi=1/σi2\lambda_i = 1/\sigma_i^2,此时 qi′=−λi(s−μi)q_i' = -\lambda_i(s - \mu_i),qi′′=−λiq_i'' = -\lambda_i。取基准 u0\bu_0:所有 μi=0\mu_i = 0,λi=1\lambda_i = 1。对 k=1,…,nk = 1, \dots, n,令 uk\bu_k 与基准只差在 μk=1\mu_k = 1,对应的差向量为 ek\be_k;再令 un+k\bu_{n+k} 与基准只差在 λk=2\lambda_k = 2(方差为 1/21/2),对应的差向量为 −skek−en+k-s_k\be_k - \be_{n+k}。对每个 s\bs,这 2n2n 个差向量都线性无关:在一个为零的线性组合中,记第一类向量的系数为 aka_k、第二类的为 bkb_k,则第 n+kn + k 个坐标等于 −bk-b_k,所以所有 bk=0b_k = 0,进而所有 ak=0a_k = 0。同时调制均值与方差,补上了所缺的 nn 个方向。

Exercise 13.6习题 13.6 advanced硬核

Complete the last step of the proof of Theorem 13.5定理 13.5. Let v ⁣:Rn→Rn\bv\colon \R^n \to \R^n be a continuously differentiable bijection whose Jacobian matrix Jv(y)\mathbf J_{\bv}(\by) is invertible for every y\by and has at most one nonzero entry in each row. Show that there are a permutation σ\sigma and strictly monotonic functions ϕi\phi_i such that vi(y)=ϕi(yσ(i))v_i(\by) = \phi_i(y_{\sigma(i)}) for all ii and y\by.

补全Theorem 13.5定理 13.5证明的最后一步。设 v ⁣:Rn→Rn\bv\colon \R^n \to \R^n 是连续可微的双射,其 Jacobian 矩阵 Jv(y)\mathbf J_{\bv}(\by) 对每个 y\by 都可逆,且每行至多有一个非零元。证明存在置换 σ\sigma 与严格单调函数 ϕi\phi_i,使对所有 ii 与 y\by 都有 vi(y)=ϕi(yσ(i))v_i(\by) = \phi_i(y_{\sigma(i)})。

Show solution查看解答

Fix y\by. An invertible matrix has no zero row, so each row has exactly one nonzero entry, say in column σy(i)\sigma_{\by}(i). If two rows had their nonzero entries in the same column, some other column would be zero and the matrix singular; so σy\sigma_{\by} is a permutation. Next, the entries ∂vi/∂yj\partial v_i/\partial y_j are continuous. At a given y0\by_0, the nn entries ∂vi/∂yσy0(i)\partial v_i/\partial y_{\sigma_{\by_0}(i)} are nonzero, so they remain nonzero on a neighborhood of y0\by_0; since each row has only one nonzero entry, σy=σy0\sigma_{\by} = \sigma_{\by_0} on that neighborhood. The map y↦σy\by \mapsto \sigma_{\by} is therefore locally constant on the connected set Rn\R^n, hence constant; call it σ\sigma. Then ∂vi/∂yj=0\partial v_i/\partial y_j = 0 everywhere for j≠σ(i)j \neq \sigma(i), so by the mean value theorem viv_i does not change when any coordinate other than yσ(i)y_{\sigma(i)} changes, and vi(y)=ϕi(yσ(i))v_i(\by) = \phi_i(y_{\sigma(i)}) for a function ϕi\phi_i of one variable. Its derivative ϕi′=∂vi/∂yσ(i)\phi_i' = \partial v_i/\partial y_{\sigma(i)} is continuous and never zero, so by the intermediate value theorem it has a constant sign, and ϕi\phi_i is strictly monotonic.

固定 y\by。可逆矩阵没有零行,所以每行恰有一个非零元,设其位于第 σy(i)\sigma_{\by}(i) 列。若有两行的非零元位于同一列,则另有某一列全为零,矩阵奇异;所以 σy\sigma_{\by} 是一个置换。其次,各元素 ∂vi/∂yj\partial v_i/\partial y_j 连续。在给定的 y0\by_0 处,nn 个元素 ∂vi/∂yσy0(i)\partial v_i/\partial y_{\sigma_{\by_0}(i)} 非零,因而在 y0\by_0 的某个邻域内保持非零;由于每行只有一个非零元,在该邻域内 σy=σy0\sigma_{\by} = \sigma_{\by_0}。于是 y↦σy\by \mapsto \sigma_{\by} 在连通集 Rn\R^n 上局部恒定,从而恒定,记为 σ\sigma。这样当 j≠σ(i)j \neq \sigma(i) 时处处有 ∂vi/∂yj=0\partial v_i/\partial y_j = 0,由中值定理,改变 yσ(i)y_{\sigma(i)} 以外的任何坐标都不会改变 viv_i,所以 vi(y)=ϕi(yσ(i))v_i(\by) = \phi_i(y_{\sigma(i)}),其中 ϕi\phi_i 是一元函数。它的导数 ϕi′=∂vi/∂yσ(i)\phi_i' = \partial v_i/\partial y_{\sigma(i)} 连续且处处非零,由介值定理其符号恒定,故 ϕi\phi_i 严格单调。

13.9 References参考文献

  1. Buchholz, S., Besserve, M., & Schölkopf, B. (2022). Function classes for identifiable nonlinear independent component analysis. In Advances in Neural Information Processing Systems 35 (pp. 16946–16961).
  2. Gutmann, M. U., & Hyvärinen, A. (2012). Noise-contrastive estimation of unnormalized statistical models, with applications to natural image statistics. Journal of Machine Learning Research, 13, 307–361.
  3. Hyvärinen, A., Khemakhem, I., & Morioka, H. (2023). Nonlinear independent component analysis for principled disentanglement in unsupervised deep learning. Patterns, 4(10), 100844.
  4. Hyvärinen, A., & Morioka, H. (2016). Unsupervised feature extraction by time-contrastive learning and nonlinear ICA. In Advances in Neural Information Processing Systems 29 (pp. 3765–3773).
  5. Hyvärinen, A., & Morioka, H. (2017). Nonlinear ICA of temporally dependent stationary sources. In Proceedings of the 20th International Conference on Artificial Intelligence and Statistics (PMLR 54, pp. 460–469).
  6. Hyvärinen, A., & Pajunen, P. (1999). Nonlinear independent component analysis: Existence and uniqueness results. Neural Networks, 12(3), 429–439.
  7. Hyvärinen, A., Sasaki, H., & Turner, R. E. (2019). Nonlinear ICA using auxiliary variables and generalized contrastive learning. In Proceedings of the 22nd International Conference on Artificial Intelligence and Statistics (PMLR 89, pp. 859–868).
  8. Khemakhem, I., Kingma, D. P., Monti, R. P., & Hyvärinen, A. (2020). Variational autoencoders and nonlinear ICA: A unifying framework. In Proceedings of the 23rd International Conference on Artificial Intelligence and Statistics (PMLR 108, pp. 2207–2217).
  9. Kingma, D. P., & Welling, M. (2014). Auto-encoding variational Bayes. In International Conference on Learning Representations.
  10. Locatello, F., Bauer, S., Lucic, M., Rätsch, G., Gelly, S., Schölkopf, B., & Bachem, O. (2019). Challenging common assumptions in the unsupervised learning of disentangled representations. In Proceedings of the 36th International Conference on Machine Learning (PMLR 97, pp. 4114–4124).
  11. Taleb, A., & Jutten, C. (1999). Source separation in post-nonlinear mixtures. IEEE Transactions on Signal Processing, 47(10), 2807–2820.