Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
149 tokens/sec
GPT-4o
7 tokens/sec
Gemini 2.5 Pro Pro
45 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Arkade: k-Nearest Neighbor Search With Non-Euclidean Distances using GPU Ray Tracing (2311.09168v2)

Published 15 Nov 2023 in cs.GR, cs.DC, and cs.PF

Abstract: High-performance implementations of $k$-Nearest Neighbor Search ($k$NN) in low dimensions use tree-based data structures. Tree algorithms are hard to parallelize on GPUs due to their irregularity. However, newer Nvidia GPUs offer hardware support for tree operations through ray-tracing cores. Recent works have proposed using RT cores to implement $k$NN search, but they all have a hardware-imposed constraint on the distance metric used in the search -- the Euclidean distance. We propose and implement two reductions to support $k$NN for a broad range of distances other than the Euclidean distance: Arkade Filter-Refine and Arkade Monotone Transformation, each of which allows non-Euclidean distance-based nearest neighbor queries to be performed in terms of the Euclidean distance. With our reductions, we observe that $k$NN search time speedups range between $1.6$x-$200$x and $1.3$x-$33.1$x over various state-of-the-art GPU shader core and RT core baselines, respectively. In evaluation, we provide several insights on RT architectures' ability to efficiently build and traverse the tree by analyzing the $k$NN search time trends.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (54)
  1. Automated web usage data mining and recommendation system using K-Nearest Neighbor (KNN) classification method. Applied Computing and Informatics 12, 1 (2016), 90–108.
  2. AMD. 2023. AMD Ray tracing. https://www.amd.com/en/technologies/rdna
  3. Cache locality is not enough: High-Performance Nearest Neighbor Search with Product Quantization Fast Scan. Proc. VLDB Endow. 9, 4 (2015), 288–299.
  4. ANN-Benchmarks: A benchmarking tool for approximate nearest neighbor algorithms. Information Systems 87 (2020), 101374. https://doi.org/10.1016/j.is.2019.02.006
  5. Jon Louis Bentley. 1975. Multidimensional binary search trees used for associative searching. Commun. ACM 18, 9 (1975), 509–517.
  6. N. Bourbaki. 1987. Topological Vector Spaces: Chapters 1-5. Springer-Verlag, Berlin. https://books.google.com/books?id=S4wnAQAAIAAJ
  7. STPLS3D: A Large-Scale Synthetic and Real Aerial Photogrammetry 3D Point Cloud Dataset. In 33rd British Machine Vision Conference, November 21-24, 2022. BMVA Press, London, UK, 429. https://bmvc2022.mpi-inf.mpg.de/0429.pdf
  8. Friendship and Mobility: User Movement in Location-Based Social Networks. Retrieved from UCR-STAR https://star.cs.ucr.edu/?stanford-gowalla&d.
  9. Fast Radius Search Exploiting Ray Tracing Frameworks. Journal of Computer Graphics Techniques (JCGT) 10, 1 (5 February 2021), 25–48. http://jcgt.org/published/0010/01/02/
  10. An algorithm for finding best matches in logarithmic expected time. ACM Transactions on Mathematical Software (TOMS) 3, 3 (1977), 209–226.
  11. Fast Approximate Nearest Neighbor Search With The Navigating Spreading-out Graph. Proc. VLDB Endow. 12, 5 (2019), 461–474.
  12. GBIF.Org User. 2023. Occurrence Download. https://doi.org/10.15468/DL.QQ7KRQ
  13. Vision meets Robotics: The KITTI Dataset. https://www.cvlibs.net/datasets/kitti/raw_data.php
  14. Buffer k-d Trees: Processing Massive Nearest Neighbor Queries on GPUs. In ICML (JMLR Workshop and Conference Proceedings, Vol. 32). JMLR.org, 172–180.
  15. General Transformations for GPU Execution of Tree Traversals. In Proceedings of the International Conference on High Performance Computing, Networking, Storage and Analysis (Denver, Colorado) (SC ’13). Association for Computing Machinery, New York, NY, USA, Article 10, 12 pages. https://doi.org/10.1145/2503210.2503223
  16. Michael Gowanlock. 2021. Hybrid KNN-join: Parallel nearest neighbor searches exploiting CPU and GPU architectural features. J. Parallel and Distrib. Comput. 149 (2021), 119–137.
  17. Accelerating Large-Scale Inference with Anisotropic Vector Quantization. https://doi.org/10.48550/ARXIV.1908.10396
  18. R. W. Hamming. 1950. Error detecting and error correcting codes. The Bell System Technical Journal 29, 2 (1950), 147–160. https://doi.org/10.1002/j.1538-7305.1950.tb00463.x
  19. Treelogy: A benchmark suite for tree traversals. In 2017 IEEE International Symposium on Performance Analysis of Systems and Software (ISPASS). 227–238. https://doi.org/10.1109/ISPASS.2017.7975294
  20. RandLA-Net: Efficient Semantic Segmentation of Large-Scale Point Clouds. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (2020).
  21. Query-aware locality-sensitive hashing for approximate nearest neighbor search. Proceedings of the VLDB Endowment 9, 1 (2015), 1–12.
  22. Piotr Indyk and Rajeev Motwani. 1998. Approximate nearest neighbors: towards removing the curse of dimensionality. In Proceedings of the thirtieth annual ACM symposium on Theory of computing. 604–613.
  23. Intel. 2023. Intel Ray tracing. https://www.intel.com/content/www/us/en/developer/articles/guide/real-time-ray-tracing-in-games.html
  24. Paul Jaccard. 1912. THE DISTRIBUTION OF THE FLORA IN THE ALPINE ZONE.1. New Phytologist 11, 2 (1912), 37–50. https://doi.org/10.1111/j.1469-8137.1912.tb05611.x
  25. Billion-Scale Similarity Search with GPUs. IEEE Transactions on Big Data 7, 03 (Jul 2021), 535–547. https://doi.org/10.1109/TBDATA.2019.2921572
  26. Lukasz Kaiser and Ilya Sutskever. 2015. Neural GPUs Learn Algorithms. https://doi.org/10.48550/ARXIV.1511.08228
  27. Prasanta Chandra Mahalanobis. 1936. On the generalised distance in statistics. http://library.isical.ac.in:8080/xmlui/bitstream/handle/10263/6765/Vol02_1936_1_Art05-pcm.pdf
  28. Yu A. Malkov and D. A. Yashunin. 2020. Efficient and Robust Approximate Nearest Neighbor Search Using Hierarchical Navigable Small World Graphs. IEEE Trans. Pattern Anal. Mach. Intell. 42, 4 (apr 2020), 824–836. https://doi.org/10.1109/TPAMI.2018.2889473
  29. Accelerating kd-tree Searches for all k-nearest Neighbours. In Eurographics 2013 - Short Papers, M.-A. Otaduy and O. Sorkine (Eds.). The Eurographics Association. https://doi.org/10.2312/conf/EG2013/short/037-040
  30. Shape contexts enable efficient retrieval of similar shapes. In Proceedings of the 2001 IEEE Computer Society Conference on Computer Vision and Pattern Recognition. CVPR 2001, Vol. 1. I–I. https://doi.org/10.1109/CVPR.2001.990547
  31. Marius Muja and David G. Lowe. 2014. Scalable Nearest Neighbor Algorithms for High Dimensional Data. IEEE Transactions on Pattern Analysis and Machine Intelligence 36, 11 (2014), 2227–2240. https://doi.org/10.1109/TPAMI.2014.2321376
  32. Vani Nagarajan and Milind Kulkarni. 2023. RT-DBSCAN: Accelerating DBSCAN using Ray Tracing Hardware. In IPDPS. IEEE, 963–973.
  33. RT-kNNS Unbound: Using RT Cores to Accelerate Unrestricted Neighbor Search. In Proceedings of the 37th International Conference on Supercomputing, ICS 2023, Orlando, FL, USA, June 21-23, 2023, Kyle A. Gallivan, Efstratios Gallopoulos, Dimitrios S. Nikolopoulos, and Ramón Beivide (Eds.). ACM, 289–300. https://doi.org/10.1145/3577193.3593738
  34. Parallel tree traversal for nearest neighbor query on the GPU. In 2016 45th International Conference on Parallel Processing (ICPP). IEEE, 113–122.
  35. NVIDIA. [n. d.]. NVIDIA OptiX 7.5 – Programming Guide. https://raytracing-docs.nvidia.com/optix7/guide/index.html
  36. Nvidia. 2023a. NVIDIA Nsight Compute. https://developer.nvidia.com/nsight-compute
  37. Nvidia. 2023b. NVIDIA Ray tracing. https://developer.nvidia.com/rtx/ray-tracing
  38. OpenStreetMap. [n. d.]. https://www.openstreetmap.org
  39. How good are modern spatial analytics systems? Proceedings of the VLDB Endowment 11, 11 (2018), 1661–1673.
  40. GloVe: Global Vectors for Word Representation. In Empirical Methods in Natural Language Processing (EMNLP). 1532–1543. http://www.aclweb.org/anthology/D14-1162
  41. Ninh Pham and Tao Liu. 2022. Falconn++: A Locality-sensitive Filtering Approach for Approximate Nearest Neighbor Search. arXiv:2206.01382 [cs.DS]
  42. GPU-accelerated nearest neighbor search for 3D registration. In Computer Vision Systems: 7th International Conference on Computer Vision Systems, ICVS 2009 Liège, Belgium, October 13-15, 2009. Proceedings 7. Springer, 194–203.
  43. Mark J. Reid and Karl M. Menten. 2020. The first stellar parallaxes revisited. Astronomische Nachrichten 341, 9 (nov 2020), 860–869. https://doi.org/10.1002/asna.202013833
  44. The Stanford 3D Scanning Repository. 2014. Vellum manuscript, The XYZ RGB models. http://graphics.stanford.edu/data/3Dscanrep/
  45. Steven Rubin and Turner Whitted. 1980. A 3-dimensional representation for fast rendering of complex scenes. ACM Siggraph Computer Graphics 14. https://doi.org/10.1145/965105.807479
  46. Amit Singhal. 2001. Modern Information Retrieval: A Brief Overview. IEEE Data Eng. Bull. 24, 4 (2001), 35–43. http://sites.computer.org/debull/A01DEC-CD.pdf
  47. OWL: A Node Graph ”Wrapper” Library for OptiX 7. https://github.com/owl-project/owl
  48. RTX Beyond Ray Tracing: Exploring the Use of Hardware Ray Tracing Cores for Tet-Mesh Point Location. In High-Performance Graphics - Short Papers, Markus Steinberger and Tim Foley (Eds.). The Eurographics Association. https://doi.org/10.2312/hpg.20191189
  49. A Quantitative Analysis and Performance Study for Similarity-Search Methods in High-Dimensional Spaces. In VLDB.
  50. Jordan Wood. 2008. Filter and Refine Strategy. Springer US, Boston, MA, 320–320. https://doi.org/10.1007/978-0-387-35973-1_415
  51. Tigris: Architecture and Algorithms for 3D Perception in Point Clouds. In Proceedings of the 52nd Annual IEEE/ACM International Symposium on Microarchitecture (Columbus, OH, USA) (MICRO ’52). Association for Computing Machinery, New York, NY, USA, 629–642. https://doi.org/10.1145/3352460.3358259
  52. Accelerating Force-Directed Graph Drawing with RT Cores. In 2020 IEEE Visualization Conference (VIS). 96–100. https://doi.org/10.1109/VIS47514.2020.00026
  53. SONG: Approximate Nearest Neighbor Search on GPU. In 2020 IEEE 36th International Conference on Data Engineering (ICDE). 1033–1044. https://doi.org/10.1109/ICDE48307.2020.00094
  54. Yuhao Zhu. 2022. RTNN: Accelerating Neighbor Search Using Hardware Ray Tracing. In Proceedings of the 27th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (Seoul, Republic of Korea) (PPoPP ’22). Association for Computing Machinery, New York, NY, USA, 76–89. https://doi.org/10.1145/3503221.3508409
Citations (1)

Summary

We haven't generated a summary for this paper yet.