TL;DR
This paper introduces Class-Aware Pruning, a novel strategy for compressing Deep Neural Networks (DNNs) by evaluating how many object classes a specific filter actually helps identify. By identifying and removing filters that only contribute to a small number of classes and retraining the rest to compensate, the authors achieve up to a 77.1% reduction in FLOPs with minimal impact on accuracy.
What Problem Does This Paper Address?
While DNNs have revolutionized fields like computer vision, their massive computational requirements—measured in billions of floating-point operations (FLOPs)—make them difficult to deploy on resource-constrained "edge" devices like smartphones or IoT sensors.
Existing "pruning" techniques try to solve this by removing redundant weights or entire filters. However, most current methods rely on simple metrics like the absolute value of weights or the average activity of a filter. The authors argue these methods miss a crucial perspective: semantic importance. A filter might have small weights but be the "smoking gun" for identifying a specific, rare class. Conversely, a filter might be active often but provide redundant information across many classes. This paper addresses the gap by looking at filter importance through the lens of class-specific sensitivity.
Methods
The proposed framework consists of four main stages:
- Modified Training: To make pruning more effective, the authors train the network using a custom cost function. They combine standard cross-entropy with $L_1$ regularization (to encourage sparsity) and an orthogonality term ($L_{orth}$). The goal is to force the network to learn diverse, non-redundant features, which "polarizes" the importance of filters, making it easier to distinguish between vital and unimportant ones.
- Importance Evaluation: The core innovation is how they score filters. For a given class (e.g., "cat"), they measure how sensitive the network's loss is to the removal of a specific filter's activation. To avoid the massive computational cost of running a full inference for every single filter removal, they use a first-order Taylor expansion to approximate this sensitivity with a single backward propagation.
- Iterative Pruning: Filters that are important for only a few classes (below a certain threshold) are removed. The authors use different thresholds depending on the total number of classes in the dataset (e.g., a threshold of 3 for CIFAR-10).
- Fine-tuning: After pruning, the network is retrained to allow the remaining filters to "pick up the slack" and recover any lost accuracy. This process repeats until no more filters can be removed without violating a pre-set accuracy tolerance.
Datasets
The researchers evaluated their method on standard image classification benchmarks:
- CIFAR-10: 10 classes of images.
- CIFAR-100: 100 classes of images.
- Models: They tested the approach on VGG16, VGG19, and ResNet50, representing both classic "plain" architectures and modern residual networks.
Key Insights and Ideas
- The "Class Perspective": The most significant "aha moment" is that a filter's value isn't just in its magnitude, but in its utility across the dataset's labels. If a filter only helps distinguish "deer" from "planes" but the rest of the network can already do that, it’s a prime candidate for removal.
- Polarization via Orthogonality: The authors found that forcing filters to be orthogonal during training (using $L_{orth}$) prevents them from learning the same features. This makes the "importance distribution" much clearer—filters either become very important for many classes or almost useless, with fewer "middle-ground" filters that are hard to decide on.
- Efficiency through Taylor Scores: By using Taylor expansion to estimate importance, they turned what would be a prohibitively expensive search into a computationally feasible step that fits into a standard training pipeline.
Key Results
The class-aware approach consistently outperformed state-of-the-art (SOTA) pruning methods like HRank and DepGraph:
- VGG16 on CIFAR-10: Achieved a 95.6% pruning ratio (removing nearly all parameters) and a 77.1% reduction in FLOPs, while only losing about 0.9% in Top-1 accuracy.
- ResNet56 on CIFAR-10: Reduced parameters by 77.9% and FLOPs by 62.3% with less than a 1% accuracy drop.
- Superior Accuracy: In head-to-head comparisons at similar pruning levels, the class-aware method almost always maintained higher accuracy than previous techniques, proving that which filters you remove matters as much as how many.
Limitations and Future Work
- Dataset Scale: While CIFAR-10/100 are standard benchmarks, they are relatively small. The paper does not show results for massive datasets like ImageNet, where the number of classes (1,000) might change the dynamics of the importance scoring.
- Threshold Sensitivity: The method relies on manually setting importance thresholds (e.g., "important for fewer than 3 classes"). Automating this threshold selection based on the specific layer or architecture could be a future improvement.
- Hardware Realities: While the paper focuses on FLOP reduction (a theoretical measure of speed), actual latency gains on specific hardware (like mobile CPUs or NPUs) were not measured. Future work could bridge the gap between theoretical FLOP reduction and real-world wall-clock time.
Summary updated