NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Enumeration of Far-apart Pairs by Decreasing Distance for Faster Hyperbolicity Computation

David Coudert, André Nusser, Laurent Viennot · DOI

Introduction

In network science, Gromov hyperbolicity is a fundamental parameter used to quantify the "tree-likeness" of a graph's shortest-path metric. This metric is essential for various applications, including the design of efficient routing schemes, the analysis of complex biological networks, and understanding the structural core of the internet.

Despite its importance, computing exact hyperbolicity is computationally demanding. The most efficient theoretical algorithms possess a time complexity of $O(n^{3.69})$, which is prohibitive for large-scale networks. In practice, researchers rely on the "4-point condition" combined with pruning techniques. However, these practical algorithms face a significant memory bottleneck: they typically require storing an all-pairs distance matrix or a comprehensive list of "far-apart" pairs, leading to an $O(n^2)$ space requirement. For a graph with 100,000 nodes, this translates to gigabytes of RAM; for networks with millions of nodes, the memory requirement exceeds the capacity of standard hardware.

Methodology

This paper introduces a novel, memory-efficient approach to hyperbolicity computation by replacing static data structures with a "lazy" iterator. The core innovation lies in how node pairs are processed and how distances are managed.

1. Far-Apart Pairs

A pair of nodes $(u, v)$ is defined as "far-apart" if $u$ is a leaf of all shortest-path trees rooted at $v$, and vice versa. Prior research has established that hyperbolicity can be determined by examining only these specific pairs, which are significantly fewer in number than the total $n^2$ pairs in a graph.

2. The Decreasing Distance Iterator

Instead of pre-calculating and sorting all far-apart pairs—an operation requiring $O(n^2)$ space—the authors developed a specialized iterator. This iterator yields far-apart pairs on the fly, specifically in order of decreasing distance. By processing the largest distances first, the algorithm can establish high lower bounds for hyperbolicity early in the execution.

3. On-the-fly Computation and BFS Caching

To eliminate the need for a distance matrix, the algorithm performs Breadth-First Searches (BFS) dynamically. To mitigate the computational cost of re-calculating distances, the authors implemented:

  • BFS Caching: A cache stores recent BFS results (e.g., 1,000 entries) to speed up repeated queries.
  • Pruned BFS: This technique skips nodes that cannot contribute to a higher hyperbolicity value based on the current lower bounds, further reducing the search space.

Experimental Setup

The algorithm was evaluated on a diverse suite of 40 benchmark graphs, including:

  • Biological Networks: BioGRID interaction databases and protein-protein interaction networks.
  • Internet Topology: CAIDA autonomous systems maps and DIMES datasets.
  • Social and Communication Networks: Twitter, Slashdot, Epinions, and email-Enron.
  • Web and Road Graphs: The NotreDame web graph and Florida road networks (FLA-t).
  • Synthetic Grids: Large square grids (up to $501 \times 501$) with 10% edge deletion to test structural sensitivity.

Key Results and Insights

Massive Memory Reduction

The primary achievement of this work is the reduction of memory consumption by at least two orders of magnitude for several large-scale instances. For example, in a $300 \times 300$ synthetic grid—a structure that typically exhausts memory due to many pairs having similar distances—the new approach reduced memory usage by a factor of 177x.

Breaking the Size Barrier

The iterator-based approach enabled the analysis of graphs previously considered "out-of-reach." The notreDame-d graph, containing over 130,000 nodes, was successfully processed using 53 GB of RAM. Previous state-of-the-art methods would have failed to initialize on the same hardware due to the $O(n^2)$ space constraint.

The Efficiency of Pruning

The authors observed that for many real-world graphs, only a tiny fraction of far-apart pairs are relevant to the final hyperbolicity value. In the dblp-2010 graph, for instance, only 0.27% of pairs required evaluation. By iterating from the largest distances downward, the algorithm finds high lower bounds quickly, allowing the pruning mechanisms to discard the vast majority of remaining node 4-tuples.

Speed vs. Space Trade-offs

While the method involves recomputing some distances (potentially increasing time), the pruning is so effective that total computation time often remains comparable to, or even faster than, previous algorithms. The authors also noted that while BFS caching is beneficial, a cache that is too large can degrade performance due to CPU cache misses.

Conclusion and Future Work

By shifting from static storage to a dynamic iterator, this research provides a scalable path for computing hyperbolicity in massive networks. While the "million-node barrier" still poses challenges for non-trivial graphs like full national road networks due to BFS timeouts, the current work provides much tighter lower and upper bounds than previously possible.

Future improvements may include parallelization of the BFS searches and 4-tuple tests, as well as the development of better lower bound heuristics to enable even more aggressive pruning from the start of the computation.

Summary updated

BibTeX
@article{coudert2022enumeration,
  author = {David Coudert and André Nusser and Laurent Viennot},
  title = {{Enumeration of Far-apart Pairs by Decreasing Distance for Faster Hyperbolicity Computation}},
  journal = {ACM J. Exp. Algorithmics},
  year = {2022},
  doi = {10.1145/3569169},
}

Loading related content...

Figure