[Paper Review] Training Deep Neural Networks with Joint Quantization and Pruning of Weights and Activations
This paper proposes a unified framework for joint quantization and unstructured pruning of both weights and activations in deep neural networks during training. By introducing delayed quantization and saturated quantization, and extending unstructured pruning to activations, the authors demonstrate that the order of pruning and quantization significantly impacts performance—leading to a non-commutativity hypothesis that optimal training schedules vary between discriminative and generative tasks, achieving superior performance per memory footprint compared to state-of-the-art methods.
Quantization and pruning are core techniques used to reduce the inference costs of deep neural networks. State-of-the-art quantization techniques are currently applied to both the weights and activations; however, pruning is most often applied to only the weights of the network. In this work, we jointly apply novel uniform quantization and unstructured pruning methods to both the weights and activations of deep neural networks during training. Using our methods, we empirically evaluate the currently accepted prune-then-quantize paradigm across a wide range of computer vision tasks and observe a non-commutative nature when applied to both the weights and activations of deep neural networks. Informed by these observations, we articulate the non-commutativity hypothesis: for a given deep neural network being trained for a specific task, there exists an exact training schedule in which quantization and pruning can be introduced to optimize network performance. We identify that this optimal ordering not only exists, but also varies across discriminative and generative tasks. Using the optimal training schedule within our training framework, we demonstrate increased performance per memory footprint over existing solutions.
Motivation & Objective
- To address the gap in joint optimization of quantization and pruning across both weights and activations in deep neural networks.
- To investigate whether the order of applying pruning and quantization affects model performance, challenging the default 'prune-then-quantize' paradigm.
- To evaluate the framework across both discriminative and generative computer vision tasks, which is uncommon in prior work.
- To develop novel quantization techniques—delayed quantization and saturated quantization—that improve training stability and reduce sensitivity to initialization.
- To extend unstructured pruning to the activation space and empirically evaluate its impact, which to the authors' knowledge is the first such comprehensive study.
Proposed method
- Proposes a novel training framework that applies uniform quantization and unstructured pruning to both weights and activations during backpropagation.
- Introduces 'delayed quantization'—postponing the use of the straight-through estimator (STE) to later training epochs to reduce sensitivity to weight initialization.
- Introduces 'saturated quantization'—clipping activation distributions using quantiles during training to mitigate long-tailed distributions and outlier effects.
- Extends Zhu and Gupta's (2017) unstructured weight pruning method to the activation space, enabling pruning of individual activation values.
- Employs a flexible training schedule that allows evaluation of both 'prune-then-quantize' and 'quantize-then-prune' orders.
- Uses a unified framework to directly control target bitwidth and sparsity for both weights and activations, enabling precise compression under hardware constraints.
Experimental results
Research questions
- RQ1Does the order of applying pruning and quantization affect the performance of deep neural networks when both are applied to weights and activations?
- RQ2How does joint quantization and pruning of activations compare to traditional methods that only prune weights?
- RQ3Is there a non-commutative relationship between pruning and quantization when applied to both weights and activations in DNNs?
- RQ4Does the optimal training schedule (prune-then-quantize vs. quantize-then-prune) differ between discriminative and generative tasks?
- RQ5Can the proposed framework achieve better performance per memory footprint than existing state-of-the-art compression techniques?
Key findings
- The optimal training schedule for joint quantization and pruning is not commutative: performance depends on the order in which pruning and quantization are applied.
- For discriminative tasks such as image classification on CIFAR10, the 'prune-then-quantize' schedule yields superior performance per memory footprint.
- For generative tasks such as image-to-image translation using GANs, the 'quantize-then-prune' schedule outperforms the standard paradigm.
- The proposed framework achieves the highest performance density (PD) among existing methods on CIFAR10, with the smallest memory footprint and best accuracy under compression constraints.
- Saturated quantization effectively reduces the impact of long-tailed activation distributions, improving training stability in GANs.
- Extending unstructured pruning to activations significantly improves performance per memory footprint, especially in resource-constrained inference scenarios.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.