Abstract
Dynamic network pruning offers a promising path toward efficient deep learning by adapting the network architecture to individual inputs. However, existing methods often suffer from a lack of interpretability and a tendency to collapse into static pruning. This paper proposes a novel dynamic pruning framework using discrete "decision units" that select channel masks on the fly. By utilizing the Gumbel-Softmax trick for differentiable discrete selection, the model learns interpretable, input-dependent inference paths. Experimental results on ImageNet demonstrate significant computational savings (over 51% MAC reduction) with minimal accuracy loss. Furthermore, the discrete decision paths serve as a robust "fingerprint" for detecting adversarial attacks with near-perfect accuracy.
Introduction
Deep neural networks are increasingly deployed on resource-constrained devices, necessitating efficient inference. While static pruning removes redundant weights permanently, it fails to account for the varying complexity of different inputs. Dynamic pruning addresses this by selecting different sub-networks for different images. However, many current dynamic approaches rely on continuous gating mechanisms that are difficult to interpret and often fail to maintain true input-dependency over time.
This work introduces a dynamic pruning method that employs discrete decision units to select from a finite set of channel masks. This approach ensures that the network makes explicit, interpretable choices at each layer, leading to both efficiency and a new mechanism for adversarial robustness.
Methodology: The Decision Unit
The core of the proposed architecture is the Decision Unit, integrated into each convolutional layer.
As shown in Figure 1, the process involves several key steps:
- Action Head & Channel Masks: Instead of predicting a continuous importance score for every channel, the layer's input passes through a lightweight "Action Head." This head outputs a probability distribution over a finite set of $m$ discrete channel selection masks ($G$).
- Discrete Selection via Gumbel-Softmax: To make the discrete choice (picking 1 of $m$ masks) differentiable for training, the authors use the Gumbel-Softmax trick. This allows the model to learn which masks work best for which features using standard backpropagation.
- Sparsity Regularization: A global loss term encourages the masks to be sparse, allowing the user to target a specific reduction in Multiply-Accumulate operations (MACs).
Interpretability and Semantic Pathing
A unique advantage of discrete decision-making is the ability to visualize the "logic" of the network. By tracking the sequence of masks chosen across layers, the authors generated Sankey diagrams to visualize inference paths.
As illustrated in Figure 2, semantically related categories (e.g., "cat" and "dog") naturally converge on similar decision paths. This suggests that the model is learning meaningful feature hierarchies that are shared among similar objects, providing a level of transparency often missing in "black-box" gating models.
Adversarial Detection via Decision Paths
Beyond efficiency, the discrete nature of the decision units provides a powerful tool for security. The authors discovered that adversarial examples—even those with perturbations invisible to humans—trigger significantly different decision paths than natural images. By concatenating these decision probabilities into a "decision feature" vector, a simple secondary classifier can detect malicious inputs. This method achieved an AUROC of nearly 100% against FGSM attacks on CIFAR-10, significantly outperforming state-of-the-art detectors like MAHA and LID across various attack types (PGD, DeepFool, C&W).
Key Results
The researchers evaluated their approach on standard computer vision benchmarks including CIFAR-10/100, SVHN, and ImageNet.
- Efficiency vs. Accuracy: On ImageNet with a ResNet50 backbone, the method achieved 92.08% top-5 accuracy while reducing MACs by over 51%. This outperformed popular static methods like ThiNet and CP, as well as other dynamic methods like RNP.
- Robustness: The decision path proved to be a highly effective "fingerprint" for detecting adversarial perturbations that disrupt the internal logic of the network's channel selection.
Conclusion and Future Work
By moving from continuous gating to discrete, interpretable decision units, this paper provides a robust framework for dynamic network pruning. While the method is sensitive to the number of available actions ($m$) and introduces slight overhead in the decision head, it offers a compelling trade-off between efficiency, interpretability, and security. Future work may explore dynamically generating filter weights in conjunction with channel selection to further push the boundaries of adaptive inference.
Summary updated