Gaussian sketches
Library · Source module
Gaussian sketches
The Gaussian sketch is \mathbf{S} = \lvert k \rvert^{-1/2} \, \mathbf{G} for a standard Gaussian G : Matrix k n ℝ (\lvert k \rvert rows). It is written out in each statement, fun ω => (√(Fintype.card k : ℝ))⁻¹ • G ω, with the hypothesis HasLaw G (gaussianMatrix k n) μ; there is no named sketch law.
It is an isotropic sketch, a random subspace injection and embedding for a fixed \mathbf{U} with orthonormal columns (Gordon's extreme singular values, one tail e^{-t^2/2} per side), an oblivious subspace injection and embedding, and has the distributional Johnson–Lindenstrauss property with Dasgupta and Gupta's exponent \varepsilon^2/4 - \varepsilon^3/6, the exact JL second moment 2 / \lvert k \rvert, and the JL moment property at every exponent p from its sub-exponential JL tail, so that O(\log(1/\delta)/\varepsilon^2) rows give it at p = \max(2, \log(1/\delta)) and hence approximate matrix multiplication with failure probability \delta: for hG and that size,
(hasJLMoment_of_hasLaw_gaussianMatrix_of_jlMomentDim_le hG hε hε1 hδ hk ).measureReal_frobNorm_conjTranspose_mul_sub_ge_le …
with le_max_left for the side condition 2 \le p. Its projection-cost-preserving forms are in NLAlib.Sketching.Gaussian.ProjectionCost. The sample sizes are named quantities (docs/contributing/statements.md §2, rule 2), each with its nonnegativity, monotonicity and an explicit comparison; the "\lvert k \rvert \ge \ldots suffices" forms are corollaries of the tails.
Degenerate cases: for empty k, (\sqrt{0})^{-1} = 0 and \mathbf{S} = \mathbf{0}, which is not isotropic, hence [Nonempty k] on isotropy, the OSI and the moments; the hypothesis t \le \sqrt{\lvert k \rvert} - \sqrt{\lvert p \rvert} then forces p empty. The JL bound is 2 for \lvert k \rvert = 0 and at least 2 for \varepsilon \ge 3/2.
Main definitions
* NLAlib.gaussianEmbeddingDim, NLAlib.gaussianInjectionDim, NLAlib.jlDim, NLAlib.jlMomentDim: the sample sizes, for the OSE <!-- value gaussianEmbeddingDim d \varepsilon \delta --> 9 (\sqrt{d} + \sqrt{2 \log(2/\delta)})^2/\varepsilon^2, for the OSI <!-- value gaussianInjectionDim d \varepsilon \delta --> 4 (\sqrt{d} + \sqrt{2 \log(1/\delta)})^2/\varepsilon^2, for JL <!-- value jlDim \varepsilon \delta -->\log(2/\delta)/(\varepsilon^2/4 - \varepsilon^3/6) and for the JL moment property <!-- value jlMomentDim \varepsilon \delta -->128\max(2, \log(1/\delta))/\varepsilon^2; NLAlib.two_mul_exp_le_of_jlDim_le inverts the JL tail at jlDim, and NLAlib.two_mul_twentyOne_pow_mul_exp_le_of_jlDim_le the JL-plus-a-net tail.
Main results
* NLAlib.isIsotropicSketch_of_hasLaw_gaussianMatrix. * NLAlib.HasOrthonormalCols.hasSubspaceEmbedding_of_hasLaw_gaussianMatrix: the fixed-subspace embedding, (1 \mp (\sqrt{\lvert p \rvert} + t)/\sqrt{\lvert k \rvert})^2 outside 2 e^{-t^2/2}. * NLAlib.isObliviousSubspaceInjection_of_hasLaw_gaussianMatrix, NLAlib.isObliviousSubspaceEmbedding_of_hasLaw_gaussianMatrix. * NLAlib.hasJLProperty_of_hasLaw_gaussianMatrix: distributional JL. * NLAlib.hasJLMoment_of_hasLaw_gaussianMatrix: the JL moment property at p = 2, from the exact variance. * NLAlib.hasJLMoment_subexponentialMomentBound_of_hasLaw_gaussianMatrix: the JL moment property at every p > 0, and its size form NLAlib.hasJLMoment_of_hasLaw_gaussianMatrix_of_jlMomentDim_le at p = \max(2, \log(1/\delta)). * NLAlib.exists_forall_abs_norm_mulVec_sq_sub_le_of_jlDim_le: the Johnson–Lindenstrauss lemma. * NLAlib.exists_forall_isObliviousSubspaceEmbedding_of_hasLaw_gaussianMatrix, NLAlib.exists_forall_isObliviousSubspaceInjection_of_hasLaw_gaussianMatrix, NLAlib.exists_forall_hasJLProperty_of_hasLaw_gaussianMatrix, NLAlib.exists_forall_hasJLMoment_of_hasLaw_gaussianMatrix: the asymptotic forms, O((d + \log(1/\delta))/\varepsilon^2) and O(\log(1/\delta)/\varepsilon^2) rows.
Declarations
- NLAlib.HasOrthonormalCols.hasSubspaceEmbedding_of_hasLaw_gaussianMatrix
- NLAlib.HasOrthonormalCols.hasSubspaceEmbedding_zero_of_hasLaw_gaussianMatrix
- NLAlib.HasOrthonormalCols.hasSubspaceInjection_of_hasLaw_gaussianMatrix
- NLAlib.exists_forall_abs_norm_mulVec_sq_sub_le_of_jlDim_le
- NLAlib.exists_forall_hasJLMoment_of_hasLaw_gaussianMatrix
- NLAlib.exists_forall_hasJLProperty_of_hasLaw_gaussianMatrix
- NLAlib.exists_forall_isObliviousSubspaceEmbedding_of_hasLaw_gaussianMatrix
- NLAlib.exists_forall_isObliviousSubspaceInjection_of_hasLaw_gaussianMatrix
- NLAlib.gaussianEmbeddingDim
- NLAlib.gaussianEmbeddingDim_def
- NLAlib.gaussianEmbeddingDim_le
- NLAlib.gaussianEmbeddingDim_mono
- NLAlib.gaussianEmbeddingDim_nonneg
- NLAlib.gaussianInjectionDim
- NLAlib.gaussianInjectionDim_def
- NLAlib.gaussianInjectionDim_le
- NLAlib.gaussianInjectionDim_mono
- NLAlib.gaussianInjectionDim_pos
- NLAlib.hasJLMoment_of_hasLaw_gaussianMatrix
- NLAlib.hasJLMoment_of_hasLaw_gaussianMatrix_of_jlMomentDim_le
- NLAlib.hasJLMoment_subexponentialMomentBound_of_hasLaw_gaussianMatrix
- NLAlib.hasJLProperty_of_hasLaw_gaussianMatrix
- NLAlib.hasJLProperty_of_hasLaw_gaussianMatrix_of_jlDim_le
- NLAlib.integrable_norm_mulVec_sq_sub_norm_sq_sq_of_hasLaw_gaussianMatrix
- NLAlib.integral_norm_mulVec_sq_sub_norm_sq_sq_of_hasLaw_gaussianMatrix
- NLAlib.isIsotropicSketch_of_hasLaw_gaussianMatrix
- NLAlib.isObliviousSubspaceEmbedding_of_hasLaw_gaussianMatrix
- NLAlib.isObliviousSubspaceEmbedding_of_hasLaw_gaussianMatrix_of_gaussianEmbeddingDim_le
- NLAlib.isObliviousSubspaceInjection_of_hasLaw_gaussianMatrix
- NLAlib.isObliviousSubspaceInjection_of_hasLaw_gaussianMatrix_of_gaussianInjectionDim_le
- NLAlib.jlDim
- NLAlib.jlDim_def
- NLAlib.jlDim_le
- NLAlib.jlDim_mono
- NLAlib.jlDim_pos
- NLAlib.jlMomentDim
- NLAlib.jlMomentDim_def
- NLAlib.jlMomentDim_le
- NLAlib.jlMomentDim_mono
- NLAlib.jlMomentDim_nonneg
- NLAlib.two_mul_exp_le_of_jlDim_le
- NLAlib.two_mul_twentyOne_pow_mul_exp_le_of_jlDim_le