Approximate nearest neighbor search underpins recommendation and retrieval systems. The fastest search indexes are based on graphs, but building these graphs has been slow, often taking hours for large datasets.
This work introduces PiPNN II for CPUs and GPiPNN for GPUs, improved versions of the PiPNN algorithm. They use quantization, compressing vectors to lower precision, and fuse distance calculation with neighbor selection to speed construction. The methods also directly build k-NN graphs for clustering and anomaly detection.
The new systems achieve up to 8 times faster builds on CPUs and up to 50 times faster on GPUs than prior methods, while preserving search quality. This dramatic speedup makes frequent index rebuilding practical and enables efficiency improvements in many tasks.
