arXiv:2609.08240cs.DBSep 2026

Manuscript Offprint

arXiv:2609.08240

SmartANN: Object Causal Modeling Boosts Approximate Nearest Neighbor Diagnosis and Auto-Design

Yutong Zhou, Guoxin Kang, Lei Wang, Xueya Zhang, Qinwei Yang, Jianfeng Zhan

Yutong Zhou

University of Chinese Academy of

Sciences (ICT,CAS)

Beijing, China

zhouyutong24s@ict.ac.cn

Guoxin Kang ∗^{*}

Institute of Computing Technology,

Chinese Academy of Sciences

Beijing, China

kangguoxin@ict.ac.cn

Xueya Zhang

University of Chinese Academy of

Sciences (ICT,CAS)

Beijing, China

zhangxueya21@mails.ucas.ac.cn

Lei Wang

Institute of Computing Technology,

Chinese Academy of Sciences

Beijing, China

wanglei_2011@ict.ac.cn

Qinwei Yang

The University of Hong Kong

Hong Kong, China

yangqinwei2003@connect.hku.hk

Jianfeng Zhan

Institute of Computing Technology,

Chinese Academy of Sciences

Beijing, China

zhanjianfeng@ict.ac.cn

ABSTRACT

Approximate Nearest Neighbor (ANN) algorithms achieve high efficiency through multiple interdependent phases across index construction and query execution. However, this tight coupling allows performance loss from an upstream phase to propagate to downstream phases, affecting both their execution behavior and measurable outputs. Existing component-level works analyze mainly isolate and compare algorithmic design choices, while end-to-end benchmarks only aggregate performance metrics. Neither traces performance-loss propagation across dependent phases, making it difficult to attribute root causes or automatically redesign.

To address this challenge, we present SmartANN, a framework built on the object causal model (OCM) for ANN bottleneck attribution and automated redesign. SmartANN represents the ANN workflow as eight ordered, replaceable objects and diagnoses them through a sequential diagnose-and-replace loop. At each iteration, it identifies the first object that deviates from the expected behavior or output, which we call a test oracle, as a bottleneck. As the upstream bottleneck object will obscure the downstream bottlenecks, SmartANN replaces the former with the test oracle if it exists, or an implementation with a better outcome otherwise, and then diagnoses the downstream objects. Based on the resulting bottleneck set and failure causes, SmartANN automatically selects and composes compatible actions from a pluggable action library to cover all diagnosed bottlenecks and generate an optimized end-to-end ANN design. We instantiate SmartANN for IVF-PQ and HNSW, representing widely used partition-and-quantization and graph-based ANN families, respectively.

Extensive experiments on eight real-world datasets demonstrate that SmartANN improves Recall by 0.24–74.20%, while it 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.

PVLDB Reference Format:

Yutong Zhou, Guoxin Kang, Lei Wang, Xueya Zhang, Qinwei Yang, and Jianfeng Zhan. SmartANN: Object Causal Modeling Boosts Approximate Nearest Neighbor Diagnosis and Auto-Design. PVLDB, 20(1): XXX-XXX, 2027.

doi:XX.XX/XXX.XX

References (61)