Algorithms with predictions is a growing area that aims to leverage machine-learned predictions to design faster beyond-worst-case algorithms. In this paper, we use this framework to design a learned data structure for the incremental strongly connected components (SCC) problem. In this problem, the $n$ vertices of a graph are known a priori and the $m$ directed edges arrive over time. The goal is to efficiently maintain the strongly connected components of the graph after each insert. Our algorithm receives a possibly erroneous prediction of the edge sequence and uses it to precompute partial solutions to support fast inserts. We show that our algorithm achieves nearly optimal bounds with good predictions and its performance smoothly degrades with the prediction error. We also implement our data structure and perform experiments on real datasets. Our empirical results show that the theory is predictive of practical runtime improvements.
翻译:含预测的算法是一个新兴领域,旨在利用机器学习预测设计超越最坏情况分析的更快速算法。本文利用该框架,为增量强连通分量(SCC)问题设计了一种学习型数据结构。在该问题中,图上的 $n$ 个顶点预先已知,而 $m$ 条有向边随时间逐步到达,目标是在每次插入后高效维护图的强连通分量。我们的算法接收关于边序列的预测(可能包含错误),并利用该预测预计算局部解以支持快速插入。理论证明表明,当预测质量良好时,算法可实现近乎最优的界,且性能随预测误差增加而平滑退化。我们实现了该数据结构并在真实数据集上进行实验,实证结果验证了理论能够有效预测实际运行时间的提升。