Introduction
The deployment of deep neural networks on resource-constrained "edge" devices, such as mobile phones and embedded sensors, is often hindered by significant storage requirements. While standard quantization techniques (e.g., converting 32-bit floats to 8-bit integers) improve inference speed, they do not necessarily minimize the final file size. To achieve maximum compression, entropy coding—which assigns shorter bit-strings to more frequent values—is required. However, traditional methods often decouple quantization from entropy coding, leading to sub-optimal results. This paper introduces CERWU (Compression with Entropy-Regularized Weight Updates), a framework that treats compression as a joint optimization problem to minimize both prediction error and bit-rate simultaneously.
Methodology: The CERWU Framework
CERWU integrates a rate-estimation term directly into the weight-update process. The core of the approach is a modified Rate-Distortion Objective:
$$L = Error + \lambda \cdot Bitrate$$
The parameter $\lambda$ serves as a Lagrange multiplier, allowing for a flexible trade-off between model accuracy and compressed file size.
Quadratic Rate Estimation and OBS
Calculating the exact bitrate during optimization is computationally difficult. CERWU addresses this by approximating the bitrate with a quadratic function. This approximation allows the framework to leverage the Optimal Brain Surgeon (OBS) algorithm. In standard OBS, when a weight is quantized, the remaining weights are "nudged" to compensate for the error. CERWU's "Entropy-Regularized OBS" ensures these updates not only minimize distortion but also maintain a weight distribution that is highly compressible.
Implementation Details
The framework utilizes DeepCABAC, a state-of-the-art entropy model, for final bit-packing. To maintain stability during high compression ratios, the authors introduce a regularization term ($\lambda\gamma I$) to the Hessian matrix, preventing weight updates from becoming excessively large.
Experimental Evaluation
The researchers evaluated CERWU across a variety of computer vision benchmarks, focusing on Top-1 accuracy versus "Bits Per Weight" (bpw).
Datasets and Architectures
- CIFAR-10: Evaluated on ResNet-18, ResNet-34, and ResNet-50.
- ImageNet: A broader evaluation including ResNet (18 to 152), VGG16, and MobileNetv3 (Small and Large).
- Pythia-70M: Preliminary tests on a small language model to assess generalizability beyond vision tasks.
Key Results
CERWU consistently outperforms industry standards, including NNCodec (the reference for ISO/IEC 15938-17).
As shown in the figures, CERWU achieves significantly lower bitrates for the same level of accuracy compared to baselines. Key findings include:
- 20–40% Size Reduction: At equivalent accuracy levels, CERWU-compressed models are 20–40% smaller than those produced by NNCodec.
- High Fidelity at Low Bitrates: Most ResNet models maintain over 99% of their original accuracy even when compressed to fewer than 2 bits per weight.
- Efficiency: While the encoding phase requires Hessian calculations (taking a few minutes), decoding is rapid (0.2 to 1.2 seconds), making it suitable for real-world application updates.
Discussion and Future Work
A significant advantage of CERWU is its support for fractional bits. Because it relies on entropy coding rather than fixed-width quantization, weights can effectively occupy non-integer bit widths (e.g., 0.7 bits), allowing for a much smoother Pareto frontier between size and performance.
However, some limitations remain. The current focus is primarily on convolutional neural networks. Extending CERWU to massive Large Language Models (LLMs) may require specialized handling of "outlier" features—channels with extremely high activation values—which are common in Transformers but not explicitly addressed in the current framework. Additionally, the grid search for optimal quantization parameters is computationally intensive for very large-scale models.
Conclusion
CERWU represents a significant step forward in post-training compression. By anticipating the behavior of the entropy coder during the weight-update phase, it achieves state-of-the-art storage efficiency without sacrificing the predictive power of modern neural networks.
Summary updated