Skip to main content
QUICK REVIEW

[Paper Review] S2DNAS:Transforming Static CNN Model for Dynamic Inference via Neural Architecture Search

Zhihang Yuan, Bingzhe Wu|arXiv (Cornell University)|Nov 16, 2019
Advanced Neural Network ApplicationsComputer Science45 references8 citations
TL;DR

S2DNAS proposes a general framework to transform static CNN models into dynamic inference networks via neural architecture search, enabling early exiting of easy samples through channel-wise multi-stage architectures. It achieves comparable accuracy to state-of-the-art models like MSDNet while avoiding irregular computations and complex controllers, enabling efficient deployment on resource-constrained hardware using existing deep learning frameworks.

ABSTRACT

Recently, dynamic inference has emerged as a promising way to reduce the computational cost of deep convolutional neural network (CNN). In contrast to static methods (e.g. weight pruning), dynamic inference adaptively adjusts the inference process according to each input sample, which can considerably reduce the computational cost on "easy" samples while maintaining the overall model performance. In this paper, we introduce a general framework, S2DNAS, which can transform various static CNN models to support dynamic inference via neural architecture search. To this end, based on a given CNN model, we first generate a CNN architecture space in which each architecture is a multi-stage CNN generated from the given model using some predefined transformations. Then, we propose a reinforcement learning based approach to automatically search for the optimal CNN architecture in the generated space. At last, with the searched multi-stage network, we can perform dynamic inference by adaptively choosing a stage to evaluate for each sample. Unlike previous works that introduce irregular computations or complex controllers in the inference or re-design a CNN model from scratch, our method can generalize to most of the popular CNN architectures and the searched dynamic network can be directly deployed using existing deep learning frameworks in various hardware devices.

Motivation & Objective

  • To address the high computational cost of static CNN inference in resource-constrained environments.
  • To enable dynamic inference without introducing irregular computations or complex controllers that hinder hardware efficiency.
  • To develop a generalizable framework that transforms existing CNN architectures into multi-stage dynamic models without architectural redesign.
  • To maintain high model accuracy while reducing average FLOPs through adaptive, sample-specific inference stages.
  • To support practical deployment on diverse hardware platforms using standard deep learning frameworks.

Proposed method

  • S2DNAS generates a CNN architecture space by applying predefined transformations to a given static CNN, creating multi-stage variants with reduced channel widths in earlier stages.
  • It employs a reinforcement learning-based neural architecture search (NAS) to automatically identify the optimal multi-stage architecture from the generated space.
  • The framework splits the original network along channel width rather than depth, allowing all classifiers to access semantic-level features from deeper layers.
  • Each stage includes a classifier that predicts early if confidence exceeds a learned threshold, enabling early exiting for easy samples.
  • The search process optimizes for accuracy-computation trade-offs by adjusting stage-specific confidence thresholds during training.
  • The resulting dynamic model is compatible with existing deep learning frameworks and hardware accelerators due to regular, structured computation graphs.

Experimental results

Research questions

  • RQ1Can a general framework be developed to transform any pre-trained static CNN into a dynamic inference model without architectural redesign?
  • RQ2How can dynamic inference be achieved without introducing irregular computations or complex controllers that hinder hardware deployment?
  • RQ3Can early exiting based on confidence thresholds maintain high accuracy while reducing average FLOPs across diverse datasets and models?
  • RQ4To what extent can the proposed method generalize across different CNN architectures such as ResNet, VGG, and MobileNet?
  • RQ5How does the accuracy-computation trade-off vary with different threshold settings across stages?

Key findings

  • S2DNAS successfully transforms ResNet-20, ResNet-56, ResNet-110, VGG-16BN, and MobileNetV2 into dynamic models with minimal accuracy drop across CIFAR-10 and CIFAR-100 datasets.
  • On CIFAR-10, 61.66% of test samples exit from the first stage in the S2DNAS-transformed ResNet-110, significantly reducing average FLOPs.
  • For ResNet-20 on CIFAR-10, 50% of samples exit by the second stage, with the first-stage classifier achieving 98.44% accuracy, indicating effective early detection of easy samples.
  • The method achieves accuracy-computation trade-offs comparable to MSDNet, especially at lower FLOP levels, despite not requiring manual architecture design.
  • The framework is orthogonal to pruning and quantization, allowing further computational savings when combined with these techniques.
  • The dynamic models generated by S2DNAS are deployable on existing hardware using standard deep learning frameworks due to regular, structured computation.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.