## 4 Experiments
### Performance Evaluations on Quantized CNN Architectures  
We quantized the weights of AlexNet, VGGNet-16, and ResNet-18 using a total of three quantizers. The first model uses a uniform quantizer, which sets the uniform quantization step in the range of minimum and maximum values. The second model is a KDE-LM quantizer using probability density function of sampled data. Finally, we tested the performance of KDE-KM quantizer using sampled data from the probability density function of the original weights. The proposed models perform non-uniform quantization by using fewer data to improve efficiency. Tables 1-3 represent bit-width, top-1 and top-5 accuracy, and sampling ratio of each quantized model for each CNN architecture. The reference CNN models in the experiment perform operations with the weights of the 32-bit float type. In comparison, the quantized CNN models in the experiment perform operations with the weights of 4-bits. The experiment was conducted based on 4-bit quantization because existing quantization related studies reported relatively stable quantization up to a 5-bit band-width [26]. First, for the Uniform quantization, it recorded relatively very low accuracy compared to the reference model except for VGGNet-16. It can be seen that the classification is rarely performed correctly, especially for ResNet-18. In contrast, in the case of the proposed KDE-LM and KDE-KM, they maintain competitive performance despite the 4-bit quantization. Given the performance difference between KDE-LM and KDE-KM, KDE-KM generally performs better with quantization. KDE-LM carries out quantization using the probability density function obtained by conducting the kernel density estimation once more on the sampled data, so it seems that more errors are introduced during sampling and estimation. The typical k-means method clusters \(d\)-dimensional data of length \(n\) into \(k\) clusters through \(i\) iterations. Thus, the time complexity of general k-means is \(O(dnki)\). In the weights quantization task, \(k\) and \(d\) do not have much effect on time complexity. As the number of clusters \(k\) is set to \(2^{q}\) where \(q\) is usually 8-bit or less, and each weight is a scalar rather than a vector, the time complexity of \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Model** & **Bit-Width** & **Top-1 Accuracy (\%)** & **Top-5 Accuracy (\%)** & **Sampling Ratio \((\frac{|W_{d}|}{|W_{d}|})\)** \\ \hline Reference & 32 & 56.52 & 79.07 & 1.0 \\ Uniform & 4 & 6.48 & 15.99 & 1.0 \\ KDE-LM & 4 & 41.25 & 66.16 & 0.0013 \\ KDE-KM (ours) & 4 & 47.43 & 72.1 & 0.0013 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Performance comparison of AlexNet architecture. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Model** & **Bit-Width** & **Top-1 Accuracy (\%)** & **Top-5 Accuracy (\%)** & **Sampling Ratio \((\frac{|W_{d}|}{|W_{d}|})\)** \\ \hline Reference & 32 & 71.55 & 90.33 & 1.0 \\ Uniform & 4 & 39.46 & 63.81 & 1.0 \\ KDE-LM & 4 & 66.16 & 86.38 & 0.0012 \\ KDE-KM (ours) & 4 & 67.76 & 88.14 & 0.0012 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Performance comparison of VGGNet-16 architecture. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Model** & **Bit-Width** & **Top-1 Accuracy (\%)** & **Top-5 Accuracy (\%)** & **Sampling Ratio \((\frac{|W_{d}|}{|W_{d}|})\)** \\ \hline Reference & 32 & 69.73 & 89.04 & 1.0 \\ Uniform & 4 & 1.05 & 3.53 & 1.0 \\ KDE-LM & 4 & 58.39 & 81.48 & 0.0154 \\ KDE-KM (ours) & 4 & 61.82 & 83.89 & 0.0154 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Performance comparison of ResNet-18 architecture. quantization using k-means is \(O(ni)\). However, since the typical CNN uses a large number of weights, the value of \(n\) is huge. Applying KDE-KM can greatly reduce the number of weights \(n\) to \(s\) (\(s\ll n\)), so it becomes \(O(si)\), and because the number of iterations \(i\) are also affected by the number of data, the time for the weights quantization can be reduced more than proportional to the sampling ratio.