Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace KPM with Lanczos #339

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Replace KPM with Lanczos #339

wants to merge 11 commits into from

Conversation

kbarros
Copy link
Member

@kbarros kbarros commented Dec 3, 2024

The Lanczos algorithm promises these benefits relative to KPM:

  • Higher accuracy at a fixed number of iterations (i.e., at a fixed Krylov subspace dimension).
  • Allows for a sharp cutoff between positive and negative eigenvalues near zero. Whereas KPM is susceptible to a loss of intensity near Goldstone modes, Lanczos seems to avoid this problem.
  • Does not require an initialization phase that bounds the spectrum prior to polynomial expansion.
  • Ability to detect instabilities (negative eigenvalues) in the dynamical matrix.

As currently implemented, Lanczos is currently slower than KPM per iteration. But because many fewer iterations are required, Lanczos still seems favorable in overall speed. And future optimizations may be possible, e.g., operating on multiple right-hand side vectors in parallel.

Possible disadvantages of Lanczos may become apparent when the number of iterations becomes large (e.g., in the hundreds and beyond). Numerical roundoff error may accumulate -- the empirical effects of this will require testing. Also, Lanczos requires direct diagonalization of a tridiagonal matrix, and this cost may eventually dominate after a very large number of iterations.

See https://arxiv.org/abs/2410.11090 for a modern mathematical review of the Lanczos method, including a numerical stability analysis in Sec. 4.

@kbarros kbarros force-pushed the lanc branch 2 times, most recently from 5b66631 to 2d43b9d Compare December 18, 2024 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant