MPDCompress - Matrix Permutation Decomposition Algorithm for Deep Neural Network Compression

Lazar Supic, Rawan Naous, Ranko Sredojevic, Aleksandra Faust, Vladimir StojanovicarXiv 2018

Introduction

Deep Neural Networks (DNNs) have revolutionized fields from computer vision to natural language processing. However, their deployment on "edge" devices—such as mobile phones and autonomous vehicles—is hindered by their massive memory and computational requirements. Traditional compression techniques like pruning often result in "unstructured sparsity," where non-zero weights are scattered randomly. This irregularity creates significant memory overhead on modern hardware like GPUs, which are optimized for dense, block-based computations.

Methodology: Matrix Permutation Decomposition (MPD)

MPDCompress addresses this hardware-software mismatch by "molding" weight matrices into hardware-friendly structures during training. The core of the algorithm is Matrix Permutation Decomposition (MPD).

The process begins with a block-diagonal matrix, which consists of dense "islands" of weights along the diagonal. To ensure information flow across the entire network, the rows and columns of this block-diagonal matrix are randomly permuted to create a binary mask. This mask is then applied to the weights during training, forcing the network to learn only the connections that fit this specific, albeit permuted, structure.

Figure 2: Illustration of how a sparse matrix (a) can be permuted into a block-diagonal form (c) through row and column reordering.

During inference, the process is reversed: the sparse weight matrix is "unshuffled" back into its original dense block-diagonal form. These independent blocks can then be processed in parallel by the GPU, eliminating the need for complex indexing and reducing memory bottlenecks.

Experimental Evaluation

The authors validated MPDCompress across several standard benchmarks:

  • MNIST: Tested on LeNet 300-100 and Deep MNIST architectures.
  • CIFAR10: Evaluated on small-scale color image classification.
  • ImageNet (ILSVRC-2012): Tested on the AlexNet architecture to demonstrate scalability.

Key Results

MPDCompress achieved up to 10x compression on MNIST and CIFAR10, and 8x compression on AlexNet. Remarkably, these compression rates were achieved with less than 1% accuracy loss. For instance, AlexNet's Top-5 accuracy only decreased from 80.1% to 79.6% at 8x compression. Furthermore, the structured nature of the weights enabled a 4x inference speedup on mobile GPUs.

Key Insights

A critical finding of the research is the importance of randomness. While a fixed block-diagonal mask might seem simpler, the authors discovered that randomly permuting the blocks (the "MPD" step) is essential for preserving information flow. In comparative tests, the permuted approach maintained 97% accuracy, whereas a fixed block approach dropped to 80%.

Figure 4: Comparison between a large-scale block-diagonal matrix (e) and its randomly permuted counterpart (f) used as a training mask.

By forcing a block structure, MPDCompress also eliminates the "indexing overhead" typical of sparse matrices. Traditional sparse formats require storing pointers to non-zero values; MPDCompress removes this requirement, saving both memory and compute cycles.

Conclusion and Future Work

MPDCompress offers a practical solution for optimizing fully connected layers, which constitute over 60% of production-side cloud applications. While the current work focuses on these layers and requires longer training times (roughly double the epochs), it paves the way for hardware-software co-optimization in DNN compression. Future research will explore extending these "molding" strategies to other layer types, such as convolutions and attention mechanisms.

Summary updated

BibTeX
@misc{supic2018mpdcompress,
  author = {Lazar Supic and Rawan Naous and Ranko Sredojevic and Aleksandra Faust and Vladimir Stojanovic},
  title = {{MPDCompress - Matrix Permutation Decomposition Algorithm for Deep Neural Network Compression}},
  year = {2018},
  eprint = {1805.12085},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1805.12085},
}
Figure