[论文解读] pHNSW: PCA-Based Filtering to Accelerate HNSW Approximate Nearest Neighbor Search
pHNSW 将 PCA-based 降维与自定义 ISA 驱动的处理器结合,以加速 HNSW ANN 搜索,在保持高召回率的同时实现显著的 QPS 增益和能耗节省。
Hierarchical Navigable Small World (HNSW) has demonstrated impressive accuracy and low latency for high-dimensional nearest neighbor searches. However, its high computational demands and irregular, large-volume data access patterns present significant challenges to search efficiency. To address these challenges, we introduce pHNSW, an algorithm-hardware co-optimized solution that accelerates HNSW through Principal Component Analysis (PCA) filtering. On the algorithm side, we apply PCA filtering to reduce the dimensionality of the dataset, thereby lowering the volume of neighbor access and decreasing the computational load for distance calculations. On the hardware side, we design the pHNSW processor with custom instructions to optimize search throughput and energy efficiency. In the experiments, we synthesized the pHNSW processor RTL design with a 65nm technology node and evaluated it using DDR4 and HBM1.0 DRAM standards. The results show that pHNSW boosts Queries per Second (QPS) by 14.47x-21.37x on a CPU and 5.37x-8.46x on a GPU, while reducing energy consumption by up to 57.4% compared to standard HNSW implementation.
研究动机与目标
- Motivate accelerating high-dimensional ANN search (HNSW) by reducing data dimensionality without sacrificing accuracy.
- Propose a PCA-based filtering strategy (pHNSW) integrated into the HNSW framework.
- Design a custom pHNSW processor with an ISA and optimized memory/dataflow to boost throughput and energy efficiency.
- Evaluate the approach on SIFT1M with realistic off-chip memory configurations to quantify throughput and energy gains.
提出的方法
- Apply PCA to project high-dimensional data to a lower-dimensional space before neighbor filtering.
- Perform low-dimensional distance calculations and sorting to select a top-k candidate set per layer.
- Back-project the top-k low-dimensional candidates to high-dimensional space for exact distance computations.
- Introduce a hierarchical, layer-specific k value to balance recall and throughput across the HNSW graph layers.
- Organize off-chip data to enable regular, sequential access of low-dimensional data to reduce irregular memory patterns.
- Implement a pHNSW processor with a dedicated ISA, custom dist and sort units, and DMA-based data flow to accelerate search.
实验结果
研究问题
- RQ1Can PCA-based filtering reduce high-dimensional distance computations in HNSW without substantially harming recall?
- RQ2How should the top-k parameter be chosen across HNSW layers to balance recall and QPS?
- RQ3What architectural choices (data layout, custom ISA, parallel distance/sort units) maximize search throughput and energy efficiency for pHNSW?
- RQ4What are the throughput and energy benefits of the algorithm–hardware co-design on realistic DRAM standards (DDR4 / HBM1.0) with SIFT1M?
主要发现
- pHNSW achieves recall@10 around 0.92 on SIFT1M with selected layer-wise k values.
- Single-query QPS improvements over CPU baseline range from 14.47× to 21.37× for DDR4 and HBM configurations respectively, when compared to HNSW on CPU.
- Compared to GPU baseline, pHNSW attains 5.37× to 8.46× higher QPS.
- Energy consumption per query is reduced by up to 57.4% relative to standard HNSW hardware implementations, with DRAM access dominating energy usage.
- The pHNSW processor area is 0.739 mm^2, with notable contributions from on-chip memories (SPM) and the Dist.L/kSort.L compute units.
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。