[Paper Review] Neural Network Compression using Transform Coding and Clustering
This paper proposes a neural network compression codec that uses transform coding (2D DCT + uniform quantization) for convolutional and dense layer weights and clustering for biases and normalization parameters. The method achieves average compression factors of 7.9–9.3 with only 1%–2% accuracy drop on image classification tasks, enabling efficient deployment on mobile and embedded devices without retraining.
With the deployment of neural networks on mobile devices and the necessity of transmitting neural networks over limited or expensive channels, the file size of the trained model was identified as bottleneck. In this paper, we propose a codec for the compression of neural networks which is based on transform coding for convolutional and dense layers and on clustering for biases and normalizations. By using this codec, we achieve average compression factors between 7.9-9.3 while the accuracy of the compressed networks for image classification decreases only by 1%-2%, respectively.
Motivation & Objective
- Address the growing challenge of large neural network model sizes in mobile and embedded systems with limited storage and bandwidth.
- Develop a compression codec that maintains high accuracy while achieving high compression ratios without requiring retraining or architectural changes.
- Enable efficient transmission and storage of pre-trained models on resource-constrained devices.
- Design a codec with low decoding complexity suitable for real-time inference on edge devices.
Proposed method
- Apply two-dimensional discrete cosine transform (2D DCT) to convolutional and dense layer weights, followed by uniform quantization with fixed bit depth per coefficient.
- Use clustering (k-means) with a codebook of size 2^n to compress bias and normalization parameters, with the codebook transmitted as side information.
- Pre-scale all weights and parameters to maximize dynamic range usage before quantization or clustering.
- Apply the codec layer-wise and independently, enabling partial re-encoding and parallel processing.
- Use entropy coding (e.g., Huffman) on quantized coefficients and cluster indices to further compress the bitstream.
- Ensure compatibility with existing models by avoiding any retraining or architectural modifications.
Experimental results
Research questions
- RQ1Can transform coding combined with clustering achieve high compression ratios for neural network weights without significant accuracy loss?
- RQ2How do transform coding and clustering individually and jointly contribute to compression efficiency in neural networks?
- RQ3What is the computational complexity of the proposed codec, especially at the decoder, for real-time deployment?
- RQ4Can the codec effectively compress even memory-optimized networks like SqueezeNet, which already have few parameters?
Key findings
- The complete codec pipeline achieves average compression factors of 7.9 and 9.3 for 1% and 2% accuracy degradation, respectively, on image classification tasks.
- On AlexNet, which has a high proportion of dense layer weights, the method achieves compression factors of 8–9, primarily due to entropy coding gains after quantization.
- Even for SqueezeNet, a memory-optimized network with only 2% of AlexNet’s parameters, the codec achieves compression factors above 5 without significant accuracy loss.
- The encoder and decoder run times are acceptable (29s and 7.6s on average for GoogLeNet), with minimal overhead compared to pure quantization, making it suitable for on-device deployment.
- The combination of transform coding and clustering provides additive coding gains, as shown by superior performance of the full pipeline over partial subsets in RD curves.
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.