The subsampled randomized trigonometric transform (SRHT)
Library · Source module
The subsampled randomized trigonometric transform (SRHT)
For a bounded orthonormal transform \mathbf{F} with constant \beta (NLAlib.IsBoundedOrthonormal F β: the normalised Walsh–Hadamard or Fourier matrix at \beta = 1, the cosine or Hartley transform at \beta = 2), independent random signs \boldsymbol{\xi} and \lvert k \rvert row indices \iota : k \to n, the sketch is \mathbf{S} = \sqrt{\lvert n \rvert / \lvert k \rvert}\; \mathbf{P}^{\mathsf{H}} \mathbf{F} \operatorname{diag}(\boldsymbol{\xi})\,, \mathbf{P} the selection matrix of \iota (NLAlib.srhtMatrix). Its law is NLAlib.srht k F when \iota is a uniform injection (sampling without replacement, the classical SRHT) and NLAlib.srhtWithReplacement k F when the indices are i.i.d. uniform. Both laws are pushforwards of the primitive signs and indices with ⊤ on n inside the definition; NLAlib.srht_eq_map_prod and NLAlib.srhtWithReplacement_eq_map_prod write them as the signs times the row-sampling laws, and the bridges take a user's own signs and indices. The name srht is kept for every \mathbf{F} (the general term is SRTT).
The sketch is isotropic, without replacement a scaled partial isometry (\mathbf{S}\mathbf{S}^{\mathsf{H}} = (\lvert n \rvert / \lvert k \rvert)\mathbf{I} almost surely), and an oblivious subspace injection and embedding for dimension d with failure probability d\, e^{-\varepsilon^2 k / (2 L_d(t))} + \lvert n \rvert e^{-t}, \qquad 2 d\, e^{-\varepsilon^2 k / (3 L_d(t))} + \lvert n \rvert e^{-t}, \qquad L_d(t) = \beta\,(d + 2\sqrt{d t} + 2t)\,, for every t \ge 0: flattening (NLAlib.Sketching.Structured.Flattening) followed by uniform row sampling (NLAlib.Sketching.Sampling.RowSampling, NLAlib.Sketching.Sampling.WithoutReplacement), through the flatten-then-sample transfer. The sample sizes are the row-sampling sizes with the failure split \delta/2 + \delta/2: the embedding needs <!-- value samplingEmbeddingDim d L \varepsilon (\delta/2) --> \lvert k \rvert \ge 3 L \log(2d/(\delta/2))/\varepsilon^2 rows (NLAlib.samplingEmbeddingDim), the injection <!-- value samplingInjectionDim d L \varepsilon (\delta/2) --> \lvert k \rvert \ge 2 L \log(d/(\delta/2))/\varepsilon^2 (NLAlib.samplingInjectionDim), at 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) (NLAlib.srhtRowBound is the bracket), the bound of flattening at t = \log(2\lvert n \rvert/\delta).
The instances are hypothesis discharges, not separate theorems. The real Walsh OSE, for hS : HasLaw S (srht k (((√((2 : ℝ) ^ b))⁻¹ : ℝ) • walshHadamard ℝ b)) μ:
isObliviousSubspaceEmbedding_of_hasLaw_srht (isBoundedOrthonormal_smul_walshHadamard b) hS d hε hε1 ht
and likewise isBoundedOrthonormal_fourierMatrix n for the Fourier transform over \mathbb{C} with real signs, Matrix.IsHadamard.isBoundedOrthonormal_inv_sqrt_smul for any Hadamard matrix.
Degenerate cases. For \lvert n \rvert < \lvert k \rvert there is no injection, the law NLAlib.srht k F is the zero measure, HasLaw forces \mu = 0 and every tail holds; so \lvert k \rvert \le \lvert n \rvert is assumed only on the probability instance, isotropy, the injection (its isotropy field) and the injection's size form, never on an embedding or a tail. Empty k: \mathbf{S} = \mathbf{0}, not isotropic, hence [Nonempty k] on isotropy and the injections. Empty n with replacement: the law is 0 for nonempty k, hence [Nonempty n] on that model's isotropy and injections. \lvert k \rvert = \lvert n \rvert without replacement: \mathbf{S} is unitary and every event is empty. Rank zero: every event is empty.
Main definitions
* NLAlib.srhtMatrix: the sketch built from given signs and indices. * NLAlib.srht, NLAlib.srhtWithReplacement: its laws.
Main results
* NLAlib.srht_eq_map_prod, NLAlib.srhtWithReplacement_eq_map_prod, NLAlib.hasLaw_srhtMatrix_of_hasLaw_uniformOn_injective, NLAlib.hasLaw_srhtMatrix_of_hasLaw_pi: the laws through row sampling, and the bridges. * NLAlib.HasOrthonormalCols.isIsotropicSketch_of_hasLaw_srht, NLAlib.HasOrthonormalCols.isIsotropicSketch_of_hasLaw_srhtWithReplacement: isotropy. * NLAlib.HasOrthonormalCols.ae_mul_conjTranspose_eq_of_hasLaw_srht, NLAlib.HasOrthonormalCols.ae_specNorm_eq_of_hasLaw_srht: the scaled partial isometry. * NLAlib.isObliviousSubspaceInjection_of_hasLaw_srht, NLAlib.isObliviousSubspaceEmbedding_of_hasLaw_srht and their with-replacement forms: the SRHT OSI and OSE. * NLAlib.isObliviousSubspaceEmbedding_of_hasLaw_srht_of_samplingEmbeddingDim_le, NLAlib.isObliviousSubspaceInjection_of_hasLaw_srht_of_samplingInjectionDim_le and their with-replacement forms: sample sizes. * NLAlib.exists_forall_isObliviousSubspaceEmbedding_of_hasLaw_srht, NLAlib.exists_forall_isObliviousSubspaceInjection_of_hasLaw_srht and their with-replacement forms: the asymptotic forms, O(\beta (d + \log(\lvert n \rvert/\delta)) \log(d/\delta)/\varepsilon^2) rows.
Declarations
- NLAlib.HasOrthonormalCols.ae_mul_conjTranspose_eq_of_hasLaw_srht
- NLAlib.HasOrthonormalCols.ae_specNorm_eq_of_hasLaw_srht
- NLAlib.HasOrthonormalCols.isIsotropicSketch_of_hasLaw_srht
- NLAlib.HasOrthonormalCols.isIsotropicSketch_of_hasLaw_srhtWithReplacement
- NLAlib.exists_forall_isObliviousSubspaceEmbedding_of_hasLaw_srht
- NLAlib.exists_forall_isObliviousSubspaceEmbedding_of_hasLaw_srhtWithReplacement
- NLAlib.exists_forall_isObliviousSubspaceInjection_of_hasLaw_srht
- NLAlib.exists_forall_isObliviousSubspaceInjection_of_hasLaw_srhtWithReplacement
- NLAlib.hasLaw_srhtMatrix_of_hasLaw_pi
- NLAlib.hasLaw_srhtMatrix_of_hasLaw_uniformOn_injective
- NLAlib.isFiniteMeasure_srht
- NLAlib.isFiniteMeasure_srhtWithReplacement
- NLAlib.isObliviousSubspaceEmbedding_of_hasLaw_srht
- NLAlib.isObliviousSubspaceEmbedding_of_hasLaw_srhtWithReplacement
- NLAlib.isObliviousSubspaceEmbedding_of_hasLaw_srhtWithReplacement_of_samplingEmbeddingDim_le
- NLAlib.isObliviousSubspaceEmbedding_of_hasLaw_srht_of_samplingEmbeddingDim_le
- NLAlib.isObliviousSubspaceInjection_of_hasLaw_srht
- NLAlib.isObliviousSubspaceInjection_of_hasLaw_srhtWithReplacement
- NLAlib.isObliviousSubspaceInjection_of_hasLaw_srhtWithReplacement_of_samplingInjectionDim_le
- NLAlib.isObliviousSubspaceInjection_of_hasLaw_srht_of_samplingInjectionDim_le
- NLAlib.isProbabilityMeasure_srht
- NLAlib.isProbabilityMeasure_srhtWithReplacement
- NLAlib.measureReal_le_one_of_hasLaw_srht
- NLAlib.samplingEmbeddingDim_srhtRowBound_le
- NLAlib.samplingInjectionDim_srhtRowBound_le
- NLAlib.srht
- NLAlib.srhtMatrix
- NLAlib.srhtWithReplacement
- NLAlib.srhtWithReplacement_eq_map_prod
- NLAlib.srht_eq_map_prod