Hermitian diagonalization by randomized spectral bisection
Library · Source module
Hermitian diagonalization by randomized spectral bisection
NLAlib.eigh M N ℓ A R₀ ε β s computes an approximate diagonalization \mathbf{A} \approx \mathbf{U}\operatorname{diag}(\mathbf{d})\mathbf{U}^{\mathsf{H}} of a stored Hermitian \mathbf{A} with \|\mathbf{A}\|_2 \le R_0 by randomized spectral bisection ([Shah2024, Algorithm 3]): at a node with window R, shift by a random c of size at most R/\ell, compute the sign of \mathbf{A} - c\mathbf{I} by the Newton–Schulz iteration, the two spectral projectors \tfrac12(\mathbf{I} \pm \operatorname{sign}), the rank of one by a rounded trace, orthonormal bases \mathbf{Q}_\pm of their ranges by randomized deflation, and recurse on the compressions \mathbf{Q}_\pm^{\mathsf{H}}\mathbf{A}\mathbf{Q}_\pm \mp (R/2)\mathbf{I} with window (1/2 + 2/\ell)R, tolerance (1 - 1/\ell)\varepsilon and \ell + 1; a node stops when it has size at most 1 or R \le \varepsilon R_0.
Everything is written over a NLAlib.FloatMachine M: stored numbers of an abstract type F, ideal samples of abstract types Su, Sg, and only the machine's operations on them; every scalar parameter (R/\ell, R/2, 2R, the next window and tolerance, the test R \le \varepsilon R_0, the sign threshold) is computed by the machine. The sizes k, k_+, the depth counter \ell and the step limits are natural numbers (exact integer bookkeeping, as in [Shah2024]). Two inputs are precomputed thresholds rather than computed: \ell, at least \lceil\log_2(1/\varepsilon)\rceil + 5, and the sign and deflation accuracy \beta, any stored number below the bound of the analysis (a lower bound suffices, so no square root or logarithm is needed). The node reached by the path a from the root uses the sample s a, a seed for its shift and two Gaussian test matrices.
Deviations from [Shah2024, Algorithm 3]: the compressions and projectors are stored as Hermitian matrices by the machine's entrywise operations (the source leaves their symmetry implicit); k_- = k - k_+ (the source rounds both traces); one accuracy \beta for all nodes (the source's node-dependent \delta is larger); explicit step limits.
Main definitions
* NLAlib.EighSample, NLAlib.leadingBlock. * NLAlib.bisectionSignTol, NLAlib.bisectionDepth: analysis-side bounds (reals). * NLAlib.EighStep, NLAlib.EighStep.IsSplit, NLAlib.eighStep, NLAlib.eighAux, NLAlib.eigh. * NLAlib.EighNode, NLAlib.eighChild, NLAlib.eighNodeAt: the recursion tree. * NLAlib.IsApproxDiagonalization: the output guarantee. * NLAlib.IsEighGoodSample: the good events of a node.
Main results
The analysis is in NLAlib/Matrix/Computation/SpectralBisection/: Projectors (the computed projectors and rank recovery at a node), Split (frames and compressions at a split), Child (the children's parameters and invariant), Node ([Shah2024, Lemma 4.1]), Tree (depth, node parameters and counts) and Global (the deterministic part of [Shah2024, Theorem 4.2]); the probability is in NLAlib/Eigensolvers/SpectralBisection.lean and its Global file.