Lune

ICML2024Top-tier venue

Incremental Topological Ordering and Cycle Detection with Predictions

Samuel McCauley, Benjamin Moseley, Aidin Niaparast, Shikha Singh

Abstract

This paper leverages the framework of algorithms-with-predictions to design data structures for two fundamental dynamic graph problems: incremental topological ordering and cycle detection. In these problems, the input is a directed graph on nn nodes, and the mm edges arrive one by one. The data structure must maintain a topological ordering of the vertices at all times and detect if the newly inserted edge creates a cycle. The theoretically best worst-case algorithms for these problems have high update cost (polynomial in nn and mm). In practice, greedy heuristics (that recompute the solution from scratch each time) perform well but can have high update cost in the worst case. In this paper, we bridge this gap by leveraging predictions to design a learned new data structure for the problems. Our data structure guarantees consistency, robustness, and smoothness with respect to predictions -- that is, it has the best possible running time under perfect predictions, never performs worse than the best-known worst-case methods, and its running time degrades smoothly with the prediction error. Moreover, we demonstrate empirically that predictions, learned from a very small training dataset, are sufficient to provide significant speed-ups on real datasets.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

2 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Binary Search with Distributional Predictions cites Predictive Flows for Faster Ford-Fulkerson
  • Discrete-Convex-Analysis-Based Framework for Warm-Starting Algorithms with Predictions cites Faster Matchings via Learned Duals
  • Sorting with Predictions cites Discrete-Convex-Analysis-Based Framework for Warm-Starting Algorithms with Predictions
  • Sorting with Predictions cites Faster Matchings via Learned Duals
  • Sorting with Predictions cites Predictive Flows for Faster Ford-Fulkerson
  • Faster Global Minimum Cut with Predictions cites Binary Search with Distributional Predictions
  • Faster Global Minimum Cut with Predictions cites Faster Matchings via Learned Duals
  • Faster Global Minimum Cut with Predictions cites Predictive Flows for Faster Ford-Fulkerson
  • Predictive Flows for Faster Ford-Fulkerson cites Discrete-Convex-Analysis-Based Framework for Warm-Starting Algorithms with Predictions
  • Predictive Flows for Faster Ford-Fulkerson cites Faster Matchings via Learned Duals
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. Binary Search with Distributional PredictionsMichael Dinitz, Sungjin Im, Thomas Lavastida, Benjamin Moseley et al.NeurIPS 2024 · 20 citations
  2. Faster Global Minimum Cut with PredictionsHelia Niaparast, Benjamin Moseley, Karan SinghICML 2025

Builds on9

  1. Faster Matchings via Learned DualsMichael Dinitz, Sungjin Im, Thomas Lavastida, Benjamin Moseley et al.NeurIPS 2021 · 98 citations
  2. Predictive Flows for Faster Ford-FulkersonSami Davies, Benjamin Moseley, Sergei Vassilvitskii, Yuyan WangICML 2023 · 30 citations
  3. Sorting with PredictionsXingjian Bai, Christian CoesterNeurIPS 2023 · 29 citations
  4. Discrete-Convex-Analysis-Based Framework for Warm-Starting Algorithms with PredictionsShinsaku Sakaue, Taihei OkiNeurIPS 2022 · 28 citations
  5. An Improved Algorithm for Incremental Cycle Detection and Topological Ordering in Sparse GraphsSayan Bhattacharya, Janardhan KulkarniSODA 2020 · 15 citations

Related papers

  1. Almost-Linear Time Algorithms for Incremental Graphs: Cycle Detection, SCCs, s-t Shortest Path, and Minimum-Cost FlowLi Chen, Rasmus Kyng, Yang P. Liu, Simon Meierhans et al.STOC 2024 · 11 citations
  2. On Dynamic Graph Algorithms with PredictionsJan van den Brand, Sebastian Forster, Yasamin Nazari, Adam PolakSODA 2024 · 4 citations
  3. Online List Labeling with PredictionsSamuel McCauley, Benjamin Moseley, Aidin Niaparast, Shikha SinghNeurIPS 2023 · 9 citations
  4. Subquadratic dynamic path reporting in directed graphs against an adaptive adversaryAdam Karczmarz, Anish Mukherjee, Piotr SankowskiSTOC 2022 · 5 citations
  5. Efficient fully dynamic elimination forests with applications to detecting long paths and cyclesJiehua Chen, Wojciech Czerwinski, Yann Disser, Andreas Emil Feldmann et al.SODA 2021 · 7 citations
Dusk over the sea between two cliffs drawn in fine vertical lines