Abstract
Introduced in the late 1980s for generalization purposes, pruning has now become a staple for compressing deep neural networks. Despite many innovations in recent decades, pruning approaches still face core issues that hinder their performance or scalability. Drawing inspiration from early work in the field, and especially the use of weight decay to achieve sparsity, we introduce Selective Weight Decay (SWD), which carries out efficient, continuous pruning throughout training. Our approach, theoretically grounded on Lagrangian smoothing, is versatile and can be applied to multiple tasks, networks, and pruning structures. We show that SWD compares favorably to state-of-the-art approaches, in terms of performance-to-parameters ratio, on the CIFAR-10, Cora, and ImageNet ILSVRC2012 datasets.
Introduction
As deep neural networks (DNNs) continue to grow in size to achieve state-of-the-art performance, their deployment on edge devices with limited memory and power becomes increasingly challenging. Pruning—the process of removing redundant parameters—has emerged as the standard solution for model compression. However, traditional pruning methods typically rely on a disjointed three-stage process: training a full model, pruning the "weakest" weights based on a specific criterion, and fine-tuning the remaining parameters to recover lost accuracy.
This traditional approach suffers from several fundamental flaws. First, the sudden removal of weights introduces a discontinuity that shocks the network, requiring extensive fine-tuning. Second, these methods are often "greedy"; once a weight is pruned, it is permanently removed, preventing the network from re-evaluating its importance later in training. Finally, many sophisticated pruning techniques fail to scale effectively to massive datasets like ImageNet or complex modern architectures. To overcome these hurdles, we propose Selective Weight Decay (SWD), a continuous pruning method that integrates weight reduction directly into the training cycle.
Methods: Selective Weight Decay
Selective Weight Decay is theoretically grounded in Lagrangian smoothing. Unlike standard weight decay (WD), which applies a uniform penalty to all weights to prevent overfitting, SWD targets only the subset of weights destined for pruning—typically those with the smallest magnitudes.
The Continuous Regularization Process
Instead of an abrupt deletion of weights, SWD adds a secondary regularization term to the loss function. A key feature of this approach is the growing penalty: the intensity of the SWD penalty starts near zero and increases exponentially throughout the training process. This allows the network to slowly "fade out" unimportant weights rather than cutting them instantly, giving the remaining weights ample time to compensate for the loss.
Non-Greedy Selection and Versatility
Because weights are never truly deleted until the final stage, the network can continuously adjust which weights are targeted for pruning at every training step. If a weight's magnitude increases significantly, it can "escape" the SWD penalty. This non-greedy selection leads to a more optimal final architecture. Furthermore, SWD is highly versatile, supporting both unstructured pruning (individual weights) and structured pruning (entire convolutional filters or channels) across various layer types.
Experimental Setup
We validated the effectiveness of SWD across a diverse range of benchmarks to demonstrate its broad applicability:
- Computer Vision: MNIST, CIFAR-10, CIFAR-100, and the large-scale ImageNet (ILSVRC2012) dataset.
- Graph Neural Networks: The Cora dataset, proving that the method is effective beyond standard convolutional or dense layers.
Key Results and Discussion
SWD consistently outperformed established baselines, including standard magnitude pruning and "Network Slimming," particularly at high compression ratios.
Large-Scale Performance on ImageNet
Using a ResNet-50 architecture on ImageNet, SWD achieved a 73.1% Top-1 accuracy at a 10x unstructured compression rate, outperforming the baseline by 2%. Even at an aggressive 40x compression, the model maintained a robust 67.8% accuracy, demonstrating its scalability to complex tasks.
Stability in Structured Pruning
The advantages of continuity are most apparent in structured pruning. On CIFAR-10 with ResNet-20, when only 20% of the parameters remained, the baseline method's accuracy collapsed to 0.1% (equivalent to random guessing). In contrast, SWD maintained a robust 69.0% accuracy. This suggests that the gradual transition provided by SWD is crucial for maintaining network stability when removing entire structural components.
Extreme Compression Ratios
In unstructured pruning tests on CIFAR-10, SWD maintained over 80% accuracy even when 99.9% of the weights were targeted for removal. This level of robustness at the edge highlights SWD's potential for extreme model compression without the typical "accuracy cliff."
Limitations and Future Work
Despite its advantages, SWD presents certain challenges. The method is sensitive to hyperparameters, specifically the starting and ending values for the penalty ($a_{min}$ and $a_{max}$), which currently require grid searches to optimize. Additionally, SWD increases training time by approximately 40% to 50% per epoch due to the additional regularization calculations. However, this overhead is often offset by the elimination of the separate fine-tuning phase required by traditional methods.
Future research will explore the automation of hyperparameter selection and the application of different penalty functions beyond the $L_2$ norm to further refine the pruning process.
Conclusion
Selective Weight Decay offers a powerful alternative to traditional pruning by replacing disruptive weight removal with a smooth, continuous regularization process. By allowing the network to learn its optimal sparse structure during training, SWD achieves superior performance-to-parameter ratios across a wide variety of tasks and architectures, paving the way for more efficient deep learning deployment.
Summary updated