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

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

TL;DR

Researchers have developed a new layer-adaptive weight pruning method that jointly optimizes the pruning ratios across all layers of a deep neural network (DNN) simultaneously. By discovering that the output distortion caused by pruning individual layers is additive, they transformed a complex, exponential search problem into a simple combinatorial one that can be solved in seconds using dynamic programming.

What Problem Does This Paper Address?

Deep Neural Networks (DNNs) are powerful but notoriously resource-hungry, making them difficult to deploy on mobile or edge devices. Pruning—removing redundant weights—is a standard solution, but not all layers are created equal. Some layers are highly sensitive to weight removal, while others are remarkably robust.

Ideally, we should use layer-adaptive pruning, where each layer gets its own custom pruning ratio. However, finding the "perfect" set of ratios for a network with hundreds of layers is a nightmare: the search space grows exponentially with the number of layers. Previous attempts often simplified the problem by looking at layers in isolation, ignoring how pruning one layer might compound the errors introduced in another.

Methods

The authors propose a joint optimization approach that minimizes the total output distortion (the difference between the original and pruned network's outputs) under a global pruning constraint. Their method hinges on two key components:

  1. The Additivity Property: Through mathematical derivation (using Taylor series expansion) and empirical testing, the authors found that the total distortion of a pruned network is approximately equal to the sum of distortions caused by pruning each layer individually.
  2. Dynamic Programming (DP): Because the total error is simply the sum of layer-wise errors, the pruning problem becomes a classic combinatorial optimization problem. The authors use a DP algorithm to find the global optimal pruning scheme. This reduces the time complexity to linear $O(l \times T^2)$ relative to the number of layers $l$, allowing the optimization to run on a standard CPU in just a few seconds.

To make the process robust, they also introduced "Worst Case Sampling" and "Outlier Filtering" to clean up the noisy rate-distortion curves generated from small calibration datasets.

Datasets

The method was evaluated on two standard computer vision benchmarks:

  • CIFAR-10: Used with ResNet-32, VGG-16, and DenseNet-121 architectures.
  • ImageNet: Used with larger models like VGG-16-BN and ResNet-50.

Key Insights and Ideas

  • Additivity is a Powerful Simplifier: The discovery that layer-wise distortions add up linearly is the "aha" moment of the paper. It allows researchers to move away from expensive heuristic searches (like reinforcement learning or genetic algorithms) toward exact, efficient optimization.

    Figure 1: Empirical evidence showing that the sum of individual layer distortions (x-axis) closely matches the true total distortion (y-axis).
  • Deeper is Better to Prune: The algorithm naturally discovers that deeper layers often contain more redundancy. By pruning these layers more aggressively, the method achieves significantly higher FLOP (floating-point operation) reductions for the same overall parameter count compared to prior methods like LAMP.

    Figure 3: Comparison of layer-wise pruning rates. The proposed method (right) tends to prune deeper layers more heavily than the baseline (left).
  • Data-Free Compatibility: Because the method relies on output distortion rather than specific training labels, it can work even when real data is unavailable by using synthetic "white noise" for calibration, suffering only a minor performance drop.

Key Results

The proposed method consistently outperformed existing state-of-the-art pruning techniques across various models and datasets:

  • Accuracy Gains: On ImageNet, the method achieved up to 4.7% higher top-1 accuracy for VGG-16 and 4.6% higher for ResNet-50 compared to the popular LAMP baseline at similar compression levels.
  • Efficiency: While some layer-adaptive methods require hours of GPU time to find a pruning schedule, this DP approach finds the global optimum in less than 3 seconds on a CPU for a ResNet-50 model.
  • Robustness: The method maintains high accuracy even at extreme pruning ratios (e.g., >95% weights removed), where other methods' performance typically collapses.
Figure 2: Accuracy vs. FLOPs trade-off. The proposed method (green) consistently stays above the baseline (blue), maintaining higher accuracy as more computation is removed.

Limitations and Future Work

  • Taylor Expansion Limits: The additivity property relies on a first-order Taylor approximation. The authors note that as distortion becomes very large (at extremely high sparsity levels), the approximation error begins to inflate, which could lead to sub-optimal results in those edge cases.
  • Unstructured Focus: This work focuses on unstructured weight pruning. While the authors suggest the logic could apply to structured pruning (removing entire channels), they have not yet validated this experimentally.
  • Calibration Sensitivity: While the method is efficient, it still requires a small "calibration set" to generate distortion curves. Future work could explore ways to make the curve generation even more robust to the choice of calibration data.

Summary updated

BibTeX
@inproceedings{xu2023efficient,
  author = {Kaixin Xu and Zhe Wang and Xue Geng and Jie Lin 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