NLA-lib Explorer

The SRHT OSE

Library · Result group

Theorem (isObliviousSubspaceEmbedding_of_hasLaw_srht). The SRHT OSE: for a bounded orthonormal \mathbf{F} with constant \beta, 0 \le \varepsilon \le 1 and t \ge 0, the SRHT is an oblivious subspace embedding for dimension d with constants 1 \mp \varepsilon and failure probability 2 d \exp\Bigl(-\frac{\varepsilon^2 \lvert k \rvert}{3 \beta (d + 2\sqrt{d t} + 2t)}\Bigr) + \lvert n \rvert e^{-t}\,. [Woodruff2014, Theorem 7] (there r = \Omega(\varepsilon^{-2} \log d\, (\sqrt{d} + \sqrt{\log n})^2) rows, probability 0.99, real Walsh, n a power of two); [MartinssonTropp2020, §9.3] (d = O(k \log k), any SRTT); [HalkoMartinssonTropp2011, Theorem 11.1] (the SRFT with complex signs, 0.40 \le \sigma_{\min}, \sigma_{\max} \le 1.48, failure O(1/k)); [Tropp2011a, Theorems 1.3 and 3.1] (Walsh–Hadamard, orthonormal columns: the same constants at 4(\sqrt{d} + \sqrt{8 \log(d \lvert n \rvert)})^2 \log d rows, and 1/\sqrt{6} \le \sigma_{\min}, \sigma_{\max} \le \sqrt{13/6} outside probability 3/d). Here any field, any \mathbf{F} with entry bound \beta, the tail in natural parameters. For \lvert n \rvert < \lvert k \rvert the law is 0, so \mu = 0.

Headline (provisional) General form: sizes are index types

Lean statement and details
NLAlib.isObliviousSubspaceEmbedding_of_hasLaw_srht.{u_1, u_2, u_3, u_4} {Ω : Type u_1}
  {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {𝕜 : Type u_2} [RCLike 𝕜] {k : Type u_3} {n : Type u_4}
  [Fintype k] [Fintype n] [DecidableEq n] {S : Ω → Matrix k n 𝕜} {F : Matrix n n 𝕜} {β ε t : ℝ}
  (hF : IsBoundedOrthonormal F β) (hS : HasLaw S (srht k F) μ) (d : ℕ) (hε : 0 ≤ ε) (hε1 : ε ≤ 1)
  (ht : 0 ≤ t) :
  IsObliviousSubspaceEmbedding S d (1 - ε) (1 + ε)
    (2 * ↑d * rexp (-ε ^ 2 * ↑(Fintype.card k) / (3 * (β * (↑d + 2 * √(↑d * t) + 2 * t)))) +
      ↑(Fintype.card n) * rexp (-t))
    μ

Full source on GitHub

Copy link

Other forms

Theorem (isObliviousSubspaceEmbedding_of_hasLaw_srhtWithReplacement). The SRHT OSE with replacement: with failure probability 2 d\, e^{-\varepsilon^2 \lvert k \rvert / (3 \beta (d + 2 \sqrt{d t} + 2 t))} + \lvert n \rvert e^{-t} \,, the bound of NLAlib.isObliviousSubspaceEmbedding_of_hasLaw_srht for i.i.d. uniform indices. [MartinssonTropp2020, §9.3].

General form: sizes are index types

Lean statement and details
NLAlib.isObliviousSubspaceEmbedding_of_hasLaw_srhtWithReplacement.{u_1, u_2, u_3, u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {𝕜 : Type u_2} [RCLike 𝕜] {k : Type u_3}
  {n : Type u_4} [Fintype k] [Fintype n] [DecidableEq n] {S : Ω → Matrix k n 𝕜} {F : Matrix n n 𝕜}
  {β ε t : ℝ} (hF : IsBoundedOrthonormal F β) (hS : HasLaw S (srhtWithReplacement k F) μ) (d : ℕ)
  (hε : 0 ≤ ε) (hε1 : ε ≤ 1) (ht : 0 ≤ t) :
  IsObliviousSubspaceEmbedding S d (1 - ε) (1 + ε)
    (2 * ↑d * rexp (-ε ^ 2 * ↑(Fintype.card k) / (3 * (β * (↑d + 2 * √(↑d * t) + 2 * t)))) +
      ↑(Fintype.card n) * rexp (-t))
    μ

Full source on GitHub

Copy link

Theorem (isObliviousSubspaceEmbedding_of_hasLaw_srhtWithReplacement_of_samplingEmbeddingDim_le). The SRHT OSE with replacement, sample-size form: for a bounded orthonormal transform \mathbf{F} with bound \beta (NLAlib.IsBoundedOrthonormal), 0 < \varepsilon \le 1 and \delta > 0, the SRHT with i.i.d. uniform row indices is an oblivious subspace embedding for dimension d with constants 1 \mp \varepsilon and failure probability \delta once it has <!-- value samplingEmbeddingDim d L \varepsilon (\delta/2) --> \lvert k \rvert \ge \frac{3 L \log(2d/(\delta/2))}{\varepsilon^2} rows (NLAlib.samplingEmbeddingDim d L ε (δ/2)), where the flattened coherence <!-- value srhtRowBound {\lvert n \rvert} d (\delta/2) --> L = \beta\,\bigl(d + 2\sqrt{d \log(\lvert n \rvert/(\delta/2))} + 2 \log(\lvert n \rvert/(\delta/2))\bigr) is \beta times NLAlib.srhtRowBound (Fintype.card n) d (δ / 2); flattening and sampling each fail with probability at most \delta/2. [MartinssonTropp2020, §9.3]. Asymptotic form: NLAlib.exists_forall_isObliviousSubspaceEmbedding_of_hasLaw_srhtWithReplacement.

General form: sizes are index types

Lean statement and details
NLAlib.isObliviousSubspaceEmbedding_of_hasLaw_srhtWithReplacement_of_samplingEmbeddingDim_le.{u_1,
    u_2, u_3, u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {𝕜 : Type u_2} [RCLike 𝕜] {k : Type u_3}
  {n : Type u_4} [Fintype k] [Fintype n] [DecidableEq n] {S : Ω → Matrix k n 𝕜} {F : Matrix n n 𝕜}
  {β ε δ : ℝ} (hF : IsBoundedOrthonormal F β) (hS : HasLaw S (srhtWithReplacement k F) μ) (d : ℕ)
  (hε : 0 < ε) (hε1 : ε ≤ 1) (hδ : 0 < δ)
  (hk :
    samplingEmbeddingDim d (β * srhtRowBound (Fintype.card n) d (δ / 2)) ε (δ / 2) ≤
      ↑(Fintype.card k)) :
  IsObliviousSubspaceEmbedding S d (1 - ε) (1 + ε) δ μ

Full source on GitHub

Copy link

Theorem (isObliviousSubspaceEmbedding_of_hasLaw_srht_of_samplingEmbeddingDim_le). The SRHT OSE, sample-size form: for 0 < \varepsilon \le 1 and \delta > 0, the SRHT is an oblivious subspace embedding for dimension d with constants 1 \mp \varepsilon and failure probability \delta once it has <!-- value samplingEmbeddingDim d L \varepsilon (\delta/2) --> \lvert k \rvert \ge \frac{3 L \log(2d/(\delta/2))}{\varepsilon^2} rows (NLAlib.samplingEmbeddingDim d L ε (δ/2)), where the flattened coherence <!-- value srhtRowBound {\lvert n \rvert} d (\delta/2) --> L = \beta\,\bigl(d + 2\sqrt{d \log(\lvert n \rvert/(\delta/2))} + 2 \log(\lvert n \rvert/(\delta/2))\bigr) is \beta times NLAlib.srhtRowBound (Fintype.card n) d (δ / 2); flattening and sampling each fail with probability at most \delta/2. The size of uniform row sampling at the flattened coherence. [Woodruff2014, Theorem 7]; [Tropp2011a, Theorem 3.1] (Walsh–Hadamard, constant distortion at 4(\sqrt{d} + \sqrt{8 \log(d \lvert n \rvert)})^2 \log d rows, failure 3/d). The tail NLAlib.isObliviousSubspaceEmbedding_of_hasLaw_srht at t = \log(2\lvert n \rvert / \delta), where \lvert n \rvert e^{-t} = \delta/2. Asymptotic form: NLAlib.exists_forall_isObliviousSubspaceEmbedding_of_hasLaw_srht.

General form: sizes are index types

Lean statement and details
NLAlib.isObliviousSubspaceEmbedding_of_hasLaw_srht_of_samplingEmbeddingDim_le.{u_1, u_2, u_3, u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {𝕜 : Type u_2} [RCLike 𝕜] {k : Type u_3}
  {n : Type u_4} [Fintype k] [Fintype n] [DecidableEq n] {S : Ω → Matrix k n 𝕜} {F : Matrix n n 𝕜}
  {β ε δ : ℝ} (hF : IsBoundedOrthonormal F β) (hS : HasLaw S (srht k F) μ) (d : ℕ) (hε : 0 < ε)
  (hε1 : ε ≤ 1) (hδ : 0 < δ)
  (hk :
    samplingEmbeddingDim d (β * srhtRowBound (Fintype.card n) d (δ / 2)) ε (δ / 2) ≤
      ↑(Fintype.card k)) :
  IsObliviousSubspaceEmbedding S d (1 - ε) (1 + ε) δ μ

Full source on GitHub

Copy link

General form: sizes are index types. A size is carried by a finite index type: |k| is the number of elements of the index type k, and "k nonempty" means k ≥ 1.