Abstract
This paper presents a structured pruning method for Convolutional Neural Networks (CNNs) designed to reduce redundancy without sacrificing significant accuracy. By employing the $k$-means++ clustering algorithm, the approach identifies filters that extract similar features and retains only the most representative filter from each cluster. Experimental results on the LeNet-5 architecture using the MNIST dataset demonstrate a 17.9× reduction in both parameters and computational costs (FLOPs) with a marginal accuracy loss of only 0.3%.
Introduction
Deep learning models, particularly CNNs, are often over-parameterized, containing far more weights than necessary for their target tasks. While this redundancy aids training, it poses significant challenges for deployment on resource-constrained devices such as mobile phones and embedded systems.
Existing pruning techniques generally fall into two categories: unstructured pruning, which removes individual weights but creates sparse matrices difficult for standard hardware to accelerate, and importance-based structured pruning, which removes entire filters based on simple metrics like weight magnitude. This paper argues that magnitude-based metrics may overlook unique, vital features and proposes a similarity-based alternative that focuses on the correlation between filters.
Methodology
The proposed method focuses on identifying filters that have highly correlated relationships in feature extraction. The core process involves:
- Clustering with $k$-means++: Filters within a layer are treated as data points and grouped into $k$ clusters.
- Representative Selection: The filter closest to each cluster's centroid is preserved as the representative, while analogous filters in that cluster are pruned.
- Structured Removal: Pruning a filter necessitates the removal of its corresponding output feature maps and the associated input channels in the subsequent layer. This maintains a standard dense architecture that is hardware-compatible.
- Iterative Fine-tuning: The model undergoes fine-tuning after pruning a layer to recover performance, repeating the cycle until a specified accuracy tolerance (e.g., 0.3%) is reached.
Results and Discussion
The effectiveness of the similarity-based pruning was evaluated on the LeNet-5 model using the MNIST dataset. The method achieved a compression and acceleration factor of 17.9×, significantly outperforming traditional unstructured methods in terms of hardware-friendly structured reduction.
As shown in the comparative analysis in Figure 4, the proposed method maintains an accuracy of 98.83%, representing a negligible 0.3% drop from the baseline. Notably, at lower pruning ratios, the method occasionally improved performance, suggesting that removing redundant filters can serve as a form of regularization, helping the model avoid overfitting.
Conclusion
This research demonstrates that similarity-based clustering is a viable and efficient strategy for structured CNN pruning. While the current evaluation is limited to LeNet-5 and MNIST, the results provide a strong foundation for future work on larger architectures like ResNet and more complex datasets like ImageNet. Future investigations will address the computational complexity of clustering in deeper networks and explore alternative selection strategies within clusters beyond centroid proximity.
Summary updated