Efficient Joint Optimization of Layer-Adaptive Weight Pruning in Deep Neural Networks

Kaixin Xu, Zhe Wang, Xue Geng, Min Wu, Xiaoli Li, Weisi Lin

Introduction

Deep Neural Networks (DNNs) have achieved state-of-the-art performance across various domains, yet their massive computational and memory requirements make deployment on resource-constrained edge devices challenging. Weight pruning—the removal of redundant parameters—is a primary technique for model compression. However, determining the optimal pruning ratio for each layer (layer-adaptive pruning) remains a significant hurdle. This paper addresses the challenge by introducing a joint optimization framework that leverages a newly discovered mathematical property of network distortion.

The Challenge of Layer-Adaptive Pruning

Existing pruning methods often struggle with two primary issues:

  1. Interdependencies: Many methods treat layers in isolation, failing to account for how pruning one layer affects the error propagation in subsequent layers.
  2. Search Complexity: The search space for finding the optimal pruning ratio per layer grows exponentially with the number of layers. For deep architectures, finding the best configuration becomes computationally prohibitive.

Methodology: Additivity and Dynamic Programming

The authors propose a joint optimization approach built on two pillars: the Additivity Property and Dynamic Programming.

The Additivity Property

Using a first-order Taylor expansion, the authors mathematically prove that the total output distortion of a pruned network is approximately equal to the sum of distortions caused by pruning each layer individually. This discovery is pivotal; it implies that the complex, high-dimensional optimization problem can be decomposed into a series of independent 1D sub-problems. This approximation holds true as long as the perturbations introduced by pruning are relatively small.

Optimization via Dynamic Programming (DP)

Because the total distortion is additive, the pruning problem can be framed as a combinatorial optimization problem similar to the Knapsack Problem. The authors utilize a Dynamic Programming algorithm to find the global optimal pruning scheme. This approach is remarkably efficient, exhibiting linear time complexity relative to the number of layers. This allows the optimization to be performed in seconds on a standard CPU, even for deep models.

Robustness Enhancements

To ensure the optimization is robust against noise, the authors implement:

  • Worst-case sampling: Calculating distortion based on the maximum error within a calibration set.
  • Outlier filtering: Smoothing rate-distortion curves to remove noise that could lead to sub-optimal DP solutions.

Experimental Results

The researchers evaluated their method on standard benchmarks, including CIFAR-10 (ResNet-32, VGG-16, DenseNet-121) and ImageNet (VGG-16 with BatchNorm, ResNet-50).

Accuracy and Efficiency

The proposed method consistently outperformed state-of-the-art techniques such as LAMP and PGMPF:

  • ImageNet Performance: The method achieved up to 4.7% higher Top-1 accuracy for VGG-16 and 4.6% higher for ResNet-50 compared to existing methods at similar pruning levels.
  • CIFAR-10 Performance: It improved Top-1 accuracy by up to 1.0% for ResNet-32.
  • Computational Speed: The optimization process is extremely fast. For a 35-layer ResNet-32, the layer-wise sparsity optimization takes less than 0.5 seconds. For a 54-layer ResNet-50 on ImageNet, it takes approximately 2 seconds.

Key Insights

  • Global vs. Local Optimality: Unlike heuristic-based pruning (e.g., pruning the smallest weights globally), this method mathematically identifies the optimal distribution of sparsity across layers to minimize final output error.
  • Redundancy in Deep Layers: The optimization naturally allocates higher sparsity to deeper layers. Since these layers often contain more channels and features, pruning them yields a greater reduction in FLOPs (floating-point operations) for a lower cost in accuracy.
  • Data-Free Potential: The method maintains high performance even when calibration data is replaced with white noise, suggesting that the rate-distortion curves are primarily a function of the network's architecture rather than the specific data distribution.

Limitations and Future Work

While the method is highly effective, it has limitations. The additivity property relies on a first-order Taylor expansion, which loses accuracy at very high sparsity levels (e.g., >50% per layer). Additionally, this research focuses on unstructured weight pruning. While this achieves high compression ratios, it is less hardware-friendly than structured (channel) pruning. Future work may involve extending this joint optimization framework to structured pruning and investigating better synthetic data generation for entirely data-free compression.

Summary updated

BibTeX
@inproceedings{xu2023efficient,
  author = {Kaixin Xu and Zhe Wang and Xue Geng and Min Wu and Xiaoli Li and Weisi Lin},
  title = {{Efficient Joint Optimization of Layer-Adaptive Weight Pruning in Deep Neural Networks}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2023},
}
Figure