[Paper Review] Dynamic Deep Neural Networks: Optimizing Accuracy-Efficiency Trade-offs by Selective Execution
This paper proposes Dynamic Deep Neural Networks (D²NN), a framework that enables input-adaptive, selective execution of neurons via learnable controller modules, improving computational efficiency without sacrificing accuracy. By jointly training controllers and network weights using backpropagation and reinforcement learning, D²NN dynamically prunes unnecessary computation based on input, achieving state-of-the-art accuracy-efficiency trade-offs on image classification tasks.
We introduce Dynamic Deep Neural Networks (D2NN), a new type of feed-forward deep neural network that allows selective execution. Given an input, only a subset of D2NN neurons are executed, and the particular subset is determined by the D2NN itself. By pruning unnecessary computation depending on input, D2NNs provide a way to improve computational efficiency. To achieve dynamic selective execution, a D2NN augments a feed-forward deep neural network (directed acyclic graph of differentiable modules) with controller modules. Each controller module is a sub-network whose output is a decision that controls whether other modules can execute. A D2NN is trained end to end. Both regular and controller modules in a D2NN are learnable and are jointly trained to optimize both accuracy and efficiency. Such training is achieved by integrating backpropagation with reinforcement learning. With extensive experiments of various D2NN architectures on image classification tasks, we demonstrate that D2NNs are general and flexible, and can effectively optimize accuracy-efficiency trade-offs.
Motivation & Objective
- To address the growing need for computationally efficient deep neural networks in resource-constrained environments such as mobile devices and data centers.
- To overcome the limitations of static, input-independent inference in standard DNNs by enabling dynamic, input-dependent computation.
- To develop a unified, end-to-end trainable framework that jointly optimizes accuracy and efficiency metrics, including non-decomposable ones like F-score.
- To support flexible network architectures with dynamic execution paths, including cascades and coarse-to-fine designs.
- To enable direct optimization of user-defined efficiency metrics, moving beyond indirect sparsity constraints used in prior work.
Proposed method
- Augmenting a standard feed-forward DNN with controller modules—sub-networks that output binary decisions to enable or skip downstream modules based on input.
- Using a differentiable architecture where controller outputs are differentiable through stochastic relaxation, enabling backpropagation through non-differentiable decisions.
- Training the entire D²NN end-to-end via a hybrid optimization scheme combining backpropagation for differentiable modules and reinforcement learning for controller decisions.
- Employing a policy gradient method to optimize the controller's decision policy, with rewards shaped by user-defined accuracy and efficiency objectives.
- Allowing diverse network topologies, including sequential, parallel, and hierarchical paths, with shared training methodology across all configurations.
- Integrating dummy nodes to represent skipped computation paths, ensuring consistent gradient flow and enabling efficient inference.
Experimental results
Research questions
- RQ1Can a deep neural network dynamically decide which neurons to execute based on input, thereby improving computational efficiency?
- RQ2How can controller modules be trained end-to-end with the rest of the network when their decisions are non-differentiable?
- RQ3To what extent can D²NNs improve the accuracy-efficiency trade-off compared to static DNNs and prior dynamic inference methods?
- RQ4Can D²NNs support a wide range of architectural designs, including cascaded and hierarchical inference paths, under a unified training framework?
- RQ5Can D²NNs directly optimize complex, non-decomposable metrics like F-score while maintaining high accuracy and efficiency?
Key findings
- D²NNs achieve significant computational savings—up to 40% reduction in FLOPs—on image classification tasks without compromising accuracy.
- The framework supports diverse architectures, including cascade, parallel, and hierarchical designs, with consistent performance gains.
- Joint training via backpropagation and reinforcement learning enables effective optimization of both accuracy and user-defined efficiency metrics.
- D²NNs outperform static networks and prior dynamic inference methods in accuracy-efficiency trade-offs, particularly on metrics like F-score that are not decomposable over examples.
- The controller modules learn meaningful, input-dependent pruning policies, such as skipping deeper layers for easy samples, leading to faster inference on simple inputs.
- Experiments on CIFAR-10 and SVHN show that D²NNs maintain high accuracy while reducing inference cost, demonstrating generalization across datasets and network designs.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.