-
Incremental Approximate Single-Source Shortest Paths with Predictions
Authors:
Samuel McCauley,
Benjamin Moseley,
Aidin Niaparast,
Helia Niaparast,
Shikha Singh
Abstract:
The algorithms-with-predictions framework has been used extensively to develop online algorithms with improved beyond-worst-case competitive ratios. Recently, there is growing interest in leveraging predictions for designing data structures with improved beyond-worst-case running times. In this paper, we study the fundamental data structure problem of maintaining approximate shortest paths in incr…
▽ More
The algorithms-with-predictions framework has been used extensively to develop online algorithms with improved beyond-worst-case competitive ratios. Recently, there is growing interest in leveraging predictions for designing data structures with improved beyond-worst-case running times. In this paper, we study the fundamental data structure problem of maintaining approximate shortest paths in incremental graphs in the algorithms-with-predictions model. Given a sequence $σ$ of edges that are inserted one at a time, the goal is to maintain approximate shortest paths from the source to each vertex in the graph at each time step. Before any edges arrive, the data structure is given a prediction of the online edge sequence $\hatσ$ which is used to ``warm start'' its state.
As our main result, we design a learned algorithm that maintains $(1+ε)$-approximate single-source shortest paths, which runs in $\tilde{O}(m η\log W/ε)$ time, where $W$ is the weight of the heaviest edge and $η$ is the prediction error. We show these techniques immediately extend to the all-pairs shortest-path setting as well. Our algorithms are consistent (performing nearly as fast as the offline algorithm) when predictions are nearly perfect, have a smooth degradation in performance with respect to the prediction error and, in the worst case, match the best offline algorithm up to logarithmic factors.
As a building block, we study the offline incremental approximate single-source shortest-paths problem. In this problem, the edge sequence $σ$ is known a priori and the goal is to efficiently return the length of the shortest paths in the intermediate graph $G_t$ consisting of the first $t$ edges, for all $t$. Note that the offline incremental problem is defined in the worst-case setting (without predictions) and is of independent interest.
△ Less
Submitted 12 February, 2025;
originally announced February 2025.
-
Binary Search with Distributional Predictions
Authors:
Michael Dinitz,
Sungjin Im,
Thomas Lavastida,
Benjamin Moseley,
Aidin Niaparast,
Sergei Vassilvitskii
Abstract:
Algorithms with (machine-learned) predictions is a powerful framework for combining traditional worst-case algorithms with modern machine learning. However, the vast majority of work in this space assumes that the prediction itself is non-probabilistic, even if it is generated by some stochastic process (such as a machine learning system). This is a poor fit for modern ML, particularly modern neur…
▽ More
Algorithms with (machine-learned) predictions is a powerful framework for combining traditional worst-case algorithms with modern machine learning. However, the vast majority of work in this space assumes that the prediction itself is non-probabilistic, even if it is generated by some stochastic process (such as a machine learning system). This is a poor fit for modern ML, particularly modern neural networks, which naturally generate a distribution. We initiate the study of algorithms with distributional predictions, where the prediction itself is a distribution. We focus on one of the simplest yet fundamental settings: binary search (or searching a sorted array). This setting has one of the simplest algorithms with a point prediction, but what happens if the prediction is a distribution? We show that this is a richer setting: there are simple distributions where using the classical prediction-based algorithm with any single prediction does poorly. Motivated by this, as our main result, we give an algorithm with query complexity $O(H(p) + \log η)$, where $H(p)$ is the entropy of the true distribution $p$ and $η$ is the earth mover's distance between $p$ and the predicted distribution $\hat p$. This also yields the first distributionally-robust algorithm for the classical problem of computing an optimal binary search tree given a distribution over target keys. We complement this with a lower bound showing that this query complexity is essentially optimal (up to constants), and experiments validating the practical usefulness of our algorithm.
△ Less
Submitted 24 November, 2024;
originally announced November 2024.
-
Putting Off the Catching Up: Online Joint Replenishment Problem with Holding and Backlog Costs
Authors:
Benjamin Moseley,
Aidin Niaparast,
R. Ravi
Abstract:
We study an online generalization of the classic Joint Replenishment Problem (JRP) that models the trade-off between ordering costs, holding costs, and backlog costs in supply chain planning systems. A retailer places orders to a supplier for multiple items over time: each request is for some item that the retailer needs in the future, and has an arrival time and a soft deadline. If a request is s…
▽ More
We study an online generalization of the classic Joint Replenishment Problem (JRP) that models the trade-off between ordering costs, holding costs, and backlog costs in supply chain planning systems. A retailer places orders to a supplier for multiple items over time: each request is for some item that the retailer needs in the future, and has an arrival time and a soft deadline. If a request is served before its deadline, the retailer pays a holding cost per unit of the item until the deadline. However, if a request is served after its deadline, the retailer pays a backlog cost per unit. Each service incurs a fixed joint service cost and a fixed item-dependent cost for every item included in a service. These fixed costs are the same irrespective of the units of each item ordered. The goal is to schedule services to satisfy all the online requests while minimizing the sum of the service costs, the holding costs, and the backlog costs.
Constant competitive online algorithms have been developed for two special cases: the make-to-order version when the deadlines are equal to arrival times (Buchbinder et al., 2013), and the make-to-stock version with hard deadlines with zero holding costs (Bienkowski et al., 2014). Our general model with holding and backlog costs has not been investigated earlier, and no online algorithms are known even in the make-to-stock version with hard deadlines and non-zero holding costs. We develop a new online algorithm for the general version of online JRP with both holding and backlog costs and establish that it is 30-competitive. Along the way, we develop a 3-competitive algorithm for the single-item case that we build on to get our final result. Our algorithm uses a greedy strategy and its competitiveness is shown using a dual fitting analysis.
△ Less
Submitted 24 October, 2024;
originally announced October 2024.
-
Incremental Topological Ordering and Cycle Detection with Predictions
Authors:
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 $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 i…
▽ More
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.
△ Less
Submitted 16 February, 2024;
originally announced February 2024.
-
Online List Labeling with Predictions
Authors:
Samuel McCauley,
Benjamin Moseley,
Aidin Niaparast,
Shikha Singh
Abstract:
A growing line of work shows how learned predictions can be used to break through worst-case barriers to improve the running time of an algorithm. However, incorporating predictions into data structures with strong theoretical guarantees remains underdeveloped. This paper takes a step in this direction by showing that predictions can be leveraged in the fundamental online list labeling problem. In…
▽ More
A growing line of work shows how learned predictions can be used to break through worst-case barriers to improve the running time of an algorithm. However, incorporating predictions into data structures with strong theoretical guarantees remains underdeveloped. This paper takes a step in this direction by showing that predictions can be leveraged in the fundamental online list labeling problem. In the problem, n items arrive over time and must be stored in sorted order in an array of size Theta(n). The array slot of an element is its label and the goal is to maintain sorted order while minimizing the total number of elements moved (i.e., relabeled). We design a new list labeling data structure and bound its performance in two models. In the worst-case learning-augmented model, we give guarantees in terms of the error in the predictions. Our data structure provides strong guarantees: it is optimal for any prediction error and guarantees the best-known worst-case bound even when the predictions are entirely erroneous. We also consider a stochastic error model and bound the performance in terms of the expectation and variance of the error. Finally, the theoretical results are demonstrated empirically. In particular, we show that our data structure has strong performance on real temporal data sets where predictions are constructed from elements that arrived in the past, as is typically done in a practical use case.
△ Less
Submitted 20 June, 2023; v1 submitted 17 May, 2023;
originally announced May 2023.
-
Timeliness Through Telephones: Approximating Information Freshness in Vector Clock Models
Authors:
Da Qi Chen,
Lin An,
Aidin Niaparast,
R. Ravi,
Oleksandr Rudenko
Abstract:
We consider an information dissemination problem where the root of an undirected graph constantly updates its information. The goal is to keep every other node in the graph about the root as freshly informed as possible. Our synchronous information spreading model uses telephone calls at each time step, in which any node can call at most one neighbor, thus forming a matching over which information…
▽ More
We consider an information dissemination problem where the root of an undirected graph constantly updates its information. The goal is to keep every other node in the graph about the root as freshly informed as possible. Our synchronous information spreading model uses telephone calls at each time step, in which any node can call at most one neighbor, thus forming a matching over which information is transmitted at each step. We introduce two problems in minimizing two natural objectives (Maximum and Average) of the latency of the root's information at all nodes in the network.
After deriving a simple reduction from the maximum rooted latency problem to the well-studied minimum broadcast time problem, we focus on the average rooted latency version. We introduce a natural problem of finding a finite schedule that minimizes the average broadcast time from a root. We show that any average rooted latency induces a solution to this average broadcast problem within a constant factor and conversely, this average broadcast time is within a logarithmic factor of the average rooted latency. Then, by approximating the average broadcast time problem via rounding a time-indexed linear programming relaxation, we obtain a logarithmic approximation to the average latency problem.
Surprisingly, we show that using the average broadcast time for average rooted latency introduces this necessary logarithmic factor overhead even in trees. We overcome this hurdle and give a 40-approximation for trees. For this, we design an algorithm to find near-optimal locally-periodic schedules in trees where each vertex receives information from its parent in regular intervals. On the other side, we show how such well-behaved schedules approximate the optimal schedule within a constant factor.
△ Less
Submitted 14 July, 2022; v1 submitted 9 November, 2021;
originally announced November 2021.
-
On a question of Haemers regarding vectors in the nullspace of Seidel matrices
Authors:
Saieed Akbari,
Sebastian M. Cioabă,
Samira Goudarzi,
Aidin Niaparast,
Artin Tajdini
Abstract:
In 2011, Haemers asked the following question: If $S$ is the Seidel matrix of a graph of order $n$ and $S$ is singular, does there exist an eigenvector of $S$ corresponding to $0$ which has only $\pm 1$ elements?
In this paper, we construct infinite families of graphs which give a negative answer to this question. One of our constructions implies that for every natural number $N$, there exists a…
▽ More
In 2011, Haemers asked the following question: If $S$ is the Seidel matrix of a graph of order $n$ and $S$ is singular, does there exist an eigenvector of $S$ corresponding to $0$ which has only $\pm 1$ elements?
In this paper, we construct infinite families of graphs which give a negative answer to this question. One of our constructions implies that for every natural number $N$, there exists a graph whose Seidel matrix $S$ is singular such that for any integer vector in the nullspace of $S$, the absolute value of any entry in this vector is more than $N$. We also derive some characteristics of vectors in the nullspace of Seidel matrices, which lead to some necessary conditions for the singularity of Seidel matrices. Finally, we obtain some properties of the graphs which affirm the above question.
△ Less
Submitted 21 January, 2021; v1 submitted 12 November, 2020;
originally announced November 2020.