NLA-lib Explorer

Sketch-and-precondition

Library · Source module

Sketch-and-precondition

NLAlib.sketchAndPrecondition A S y x₀ q is the preconditioned conjugate gradient iterate on the normal equations \mathbf{A}^{\mathsf{H}}\mathbf{A}\mathbf{x} = \mathbf{A}^{\mathsf{H}}\mathbf{y} of the least-squares problem \min_{\mathbf{x}}\|\mathbf{y} - \mathbf{A}\mathbf{x}\|, with preconditioner \mathbf{G}^{+} for the sketched Gram matrix \mathbf{G} = (\mathbf{S}\mathbf{A})^{\mathsf{H}}\mathbf{S}\mathbf{A}, after q steps from \mathbf{x}_0. The definition is basis-free. For any square \mathbf{M} with \mathbf{S}\mathbf{A}\mathbf{M} orthonormal (QR's \mathbf{R}^{-1}, as in Blendenpik, or SVD's \mathbf{V}\mathbf{\Sigma}^{-1}, as in LSRN) it is \mathbf{M} times CGLS on \mathbf{A}\mathbf{M}, which is preconditioned LSQR in exact arithmetic, and the preconditioned Hestenes–Stiefel recurrence computes it.

If \mathbf{S} is a subspace embedding of \operatorname{range}\mathbf{A} with constants a, \mathbf{b} in squared norms, the spectrum of \mathbf{G}^{+}\mathbf{A}^{\mathsf{H}}\mathbf{A} lies in [\mathbf{b}^{-1}, a^{-1}] (NLAlib.IsSubspaceEmbedding.spectrum_pinv_mul_subset_Icc), so the energy error \|\mathbf{A}(\mathbf{x}_\star - \mathbf{x}_q)\|^2 contracts at the Chebyshev rate \bigl((\sqrt{\mathbf{b}/a} - 1)/(\sqrt{\mathbf{b}/a} + 1)\bigr)^2 per step from every start. From the sketch-and-solve start the residual is within a factor 1 + 4(\mathbf{b}/a - 1)\rho^{2q} of the optimal squared residual, and the forward error follows through the smallest singular value. In the unsquared distortion \eta of Epperly (a = (1 - \eta)^2, \mathbf{b} = (1 + \eta)^2) the rate \rho is exactly \eta.

The probabilistic statements take an embedding that fails with probability \delta (NLAlib.HasSubspaceEmbedding); the sketch families are in NLAlib.Regression.Gaussian, NLAlib.Regression.SubGaussian, NLAlib.Regression.SRHT and NLAlib.Regression.CountSketch. [MartinssonTropp2020]; [Epperly2024]; [EpperlyMeierNakatsukasa2024].

Main definitions

* NLAlib.sketchAndPrecondition: the sketch-and-precondition iterate.

Main results

* NLAlib.HasOrthonormalCols.sketchAndPrecondition_eq_mulVec_cgIterate, NLAlib.IsQR.sketchAndPrecondition_eq_mulVec_cgIterate, NLAlib.IsSVD.sketchAndPrecondition_eq_mulVec_cgIterate: CGLS on the preconditioned matrix. * NLAlib.pcgState_x_eq_sketchAndPrecondition: the recurrence computes it. * NLAlib.IsSubspaceEmbedding.norm_mulVec_sub_sketchAndPrecondition_sq_le_four_mul_pow: geometric convergence of the energy error from any start. * NLAlib.IsSubspaceEmbedding.norm_sub_mulVec_sketchAndPrecondition_sq_le: the residual from the sketch-and-solve start. * NLAlib.IsSubspaceEmbedding.norm_sub_mulVec_sketchAndPrecondition_sq_le_one_add_mul: the iteration count for a relative residual 1 + \tau. * NLAlib.IsSubspaceEmbedding.singularValues_sq_mul_norm_sub_sketchAndPrecondition_sq_le: the forward error. * NLAlib.HasSubspaceEmbedding.measureReal_norm_mulVec_sub_sketchAndPrecondition_sq_gt_le, NLAlib.HasSubspaceEmbedding.measureReal_norm_sub_mulVec_sketchAndPrecondition_sq_gt_le: the same with a random embedding.

Declarations