Abstract
Deep Neural Network (DNN) pruning is essential for deploying high-performance models on resource-constrained edge devices. However, existing methods often force a trade-off between the simplicity of non-differentiable "hard" pruning and the high computational overhead of "differentiable" mask-based pruning. This paper introduces Parameter-free Differentiable Pruning (PDP), a novel scheme that achieves state-of-the-art accuracy without adding auxiliary learnable parameters. By generating a dynamic soft mask as a direct function of the weights, PDP allows pruned connections to recover during training, leading to superior performance across vision and language tasks while significantly reducing training time and memory consumption.
Introduction
As Deep Neural Networks grow in complexity, pruning—the process of removing redundant weights—has become a cornerstone of efficient AI. The primary challenge in pruning is the "pruning paradox." Traditional hard pruning is computationally efficient but non-differentiable; once a weight is zeroed out, its gradient vanishes, preventing it from ever being reinstated. Conversely, modern differentiable pruning methods introduce auxiliary "mask parameters" to allow weights to be learned back into the model. While effective, these extra parameters increase training complexity and memory overhead, often requiring specialized training pipelines that do not generalize easily across different architectures like CNNs and Transformers.
PDP addresses these limitations by providing a framework that is both differentiable and parameter-free. It treats a weight's own magnitude as the indicator of its importance, eliminating the need for separate mask variables while maintaining the flexibility of differentiable optimization.
The PDP Framework
The core innovation of PDP is the generation of a soft pruning mask $m(w)$ as a direct function of the existing weights $W$ and a target sparsity $r$. The process follows four key steps:
- Dynamic Thresholding: At each training iteration, the algorithm identifies a threshold $t$ based on the global or layer-wise weight distribution and the desired sparsity level.
- Soft Masking: Instead of a binary cutoff, PDP applies a sigmoid-like function (controlled by a temperature parameter $ au$) to the weights. Weights significantly larger than $t$ receive a mask value near 1 (kept), while those significantly smaller receive a value near 0 (pruned).
- The "Second Chance" Gradient: Because the mask is "soft" during the training phase, weights near the threshold still receive gradients. This allows a weight that was effectively pruned in one epoch to increase in magnitude and "un-prune" itself in subsequent epochs if the task loss demands its inclusion.
- Universal Application: Because the logic relies solely on weight magnitudes and calculated thresholds, PDP is architecture-agnostic. It can be applied to unstructured pruning, structured N:M patterns (e.g., 2:4), and channel pruning (removing entire filters).
Experimental Evaluation
The authors evaluated PDP across a diverse range of benchmarks, demonstrating its versatility and efficiency.
Computer Vision
On ImageNet-1k, PDP achieved significant gains over previous state-of-the-art (SOTA) methods. For MobileNet-v1, PDP reached 68.2% top-1 accuracy at 86.6% sparsity, a 1.7% improvement over existing techniques. In structured pruning scenarios, such as 1:4 pruning on ResNet18, PDP improved top-1 accuracy by 3.6% compared to standard baselines.
Natural Language Processing
In NLP tasks using BERT-base on the GLUE benchmark, PDP maintained high performance even at extreme sparsity levels. On the MNLI task, PDP achieved 83.1% accuracy at 90% sparsity, whereas the next best differentiable technique trailed at 81.5%. Similar successes were observed in Large Language Models (LLMs), with GPT-2 training on the OpenWebText dataset showing robust convergence.
Training Efficiency
One of the most significant advantages of PDP is its speed. By removing the need to manage and optimize auxiliary mask parameters, PDP can be up to 2.8x faster to train than competing differentiable methods like Continuous Sparsification (CS). This reduction in GPU memory and compute time is critical for scaling pruning techniques to massive models.
Discussion and Key Insights
The success of PDP stems from the realization that weights are their own best indicators. By treating the weight magnitude as a built-in importance score, PDP avoids the instability often associated with initializing and training separate mask variables. Furthermore, the ability for weights to flip between "pruned" and "active" states late into the training process prevents the model from settling into sub-optimal sub-networks too early—a common failure mode for "hard" pruning methods.
While PDP introduces a temperature parameter $ au$ that requires some tuning, its reliance on the global weight distribution makes it remarkably stable across different initializations.
Conclusion and Future Work
PDP: Parameter-free Differentiable Pruning provides a highly efficient, scalable, and accurate solution for DNN compression. It bridges the gap between simple magnitude pruning and complex differentiable schemes, offering a "best of both worlds" approach. Future research may focus on integrating PDP with differentiable quantization to jointly optimize bit-width and sparsity, as well as incorporating hardware-specific latency measurements directly into the pruning threshold calculation to further optimize for real-world edge deployment.
Summary updated