用分布预测改进二分查找,让算法更鲁棒且高效。
Binary Search with Distributional Predictions
- 将预测从单一值扩展为概率分布,提升搜索适应性。
- 查询复杂度为 O(H(p) + log η),优于传统方法。
- 适合需要高鲁棒性的实际搜索场景,如推荐系统。
基于机器学习预测的算法框架能结合传统最坏情况算法与现代机器学习优势。然而,该领域多数工作假设预测是确定性的,即使其来源于随机过程(如神经网络)。这与现代机器学习不匹配,因为神经网络天然输出分布。本文首次研究分布预测下的算法设计,聚焦于最基本的二分查找问题。我们发现:当预测为分布时,使用单一预测的经典算法可能表现极差。为此,提出新算法,查询复杂度为 $O(H(p) + ext{log} \eta)$,其中 $H(p)$ 为真实分布 $p$ 的熵,$\eta$ 为真实分布与预测分布 $\hat p$ 间的地球移动距离。该结果也首次实现了对经典最优二叉搜索树问题的分布鲁棒解法。我们还证明了该复杂度近乎最优,并通过实验验证了算法的实际有效性。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。