Abstract
Efficient and compact neural network models are essential for enabling the deployment on mobile and embedded devices. In this work, we point out that typical design metrics for gauging the efficiency of neural network architectures -- total number of operations and parameters -- are not sufficient. These metrics may not accurately correlate with the actual deployment metrics such as energy and memory footprint. We show that throughput and energy varies by up to 5X across different neural network operation types on an off-the-shelf Arm Cortex-M7 microcontroller. Furthermore, we show that the memory required for activation data also need to be considered, apart from the model parameters, for network architecture exploration studies.
Introduction
In the pursuit of deploying deep learning models on resource-constrained edge devices, researchers often rely on "Number of Operations" (Ops) and "Parameter Count" as primary metrics for efficiency. The assumption is that reducing these counts directly translates to faster execution and lower power consumption. However, this work demonstrates that these standard metrics are often poor proxies for actual performance on hardware like microcontrollers.
Methodology
The study utilized an Arm Cortex-M7 microcontroller (216 MHz) on a NUCLEO-F746ZG development board. Neural network kernels were implemented using CMSIS-NN, leveraging the processor's SIMD capabilities. The researchers measured throughput (MOps/s), power consumption, and energy per operation across various layer types, including standard Convolutions (Conv), Fully-Connected (FC) layers, Pooling, and Depthwise Separable Convolutions (DS-Conv). Benchmarks included CIFAR-10 for general CNN operations and Google Speech Commands for keyword spotting models.
The Throughput Gap and Operation Efficiency
Empirical results reveal a significant "Throughput Gap" between different operation types. While power consumption remains relatively stable across operations, the execution speed varies wildly. Standard convolutions are generally slower than fully-connected layers due to the im2col overhead required for data rearrangement.
Notably, Depthwise Separable Convolutions (DS-Conv), despite being theoretically efficient, exhibit much lower throughput per MAC compared to standard convolutions or FC layers. This "DS-Conv Paradox" means that reducing theoretical Ops through depthwise separation does not always yield proportional latency gains on real hardware.
Memory Footprint: Beyond Parameters
While model size (weights) is typically the focus of memory optimization, this study highlights that activation data—the intermediate outputs of layers—is a critical and often overlooked component of the memory footprint. On microcontrollers where SRAM is extremely limited, activation data can account for a significant portion of the total memory requirement. This footprint is highly dependent on network topology rather than just parameter count.
Key Results
The investigation yielded several critical findings for edge AI deployment:
- 5X Variance: Throughput and energy efficiency can vary by up to 5x across different operation types on the same hardware.
- 30% Performance Swing: Models with nearly identical "Ops" and accuracy can differ by 30% in runtime and energy consumption due to their operation mix.
Conclusion
To optimize neural networks for the edge effectively, we must move beyond counting parameters and Ops. Future Neural Architecture Search (NAS) frameworks should integrate hardware-specific cost tables that account for actual throughput and memory footprints. Targeting the lowest actual latency and energy consumption for a specific chip is essential for the next generation of embedded AI.
Summary updated