# A Methodology to Design Quantized Deep Neural Networks for Automatic Modulation Recognition
## 5 Analysis and Results
### Stage 4: Selection of the Quantization Level per Layer
Figure 7 shows, in red, the configurations obtained following the methodology described in the previous section. The solutions obtained with the quantizations used in the screening stage are also shown. The figure shows the two best results when the CNN model is quantized following the configuration \(c1=[6,2,3,3,2,6,6,2,4,4]\) and \(c2=[6,2,4,4,2,6,6,2,4,4]\). Configuration \(c1\) has an accuracy of 0.541 and an inference cost of 0.210, while configuration \(c2\) has an accuracy of 0.550 and an inference cost of 0.241, equivalent to 78.9% and 75.8% lower computational inference cost with respect to the non-quantized model. However, the reduction in accuracy is only 1.74% in the former case and 0.06% in the latter compared to the reference model. Therefore, we have shown that by independently quantizing every layer of the model, we can achieve similar performance to the reference model but at much lower computational cost. To verify this result, we compare the modulation classification accuracy of a configuration given by the methodology against the 8- and 10-bit quantized reference model. Since 8-bit quantization values were used as the basis for experimental quantization, we defined a reference model whose values were above any other test settings and could be used as a benchmark. Figure 8 shows the accuracy of the original model (not quantized), the 8- and 10-bit quantized model, and configuration \(c2\). Notice that all the layers are quantized at 8 and 10 bits in their respective versions. As we can see, the accuracy of all models is similar across different SNR values. As expected, the inference cost in Figure 9 is much lower in the quantized models than in the original model. In addition, a significant difference is observed in the solution found by using the methodology proposed in this paper. Figure 7: Configurations obtained following the proposed methodology (in red). The solutions obtained in previous phases are also shown. Notice that by varying \(\alpha_{1}\) and \(\alpha_{2}\), different configurations can be obtained that were not found in the initial experimentation analyzed with the Pareto optimum. ## 6 Conclusions and Future Work

New-generation communications are geared toward coverage, service quality, and greater bandwidth with better use of available resources. In this sense, AI and parallel processing are tools that are called to support this type of task in modern radio systems. However, implementing DL algorithms in hardware is a non-trivial task due to the reduced ability to support large models. This has created a gap between research on intelligent communication algorithms and the implementation of such algorithms in radios. To close this gap, quantization is a technique that reduces the computational cost (e.g., model size in memory, number of operations, among others) of DL models, so that they can be deployed in devices with limited computational resources such as FPGA. However, most of the proposed quantization methods for DL models apply the same quantization level to all the trainable parameters in the model, including inputs, activations, and weights. On the contrary, this article proposes a methodology to analyze the impact on accuracy against the inference cost of a quantized DNN model. Then, depending on the quantization level, a similar accuracy to the non-quantized model can be achieved at a much-reduced inference cost. Furthermore, our findings show that it is convenient

Figure 8: Modulation classification accuracy of the original (unquantized) model and the quantized versions with different SNR values. Figure 9: Comparison of the quantized VGG10 1D-CNN model versus the non-quantized. to quantize the layers independently, as each layer has a different effect on inference cost and accuracy. In this sense, we showed that by independently quantizing the model layers according to the level of compromise in the model's performance, an accuracy close to that obtained with the same model without quantization could be obtained.