Model Compression versus Accuracy: Assessing Quantized CNNs on Embedded Hardware

Authors

  • Ron Mochlichen School of Computing, Clemson University, Clemson, SC, USA. Author
  • Chaman Prashad Department of Computer Science, University of Alabama at Birmingham, Birmingham, AL, USA. Author

Keywords:

quantized convolutional neural networks; model compression; embedded hardware; quantization error; Pareto analysis; mixed-precision inference

Abstract

Quantized convolutional neural networks (CNNs) are central to embedded vision because they reduce memory traffic and energy relative to floating-point inference, yet compression claims are frequently evaluated with accuracy drops that are not comparable across quantization schemes or hardware targets. This manuscript develops an analytical assessment framework that separates numerical quantization error from system-level cost and links both to deployment decisions. The framework models affine quantization, dequantization, second-order loss perturbation, rounding noise, and activation clipping, then combines these error terms with an embedded hardware cost model that includes multiply-accumulate energy, memory access energy, and static overhead. A constrained accuracy-hardware objective and a layer-wise bit-allocation formulation make explicit the trade-off between task loss and representational cost. The central argument is that weight quantization, activation quantization, and hardware savings obey different mechanisms: weights perturb an approximately fixed function, activations change dynamically with input distributions, and hardware benefit depends on dataflow, packing, and utilization rather than bit-width alone. Consequently, per-channel weight quantization with per-tensor activation quantization and calibration is often a defensible baseline, while mixed precision should be allocated by measured or derivable layer sensitivity under an explicit hardware budget. The framework also identifies failure modes such as clipping of activation outliers, accumulation error, and accuracy recovery that masks hardware inefficiency. It yields a reproducible protocol for reporting quantization configurations, error sources, and Pareto trade-offs before embedded deployment, without substituting for target-hardware measurement.

References

1. LeCun, Y., Bengio, Y., & Hinton, G. (2015). Deep learning. Nature, 521(7553), 436–444.

2. Sze, V., Chen, Y.-H., Yang, T.-J., & Emer, J. S. (2017). Efficient processing of deep neural networks: A tutorial and survey. Proceedings of the IEEE, 105(12), 2295–2329.

3. Chen, Y.-H., Krishna, T., Emer, J. S., & Sze, V. (2017). Eyeriss: An energy-efficient reconfigurable accelerator for deep convolutional neural networks. IEEE Journal of Solid-State Circuits, 52(1), 127–138.

4. Han, S., Mao, H., & Dally, W. J. (2016). Deep compression: Compressing deep neural networks with pruning, trained quantization and Huffman coding. In Proceedings of the International Conference on Learning Representations.

5. Jacob, B., Kligys, S., Chen, B., Zhu, M., Tang, M., Howard, A., Adam, H., & Kalenichenko, D. (2018). Quantization and training of neural networks for efficient integer-arithmetic-only inference. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (pp. 2704–2713).

6. Krishnamoorthi, R. (2018). Quantizing deep convolutional networks for efficient inference: A whitepaper. arXiv preprint arXiv:1806.08342.

7. Choi, J., Wang, Z., Venkataramani, S., Chuang, P. I.-J., Srinivasan, V., & Gopalakrishnan, K. (2018). PACT: Parameterized clipping activation for quantized neural networks. arXiv preprint arXiv:1805.06085.

8. Esser, S. K., McKinstry, J. L., Bablani, D., Appuswamy, R., & Modha, D. S. (2020). Learned step size quantization. In Proceedings of the International Conference on Learning Representations.

9. Nagel, M., van Baalen, M., Blankevoort, T., & Welling, M. (2020). Up or down? Adaptive rounding for post-training quantization. In Proceedings of the International Conference on Machine Learning (pp. 7197–7206).

10. Gong, C., Shen, L., Zhang, F., Liu, T., & Tao, D. (2019). Loss-aware quantization for deep networks. In Proceedings of the International Conference on Learning Representations.

11. Courbariaux, M., Hubara, I., Soudry, D., El-Yaniv, R., & Bengio, Y. (2016). Binarized neural networks: Training deep neural networks with weights and activations constrained to +1 or -1. arXiv preprint arXiv:1602.02830.

12. Rastegari, M., Ordonez, V., Redmon, J., & Farhadi, A. (2016). XNOR-Net: ImageNet classification using binary convolutional neural networks. In Proceedings of the European Conference on Computer Vision (pp. 525–542).

13. Zhu, C., Han, S., Mao, H., & Dally, W. J. (2017). Trained ternary quantization. In Proceedings of the International Conference on Learning Representations.

14. Hubara, I., Courbariaux, M., Soudry, D., El-Yaniv, R., & Bengio, Y. (2018). Quantized neural networks: Training neural networks with low precision weights and activations. Journal of Machine Learning Research, 18(187), 1–30.

15. Howard, A. G., Zhu, M., Chen, B., Kalenichenko, D., Wang, W., Weyand, T., Andreetto, M., & Adam, H. (2017). MobileNets: Efficient convolutional neural networks for mobile vision applications. arXiv preprint arXiv:1704.04861.

16. Sandler, M., Howard, A., Zhu, M., Zhmoginov, A., & Chen, L.-C. (2018). MobileNetV2: Inverted residuals and linear bottlenecks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (pp. 4510–4520).

17. Zhang, X., Zhou, X., Lin, M., & Sun, J. (2018). ShuffleNet: An extremely efficient convolutional neural network for mobile devices. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (pp. 6848–6856).

18. Han, S., Pool, J., Tran, J., & Dally, W. J. (2015). Learning both weights and connections for efficient neural networks. In Advances in Neural Information Processing Systems (pp. 1135–1143).

19. Dong, Z., Yao, Z., Gholami, A., Mahoney, M. W., & Keutzer, K. (2019). HAWQ: Hessian aware quantization of neural networks with mixed-precision. In Proceedings of the IEEE International Conference on Computer Vision (pp. 293–302).

20. Wang, K., Liu, Z., Lin, Y., Lin, J., & Han, S. (2019). HAQ: Hardware-aware automated quantization with mixed precision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (pp. 8612–8620).

Downloads

Published

2022-01-07