Adaptive Resolution Inference (ARI): Energy-Efficient Machine Learning for Internet of Things

Ziheng Wang, Pedro Reviriego, Farzad Niknia, Javier Conde, Shanshan Liu, Fabrizio LombardiarXiv 2024 · DOI

TL;DR

Adaptive Resolution Inference (ARI) is a novel framework designed to bring energy-efficient machine learning to resource-constrained IoT devices. By running inferences on a low-precision model first and only escalating to a full-precision model when the prediction confidence is low, ARI reduces energy consumption by 40% to 85% with minimal to zero loss in accuracy.

What Problem Does This Paper Address?

Deploying Machine Learning (ML) models directly onto Internet of Things (IoT) edge devices—a paradigm known as TinyML—is essential for privacy, latency, and security. However, these devices typically run on batteries or small solar cells, making energy consumption a massive bottleneck.

To save power, engineers often use optimization techniques like quantization (reducing numerical precision) or pruning (removing weights). While effective, these static methods permanently degrade model accuracy. The authors address a fundamental question: Can we combine multiple models of varying precisions to achieve the high accuracy of a full model at the low energy cost of a simplified one?

Fig. 1. Problem statement: given a set of ML models with different performance and energy dissipation, can we combine them to design classifiers that provide better metrics for IoT devices?

Methods

The core idea behind Adaptive Resolution Inference (ARI) is that quantization typically only introduces minor deviations in a model's classification scores. If a low-precision model predicts a class with a large margin of confidence over the runner-up, it is highly unlikely that the full-precision model would choose differently.

The ARI pipeline works as follows:

  1. Low-Resolution Inference: An input sample is first processed by a heavily quantized, low-energy model.
  2. Margin Calculation: The system calculates the margin ($M = S_{1st} - S_{2nd}$), which is the difference between the highest and second-highest class scores.
  3. Threshold Check: If this margin is greater than a predefined threshold ($T$), the result is deemed reliable, and the inference terminates early.
  4. High-Resolution Escalation: If the margin is below $T$ (indicating a "hard" or ambiguous sample), the full-precision model is executed to ensure accuracy.

The authors evaluated ARI across two hardware paradigms:

  • Floating-Point Implementations: Truncating bits from the mantissa (e.g., dropping from FP16 to FP8) to create a distinct, low-power hardware block.
  • Stochastic Computing (SC) Implementations: A paradigm where numbers are represented by stream-of-bits probabilities. Precision is tied to sequence length, meaning the low-resolution model simply processes a shorter bitstream using the exact same hardware.
Fig. 2. Example of the reduction of bits in the floating-point evaluation.

Datasets

The proposed ARI framework was trained and evaluated using a 5-layer Multilayer Perceptron (MLP) across three widely recognized image benchmarks:

  • SVHN (Street View House Numbers)
  • Fashion MNIST
  • CIFAR-10

Key Insights and Ideas

  • The High Cost of Marginal Gains: In stochastic computing, increasing the bitstream sequence length from 512 to 4096 bits scales energy consumption linearly (an 8x increase) just to secure a tiny ~0.5% accuracy boost. ARI exploits the fact that most samples don't need this extra compute.
  • Quantization as Noise: Quantization errors behave similarly to minor system noise. They rarely flip the final classification unless the decision boundary was already incredibly close.
  • Flexible Thresholding: The threshold $T$ can be tuned based on deployment needs. Setting $T = M_{max}$ guarantees identical accuracy to the full model. Alternatively, setting $T$ to the 95th or 99th percentile ($M_{95}, M_{99}$) allows designers to trade a fraction of a percent of accuracy for even deeper power savings.

Key Results

The quantitative savings varied depending on the computing paradigm and the dataset:

  • Floating-Point (FP): Truncating 6 to 8 bits from the baseline FP16 model yielded 40% to 50% energy savings. Crucially, when using the $M_{max}$ threshold, these savings were achieved with 0% accuracy loss.
  • Stochastic Computing (SC): Energy savings were even more pronounced, ranging from 40% to 85%. For the Fashion MNIST dataset, reducing the sequence length from 4096 to 512 bits for clear samples allowed the system to bypass the full model up to 80% of the time, resulting in a massive 79.13% reduction in energy with zero accuracy loss.

Limitations and Future Work

While promising, the paper notes a few constraints and areas for future exploration:

  • Hardware Overhead in Floating-Point: For standard silicon architectures, supporting ARI requires implementing two separate hardware blocks (e.g., an FP16 block and an FP8 block), which increases the physical circuit area.
  • Calibration Dependency: The threshold $T$ must be calculated beforehand using a representative validation dataset. If the device encounters severe data drift in the field, the threshold efficiency might degrade.
  • Architecture Scaling: This initial study focused on Multilayer Perceptrons (MLPs). Future work will need to validate ARI's performance on more complex architectures like Convolutional Neural Networks (CNNs) and Transformers.

Summary updated

BibTeX
@misc{wang2024adaptive,
  author = {Ziheng Wang and Pedro Reviriego and Farzad Niknia and Javier Conde and Shanshan Liu and Fabrizio Lombardi},
  title = {{Adaptive Resolution Inference (ARI): Energy-Efficient Machine Learning for Internet of Things}},
  year = {2024},
  eprint = {2408.14528},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.14528},
}
Figure