Post-training Quantization for Neural Networks with Provable Guarantees

Jinjie Zhang, Yixuan Zhou, Rayan Saab
1/26/2022
63 citations
cs.LGcs.AIstat.ML
quantization-pruning

Official code: YixuanSeanZhou/Quantized_Neural_Nets (10 stars, Python, last commit 2023-06-02).

Abstract

While neural networks have been remarkably successful in a wide array of applications, implementing them in resource-constrained hardware remains an area of intense research. By replacing the weights of a neural network with quantized (e.g., 4-bit, or binary) counterparts, massive savings in computation cost, memory, and power consumption are attained.

Show full abstract

To that end, we generalize a post-training neural-network quantization method, GPFQ, that is based on a greedy path-following mechanism. Among other things, we propose modifications to promote sparsity of the weights, and rigorously analyze the associated error. Additionally, our error analysis expands the results of previous work on GPFQ to handle general quantization alphabets, showing that for quantizing a single-layer network, the relative square error essentially decays linearly in the number of weights -- i.e., level of over-parametrization. Our result holds across a range of input distributions and for both fully-connected and convolutional architectures thereby also extending previous results. To empirically evaluate the method, we quantize several common architectures with few bits per weight, and test them on ImageNet, showing only minor loss of accuracy compared to unquantized models. We also demonstrate that standard modifications, such as bias correction and mixed precision quantization, further improve accuracy.

View on arXivView PDF

Code Implementations(1)

Code to implement the experiments in "Post-training Quantization for Neural Networks with Provable Guarantees" by Jinjie Zhang, Yixuan Zhou, and Rayan Saab (2022).

102PythonOct 5, 20213 years ago

Similar Papers

Cite this paper

@article{zhang2022posttraining,
  title  = {Post-training Quantization for Neural Networks with Provable Guarantees},
  author = {Jinjie Zhang and Yixuan Zhou and Rayan Saab},
  year   = {2022},
  eprint = {2201.11113},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2201.11113}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2201.11113.svg)](https://codeofpaper.com/paper/2201.11113)

Discussion