Skip to main content

Approximate Similarity Search with FAISS Framework Using FPGAs on the Cloud

  • Conference paper
  • First Online:
Embedded Computer Systems: Architectures, Modeling, and Simulation (SAMOS 2019)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 11733))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. 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

    Google Scholar 

  2. 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

    Google Scholar 

  3. Kouiroukidis, N., Evangelidis, G.: The effects of dimensionality curse in high dimensional KNN search. In: 2011 15th Panhellenic Conference on Informatics, p. 42 (2011)

    Google Scholar 

  4. Andoni, A., Indyk, P., Razenshteyn, I.P.: Approximate nearest neighbor search in high dimensions. CoRR, vol. abs/1806.09823 (2018)

    Google Scholar 

  5. 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)

    Google Scholar 

  6. Johnson, J., Douze, M., Jégou, H.: Billion-scale similarity search with GPUs. arXiv preprint arXiv:1702.08734 (2017)

  7. 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

    Google Scholar 

  8. Zhang, J., Li, J., Khoram, S.: Efficient large-scale approximate nearest neighbor search on OpenCL FPGA, pp. 4924–4932, June 2018

    Google Scholar 

  9. 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)

    Google Scholar 

  10. Chen, Q., Li, D., Tang, C.: KNN matting. In: 2012 IEEE Conference on Computer Vision and Pattern Recognition, pp. 869–876, June 2012

    Google Scholar 

  11. 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

    Google Scholar 

  12. Fukunage, K., Narendra, P.M.: A branch and bound algorithm for computing k-nearest neighbors. IEEE Trans. Comput. 24, 750–753 (1975)

    Article  Google Scholar 

  13. Bentley, J.L.: Multidimensional binary search trees used for associative searching. Commun. ACM 18, 509–517 (1975)

    Article  Google Scholar 

  14. 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)

    Google Scholar 

  15. Sharifzadehand, M., Shahabi, C.: Approximate voronoi cell computation on geometric data streams, March 2019

    Google Scholar 

  16. 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

    Book  Google Scholar 

  17. 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

    Google Scholar 

  18. Chen, Y., Guan, T., Wang, C.: Approximate nearest neighbor search by residual vector quantization. Sensors 10, 11259–11273 (2010)

    Article  Google Scholar 

  19. Xilinx Inc.: SDAccel development environment

    Google Scholar 

  20. 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

    Google Scholar 

  21. 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

    Google Scholar 

Download references

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

Authors

Corresponding author

Correspondence to Dimitrios Danopoulos .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics