
Randomized approximate distance guarantees
2026-11-18
Fix x_1,\ldots,x_n\in\mathbb R^d and \varepsilon,\delta\in (0,1). Draw G\in\mathbb R^{k\times d} with independent N(0,1) entries and set f(x)=Gx/\sqrt{k}. If k\geq\frac8{\varepsilon^2}\left(2\log n+\log\frac1\delta\right), then with probability at least 1-\delta, simultaneously for every pair i<j, \boxed{(1-\varepsilon)\|x_i-x_j\|^2 \leq\|f(x_i)-f(x_j)\|^2 \leq(1+\varepsilon)\|x_i-x_j\|^2.}
The bound for k is independent of d!
We did the main body of work in the previous concentration slides. Conceptually, there were two steps. For each fixed u\neq0, \frac{\|f(u)\|^2}{\|u\|^2} \overset{d}{=}\frac1k\sum_{r=1}^kg_r^2, \qquad g_r\overset{\mathrm{iid}}{\sim}N(0,1), so concentration for sums of squared Gaussians gives tail bound of at most 2e^{-k\varepsilon^2/8}.
Apply this to u=x_i-x_j and take a union bound: \Pr(\text{some pair fails}) \leq\binom n2\,2e^{-k\varepsilon^2/8} \leq n^2e^{-k\varepsilon^2/8}\leq\delta.
Discussion posts from 20 Newsgroups.
Word counts c_i \rightarrow unit vectors x_i=c_i/\|c_i\|.
Can we preserve distances in fewer coordinates?
Six example coordinates: telescope, satellite, orbit, team, goal, match.
| Post | Counts c_i | Normalized x_i |
|---|---|---|
| A: A telescope tracks a satellite in orbit. | (1,1,1,0,0,0) | \frac{1}{\sqrt3}(1,1,1,0,0,0) |
| B: A satellite enters orbit. | (0,1,1,0,0,0) | \frac{1}{\sqrt2}(0,1,1,0,0,0) |
| C: The team scores a goal in a match. | (0,0,0,1,1,1) | \frac{1}{\sqrt3}(0,0,0,1,1,1) |
Normalized squared distances: \|x_A-x_B\|^2\approx0.37, \qquad \|x_A-x_C\|^2=\|x_B-x_C\|^2=2.
Space posts are closer together.
One Gaussian map for all 300 posts: \underbrace{X}_{300\times130107}\; \underbrace{G^\top/\sqrt{k}}_{130107\times k} =\underbrace{Y}_{300\times k}.
Each dot is one pair of posts.

Fix k=2048 and find each post’s ten nearest neighbors in the original space (among these 300 posts).

Among these nearby pairs, 99.7% have squared-distance error at most 10%; the worst error is 11.2%.
Search again in the 2048-dimensional space. For each post, count how many of its original ten nearest neighbors are still in the projected top ten.

Small distance errors can reorder nearly tied neighbors.
MATH 123 · Randomized linear algebra