Theoretically and Practically Efficient Resistance Distance Computation on Large Graphs

Yichun Yang, Longlong Lin, Rong-Hua Li, Meihao Liao, Guoren WangarXiv 2026

TL;DR

This paper introduces two highly efficient algorithms, Lanczos Iteration and Lanczos Push, to drastically speed up the computation of resistance distance on massive graphs. By leveraging the classic Lanczos method, these algorithms significantly reduce the computational dependency on the graph's condition number ($\kappa$), outperforming existing state-of-the-art methods by up to 100× in speed while maintaining strict accuracy guarantees.

What Problem Does This Paper Address?

Resistance distance (RD) is a fundamental metric used to capture node similarity by modeling a graph as an electrical network. It is widely applied in graph clustering, link prediction, and graph neural networks (GNNs). However, computing exact RD is notoriously expensive ($O(n^{2.37})$ time), making it impractical for large-scale real-world graphs.

Existing approximation methods (like the Power Method or random-walk approaches) suffer from a major bottleneck: their runtime scales poorly with the graph's condition number ($\kappa$). For graphs with poor expansion properties, like road networks, $\kappa$ can be massive, causing traditional algorithms to converge incredibly slowly. The authors set out to design algorithms that weaken this strict dependency on $\kappa$.

Methods

The authors reframe the RD problem as a quadratic form involving the pseudo-inverse of the normalized Laplacian matrix. They propose two algorithms based on the classic Lanczos method to project the problem into a lower-dimensional Krylov subspace:

  1. Lanczos Iteration (Global): A near-linear time global algorithm that reduces the dependency on the condition number from $\kappa$ to $\sqrt{\kappa}$, yielding a time complexity of $\tilde{O}(\sqrt{\kappa}m)$.
  2. Lanczos Push (Local): To avoid traversing the entire graph, the authors introduce a novel "pruning" technique called subset Lanczos recurrence. This keeps the iteration vectors sparse, allowing the algorithm to run in sublinear time independent of the overall graph size, achieving a time complexity of $\tilde{O}(\kappa^{2.75})$.

The high-level intuition behind keeping these vectors localized and sparse during the push operation is illustrated below:

Figure 1: High level idea of our Lanczos Push algorithm for computing 𝑟G(𝑠,𝑡); ˆv1, ..., ˆv𝑘are sparse vectors.

Datasets

The algorithms were evaluated on eight publicly available real-world datasets and two synthetic graph models:

  • Social Networks (Small $\kappa$): Dblp, Youtube, LiveJournal, and Orkut.
  • Infrastructure/Road Networks (Large $\kappa$): powergrid, RoadNet-CA, RoadNet-PA, and RoadNet-TX.
  • Synthetic Graphs (Scalability): Erdős-Rényi (ER) and Barabási-Albert (BA) graphs with sizes ranging from $10^2$ to $10^6$ nodes.

Key Insights and Ideas

  • Breaking the $\kappa^3$ Bottleneck: Previous local random-walk algorithms were stuck with a cubic dependency on the condition number ($\tilde{O}(\kappa^3)$). Lanczos Push breaks this barrier to achieve subcubic complexity ($\tilde{O}(\kappa^{2.75})$).
  • The Power of Sparsity Pruning: By actively introducing controlled errors via subset selection (pruning small values in the vectors), Lanczos Push maintains highly localized computations without sacrificing the rapid convergence properties inherent to the Lanczos method.
  • Proving a Lower Bound: The authors prove that any local algorithm approximating RD within a reasonable error bound requires at least $\Omega(\kappa)$ queries, formally establishing why the condition number is such a critical factor for local graph algorithms.

Key Results

The paper provides a comprehensive comparison of their methods against six state-of-the-art baselines, as summarized in their algorithmic breakdown:

Table 1: A comparison of different algorithms for computing pairwise RD
  • Massive Speedups: On road networks (high $\kappa$), Lanczos Iteration runs 100× faster than the standard Power Method.
  • Unmatched Local Efficiency: Lanczos Push outperforms all other local algorithms, running 5× to 10× faster on social networks and 50× faster on road networks compared to its closest competitors.
  • Scalability & Stability: Synthetic testing confirmed that Lanczos Push achieves sublinear runtime relative to graph size, demonstrating excellent scalability for massive graphs while remaining numerically stable under high-precision requirements.

Limitations and Future Work

While Lanczos Push marks a significant step forward, a theoretical gap remains. The algorithm achieves an upper bound time complexity of $\tilde{O}(\kappa^{2.75})$, but the proven lower bound is $\Omega(\kappa)$. The authors note that closing or matching this gap between the upper and lower bounds of $\kappa$-dependency remains an open and interesting direction for future research.

Summary updated

BibTeX
@misc{yang2026theoretically,
  author = {Yichun Yang and Longlong Lin and Rong-Hua Li and Meihao Liao and Guoren Wang},
  title = {{Theoretically and Practically Efficient Resistance Distance Computation on Large Graphs}},
  year = {2026},
  eprint = {2601.11159},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2601.11159},
}
Figure