RANP: Resource Aware Neuron Pruning at Initialization for 3D CNNs

Zhiwei Xu, Thalaiyasingam Ajanthan, Vibhav Vineet, Richard I. Hartley · DOI

TL;DR

This paper introduces RANP, a novel method for pruning 3D Convolutional Neural Networks (CNNs) at initialization. RANP significantly reduces the computational and memory demands of training these networks, making them more accessible and efficient, while maintaining high accuracy.

What Problem Does This Paper Address?

3D CNNs are crucial for tasks like medical imaging and video analysis, but they are notoriously resource-intensive, requiring substantial memory and computational power for training. Existing pruning techniques, often designed for 2D CNNs, are not well-suited for the unique challenges of 3D CNNs, particularly the high training costs. This limits the application of 3D CNNs on resource-constrained devices and hinders the development of larger, more complex models. The paper aims to bridge this gap by developing an efficient pruning strategy specifically for 3D CNNs that tackles training resource requirements.

Methods

The core of RANP is a two-pronged approach:

  • Neuron Importance at Initialization: Inspired by SNIP (Single-shot Network Pruning), RANP first identifies "important" neurons by analyzing their sensitivity to the loss function during initialization. This is done by calculating gradients of the loss with respect to neuron masks. Two methods are proposed: Magnitude of Parameter Mask Gradients (MPMG) and Magnitude of Neuron Mask Gradients (MNMG).
  • Resource-Aware Reweighting: To further optimize for computational resources, RANP introduces a reweighting scheme. It first balances the neuron importance across layers to prevent the complete pruning of entire layers. Then, it reweights this importance based on the actual resource consumption (FLOPs or memory) of each neuron. This ensures that neurons contributing more to resource usage are more heavily considered for pruning.

The algorithm prunes neurons at initialization, creating a leaner network that can then be trained efficiently.

Datasets

The paper evaluates RANP on the following datasets:

  • ShapeNet: A large-scale 3D sparse point-cloud dataset for semantic segmentation.
  • BraTS'18: A dense medical imaging dataset of brain MRI sequences for semantic segmentation.
  • UCF101: A video dataset for action recognition, where 2D spatial and temporal dimensions are treated as dense 3D inputs.

Key Insights and Ideas

  • Pruning at Initialization is Key for Training Efficiency: Unlike many pruning methods that focus on test-time reduction, RANP's initialization-based approach directly tackles the high training costs of 3D CNNs.
  • Neuron Pruning Outperforms Parameter Pruning for Resource Reduction: For 3D CNNs, removing entire neurons and their associated connections offers significantly greater reductions in FLOPs and memory compared to simply sparsifying individual parameters.
  • Resource-Aware Reweighting is Crucial for Balanced Pruning: Simply relying on neuron importance can lead to imbalanced pruning across layers, potentially making networks infeasible. RANP's reweighting scheme ensures a more uniform distribution of pruning, preventing the complete removal of critical layers.
  • RANP Enables Lightweight and Scalable 3D CNN Training: The significant reduction in computational resources allows for training deeper 3D CNNs on single GPUs and with larger batch sizes, leading to improved accuracy and faster convergence.
  • High Transferability: Pruned models can be effectively transferred to different datasets, demonstrating the robustness of the RANP approach.

Key Results

RANP achieves remarkable resource reductions with negligible accuracy loss:

  • FLOPs Reduction: Approximately 50%-95% reduction.
  • Memory Reduction: Approximately 35%-80% reduction.
  • Accuracy: Negligible loss compared to unpruned networks.
  • Specific examples: On ShapeNet, RANP-f achieved a 96.8% FLOPs reduction and 95.3% parameter reduction. For BraTS'18, it achieved a 96.5% FLOPs reduction and 80% memory reduction.
  • Lightweight Training: RANP enabled training a 23-layer 3D-UNet on a single GPU with 80% neuron sparsity, reducing GFLOPs by ~35x and memory by ~3.9x.
  • Faster Convergence: RANP-f demonstrated faster loss convergence and training time compared to full networks when using increased batch sizes.

Limitations and Future Work

  • Initialization Choice: While Glorot initialization is found to be effective, the paper notes that orthogonal initialization, while beneficial for 2D parameter pruning, does not yield the same advantages for 3D neuron pruning.
  • Hyperparameter Tuning: The coefficient $\lambda$ in the reweighting scheme needs to be tuned.
  • Future Work: The paper suggests that the pruned networks obtained by RANP can be easily scaled up and transferred to other datasets for training, hinting at future applications in transfer learning and multi-task learning. The effectiveness of RANP on other 3D architectures and tasks could also be explored.

Summary updated

BibTeX
@inproceedings{xu2020ranp,
  author = {Zhiwei Xu and Thalaiyasingam Ajanthan and Vibhav Vineet and Richard I. Hartley},
  title = {{RANP: Resource Aware Neuron Pruning at Initialization for 3D CNNs}},
  booktitle = {3DV},
  year = {2020},
  doi = {10.1109/3dv50981.2020.00028},
}
Figure