And the Bit Goes Down: Revisiting the Quantization of Neural Networks
Pierre Stock, Armand Joulin, Rémi Gribonval, Benjamin Graham, Hervé Jégou
TL;DR
The paper tackles the memory bottleneck of high-performing ConvNets by introducing an activation-focused Product Quantization approach that minimizes the reconstruction error of layer outputs on in-domain data, using only unlabeled samples. It introduces a weighted k-means procedure to learn codebooks, applies the method sequentially to layers, and employs distillation-based fine-tuning followed by global fine-tuning to prevent error drift. The approach achieves state-of-the-art-like compression for ResNet-50 (semi-supervised) down to 5 MB with ~76% top-1 on ImageNet and extends to Mask R-CNN with substantial compression while maintaining competitive performance. This yields practical, CPU-friendly models with strong accuracy at very small memory footprints, highlighting the method’s potential for on-device deployment and future expansions to more architectures and nonlinearity-aware reconstructions.
Abstract
In this paper, we address the problem of reducing the memory footprint of convolutional network architectures. We introduce a vector quantization method that aims at preserving the quality of the reconstruction of the network outputs rather than its weights. The principle of our approach is that it minimizes the loss reconstruction error for in-domain inputs. Our method only requires a set of unlabelled data at quantization time and allows for efficient inference on CPU by using byte-aligned codebooks to store the compressed weights. We validate our approach by quantizing a high performing ResNet-50 model to a memory size of 5MB (20x compression factor) while preserving a top-1 accuracy of 76.1% on ImageNet object classification and by compressing a Mask R-CNN with a 26x factor.
