Layer-by-layer unstructured pruning rate optimization based on improved sparrow search algorithm
摘要
The deployment of neural networks on resource-constrained devices is fundamentally limited by their inherent computational and memory complexity. While unstructured pruning has proven effective in compressing models, the automatic optimization of per-layer pruning ratios remains a critical challenge. This paper proposes an optimization framework based on an Improved Sparrow Search Algorithm (ISSA). Specifically, ISSA restructures the population into a dual-role “discoverer–joiner” architecture and integrates an Enhanced Lens Imaging Opposition-based Learning (ELLO) mechanism to dynamically modulate exploration intensity. Additionally, a small-step stochastic perturbation strategy is introduced in the late search phase to balance global exploration with local exploitation. Extensive experiments on eight benchmark functions demonstrate that ISSA reduces the average solution error by 3–12 orders of magnitude compared to the original SSA. Preliminary application to MNIST-LeNet-5 achieves an 84.81% parameter reduction with only a 0.59% accuracy drop. Crucially, strictly validating on modern architectures (CIFAR-10) reveals ISSA’s superior robustness: for ResNet-20, it achieves 86.70% accuracy at ~ 11.5% retention, outperforming the Uniform baseline; for VGG-16 under extreme compression (> 88%), ISSA maintains 86.21% accuracy while the standard Global Magnitude Pruning (GlobalMP) baseline collapses to random guessing (10.00%). Further generalization experiments on three engineering datasets—concrete strength, airfoil aerodynamics, and building energy efficiency—show that ISSA adaptively allocates layer-wise pruning ratios, ensuring high accuracy while enabling efficient model compression. This study provides a novel and automated approach to model compression for deployment on resource-limited devices.