Ps and Qs: Quantization-aware pruning for efficient low latency neural network inference

Benjamin Hawks, Javier Duarte, Nicholas J. Fraser, Alessandro Pappalardo, Nhan Tran +1 more
2/22/2021
cs.LGhep-exphysics.data-an
quantization-pruning

Official code: ben-hawks/pytorch-jet-classify (9 stars, Python, last commit 2023-10-18).

Abstract

Efficient machine learning implementations optimized for inference in hardware have wide-ranging benefits, depending on the application, from lower inference latency to higher data throughput and reduced energy consumption. Two popular techniques for reducing computation in neural networks are pruning, removing insignificant synapses, and quantization, reducing the precision of the calculations.

Show full abstract

In this work, we explore the interplay between pruning and quantization during the training of neural networks for ultra low latency applications targeting high energy physics use cases. Techniques developed for this study have potential applications across many other domains. We study various configurations of pruning during quantization-aware training, which we term quantization-aware pruning, and the effect of techniques like regularization, batch normalization, and different pruning schemes on performance, computational complexity, and information content metrics. We find that quantization-aware pruning yields more computationally efficient models than either pruning or quantization alone for our task. Further, quantization-aware pruning typically performs similar to or better in terms of computational efficiency compared to other neural architecture search techniques like Bayesian optimization. Surprisingly, while networks with different training configurations can have similar performance for the benchmark application, the information content in the network can vary significantly, affecting its generalizability.

View on arXivView PDF

Code Implementations(1)

Pytorch implementation of the HLS4ML 3 Layer Jet Tagging model, including a standard Pytorch (float) and a Quantized (via Xilinx's Brevitas library) implementation. designed for use with the HLS4ML LHC Jet dataset (100 particles): https://zenodo.org/record/3602254

98Python, ShellJun 9, 20203 years ago

Similar Papers

Cite this paper

@article{hawks2021quantizationaware,
  title  = {Ps and Qs: Quantization-aware pruning for efficient low latency neural network inference},
  author = {Benjamin Hawks and Javier Duarte and Nicholas J. Fraser and Alessandro Pappalardo and Nhan Tran and Yaman Umuroglu},
  year   = {2021},
  eprint = {2102.11289},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2102.11289}
}

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/2102.11289.svg)](https://codeofpaper.com/paper/2102.11289)

Discussion