Dirichlet Pruning for Neural Network Compression

Kamil Adamczewski, Mijung ParkarXiv 2020

Abstract

We introduce Dirichlet pruning, a novel post-processing technique to transform a large neural network model into a compressed one. Dirichlet pruning is a form of structured pruning that assigns the Dirichlet distribution over each layer's channels in convolutional layers (or neurons in fully-connected layers) and estimates the parameters of the distribution over these units using variational inference. The learned distribution allows us to remove unimportant units, resulting in a compact architecture containing only crucial features for a task at hand. The number of newly introduced Dirichlet parameters is only linear in the number of channels, which allows for rapid training, requiring as little as one epoch to converge. We perform extensive experiments, in particular on larger architectures such as VGG and ResNet (45% and 58% compression rate, respectively) where our method achieves the state-of-the-art compression performance and provides interpretable features as a by-product.

Introduction

Modern deep learning models, while highly effective, are often significantly over-parameterized. Architectures like ResNet and VGG contain millions of parameters, many of which are redundant for specific tasks. This redundancy leads to excessive computational costs and memory requirements. Pruning aims to remove these unnecessary components. Traditional methods often rely on simple heuristics like weight magnitude (L1 or L2 norms), which may not accurately reflect a channel's true utility. We propose a principled probabilistic approach to identify essential computational units—channels in CNNs or neurons in fully connected layers.

Methodology

The core of our approach is the introduction of an importance switch ($s_l$) for each layer.

The importance switch mechanism $s_l$ modulates layer pre-activations to learn channel significance.

The importance switch is a probability vector that multiplies the pre-activations of a layer. We model these switches using a Dirichlet distribution, which naturally enforces that the switches sum to one, thereby learning the relative importance of channels. By adjusting the Dirichlet prior ($\alpha_0$), we can encourage sparsity.

We use variational inference to estimate the posterior distribution of these switches while keeping the original network weights frozen. This process is highly efficient because the number of new parameters scales linearly with the number of channels. The pruning pipeline involves:

  1. Attaching importance switches to a pre-trained model.
  2. Learning switch parameters (often converging in a single epoch).
  3. Ranking and removing channels based on learned importance.
  4. Briefly fine-tuning the remaining weights.

Experimental Setup

We evaluated Dirichlet pruning on standard benchmarks:

  • LeNet-5 on MNIST and FashionMNIST.
  • VGG-16, ResNet-56, and WideResNet-28-10 on CIFAR-10.

Results and Analysis

Our method consistently matches or exceeds the performance of state-of-the-art Bayesian and magnitude-based pruning techniques.

Comparison of Dirichlet pruning (IS) against standard baselines across multiple architectures and datasets.

As shown in the figure above, Dirichlet pruning (labeled as IS for Importance Switch) significantly outperforms traditional L1/L2 norm and Fisher information baselines in identifying the best-performing sub-architectures across various datasets. In a search over 128 different sub-architectures for VGG16, Dirichlet Pruning selected the best-performing architecture over 80% of the time.

Key findings include:

  • Efficiency: The importance learning phase is extremely fast, typically requiring only one epoch to converge.
  • Compression Rates: For VGG-16 on CIFAR-10, we achieved a model with only 0.73M parameters, outperforming methods like Hrank (1.78M parameters) at similar accuracy levels. ResNet-56 was reduced to 0.26M parameters.
  • Interpretability: High-ranked channels correspond to recognizable visual features, while low-ranked ones contain mostly noise.
  • Structural Benefits: By removing entire channels (structured pruning), our method provides tangible hardware speedups and memory savings.

Conclusion

Dirichlet pruning offers a robust and efficient framework for neural network compression. By learning relative channel importance through a probabilistic lens, it achieves high compression rates while maintaining accuracy and providing interpretable insights. Future work will explore automatic cut-off selection using posterior uncertainty and integrating Dirichlet sparsity directly into the initial training phase.

Summary updated

BibTeX
@misc{adamczewski2020dirichlet,
  author = {Kamil Adamczewski and Mijung Park},
  title = {{Dirichlet Pruning for Neural Network Compression}},
  year = {2020},
  eprint = {2011.05985},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2011.05985},
}
Figure