SPI让向量数据库根据查询复杂度动态调整检索深度,提速1.4到2.3倍。
SPI: Query-Depth-Adaptive Indexing for Streaming RAG in Vector Databases
- 构建分层语义索引,按查询需求自适应选择检索精度
- 在MS MARCO和Natural Questions上保持相同召回率下延迟降低1.4–2.3倍
- 支持流式插入与分布式部署,适合高并发实时RAG应用
向量数据库(VecDB)在检索增强生成(RAG)中面临查询与文档摄入同步的挑战。现有方案多采用统一表示,忽视查询间语义粒度差异。本文提出语义金字塔索引(SPI),将嵌入向量组织为L个语义对齐的层级,并通过轻量级不确定性控制器动态选择每条查询的检索深度。SPI支持从粗到细的渐进式近似最近邻搜索,实现无需全局重建的层级流式插入,结合LSH分片与异步gRPC协调支持分布式执行。相比固定遍历规则的SPANN等结构,SPI可在查询时动态调整分辨率,兼容FAISS与Qdrant后端。在MS MARCO与Natural Questions数据集上,保持相同召回率@10的前提下,平均检索延迟降低1.4–2.3倍。原型扩展至8节点实现6.2倍吞吐提升(约73%效率),16节点效率下降。提供top-K稳定性保障:当检索裕度充足时,浅层即可获得一致结果。代码与配置见https://github.com/FastLM/SPI_VecDB。
原文摘要 · Abstract (English)
Vector databases (VecDBs) are increasingly deployed in retrieval-augmented generation (RAG) pipelines where query processing and document ingestion occur concurrently. The index layer needs to provide low-latency search while incorporating new vectors without frequent global rebuilding. Existing VecDB pipelines typically operate within a uniform representation regime, despite substantial variation in the semantic granularity required across queries. This motivates an index design that supports incremental updates while adapting retrieval depth to query distribution and complexity. We propose \textbf{Semantic Pyramid Indexing (SPI)}, a VecDB-layer indexing framework that organizes embeddings into $L$ semantically aligned resolution levels and selects retrieval depth per query via a lightweight uncertainty-aware controller. SPI supports progressive coarse-to-fine ANN search, level-wise streaming insertion without global rebuilds, and distributed execution through LSH partitioning with asynchronous gRPC coordination. Unlike hierarchical ANN structures with fixed traversal rules (e.g., SPANN), SPI adapts resolution at query time while remaining compatible with FAISS and Qdrant backends. On MS MARCO and Natural Questions, SPI achieves competitive Recall@10 with lower latency under the same dense encoder family, yielding a \textbf{1.4--2.3$\times$} average retrieval latency reduction under fixed Recall@10 targets relative to comparable approximate-ANN baselines. A prototype scaling study up to 8 nodes shows $6.2\times$ throughput scaling (${\approx}73\%$ efficiency); the 16-node configuration is included for completeness but shows diminishing efficiency. We provide a top-$K$ stability guarantee: queries with sufficient retrieval margin return an identical top-$K$ set at a shallower level. Code and configurations are available at https://github.com/FastLM/SPI_VecDB.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。