Efficient Micro-Structured Weight Unification and Pruning for Neural Network Compression

Sheng Lin, Wei Jiang, Wei Wang, Kaidi Xu, Yanzhi Wang, Shan Liu, Songnan LiarXiv 2021

Introduction

Deep Neural Networks (DNNs) have revolutionized fields from computer vision to natural language processing, but their deployment on resource-constrained edge devices remains a significant challenge. Traditional compression techniques often face a trade-off between hardware efficiency and model accuracy. Unstructured pruning, while capable of high compression, results in irregular sparse matrices that standard CPUs and GPUs cannot accelerate effectively. Conversely, structured pruning (removing entire filters or rows) is hardware-friendly but often leads to significant accuracy degradation due to its coarse nature.

This paper proposes a middle ground: Micro-Structured Weight Unification (MWU) and Micro-Structured Weight Pruning (MWP). These techniques leverage fine-grained blocks to maintain model capacity while ensuring the regularity required for hardware acceleration.

Methodology: Unification and Pruning

The core innovation lies in the division of weight matrices into small, uniform blocks (e.g., $2 \times 2$ or $4 \times 1$).

Micro-Structured Weight Unification (MWU)

In MWU, weights within a block are forced to share the same absolute value, known as the "unified coefficient." While the magnitude is shared, each weight retains its original sign. This approach simplifies the weight matrix significantly without physically removing connections, preserving the network's representational power better than traditional pruning.

Micro-Structured Weight Pruning (MWP)

MWP is treated as a special case of unification where the unified coefficient is set to zero. This allows for a hybrid framework where less critical parts of the network are pruned entirely, while others are unified to save storage space.

Comparison of unstructured weight matrices with micro-structured pruning and unification.

ADMM-Based Training

Because forcing weights to be identical or zero represents a non-convex constraint that standard gradient descent cannot handle, the authors utilize the Alternating Direction Method of Multipliers (ADMM). This mathematical framework decomposes the complex optimization problem into smaller sub-problems, allowing the model to iteratively learn the optimal unified coefficients and signs during the training process.

Hardware-Algorithm Co-design

The choice of block shapes is not arbitrary; it is designed to align with General Matrix Multiplication (GEMM) operations in modern hardware. By using unified blocks, the computational complexity of inference is drastically reduced.

For a $2 \times 2$ unified block, the hardware can perform four additions and only one multiplication, rather than four separate multiplications. Since multiplications are significantly more resource-intensive than additions, this "micro-structure" enables real-world speedups on specialized hardware kernels.

The $2 \times 2$ block matrix multiplication process showing how weight unification reduces computational overhead.

Key Results and Insights

The proposed framework was evaluated on benchmark datasets including ImageNet, CIFAR-100, and DCASE audio classification.

  • ResNet-50 (ImageNet): The method achieved a $3.59\times$ compression ratio with a negligible 0.96% drop in Top-5 accuracy, significantly outperforming standard structured pruning at similar compression levels.
  • MobileNet-V2: Even on this already-optimized architecture, MWU achieved a $2.41\times$ compression with a 2.96% Top-5 accuracy loss, proving more effective than its micro-structured pruning counterpart.
  • Regularization Effect: On the DCASE audio task, the compression actually improved baseline accuracy while providing a $5.70\times$ compression ratio, suggesting that the unification process can act as a form of regularization.

Conclusion

Micro-Structured Weight Unification and Pruning offer a promising path forward for efficient DNN deployment. By treating pruning as a subset of unification and designing block structures for hardware compatibility, this approach achieves high compression ratios with minimal impact on accuracy. Future work will focus on automating the selection of block shapes and layer-specific compression ratios to further optimize performance across diverse architectures.

Summary updated

BibTeX
@misc{lin2021efficient,
  author = {Sheng Lin and Wei Jiang and Wei Wang and Kaidi Xu and Yanzhi Wang and Shan Liu and Songnan Li},
  title = {{Efficient Micro-Structured Weight Unification and Pruning for Neural Network Compression}},
  year = {2021},
  eprint = {2106.08301},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2106.08301},
}
Figure