arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.20119cs.DB
收藏

近似不透明Top-k查询

Approximating Opaque Top-k Queries

Jiwon Chang, Fatemeh Nargesian

AI总结:

针对不透明UDF评分的Top-k查询,提出层次索引与子模epsilon-greedy bandit算法,实现常数因子近似,加速近最优结果获取达一个数量级。

摘要:

将查询处理与数据科学工作负载相结合已变得普遍。此类工作负载中的一个重要类别是Top-k查询,其评分函数以不透明UDF(用户自定义函数)的形式实现——这是一个黑盒,其内部结构以及在搜索域上的得分均不可获取。典型例子包括对模糊分类和回归模型的昂贵调用。这些模型也可能以临时方式被更改。由于算法不知道评分函数在输入数据上的行为,不透明Top-k查询的精确评估或通过索引加速变得代价高昂。因此,我们提出了一种用于不透明Top-k查询回答的近似算法。我们提出的解决方案是一个与任务无关的层次索引和一种新颖的bandit(多臂老虎机)算法。该索引通过某种廉价的向量表示对元素进行聚类,然后构建这些聚类的树。我们的bandit是一种具有递减回报的子模epsilon-greedy bandit算法,它最大化解集得分的总和。我们的bandit使用直方图对每个臂中的得分分布进行建模,然后针对具有重尾分布的臂。我们证明了我们的bandit算法能达到最优算法的常数因子近似。我们在大型合成数据集、图像数据集和表格数据集上,针对多种评分函数评估了我们的独立库。与穷举扫描相比,我们的方法将达到接近最优得分所需的时间加速了最多一个数量级,同时始终优于基线采样算法。

英文摘要:

Combining query answering and data science workloads has become prevalent. An important class of such workloads is top-k queries with a scoring function implemented as an opaque UDF - a black box whose internal structure and scores on the search domain are unavailable. Some typical examples include costly calls to fuzzy classification and regression models. The models may also be changed in an ad-hoc manner. Since the algorithm does not know the scoring function's behavior on the input data, opaque top-k queries become expensive to evaluate exactly or speed up by indexing. Hence, we propose an approximation algorithm for opaque top-k query answering. Our proposed solution is a task-independent hierarchical index and a novel bandit algorithm. The index clusters elements by some cheap vector representation then builds a tree of the clusters. Our bandit is a diminishing returns submodular epsilon-greedy bandit algorithm that maximizes the sum of the solution set's scores. Our bandit models the distribution of scores in each arm using a histogram, then targets arms with fat tails. We prove that our bandit algorithm approaches a constant factor of the optimal algorithm. We evaluate our standalone library on large synthetic, image, and tabular datasets over a variety of scoring functions. Our method accelerates the time required to achieve nearly optimal scores by up to an order of magnitude compared to exhaustive scan while consistently outperforming baseline sampling algorithms.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑