L2PF - Learning to Prune Faster

Manoj Rohit Vemparala, Nael Fasfous, Alexander Frickenstein, Mhd Ali Moraly, Aquib Jamal, Lukas Frickenstein, Christian Unger, Naveen Shankar Nagaraja, Walter Stechele

TL;DR

L2PF is a reinforcement learning framework that automates CNN pruning by simultaneously learning which filters to remove and how much fine-tuning time is actually needed. By making the search process "time-aware," it achieves a 3.84x compression ratio on ResNet-20 with minimal accuracy loss, while slashing the required GPU hours by 1.71x compared to prior state-of-the-art methods.

What Problem Does This Paper Address?

Deep Neural Networks (DNNs) are the backbone of autonomous driving, but their massive size makes them difficult to deploy on the constrained embedded hardware found in vehicles. Pruning—the process of removing redundant weights or filters—is a standard solution to shrink these models.

However, traditional pruning is a double-edged sword. While it reduces model size, the process of finding the optimal "pruning strategy" (which parts to cut) and then "healing" the model through fine-tuning is incredibly computationally expensive. Most automated pruning tools treat the number of fine-tuning epochs as a fixed hyperparameter. This leads to a massive waste of GPU hours, as some layers might need very little retraining while others need more. L2PF aims to bridge this gap by making the pruning agent aware of the computational cost of its decisions.

Methods

The authors propose a multi-task reinforcement learning (RL) agent that interacts with the CNN environment in a "try-and-learn" loop.

Fig. 1: The L2PF architecture showing the interaction between the Pruning Agent and the CNN Environment.

Key components of their approach include:

  • Dual Action Space: Unlike previous agents that only decide what to prune, the L2PF agent outputs two types of actions:
  • Discrete Pruning Action ($A_{prune}$): Uses Bernoulli stochastic units to decide, filter-by-filter, whether to "keep" or "prune."
    1. Continuous Retraining Action ($A_{retrain}$): Uses a Normal distribution to determine the optimal number of fine-tuning epochs for that specific pruning step.
  • Multi-objective Reward: The agent is rewarded for achieving high sparsity and maintaining accuracy, but it is penalized for requesting excessive fine-tuning epochs.
  • Layer-wise Exploration: The agent prunes the network layer-by-layer. The researchers specifically investigated the order of pruning (forward vs. backward) to see how it affected the final result.

Datasets

The primary evaluation was conducted on the CIFAR-10 dataset, a standard benchmark for image classification. The authors used a ResNet-20 architecture as their baseline, splitting the data into 45k images for training, 5k for the RL agent's reward evaluation, and a separate 10k test set to report final generalization accuracy.

Key Insights and Ideas

  • Time-Awareness is Key: By learning the fine-tuning duration, the agent avoids the "brute force" approach of retraining every configuration for a fixed, long duration. This is the primary driver behind the 1.71x speedup in search time.
  • Backward Pruning Wins: One of the most interesting findings was that pruning from the "back" of the network (deep-to-shallow) yielded significantly better compression ratios and lower accuracy degradation than the standard shallow-to-deep approach. The authors suggest that starting from the deeper layers allows the agent to find more redundancy without damaging the initial feature-extraction capabilities of the early layers.
  • Visualizing Redundancy: Using Class Activation Maps (CAMs), the authors showed that as the model is pruned, it actually learns to focus on narrower, more concentrated discriminative regions of an image to maintain its prediction accuracy despite having lower capacity.

Key Results

L2PF demonstrates a superior trade-off between model size, accuracy, and search time compared to existing methods like AMC and L2P.

  • Compression: Achieved a 3.84x compression ratio on ResNet-20.
  • Accuracy: Maintained a test accuracy of 89.9%, representing a negligible drop of only 0.9% from the unpruned baseline.
  • Efficiency: Reduced search time (GPU hours) by 1.71x compared to the L2P method.
  • Comparison: As shown in the paper's comparison table, L2PF achieved nearly double the compression of AMC-Plain20 while maintaining comparable accuracy.
Fig. 3: Comparison of L2PF pruning statistics against State-of-the-Art methods.

Limitations and Future Work

While L2PF shows great promise, the authors note a few areas for further exploration:

  • State Representation: Currently, the agent uses raw weight tensors as its input state. The authors suggest that using Class Activation Map (CAM) outputs as a state embedding could make the pruning process even more "feature-aware" and interpretable.
  • Robustness: Future work will look into how this style of feature-aware pruning impacts model robustness (e.g., resistance to noise or adversarial attacks), which is critical for safety-sensitive applications like autonomous driving.
  • Scalability: While efficient, the layer-wise approach still requires sequential processing. Exploring how to scale this to even deeper architectures or multi-node training remains an open question.

Summary updated

BibTeX
@inproceedings{vemparala2020l,
  author = {Manoj Rohit Vemparala and Nael Fasfous and Alexander Frickenstein and Mhd Ali Moraly and Aquib Jamal and Lukas Frickenstein and Christian Unger and Naveen Shankar Nagaraja and Walter Stechele},
  title = {{L2PF - Learning to Prune Faster}},
  booktitle = {CVIP},
  year = {2020},
  doi = {10.1007/978-981-16-1103-2\_22},
}
Figure