NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Value-Driven Mixed-Precision Quantization for Patch-Based Inference on Microcontrollers

Wei Tao, Shenglin He, Kai Lu, Xiaoyang Qu, Guokuan Li, Jiguang Wan, Jianzong Wang, Jing Xiao

Abstract

Deploying deep neural networks on microcontroller units (MCUs) is often hindered by extreme memory constraints, typically under 512KB of SRAM. While patch-based inference has emerged as a viable solution to fit large models into memory by processing feature maps in segments, it introduces a significant "redundancy tax" due to overlapping patches. This paper presents QuantMCU, a framework that optimizes patch-based inference through value-driven mixed-precision quantization. By identifying critical outlier patches and utilizing entropy as a rapid proxy for accuracy, QuantMCU reduces redundant computation by 2.2x and latency by 1.5x compared to state-of-the-art methods, while completing the quantization search process in under a minute.

Introduction

Microcontrollers are the foundational hardware for the Internet of Things (IoT), yet their limited memory makes running modern neural networks a significant challenge. To overcome this, researchers developed patch-based inference, which breaks large feature maps into smaller, sequentially processed patches. However, to maintain the receptive field, these patches must overlap, leading to redundant calculations that increase latency by 8% to 17%.

Traditional mixed-precision quantization—assigning different bit-widths to different layers—could mitigate these overheads. However, existing search methods for optimal bit-widths often rely on time-consuming Reinforcement Learning (RL) or extensive retraining, which are impractical for rapid deployment. QuantMCU addresses these challenges by introducing a value-driven approach that prioritizes computational resources for the most critical data patches.

Methodology

QuantMCU introduces two primary components to bridge the gap between memory efficiency and computational speed: Value-Driven Patch Classification (VDPC) and Value-Driven Quantization Search (VDQS).

Value-Driven Patch Classification (VDPC)

Not all data within a feature map contributes equally to a model's final prediction. VDPC analyzes the distribution of activation values to classify patches into two categories:

  1. Outlier Patches: These contain activation values far from zero, which are statistically critical for model accuracy. QuantMCU preserves these patches at 8-bit precision to maintain high fidelity.
  2. Non-Outlier Patches: These patches contain less sensitive information and are routed through a mixed-precision pipeline to reduce computational cycles.

Value-Driven Quantization Search (VDQS)

To determine the optimal bit-widths (8, 4, or 2 bits) for non-outlier branches without the overhead of traditional search methods, the authors developed VDQS. This component relies on two innovations:

  • Entropy as an Accuracy Proxy: Instead of the standard "train-then-evaluate" loop, VDQS uses the entropy of activation values. Higher entropy indicates that a layer is preserving more information, allowing the system to predict potential accuracy loss instantly without labeled data or backpropagation.
  • Lightweight Iterative Search: The framework employs a greedy iterative approach. It balances a "quantization score"—calculated as the ratio of Bit Operations (BitOPs) reduction to entropy loss—against the specific memory constraints of the target hardware.

Experimental Results

The framework was evaluated using standard benchmarks, including ImageNet for classification and Pascal VOC for object detection. Testing was conducted across various architectures (MobileNetV2, InceptionV3, ResNet18, etc.) on hardware including the Arduino Nano 33 BLE Sense (Cortex-M4) and STM32H743 (Cortex-M7).

Efficiency and Latency

QuantMCU achieved a 2.2x reduction in BitOPs and a 1.5x reduction in inference latency on average compared to MCUNetV2, the previous state-of-the-art for patch-based MCU inference. Furthermore, it achieved up to a 2.9x reduction in peak memory usage.

Accuracy and Search Speed

On MobileNetV2 (ImageNet), QuantMCU reached 69.2% Top-1 accuracy, outperforming several established mixed-precision methods like HAQ and HAWQ-V3 while requiring significantly less memory. Most notably, the quantization search process was completed in just 30 seconds, a massive improvement over the 45 to 90 minutes required by competing methods.

Discussion and Limitations

The success of QuantMCU stems from the "Outlier Philosophy": by protecting salient features and aggressively compressing the rest, models can maintain high accuracy with minimal resources. Using entropy as a proxy for accuracy bypasses the need for expensive retraining, making the framework suitable for on-the-fly optimization.

However, some limitations remain. The outlier detection mechanism assumes activation values follow a Gaussian distribution, which may not apply to all specialized architectures. Additionally, the current implementation is constrained to 8, 4, and 2-bit widths by the underlying CMix-NN software libraries. Future work may explore hardware-level support for arbitrary bit-widths and the application of value-driven logic to other compression techniques like structured pruning.

Conclusion

QuantMCU demonstrates that value-driven mixed-precision quantization is a highly effective strategy for optimizing deep learning on microcontrollers. By focusing precision where it matters most and using statistical proxies for search, the framework provides a path toward more responsive and efficient IoT edge devices.

Summary updated

BibTeX
@inproceedings{tao2024value,
  author = {Wei Tao and Shenglin He and Kai Lu and Xiaoyang Qu and Guokuan Li and Jiguang Wan and Jianzong Wang and Jing Xiao},
  title = {{Value-Driven Mixed-Precision Quantization for Patch-Based Inference on Microcontrollers}},
  booktitle = {DATE},
  year = {2024},
  url = {https://openreview.net/forum?id=GxjVYu4cWz},
}
Figure