Approximating Opaque Top-k Queries
Jiwon Chang, Fatemeh Nargesian
Abstract
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.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext ab9d5bb9-2a91-433b-b201-9a0c90656117Builds on10
- A Comprehensive Survey and Experimental Comparison of Graph-Based Approximate Nearest Neighbor SearchMengzhao Wang, Xiaoliang Xu, Qiang Yue, Yuxiang WangVLDB 2021 · 354 citations
- Selective Data Acquisition in the Wild for Model ChargingChengliang Chai, Jiabin Liu, Nan Tang, Guoliang Li et al.VLDB 2022 · 62 citations
- UQE: A Query Engine for Unstructured DatabasesHanjun Dai, Bethany Wang, Xingchen Wan, Bo Dai et al.NeurIPS 2024 · 45 citations
- Semantic Guided and Response Times Bounded Top-k Similarity Search over Knowledge GraphsYuxiang Wang, Arijit Khan, Tianxing Wu, Jiahui Jin et al.ICDE 2020 · 45 citations
- Babelfish: Efficient Execution of Polyglot QueriesPhilipp Marian Grulich, Steffen Zeuch, Volker MarklVLDB 2022 · 32 citations
Related papers
- A Method for Optimizing Opaque Filter QueriesWenjia He, Michael R. Anderson, Maxwell Strome, Michael J. CafarellaSIGMOD 2020 · 15 citations
- External Merge Sort for Top-K Queries: Eager input filtering guided by histogramsYannis Chronis, Thanh Do, Goetz Graefe, Keith PetersSIGMOD 2020 · 4 citations
- A Rank-Based Approach to Recommender System's Top-K Queries with Uncertain ScoresCoral Scharf, Carmel Domshlak, Avigdor Gal, Haggai RoitmanSIGMOD 2025 · 2 citations
- Nearly Minimax Optimal Submodular Maximization with Bandit FeedbackArtin Tajdini, Lalit Jain, Kevin JamiesonNeurIPS 2024 · 9 citations
- Efficient Main-Memory Top-K Selection For Multicore ArchitecturesVasileios Zois, Vassilis J. Tsotras, Walid A. NajjarVLDB 2020 · 8 citations
