Introduction
Deploying state-of-the-art neural networks on mobile or embedded devices requires a delicate balance between maximum accuracy and strict computational constraints, such as FLOPs or latency. Traditionally, this has been addressed through manual scaling—uniformly shrinking or expanding a model—or Neural Architecture Search (NAS). However, manual scaling is rarely optimal for every layer, and NAS is often computationally expensive while ignoring established architectural priors.
Differentiable Network Adaption (DNA) introduces an automated, bi-directional framework that allows a model to "breathe." By utilizing an elastic search space and gradient-based optimization, DNA can simultaneously expand layers that require more capacity and condense those that are redundant, outperforming traditional one-way pruning or manual tuning methods.
Methodology
The DNA framework is built upon two core innovations: an elastic search space and differentiable Markov modeling. Unlike static search spaces, DNA defines three possible actions for every layer: Condense (removing groups of channels/layers), Keep (maintaining the current state), or Expand (adding groups of channels/layers). This allows the search to explore architectures both larger and smaller than the initial baseline.
To make this process optimizable via gradient descent, the adaption is modeled as a series of state transitions with learnable architecture parameters. The training process follows a structured three-phase pipeline.
The Three-Phase Pipeline
- Phase 1 (Weight Training): The weights of a "super-network" are trained by sampling various sub-networks. A "sandwich rule" is employed to ensure that the smallest, largest, and random versions of the network all perform reliably.
- Phase 2 (Architecture Optimization): With weights frozen, the architecture parameters are optimized. A specialized loss function penalizes the model if it exceeds the target FLOPs budget, guiding the network toward the most efficient configuration.
- Phase 3 (Finalization): The optimal architecture is derived from the learned probabilities and then trained from scratch to achieve peak performance.
Key Results and Insights
DNA was evaluated on the ImageNet (ILSVRC2012) dataset across various base architectures, including human-designed models like ResNet and MobileNet-v2, as well as NAS-optimized models like EfficientNet-B0.
- ResNet Improvements: DNA achieved 71.6% Top-1 accuracy on ResNet-18 at 1.8G FLOPs, a 1.3% improvement over the baseline. For ResNet-50 adapted to a larger budget (7.8G FLOPs), it reached 78.8%, significantly outperforming manual scaling to ResNet-101.
- Optimizing the Optimized: Remarkably, DNA improved models already optimized by NAS. It boosted EfficientNet-B0's Top-1 accuracy from 76.2% to 76.7% under the same budget and adapted it to the B1 budget to reach 78.2%, surpassing the original EfficientNet-B1 (77.4%).
- Bi-directionality and Robustness: The results demonstrate that searching in both directions yields superior results compared to simple pruning. Furthermore, DNA proved robust to initialization; whether starting from a small or large baseline, the method converges toward a similar optimal architecture for a given budget.
Limitations and Future Work
While highly effective, DNA currently operates on groups of channels rather than individual channels to maintain a manageable search space. Future work could explore finer granularity for even greater precision. Additionally, while the framework supports hardware-specific latency constraints, real-world "wall-clock" latency on specialized chips (DSPs/NPUs) is often non-linear and may require more sophisticated cost modeling in the optimization phase.
Summary updated