Post Training Mixed Precision Quantization of Neural Networks Using First-Order Information

Abstract

Quantization is an efficient way of downsizing both memory footprints and inference time of large size Deep Neural Networks (DNNs) and makes their application feasible on resource-constrained devices. However, quantizing all layers uniformly with ultra-low precision bits results in significant degradation in performance. A promising approach to address this problem is mixed-precision quantization where higher bit precisions are assigned to layers that are more sensitive. In this study, we introduce the method that uses first-order information (i.e. gradient) only for determining the neural network layers’ sensitivity for mixed-precision quantization and shows that the proposed method is equally effective in performance and better in computation complexity with its counterpart methods which use second order information (i.e. hessian). Finally, we formulate the mixed precision problem as an Integer linear programming problem which uses proposed sensitivity metric and allocate the number of bits for each layer efficiently for a given model size. Furthermore, we only use post training quantization techniques to achieve the state of the art results in comparison to the popular methods for mixed precision quantization which fine-tunes the model with large training data. Extensive experiments conducted on benchmark vision neural network architectures using ImageNet dataset demonstrates the superiority over existing mixed-precision approaches. Our proposed method achieves better or comparable results for ResNet18 (0.65% accuracy-drop, for 8× weight compression), ResNet50 (0.69% accuracy-drop, for 8× weight compression), MobileNet-V2 (0.49% accuracy-drop, for 8× weight compression) and Inception-V3 (1.30% accuracy-drop, for 8× weight compression), compared to other state-of-the-art methods which requires retraining or uses hessian as a sensitivity metric for mixed precision quantization.

Cite

Text

Chauhan et al. "Post Training Mixed Precision Quantization of Neural Networks Using First-Order Information." IEEE/CVF International Conference on Computer Vision Workshops, 2023. doi:10.1109/ICCVW60793.2023.00144

Markdown

[Chauhan et al. "Post Training Mixed Precision Quantization of Neural Networks Using First-Order Information." IEEE/CVF International Conference on Computer Vision Workshops, 2023.](https://mlanthology.org/iccvw/2023/chauhan2023iccvw-post/) doi:10.1109/ICCVW60793.2023.00144

BibTeX

@inproceedings{chauhan2023iccvw-post,
  title     = {{Post Training Mixed Precision Quantization of Neural Networks Using First-Order Information}},
  author    = {Chauhan, Arun and Tiwari, Utsav and Vikram, N. R},
  booktitle = {IEEE/CVF International Conference on Computer Vision Workshops},
  year      = {2023},
  pages     = {1335-1344},
  doi       = {10.1109/ICCVW60793.2023.00144},
  url       = {https://mlanthology.org/iccvw/2023/chauhan2023iccvw-post/}
}