Abstract
This paper introduces the first "ideal" learned algorithm for maintaining approximate Single-Source Shortest Paths (SSSP) in incremental graphs. By leveraging a predicted sequence of edge arrivals, the algorithm achieves near-optimal performance when predictions are accurate, degrades gracefully with prediction error, and remains robust against worst-case scenarios.
Introduction
In many real-world applications—like routing in communication networks or navigation systems—graphs aren't static; they evolve as new connections (edges) are added. Maintaining the shortest paths from a source to all other nodes (SSSP) in these incremental graphs is a fundamental problem.
Traditional "worst-case" algorithms are often slow because they assume every problem instance is entirely new and adversarial. However, in practice, we often have historical data or machine-learning models that can predict how a graph might grow. The challenge is: how do we design a data structure that uses these predictions to speed up computation without becoming a liability if the predictions are wrong? Prior work had addressed this for All-Pairs Shortest Paths (APSP), but the Single-Source version remained unsolved in the "algorithms-with-predictions" framework.
Methods
The authors propose a two-step approach consisting of an offline building block and an online learned adaptation.
Offline Building Block
The algorithm first addresses the offline incremental SSSP problem, where the entire sequence of edge arrivals is known in advance. It utilizes distance bucketing, rounding distances up to the nearest power of $(1 + \epsilon)$. This allows the system to ignore small changes and only recompute when a vertex "jumps" to a significantly different distance bucket.
Recursive Decomposition
A core technique is the use of a recursion tree to divide the edge sequence. In each subproblem, the algorithm identifies "dead" vertices (those whose distance bucket doesn't change) and "alive" vertices. Dijkstra's algorithm is then run only on a reduced graph of "alive" components, significantly cutting down work.
The Online Learned Algorithm
The offline structure is adapted to the online setting where a predicted sequence $\hat{\sigma}$ is provided. As edges arrive, the algorithm compares the actual arrival time to the predicted time. If an edge arrives "out of order," the algorithm "jumps" the edge to its correct position in the sequence and selectively rebuilds only the affected parts of the recursion tree. The running time is directly tied to the prediction error, measured either by the maximum displacement of an edge or the edit distance between the predicted and actual sequences.
Key Results
The theoretical analysis demonstrates that the algorithm meets the "ideal" criteria for learned algorithms:
- Consistency: With perfect predictions, the update time is nearly optimal, achieving $\tilde{O}(m \log(nW) / \epsilon)$.
- Smoothness: Performance degrades linearly as prediction error increases. For an error $\eta$, the time is roughly $\tilde{O}(m\eta \log W / \epsilon)$.
- Robustness: In the worst case (garbage predictions), the algorithm remains competitive with standard non-learned algorithms.
Additionally, the authors extended these techniques to All-Pairs Shortest Paths, achieving $O(\log n)$ worst-case update time and a query time of $O(\eta^2 \text{ polylog}(nW))$, which is optimal under certain fine-grained complexity hypotheses.
Discussion and Future Work
While the paper provides a strong theoretical foundation, it focuses on incremental graphs (insertions only). Extending these results to fully dynamic graphs, which include both insertions and deletions, remains a significant open problem. Furthermore, the current model requires a prediction of the entire edge sequence, which may not be available in all streaming contexts. Future research should involve empirical validation on real-world graph traces to evaluate the practical performance and constant factors of these structures.
Summary updated