Binary Search with Distributional Predictions

Authors: michael  dinitz
sungjin  im
thomas  lavastida
benjamin  moseley
aidin  niaparast
sergei  vassilvitskii
Venue: NeurIPS_cc_2024_Conference
Published: 2024-05-13 17:18:10

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 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 \eta)$, where $H(p)$ is the entropy of the true distribution $p$ and $\eta$ 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.

Main paper: 
 introduction: 
 Algorithms with predictions, or algorithms with machine-learned advice, has proved to be a useful framework for combining machine learning (which is extremely useful in the usual case but can be quite bad when in the worst case) with traditional worst-case algorithms (which are quite good in the worst-case but do not do as well as we might hope in the usual case). While similar ideas have appeared in many places in the past, the formal study of this setting was pioneered by Lykouris and Vassilvitskii [2021] , and was particularly motivated by the practical success of learned index structures [Kraska et al., 2018] . The goal is usually to design an algorithm for some classical and important problem in the setting when we are also provided with some type of "advice" or "prediction" (presumably given by some machine learning algorithm) as to what the instance is like. If the advice is "good" then we want our algorithm to do extremely well, while if the advice is "bad" then we want to inherit the traditional worst-case guarantee. In other words, we want the best of both worlds: good performance in the average case thanks to machine learning, but also robustness and good performance in the worst-case from traditional algorithms.Consider the basic problem of searching for a key in a sorted array. This problem is the first example considered in the survey of Mitzenmacher and Vassilvitskii [2021] , as it is perhaps one of the simplest yet also best-motivated settings. Given a sorted array with n elements and a target key i, we can of course do a binary search for i using only O(log n) comparisons to find its location α(i). But suppose that we additionally receive a prediction α(i) ∈ [n] of the location of the target key i in the array, possibly from some machine learning system which attempts to predict the correct location for each key. If the prediction is perfect (α(i) = α(i)), then it is easy to use this prediction: only one comparison is needed! On the other hand, if the prediction is meaningless, then we can run classical binary search. But what if the prediction is "close"? It turns out that "doubling binary search" from the predicted point can be used to design an algorithm which makes at most O(log(|α(i) -α(i)|)) comparisons [Mitzenmacher and Vassilvitskii, 2021] . So if the prediction is very close to the true location then we make very few queries, while if it is very far away then we recover the traditional binary search comparison bound.The ability to obtain these types of results has led to an explosion of interest in algorithms with predictions; see Section 1.2 for some references. Sometimes the prediction itself is simple, as in the search problem, while sometimes it is quite complex, for instance encompassing a multi-dimensional vector. However, with only a few exceptions such as Diakonikolas et al. [2021] , Angelopoulos et al. [2024] , which will be discussed in Section 1.2 in detail, all of these papers share an important feature: the prediction itself is non-probabilistic. That is, the prediction is a single (potentially high-dimensional) point (or maybe a small number of such points). While making the setting simpler, this is not a good match with the actual output of most ML systems (particularly modern neural networks), which inherently output a distribution. The question we study in this work is how to take advantage of the full richness of the prediction. Of course, we can always turn a distribution into a single point in any number of ways (using a max likelihood estimator (MLE), sampling from the distribution, etc.). But is that always the right thing to do? Or, can we in fact do better by taking full advantage of the entire predicted distribution?In this paper we initiate the study of algorithms with distributional predictions, focusing on the basic search in a sorted array problem described above. In addition to the classic O(log n) comparisons binary search for an array of size n, we recall the "median" or "bisection" algorithm (first described by Knuth [1971] and analyzed by Mehlhorn [1975] ) which probes the cell representing the median of the distribution, and recurses appropriately. When the target keys are indeed drawn from the given distribution, the expected query complexity (i.e. number of comparisons between elements in the array and the target) is bounded by H(p)+1, where H(p) is the entropy of the distribution [Mehlhorn, 1975] . (Note that when the distribution is uniform over n elements, this recovers the O(log n) binary search bound). This is in fact essentially optimal: it is known that every algorithm requires at least H(p)/3 queries in expectation when target keys are drawn from p [Mehlhorn, 1975] .On the other hand, it is easy to see that if target keys are not drawn from p, then this algorithm can be arbitrarily bad: it can easily be made to use Ω(n) comparisons in expectation. So our main question is the following: how can we best utilize a prediction p which is not the true distribution p? Can we recover the near-optimality of the median algorithm without being subject to its worst-case performance?Reduction to point distributions. We first show in Section 2.1 that the obvious approach, of reducing p to a point prediction (whether by sampling, using a max-likelihood prediction, or some other method) and then using previous algorithms, is a bad idea that can lead to poor worst-case performance. In addition to ruling out a natural class of algorithms, this gives additional motivation to our study of distributional predictions: as discussed, essentially all previous work studies the case in which the prediction is a single point (in this case, location); yet, most machine-learning systems will actually output a distribution. So our lower bound implies that any of these traditional point-based algorithms, no matter how good the bound obtained compared to their prediction, must suffer fundamentally poor performance in the real world where target keys actually come from a distribution.Main algorithm. We then give our main result in Section 3: an algorithm which interleaves phases of the "median" algorithm and classical binary search to obtain a query complexity of O(H(p) + log η), where η is the earth mover's distance (EMD, also known as the Wasserstein W 1 metric) between p and p, See Section 3 for precise details. Note that H(p) ≤ O(log n) and log η ≤ log n. So if our prediction p is close to p, then our algorithm has performance essentially equal to the best possible bound H(p). On the other hand, if our prediction p is far from p (so provides essentially no information), we do not suffer the poor performance of naively believing in p and running the median algorithm on it, instead recovering a bound of O(H(p) + log η) = O(log n).While there are many notions of "distance" between distributions, EMD is a natural one in our setting. Many other notions of distance, like ℓ 1 , do not take the geometry of the line into account. For example, consider some distribution p over [n], and let p ′ be the distribution obtained from p by moving γ/2 probability mass from 1 to 2, and let p ′′ be the distribution obtained from p by moving γ/2 probability mass from 1 to n. Then the ℓ 1 distance between p and p ′ is γ, and so is the ℓ 1 distance between p and p ′′ . Yet clearly p ′ is a "more accurate" prediction for p. The earth mover's distance recognizes this fact, and so is a more appropriate measure than ℓ 1 . Similarly, popular measures such as KL-divergence (which are not technically metrics, but do give a notion of distance) suffer the same flaws as ℓ 1 while also being extraordinarily sensitive to mismatches in the support (the KL-divergence can be infinite if the supports of the two distributions do not agree).Distributional Robustness of Optimal Binary Search Trees. We have so far discussed a distributional prediction setting where a target key arrives with a predicted distribution p of its location. This is a strict generalization of Mitzenmacher and Vassilvitskii [2021] , where the prediction is a single location in the array. In their model, the location is error prone and in ours the distribution over locations is error prone. Our goal is to construct an effective search strategy given the target and the prediction.But there is another related setting: there is a single (unknown) distribution over target keys, and we are given a (possibly erroneous) prediction of this distribution and are asked to design a search algorithm with minimum expected lookup time when target keys are drawn from the true distribution. In other words, instead of each target key coming with a predicted distribution p over locations in [n] and the true location being drawn from some true distribution p, we are given ahead of time a predicted distribution p over target keys [n] , and are asked to design a lookup algorithm for inputs that use this distribution. But then these target keys in the input are actually drawn from p rather than p, and do not come with target-specific predictions.Since any comparison-based search algorithm is equivalent to a particular binary search tree, if p = p then this is precisely the classical problem of computing an optimal binary search tree [Mehlhorn, 1975] . So we can interpret our results as providing distributionally-robust optimal BSTs: given p, we can efficiently compute a BST where the expected lookup time under the true (but unknown) query distribution p is at most O(H(p) + log η). Surprisingly, given the classical nature of computing optimal (or near-optimal) BSTs, this simple question of "what if my distribution is incorrect?" has not been considered in the data structures and algorithms literature.Worst case lower bound. We complement our algorithmic development with a lower bound in Section 3.2, proving that no algorithm can use fewer than Ω(log η) queries in the worst case. Since Ω(H(p)) is a known lower bound as well even if p is known perfectly [Mehlhorn, 1975] , this implies that our algorithm is asymptotically tight. So if we measure accuracy of the prediction via EMD, no algorithm can make asymptotically better use of a distributional prediction.There has been recent interest in the study of algorithm with multiple predictions, sometimes called prediction portfolios. See, for example, [Balcan et al., 2021 , Dinitz et al., 2022 , Anand et al., 2022 , Kevi and Nguyen, 2023] . The goal is usually to do as well as the best of the predictions in the portfolio, with the difficulty being that we do not know a priori which of these predictions is best. We extend our main algorithm to this setting in Section 4, showing that it is possible to use multiple distributional predictions effectively.Experiments. Finally, in Section 5 we give empirical evidence of the efficacy of the algorithm we propose. We first use synthetic data to demonstrate the effect of distribution error on the performance of the algorithm. We then evaluate it on a number of real world datasets.Machine learning augmented algorithms have found applications in various areas -for example, online algorithms [Lykouris and Vassilvitskii, 2021, Purohit et al., 2018] , combinatorial algorithms [Dinitz et al., 2021 , Davies et al., 2023] , differential privacy [Amin et al., 2022] , data structures [Lin et al., 2022 , Vaidya et al., 2021 , McCauley et al., 2024 , Mccauley et al., 2024] and mechanism design [Agrawal et al., 2022] , to name a few. In particular, online algorithms have been extensively studied with ML advice for various problems, such as online caching [Lykouris and Vassilvitskii, 2021] , ski-rental [Purohit et al., 2018] , scheduling [Lattanzi et al., 2020] , knapsack [Im et al., 2021] , set cover [Bamas et al., 2020] , and more [Lindermayr and Megow, 2022] . Due to the vast literature, we only provide a few samples.Particularly relevant to our setting is the work of Lin et al. [2022] , which initiated the study of predictions for binary search trees. This work investigates how to improve a treap's guarantees when item frequencies follow distributions such as the Zipfian distribution.As discussed earlier, in ML augmented algorithms, predictions are typically given in the form of specific values, rather than distributions. Here, we discuss a few exceptions. The work by Diakonikolas et al. [2021] studies the ski-rental problem and prophet inequalities with access to i.i.d. samples from an unknown distribution. Their focus lies on the sample complexity and not on the correctness of the distribution. Indeed, they obtain robustness by combining their consistent algorithm and the best worst-case algorithm in a black-box manner. In contrast, we assume full access to a distributional prediction and develop new ideas to obtain a tight trade-off between consistency and robustness, in conjunction with natural error measures involving entropy and the earth mover's distance, which take the accuracy of the distributional prediction into account.More broadly the question of how to improve performance of problems where either full instances, or some model parameters come from a known distribution is well studied under the rubric of two-stage stochastic optimization [Swamy and Shmoys, 2006, Ahmed, 2010] , with techniques like Sample Average Approximation (SAA) [Kim et al., 2015] having a rich history. Similar to our setting, one can look at the robust setting, where the distribution available to the algorithm is different from the true distribution that examples are drawn from, see e.g., [Bertsimas and Goyal, 2010 , Dütting and Kesselheim, 2019 , Bertsimas et al., 2022 , Besbes et al., 2022] . Typically in these cases one assumes a bound on the difference between the two distributions, explicitly choosing what to hedge against, and then derives optimal strategies. In contrast, in this work we aim to find a smooth trade-off on the performance of the algorithm as a function of the distance between the two distributions, coupled with an upper bound on worst-case performance.Finally, the very recent work of Angelopoulos et al. [2024] is one of the few that consider distributional predictions. It shows an optimal tradeoff between consistency and robustness for a scheduling problem. However, their solution space explored is considerably more limited than ours, essentially consisting of geometric sequences with a multiplicative ratio of 2, each characterized by its starting point. Further, their bound analysis is restricted to cases where the error is sufficiently small. In contrast, our work demonstrates how a binary search algorithm can compare generally to earth mover's distance (EMD) and a lower bound on the optimum for any predicted distribution. As a result, we develop novel algorithmic solutions that build upon a close connection to EMD. 
preliminaries: 
 We now formally describe our problem and setting. Let a 1 < • • • < a n be a set of n keys, and p = (p 1 , . . . , p n ) be a probability distribution over the keys. Our goal is to develop a search strategy (or search algorithm), which takes a target key a as input, and finds a position i such that a i = a. We aim to find search strategies with low expected search cost when the target key a is sampled according to the distribution p. In our analysis we will consider the number of comparisons, also known as the query complexity, as the main metric of study. This metric captures the information theoretic complexity of the problem, and ignores computational overhead. Formally, let the search cost C(a i ) of finding a i be the number of comparisons done by the algorithm when the target key is a i . The expected search cost is thenn i=1 p i C(a i ).To aid in this goal, we are given a prediction, p = (p 1 , . . . , pn ), of p. To account for the fact that the predicted distribution may be incorrect, we let η denote the earth mover's distance (EMD) between p and p. The EMD between two distributions P and Q is the solution to the optimal transport problem between them, or more formally, it is inf γ∼Π(P,Q) E (x,y)∼γ [d(x, y)], where Π(P, Q) is the set of joint distributions with marginals P and Q.Finally, for a distribution p, we let H(p) = -n i=1 p i log(p i ) be the entropy of p. Throughout the paper, all logarithms are in base 2.Given the breadth of work on point predictions, it is tempting to try and reduce the distributional prediction problem to point predictions. We show that this approach does not lead to good results.Given prediction p of p, suppose the algorithm first computes some point α from p and then uses the doubling binary search algorithm from Mitzenmacher and Vassilvitskii [2021] with prediction α. This will have expected running time of O(log(|α -α|)), where α is the true location of the key. A natural question is whether there is someα so that O(log(|α -α|)) is comparable to O(H(p) + log η).Unfortunately, this is not possible, necessitating our more involved algorithm and analysis. Let p be the distribution on two atoms, with p n/4 = 1/2 and p 3n/4 = 1/2, and let p = p. Clearly η = 0, and H(p) = 1, so any competitive algorithm must terminate after a constant number of comparisons in expectation. On the other hand, consider some α ∈[n]. If α ≤ n/2, then since α = 3n/4 with probability 1/2 we have that E[log(|α -α|)] ≥ 1 2 log(n/4)) = Ω(log n). Similarly, if α ≥ n/2, then since α = n/4 with probability 1/2 we have that E[log(|α -α|)] ≥ Ω(log n).Hence converting p to a point prediction and then using the algorithm of Mitzenmacher and Vassilvitskii [2021] as a black box is doomed to failure. 
algorithm: 
 To develop our robust approach, recall the two baseline algorithms-traditional binary search with an O(log n) running time and the algorithm that recurses on the median element of the distribution, with an O(H(p)) running time (assuming it has access to the true distribution p).In our algorithm we interleave these two approaches to get the best of both worlds. Let a ∈ {a 1 , . . . , a n } be the target key. We proceed recursively, keeping track of an active search range [ℓ, r] (if a = a i , we always have i ∈ [ℓ, r]). Initially, we start with ℓ = 1 and r = n. The algorithm proceeds in iterations. Each iteration i for i = 0, 1, . . . has two phases • Bisection. Divide the search range in half based on the predicted probabilities p. Formally, The algorithm continues until a is found.find an index k, ℓ ≤ k ≤ r such that k-1 j=ℓ pj ≤ 1 2 S andThe goal is to show the following theorem with respect to the algorithm.Theorem 3.1. The expected query complexity of the described algorithm is at most 4H(p) + 8 max(log(η) + 2, 1) + 8 = O(H(p) + max(log(η), 0)).4 Before formally proving the theorem, we give key intuition about the analysis. In iteration k, the Bisection phase is continued for 2 k steps. In each step, one comparison is made, which makes the cost of this phase 2 k .Consider the Binary Search at the Endpoints phase. Two comparisons are made during the phase unless a∈ [ℓ, ℓ + d] or a ∈ [r -d, r].In those cases, we run a traditional binary search on an interval of length d + 1, whose cost islog d = log 2 2 k = 2 k .For each key a i , it takes at most log( 1 pi ) + 1 iterations of the Bisection phase to get to a search range that has a predicted probability mass of at most p i /2. We can charge the total cost of the iterations up to this point to the term p i log( 1pi ) in H(p). Either we find a i earlier, in which case the total cost of the iterations can be charged to H(p), or there is an at least p i /2 mass that was predicted to lie outside the interval, allowing us to lower bound η. We make this argument formal below.Proof of Theorem 3.1. With probability p i , the target key a that we are looking for is a i . The goal is to bound the expected cost of the algorithm, which is n i=1 p i C(a i ), where C(a i ) is the cost of the algorithm when a = a i . Let k i be the first iteration at which a is found, assuming a = a i . As mentioned earlier, the total cost of the first phase of the iterations 0 to k i is ki j=0 2 j < 2 ki+1 . Also, the cost of the second phase in each iteration before k i is 2, and in iteration k i is at most 2 ki . So the total cost of the algorithm for iterations 0 to k i is at most 3• 2 ki + 2k i ≤ 4 • 2 ki .We partition the keys based on k i into two sets, and bound the cost of each set separately. LetI 1 := {i : k i ≤ log(log(4/p i ))} and I 2 := {i : k i > log(log(4/p i ))}.First, we bound the cost of indices in I 1 by a constant factor of H(p):i∈I1 p i C(a i ) ≤ 4 i∈I1 p i 2 ki ≤ 4 i∈I1 p i log(4/p i ) ≤ 4H(p) + 8.Now we bound the cost of the indices in I 2 by a constant factor of log(η). Let i ∈ I 2 . We know that during iteration j of searching for a i , in the Bisection phase, the predicted probability mass in the search range decreases by a factor of at least 2 2 j . Therefore the predicted probability mass in the search range [ℓ, r] at the end of the first phase in iteration k i -1 is at most1 ki-1 j=0 2 2 j = 1 2 2 k i -1 = 2 2 2 k i ≤ 2 4/p i = p i 2 ,where the inequality holds because i ∈ I 2 . So r j=ℓ pj ≤ p i /2. Let D i := min(i -ℓ, r -i). In the transportation problem corresponding to the earth mover's distance between p and p, a probability mass of at least p i /2 needs to be moved from point i to the outside of the interval [ℓ, r]. The cost of this movement in the objective function of the transportation problem is at least D i • p i /2. Therefore we have η ≥ i∈I2 D i • p i /2. In the Binary Search at the Endpoints phase of iteration k, we probe indices within distance d = 2 2 k around the two endpoints of the search range. Since a i is not found before iteration k i , we conclude that 22 k i -1 < D i , which means that 2 ki ≤ 2 log(D i ). Let p(I 2 ) := i∈I2 p i . We have i∈I2 p i C(a i ) ≤ 4 i∈I2 p i 2 ki ≤ 8 i∈I2 p i log(D i ) = 8 i∈I2 p i log(D i ) + (1 -p(I 2 )) log(1) .By concavity of the log(•) function and Jensen's inequality we have8 i∈I2 p i log(D i ) + (1 -p(I 2 )) log(1) ≤ 8 log i∈I2 p i D i + (1 -p(I 2 )) ≤ 8 max(log(η)+2, 1).The last inequality follows from the fact that if i∈I2 p i D i ≤ 1 we have i∈I2 p i D i +(1-p(I 2 )) ≤ 2, and otherwise we havelog i∈I2 p i D i + (1 -p(I 2 )) ≤ log i∈I2 p i D i + 1 ≤ log(2η) + 1 = log(η) + 2.It is well known that there is a lower bound of Ω(H(p)) on the expected query complexity for binary search [Mehlhorn, 1975] . We now show that there is a lower bound of Ω(log η) on the expected query complexity as well, even on instances with H(p) = 0. This shows that there must fundamentally be a log η dependence on the earth mover's distance, even for instances where it is not absorbed by the dependence on the entropy. Theorem 3.2. For any η ∈ [n], any comparison-based (deterministic or randomized) algorithm must make Ω(log η) queries on some instance where H(p) = 0 and the earth mover's distance between p and p is O(η).Proof. Thanks to Yao's principle, it suffices to give a distribution over instances of this problem and argue that any deterministic algorithm has a large expectation over this distribution. Let the set of keys be [n] . We present a family of problem instances I 1 , . . . , I η , where each instance can happen with probability 1 η . In instance I i , the true access distribution is a singleton on location i, i.e., in I i we have p i = 1 and p j = 0 for each j ∈ [n]\{i}. In all the problem instances I 1 , . . . , I η , the prediction is the uniform distribution over [η] . Note that for each instance I i , we have H(p) = 0. Also, the earth mover's distance between p and p is at most η.Our claim is that any deterministic algorithm has an expected cost of Ω(log η) over this distribution. To see this, note that the expected cost of any deterministic algorithm over this distribution of instances exactly equals the cost of that algorithm on an instance I * where the true access distribution is uniform over [η] . Now by the lower bound of Mehlhorn [1975] , the cost of any deterministic comparison-based algorithm on I * is Ω(H(p * )), where p * is the uniform distribution over [η]. To conclude the proof, note that H(p * ) = Ω(log η).Combining Theorem 3.2 with the Ω(H(p)) lower bound due to Mehlhorn [1975] results in the following worst-case lower bound, asymptotically matching Theorem 3.1. Corollary 3.3. Any comparison-based algorithm for binary search with distributional predictions has worst-case expected query complexity Ω(H(p) + log(η)). 
a portfolio of predictions: 
 In the previous section we showed an algorithm that is optimal given a single distributional prediction.Here we extend this result to the setting where there are m different distributions given as a prediction. That is, for k ∈ {1, 2, . . . , m}, there are predictions pk = (p 1,k , . . . , pn,k ) of p given. Let η k be the earth mover's distance between pk and p. The goal is to design an algorithm competitive with single best distribution pk . That is, comparable to min k∈[m] log η k and H(p).We proceed in a similar manner, alternating the two phases. However, we change the algorithm so that in the first phase the algorithm performs a binary search on the medians of each distribution. The goal of this is to ensure that each distribution has its probability mass drop by at least half in each step.As before, the initial search range is [1, n] . The algorithm proceeds in iterations. For i = 0, 1, . . ., iteration i has two phases.• Bisection. Let [ℓ, r] be the current search range. Let S k = r j=ℓ pj,k be the remaining probability mass in the k'th prediction.Let t k be such thatt k -1 j=ℓ pj,k ≤ 1 2 S k and r j=t k +1 pj,k ≤ 1 2 S k .That is, t k is the median of the k'th distribution. Sort the indices k ∈ [m] so that t 1 ≤ t 2 . . . ≤ t m . For convenience, let t 0 = ℓ and t m+1 = r. Perform a binary search on a t0 , a t1 , a t2 , . . . a tm+1 to find the interval where a ∈ (a tj , a tj+1 ) for some j ∈ {0, 1, 2, . . . m}. The new search range is[t j + 1, t j+1 -1].Continue this for 2 i steps, and if a is not found, begin the second phase described below.• Binary Search at the Endpoints. Let The algorithm continues until a is found.We now state the following theorem regarding the algorithm for multiple predictions. The overhead of using multiple predictions is a log m factor. The proof is very similar to the proof of Theorem 3.1 and has been deferred to Appendix A. Theorem 4.1. Given m different distributions, the expected query complexity of the algorithm islog(m) • O(H(p) + max(min k∈[m] log η k , 0)). 
experiments: 
 We now present an empirical evaluation of the proposed algorithms on both synthetic and real datasets.Our goal is to show how predictions can be used to improve the running time of traditional binary search approaches. Since our theoretical results are about query complexity, and to keep the results implementation-independent, our main metric will be the number of comparisons performed by each method. Our implementation can be found at https://github.com/AidinNiaparast/Learned-BST.We compare the performance of the following algorithms:• Classic -The prediction agnostic approach that recursively queries the midpoint of the array.• Bisection -The bisection algorithm recursively queries the median of the predicted distribution (when the predicted probability in the search range is 0, this algorithm queries the midpoint of the array). This strategy is nearly optimal when the predicted distribution is correct [Mehlhorn, 1975] ; however, it is not robust to errors in the predicted distribution. • Learned BST -The algorithm described in Section 3. We make one modification, setting the parameter d larger to broaden the search space in the very early iterations, setting d to min(2 8•2 i , r -ℓ).• Convex Combination -This is a heuristic approach to make the Bisection algorithm more robust. Given a prediction p we generate a new distribution, q = λp + (1 -λ)u, where u is the uniform distribution on [n]. We then run the Bisection algorithm on q. In our experiments, λ = 0.5 is used.We begin with experiments on synthetic data where we can vary the prediction error in a controlled environment to show the algorithms sensitivity and robustness to mispredictions.In this setting, let the keyspace be the integers in [-10 5 , 10 5 ]. We then generate t = 10 4 independent points from a normal distribution with mean 0 and standard deviation 10, rounding down each to the nearest integer. This results in a concentrated distribution in a very large key space. The t points form the predicted distribution, p. To generate the test distribution, we proceed in the same manner, but shift the mean of the normal distribution away from 0 by some value s > 0. Note that for s = 100 the train and test distributions have 0 overlap with high probability. For each value of s, we repeat the experiment 5 times and report the average and standard deviation of the costs. Our results for this setting can be found in Fig. 1 , where we plot the average search cost (query complexity) of each algorithm against the shift amount for the test distribution. At one extreme, where there is no shift in the test distribution, we observe that all three algorithms which utilize the predicted distribution perform well. Since the bisection algorithm is optimal when the error is 0, it performs the best, as expected, while the Learned BST approach exhibits some overhead due to hedging against possible errors. However, a perturbation to the predicted distribution causes the bisection algorithm to perform worse than classical binary search. Both the convex combination and learned BST algorithms demonstrate a smoother degradation in performance, with our proposed method (learned BST) giving more robust performance to even large shifts in the test distribution. When the erorr becomes very high, then the additional overhead of the learned BST algorithm makes it slightly worse than the Classic baseline.Dataset Description. In order to test our approach on real-world data, we use temporal networks from Stanford Large Network Dataset Collection5 . These datasets represent the interactions on stack exchange websites StackOverflow, AskUbuntu, and SuperUser [Paranjape et al., 2017] . In all cases, we use the answers-to-questions dataset, which contains entries of the form (u, v, t), which represents user u answering user v's question at time t. In this interaction, u is the source and v is the target user. Our data sequences consist of the source users from each interaction sorted in increasing order of timestamp, and we restrict the dataset to the first one million entries.Keys, Predictions, and Test Data. For each data sequence, the set of elements in the first 10% of the sequence is used as the set of keys of the binary search trees. Let A be the remaining 90% of the sequence and let a 1 < a 2 < . . . < a n be the set of keys. For each element x ∈ A, if a i ≤ x < a i+1 , we replace x by a i . For t = 5, 10, . . . , 50, we use the first t percent of A as training data and the rest as test data. The training and test data are used to obtain the predictions (p) and actual access distribution (p), respectively. To obtain these distributions we use the normalized frequencies of each key in the training and test data.For completeness, we show the distributions of the keys when t = 50 both for the training set and the test set in Figure 2 . We present the results on these experiments in Figures 3 and 4 . In Figure 3 we plot the average cost of the algorithms against the size of the training data. As we expect, as the size of the training data increases, the performance of all distribution-dependent algorithms get better, as the distribution error decreases. We make this more precise in Figure 4 where we plot the average cost against log of the EMD error.We note a few observations. The learning agnostic, Classic, is suboptimal in all but a handful of cases, showing that there is value in using the distribution of the data to improve performance. Second, we validate the theory, showing that the learned BST's performance degrades smoothly as log η increases. Third, the convex combination heuristic is not very effective on real world data, giving only marginal improvements over the bisection method.Finally, on both AskUbuntu and SuperUser datasets, the learned BST approach performs significantly better than all of the baselines, saving 20-25% comparisons on average. Unlike the Bisection algorithm it is also never worse than the Classic baseline. On the StackOverflow dataset our approach is about 10% worse than bisection method, owing to the distribution being less concentrated around the median. In these cases, the overhead of learned BST is apparent, given that the second phase is unlikely to be fruitful in the first few iterations.Overall, these results show that the Learned BST method is robust against errors, and performs well against other approaches. Further improving the constant factors so that the learned approach has strong worst-case guarantees and performs well against other learned approaches remains a challenging open problem. 
conclusion: 
 There has been a growing line of work showing how to improve optimization algorithms using machine learned predictions. Predominately, prior work has leveraged non-probabilistic predictions, despite the fact that most ML systems, such as neural networks, output a distribution.This work introduces a model where the prediction is a distribution. We show that algorithms can perform better by taking full advantage of the distributional nature of the prediction, and that reduction to a point prediction is insufficient to provide competitive algorithms.Given the breadth of work in the Algorithms with Predictions area Mitzenmacher and Vassilvitskii [2021] , there is a wide variety of open questions concerning how to adapt algorithms to the setting of distributional predictions. 
 
 Appendix: Proof of Theorem 4.1. With probability p i , the key a that we are looking for is a i . The goal is to bound the expected cost of the algorithm, which is n i=1 p i C(a i ), where C(a i ) is the cost of the algorithm when a = a i . In each step of the Bisection phase, a binary search is done on the medians of the predicted probability distributions on the current search range. When the binary search is done, for each prediction k, the median t k of the prediction falls outside of the new search range. This means that the probability mass of pk on the new search range has dropped by at least a factor of 2 compared to the initial search range before the binary search. Let k * = arg min k∈[m] η k . From the above discussion, the probability mass of pk * in the search range drops by a factor of at least 2 in each step of the Bisection phase, which results in a total drop of at least 2 2 j in iteration j of the algorithm. The cost of each Bisection step is log m, which makes the total cost of the Bisection phase in iteration j equal to (log m) • 2 j . Let T i be the first iteration at which a is found, assuming a = a i . The total cost of the first phase of the iterations 0 to T i is (log m) Ti j=0 2 j < (log m) • 2 Ti+1 . Also, the cost of the second phase in each iteration before T i is 2, and in iteration T i is at most 2 Ti . So the total cost of the algorithm for iterations 0 to T i is at most (log m) • 2 Ti+1 + 2 Ti + 2T i = O((log m) • 2 Ti ). We partition the keys based on T i into two sets, and bound the cost of each set separately. Let I 1 := {i : T i ≤ log(log(4/p i ))} and I 2 := {i : T i > log(log(4/p i ))}. ). Let i ∈ I 2 . We know that during iteration j of searching for a i , in the Bisection phase, the predicted probability mass pk * in the search range decreases by a factor of at least 2 2 j . Therefore the predicted probability mass pk * in the search range [ℓ, r] at the end of the first phase in iteration T i -1 is at most1 Ti-1 j=0 2 2 j = 1 2 2 T i -1 = 2 2 2 T i ≤ 2 4/p i = p i 2 ,where the inequality holds because i ∈ I 2 . So r j=ℓ pj,k * ≤ p i /2. Let D i := min(i -ℓ, r -i). In the transportation problem corresponding to the earth mover's distance between p and pk * , a probability mass of at least p i /2 needs to be moved from point i to the outside of the interval [ℓ, r]. The cost of this movement in the objective function of the transportation problem is at least D i • p i /2. Therefore we have η k * ≥ i∈I2 D i • p i /2. In the Binary Search at the Endpoints phase of iteration j, we probe indices distance of d = 2 2 j around the two endpoints of the search range. Since a i is not found before iteration T i , we conclude that 2 2 T i -1 < D i , which means that 2 Ti ≤ 2 log(D i ). Let p(I 2 ) := i∈I2 p i . We have where inequality (4) results from concavity of log(•) function and Jensen's inequality, and inequality ( 5) is because of the followingTo account for the case where η ∈ [0, 1) where log(η) < 0, we impose a bound by taking the maximum of log(η) and 0.https://snap.stanford.edu/data/index.html 


Decision: This paper studies the query complexity of searching through a sorted array when the keys are drawn from a given distribution which is approximately known. An algorithm is proposed which interleaves two approaches: the classic binary search algorithm and the "median search" approach from [1,2]. The *query complexity* of the proposed algorithm is shown to be $O(H(p)+\log(\eta))$ where $H(p)$ is the entropy of the ground truth distribution and $\eta$ is the Wasserstein distance between the estimated sampling distribution and the ground truth distribution. 

There is a consensus between all four reviewers  (and myself) that this is an interesting and novel problem setting and algorithm which is well deserving of publication. However were some concerns, especially from reviewer kf39, regarding the presentation. I partially agree with the reviewer: on the one hand, I did find the introduction and abstract difficult to parse without jumping straight to the more mathematical "preliminaries" section, and on the other hand, it is also the case that the authors have **incorrectly used** terms such as "**time complexity**" instead of "query complexity" throughout the paper. They have admitted their mistake during the rebuttal and discussion with reviewers ud7J and kf39 and promised to modify the paper accordingly. Reviewer kf39 argues that the required changes might be too much and that the paper might need a fresh round of reviewing. I think this is a subjective question, but my professional opinion is on the side of the authors: removing any explicit mention of time complexity in the theoretical results can be achieved before the camera ready deadline. I also would not find it particularly shocking if some of the *experimental* results demonstrated superior performance in terms of runtime, even if the theory itself only applies to the query complexity, as long as the distinction is made clear.

 There is also enough time for the authors to improve the presentation of the work, and I strongly encourage the authors to do so: this paper's contribution was clearly appreciated by many reviewers and has the potential to be of great interest to the community, if written in a more reader friendly way. 











References:

[1] Donald E. Knuth. Optimum binary search trees, Acta Informatica,  1971

[2] Kurt Mehlhorn. Nearly optimal binary search trees, Acta Informatica, 1975.

Reviews: review: paper_summary: paper_summary: This paper proposes a learning-augmented algorithm for searching in a sorted array. Different from all previous learning-augmented algorithms, it takes in distributional predictions. The main result is an algorithm with query complexity $O(H(p) + \log \eta)$, where $H(p)$ is the entropy of the true distribution and $\eta$ is the Earth Mover's distance between the true and predicted distributions. The paper also includes proofs to show the theoretical optimality and experiments to validate the practical usefulness.
strength_weakness: strength_weakness: - I think the presentation of the paper can be greatly improved. To list a few points:
    - in line 50, the sentence "That is, the prediction is a single (potentially high-dimensional) point (or maybe a small number of such points)." is hard to read for me.
    - in line 56, the sentence "Or, can we in fact do better by taking full advantage of the entire predicted distribution." should end with a question mark.
    - the abusive use of the word "essentially" greatly weakens the soundness of the paper (For example, in lines 66, 70, 78 87, 88). The expression "essentially optimal" should be clarified with collaboration on complexity and constants.
- I think several key works in the field of learning-augmented algorithms are missing, which makes it hard to position this paper in the correct context. For example, I think the algorithms proposed in "Learning-Augmented Binary Search Trees" by Lin et al should be at least discussed and even compared against (now, this paper is only mentioned as a very general reference for learning-augmented data structures).
- It is not straightforward to me why the techniques used in the proposed algorithm are novel and not hard to come up with. I encourage the author to make a clearer point on "which components of the proposed algorithm are novel and different from existing techniques".
questions: questions: - The algorithm in [Mitzenmacher and Vassilvitskii, 2021] that searches in a sorted list with predictions receive separate predictions for each query. Is this also the case for the setting discussed in this paper? 
    - If so, as I understand, the proposed algorithm needs to rebuild the binary search tree every time it receives a new query along with its distributional predictions. Then, this would lower bound the time complexity to answer each query with $O(n)$. Is that correct?
- I am confused by the reference to "binary search tree" in the paper (even in the title). Does the proposed algorithm actually require building a binary search tree in its specification and implementation? Why does section 3 not contain any explanation related to the binary search tree?
limitations: limitations: Most of the limitations are discussed in the weakness section and questions section. In summary, I think the presentation of this paper is not clear enough. This creates difficulties for me to: 1. position the proposed algorithm in the context (of other recent learning augmented searching algorithms). 2. evaluate its novelty. 3. even understand its technical details (as mentioned in the questions section). If the author could provide a better explanation of the above-mentioned points, I would consider raising my score.
paper_summary: paper_summary: In this paper, the authors study the classical problem of binary searching over a sorted array in the learning-augmented setting, with distributional advice. Binary search in both the learning-augmented setting with point advice and the classical setting with known query distribution is well studied, but the authors are the first to study binary search in the learning-augmented setting with distributional advice. The authors argue that distributional advice is more natural than point advice as outputs of machine learning models such as neural networks, and show that distributional advice can actually perform asymptotically better than point advice.

Specifically, the authors consider the model in which the target element of the binary search is drawn from an unknown distribution, and aims to minimize the expected cost of searching the element. The search algorithm is also given a prediction on the underlying distribution; the prediction error is measured in the earth mover distance between the prediction and the true distribution. Their search algorithm is not trivial by any means, but very intuitive: On a high level the algorithm executes in iterations, where in each iteration it conducts median search based on the predicted distribution a set number of times depending on the current iteration, and checks both ends of the search range, finishing with a normal binary search if the target is near the endpoints. If the target is not found near the endpoints, start the next iteration on the middle range. 

Their analysis is simple and shows that in expectation the algorithm uses $O(H(p) + \log \eta)$ comparisons, where $H$ is the binary entropy function, $p$ is the true distribution, and $\eta$ is the earth mover distance between $p$ and the prediction $\hat p$. As corollaries, they show that the algorithm can adapt to multiple predictions, and conduct experiments to show the performance of their algorithm on real and synthetic data sets.
strength_weakness: strength_weakness: I have no major complaints with the paper, but in my opinion, the author's usage of distributional advice is, on a high level, similar to how other learning-augmented use their respective form of advice. The author's search algorithms rely on the median of the distribution to conduct bisection of the search range, which is in of itself not a probabilistic operation; It also relies on the fact that the input to the algorithm is an element drawn from a distribution. One can arguably draw parallel to other non-distributional learning-augmented algorithms for online problems that uses predictions on its input sequence, which is also unknown to the algorithm beforehand. There are also scenarios in both online and offline algorithms where the input may not be drawn independently, or may not be drawn from a distribution at all, where non-distributional learning-augmented algorithms may still hold value.

I do not think this invalidates the author's work - I still find the paper really impressive, but personally I do not find the divide as great as the author painted.
questions: questions: As I've outlined above, I don't find division between point predictions and distributional predictions as large as the authors painted. It is a personal opinion though, so I would like to hear the author's thought on this matter.

It would be interesting to see what other problems can distributional advice excel on. Binary search is still a relatively simple problem, so application of the same methodologies on problems with more/less structure would be much more convincing.
limitations: limitations: The authors discuss their limitations properly. There are no ethical concerns.
paper_summary: paper_summary: The paper studies the problem of binary search for an item in a sorted array in a learning-augmented setting, where the element to search for is drawn from some unknown distribution, and the algorithm has access to a prediction of this distribution. This contrasts with the majority of work in the learning-augmented setting (aka algorithms with predictions), most of which assume that the prediction is an exact value rather than a probability distribution.

The main result is that there is an algorithm performing this task in $O(H(p)+\log \eta)$ expected time, where $H(p)$ is the entropy of the true distribution and $\eta$ is the Earthmover distance between the predicted and the true distribution. This extends the known $O(H(p))$ result from the case where the exact distribution is known ($\eta=0)$ to the case where only a prediction of the distribution is known. A matching lower bound on the dependence on $\eta$ is also given.

The basic skeleton of the algorithm is to run the known algorithm for the case of known distribution. As the search interval shrinks during this process, it is repeatedly (in exponentially growing steps) checked whether the search item is close to the left or right end of the current search interval. If so, the algorithm concludes with a classical binary search at the respective (left or right) end.

The algorithm is further extended to the setting where $m$ predictions are given, losing a factor of $O(\log m)$ in the guarantee with respect to the best of the given predictions. The paper concludes with an experimental evaluation, yielding results in line with the theory.
strength_weakness: strength_weakness: - It is not clear whether the bounds hold for the running time, as claimed, or only for the number of comparisons. The main algorithm has a step where the index of a median element is identified, which the analysis does not seem to be account for. Moreover, the portfolio algorithm has a step where m indices are sorted, which would seem to take time $O(m \log m)$ and increase the bound by an additional factor $m$. One might treat this as preprocessing time that is only incurred once before many binary searches are conducted. However, for such preprocessing to become negligible would seem to require many subsequent binary searches, yielding many samples from the true distribution, which would seem to allow approximating the true distribution very precisely rather than relying on a (collection of) prediction(s).
- The experimental evaluation is restricted to settings where the distributions are highly concentrated around a single value.

Considering the authors' comments in the rebuttal to these two points, I'm increasing my score from 5 to 6.
questions: questions: 1. Please clarify whether/how the claimed running time bounds can be attained, or if the bounds hold for the number of comparisons instead.
2. I suggest expanding the discussion of related work. For example, the paper "Beyond IID: data-driven decision-making in
heterogeneous environments" by Besbes et al seems to consider a similar setting where an algorithm has access to a prediction of a distribution.
3. The text says that Figure 2 is for t=5, but the Figure caption says t=50 instead.
limitations: limitations: Not specifically discussed. A discussion about the possible weaknesses mentioned above would be useful.
paper_summary: paper_summary: The main question guiding the paradigm of algorithms with predictions is the following: if we want to solve a given instance of a classical computer science problem, but are given predictions of some form (typically by some machine learning algorithm which has seen a lot of similar problem instances as training data), can we use the predictions to our benefit? By "to our benefit", we want two properties: 1) consistency i.e., if the prediction is indeed very accurate, then we want to fully utilize this, and not suffer the worst-case performance that we would have suffered had we not used the predictions at all and used the default prediction-agnostic algorithm. 2) robustness i.e., if the prediction is fully bogus, then we still want the performance of our algorithm to be no worse than the worst-case performance of the prediction-agnostic algorithm. The classic example in this space is that of performing binary search on a sorted array. Given a key query, we want to find if the key is present in the array. Suppose we have access to a prediction that tells us where we should look at in the array. The classic prediction-agnostic binary search algorithm has a worst case running time of $O(\log n)$. But if the prediction is accurate, note that we can finish in constant time---so we want to utilize this somehow. It turns out that by seeding our binary search at the predicted value, we can achieve this best-of-both-worlds guarantee.

While most of the existing literature on algorithms with predictions uses predictions that are point-valued predictions, this work considers the problem setting where the prediction is a distribution. The justification is that, modern day generative models naturally output whole distributions. The problem under consideration is still that of searching a key in a sorted array of size $n$. But now, we assume that the queries come from a distribution $p$. A classical "median bisection" algorithm due to Knuth (1971) and Mehlhorn (1975) shows that the best expected running time achievable is $\Theta(H(p))$, where $H(p)$ is the entropy of $p$. Suppose the distribution $p$ is heavily concentrated on a few middle elements in the array. Then the classical binary search algorithm takes (expected) running time $\Omega(\log n)$, which is much worse than $H(p)=O(1)$. What if we are given point predictions? The authors give a simple argument that even then, an algorithm that uses such point predictions along with binary search is doomed to suffer a running time of $\Omega(\log n)$. 

But what if we are given a predicted distribution $\hat{p}$, which is supposed to be an estimate of $p$? Note that if $\hat{p}=p$, we should in theory be able to obtain a running time of $H(p)$. But we don't know how well $\hat{p}$ approximates $p$. The authors show that it is possible to make use of the predicted distribution $\hat{p}$ to our benefit. Concretely, they give an algorithm that makes use of the explicit form of $\hat{p}$, and has an expected running time of $O(H(p)+\log \eta)$, where $\eta$ is the Earthmover distance between $\hat{p}$ and $p$. Note that when $\hat{p}\approx p$, this achieves a running time of $O(H(p))$ which is what we wanted (and which is the best possible). Also, when $\eta=n$, which is the largest it can be, the guarantee is still $O(H(p)+\log n) = O(\log n)$, since $H(p) \le \log n$. This is in fact the worst-case running time of the classic prediction-agnostic binary search algorithm. The algorithm that the authors propose is a careful combination of classic binary search and the median bisection algorithm (which uses $\hat{p}$ to compute its medians). The analysis of the algorithm is insightful and easy-to-follow.

Is $O(H(p)+\log \eta)$ the best attainable guarantee? Note that even if $\hat{p}=p$, we can't do any better than $H(p)$ by the argument of Mehlhorn (1975). Thus, the question is if the $\log \eta$ factor is necessary. Indeed, the authors show it is, and hence their algorithm is optimal. The authors also propose an extended version of their algorithm which can use multiple predicted distributions, and gets a guarantee with respect to the predicted distribution that has the least Earthmover distance. Finally, the authors demonstrate the efficacy of their algorithm against baselines={classic binary search, classic median bisection} in synthetic simulations as well as real-world datasets. The experimental results are compelling and validate the theory to a large extent, showcasing the benefit of using the full-power of the distributional form of the prediction at hand.
strength_weakness: strength_weakness: The main concern I have is with the Lower Bound in section 3.2. See Questions below. I would also tone down the claim of "*initiating* the study of algorithms with distributions as predictions" (line 6, line 59), especially since, as the authors themselves mention, such a setting was also studied by Angelopoulos et al. (2024).

---

Minor/typos: \
Line 60: It seems that there is a slight change in problem setting here for the algorithm of Knuth (1971), where now we think of queries being drawn from a distribution $p$. This should be stated beforehand, otherwise saying things like "median of the distribution" does not make sense, when no distribution has been introduced. Also, $p$ is not introduced notationally. \
Line 184: $S$ is not introduced notationally. I believe it should be the probability mass on $[l,r]$ i.e., $S=\sum_{i=l}^r \hat{p}_i$ (correct me if I am wrong) \
At a lot of places, parenthetical citations \citep{} ought to be used (e.g., lines 117-118 in the related work, etc.)
questions: questions: I am a little confused by the proof of the lower bound. Where exactly are you using the form of the predictions $\hat{p}$ in your argument? In line 245, you simply say that, "the best thing that an algorithm could do is build a balanced binary search tree on $[\eta]$." It seems to me that this sentence stems from the way the distribution over $p$'s is constructed, and is agnostic to the specific form of $\hat{p}$. Put another way, could you point out what is flawed in the following proof, which gets a $\Omega(\log{n})$ lower bound?

Take $\hat{p}$ to be uniform on all of $[n]$. The distribution over true instances $p$ (which are distributions over keys) is simply: draw $i^* \in [n]$ uniformly at random, and set $p_i=1[i=i^*]$. Then, by the reasoning in line 244-245, any deterministic algorithm will have at least $\Omega(n)$ keys such that the cost on these keys is $\Omega(\log n)$, because again, "the best thing an algorithm could do is build a balanced binary search tree on $[n]$". Hence expected cost is $(1/n)(\Omega(n))(\Omega(\log n)) = \Omega(\log n)$. Proof concluded by noting EMD between $\hat{p}$ and $p$ for any $i^*$ is at most $n$.

Depending on clarification about this, I will either increase/decrease my score...
limitations: limitations: I do not foresee any limitations that the authors have not addressed.

Comments: title: Interesting algorithm but significant change in rebuttal
Further clarifications
Response to rebuttal
comment: Thank you to the authors for their response! It has clarified most of the issues. I suggest that the authors add discussions on the $log^2$ multi-modal distribution, the differences compared to Diakonikolas et al., and some commentary on time complexity in the next version of the paper. These points were previously unclear.

**In summary, I believe this paper presents a new algorithm with sufficient theoretical analysis and experiments. If presented clearly, it is worthy of publication at NeurIPS. However, I have a major concern about the presentation: the edited version after the rebuttal might be too different from the originally submitted version.** I found the original version difficult to understand, and only after the authors promised to change or add significant content in the rebuttal discussion, did I find the presentation acceptable. But this level of change during the rebuttal period may be too substantial. For example, the authors agreed with me to change the paper’s title; they also admitted that the original references to "time complexity" were incorrect and will be changed to "query complexity." However, reviewer ud7J, who recommended acceptance, understood the paper completely based on the "time complexity" framework. This discrepancy has led to a misunderstanding in the reviewers' comments. Therefore, I will maintain my rating at 5 and leave it to the area chair to decide whether this level of change during the rebuttal phase is too extensive.
Thank you again very much for the feedback!  We will certainly include the discussions of model 1 and 2, and more comparison to Lin et al., in the paper as you suggest.  

> “The discussion of basic baselines seems insufficient”

We agree that the proof of our specific claim, that one cannot black-box reduce to a single point prediction, does not directly imply that one cannot reduce to *collections* of point predictions.  However, it is relatively straightforward to generalize our proof to this stronger claim – instead of a 2 point distribution, consider a multi-modal distribution with $d = \log^2 n$ points. The method suggested by the reviewer, of doing a black-box reduction to MV for each of a collection of point predictions (by running an instance of MV in parallel for each of them), fails for this example.  Either there is no prediction for one of the $d$ points, in which case every instantiation of MV will do many queries, or we do have a prediction for each of the points, and thus, when we run them in parallel we would probe all $d$ of them, again resulting in suboptimal query complexity. Developing an algorithm that can handle such multi-modal distributions (and generalizations) in an optimal manner is a significant part of our contribution.    

> “I still find the use of "binary search tree" somewhat confusing.”

We completely agree that it would be best to change the title of the paper as you suggest. 

> “There is a lack of justification for the novelty of "algorithms with distributional prediction."

We will include a more detailed discussion of Diakonikolas et al. We would like to highlight that our use of distributions is different. Specifically, the work of Diakonikolas et al. does not consider what happens when the distribution is erroneous (a major theme of our work), rather their focus is on minimizing the number of samples from the true distribution that they need. Since predictions are often erroneous, there is a dire need to make sure our usage of predictions is robust. This is what we focus on in this work, and believe would be of interest to the general community.  Of course, the empirical distribution of samples can be viewed as an erroneous prediction of the true distribution, but our setting is far more general, and allows for general distributional predictions with general errors (measured by EMD).  So we do believe that our setting is novel and will lead to significant follow-up work.  


> “A new question (minor): In line 303, why set the exponential coefficient of $d$ to 8? If this is purely a result of hyperparameter tuning, is there any justification for why this would be preferable in all cases (rather than overfitting to the experiments)?”

Setting the exponential coefficient of d to a small constant is preferable for improved empirical results, and does not change the asymptotic complexity. To see why, recall that the algorithm explores segments of length $2^{2^i}$ in the $i$-th iteration. When i is very small, these segments are very small, making the iterations overly fast and unlikely to succeed. We found that setting the length to $2^{8 \cdot 2^i}$ allowed us to balance this trade-off better. The exact setting of the exponential coefficient is not important (4 and 16 worked almost equally well). Also, see the further experimental results in our response to Reviewer EXym which take place on bimodal instances.

> “Results on time complexity.”

 We note that in model 2, the time complexity is basically equivalent to the query complexity.  In this model, there is a single distribution over queries, so the time to build our BST is just preprocessing – we expect to answer far more queries than the time it takes to build the BST (as long as the preprocessing time is at least somewhat reasonable, as ours is).  And then once the BST is built, the time it takes to search in it is essentially equal (up to constants involving following pointers) to the query complexity that we analyze.  So in this setting, the query complexity *is* the time complexity!
Thank you for your response. I'm increasing my evaluation from 5 to 6.
Thank you to the author for their detailed rebuttal and explanations.

- After changing all occurrences of "time complexity" to "query complexity," I now understand the basic models in the paper. I agree that query complexity is an important metric for search algorithms and data structures.
- I found the explanations for models 1 and 2 very helpful and believe they should be included in the paper. These explanations provide the necessary context to understand the algorithm, which I previously lacked. 
- I appreciate the clarification on the differences between this paper and the work by Lin et al. While these two works are not directly comparable, I strongly recommend including this discussion in the related work section. The fact that both focus on augmenting binary search trees with learnable advice makes this discussion essential.
However, I have some remaining concerns about the paper:
1. **The discussion of basic baselines seems insufficient.**
	On line 173, the author uses the two-point distribution to claim that "converting pˆ to a point prediction and then using the algorithm of Mitzenmacher and Vassilvitskii [2021] as a black box is doomed to failure." However, one immediate idea for this example is to run two MV21 searches (as "black boxes"!) in parallel, starting at the two points, and the key could be found in constant queries. I believe this is a straightforward way to generalize MV21 to distributional settings, and the given example is too simple to demonstrate that this algorithm does not work. The author should include a stronger example to illustrate the suboptimality of "running a few MV21 in parallel."
2. **I still find the use of "binary search tree" somewhat confusing.**
	While I understand that every search algorithm can be formalized as a BST, I don't see how this phrasing clarifies the algorithm. Just as MV21 can be described as a BST, it is more naturally and simply described as a search algorithm. In the case of the proposed algorithm, I agree that the Bisection phase is similar to descending a balanced BST, but the second phase seems more like checking the left and right boundaries. Therefore, I believe the algorithm and the paper's title should be something like "Searching with Distributional Predictions." Does the author agree?
3. There is a lack of justification for the novelty of "algorithms with distributional prediction."
	In the author's response, they express the potential of distributional predictions as a major contribution of their paper. However, as the author pointed out in the related work section, the idea of using distributional predictions is not new, and basic tasks like ski-rental have been studied by Diakonikolas et al. [2021]. Therefore, I question the author's claim that "we believe that there will be significant amounts of follow-up work expanding the algorithms with predictions literature to the case of distributional predictions."
4. A new question (minor): In line 303, why set the exponential coefficient of $d$ to 8? If this is purely a result of hyperparameter tuning, is there any justification for why this would be preferable in all cases (rather than overfitting to the experiments)?
5. Results on time complexity. 
	I understand that the proposed algorithm has different time and query complexities, but I think the results could be strengthened and made more applicable if the author also addresses the time complexity of the proposed algorithm. This is especially relevant in model 2, where all queries share the same distributional prediction.

Overall, I agree that the algorithm proposed is interesting and, as a result, I have changed my rating from 3 to 5. However, I think the paper requires revision (at the very least, changing all mentions of "running time" to "query complexity" in the main algorithms and major results, adding model 1&2 explanation, and adding related works) to be publishable. I hope the author can further address the concerns I have raised above.
Thanks for the clarification.  We agree – on one hand this is similar to how most algorithms with predictions literature uses predictions. That is, the algorithm changes its control flow deterministically based on some information extracted from the prediction. On the other hand, note that the distribution that the algorithm considers is updated from phase to phase, since we need to look at the median of the distribution conditioned on the endpoints of the current search space. So in some ways this is like the online setting mentioned by the reviewer, in that we use a “new” prediction at each step.  But this is not an online problem, and our “new” prediction is just a computational transformation of the old prediction.  So we completely agree that there are many similarities!  But there are also important differences that only arise when considering distributional predictions.

We also agree that trying to formally understand what makes a distributional prediction better is an interesting open question. For some intuition in the binary search problem, consider the setting where the truth is multimodal (e.g. the distribution has mass of 1/(k+1) at points 0, n/k, 2n/k, …, n}, for intermediate values of k). Here a point prediction will necessarily drop a lot of information, whereas a distribution prediction will preserve the richness of the input space.  This is the essence of our lower bound from Section 2.1, and we believe that this points towards what makes distributional predictions more powerful.  

Overall, we don’t believe that distributional predictions are a silver bullet and should be used in all situations – we (again) completely agree that with the reviewer that “non-distributional learning-augmented algorithms may still hold value”, and, in fact, there are likely many settings where the non-distributional view is at least as useful as the distributional.  But the simple binary search example seems to imply that in the right context, distributional predictions bring a lot of additional power.  Understanding exactly which problems and contexts are a good fit for distributional predictions is a fascinating set of open questions.
Thank you for your response. I understand why point predictions do not work as well for binary search compared to distributional predictions, and that is not the point of my comment in the weakness section. I am more pointing out that the way this distributional prediction is used in your learning-augmented algorithm does not differ as much in my opinion as the introduction portrays it to be: using the (deterministic) information extracted from a distributional prediction to make deterministic actions (bisection on the search range). This is largely personal opinion so I would like to hear your thoughts on this.

Your response does raise an interesting questions also: what makes a distributional prediction champion over point median predictions? What additional properties of the predicted distribution helps provide this advantage? I think this will be a very interesting point to discuss, if it hasn't been already.
Thanks for your response and clarification. It would be great if you could update the lower bound proof and statement as you mention above. Please also include the discussion about Angelopoulos et al. (2024) in the revision. I have updated my score from 6 -> 7. I maintain that this is a strong contribution, and deserves to be accepted. Great job!