Abstract
Machine Learning algorithms, such as classification and clustering techniques, have gained significant traction over the last years because they are vital to many real-world problems. K-Nearest Neighbor algorithm (KNN) is widely used in text categorization, predictive analysis, data mining etc. but comes at the cost of high computation. In the era of big data, modern data centers adopt this specific algorithm with approximate techniques to compute demanding workloads every day. However, high dimensional nearest neighbor queries on billion-scale datasets still produce a significant computational and energy overhead. In this paper, we describe and implement a novel design to address this problem based on a hardware accelerated approximate KNN algorithm built upon FAISS framework (Facebook Artificial Intelligence Similarity Search) using FPGA-OpenCL platforms on the cloud. This is an original deployment of FPGA architecture on this framework that also shows how the persistent index build times on big scale inputs for similarity search can be handled in hardware and even outperform other high performance systems. The experiments were done on AWS cloud F1 instance achieving 98\(\times \) FPGA accelerator speed-up over single-core CPU and 2.1\(\times \) end-to-end system speed-up over a 36-thread Xeon CPU. Also, the performance/watt of the design was 3.5\(\times \) from the same CPU and 1.2\(\times \) from a Kepler-class GPU.
This project has received funding from the Xilinx University program and the Hellenic Foundation for Research and Innovation (HFRI) and the Genal Secretariat for Research and Technology (GSRT), under grant agreement No 2212- Hardware Acceleration of Machine Learning Applications in the Cloud.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Kachris, C., Soudris, D.: A survey on reconfigurable accelerators for cloud computing. In: 2016 26th International Conference on Field Programmable Logic and Applications (FPL), pp. 1–10, August 2016
Mavridis, S., et al.: Vinetalk: simplifying software access and sharing of FPGAs in datacenters. In: 2017 27th International Conference on Field Programmable Logic and Applications (FPL), pp. 1–4, September 2017
Kouiroukidis, N., Evangelidis, G.: The effects of dimensionality curse in high dimensional KNN search. In: 2011 15th Panhellenic Conference on Informatics, p. 42 (2011)
Andoni, A., Indyk, P., Razenshteyn, I.P.: Approximate nearest neighbor search in high dimensions. CoRR, vol. abs/1806.09823 (2018)
Norouzi, M., Fleet, D.J.: Cartesian k-means. In: Proceedings of the 2013 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2013, Washington, DC, USA, pp. 3017–3024. IEEE Computer Society (2013)
Johnson, J., Douze, M., Jégou, H.: Billion-scale similarity search with GPUs. arXiv preprint arXiv:1702.08734 (2017)
Pu, Y., Peng, J., Huang, L., Chen, J.: An efficient KNN algorithm implemented on FPGA based heterogeneous computing system using OpenCL. In: 2015 IEEE 23rd Annual International Symposium on Field-Programmable Custom Computing Machines, pp. 167–170, May 2015
Zhang, J., Li, J., Khoram, S.: Efficient large-scale approximate nearest neighbor search on OpenCL FPGA, pp. 4924–4932, June 2018
Hussain, H.M., Benkrid, K., Erdogan, A.T., Seker, H.: Highly parameterized k-means clustering on FPGAs: comparative results with GPPs and GPUs. In: 2011 International Conference on Reconfigurable Computing and FPGAs, pp. 475–480 (2011)
Chen, Q., Li, D., Tang, C.: KNN matting. In: 2012 IEEE Conference on Computer Vision and Pattern Recognition, pp. 869–876, June 2012
Liu, S., et al.: Matching-CNN meets KNN: quasi-parametric human parsing. In: 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 1419–1427, June 2015
Fukunage, K., Narendra, P.M.: A branch and bound algorithm for computing k-nearest neighbors. IEEE Trans. Comput. 24, 750–753 (1975)
Bentley, J.L.: Multidimensional binary search trees used for associative searching. Commun. ACM 18, 509–517 (1975)
Gionis, A., Indyk, P., Motwani, R.: Similarity search in high dimensions via hashing. In: Proceedings of the 25th International Conference on Very Large Data Bases, VLDB 1999, San Francisco, pp. 518–529. Morgan Kaufmann Publishers Inc. (1999)
Sharifzadehand, M., Shahabi, C.: Approximate voronoi cell computation on geometric data streams, March 2019
Li, K., Li, W., Chen, Z., Liu, Y. (eds.): ISICA 2017. CCIS, vol. 874. Springer, Singapore (2018). https://doi.org/10.1007/978-981-13-1651-7
Kybic, J., Vnučko, I.: Approximate best bin first kd tree all nearest neighbor search with incremental updates, vol. 10, pp. 420–422, August 2010
Chen, Y., Guan, T., Wang, C.: Approximate nearest neighbor search by residual vector quantization. Sensors 10, 11259–11273 (2010)
Xilinx Inc.: SDAccel development environment
Danopoulos, D., Kachris, C., Soudris, D.: Acceleration of image classification with caffe framework using FPGA. In: 2018 7th International Conference on Modern Circuits and Systems Technologies (MOCAST), pp. 1–4, May 2018
Yinger, J., et al.: Customizable FPGA OpenCL matrix multiply design template for deep neural networks. In: 2017 International Conference on Field Programmable Technology (ICFPT), pp. 259–262, December 2017
Acknowledgment
This project has received funding from the Xilinx University program and the Hellenic Foundation for Research and Innovation (HFRI) and the General Secretariat for Research and Technology (GSRT), under grant agreement No 2212-Hardware Acceleration of Machine Learning Applications in the Cloud.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this paper
Cite this paper
Danopoulos, D., Kachris, C., Soudris, D. (2019). Approximate Similarity Search with FAISS Framework Using FPGAs on the Cloud. In: Pnevmatikatos, D., Pelcat, M., Jung, M. (eds) Embedded Computer Systems: Architectures, Modeling, and Simulation. SAMOS 2019. Lecture Notes in Computer Science(), vol 11733. Springer, Cham. https://doi.org/10.1007/978-3-030-27562-4_27
Download citation
DOI: https://doi.org/10.1007/978-3-030-27562-4_27
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-27561-7
Online ISBN: 978-3-030-27562-4
eBook Packages: Computer ScienceComputer Science (R0)