Skip to main content
QUICK REVIEW

[Paper Review] Improved Bayesian Compression

Marco Federici, Karen Ullrich|arXiv (Cornell University)|Nov 17, 2017
Anomaly Detection Techniques and ApplicationsComputer Science3 references12 citations
TL;DR

This paper proposes a joint Bayesian compression method that combines variational dropout for structured sparsity and soft weight sharing for quantization, achieving state-of-the-art compression ratios—up to 482× on LeNet5 with minimal accuracy drop—by jointly optimizing weight centers and sparsity through a hierarchical prior over weights and their means.

ABSTRACT

Compression of Neural Networks (NN) has become a highly studied topic in recent years. The main reason for this is the demand for industrial scale usage of NNs such as deploying them on mobile devices, storing them efficiently, transmitting them via band-limited channels and most importantly doing inference at scale. In this work, we propose to join the Soft-Weight Sharing and Variational Dropout approaches that show strong results to define a new state-of-the-art in terms of model compression.

Motivation & Objective

  • Address the limitations of existing Bayesian compression methods that either prune weights (variational dropout) or quantize them (soft weight sharing), but not both.
  • Improve model compression by jointly inducing sparsity and enabling efficient quantization through a hierarchical prior over weights and their centers.
  • Achieve higher compression ratios without sacrificing model accuracy by integrating two complementary compression mechanisms within a unified variational inference framework.
  • Enable practical deployment of compressed models on resource-constrained devices by combining pruning, clustering, and entropy coding in a post-training pipeline.

Proposed method

  • Model the posterior over weights $\mathbf{w}$ and their centers $\mathbf{m}$ using a factorized variational posterior $q_{\boldsymbol{\phi}}(\mathbf{w}, \mathbf{m}) = \prod_i q_{\sigma_i}(w_i|m_i) q_{\theta_i}(m_i)$, where $w_i$ is Gaussian around center $m_i$ and $m_i$ is a delta peak.
  • Use a heavy-tailed log-uniform prior $p(w_i) \propto 1/|w_i|$ to induce sparsity in the weights, and a Gaussian Mixture Model (GMM) prior $p_\psi(m_i)$ over centers to enable clustering and quantization.
  • Formulate the variational lower bound $\mathcal{L}(\boldsymbol{\phi}, \boldsymbol{\psi}) = L_\mathcal{D}(\boldsymbol{\phi}) - D_{KL}(q_{\boldsymbol{\phi}}||p_{\boldsymbol{\psi}})$, with the KL divergence decomposed into weight-specific and center-specific components.
  • Approximate the KL divergence between the Gaussian posterior and the heavy-tailed prior using techniques from Molchanov et al. (2017), ensuring training stability.
  • Apply a post-training compression pipeline: (1) cluster weight centers via the learned GMM, (2) prune zero rows/columns, (3) encode using Compressed Sparse Row (CSR), and (4) apply Huffman coding to non-zero weights.
  • Fix one GMM component at zero to enforce sparsity and allow for efficient pruning and encoding.

Experimental results

Research questions

  • RQ1Can combining variational dropout and soft weight sharing in a single Bayesian framework yield better compression ratios than either method alone?
  • RQ2Does the joint optimization of weight centers and sparsity through a hierarchical prior improve model compression without degrading accuracy?
  • RQ3To what extent can the proposed method achieve high compression ratios while preserving model performance on standard vision benchmarks?
  • RQ4How does the integration of GMM-based clustering and Huffman encoding impact the final compression efficiency in post-training compression pipelines?

Key findings

  • The proposed method achieves a compression ratio of 482× on LeNet5 with only a 0.05% drop in test accuracy compared to the original model.
  • On LeNet300-100, the method achieves a 161× compression ratio with 98.24% test accuracy, outperforming both variational dropout (131×) and soft weight sharing (34×).
  • The method maintains high accuracy (99.14%) while reducing non-zero weights to just 0.5% of the total, demonstrating strong sparsity induction.
  • The joint use of GMM-based clustering and Huffman encoding reduces the average bit width per non-zero weight to $k \leq \log K + 1$, significantly improving storage efficiency.
  • The method outperforms both baseline approaches (L2, SWS, VD) in compression ratio across both dense and convolutional architectures, establishing a new SOTA.
  • The post-training pipeline effectively preserves model performance, as the clustering and pruning steps are guided by the learned posterior structure during training.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.