English

BD-Index: Scalable Biharmonic Distance Queries on Large Graphs via Divide-and-Conquer Indexing

Data Structures and Algorithms 2025-12-03 v1

Abstract

Biharmonic distance (\bd) is a powerful graph distance metric with many applications, including identifying critical links in road networks and mitigating over-squashing problem in \gnn. However, computing \bd\ is extremely difficult, especially on large graphs. In this paper, we focus on the problem of \emph{single-pair} \bd\ query. Existing methods mainly rely on random walk-based approaches, which work well on some graphs but become inefficient when the random walk cannot mix rapidly.To overcome this issue, we first show that the biharmonic distance between two nodes s,ts,t, denoted by b(s,t)b(s,t), can be interpreted as the distance between two random walk distributions starting from ss and tt. To estimate these distributions, the required random walk length is large when the underlying graph can be easily cut into smaller pieces. Inspired by this observation, we present novel formulas of \bd to represent b(s,t)b(s,t) by independent random walks within two node sets Vs\mathcal{V}_s, Vt\mathcal{V}_t separated by a small \emph{cut set} Vcut\mathcal{V}_{cut}, where VsVtVcut=V\mathcal{V}_s\cup\mathcal{V}_t\cup\mathcal{V}_{cut}=\mathcal{V} is the set of graph nodes. Building upon this idea, we propose \bindex, a novel index structure which follows a divide-and-conquer strategy. The graph is first cut into pieces so that each part can be processed easily. Then, all the required random walk probabilities can be deterministically computed in a bottom-top manner. When a query comes, only a small part of the index needs to be accessed. We prove that \bindex\ requires O(nh)O(n\cdot h) space, can be built in O(nh(h+dmax))O(n\cdot h\cdot (h+d_{max})) time, and answers each query in O(nh)O(n\cdot h) time, where hh is the height of a hierarchy partition tree and dmaxd_{max} is the maximum degree, which are both usually much smaller than nn.

Keywords

Cite

@article{arxiv.2512.02929,
  title  = {BD-Index: Scalable Biharmonic Distance Queries on Large Graphs via Divide-and-Conquer Indexing},
  author = {Yueyang Pan and Meihao Liao and Rong-Hua Li},
  journal= {arXiv preprint arXiv:2512.02929},
  year   = {2025}
}