논문 해설
Turbocharging PiPNN for Proximity and $k$-NN Graph Building
근접 및 k-NN 그래프 구축을 위한 PiPNN 가속화
- 연구 문제 그래프 기반 ANNS 인덱스는 질의 성능이 높지만 구축 시간이 길어, PiPNN의 구축 방식을 CPU와 GPU에서 양자화와 융합 top-K 커널로 가속하는 문제를 다룹니다.
- 연구 방법 PiPNN II는 CPU에서 양자화 행렬곱과 top-K를 융합하고, GPiPNN은 GPU에서 재귀를 평탄화하고 세그먼트 top-K와 정렬 기반 병합을 사용합니다.
- 주요 결과 저자들이 보고한 바로는 PiPNN II는 CPU에서 PiPNN보다 최대 8배 빠르고, GPiPNN은 GPU에서 Jasper 대비 최대 43.7배, CAGRA 대비 최대 50배 빠른 인덱스 구축을 보입니다.
그래프 인덱스 구축 비용이라는 문제
그래프 기반 근사 최근접 이웃 탐색(ANNS) 인덱스인 HNSW와 Vamana는 높은 질의 성능을 내지만, 인덱스를 구축하는 데 많은 시간이 걸립니다. 기존 구축 방식은 점을 하나씩 넣으면서 부분 인덱스를 탐색해 후보 이웃을 찾기 때문에, 빔 탐색 과정에서 무작위 메모리 접근과 캐시 미스가 많이 발생합니다. 이 때문에 큰 데이터셋에서는 구축이 수 시간에서 수 일까지 걸리는 것으로 보고됩니다.
PiPNN은 이 탐색 병목을 피하기 위해 데이터를 중첩된 리프로 나누고, 각 리프 안에서 후보 간선을 만드는 방식을 제안했습니다. 이 논문은 이 PiPNN의 구성 단계를 양자화와 융합 top-K 커널로 다시 설계하여 CPU와 GPU에서 구축 시간을 줄이는 것을 목표로 합니다. 또한 같은 방법을 k-최근접 이웃(k-NN) 그래프를 직접 만드는 데 적용하는 것을 다룹니다.
양자화와 융합 top-K 커널
PiPNN II는 CPU에서 벡터를 TurboQuant 4비트 코드로 압축하고, 이를 int8로 복호한 뒤 정수 내적 명령으로 거리를 계산합니다. 기존 PiPNN은 float32 행렬곱으로 전체 거리 행렬을 메모리에 쓴 뒤 행별 top-k를 구했지만, 이 방법은 거리 계산과 상위 K 선택을 레지스터 안에서 함께 수행하여 거리 행렬을 메모리에 만들지 않습니다. 저자들은 이 커널이 특정 K 값에 맞춰 특수화되며, 리더 할당 단계와 리프 처리 단계에 서로 다른 형태로 적용된다고 설명합니다.
리프 처리 단계에서는 점과 이웃이 서로 대칭이므로 거리 행렬의 하삼각 부분만 계산하고, 두 점의 top-2 추적기를 함께 갱신합니다. 원문은 이 하삼각 계산이 GEMM 작업을 약 절반으로 줄인다고 보고합니다. 여기서 사용하는 vpdpbusd 명령은 부호 없는 8비트와 부호 있는 8비트를 곱하므로, 저자들은 데이터 코드에 128을 더해 부호 없는 값으로 바꾸고 나중에 그 보정을 빼는 방식을 사용합니다.
GPU에서의 재귀 제거와 세그먼트 top-K
GPiPNN은 GPU에서 PiPNN의 재귀 분할을 고정 횟수의 리더 할당과 정렬 라운드로 바꿉니다. 첫 단계에서는 각 점이 상위 리더 8개 중 가까운 것을 고르고, 둘째 단계에서는 각 버킷 안에서 하위 리더 4개를 고릅니다. 이 설정에서 한 점은 최대 32개 리프에 속할 수 있으며, 이는 PiPNN II의 약 30개 수준과 비교됩니다.
계산 측면에서는 리프를 고정 크기의 score tile로 나누고, 하나의 세그먼트 top-K 커널이 여러 독립 부분문제의 top-K를 함께 계산합니다. 이 커널은 wgmma 명령으로 i8 코드의 타일 곱을 수행하며, 점수 행렬을 전역 메모리에 쓰지 않고 각 행의 top-K를 레지스터에서 유지합니다. HashPrune의 잠금 기반 갱신은 정렬과 병합으로 바뀌며, 최종 가지치기는 RobustPrune 대신 이미 관측된 직접 간선의 거리를 재사용하는 DirectEdgePrune으로 대체됩니다.
가지치기 절차와 근사의 한계
RobustPrune은 가장 가까운 후보를 골라 이웃으로 추가하고, 그 후보가 다른 후보를 가리는지 α 규칙으로 판단하여 나머지를 제거하는 탐욕적 절차입니다. HashPrune은 각 점마다 크기 제한이 있는 저장소를 두고, 후보 간선의 잔차 방향을 해시로 나누어 방향이 비슷한 후보 중 가장 가까운 것만 남깁니다. 저장소의 최종 상태는 후보가 도착한 순서에 의존하지 않는다고 원문은 설명합니다.
DirectEdgePrune은 가지치기 중 채택된 이웃 p*가 후보 p'를 이미 이웃 목록에 가지고 있을 때 저장된 거리를 d(p*, p')로 사용합니다. 간선이 기록되지 않았다면 해당 판단을 건너뜁니다. 따라서 이 근사는 정확한 RobustPrune이 찾을 수 있는 일부 지배 관계를 놓칠 수 있는 일방향 오차를 가지며, 원래 RobustPrune이 유지했을 간선을 잘못 제거하지는 않는다고 설명됩니다.
CPU 구축 속도와 k-NN 그래프 결과
CPU 실험에서 PiPNN II는 ANNS 인덱스 구축에서 Vamana의 양자화 버전 대비 기하평균 5.9배, 비양자화 Vamana 대비 40.7배 빠른 것으로 보고됩니다. 같은 절에서 PiPNN은 PiPNN II보다 느린 기준으로 제시되며, 최대 8배 차이가 보고됩니다. 이 수치는 저자가 선택한 높은 재현율 구성에서의 결과입니다.

Table 2 : CPU build times (seconds).Left:ANNS index build, best high-recall configuration of each method (QPS-vs-recall curves appear in Fig. 10).Right: 𝑘-NN graph build, fastest swept configuration achieving recall≥ 0.9. Each half is col- ored independently: per-row fastest method bolded and cells shaded by log-slowdown vs the row min (green = fastest, red = slowest); “–” indicates method did not achieve recall cutoff. VF32 is unquantized Vamana; VQ is Vamana with quantiza- tion and optional filtering; NNDQ is PyNNDescent with SQ8.
원문 · CC BY 4.0 · Tobias Rubel, Richard Wen, Guy Blelloch, Laxman Dhulipala, Lars Gottesbüren, Jakub Łącki, Vahab Mirrokni · Turbocharging PiPNN for Proximity and $k$-NN Graph Building · 원문 그림 인용 · 원본 PDF 11쪽에서 그림 영역을 추출했습니다.k-NN 그래프 구축에서는 리프에서 얻은 상위 이웃을 직접 사용하여 빔 탐색 질의 단계를 건너뜁니다. 재현율 0.9 조건에서 PiPNN II는 양자화 Vamana 대비 기하평균 10.3배, PyNNDescent 대비 5.9배 빠르다고 보고됩니다. 같은 맥락에서 이 비교는 CPU 기준선과 저자의 측정 조건에 한정됩니다.
![Figure 4: 𝑘-NN graph build time vs. recall on two representa-
tive datasets, zoomed to recall in [0.8, 1.0]. Results on the full
set of datasets are shown in F…](/papers/a73f0638-6aa8-483d-952d-15f97cb4c587/figures/figure-fa6eb4db4f33b6d7d89c7e738c788e38.png?thumb=512)
Figure 4 :𝑘-NN graph build time vs. recall on two representa- tive datasets, zoomed to recall in [0.8, 1.0]. Results on the full set of datasets are shown in Fig. 11 (Sec. C).
원문 · CC BY 4.0 · Tobias Rubel, Richard Wen, Guy Blelloch, Laxman Dhulipala, Lars Gottesbüren, Jakub Łącki, Vahab Mirrokni · Turbocharging PiPNN for Proximity and $k$-NN Graph Building · 원문 그림 인용 · 원본 PDF 10쪽에서 그림 영역을 추출했습니다.
Figure 11 : Full set of 𝑘-NN-graph recall vs. build time results on CPUs. We note that the optimized version of pyNNDescent in ParlayANN runs out of memory on MSMARCO-101M, Deep-1B, MSTuring-1B, and Text2Image-1B.
원문 · CC BY 4.0 · Tobias Rubel, Richard Wen, Guy Blelloch, Laxman Dhulipala, Lars Gottesbüren, Jakub Łącki, Vahab Mirrokni · Turbocharging PiPNN for Proximity and $k$-NN Graph Building · 원문 그림 인용 · 원본 PDF 26쪽에서 그림 영역을 추출했습니다.GPU 구축 속도와 질의 품질
GPU에서 GPiPNN-RSQ8은 ANNS 인덱스 구축에서 Jasper보다 기하평균 13.3배, CAGRA보다 27배 빠른 것으로 보고됩니다. 양자화를 사용하지 않은 GPiPNN-FP16은 Jasper 대비 8.1배, CAGRA 대비 16.3배입니다. 개별 최대 차이는 DBpedia-3072의 Jasper 대비 43.7배와 DEEP-10M의 CAGRA 대비 50배입니다. 100M 규모의 CAGRA 구축 시간은 cuVS 경로의 이상값으로 설명되어 평균 계산에서 제외됩니다.

Table 3 : GPU build times (s): ANNS index (left) and fastest 𝑘-NN graph at recall≥ 0.9 (right); build-then-search includes self-search. RSQ8/FP16: quantized/unquantized GPiPNN modes; NN-Desc: NN-Descent. Coloring follows Sec. 6.1; full results in Tab. 4 and 5.
원문 · CC BY 4.0 · Tobias Rubel, Richard Wen, Guy Blelloch, Laxman Dhulipala, Lars Gottesbüren, Jakub Łącki, Vahab Mirrokni · Turbocharging PiPNN for Proximity and $k$-NN Graph Building · 원문 그림 인용 · 원본 PDF 11쪽에서 그림 영역을 추출했습니다.
Table 4 : Full GPU ANNS-index native build times (s) across all GPiPNN modes (TQ4/RSQ8, unquantized FP16/TF32) and CAGRA variants; cf. the headline Tab. 3. Colored as in Sec. 6.1. “–” marks a run that did not complete or exceeded the 80 GB H100 budget; the unquantized FP16/TF32 modes carry a2–4 × larger decoded-row footprint and so miss the largest cells (TF32 at 100M, and both on DataCompDr-10M), and plainCAGRAruns only on the L2 datasets (its cuVS NN-Descent build is L2-only). The 100M-scale rows (DEEP-100M, MS-Turing-100M) are shown for completeness but excluded from the main-text tables and the aggregate speedups of Tab. 6; theCAGRADEEP-100M outlier is discussed in Sec. D.
원문 · CC BY 4.0 · Tobias Rubel, Richard Wen, Guy Blelloch, Laxman Dhulipala, Lars Gottesbüren, Jakub Łącki, Vahab Mirrokni · Turbocharging PiPNN for Proximity and $k$-NN Graph Building · 원문 그림 인용 · 원본 PDF 16쪽에서 그림 영역을 추출했습니다.
Table 6 : Build-time speedup of GPiPNN-RSQ8 over each GPU baseline, reported as the geometric mean and maximum over the datasets that baseline completes (computed from Tab. 3 and the full Tab. 5); 𝑛 is the number of such datasets. The ANNS-index rows exclude the two 100M-scale datasets, whose CAGRAbuild is an outlier (see Sec. D).
원문 · CC BY 4.0 · Tobias Rubel, Richard Wen, Guy Blelloch, Laxman Dhulipala, Lars Gottesbüren, Jakub Łącki, Vahab Mirrokni · Turbocharging PiPNN for Proximity and $k$-NN Graph Building · 원문 그림 인용 · 원본 PDF 17쪽에서 그림 영역을 추출했습니다.질의 품질 측면에서는 Jasper의 질의 코드를 사용하여 인덱스 품질을 비교합니다. 원문은 GPiPNN의 QPS-재현율 곡선이 DEEP-10M과 DBpedia-3072에서 Jasper와 CAGRA 변형과 같거나 그 위에 있다고 보고합니다. 직접 간선 가지치기는 RobustPrune보다 30~58% 더 조밀한 그래프를 만들지만 질의 품질은 비슷하다고 설명됩니다.

Figure 12 : Full GPU query throughput vs. recall grid for all thirteen datasets (top-right is best); the body (Fig. 5) shows the DEEP-10M and DBpedia-3072 panels. Queries use Jasper’s GPU search kernel. The DataCompDr-10M, Wiki-Cohere-10M, Text2Image-10M, and MS-MARCO-10M panels use ground truth computed for the 10M crops, and the MS-Arctic-1M panel ground truth for the 1M slice; on the unnormalized MIPS sets only theCAGRA-PQ (IVF-PQ) variant is available.
원문 · CC BY 4.0 · Tobias Rubel, Richard Wen, Guy Blelloch, Laxman Dhulipala, Lars Gottesbüren, Jakub Łącki, Vahab Mirrokni · Turbocharging PiPNN for Proximity and $k$-NN Graph Building · 원문 그림 인용 · 원본 PDF 27쪽에서 그림 영역을 추출했습니다.절제와 커널 기여
CPU의 리프 2-NN 커널은 원래 PiPNN의 12.90ms에서 최종 1.04ms로 줄어 12.4배 개선되었다고 보고됩니다. 단계별 분석에서는 int8 내적 전환, 패널 레이아웃, 하삼각 계산, SIMD scatter가 각각 다른 크기의 개선을 만들었습니다. 원문은 하삼각 계산이 GEMM 작업을 약 1.96배 줄인다고 설명합니다.

Figure 6 : ProcessLeafTop2 ablation: runtime breakdown and effective throughput across cumulative optimizations. Throughput counts𝑛2𝑑 operations althoughLower Triangle computes1.96×fewer.
원문 · CC BY 4.0 · Tobias Rubel, Richard Wen, Guy Blelloch, Laxman Dhulipala, Lars Gottesbüren, Jakub Łącki, Vahab Mirrokni · Turbocharging PiPNN for Proximity and $k$-NN Graph Building · 원문 그림 인용 · 원본 PDF 12쪽에서 그림 영역을 추출했습니다.GPU에서는 리프 처리 커널이 차원에 따라 다른 병목을 가집니다. 차원이 1536 이상이면 L2 대역폭이 제한 요인으로 보고되고, 768 차원에서는 점유율 제약이 주요 원인으로 설명됩니다. 이 측정은 H100 한 대에서 얻은 결과이며, 다른 하드웨어에 같은 병목이 나타난다는 주장은 원문에 없습니다.

Table 8 : Leaf2-NN kernel SOL analysis for GPiPNN-RSQ8 (full precision sweep in Tab. 9). Columns: “2-NN%” is the leaf kernel’s share of the build time. “SM%”/“Mem%” are NCU compute- and memory-pipe throughput; “Occ%” is achieved occupancy (28%ceiling, set by96registers/thread and SMEM); “regime” names the binding resource.
원문 · CC BY 4.0 · Tobias Rubel, Richard Wen, Guy Blelloch, Laxman Dhulipala, Lars Gottesbüren, Jakub Łącki, Vahab Mirrokni · Turbocharging PiPNN for Proximity and $k$-NN Graph Building · 원문 그림 인용 · 원본 PDF 18쪽에서 그림 영역을 추출했습니다.
Figure 8 : Build component breakdown of GPiPNN-RSQ8 by pipeline stage (left) and by kernel (right), as a percentage of the native build time (absolute build time above each bar). Datasets are ordered by dimension. No single kernel dominates, and the bottleneck shifts from the prune and sub-leader scan at low dimension to the leaf score and edge-hash at high dimension.
원문 · CC BY 4.0 · Tobias Rubel, Richard Wen, Guy Blelloch, Laxman Dhulipala, Lars Gottesbüren, Jakub Łącki, Vahab Mirrokni · Turbocharging PiPNN for Proximity and $k$-NN Graph Building · 원문 그림 인용 · 원본 PDF 20쪽에서 그림 영역을 추출했습니다.적용 범위와 한계
이 결과는 저자가 선택한 데이터셋, 빌드 파라미터, 하드웨어 설정에서 얻은 것입니다. GPU 실험은 단일 H100 한 대에서 수행되었고, 고차원 벡터의 리프 처리는 메모리 대역폭에 의해 제한되는 것으로 보고됩니다. 또 DirectEdgePrune은 정확한 RobustPrune과 같은 가지치기 결과를 보장하지 않으므로, 질의 품질 비교는 저자의 측정 범위에 한정해서 읽어야 합니다.

Table 15 : Software and hardware environment for the GPU experiments.
원문 · CC BY 4.0 · Tobias Rubel, Richard Wen, Guy Blelloch, Laxman Dhulipala, Lars Gottesbüren, Jakub Łącki, Vahab Mirrokni · Turbocharging PiPNN for Proximity and $k$-NN Graph Building · 원문 그림 인용 · 원본 PDF 22쪽에서 그림 영역을 추출했습니다.저자들은 향후 과제로 단일 기계를 넘어서는 분산 구축과 다른 가속기로의 이식을 언급합니다. 이 방향은 PiPNN의 독립적인 분할과 병합 구조에 기대한 계획이며, 이 논문에서 검증된 결과는 아닙니다.
논문 정보
- 저자
- Tobias Rubel, Richard Wen, Guy Blelloch, Laxman Dhulipala, Lars Gottesbüren, Jakub Łącki, Vahab Mirrokni
- 학회·저널
- arXiv · 프리프린트
- 최초 공개일
- 2026년 11월 3일
- 등록일
- 2026년 11월 6일
- 수정일
- 2026년 11월 3일
- 버전
- v1
- arXiv
- 2611.05690
- 분류
- cs.DB · cs.IR
- 원문 이용 조건
- CC BY 4.0
- 제공 범위
- 논문 정보, 해설, 허용된 원문 그림
AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.
초록
Graph-based Approximate Nearest Neighbor Search (ANNS) indexes such as HNSW and Vamana deliver state-of-the-art query performance at the cost of large indexing times. The recently introduced PiPNN method drastically accelerated index construction by way of a partitioning-based algorithm leveraging dense matrix multiplication and top-$K$ aggregation kernels. In this paper, we unlock the full potential of PiPNN's hardware-friendly algorithm design. We introduce PiPNN II, which optimizes multiple steps of the PiPNN recipe, giving up to $8\times$ speedups for graph-based ANNS index construction. In addition, we present GPiPNN, a GPU implementation which builds comparable ANNS indices up to $43.7\times$ faster than Jasper and up to $50\times$ faster than CAGRA. We also extend PiPNN II and GPiPNN to compute high-quality $k$-NN graphs directly, which unlocks massive speedups over methods used in many existing systems for clustering, anomaly detection, and more. For 10-NN graph building at $90\%$ recall, we obtain up to a $13\times$ speedup on CPUs and $6.6\times$ on GPUs as compared to the prior best methods. PiPNN II can build a billion-scale 10-NN graph in under 16 minutes. Common to both PiPNN II and GPiPNN is the use of quantization to reduce memory traffic and leverage fast low-precision matrix operations. Top-$K$ emerges as a new bottleneck, which we optimize with specialized code for specific $K$, and by fusing with the matrix kernel to avoid materializing the distance matrix to memory. On CPUs, we demonstrate further performance improvements by leveraging our matrix kernels in the RobustPrune procedure proposed in Vamana and used in PiPNN. On GPUs, we flatten recursive partitioning into segmented batches, use one fused top-$K$ abstraction for partitioning and leaf scoring, and prune with already-witnessed direct edges rather than new candidate-to-candidate scoring passes.
원문 인용
Tobias Rubel, Richard Wen, Guy Blelloch, Laxman Dhulipala, Lars Gottesbüren, Jakub Łącki, Vahab Mirrokni (2026). Turbocharging PiPNN for Proximity and $k$-NN Graph Building. arXiv:2611.05690v1. https://arxiv.org/abs/2611.05690v1
BibTeX
@misc{rubel2026turbocharging,
title = {{Turbocharging PiPNN for Proximity and $k$-NN Graph Building}},
author = {Tobias Rubel and Richard Wen and Guy Blelloch and Laxman Dhulipala and Lars Gottesbüren and Jakub Łącki and Vahab Mirrokni},
year = {2026},
eprint = {2611.05690},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2611.05690v1}
}