🤖 AI Summary
This study addresses the challenge of hyperparameter tuning for Hierarchical Navigable Small World (HNSW) graphs, which is complicated by nonlinear parameter couplings and stringent resource and time constraints in production environments. The work reveals, for the first time, that the HNSW configuration space exhibits structural properties—namely monotonicity, dominant unimodality, and separability—and leverages these insights to propose CHAT, a constraint-aware deterministic tuning framework. By integrating structure-guided pre-pruning and directed search, CHAT overcomes the efficiency limitations of conventional black-box optimization. Empirical evaluations across multiple datasets and vector engines demonstrate that CHAT achieves up to a 45% improvement in throughput or an 11% gain in recall compared to strong baselines, while accelerating tuning convergence by as much as 44×.
📝 Abstract
Vector databases (VectorDBs) are a core component of modern retrieval systems, including Retrieval-Augmented Generation (RAG), where efficient Approximate Nearest Neighbor Search (ANNS) is critical. Among ANNS algorithms, Hierarchical Navigable Small World (HNSW) graphs are widely adopted for their strong recalllatency trade-off. However, configuring HNSW remains challenging: its hyperparameters jointly affect search quality, latency, build time, and index size in nonlinear ways, while production deployments impose strict resource and tuning-time constraints.We study HNSW hyperparameter tuning from a systems perspective and show that its configuration space exhibits strong structural regularities. Specifically, we identify monotonic, dominant unimodal, and separable relationships among search-time and construction-time parameters, which induce feasibility boundaries under performance and resource constraints. Building on this insight, we propose CHAT, a constraint-aware tuning framework for HNSW. Unlike generic black-box optimizers, CHAT exploits HNSW-specific structure to perform deterministic, sample-efficient search and prune resource-infeasible configurations before full index construction. Across multiple datasets and HNSW-based vector search engines, CHAT identifies configurations that maximize recall or throughput while satisfying constraints on accuracy, latency, build time, index size, and tuning budget. Compared to strong baselines, CHAT achieves up to 45% higher throughput or 11% higher recall, and converges up to 44x faster. These results show that principled, structure-aware tuning enables efficient and robust HNSW deployment beyond generic black-box optimization.