发表机构
University of Chinese Academy of Sciences; Institute of Computing Technology, Chinese Academy of Sciences; The University of Hong Kong(中国科学院大学; 中国科学院计算技术研究所; 香港大学)
机构由 AI 辅助整理,请以论文原文为准。AI 中文总结
SmartANN基于对象因果模型,通过顺序诊断-替换循环定位ANN工作流中的瓶颈,并组合动作库生成优化设计,在八个数据集上显著提升召回率和QPS。
AI 中文摘要
近似最近邻(ANN)算法通过索引构建和查询执行中相互依赖的阶段实现高效率。这种耦合使得上游性能损失向下游传播,影响执行行为和可测量输出。现有的组件级分析主要比较孤立的设计选择,而端到端基准测试报告汇总指标;两者均未追踪跨依赖阶段的损失传播,阻碍了根本原因归因和自动重新设计。我们提出SmartANN,一个基于对象因果模型(OCM)的框架,用于ANN瓶颈归因和自动重新设计。SmartANN将ANN工作流表示为八个有序、可替换的对象,并通过顺序的诊断-替换循环对其进行诊断。在每次迭代中,它识别第一个偏离预期行为或输出的对象作为瓶颈。由于上游瓶颈可能掩盖下游瓶颈,SmartANN在可用时用测试预言机替换它,或用产生更好结果的实现替换,然后继续下游诊断。根据诊断出的瓶颈和失败原因,SmartANN从可插拔动作库中组合兼容动作,以生成优化的端到端ANN设计。我们为IVF-PQ和HNSW实例化SmartANN,覆盖分区-量化和基于图的ANN家族。在八个真实世界数据集上的实验表明,SmartANN将召回率提高了0.24%至74.20%,在可比召回率下将QPS提高了28.8%至256.5%,且诊断和自动设计开销低。代码可在https://this https URL获取。
英文摘要
Approximate Nearest Neighbor (ANN) algorithms achieve high efficiency through interdependent phases across index construction and query execution. This coupling allows upstream performance loss to propagate downstream, affecting execution behavior and measurable outputs. Existing component-level analyses mainly compare isolated design choices, while end-to-end benchmarks report aggregate metrics; neither traces loss propagation across dependent phases, hindering root-cause attribution and automated redesign. We present SmartANN, a framework based on the object causal model (OCM) for ANN bottleneck attribution and automated redesign. SmartANN represents an ANN workflow as eight ordered, replaceable objects and diagnoses them with a sequential diagnose-and-replace loop. At each iteration, it identifies the first object deviating from expected behavior or output as a bottleneck. Because an upstream bottleneck can obscure downstream ones, SmartANN replaces it with a test oracle when available, or with an implementation producing a better outcome, then continues downstream diagnosis. From the diagnosed bottlenecks and failure causes, SmartANN composes compatible actions from a pluggable action library to generate an optimized end-to-end ANN design. We instantiate SmartANN for IVF-PQ and HNSW, covering partition-and-quantization and graph-based ANN families. Experiments on eight real-world datasets show that SmartANN improves Recall by 0.24--74.20%, and increases QPS by 28.8--256.5% at comparable Recall, with low diagnosis and auto-design overhead. The code is available at https://github.com/zhouyutong20/SmartANN.