The Johnson–Lindenstrauss lemma for random sign matrices #
Fix n points of a finite-dimensional Euclidean space EuclideanSpace ℝ ι. A uniformly random
k × ι matrix of independent signs ±1, scaled by 1 / √k, keeps every squared pairwise distance
within a factor 1 ± ε, with probability at least 1 - n^(-β), once
k ≥ (4 + 2β) / (ε² / 2 - ε³ / 3) · log n. This is Achlioptas's theorem for the ±1 distribution
[Achlioptas2003, Theorem 1.1]. The union bound fails with probability at most
n (n - 1) exp (-(k / 2) (ε² / 2 - ε³ / 3)), and n (n - 1) < n², so the threshold for β = 0
already gives a positive probability of success. This is the Johnson–Lindenstrauss lemma
[JL84] with the constant of Dasgupta and Gupta [DasguptaGupta2003, Theorem 2.1]:
n points embed into dimension k ≥ 4 log n / (ε² / 2 - ε³ / 3) with distortion 1 ± ε. For
ε ≤ 1, k ≥ 24 log n / ε² suffices.
Achlioptas states the theorem for every ε > 0. Here ε < 3 / 2, which makes ε² / 2 - ε³ / 3
positive, and some restriction is needed. For ε = 2, β = 10 and the two points 0 and
(1, 1, 1, 1) the threshold is negative, so k = 1 meets it. But the single row maps
(1, 1, 1, 1) to the squared norm 16 > (1 + ε) · 4 with probability 1 / 8 > 2^(-10).
The seed is b : Fin k → ι → Bool, drawn uniformly. signProjection b is the linear map with
matrix (1 / √k) signVal (b j i). Probabilities are densities of finsets of seeds.
Proof #
For a fixed vector x with S = ‖x‖², the rows give independent Rademacher sums
Y_j = ∑ i, x i signVal (b j i), each with 𝔼 Y_j² = S, and k ‖signProjection b x‖² = ∑ j, Y_j².
- Upper tail. By Markov's inequality applied to
exp (t ∑ Y_j²), independence of the rows and the Gaussian comparison𝔼 exp (t Y²) ≤ 1 / √(1 - 2tS)(Cslib.BitString.expect_exp_mul_sq_sum_mul_signVal_le),Pr[∑ Y_j² > k (1 + ε) S] ≤ ((1 - 2tS)^(-1/2) exp (-t (1 + ε) S))^k. The choicetS = ε / (2 (1 + ε))gives(√(1 + ε) exp (-ε / 2))^k, and1 + ε ≤ exp (ε - ε² / 2 + ε³ / 3)bounds this byexp (-(k / 2) (ε² / 2 - ε³ / 3)). - Lower tail. Markov's inequality applied to
exp (-t ∑ Y_j²), withexp (-u) ≤ 1 - u + u² / 2and𝔼 Y⁴ ≤ 3 S², givesPr[∑ Y_j² < k (1 - ε) S] ≤ ((1 - tS + 3 (tS)² / 2) exp (tS (1 - ε)))^k. The same choice oftSgives the same bound forε ≤ 1, by an explicit polynomial inequality. Forε > 1the event is empty. - Union bound. The
n (n - 1) / 2pairs fail with probability at most2 eeach, wheree = exp (-(k / 2) (ε² / 2 - ε³ / 3)). The hypothesis onkgivese ≤ n^(-(2 + β)).
Achlioptas compares the even moments of Y_j with those of a Gaussian
[Achlioptas2003, Lemma 5.2]. Here the comparison goes through the moment generating function:
Y_j is sub-Gaussian, so exp (t Y_j²) is dominated by exp (t S Z²) for a standard Gaussian
Z. This is the standard sub-Gaussian comparison [Gupta2023, Lemma 11.9]. Both arguments give the
same per-vector bound [Achlioptas2003, Lemma 5.1].
Main definitions #
Cslib.Probability.signProjection: the scaled random sign projectionEuclideanSpace ℝ ι →ₗ[ℝ] EuclideanSpace ℝ (Fin k).
Main results #
Cslib.Probability.dens_lt_norm_signProjection_sq_le,Cslib.Probability.dens_norm_signProjection_sq_lt_le: each tail for a fixed vector is at mostexp (-(k / 2) (ε² / 2 - ε³ / 3)).Cslib.Probability.dens_lt_abs_norm_signProjection_sq_sub_le: the two-sided bound2 exp (-(k / 2) (ε² / 2 - ε³ / 3)).Cslib.Probability.one_sub_le_dens_forall_norm_signProjection_sq_mem_Icc: all pairwise squared distances amongnpoints are preserved with probability at least1 - n (n - 1) exp (-(k / 2) (ε² / 2 - ε³ / 3)).Cslib.Probability.one_sub_rpow_le_dens_forall_norm_signProjection_sq_mem_Icc: Achlioptas's theorem, with probability at least1 - n^(-β).Cslib.Probability.exists_signProjection_forall_norm_sq_mem_Icc,Cslib.Probability.exists_linearMap_forall_norm_sq_mem_Icc: the Johnson–Lindenstrauss lemma.
References #
- D. Achlioptas, Database-friendly random projections: Johnson–Lindenstrauss with binary coins
- S. Dasgupta, A. Gupta, An elementary proof of a theorem of Johnson and Lindenstrauss
- A. Gupta, Dimension Reduction and the JL Lemma, CMU 15-850 lecture notes
- W. B. Johnson, J. Lindenstrauss, Extensions of Lipschitz mappings into a Hilbert space
Scalar inequalities #
Tails of sums of squared Rademacher sums #
Upper tail: for k independent Rademacher sums Y_j = ∑ i, a i signVal (b j i) and
0 ≤ ε, Pr[k (1 + ε) ∑ a² < ∑ j, Y_j²] ≤ exp (-(k / 2) (ε² / 2 - ε³ / 3)).
Lower tail: for k independent Rademacher sums Y_j = ∑ i, a i signVal (b j i) and
0 ≤ ε, Pr[∑ j, Y_j² < k (1 - ε) ∑ a²] ≤ exp (-(k / 2) (ε² / 2 - ε³ / 3)).
Random sign projections #
The random sign projection with seed b : Fin k → ι → Bool: the linear map
EuclideanSpace ℝ ι → EuclideanSpace ℝ (Fin k) whose matrix has entries signVal (b j i) / √k.
For a uniformly random seed the entries are independent uniform signs ±1 / √k, Achlioptas's
±1 distribution [Ach03].
‖signProjection b x‖² = (1 / k) ∑ j, (∑ i, x i signVal (b j i))².
Upper tail for a vector [Ach03]: for 0 ≤ ε,
Pr[(1 + ε) ‖x‖² < ‖signProjection b x‖²] ≤ exp (-(k / 2) (ε² / 2 - ε³ / 3)).
Lower tail for a vector [Ach03]: for 0 ≤ ε,
Pr[‖signProjection b x‖² < (1 - ε) ‖x‖²] ≤ exp (-(k / 2) (ε² / 2 - ε³ / 3)).
The distributional Johnson–Lindenstrauss lemma for sign matrices [Ach03]: for
0 ≤ ε, Pr[ε ‖x‖² < |‖signProjection b x‖² - ‖x‖²|] ≤ 2 exp (-(k / 2) (ε² / 2 - ε³ / 3)).
Finite point sets #
The Johnson–Lindenstrauss union bound [Ach03]: for n points and 0 ≤ ε, a
random sign projection keeps every squared pairwise distance in [1 - ε, 1 + ε] times its original
value with probability at least 1 - n (n - 1) exp (-(k / 2) (ε² / 2 - ε³ / 3)).
Achlioptas's theorem for sign matrices [Achlioptas2003, Theorem 1.1]: for n points,
0 < ε < 3 / 2, any real β and k ≥ (4 + 2β) / (ε² / 2 - ε³ / 3) · log n, a random sign
projection keeps every squared pairwise distance in [1 - ε, 1 + ε] times its original value with
probability at least 1 - n^(-β). The statement is informative for β > 0.
The Johnson–Lindenstrauss lemma with sign matrices [Ach03]
[DG03]: for n points, 0 < ε < 3 / 2 and k ≥ 4 log n / (ε² / 2 - ε³ / 3), some
sign projection keeps every squared pairwise distance in [1 - ε, 1 + ε] times its original value.
The Johnson–Lindenstrauss lemma [JL84] [DG03]: for n
points of EuclideanSpace ℝ ι, 0 < ε ≤ 1 and k ≥ 24 log n / ε², some linear map into
EuclideanSpace ℝ (Fin k) keeps every squared pairwise distance in [1 - ε, 1 + ε] times its
original value.