Multi-Complexity-Loss DNAS for Energy-Efficient and Memory-Constrained Deep Neural Networks

Matteo Risso, Alessio Burrello, Luca Benini, Enrico Macii, Massimo Poncino, Daniele Jahier Pagliari · DOI

Abstract

Deploying Deep Learning (DL) on "TinyML" devices—low-power microcontrollers with limited RAM and Flash—requires a delicate balance between model accuracy, energy efficiency, and strict hardware constraints. This paper introduces a novel Differentiable Neural Architecture Search (DNAS) framework that co-optimizes for accuracy and energy efficiency while strictly adhering to hard memory limits. By employing a multi-term loss function, the framework enables the automated discovery of optimal TinyML models tailored to specific hardware budgets. Experimental results on the MLPerf Tiny benchmark suite demonstrate energy savings of up to 2.2× with negligible accuracy loss, while maintaining memory precision within ±3.3% of the target.

Introduction

The deployment of deep neural networks on edge devices is primarily hindered by two factors: hard memory constraints and energy optimization goals. If a model exceeds the available Flash memory of a microcontroller, it cannot be deployed. Once a model fits, minimizing energy consumption—often proxied by the number of operations (OPs)—is essential for extending battery life. Existing DNAS methods typically optimize for a single metric using penalty terms, which often requires exhaustive hyper-parameter tuning to hit a specific memory target. This work addresses these challenges by treating memory as a hard constraint and energy as a secondary optimization objective within a unified differentiable framework.

Methodology

Searchable Network and Masking

To avoid the high memory overhead of training massive super-nets, the proposed approach utilizes a mask-based DNAS. Starting from a "seed" network, trainable binary masks are applied to each convolutional channel. During the search phase, the system learns which channels are critical for the task and which can be pruned. A Straight-Through Estimator (STE) is employed to allow gradient propagation through the non-differentiable masking function.

Multi-Regularization Loss Function

The core of the framework is a multi-loss formulation designed to stabilize the search process:

$$\min_{W,\theta} \mathcal{L}(W; \theta) + \lambda|S(\theta) - s^*| + \mu O(\theta)$$

  • Task Loss ($\mathcal{L}$): Standard cross-entropy loss for classification.
  • Size-Loss ($|S(\theta) - s^*|$): Forces the architecture to match a specific memory budget ($s^*$). The use of absolute difference ensures the search converges to the target size rather than just minimizing it.
  • OPs-Loss ($O(\theta)$): Encourages the reduction of total operations to improve energy efficiency once the size constraint is met.
Figure 1: Overview of the proposed Multi-Complexity-Loss DNAS framework, illustrating the transition from a seed network to a deployed model on a target device.

To simplify deployment, the authors provide a closed-form heuristic to calculate the strength ($\lambda$) needed to hit the target size, removing the need for extensive hyper-parameter sweeps.

Experimental Results

The framework was evaluated using the MLPerf Tiny Benchmark Suite, covering Image Classification (IC), Visual Wake Word (VWW), and Keyword Spotting (KWS) tasks. The discovered architectures were deployed on an STM NUCLEO-H743ZI2 microcontroller.

Performance and Pareto Frontiers

The DNAS successfully generated Pareto frontiers, allowing designers to select models based on their specific accuracy and energy requirements for a given memory budget. For instance, on the IC task, energy consumption was reduced by up to 2.2× compared to the baseline.

Figure 5: Accuracy vs. OPs results for different size targets (75%, 50%, 25%, etc.) across IC, VWW, and KWS tasks, showing the discovered Pareto frontiers.

Key Insights

  • Layer Sensitivity: The search process naturally identifies that pruning early layers (which process high-resolution data) yields higher energy savings than pruning later layers.
  • Memory Precision: All discovered models remained within ±3.3% of the requested memory target, validating the effectiveness of the absolute-difference size loss.
  • Over-parameterization: In tasks like VWW, the framework found that smaller models could achieve better accuracy-energy trade-offs than larger, standard "tiny" models, indicating significant over-parameterization in existing manual designs.

Conclusion and Future Work

This work provides a robust and automated tool for designing energy-efficient, memory-constrained models for TinyML applications. By transforming memory limits into a target-driven loss term, the framework removes the need for tedious manual tuning. Future research will expand the search space to include network depth and kernel sizes, and integrate hardware-aware energy metrics beyond simple OP counts.

Summary updated

BibTeX
@inproceedings{risso2022multi,
  author = {Matteo Risso and Alessio Burrello and Luca Benini and Enrico Macii and Massimo Poncino and Daniele Jahier Pagliari},
  title = {{Multi-Complexity-Loss DNAS for Energy-Efficient and Memory-Constrained Deep Neural Networks}},
  booktitle = {ISLPED},
  year = {2022},
  doi = {10.1145/3531437.3539720},
}
Figure