Abstract
Dynamic neural networks, such as Mixture-of-Experts (MoE) and Dynamic Convolution (DY-Conv), offer enhanced representation power by adapting parameters to specific inputs. However, this flexibility often results in a significant increase in parameter count and memory footprint. This paper introduces PAD-Net (Partially Dynamic Network), a framework that strategically converts redundant dynamic parameters into static ones. By employing an Iterative Mode Partition (IMP) algorithm, PAD-Net identifies essential dynamic components, achieving superior performance with significantly fewer parameters and reduced computational costs across both vision and language tasks.
Introduction
In the pursuit of higher model capacity, researchers have increasingly adopted dynamic networks. Unlike static models where weights remain fixed after training, dynamic models adapt their parameters for every input. While this boosts representation power, it imposes a heavy "tax": a fully dynamic model can possess five times the parameters of its static counterpart, leading to substantial memory overhead and high computational costs. PAD-Net addresses a fundamental question: Is it necessary for every parameter in a dynamic layer to be dynamic? The authors argue that the current "all-or-nothing" approach leads to significant redundancy, where many parameters are recalculated without contributing to improved performance.
Methods
The PAD-Net framework introduces a novel approach to balancing model capacity and efficiency through two primary components:
- Partially Dynamic Architecture: Instead of maintaining 100% dynamism, PAD-Net splits layers into a dynamic subnetwork (input-dependent) and a static subnetwork (fixed). Scale factors are utilized to balance the intensity of these two modes.
- Iterative Mode Partition (IMP): Inspired by network pruning, IMP identifies which parameters are essential to remain dynamic. It calculates an importance score based on the sensitivity of the loss function to making a specific dynamic parameter static. Starting from a fully dynamic network, the algorithm iteratively "demotes" the least important dynamic parameters until a target dynamic ratio ((\kappa)) is reached.
Key Insights: The Redundancy Paradox
A core finding of this research is that partially dynamic networks often outperform their fully dynamic counterparts. For instance, a ResNet-50 with only 30% dynamic parameters outperformed the 100% dynamic version. This suggests that excessive dynamism may introduce noise or instability into the network's representations. The success of PAD-Net relies on the IMP algorithm's ability to use gradients to find the "winning tickets"—the specific parameters that truly benefit from being input-dependent.
Experimental Results
PAD-Net was rigorously evaluated across Computer Vision (CV) and Natural Language Processing (NLP) domains:
- Computer Vision: On ImageNet, PAD-Net surpassed fully dynamic networks by +0.7% top-1 accuracy for ResNet-50 while using only 30% dynamic parameters. It also achieved lower FLOPs than standard dynamic convolutions.
- Natural Language Processing: For BERT models on the GLUE benchmark, PAD-Net achieved a +1.9% average score increase over MoE-BERT while using only 50% dynamic parameters. In a BERT-Base setup, PAD-Net reduced the parameter count from 506M (standard MoE) to 308M while improving results.
Conclusion and Future Work
PAD-Net demonstrates that "less is more" in the context of dynamic networks. By strategically partitioning parameters into static and dynamic modes, the framework achieves state-of-the-art performance with significantly improved efficiency. Future work includes extending this approach to other dynamic structures like Switch Transformers and exploring more complex tasks such as machine translation. Additionally, automating the search for the optimal dynamic ratio per layer via meta-learning remains a promising avenue for further optimization.
Summary updated