Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
139 tokens/sec
GPT-4o
7 tokens/sec
Gemini 2.5 Pro Pro
46 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Incremental Topological Ordering and Cycle Detection with Predictions (2402.11028v1)

Published 16 Feb 2024 in cs.DS

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 $n$ nodes, and the $m$ 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 $n$ and $m$). 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.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (27)
  1. An O⁢(n2.75)𝑂superscript𝑛2.75{O}(n^{2.75})italic_O ( italic_n start_POSTSUPERSCRIPT 2.75 end_POSTSUPERSCRIPT ) algorithm for incremental topological ordering. ACM Transactions on Algorithms (TALG), 4(4):1–14, 2008.
  2. Sorting with predictions. In Advances in Neural Information Processing Systems, 2023. To appear.
  3. Incremental dfs algorithms: a theoretical and experimental study. In Proceedings of the Twenty-Ninth Annual ACM-SIAM Symposium on Discrete Algorithms, pp.  53–72. SIAM, 2018.
  4. A new approach to incremental topological ordering. In Proc. 20th ACM-SIAM Symposium on Discrete algorithms (SODA), pp.  1108–1115. SIAM, 2009.
  5. A new approach to incremental cycle detection and related problems. ACM Transactions on Algorithms (TALG), 12(2):1–22, 2015.
  6. Incremental topological sort and cycle detection in O~⁢(m⁢n)~𝑂𝑚𝑛\widetilde{O}(m\sqrt{n})over~ start_ARG italic_O end_ARG ( italic_m square-root start_ARG italic_n end_ARG ) expected total time. In Proc. 29th ACM-SIAM Symposium on Discrete Algorithms (SODA), pp.  21–34. SIAM, 2018.
  7. An improved algorithm for incremental cycle detection and topological ordering in sparse graphs. In Proc. 14th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pp.  2509–2521. SIAM, 2020.
  8. On dynamic graph algorithms with predictions. arXiv preprint arXiv:2307.09961, 2023.
  9. Almost-linear time algorithms for incremental graphs: Cycle detection, sccs, s𝑠sitalic_s-t𝑡titalic_t shortest path, and minimum-cost flow, 2023.
  10. A labeling approach to incremental cycle detection. CoRR, abs/1310.8381, 2013. URL http://arxiv.org/abs/1310.8381.
  11. Predictive flows for faster ford-fulkerson. In Krause, A., Brunskill, E., Cho, K., Engelhardt, B., Sabato, S., and Scarlett, J. (eds.), Proc. of the 40th International Conference on Machine Learning (ICML), volume 202 of Proceedings of Machine Learning Research, pp.  7231–7248. PMLR, 23–29 Jul 2023. URL https://proceedings.mlr.press/v202/davies23b.html.
  12. Faster matchings via learned duals. In Ranzato, M., Beygelzimer, A., Dauphin, Y. N., Liang, P., and Vaughan, J. W. (eds.), Proc. 34th Conference on Advances in Neural Information Processing Systems (NeurIPS), pp.  10393–10406, 2021. URL https://proceedings.neurips.cc/paper/2021/hash/5616060fb8ae85d93f334e7267307664-Abstract.html.
  13. On the performance of learned data structures. Theoretical Computer Science (TCS), 871:107–120, 2021.
  14. The incremental maintenance of a depth-first-search tree in directed acyclic graphs. Information processing letters, 61(2):113–120, 1997.
  15. Incremental cycle detection, topological ordering, and strong component maintenance. ACM Transactions on Algorithms (TALG), 8(1):1–33, 2012.
  16. Decremental single-source shortest paths on undirected graphs in near-linear total update time. Journal of the ACM (JACM), 65(6):1–40, 2018.
  17. On the complexity of algorithms with predictions for dynamic graph problems. In Innovations in Theoretical Computer Science (ITCS), 2024.
  18. Italiano, G. F. Amortized efficiency of a path retrieval data structure. Theoretical Computer Science, 48:273–281, 1986.
  19. The case for learned index structures. In Das, G., Jermaine, C. M., and Bernstein, P. A. (eds.), Proc. 44th Annual International Conference on Management of Data, (SIGMOD), pp.  489–504. ACM, 2018. doi: 10.1145/3183713.3196909. URL https://doi.org/10.1145/3183713.3196909.
  20. Speeding up bellman ford via minimum violation permutations. In Krause, A., Brunskill, E., Cho, K., Engelhardt, B., Sabato, S., and Scarlett, J. (eds.), International Conference on Machine Learning, ICML 2023, 23-29 July 2023, Honolulu, Hawaii, USA, volume 202 of Proceedings of Machine Learning Research, pp.  18584–18598. PMLR, 2023. URL https://proceedings.mlr.press/v202/lattanzi23a.html.
  21. SNAP Datasets: Stanford large network dataset collection. http://snap.stanford.edu/data, June 2014.
  22. On-line graph algorithms for incremental compilation. In International Workshop on Graph-Theoretic Concepts in Computer Science, pp.  70–86. Springer, 1993.
  23. Online list labeling with predictions. In Advances in Neural Information Processing Systems, 2023.
  24. Patterns and dynamics of users’ behavior and interaction: Network analysis of an online community. Journal of the American Society for Information Science and Technology, 60(5):911–932, 2009.
  25. Motifs in temporal networks. In Proceedings of the tenth ACM international conference on web search and data mining, pp.  601–610, 2017.
  26. Discrete-convex-analysis-based framework for warm-starting algorithms with predictions. In 35th Conference on Neural Information Processing Systems (NeurIPS), 2022.
  27. On dynamic graph algorithms with predictions. In Symposium on Discrete Algorithms (SODA), 2024.
Citations (1)

Summary

We haven't generated a summary for this paper yet.