Channel-wise Mixed-precision Assignment for DNN Inference on Constrained Edge Nodes

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

Introduction

Deploying Deep Neural Networks (DNNs) on "edge" devices—such as drones, wearables, and smart sensors—presents a significant engineering challenge. These devices are characterized by extremely limited memory and power budgets, often referred to as the TinyML domain. To fit complex models onto these microcontrollers, researchers typically employ quantization, which reduces the precision of weights and activations from 32-bit floating-point numbers to low-precision integers (e.g., 8-bit, 4-bit, or 2-bit).

While state-of-the-art mixed-precision techniques assign specific bit-widths to each layer, this paper, presented at the 2022 IEEE International Green and Sustainable Computing Conference (IGSC), argues that layer-wise assignment is a relatively blunt instrument. The authors propose a more granular, channel-wise approach that optimizes the precision of individual filters within a layer, achieving significant reductions in memory and energy consumption without sacrificing accuracy.

The Complexity of Granular Quantization

In a standard convolutional layer, all filters (channels) are typically quantized to the same bit-width. However, not all features are of equal importance to the model's final prediction. Some channels may require high precision to capture critical details, while others may be redundant and capable of operating at 2-bit precision.

The primary obstacle to channel-wise quantization is the exponential increase in the search space. For a MobileNetV1 model, moving from layer-wise to channel-wise precision increases the number of possible configurations from $10^{26}$ to a staggering $10^{74}$. Manually navigating this space to find an optimal configuration is computationally impossible.

Methodology: Differentiable Neural Architecture Search (DNAS)

To solve the search space problem, the authors utilize Differentiable Neural Architecture Search (DNAS). Instead of evaluating millions of discrete model candidates, they employ a "super-net" approach where the bit-width of each channel becomes a continuous, trainable parameter optimized via gradient descent.

Key Technical Components:

  • Channel-wise Weight Assignment: Each filter in a convolutional weight tensor is assigned a NAS parameter that determines its optimal bit-width (choosing between 2, 4, or 8 bits).
  • Layer-wise Activation Assignment: To maintain hardware efficiency and avoid complex interleaving issues during execution, activations are kept at a uniform bit-width per layer.
  • Complexity-Aware Loss Function: The training objective includes a penalty term for model size or energy consumption. For energy optimization, the authors use a Look-Up Table (LUT) derived from the actual power profile of the target hardware.
  • Hardware-Friendly Execution: To ensure compatibility with standard hardware, the authors implement an offline "filter reordering" step. This groups filters of the same bit-width together, allowing the hardware to execute the layer as a sequence of standard convolutions that are subsequently concatenated.

Experimental Setup and Benchmarks

The proposed method was evaluated using the MLPerf Tiny benchmark suite, which covers a diverse range of edge AI applications:

  1. Image Classification (IC): ResNet-like CNN on the CIFAR-10 dataset.
  2. Keyword Spotting (KWS): Depthwise Separable CNN on Google Speech Commands v2.
  3. Visual Wake Word (VWW): MobileNetV1 on MSCOCO 2014 for person detection.
  4. Anomaly Detection (AD): Dense Autoencoder on the DCASE2020 Toy-car dataset.

Key Insights

The DNAS tool revealed several interesting patterns in how models prioritize precision:

  • Information Density: The search naturally allocated 8-bit precision to the most informative channels while aggressively quantizing redundant channels to 2-bit.
  • The "First and Last" Heuristic: The search confirmed that the initial and final layers of a network are almost always critical for accuracy and require high (8-bit) precision, whereas middle layers can be significantly compressed.
  • Quantization as Regularization: In several instances, the mixed-precision models actually outperformed their floating-point counterparts. This suggests that low-bit quantization can serve as a form of regularization, helping the model generalize better by preventing overfitting.

Results and Hardware Deployment

The optimized models were deployed on the MPIC RISC-V edge processor. Compared to the previous state-of-the-art mixed-precision method (EdMIPS), the channel-wise approach demonstrated superior performance across the board:

  • Memory Savings: Achieved up to a 63.4% reduction in model size for the Visual Wake Word task at iso-accuracy.
  • Energy Efficiency: Reduced energy consumption per inference by up to 27.2% for Keyword Spotting.
  • Accuracy Improvements: In some configurations, the tool discovered models that were both smaller and more accurate (ranging from +0.5% to +4.3% improvement) than fixed-precision baselines.

Conclusion and Future Directions

This research demonstrates that fine-grained, channel-wise quantization is a powerful tool for squeezing maximum performance out of constrained edge hardware. By leveraging DNAS, the authors successfully navigated a massive search space to find models that are significantly more efficient than those produced by layer-wise methods.

Future work remains in exploring fine-grained activation precision, which could offer further savings but requires overcoming significant hardware implementation challenges. Additionally, while the current energy optimization is tuned for a specific RISC-V architecture, the underlying logic is generalizable to other platforms like ARM Cortex-M or specialized NPUs.

Summary updated

BibTeX
@inproceedings{risso2022channel,
  author = {Matteo Risso and Alessio Burrello and Luca Benini and Enrico Macii and Massimo Poncino and Daniele Jahier Pagliari},
  title = {{Channel-wise Mixed-precision Assignment for DNN Inference on Constrained Edge Nodes}},
  booktitle = {IGSC},
  year = {2022},
  doi = {10.1109/igsc55832.2022.9969373},
}
Figure