NLA-lib Explorer

Sketch-and-precondition is CGLS on \mathbf{A}\mathbf{M}

Library Β· Result group

Theorem (HasOrthonormalCols.sketchAndPrecondition_eq_mulVec_cgIterate). Sketch-and-precondition is CGLS on \mathbf{A}\mathbf{M}: for \mathbf{A} \in \Bbbk^{m \times n}, a sketch \mathbf{S}, a square \mathbf{M} with \mathbf{S}\mathbf{A}\mathbf{M} orthonormal and \mathbf{M}\mathbf{z}_0 = \mathbf{x}_0, \mathsf{sketchAndPrecondition}(\mathbf{A}, \mathbf{S}, \mathbf{y}, \mathbf{x}_0, q) = \mathbf{M}\,\mathsf{cgIterate}((\mathbf{A}\mathbf{M})^{\mathsf{H}}\mathbf{A}\mathbf{M}, (\mathbf{A}\mathbf{M})^{\mathsf{H}}\mathbf{y}, \mathbf{z}_0, q)\,. Orthonormality makes \mathbf{M} and \mathbf{A} injective, so no rank hypothesis is needed. [EpperlyMeierNakatsukasa2024, Β§2.1], there for \mathbf{M} = \mathbf{R}^{-1}, where CG on the preconditioned normal equations is LSQR in exact arithmetic.

Headline (provisional)

Lean statement and details
NLAlib.HasOrthonormalCols.sketchAndPrecondition_eq_mulVec_cgIterate.{u_1, u_2, u_3, u_4}
  {π•œ : Type u_1} [RCLike π•œ] {k : Type u_2} {m : Type u_3} {n : Type u_4} [Fintype k] [Fintype m]
  [Fintype n] [DecidableEq n] {S : Matrix k m π•œ} {A : Matrix m n π•œ} {xβ‚€ : n β†’ π•œ} {M : Matrix n n π•œ}
  (hSAM : HasOrthonormalCols (S * A * M)) (y : m β†’ π•œ) {zβ‚€ : n β†’ π•œ} (hzβ‚€ : M *α΅₯ zβ‚€ = xβ‚€) (q : β„•) :
  sketchAndPrecondition A S y xβ‚€ q = M *α΅₯ cgIterate ((A * M)α΄΄ * (A * M)) ((A * M)α΄΄ *α΅₯ y) zβ‚€ q

Full source on GitHub

Copy link

Other forms

Theorem (pcgState_x_eq_sketchAndPrecondition). The preconditioned Hestenes–Stiefel recurrence computes sketch-and-precondition: when \mathbf{S}\mathbf{A} has full column rank (so that \mathbf{A} does), the \mathbf{x}-field of NLAlib.pcgState for the normal equations \mathbf{A}^{\mathsf{H}}\mathbf{A}\mathbf{x} = \mathbf{A}^{\mathsf{H}}\mathbf{y} with preconditioner ((\mathbf{S}\mathbf{A})^{\mathsf{H}}\mathbf{S}\mathbf{A})^{+} after q steps from \mathbf{x}_0 is \mathsf{sketchAndPrecondition}(\mathbf{A}, \mathbf{S}, \mathbf{y}, \mathbf{x}_0, q). [Epperly2024, Algorithm 1], there through LSQR.

Lean statement and details
NLAlib.pcgState_x_eq_sketchAndPrecondition.{u_1, u_2, u_3, u_4} {π•œ : Type u_1} [RCLike π•œ]
  {k : Type u_2} {m : Type u_3} {n : Type u_4} [Fintype k] [Fintype m] [Fintype n] [DecidableEq n]
  {S : Matrix k m π•œ} {A : Matrix m n π•œ} (hSA : Function.Injective (S * A).mulVec) (y : m β†’ π•œ)
  (xβ‚€ : n β†’ π•œ) (q : β„•) :
  (pcgState (Aα΄΄ * A) (pinv ((S * A)α΄΄ * (S * A))) (Aα΄΄ *α΅₯ y) xβ‚€ q).x =
    sketchAndPrecondition A S y xβ‚€ q

Full source on GitHub

Copy link