Multi-Dimensional Pruning: Joint Channel, Layer and Block Pruning with Latency Constraint

Xinglong Sun, Barath Lakshmanan, Maying Shen, Shiyi Lan, Jingde Chen, José M. ÁlvarezarXiv 2024 · DOI

Abstract

As deep learning models scale to billions of parameters, deploying them on resource-constrained edge devices requires aggressive compression. Traditional pruning methods often focus on a single dimension (e.g., channel pruning) and use simplistic latency models. This paper introduces Multi-Dimensional Pruning (MDP), a framework that jointly optimizes the removal of channels, layers, and entire blocks. By formulating pruning as a Mixed-Integer Nonlinear Program (MINLP) and utilizing a "bilayer" latency model, MDP achieves state-of-the-art accuracy-speed tradeoffs across classification and detection tasks, particularly at high compression ratios.

The Challenge of Edge Deployment

Deploying high-performance neural networks on edge devices—such as mobile phones or autonomous vehicle sensors—is hindered by strict latency and memory constraints. Pruning is the standard remedy, yet existing techniques face two primary limitations:

  1. Limited Optimization Scope: Most methods focus exclusively on channel pruning (reducing layer width). To achieve the 70-90% reduction required for edge hardware, it is often necessary to remove entire layers or residual blocks. Coordinating these removals while fine-tuning channel counts is a complex mathematical challenge.
  2. Inaccurate Latency Modeling: Many "hardware-aware" pruners estimate speed based solely on a layer's output channels. However, pruning a preceding layer changes the number of input channels, which significantly impacts execution time on modern hardware backends.

The Multi-Dimensional Pruning (MDP) Framework

MDP addresses these flaws by treating pruning as a global optimization problem. The framework consists of three core innovations:

  • Bilayer Configuration Latency: Instead of a linear lookup, MDP uses a 2D latency matrix for each layer. This captures the execution time for various combinations of input and output dimensions, providing a much more accurate hardware profile.
  • Block Grouping: To maintain network integrity and gradient flow, MDP groups layers within residual blocks. A binary decision variable determines whether an entire block is retained or pruned, ensuring that skip connections remain functional.
  • MINLP Formulation: The pruning task is reformulated as a Mixed-Integer Nonlinear Program. This allows the system to maximize the "importance" (contribution to accuracy) of the remaining structure while strictly adhering to a hardware latency budget. Unlike iterative methods, MDP identifies the optimal structure in a single pass.
The MDP framework workflow, illustrating the transition from a pretrained model to an optimized subnetwork via MINLP.

Experimental Results

The authors evaluated MDP across three distinct computer vision tasks: ImageNet classification (ResNet-50), 2D object detection (SSD on Pascal VOC), and 3D object detection (StreamPETR on nuScenes).

Key Performance Benchmarks

  • ImageNet (ResNet-50): At an 85% pruning ratio, MDP achieved 70.0% Top-1 accuracy at 5262 FPS. This significantly outperforms the previous state-of-the-art, HALP, which reached 68.6% accuracy at 4101 FPS.
  • 3D Detection (StreamPETR): MDP produced a pruned version of StreamPETR that was both faster (37.3 vs 31.7 FPS) and more accurate (0.451 vs 0.449 mAP) than the original dense baseline.
  • Cross-Hardware Adaptability: On Intel Xeon CPUs, MDP more than doubled the throughput of competing methods while maintaining superior accuracy, demonstrating the robustness of the bilayer latency model.
MDP performance Pareto frontiers for ImageNet classification (left) and nuScenes 3D detection (right), showing significant gains over HALP and other baselines.

Key Insights and Discussion

  • "Pruning to Small" vs. "Starting Small": The research confirms that aggressively pruning a large, high-capacity model (like ResNet-50) yields a better accuracy-speed tradeoff than training a smaller architecture (like ResNet-18) from scratch.
  • Redundancy in Shallow Layers: Interestingly, the optimization process tended to prune more heavily in shallower layers. This challenges the common intuition that deeper layers are the primary candidates for removal due to smaller gradients.
  • Single-Pass Efficiency: By using formal optimization solvers (e.g., Pyomo/MindtPy), MDP finds superior model structures in seconds, whereas traditional iterative methods may require dozens of steps to reach a less optimal configuration.

Limitations and Future Work

While MDP is highly effective, it requires pre-building a latency lookup table for each specific target hardware, which is a one-time but necessary overhead. Future work may involve extending the block-grouping logic to handle attention-head pruning in pure Vision Transformers (ViTs) and scaling the MINLP solvers to accommodate "foundation" models with hundreds of layers.

Summary updated

BibTeX
@misc{sun2024multi,
  author = {Xinglong Sun and Barath Lakshmanan and Maying Shen and Shiyi Lan and Jingde Chen and José M. Álvarez},
  title = {{Multi-Dimensional Pruning: Joint Channel, Layer and Block Pruning with Latency Constraint}},
  year = {2024},
  eprint = {2406.12079},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.12079},
}
Figure