A simple approach for quantizing neural networks

被引:7
作者
Maly, Johannes [1 ,2 ]
Saab, Rayan [3 ]
机构
[1] Ludwig Maximilians Univ Munchen, Dept Math, Munich, Germany
[2] Munich Ctr Machine Learning MCML, Munich, Germany
[3] Univ Calif San Diego, Halicioglu Data Sci Inst, Dept Math, San Diego, CA USA
基金
美国国家科学基金会;
关键词
Memoryless quantization; Neural networks; Ressource efficient deep learning;
D O I
10.1016/j.acha.2023.04.004
中图分类号
O29 [应用数学];
学科分类号
070104 ;
摘要
In this short note, we propose a new method for quantizing the weights of a fully trained neural network. A simple deterministic pre-processing step allows us to quantize network layers via memoryless scalar quantization while preserving the network performance on given training data. On one hand, the computational complexity of this pre-processing slightly exceeds that of state-of-the-art algorithms in the literature. On the other hand, our approach does not require any hyperparameter tuning and, in contrast to previous methods, allows a plain analysis. We provide rigorous theoretical guarantees in the case of quantizing single network layers and show that the relative error decays with the number of parameters in the network if the training data behave well, e.g., if it is sampled from suitable random distributions. The developed method also readily allows the quantization of deep networks by consecutive application to single layers. (c) 2023 Elsevier Inc. All rights reserved.
引用
收藏
页码:138 / 150
页数:13
相关论文
共 18 条
[1]  
Banner R, 2019, ADV NEUR IN, V32
[2]   Low-bit Quantization of Neural Networks for Efficient Inference [J].
Choukroun, Yoni ;
Kravchik, Eli ;
Yang, Fan ;
Kisilev, Pavel .
2019 IEEE/CVF INTERNATIONAL CONFERENCE ON COMPUTER VISION WORKSHOPS (ICCVW), 2019, :3009-3018
[3]   Model Compression and Hardware Acceleration for Neural Networks: A Comprehensive Survey [J].
Deng, Lei ;
Li, Guoqi ;
Han, Song ;
Shi, Luping ;
Xie, Yuan .
PROCEEDINGS OF THE IEEE, 2020, 108 (04) :485-532
[4]  
Gholami A., 2021, CoRR abs/2103.13630
[5]  
Goodfellow I, 2016, ADAPT COMPUT MACH LE, P1
[6]  
Gunturk C. S., 2021, arXiv
[7]  
Guo YH, 2018, Arxiv, DOI arXiv:1808.04752
[8]  
Krishnamoorthi R, 2018, Arxiv, DOI arXiv:1806.08342
[9]   Deep learning [J].
LeCun, Yann ;
Bengio, Yoshua ;
Hinton, Geoffrey .
NATURE, 2015, 521 (7553) :436-444
[10]  
Li YH, 2021, Arxiv, DOI arXiv:2102.05426