Balancing Model Compression and Accuracy
Pruning convolutional neural networks (CNNs) is a critical task for deploying models on resource-constrained hardware. Traditional pruning methods often rely on static heuristics—such as weight magnitude or activation variance—to determine which feature maps to remove. These methods frequently fail to account for the complex, non-linear relationship between specific feature maps and the final loss function. The authors propose a dynamic, loss-aware approach that treats the pruning process as a decision-making problem under uncertainty.
The Multi-Armed Bandit Framework for Pruning
To solve the selection problem, the authors frame feature-map pruning as a Multi-Armed Bandit (MAB) challenge. In this setup, each potential pruning candidate (a feature map) is treated as an 'arm.' The goal is to maximize the compression ratio while minimizing the impact on the model's loss.
Key components of this approach include:
- Dynamic Selection: Unlike static pruning, the MAB agent observes the impact of removing specific feature maps on the loss function in real-time, allowing it to learn which maps are truly redundant.
- Exploration vs. Exploitation: The algorithm balances the need to test various pruning configurations (exploration) with the need to commit to the most efficient pruning strategy (exploitation). This prevents the model from getting stuck in suboptimal local minima during the compression phase.
- Loss-Aware Feedback: By directly incorporating the loss function into the reward signal for the bandit, the method ensures that the pruning process is sensitive to the specific task performance, rather than just structural properties of the network.
This approach effectively mitigates the 'greedy' nature of traditional pruning, where removing one map might seem optimal in isolation but causes significant performance drops when combined with other removals. By using the MAB framework, the system learns the interdependencies between feature maps, leading to more robust and accurate compressed models.