NLA-lib Explorer

Haar rows suffice for a rank-d projection-cost-preserving sketch

Library · Result group

Theorem (exists_forall_hasProjectionCostPreserving_of_hasLaw_haarFrame). Haar rows suffice for a rank-d projection-cost-preserving sketch: O((d+1)\log(1/\delta)/\varepsilon^2) rows give one: for \lvert k\rvert \le \lvert n\rvert, the Haar sketch \mathbf{S} = \sqrt{\lvert n\rvert/\lvert k\rvert}\,\mathbf{Q}^{\mathsf{H}} makes \mathbf{A}\mathbf{S}^{\mathsf{H}} a rank-d projection-cost-preserving sketch with constants 1 \mp \varepsilon and failure probability \delta, for \varepsilon and \delta below absolute constants; the constants come before every dimension. Proved from NLAlib.hasProjectionCostPreserving_of_hasLaw_haarFrame_of_jlMomentDim_le with \varepsilon_0 = 1 and \delta \le 1/2. [CohenElderMuscoMuscoPersu2015, proof of Theorem 12].

Headline (provisional) General form: sizes are index types

Lean statement and details
NLAlib.exists_forall_hasProjectionCostPreserving_of_hasLaw_haarFrame :
  ∃ C ε₀,
    0 < C ∧
      0 < ε₀ ∧
        ∀ {Ω k m n : Type} [inst : MeasurableSpace Ω] [inst_1 : Fintype k] [inst_2 : Fintype m]
          [inst_3 : Fintype n] [inst_4 : DecidableEq k] (μ : Measure Ω) (Q : Ω → Matrix n k ℝ)
          (A : Matrix m n ℝ) (d : ℕ) (ε δ : ℝ),
          HasLaw Q (haarFrame n k) μ →
            Fintype.card k ≤ Fintype.card n →
              0 < ε →
                ε ≤ ε₀ →
                  0 < δ →
                    δ ≤ 1 / 2 →
                      C * ((↑d + 1) * Real.log (1 / δ) / ε ^ 2) ≤ ↑(Fintype.card k) →
                        HasProjectionCostPreserving
                          (fun ω ↦ √(↑(Fintype.card n) / ↑(Fintype.card k)) • (Q ω)ᴴ) A d (1 - ε)
                          (1 + ε) δ μ

Full source on GitHub

Copy link

Other forms

Theorem (hasProjectionCostPreserving_of_hasLaw_haarFrame_of_jlMomentDim_le). A Haar sketch is a projection-cost-preserving sketch, \log(1/\delta) size form: for \lvert k\rvert \le \lvert n\rvert, 0 < \varepsilon \le 2, \delta > 0, at least <!-- value jlDim (2\varepsilon/5) (\delta/2/21^d) --> \log(2/(\delta/2/21^d))/((2\varepsilon/5)^2/4 - (2\varepsilon/5)^3/6) rows (jlDim (2 * ε / 5) (δ / 2 / 21 ^ d)) and at least <!-- value jlMomentDim (\varepsilon/(8\sqrt{d+1})) (\delta/6) --> 128\max(2, \log(1/(\delta/6)))/(\varepsilon/(8\sqrt{d+1}))^2 rows (jlMomentDim (ε / (8 * √(d + 1))) (δ / 6)), the Haar sketch \mathbf{S} = \sqrt{\lvert n\rvert/\lvert k\rvert}\,\mathbf{Q}^{\mathsf{H}} makes \mathbf{A}\mathbf{S}^{\mathsf{H}} a rank-d projection-cost-preserving sketch of \mathbf{A} with constants 1 \mp \varepsilon, for every \mathbf{A}, except with probability \delta. The tail is the JL moment NLAlib.hasJLMoment_of_hasLaw_haarFrame_of_jlMomentDim_le at \varepsilon/(8\sqrt{d+1}), failure \delta/6. Incomparable with NLAlib.hasProjectionCostPreserving_of_hasLaw_haarFrame_of_le_card (rule 4). [CohenElderMuscoMuscoPersu2015, proof of Theorem 12]; the Haar instance is not stated there. Asymptotic form: NLAlib.exists_forall_hasProjectionCostPreserving_of_hasLaw_haarFrame.

General form: sizes are index types

Lean statement and details
NLAlib.hasProjectionCostPreserving_of_hasLaw_haarFrame_of_jlMomentDim_le.{u_1, u_2, u_3, u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {k : Type u_2} {n : Type u_3} [Fintype k]
  [Fintype n] {ε δ : ℝ} [DecidableEq k] {Q : Ω → Matrix n k ℝ} (hQ : HasLaw Q (haarFrame n k) μ)
  (hk : Fintype.card k ≤ Fintype.card n) {m : Type u_4} [Fintype m] (A : Matrix m n ℝ) (d : ℕ)
  (hε : 0 < ε) (hε2 : ε ≤ 2) (hδ : 0 < δ)
  (hk₁ : jlDim (2 * ε / 5) (δ / 2 / 21 ^ d) ≤ ↑(Fintype.card k))
  (hk₂ : jlMomentDim (ε / (8 * √(↑d + 1))) (δ / 6) ≤ ↑(Fintype.card k)) :
  HasProjectionCostPreserving (fun ω ↦ √(↑(Fintype.card n) / ↑(Fintype.card k)) • (Q ω)ᴴ) A d
    (1 - ε) (1 + ε) δ μ

Full source on GitHub

Copy link

Theorem (hasProjectionCostPreserving_of_hasLaw_haarFrame_of_le_card). A Haar sketch is a projection-cost-preserving sketch, size form: for \lvert k\rvert \le \lvert n\rvert, 0 < \varepsilon \le 2, \delta > 0, at least <!-- value jlDim (2\varepsilon/5) (\delta/2/21^d) --> \log(2/(\delta/2/21^d))/((2\varepsilon/5)^2/4 - (2\varepsilon/5)^3/6) rows (jlDim (2 * ε / 5) (δ / 2 / 21 ^ d)) and at least <!-- value projectionCostTailDim 2 d \varepsilon \delta --> 384 \cdot 2 (d + 1)/(\varepsilon^2 \delta) rows (projectionCostTailDim 2 d ε δ), the Haar sketch \mathbf{S} = \sqrt{\lvert n\rvert/\lvert k\rvert}\,\mathbf{Q}^{\mathsf{H}}\,, \mathbf{Q} an n \times k Haar frame, makes \mathbf{A}\mathbf{S}^{\mathsf{H}} a rank-d projection-cost-preserving sketch of \mathbf{A} with constants 1 \mp \varepsilon, for every \mathbf{A}, except with probability \delta. The head is the OSE by JL and a net (NLAlib.isObliviousSubspaceEmbedding_of_hasLaw_haarFrame_of_jlDim_le) at (\varepsilon/2, \delta/2), the tail the Haar JL moment at p = 2 (NLAlib.hasJLMoment_of_hasLaw_haarFrame, failure 2(\lvert n\rvert - \lvert k\rvert)/(\lvert k\rvert(\lvert n\rvert + 2)\varepsilon_J^2) \le 2/(\lvert k\rvert\varepsilon_J^2), so \mathbf{v} = 2). Incomparable with its \log(1/\delta) twin NLAlib.hasProjectionCostPreserving_of_hasLaw_haarFrame_of_jlMomentDim_le (rule 4); the asymptotic form NLAlib.exists_forall_hasProjectionCostPreserving_of_hasLaw_haarFrame is proved from the twin. [CohenElderMuscoMuscoPersu2015, proof of Theorem 12]; the Haar instance is not stated there.

General form: sizes are index types

Lean statement and details
NLAlib.hasProjectionCostPreserving_of_hasLaw_haarFrame_of_le_card.{u_1, u_2, u_3, u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {k : Type u_2} {n : Type u_3} [Fintype k]
  [Fintype n] {ε δ : ℝ} [DecidableEq k] {Q : Ω → Matrix n k ℝ} (hQ : HasLaw Q (haarFrame n k) μ)
  (hk : Fintype.card k ≤ Fintype.card n) {m : Type u_4} [Fintype m] (A : Matrix m n ℝ) (d : ℕ)
  (hε : 0 < ε) (hε2 : ε ≤ 2) (hδ : 0 < δ)
  (hk₁ : jlDim (2 * ε / 5) (δ / 2 / 21 ^ d) ≤ ↑(Fintype.card k))
  (hk₂ : projectionCostTailDim 2 d ε δ ≤ ↑(Fintype.card k)) :
  HasProjectionCostPreserving (fun ω ↦ √(↑(Fintype.card n) / ↑(Fintype.card k)) • (Q ω)ᴴ) A 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.