JL引理通俗的理解是:
JL引理的优点是什么:
主要实现方法:
P ( X ≥ a ) ≤ E [ x ] a P(X \geq a) \leq \frac{E[x]}{a} P(X≥a)≤aE[x]
P ( ∣ X − E [ X ] ∣ ≥ a ) ≤ V a r [ x ] a 2 P(|X - E[X]| \geq a) \leq \frac{Var[x]}{a^2} P(∣X−E[X]∣≥a)≤a2Var[x]
∀ λ > 0 → x ≥ a ⟺ λ x ≥ λ a ⟺ e λ x ≥ e λ a \forall \lambda > 0 \rightarrow x \geq a \iff \lambda x \geq \lambda a \iff e^{\lambda x} \geq e^{\lambda a} ∀λ>0→x≥a⟺λx≥λa⟺eλx≥eλa
若运用在Markov’s Inequality中可得:
P ( X ≥ a ) = P ( e λ X ≥ e λ a ) ≤ e − λ a E [ e λ x ] P(X \geq a) = P(e^{\lambda X} \geq e^{\lambda a}) \leq e^{-\lambda a}E[e^{\lambda x}] P(X≥a)=P(eλX≥eλa)≤e−λaE[eλx]
既然对于任何 λ \lambda λ都成立,那么为了提高不等式精度,可得:
P ( X ≥ a ) ≤ min λ ≥ 0 e − λ a E [ e λ x ] P(X \geq a) \leq \min_{\lambda \geq 0}{e^{-\lambda a}E[e^{\lambda x}]} P(X≥a)≤λ≥0mine−λaE[eλx]
单位模引理证明:
若要证明 ∣ ∥ u ∥ 2 − 1 ∣ ≥ ε {|\lVert u \rVert}^2 - 1| \geq \varepsilon ∣∥u∥2−1∣≥ε,则要证明 ∥ u ∥ 2 − 1 ≥ ε {\lVert u \rVert}^2 - 1 \geq \varepsilon ∥u∥2−1≥ε和 1 − ∥ u ∥ 2 ≥ ε {1 - \lVert u \rVert}^2 \geq \varepsilon 1−∥u∥2≥ε两种情况下的概率
首先推导 ∥ u ∥ 2 − 1 ≥ ε {\lVert u \rVert}^2 - 1 \geq \varepsilon ∥u∥2−1≥ε的概率:
根据Chernoff方法,可以得到:
P ( ∥ u ∥ 2 − 1 ≥ ε ) ≤ min λ > 0 e − λ ε E [ e λ ( ∥ u ∥ 2 − 1 ) ] = min λ > 0 e − λ ( ε + 1 ) E [ e λ ∥ u ∥ 2 ] P({\lVert u \rVert}^2 - 1 \geq \varepsilon) \leq \min_{\lambda > 0} { e^{-\lambda \varepsilon} E \left[ e^{\lambda ({\lVert u \rVert}^2 - 1)} \right] } = \min_{\lambda > 0} { e^{-\lambda (\varepsilon + 1)} E \left[ e^{\lambda {\lVert u \rVert}^2} \right] } P(∥u∥2−1≥ε)≤λ>0mine−λεE[eλ(∥u∥2−1)]=λ>0mine−λ(ε+1)E[eλ∥u∥2]若将 u u u写成分量的形式 ( u 1 , u 2 , … , u n ) (u_1, u_2, \dots, u_n) (u1,u2,…,un),有:
E [ e λ ∥ u ∥ 2 ] = E [ e λ ∑ i u i 2 ] = E [ ∏ i e λ u i 2 ] = ∏ i E [ e λ u i 2 ] E \left[ e^{\lambda {\lVert u \rVert}^2} \right] = E \left[ e^{\lambda \sum_{i} u_i^2} \right] = E \left[ \prod_{i} e^{\lambda u_i^2} \right] = \prod_{i} E \left[ e^{\lambda u_i^2} \right] E[eλ∥u∥2]=E[eλ∑iui2]=E[i∏eλui2]=i∏E[eλui2]
其中有(过程我也不会):
E [ e λ u i 2 ] = ∫ ∞ ∞ 1 2 π e − u i 2 / 2 e λ u i 2 / n d u i = n n − 2 λ E \left[ e^{\lambda u_i^2} \right] = \int_{\infty}^{\infty} \frac{1}{\sqrt{2\pi}} e^{ - u_i^2 / 2 } e^{ \lambda u_i^2 / n } {\rm d}u_i = \sqrt{\frac{n}{n - 2 \lambda}} E[eλui2]=∫∞∞2π1e−ui2/2eλui2/ndui=n−2λn根据以上可得:
E [ e λ ∥ u ∥ 2 ] = ∏ i n ( n − 2 λ ) = ( n n − 2 λ ) n / 2 E \left[ e^{\lambda {\lVert u \rVert}^2} \right] = \prod_{i} \sqrt{\frac{n}{(n - 2 \lambda)}} = {\left( \frac{n}{n - 2 \lambda} \right)}^{n/2} E[eλ∥u∥2]=i∏(n−2λ)n=(n−2λn)n/2P ( ∥ u ∥ 2 − 1 ≥ ε ) ≤ min λ > 0 e − λ ( ε + 1 ) ( n n − 2 λ ) n / 2 P({\lVert u \rVert}^2 - 1 \geq \varepsilon) \leq \min_{\lambda > 0} e^{-\lambda(\varepsilon + 1)} {\left( \frac{n}{n - 2 \lambda} \right)}^{n/2} P(∥u∥2−1≥ε)≤λ>0mine−λ(ε+1)(n−2λn)n/2
右端的极小值在 λ = n ε 2 ( 1 + ε ) \lambda = \frac{n \varepsilon}{2(1+\varepsilon)} λ=2(1+ε)nε时取到(这个过程我也不会),代入可得(也不会):
P ( ∥ u ∥ 2 − 1 ≥ ε ) ≤ e n ( log ( 1 + ε ) − ε ) / 2 ≤ e − n ε 2 / 8 P({\lVert u \rVert}^2 - 1 \geq \varepsilon) \leq e^{n(\log (1 + \varepsilon) - \varepsilon)/2} \leq e^{-n\varepsilon^2/8} P(∥u∥2−1≥ε)≤en(log(1+ε)−ε)/2≤e−nε2/8(数学不好真是太悲惨了)
然后是推导 1 − ∥ u ∥ 2 ≥ ε 1 - {\lVert u \rVert}^2 \geq \varepsilon 1−∥u∥2≥ε的概率:
- 同上方法,可在最后得出:
P ( ∥ u ∥ 2 − 1 ≥ ε ) ≤ e n ( log ( 1 − ε ) + ε ) / 2 ≤ e − n ε 2 / 8 P({\lVert u \rVert}^2 - 1 \geq \varepsilon) \leq e^{n(\log (1 - \varepsilon) + \varepsilon)/2} \leq e^{-n\varepsilon^2/8} P(∥u∥2−1≥ε)≤en(log(1−ε)+ε)/2≤e−nε2/8
因为可证 log ( 1 − ε ) + ε ≤ log ( 1 + ε ) − ε \log(1−ε)+ε \leq \log(1+ε)−ε log(1−ε)+ε≤log(1+ε)−ε,所以证明可沿用之前的。因为 ∣ ∥ u ∥ 2 − 1 ∣ ≥ ε {|\lVert u \rVert}^2 - 1| \geq \varepsilon ∣∥u∥2−1∣≥ε包含了两部分的概率,所以相加即可得到:
P ( ∣ ∥ u ∥ 2 − 1 ∣ ≥ ε ) ≤ 2 ⋅ e − n ε 2 / 8 P(|{\lVert u \rVert}^2 - 1| \geq \varepsilon) \leq 2 \cdot e^{ - n\varepsilon^2/8} P(∣∥u∥2−1∣≥ε)≤2⋅e−nε2/8
正交性引理证明:
同样将 ∣ ⟨ u , v ⟩ ∣ |\langle u, v \rangle| ∣⟨u,v⟩∣分为 ⟨ u , v ⟩ \langle u, v \rangle ⟨u,v⟩与 − ⟨ u , v ⟩ -\langle u, v \rangle −⟨u,v⟩
推导 ⟨ u , v ⟩ \langle u, v \rangle ⟨u,v⟩的概率:
- 为了套用单位模引理,我们发现 ∥ u + v 2 ∥ − 1 ≥ ε \lVert \frac{u + v}{\sqrt{2}} \rVert - 1 \geq \varepsilon ∥2u+v∥−1≥ε和 1 − ∥ u + v 2 ∥ ≥ ε 1 - \lVert \frac{u + v}{\sqrt{2}} \rVert \geq \varepsilon 1−∥2u+v∥≥ε的和是 ⟨ u , v ⟩ ≥ ε \langle u, v \rangle \geq \varepsilon ⟨u,v⟩≥ε,所以可得:
P ( ⟨ u , v ⟩ ) ≤ P ( ∥ u + v 2 ∥ − 1 ≥ ε ) + P ( 1 − ∥ u + v 2 ∥ ≥ ε ) ≤ e − n ε 2 / 8 + e − n ε 2 / 8 = 2 e − n ε 2 / 8 \begin{align} P(\langle u, v \rangle) & \leq P\left( \lVert \frac{u + v}{\sqrt{2}} \rVert - 1 \geq \varepsilon \right) + P\left( 1 - \lVert \frac{u + v}{\sqrt{2}} \rVert \geq \varepsilon \right) \\ & \leq e^{-n\varepsilon^2/8} + e^{-n\varepsilon^2/8} = 2 e^{-n\varepsilon^2/8} \end{align} P(⟨u,v⟩)≤P(∥2u+v∥−1≥ε)+P(1−∥2u+v∥≥ε)≤e−nε2/8+e−nε2/8=2e−nε2/8同理可推导 − ⟨ u , v ⟩ -\langle u, v \rangle −⟨u,v⟩的概率为 P ( − ⟨ u , v ⟩ ) = 2 e − n ε 2 / 8 P(-\langle u, v \rangle) = 2 e^{-n\varepsilon^2/8} P(−⟨u,v⟩)=2e−nε2/8
所以在结合之后可得:
P ( ∣ ⟨ u , v ⟩ ∣ ≥ ε ) ≤ 4 e − n ε 2 / 8 P(|\langle u, v \rangle| \geq \varepsilon) \leq 4 e^{-n\varepsilon^2/8} P(∣⟨u,v⟩∣≥ε)≤4e−nε2/8
JL引理:
给定 N N N个向量 v 1 , v 2 , … , v N ∈ R m v_1, v_2, \dots, v_N \in {\mathbb R}^m v1,v2,…,vN∈Rm。
存在变量 n > 24 log N ε 2 n > \frac{24 \log N}{\varepsilon^2} n>ε224logN,并且随机矩阵 A ∈ R n × m A \in {\mathbb R}^{n \times m} A∈Rn×m独立重复采样自 N ( 0 , 1 / n ) N(0, 1/n) N(0,1/n), ε ∈ ( 0 , 1 ) \varepsilon \in (0, 1) ε∈(0,1)是给定的常数。
那么至少有 N − 1 N \frac{N-1}{N} NN−1的概率,使得对于 i ≠ j i \neq j i=j时成立:
( 1 − ε ) ∥ v i − v j ∥ 2 ≤ ∥ A v i − A v j ∥ 2 ≤ ( 1 + ε ) ∥ v i − v j ∥ 2 (1 - \varepsilon) {\lVert v_i - v_j \rVert}^2 \leq {\lVert Av_i - Av_j \rVert}^2 \leq (1 + \varepsilon) {\lVert v_i - v_j \rVert}^2 (1−ε)∥vi−vj∥2≤∥Avi−Avj∥2≤(1+ε)∥vi−vj∥2
引理说明了:
JL引理证明:
A ∈ R n × m A \in {\mathbb R}^{n \times m} A∈Rn×m独立重复采样自 N ( 0 , 1 / n ) N(0, 1/n) N(0,1/n)
假设 u ∈ R m u \in {\mathbb R}^m u∈Rm是一个给定的单位向量, A u Au Au的每个分量独立服从于 N ( 0 , 1 / n ) N(0, 1/n) N(0,1/n),相当于 A u Au Au就是从 N ( 0 , 1 / n ) N(0, 1/n) N(0,1/n)中采样出来的 n n n维向量
浅证明一下:
( A u ) i = ∑ j A i , j u j {(Au)}_i = \sum_{j} A_{i, j}u_j (Au)i=∑jAi,juj,因为 A i , j A_{i, j} Ai,j独立且为正态分布,所以 ( A u ) i {(Au)}_i (Au)i也独立也服从正态分布
均值为 ∑ j u j × 0 = 0 \sum_j u_j \times 0 = 0 ∑juj×0=0,方差为 ∑ j u j 2 × 1 n = 1 n \sum_j u_j^2 \times \frac{1}{n} = \frac{1}{n} ∑juj2×n1=n1
假定 u = v i − v j ∥ v i − v j ∥ u = \frac{v_i - v_j}{\lVert v_i - v_j \rVert} u=∥vi−vj∥vi−vj,利用单位模引理有:
P ( ∣ ∥ A v i − v j ∥ v i − v j ∥ ∥ 2 − 1 ∣ ≥ ε ) ≤ 2 ⋅ e − n ε 2 / 8 P\left( \left\lvert {\left\lVert A \frac{v_i - v_j}{\lVert v_i - v_j \rVert} \right\rVert}^2 - 1 \right\rvert \geq \varepsilon \right) \leq 2 \cdot e^{ - n\varepsilon^2/8} P( A∥vi−vj∥vi−vj 2−1 ≥ε)≤2⋅e−nε2/8因为要对所有 i ≠ j i \neq j i=j的组合都成立,我们求至少有一项 ≥ ε \geq \varepsilon ≥ε的概率不超过:
P ( ∃ ( i , j ) : ∣ ∥ A v i − v j ∥ v i − v j ∥ ∥ 2 − 1 ∣ ≥ ε ) ≤ 2 ⋅ e − n ε 2 / 8 ⋅ C N 2 P\left( \exists(i, j): \left\lvert {\left\lVert A \frac{v_i - v_j}{\lVert v_i - v_j \rVert} \right\rVert}^2 - 1 \right\rvert \geq \varepsilon \right) \leq 2 \cdot e^{ - n\varepsilon^2/8} \cdot C_N^2 P(∃(i,j): A∥vi−vj∥vi−vj 2−1 ≥ε)≤2⋅e−nε2/8⋅CN2上面求出了至少一项的概率,与之相反,在 ∣ ∥ A v i − v j ∥ v i − v j ∥ ∥ 2 − 1 ∣ ≤ ε \left\lvert {\left\lVert A \frac{v_i - v_j}{\lVert v_i - v_j \rVert} \right\rVert}^2 - 1 \right\rvert \leq \varepsilon A∥vi−vj∥vi−vj 2−1 ≤ε的条件下,一项都没有的概率就是:
1 − 2 ⋅ e − n ε 2 / 8 ⋅ C N 2 = 1 − N ⋅ ( N − 1 ) ⋅ e − n ε 2 / 8 1 - 2 \cdot e^{ - n\varepsilon^2/8} \cdot C_N^2 = 1 - N \cdot (N-1) \cdot e^{ - n\varepsilon^2/8} 1−2⋅e−nε2/8⋅CN2=1−N⋅(N−1)⋅e−nε2/8若代入 n > 24 log N ε 2 n > \frac{24 \log N}{\varepsilon^2} n>ε224logN的条件,可以得到,在 ∣ ∥ A v i − v j ∥ v i − v j ∥ ∥ 2 − 1 ∣ ≤ ε \left\lvert {\left\lVert A \frac{v_i - v_j}{\lVert v_i - v_j \rVert} \right\rVert}^2 - 1 \right\rvert \leq \varepsilon A∥vi−vj∥vi−vj 2−1 ≤ε的条件下,一项都没有的概率是:
1 − N ⋅ ( N − 1 ) ⋅ e − n ε 2 / 8 ≥ 1 − N ( N − 1 ) N − 3 ≥ 1 − N − 1 1 - N \cdot (N-1) \cdot e^{ - n\varepsilon^2/8} \geq 1 - N(N-1)N^{-3} \geq 1 - N^{-1} 1−N⋅(N−1)⋅e−nε2/8≥1−N(N−1)N−3≥1−N−1根据第6步求解出的结果就可以得到:
在 n > 24 log N ε 2 n > \frac{24 \log N}{\varepsilon^2} n>ε224logN的条件下
实现 ∣ ∥ A v i − v j ∥ v i − v j ∥ ∥ 2 − 1 ∣ ≤ ε \left\lvert {\left\lVert A \frac{v_i - v_j}{\lVert v_i - v_j \rVert} \right\rVert}^2 - 1 \right\rvert \leq \varepsilon A∥vi−vj∥vi−vj 2−1 ≤ε的条件,任意两项偏移不超过 ε \varepsilon ε的概率为 1 − N − 1 1 - N^{-1} 1−N−1
而 ∣ ∥ A v i − v j ∥ v i − v j ∥ ∥ 2 − 1 ∣ ≤ ε \left\lvert {\left\lVert A \frac{v_i - v_j}{\lVert v_i - v_j \rVert} \right\rVert}^2 - 1 \right\rvert \leq \varepsilon A∥vi−vj∥vi−vj 2−1 ≤ε的条件就是定理中的:
( 1 − ε ) ∥ v i − v j ∥ 2 ≤ ∥ A v i − A v j ∥ 2 ≤ ( 1 + ε ) ∥ v i − v j ∥ 2 (1 - \varepsilon) {\lVert v_i - v_j \rVert}^2 \leq {\lVert Av_i - Av_j \rVert}^2 \leq (1 + \varepsilon) {\lVert v_i - v_j \rVert}^2 (1−ε)∥vi−vj∥2≤∥Avi−Avj∥2≤(1+ε)∥vi−vj∥2
JL引理(内积版):
给定 N N N个单位向量 v 1 , v 2 , … , v N ∈ R m v_1, v_2, \dots, v_N \in {\mathbb R}^m v1,v2,…,vN∈Rm。
存在变量 n > 24 log N ε 2 n > \frac{24 \log N}{\varepsilon^2} n>ε224logN,并且随机矩阵 A ∈ R n × m A \in {\mathbb R}^{n \times m} A∈Rn×m独立重复采样自 N ( 0 , 1 / n ) N(0, 1/n) N(0,1/n), ε ∈ ( 0 , 1 ) \varepsilon \in (0, 1) ε∈(0,1)是给定的常数。
那么至少有 N − 2 N \frac{N-2}{N} NN−2的概率,使得对于 i ≠ j i \neq j i=j时成立:
∣ ⟨ A v i , A v j ⟩ − ⟨ v i , v j ⟩ ∣ ≤ ε {| \langle Av_i, Av_j \rangle - \langle v_i, v_j \rangle |} \leq \varepsilon ∣⟨Avi,Avj⟩−⟨vi,vj⟩∣≤ε
内积版证明:形同正交性引理的证明
通过JL引理的证明我们已知:
( 1 − ε ) ∥ v i − v j ∥ 2 ≤ ∥ A v i − A v j ∥ 2 ≤ ( 1 + ε ) ∥ v i − v j ∥ 2 ( 1 − ε ) ∥ v i + v j ∥ 2 ≤ ∥ A v i + A v j ∥ 2 ≤ ( 1 + ε ) ∥ v i − v j ∥ 2 \begin{align} (1 - \varepsilon) {\lVert v_i - v_j \rVert}^2 \leq {\lVert Av_i - Av_j \rVert}^2 \leq (1 + \varepsilon) {\lVert v_i - v_j \rVert}^2 & \tag 1 \\ (1 - \varepsilon) {\lVert v_i + v_j \rVert}^2 \leq {\lVert Av_i + Av_j \rVert}^2 \leq (1 + \varepsilon) {\lVert v_i - v_j \rVert}^2 \tag 2 \end{align} (1−ε)∥vi−vj∥2≤∥Avi−Avj∥2≤(1+ε)∥vi−vj∥2(1−ε)∥vi+vj∥2≤∥Avi+Avj∥2≤(1+ε)∥vi−vj∥2(1)(2)
已知在正交条件下 ⟨ a , b ⟩ = a b \langle a, b \rangle = ab ⟨a,b⟩=ab,用 ( 2 ) − ( 1 ) (2) - (1) (2)−(1)可得:4 ⟨ v i , v j ⟩ − 2 ε ( ∥ v i ∥ 2 + ∥ v j ∥ 2 ) ≤ 4 ⟨ A v i , A v j ⟩ ≤ 4 ⟨ v i , v j ⟩ + 2 ε ( ∥ v i ∥ 2 + ∥ v j ∥ 2 ) 4\langle v_i, v_j \rangle - 2\varepsilon{({\lVert v_i \rVert}^2 + {\lVert v_j \rVert}^2)} \leq 4\langle Av_i, Av_j \rangle \leq 4\langle v_i, v_j \rangle + 2\varepsilon{({\lVert v_i \rVert}^2 + {\lVert v_j \rVert}^2)} 4⟨vi,vj⟩−2ε(∥vi∥2+∥vj∥2)≤4⟨Avi,Avj⟩≤4⟨vi,vj⟩+2ε(∥vi∥2+∥vj∥2)
由于已知 v i v_i vi, v j v_j vj都是单位向量,所以上式等价于:
4 ⟨ v i , v j ⟩ − 2 ε ⋅ 2 ≤ 4 ⟨ A v i , A v j ⟩ ≤ 4 ⟨ v i , v j ⟩ + 2 ε ⋅ 2 4\langle v_i, v_j \rangle - 2\varepsilon \cdot 2 \leq 4\langle Av_i, Av_j \rangle \leq 4\langle v_i, v_j \rangle + 2\varepsilon \cdot 2 4⟨vi,vj⟩−2ε⋅2≤4⟨Avi,Avj⟩≤4⟨vi,vj⟩+2ε⋅2
经过变换可以写成:
− ε ≤ ⟨ A v i , A v j ⟩ − ⟨ v i , v j ⟩ ≤ ε ⟹ ∣ ⟨ A v i , A v j ⟩ − ⟨ v i , v j ⟩ ∣ ≤ ε - \varepsilon \leq \langle Av_i, Av_j \rangle - \langle v_i, v_j \rangle \leq \varepsilon \implies |\langle Av_i, Av_j \rangle - \langle v_i, v_j \rangle| \leq \varepsilon −ε≤⟨Avi,Avj⟩−⟨vi,vj⟩≤ε⟹∣⟨Avi,Avj⟩−⟨vi,vj⟩∣≤ε