English

Warm-Starting All-Pairs Shortest Paths with Predictions

Data Structures and Algorithms 2026-07-01 v1

Abstract

One of the three key hypotheses of fine-grained complexity asserts that computing All-Pairs Shortest Paths (APSP) requires cubic time, up to subpolynomial factors, in the worst case. We initiate the study of APSP in the paradigm of algorithms with predictions, also known as learning-augmented algorithms. We propose an APSP algorithm that takes as additional input a \emph{prediction} (e.g., given by a model learned from similar instances seen in the past) consisting of sets of vertices causing the shortest \emph{detour} for each pair of vertices. The algorithm runs in time O(n2.83+ηn)\mathcal{O}(n^{2.83} + \eta n), where η\eta denotes the \emph{prediction error} defined as the number of pairs of vertices for which, informally speaking, the prediction was not sufficient to compute and certify optimality of the shortest path length. This is already subcubic when the prediction error is (polynomially) smaller than its maximum possible values n2n^2, i.e., whenever the prediction is at least slightly better than terrible. We build on the co-nondeterministic algorithm for the Exact Triangle problem by Chan, Vassilevska Williams, and Xu (STOC 2023), essentially enabling this algorithm to detect mistakes in the nondeterministic certificate and recover from them. Our result constitutes the first necessary step towards designing learning-augmented algorithms for problems with known fine-grained lower bounds conditioned on the APSP Hypothesis.

Keywords

Cite

@article{arxiv.2607.00857,
  title  = {Warm-Starting All-Pairs Shortest Paths with Predictions},
  author = {Adam Polak and Jonas Schmidt},
  journal= {arXiv preprint arXiv:2607.00857},
  year   = {2026}
}