Table of Contents
Fetching ...

Soft Weight-Sharing for Neural Network Compression

Karen Ullrich, Edward Meeds, Max Welling

TL;DR

This paper introduces soft weight-sharing with a learnable Gaussian mixture prior to compress neural networks by inducing weight clustering, enabling simultaneous pruning and quantization. Framed within the minimum description length (MDL) perspective, weights are learned alongside mixture components to balance data fit and model cost, achieving competitive compression without post-hoc pruning steps. Empirically, the method demonstrates strong compression on MNIST models and scales to a light ResNet, while highlighting challenges in hyper-parameter optimization and computational cost. The approach offers a principled path toward on-device CNN compression with potential extensions to richer priors and structured pruning schemes.

Abstract

The success of deep learning in numerous application domains created the de- sire to run and train them on mobile devices. This however, conflicts with their computationally, memory and energy intense nature, leading to a growing interest in compression. Recent work by Han et al. (2015a) propose a pipeline that involves retraining, pruning and quantization of neural network weights, obtaining state-of-the-art compression rates. In this paper, we show that competitive compression rates can be achieved by using a version of soft weight-sharing (Nowlan & Hinton, 1992). Our method achieves both quantization and pruning in one simple (re-)training procedure. This point of view also exposes the relation between compression and the minimum description length (MDL) principle.

Soft Weight-Sharing for Neural Network Compression

TL;DR

This paper introduces soft weight-sharing with a learnable Gaussian mixture prior to compress neural networks by inducing weight clustering, enabling simultaneous pruning and quantization. Framed within the minimum description length (MDL) perspective, weights are learned alongside mixture components to balance data fit and model cost, achieving competitive compression without post-hoc pruning steps. Empirically, the method demonstrates strong compression on MNIST models and scales to a light ResNet, while highlighting challenges in hyper-parameter optimization and computational cost. The approach offers a principled path toward on-device CNN compression with potential extensions to richer priors and structured pruning schemes.

Abstract

The success of deep learning in numerous application domains created the de- sire to run and train them on mobile devices. This however, conflicts with their computationally, memory and energy intense nature, leading to a growing interest in compression. Recent work by Han et al. (2015a) propose a pipeline that involves retraining, pruning and quantization of neural network weights, obtaining state-of-the-art compression rates. In this paper, we show that competitive compression rates can be achieved by using a version of soft weight-sharing (Nowlan & Hinton, 1992). Our method achieves both quantization and pruning in one simple (re-)training procedure. This point of view also exposes the relation between compression and the minimum description length (MDL) principle.

Paper Structure

This paper contains 22 sections, 14 equations, 8 figures, 1 table, 1 algorithm.

Figures (8)

  • Figure 1: On top we show the distribution of a pretrained network. On the right the same distribution after retraining. The change in value of each weight is illustrated by a scatter plot.
  • Figure 2: We show the results of optimizing hyper-parameters with spearmint. Specifically, we plot the accuracy loss of a re-trained network against the compression rate. Each point represents one hyper-parameter setting. The guesses of the optimizer improve over time. We also present the results of other methods for comparison. Left: LeNet-300-100 Right: LeNet-5-Caffe.
  • Figure 3: Illustration of our mixture model compression procedure on LeNet-5-Caffe. Left: Dynamics of Gaussian mixture components during the learning procedure. Initially there are 17 components, including the zero component. During learning components are absorbed into other components, resulting in roughly 6 significant components. Right: A scatter plot of initial versus final weights, along with the Gaussian components' uncertainties. The initial weight distribution is roughly one broad Gaussian, whereas the final weight distribution matches closely the final, learned prior which has become very peaked, resulting in good quantization properties.
  • Figure 4: Illustration of the process described in \ref{['sec:ICstoring']}. IC is represented by relative indexes(diff). If the a relative index is larger than 8$(=2^3)$, A will be filled with an additional zero. Figure from Han2016.
  • Figure 5: Gamma distribution with $\lambda^*= 100$. $\alpha$ and $\beta$ correspond to different choices for the variance of the distribution.
  • ...and 3 more figures