计算机科学 > 数据库
[提交于 2026年11月30日]
标题:Ledger: Learned Budget Allocation For Approximate Nearest Neighbor Search
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:Approximate nearest neighbor (ANN) search is increasingly used to power retrieval-augmented generation (a.k.a. RAG) pipelines, which are used to ground LLMs in external data. To keep retrieval accurate, existing methods set the search effort of a query before it runs, with the goal of hitting a predefined "recall target" at any cost. For a growing class of compute- or time-constrained workloads, this is not possible. Instead, their goal is to maximize recall under a fixed budget. Recall gains are known to diminish with search effort, and spending a budget uniformly across a query workload either (i) overspends effort on easy queries whose recall has flattened, or (ii) underspends it on hard queries whose recall is climbing. Adaptive methods, meanwhile, remain tied to recall targets. Either way, downstream tasks that operate under tight budgets suffer. This paper presents the Learned Effort BuDGEting for Recall (a.k.a. Ledger) framework, which maximizes the total recall of a workload under a fixed budget of effort. Given a batch of queries, Ledger first executes a "probe" up to the sparse upper layer of a hierarchical graph (e.g., HNSW), where a sample of features tells us how hard a query is. Ledger then groups the queries with similar hardness feature points into hierarchical spherical clusters that are indexed by the Budget-Allocation tree, a.k.a. Ball-tree. The Ball-tree uses tables to record cost-recall growth across varying search efforts. With these tables, we show that our problem can be seen as an instance of the multiple-choice knapsack problem, which Ledger solves to allocate budgets across a mix of easy and hard queries in the workload. Ledger provides guarantees on the quality of budgets given and replaces both (a) fixed-effort searches and (b) recall-tuning methods (that are budget-agnostic) with fast and principled allocations.
提交历史
来自:Minghao Li[v1] 2026年11月30日 星期一 13:43:10 UTC (1,025 KB)