Abstract
Abstract
k-Nearest Neighbors (k-NN) is one of the most widely used classification algorithms in real-world machine learning applications such as computer vision, speech recognition, and data mining. Massive high-dimensional datasets, reasonable accuracy of results, and adequate response time are regarded as the most challenging aspects of the k-NN implementation, which are exacerbated by the exponential increase in dataset size and the feature dimension of each data point. In this paper, we leverage the parallelism and digit-level pipelining opportunities offered by FPGA devices and Online arithmetic to address such issues for k-NN classification based on two different distance metrics: Manhattan and Euclidean. In these designs, all the necessary operations for measuring distances and sorting are performed on serially arriving data at no or minimal hardware cost. Due to serial computation, the size of the classifier instance and its memory footprint are reduced, leading to more parallel instances for our target devices. Furthermore, we dynamically terminate unnecessary computations upon detection to reduce power consumption, which is possible in more than half of cases on average. The proposed k-NN implementations are the first hardware accelerator designs using Online arithmetic on FPGA effectively. Based on implementation results, our proposed k-NN implementation based on Manhattan (Euclidean) distance provides 1.72x to 2.23x (1.06x to 2.76x) Speedup compared to state-of-the-art designs, while these improvements are 270.79x to 739.51x (167.0x to 725.8x) when compared to implementation on a single core of the ARM Cortex-A9 CPU.
Publisher
Research Square Platform LLC
Reference39 articles.
1. Diagnosis of breast cancer with Stacked autoencoder and Subspace kNN;[Adem20] K;Phys A Stat Mech its Appl,2020
2. [Ahma14] A, Ahmadzadeh et al (2014) “Cost-efficient implementation of k-NN algorithm on multi-core processors,” in 2014 Twelfth ACM/IEEE Conference on Formal Methods and Models for Codesign (MEMOCODE), pp. 205–208, 10.1109/MEMCOD.2014.6961863
3. Semantic-k-NN algorithm: An enhanced version of traditional k-NN algorithm;[Ali20] M;Expert Syst Appl,2020
4. [Almo22] A, Almomany WR, Ayyad, Jarrah A (2022) “Optimized implementation of an improved KNN classification algorithm using Intel FPGA platform: Covid-19 case study,” J. King Saud Univ. - Comput. Inf. Sci., vol. 34, no. 6, pp. 3815–3827, Jun. 10.1016/J.JKSUCI.2022.04.006
5. Signed-Digit Numbe Representations for Fast Parallel Arithmetic;[Avizi61] A;IRE Trans Electron Comput,1961