Problem

Let U⊆Rd\mathcal{U} \subseteq \mathbb{R}^d be a set of nn points. We want to find a linear transformation A∈Rk×dA \in \mathbb{R}^{k \times d} that embeds the points in U\mathcal{U} to Rk\mathbb{R}^k while preserving the pairwise Euclidean distances.

If k≥dk \ge d, the problem is trivial. There is an isomorphic mapping between Rd\mathbb{R}^d and a dd-dimensional subspace in Rk\mathbb{R}^k. Let u1,…,udu_1, \ldots, u_d be a subset of standard basis vectors in Rk\mathbb{R}^k, and e1,…,ede_1, \ldots, e_d be standard basis vectors in Rd\mathbb{R}^d. Then one possible isomorphic mapping is given by

A=u1e1T+…+udedT. A = u_1 e_1^T + \ldots + u_d e_d^T.

If k<dk < d, then such an isomorphic embedding is impossible. However, it is feasible, if we aim to preserve the pair-wise distance up to a multiplicative error ϵ∈(0,1)\epsilon \in (0, 1) with high probability, s.t., ∀x,y∈U\forall x, y \in \mathcal{U},

∥Ax−Ay∥2∈(1±ϵ)∥x−y∥2, \Vert A x - A y \Vert_2 \in (1 \pm \epsilon) \Vert x - y \Vert_2,

where ∥⋅∥2\Vert \cdot \Vert_2 is the ℓ2\ell_2 distance.

The smaller kk is, the less space we need to store the embedded vectors

AU≐{Ax:x∈U}⊆Rk×n. A \mathcal{U} \doteq \{ Ax : x \in \mathcal{U} \} \subseteq \mathbb{R}^{k \times n}.

It remains to study how small kk can be?

Theorem. For each set U⊆Rd\mathcal{U} \subseteq \mathbb{R}^d of nn points, there is a matrix A∈Rk×dA \in \mathbb{R}^{k \times d}, such that k=O(log⁡nϵ2)k = O\left( \frac{ \log n }{ \epsilon^2} \right) and

∀x,y∈U,∥Ax−Ay∥2∈(1±ϵ)∥x−y∥2, \forall x, y \in \mathcal{U}, \quad \Vert A x - A y \Vert_2 \in (1 \pm \epsilon) \Vert x - y \Vert_2,

Further, there is an algorithm which returns such a matrix AA with success probability at least 1−1n1 - \frac{1}{n}

The value of kk depends only on nn but not dd.

Column Perspective

On the high level, we try to squeeze dd (in expectation) orthonormal vectors into a smaller space Rk\mathbb{R}^k. We do this by generating a set of dd random vectors u1,u2,…,ud∈Rku_1, u_2, \ldots, u_d \in \mathbb{R}^k, such that:

  1. Each coordinate of uiu_i is generated independently for i∈[d]i \in [d];

and in expectation, they are orthonormal:

  1. E[∥ui∥22]=1\mathbb{E} \left[ \Vert u_i \Vert_2^2 \right] = 1 for i∈[d]i \in [d];
  2. E[⟨ui,uj⟩]=0\mathbb{E} \left[ \langle u_i, u_j \rangle \right] = 0 for i,j∈[d],i≠ji, j \in [d], i \neq j.

Let e1,…,ed∈Rde_1, \ldots, e_d \in \mathbb{R}^d be unit vectors in Rd\mathbb{R}^d and eie_i (i∈[d]i \in [d]) has the ii-th entry equal to 1. Define

A=[u1,u2,…,ud]=u1e1T+…+udedT. A = \begin{bmatrix} u_1, u_2, \ldots, u_d \end{bmatrix} = u_1 e_1^T + \ldots + u_d e_d^T.

For a fixed pair x,y∈Ux, y \in \mathcal{U}, define z=x−yz = x - y. Then

∥Ax−Ay∥22=∥Az∥22=∥∑i∈[d]z[i]⋅ui∥22=∑i∈[d](z[i])2∥ui∥22+∑i,j∈[d],i≠j(z[i]⋅z[j])⋅⟨ui,uj⟩. \begin{aligned} \Vert A x - A y \Vert_2^2 &= \Vert A z \Vert_2^2 \\ &= \left\Vert \sum_{ i \in [d] } z[i] \cdot u_i \right\Vert_2^2 \\ &= \sum_{i \in [d] } (z[i])^2 \Vert u_i \Vert_2^2 + \sum_{ i, j \in [d], i \neq j} (z[i] \cdot z[j]) \cdot \langle u_i, u_j \rangle. \end{aligned}

Taking expectation of both side, and by assumption of vt,t∈[d]v_t, t \in [d], it holds that

E[∥z∥22]=∥z∥22. \mathbb{ E } \left[ \Vert z \Vert_2^2 \right] = \Vert z \Vert_2^2.

Row Perspective

We can also characterize AA by the properties of its rows. Let A~\tilde A be a scaled version of AA, such that

A=1kA~. A = \frac{1}{ \sqrt k} \tilde{A}.

Denote v1,v2,…,vk∈Rdv_1, v_2, \ldots, v_k \in \mathbb{R}^d the row vectors of A~\tilde A. They are generated randomly and independently. Each vector viv_i (i∈[k]i \in [k]) satisfies

  1. Each entry of viv_i is generated independently;
  2. E[vi[j]]=0,∀j∈[d]\mathbb{E} \left[v_i [j] \right] = 0, \forall j \in [d], i.e., each entry has mean zero;
  3. Var[vi[j]]=1,∀j∈[d]\mathbb{Var} \left[ v_i [j] \right] = 1, \forall j \in [d], i.e., each entry has variance one.

For a fixed pair x,y∈Ux, y \in \mathcal{U}, define z=x−yz = x - y. Consider

∥Az∥22=1k∥A~z∥22=1k∑i∈[k]⟨vi,z⟩2. \Vert A z \Vert_2^2 = \frac{1}{k} \Vert \tilde{A } z \Vert_2^2 = \frac{1}{k} \sum_{i \in [k] } \langle v_i, z \rangle^2.

Our assumption on vi,i∈[k]v_i, i \in [k] implies that the ⟨vi,z⟩2,i∈[k]\langle v_i, z \rangle^2, i \in [k] are independent random variables. We will verify that each of them has variance ∥z∥22\Vert z \Vert_2^2. For each i∈[k]i \in [k],

⟨vi,z⟩=∑j∈[d]vi[j]⋅z[j] \langle v_i, z \rangle = \sum_{j \in [d] } v_i [j] \cdot z[j]

can be view as the sum of dd independent random variables. Hence, by our assumption on viv_i, we have

Var[⟨vi,z⟩]=∑j∈[d]Var[vi[j]⋅z[j]]=∑j∈[d](z[j])2⋅Var[vi[j]]=∥z∥22. \mathbb{Var} \left[ \langle v_i, z \rangle \right] = \sum_{j \in [d] } \mathbb{Var}\left[ v_i [j] \cdot z[j] \right] = \sum_{j \in [d] } (z[j])^2 \cdot \mathbb{Var} \left[ v_i [j] \right] = \Vert z \Vert_2^2.

By linearity of expectation,

E[⟨vi,z⟩]=∑j∈[d]E[vi[j]⋅z[j]]=∑j∈[d]z[j]⋅E[vi[j]]=0. \mathbb{E} \left[ \langle v_i, z \rangle \right] = \sum_{j \in [d] } \mathbb{E}\left[ v_i [j] \cdot z[j] \right] = \sum_{j \in [d] } z[j] \cdot \mathbb{E} \left[ v_i [j] \right] = 0.

It concludes that

E[⟨vi,z⟩2]=Var[⟨vi,z⟩]−(E[⟨vi,z⟩])2=∥z∥22. \mathbb{E} \left[ \langle v_i, z \rangle^2 \right] = \mathbb{Var} \left[ \langle v_i, z \rangle \right] - \big( \mathbb{E} \left[ \langle v_i, z \rangle \right] \big)^2 = \Vert z \Vert_2^2.

Therefore, ∥Az∥22\Vert A z \Vert_2^2 can be viewed as the average of kk independent, mean ∥z∥22\Vert z \Vert_2^2 random variables. By the law of large numbers, the average should concentrate around ∥z∥22\Vert z \Vert_2^2. The analysis of the concentration phenomenon depends on the detailed implementation of A~\tilde A.

Gaussian

In this section, we discuss a possible implementation of AA.

Let A~∈Rk×d\tilde A \in \mathbb{R}^{k \times d} be a random matrix, each entry of which is generated independently from standard normal distribution. Let u~1,…,u~d\tilde u_1, \ldots, \tilde u_d be the column vectors, and v~1,…,v~k\tilde v_1, \ldots, \tilde v_k be the row vectors of A~\tilde A. Define A≐1kA~A \doteq \frac{1}{\sqrt k} \tilde{A}. Hence, for the column and row vectors of AA, it holds that ui=1ku~i,i∈[d]u_i = \frac{1}{\sqrt k} \tilde u_i, i \in [d] and vi=1kv~i,i∈[k]v_i = \frac{1}{\sqrt k} \tilde v_i, i \in [k].

It is easy to see that AA satisfies previous discussed column and row properties.

Define σ2=∥z∥22\sigma^2 = \Vert z \Vert_2^2, and

Xi≐⟨vi~,z⟩=∑j∈[d]vi~[j]⋅z[j],∀i∈[k]. X_i \doteq \langle \tilde{v_i}, z \rangle = \sum_{j \in [d]} \tilde{v_i} [j] \cdot z[j], \qquad \forall i \in [k].

Since each vi~[j]∼N(0,1)\tilde{v_i} [j] \sim N(0, 1), it follows that Xi∼N(0,σ2)X_i \sim N(0, \sigma^2). Then

E[Xi2]=σ2. \mathbb{E} \left[ X_i^2 \right] = \sigma^2.

And

E[∥Az∥22]=1kE[∥A~z∥22]=1k∑i∈[k]E[⟨vi~,z⟩2]=σ2. \mathbb{E} \left[ \Vert A z \Vert_2^2 \right] = \frac{1}{k} \mathbb{E} \left[ \Vert \tilde{A } z \Vert_2^2 \right] = \frac{1}{k} \sum_{i \in [k] } \mathbb{E} \left[ \langle \tilde{v_i}, z \rangle^2 \right] = \sigma^2.

Theorem. (Chernoff bound for the χ2\chi^2 distribution). Let Xi∼N(0,σ2),i∈[k]X_i \sim N(0, \sigma^2), i \in [k] be independent random variables. Then

Pr⁡[1k∑i∈[k]Xi2≥(1+ϵ)⋅σ2]≤exp⁡(−k2(ϵ2/2−ϵ3/3)),Pr⁡[1k∑i∈[k]Xi2≤(1−ϵ)⋅σ2]≤exp⁡(−k4ϵ2). \begin{aligned} \Pr \left[ \frac{1}{k} \sum_{ i \in [k] } X_i^2 \ge (1 + \epsilon) \cdot \sigma^2 \right] &\le \exp \left( - \frac{k}{2} ( \epsilon^2 / 2 - \epsilon^3 / 3) \right), \\ \Pr \left[ \frac{1}{k} \sum_{ i \in [k] } X_i^2 \le (1 - \epsilon) \cdot \sigma^2 \right] &\le \exp \left( - \frac{k}{4} \epsilon^2 \right). \end{aligned}

The proof of the theorem is based on the following lemma.

Lemma. It holds that

Pr⁡(∥Az∥22≥(1+ϵ)∥z∥22)≤exp⁡(−k⋅(ϵ−ln⁡(1+ϵ))2),Pr⁡(∥Az∥22≤(1−ϵ)∥z∥22)≤exp⁡(k⋅(ϵ+ln⁡(1−ϵ))2). \begin{aligned} \Pr \left( \Vert A z \Vert_2^2 \ge (1 + \epsilon) \Vert z \Vert_2^2 \right) &\le \exp \left( - \frac{k \cdot (\epsilon - \ln (1 + \epsilon) ) }{2} \right), \\ \Pr \left( \Vert A z \Vert_2^2 \le (1 - \epsilon) \Vert z \Vert_2^2 \right) &\le \exp\left( \frac{k \cdot (\epsilon + \ln (1 - \epsilon) ) }{2} \right). \end{aligned}

Proof of the Theorem. As ∀ϵ∈[0,1)\forall \epsilon \in [0, 1),

ln⁡(1+ϵ)=ϵ−ϵ22+ϵ33−(ϵ44−ϵ55)−(ϵ66+ϵ77)−…≤ϵ−ϵ22+ϵ33,ϵ−ln⁡(1+ϵ)=∫0ϵ(1−11+x) dx≥∫0ϵx1+ϵ dx=ϵ22(1+ϵ),ln⁡(1−ϵ)=−ϵ−ϵ22−ϵ33−ϵ44−…≤−ϵ−ϵ22−ϵ33, \begin{aligned} \ln(1 + \epsilon) &= \epsilon - \frac{\epsilon^2}{2} + \frac{\epsilon^3}{3} - \left( \frac{\epsilon^4}{4} - \frac{\epsilon^5}{5} \right) - \left( \frac{\epsilon^6}{6} + \frac{\epsilon^7}{7} \right) - \ldots \le \epsilon - \frac{\epsilon^2}{2} + \frac{\epsilon^3}{3}, \\ \epsilon - \ln(1 + \epsilon) &= \int_0^\epsilon \left( 1 - \frac{1}{1 + x} \right) \, d x \ge \int_0^\epsilon \frac{x}{1 + \epsilon} \, d x = \frac{\epsilon^2}{2(1 + \epsilon)}, \\ \ln(1 - \epsilon) &= -\epsilon - \frac{\epsilon^2}{2} - \frac{\epsilon^3}{3} - \frac{\epsilon^4}{4} - \ldots\le - \epsilon - \frac{\epsilon^2}{2} - \frac{\epsilon^3}{3}, \end{aligned}

we get

Pr⁡(∥Az∥22≥(1+ϵ)∥z∥22)≤exp⁡(−k2⋅(ϵ22−ϵ33)). \Pr \left( \Vert A z \Vert_2^2 \ge (1 + \epsilon) \Vert z \Vert_2^2 \right) \le \exp \left( - \frac{k}{2} \cdot \left( \frac{\epsilon^2}{2} - \frac{\epsilon^3}{3} \right) \right) .

and

Pr⁡(∥Az∥22≤(1−ϵ)∥z∥22)≤exp⁡(k⋅(ϵ−ϵ−ϵ22−ϵ33)2)≤exp⁡(−k4ϵ2). \Pr \left( \Vert A z \Vert_2^2 \le (1 - \epsilon) \Vert z \Vert_2^2 \right) \le \exp\left( \frac{k \cdot (\epsilon - \epsilon - \frac{\epsilon^2}{2} - \frac{\epsilon^3}{3} ) }{2} \right) \le \exp \left( - \frac{k }{4} \epsilon^2 \right).

□\square

To prove the lemma, we have the following fact.

Fact. (Moment Generating Function of Normal Distribution). Let X∼N(0,σ2)X \thicksim N(0,\sigma^2), then for λ<12σ2\lambda < \frac{1}{2 \sigma^2}, we have

E[eλX2]=11−2σ2λ. \mathbb{E} \left[ e^{ \lambda X^2 } \right] = \frac{1}{ \sqrt{ 1 - 2 \sigma^2 \lambda} }.

Proof of the Fact.

E[eλX2]=12πσ∫eλx2e−x2/(2σ2) dx=12πσ∫exp⁡(−(1−2σ2λ)x22σ2) dx=11−2σ2λ. \begin{aligned} \mathbb{E} \left[ e^{ \lambda X^2 } \right] &= \frac{1}{ \sqrt{2 \pi \sigma } } \int e^{ \lambda x^2 } e^{ -x^2 / \big( 2 \sigma^2 \big) } \ dx \\ &= \frac{1}{ \sqrt{2 \pi \sigma } } \int \exp \left(- \frac{ (1 - 2 \sigma^2 \lambda ) x^2}{2 \sigma^2 } \right) \ dx \\ &= \frac{1}{ \sqrt{1 - 2 \sigma^2 \lambda } }. \end{aligned}

□\square

Proof of Lemma. Let σ2≐∥z∥22\sigma^2 \doteq \Vert z \Vert_2^2, and Xi=⟨vi,z⟩,∀i∈[k]X_i = \langle v_i, z \rangle, \forall i \in [k]. Then Xi,∀i∈[k]X_i, \forall i \in [k] are independent normal random variables with variance σ2\sigma^2. By the previous fact, for each λ<12σ2\lambda < \frac{1}{2 \sigma^2}, it holds that

Pr⁡(∥Az∥22≥(1+ϵ)∥z∥22)=Pr⁡(1k∑i∈[k]⟨vi,z⟩2≥(1+ϵ)⋅σ2)=Pr⁡(∑i∈[k]Xi2≥k⋅(1+ϵ)⋅σ2)=Pr⁡(exp⁡(λ∑i∈[k]Xi2)≥exp⁡(λ⋅k⋅(1+ϵ)⋅σ2))≤E[exp⁡(λX2)]kexp⁡(λ⋅k⋅(1+ϵ)⋅σ2)=(1exp⁡(λ⋅(1+ϵ)⋅σ2)⋅1−2⋅σ2⋅λ)k. \begin{aligned} \Pr \left( \Vert A z \Vert_2^2 \ge (1 + \epsilon) \Vert z \Vert_2^2 \right) & = \Pr \left( \frac{1}{k} \sum_{i \in [k] } \langle v_i, z \rangle^2 \ge (1 + \epsilon) \cdot \sigma^2 \right) \\ & = \Pr \left( \sum_{i \in [k] } X_i^2 \ge k \cdot (1 + \epsilon) \cdot \sigma^2 \right) \\ & = \Pr \left( \exp \left( \lambda \sum_{i \in [k] } X_i^2 \right)\ge \exp \left( \lambda \cdot k \cdot (1 + \epsilon) \cdot \sigma^2 \right) \right) \\ &\le \frac{\mathbb{E} [ \exp(\lambda X^2 ) ]^k}{ \exp( \lambda \cdot k \cdot (1 + \epsilon) \cdot \sigma^2 ) } \\ &= \left( \frac{1}{ \exp( \lambda \cdot (1 + \epsilon) \cdot \sigma^2 ) \cdot \sqrt{1 - 2 \cdot \sigma^2 \cdot \lambda} } \right)^k. \end{aligned}

We want to find a λ\lambda that minimizes the RHS. Let

f=λ⋅(1+ϵ)⋅σ2+12ln⁡(1−2⋅σ2⋅λ). f = \lambda \cdot (1 + \epsilon) \cdot \sigma^2 + \frac{1}{2} \ln (1 - 2 \cdot \sigma^2 \cdot \lambda).

Taking the derivative with respect to λ\lambda,

∂f∂λ=(1+ϵ)⋅σ2+12⋅11−2⋅σ2⋅λ⋅(−2⋅σ2)=σ2⋅((1+ϵ)−11−2⋅σ2⋅λ). \begin{aligned} \frac{ \partial f }{ \partial \lambda} &= (1 + \epsilon) \cdot \sigma^2 + \frac{1}{2} \cdot \frac{1}{1 - 2 \cdot \sigma^2 \cdot \lambda} \cdot (-2 \cdot \sigma^2 ) \\ &= \sigma^2 \cdot \left( (1 + \epsilon) - \frac{1}{ 1 - 2 \cdot \sigma^2 \cdot \lambda } \right). \end{aligned}

Hence ff increases when λ<ϵ2⋅σ2⋅(1+ϵ)\lambda < \frac{ \epsilon }{ 2 \cdot \sigma^2 \cdot (1 + \epsilon) } and decreases afterwards. It follows that

Pr⁡(∥Az∥22≥(1+ϵ)∥z∥22)≤(1exp⁡(ϵ2⋅σ2⋅(1+ϵ)⋅(1+ϵ)⋅σ2)⋅1−2⋅σ2⋅ϵ2⋅σ2⋅(1+ϵ))k=(1+ϵexp⁡(ϵ/2))k=exp⁡(−k⋅(ϵ−ln⁡(1+ϵ))2). \begin{aligned} \Pr \left( \Vert A z \Vert_2^2 \ge (1 + \epsilon) \Vert z \Vert_2^2 \right) &\le \left( \frac{1}{ \exp( \frac{ \epsilon }{ 2 \cdot \sigma^2 \cdot (1 + \epsilon) } \cdot (1 + \epsilon) \cdot \sigma^2 ) \cdot \sqrt{1 - 2 \cdot \sigma^2 \cdot \frac{ \epsilon }{ 2 \cdot \sigma^2 \cdot (1 + \epsilon) } } } \right)^k \\ &= \left( \frac{ \sqrt{1 + \epsilon} }{ \exp( \epsilon / 2) } \right)^k \\ &= \exp \left( - \frac{k \cdot (\epsilon - \ln (1 + \epsilon) ) }{2} \right). \end{aligned}

Similarly, we have

Pr⁡(∥Az∥22≤(1−ϵ)∥z∥22)=Pr⁡(1k∑i∈[k]⟨vi,z⟩2≤(1−ϵ)⋅σ2)=Pr⁡(∑i∈[k]Xi2≤k⋅(1−ϵ)⋅σ2)=Pr⁡(exp⁡(−λ∑i∈[k]Xi2)≥exp⁡(−λ⋅k⋅(1−ϵ)⋅σ2))≤E[exp⁡(−λX2)]kexp⁡(−λ⋅k⋅(1−ϵ)⋅σ2)=(1exp⁡(−λ⋅(1−ϵ)⋅σ2)⋅1+2⋅σ2⋅λ)k. \begin{aligned} \Pr \left( \Vert A z \Vert_2^2 \le (1 - \epsilon) \Vert z \Vert_2^2 \right) & = \Pr \left( \frac{1}{k} \sum_{i \in [k] } \langle v_i, z \rangle^2 \le (1 - \epsilon) \cdot \sigma^2 \right) \\ & = \Pr \left( \sum_{i \in [k] } X_i^2 \le k \cdot (1 - \epsilon) \cdot \sigma^2 \right) \\ & = \Pr \left( \exp \left( - \lambda \sum_{i \in [k] } X_i^2 \right) \ge \exp \left( - \lambda \cdot k \cdot (1 - \epsilon) \cdot \sigma^2 \right) \right) \\ &\le \frac{\mathbb{E} [ \exp( -\lambda X^2 ) ]^k}{ \exp( - \lambda \cdot k \cdot (1 - \epsilon) \cdot \sigma^2 ) } \\ &= \left( \frac{1}{ \exp( -\lambda \cdot (1 - \epsilon) \cdot \sigma^2 ) \cdot \sqrt{ 1 + 2 \cdot \sigma^2 \cdot \lambda} } \right)^k. \end{aligned}

Taking λ=ϵ2⋅σ2⋅(1−ϵ)\lambda = \frac{ \epsilon }{ 2 \cdot \sigma^2 \cdot (1 - \epsilon) }, we get

Pr⁡(∥Az∥22≤(1−ϵ)σ2)≤(1exp⁡(−ϵ2⋅σ2⋅(1−ϵ)⋅(1−ϵ)⋅σ2)⋅1+2⋅σ2⋅ϵ2⋅σ2⋅(1−ϵ))k=(1−ϵexp⁡(ϵ/2))k=exp⁡(k⋅(ϵ+ln⁡(1−ϵ))2). \begin{aligned} \Pr \left( \Vert A z \Vert_2^2 \le (1 - \epsilon) \sigma^2 \right) &\le \left( \frac{1}{ \exp( - \frac{ \epsilon }{ 2 \cdot \sigma^2 \cdot (1 - \epsilon) } \cdot (1 - \epsilon) \cdot \sigma^2 ) \cdot \sqrt{ 1 + 2 \cdot \sigma^2 \cdot \frac{ \epsilon }{ 2 \cdot \sigma^2 \cdot (1 - \epsilon) } } } \right)^k \\ &= \left( \sqrt{1 - \epsilon} \exp( \epsilon / 2) \right)^k \\ &= \exp\left( \frac{k \cdot (\epsilon + \ln (1 - \epsilon) ) }{2} \right). \end{aligned}

□\square

Rademacher

In this implementation, A~∈Rk×d\tilde A \in \mathbb{R}^{k \times d} is a random matrix, each entry of which is independent Rademacher random variables, which equals 11 and −1-1 with the equal probability.

Let u~1,…,u~d\tilde u_1, \ldots, \tilde u_d be the column vectors, and v~1,…,v~k\tilde v_1, \ldots, \tilde v_k be the row vectors of A~\tilde A. Define A≐1kA~A \doteq \frac{1}{\sqrt k} \tilde{A}. Hence, for the column and row vectors of AA, it holds that ui=1ku~i,i∈[d]u_i = \frac{1}{\sqrt k} \tilde u_i, i \in [d] and vi=1kv~i,i∈[k]v_i = \frac{1}{\sqrt k} \tilde v_i, i \in [k].

It is easy to see that AA satisfies previous discussed column and row properties.

As before, let σ2=∥z∥22\sigma^2 = \Vert z \Vert_2^2, and

Xi≐⟨vi~,z⟩=∑j∈[d]vi~[j]⋅z[j],∀i∈[k]. X_i \doteq \langle \tilde{v_i}, z \rangle = \sum_{j \in [d]} \tilde{v_i} [j] \cdot z[j], \qquad \forall i \in [k].

Since E[vi~[j]2]=1\mathbb{E} \left[ \tilde{v_i} [j]^2 \right] = 1, and E[vi~[j]]=0\mathbb{E} \left[ \tilde{v_i} [j] \right] = 0, we have

E[Xi2]=∑j,j′∈[d]z[j]⋅z[j′]⋅E[vi~[j]⋅vi~[j′]]=∑j∈[d]z[j]2⋅E[vi~[j]2]+∑j,j′∈[d],j≠j′z[j]⋅z[j′]⋅E[vi~[j]]⋅E[vi~[j′]]=σ2. \begin{aligned} \mathbb{E} \left[ X_i^2 \right] &= \sum_{j, j' \in [d]} z[j] \cdot z[j'] \cdot \mathbb{E} \left[ \tilde{v_i} [j] \cdot \tilde{v_i} [j'] \right] \\ &= \sum_{j \in [d]} z[j]^2 \cdot \mathbb{E} \left[ \tilde{v_i} [j]^2 \right] + \sum_{j, j' \in [d], j \neq j'} z[j] \cdot z[j'] \cdot \mathbb{E} \left[ \tilde{v_i} [j] \right] \cdot \mathbb{E} \left[ \tilde{v_i} [j'] \right] \\ &= \sigma^2. \end{aligned}

And

E[∥Az∥22]=1kE[∥A~z∥22]=1k∑i∈[k]E[⟨vi~,z⟩2]=σ2. \mathbb{E} \left[ \Vert A z \Vert_2^2 \right] = \frac{1}{k} \mathbb{E} \left[ \Vert \tilde{A } z \Vert_2^2 \right] = \frac{1}{k} \sum_{i \in [k] } \mathbb{E} \left[ \langle \tilde{v_i}, z \rangle^2 \right] = \sigma^2.

Theorem. (Chernoff bound for the χ2\chi^2 distribution). Let Xi∼N(0,σ2),i∈[k]X_i \sim N(0, \sigma^2), i \in [k] be independent random variables. Then

Pr⁡[1k∑i∈[k]Xi2≥(1+ϵ)⋅σ2]≤exp⁡(−k2(ϵ2/2−ϵ3/3)),Pr⁡[1k∑i∈[k]Xi2≤(1−ϵ)⋅σ2]≤exp⁡(−k4ϵ2). \begin{aligned} \Pr \left[ \frac{1}{k} \sum_{ i \in [k] } X_i^2 \ge (1 + \epsilon) \cdot \sigma^2 \right] &\le \exp \left( - \frac{k}{2} ( \epsilon^2 / 2 - \epsilon^3 / 3) \right), \\ \Pr \left[ \frac{1}{k} \sum_{ i \in [k] } X_i^2 \le (1 - \epsilon) \cdot \sigma^2 \right] &\le \exp \left( - \frac{k}{4} \epsilon^2 \right). \end{aligned}

Upper Bound

To prove the upper bound, it suffices to establish the following theorem. The rest of the proof is the same as the one in the previous section.

Lemma. (Moment Generating Function). Let X=∑j∈[d]v~[j]⋅z[j]X =\sum_{j \in [d]} \tilde{v} [j] \cdot z[j], where v~[j],j∈[d]\tilde{v} [j], j \in [d] are independent Rademacher random variables. Then for 0≤λ<12σ20 \le \lambda < \frac{1}{2 \sigma^2}, we have

E[eλX2]≤11−2σ2λ. \mathbb{E} \left[ e^{ \lambda X^2 } \right] \le \frac{1}{ \sqrt{ 1 - 2 \sigma^2 \lambda} }.

Proof. Let Y=∑j∈[d]w[j]⋅z[j]Y =\sum_{j \in [d]} w [j] \cdot z[j], where w[j],j∈[d]w [j], j \in [d] are independent standard gaussian random variables. Then Y∼N(0,σ2)Y \sim N(0, \sigma^2), and

E[eλY2]=11−2σ2λ. \mathbb{E} \left[ e^{ \lambda Y^2 } \right] = \frac{1}{ \sqrt{ 1 - 2 \sigma^2 \lambda} }.

Our goal is to prove that E[eλX2]≤E[eλY2]\mathbb{E} \left[ e^{ \lambda X^2 } \right] \le \mathbb{E} \left[ e^{ \lambda Y^2 } \right].

Since X2m≥0,λ≥0X^{2m} \ge 0, \lambda \ge 0, via monotone convergence theorem,

E[exp⁡(λX2)]=E[lim⁡t→∞∑m=0tλmX2mm!]=lim⁡t→∞∑m=0tE[λmX2mm!]=∑m=0∞λmE[X2m]m!. \begin{aligned} \mathbb{E} \left[ \exp \left( \lambda X^2 \right) \right] &= \mathbb{E} \left[ \lim_{t \rightarrow \infty} \sum_{m = 0}^t \frac{\lambda^m X^{2m}}{m!} \right] \\ &= \lim_{t \rightarrow \infty} \sum_{m = 0}^t \mathbb{E} \left[ \frac{\lambda^m X^{2m}}{m!} \right] = \sum_{m = 0}^\infty \frac{\lambda^m \mathbb{E} \left[ X^{2m} \right] }{m!} . \end{aligned}

Following similar vein, we have

E[exp⁡(λY2)]=∑m=0∞λmE[Y2m]m!. \begin{aligned} \mathbb{E} \left[ \exp \left( \lambda Y^2 \right) \right] = \sum_{m = 0}^\infty \frac{\lambda^m \mathbb{E} \left[ Y^{2m} \right] }{m!} . \end{aligned}

It suffices to prove that E[X2m]≤E[Y2m]\mathbb{E} \left[ X^{2m} \right] \le \mathbb{E} \left[ Y^{2m} \right] for each m∈Nm \in \mathbb{N}.

Note,

E[X2m]=∑m1,…,mdm1+…+md=2m(2mm1,…,md)∏j∈[d](z[j])mjE[(v~[j])mj],E[Y2m]=∑m1,…,mdm1+…+md=2m(2mm1,…,md)∏j∈[d](z[j])mjE[(w[j])mj]. \begin{aligned} \mathbb{E} \left[ X^{2m} \right] &= \sum_{ \begin{array}{c} m_1, \ldots, m_d \\ m_1 + \ldots + m_d = 2m \end{array} } \binom{2m}{m_1, \ldots, m_d} \prod_{j \in [d]} \Big( z[j] \Big)^{m_j} \mathbb{E} \left[ \Big( \tilde{v} [j] \Big)^{m_j} \right], \end{aligned} \\ \begin{aligned} \mathbb{E} \left[ Y^{2m} \right] &= \sum_{ \begin{array}{c} m_1, \ldots, m_d \\ m_1 + \ldots + m_d = 2m \end{array} } \binom{2m}{m_1, \ldots, m_d} \prod_{j \in [d]} \Big( z[j] \Big)^{m_j} \mathbb{E} \left[ \Big( w [j] \Big)^{m_j} \right]. \end{aligned}

We compare these expansions:

  • If mjm_j is odd, then E[(v~[j])mj]=E[(w[j])mj]=0\mathbb{E} \left[ \Big( \tilde{v} [j] \Big)^{m_j} \right] = \mathbb{E} \left[ \Big( w [j] \Big)^{m_j} \right] = 0.

  • If mjm_j is even, then (z[j])mj≥0\Big( z[j] \Big)^{m_j} \ge 0, and 1=E[(v~[j])mj]≤E[(w[j])mj]=(mj−1)!!1 = \mathbb{E} \left[ \Big( \tilde{v} [j] \Big)^{m_j} \right] \le \mathbb{E} \left[ \Big( w [j] \Big)^{m_j} \right] = (m_j - 1)!!.

This proves that E[X2m]≤E[Y2m]\mathbb{E} \left[ X^{2m} \right] \le \mathbb{E} \left[ Y^{2m} \right].

□\square

Lower Bound

We need the following facts.

Fact. For t≥0t \ge 0,

e−t≤1−t+t22. e^{-t} \le 1 - t + \frac{t^2}{2}.

Further, in the previous section, we prove that

Fact. Let X≐∑j∈[d]v~[j]⋅z[j]X \doteq \sum_{j \in [d]} \tilde{v} [j] \cdot z[j], where v~[j],j∈[d]\tilde{v} [j], j \in [d] are independent Rademacher random variables, and Y≐∑j∈[d]w[j]⋅z[j]Y \doteq \sum_{j \in [d]} w [j] \cdot z[j], where w[j],j∈[d]w [j], j \in [d] are independent standard gaussian random variables. Then

E[X4]≤E[Y4]. \mathbb{E}[X^4] \le \mathbb{E} [Y^4].

Noting that Y∼N(0,σ2)Y \sim N(0, \sigma^2), we can show E[Y4]=σ2(4−1)!!=3σ2\mathbb{E}[Y^4] = \sigma^2 (4 - 1)!! = 3 \sigma^2.

Proof. For each λ>0\lambda > 0,

Pr⁡[∥Az∥22≤(1−ϵ)∥z∥22]=Pr⁡[∑i∈[k]Xi2≤k⋅(1−ϵ)⋅σ2]=Pr⁡[exp⁡(−λ∑i∈[k]Xi2)≥exp⁡(−λ⋅k⋅(1−ϵ)⋅σ2)]≤E[exp⁡(−λX2)]kexp⁡(−λ⋅k⋅(1−ϵ)⋅σ2)≤λX2≥0(E[1−λX2+λ2X42])kexp⁡(λ⋅k⋅(1−ϵ)⋅σ2)≤(1−λσ2+λ2E[X4]2)kexp⁡(λ⋅k⋅(1−ϵ)⋅σ2)≤(1−λσ2+3λ2σ42)kexp⁡(λ⋅k⋅(1−ϵ)⋅σ2). \begin{aligned} \Pr \left[ \Vert A z \Vert_2^2 \le (1 - \epsilon) \Vert z \Vert_2^2 \right] & = \Pr \left[ \sum_{i \in [k] } X_i^2 \le k \cdot (1 - \epsilon) \cdot \sigma^2 \right] \\ & = \Pr \left[ \exp \left( - \lambda \sum_{i \in [k] } X_i^2 \right) \ge \exp \left( - \lambda \cdot k \cdot (1 - \epsilon) \cdot \sigma^2 \right) \right] \\ &\le \frac{ \mathbb{E} [ \exp( -\lambda X^2 ) ]^k}{ \exp( - \lambda \cdot k \cdot (1 - \epsilon) \cdot \sigma^2 ) } \\ &\stackrel{\lambda X^2 \ge 0}{\le} \left( \mathbb{E} \left[ 1 - \lambda X^2 + \frac{\lambda^2 X^4}{2} \right] \right)^k \exp \left( \lambda \cdot k \cdot (1 - \epsilon) \cdot \sigma^2 \right) \\ &\le \left( 1 - \lambda \sigma^2 + \frac{\lambda^2 \mathbb{E} \left[ X^4 \right] }{2} \right)^k \exp \left( \lambda \cdot k \cdot (1 - \epsilon) \cdot \sigma^2 \right) \\ &\le \left( 1 - \lambda \sigma^2 + \frac{3 \lambda^2 \sigma^4 }{2} \right)^k \exp \left( \lambda \cdot k \cdot (1 - \epsilon) \cdot \sigma^2 \right). \end{aligned}

Choosing λ=ϵ2σ2\lambda = \frac{\epsilon}{2 \sigma^2}, we have

(1−ϵ2+3ϵ28)kexp⁡(ϵ⋅k⋅(1−ϵ)2)≤exp⁡(−kϵ2+3kϵ28+ϵ⋅k⋅(1−ϵ)2)=exp⁡(3kϵ28−kϵ22)=exp⁡(−kϵ24). \begin{aligned} \left( 1 - \frac{\epsilon}{2} + \frac{3 \epsilon^2 }{8 } \right)^k \exp \left( \frac{\epsilon \cdot k \cdot (1 - \epsilon) }{2 } \right) &\le \exp \left( - \frac{k \epsilon}{2} + \frac{3 k \epsilon^2 }{8} + \frac{\epsilon \cdot k \cdot (1 - \epsilon) }{2} \right) \\ &= \exp \left( \frac{3 k \epsilon^2 }{8} - \frac{k \epsilon^2 }{2} \right) \\ &= \exp \left( - \frac{k \epsilon^2}{4} \right). \end{aligned}

□\square

Remark. For the proof of the lower bound, we only require the v~[j],j∈[d]\tilde{v} [j], j \in [d] to be 4-wise independent.

Reference

[1] J. Nelson, “Sketching and Streaming High-Dimensional Vectors,” p. 145.

[2]. D. Achlioptas, “Database-friendly random projections,” in PODS ’01.