Benchmarking TinyML Systems: Challenges and Direction

Colby R. Banbury, Vijay Janapa Reddi, Max Lam, William Fu, Amin Fazel, Jeremy Holleman, Xinyuan Huang, Robert Hurtado, David Kanter, Anton Lokhmotov, David A. Patterson, Danilo Pau, Jae-sun Seo, Jeff Sieracki, Urmish Thakker, Marian Verhelst, Poonam YadavarXiv 2020

Introduction

TinyML is an emerging field bringing machine learning to ultra-low-power microcontroller-class devices. However, the field has historically lacked a standardized way to measure performance. This paper introduces TinyMLPerf, a benchmark suite designed to evaluate the unique trade-offs between energy, memory, and accuracy in the "milliWatt" regime.

The Problem: A Benchmarking Void

Machine learning is shifting from the cloud to the "edge"—specifically to microcontrollers (MCUs) that consume less than a milliWatt of power. These TinyML systems are constrained by tiny memory footprints (often <100 KB) and slow clock speeds (MHz range).

Existing benchmarks fail to address this niche. General-purpose benchmarks like CoreMark do not represent ML workloads, while high-performance benchmarks like MLPerf focus on systems that consume orders of magnitude more power. Without a standard, it is impossible to compare a specialized AI accelerator against a general-purpose MCU or to evaluate the efficacy of specific software optimizations. TinyMLPerf aims to fill this gap by providing a fair, reproducible, and representative set of benchmarks.

The TinyMLPerf Methodology

The TinyMLPerf working group proposes a framework that balances portability with representativeness. Key methodological choices include:

  • Open and Closed Divisions: Borrowing from the successful MLPerf model, the "Closed" division requires a reference model to compare hardware directly. The "Open" division allows for custom architectures and optimizations, encouraging innovation in hardware-software co-design.
  • Deployment Diversity: The benchmark accounts for various deployment methods, including hand-coding (high performance but low portability), code generation, and ML interpreters like TensorFlow Lite for Microcontrollers.
  • Metric Focus: The primary metrics are inference latency and energy consumption, with accuracy held above a specific threshold to ensure real-world utility.

The Benchmarking Suite

The suite covers four representative use cases ranging from lightweight anomaly detection to resource-hungry visual processing. These were selected to reflect the current state of the TinyML industry.

The TinyMLPerf Benchmarking Suite: Use cases, datasets, and reference models.

As detailed in the table above, the suite includes Audio Wake Words (using the Speech Commands dataset), Visual Wake Words, Image Classification (CIFAR-10), and Anomaly Detection (using the ToyADMOS dataset). Each use case is paired with a reference model, such as DS-CNN or ResNet-8, to provide a baseline for the Closed division.

Key Insights: The Power and Memory Gap

TinyML systems operate in a completely different universe than traditional ML. There is a four-order-of-magnitude difference in power consumption between a dedicated TinyML device and a "mobile" edge device like a Raspberry Pi 4.

A logarithmic comparison of active power consumption between TinyML systems and mobile edge devices.

Beyond power, memory is the primary motivator in this space. Unlike traditional ML where compute (FLOPs) is often the bottleneck, TinyML is primarily constrained by on-chip SRAM and Flash. This necessitates aggressive quantization and memory-aware neural architecture searches. Furthermore, the extreme heterogeneity of TinyML hardware—where some systems lack standard clocks or debug interfaces—makes normalizing performance measurements a significant hurdle for the working group.

Conclusion and Future Work

TinyMLPerf establishes "TinyML Requirements" as a distinct category in the benchmarking landscape. By performing inference on-device and near-sensor, TinyML avoids the massive energy cost of wireless communication, which often exceeds the cost of computation at this scale. TinyMLPerf provides the necessary tools to quantify these benefits accurately.

Future iterations of the benchmark will need to address "always-on" sensing costs, system-level overheads (including peripherals and firmware), and expanding use cases like object counting or gesture recognition as hardware capabilities continue to evolve.

Summary updated

BibTeX
@misc{banbury2020benchmarking,
  author = {Colby R. Banbury and Vijay Janapa Reddi and Max Lam and William Fu and Amin Fazel and Jeremy Holleman and Xinyuan Huang and Robert Hurtado and David Kanter and Anton Lokhmotov and David A. Patterson and Danilo Pau and Jae-sun Seo and Jeff Sieracki and Urmish Thakker and Marian Verhelst and Poonam Yadav},
  title = {{Benchmarking TinyML Systems: Challenges and Direction}},
  year = {2020},
  eprint = {2003.04821},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2003.04821},
}
Figure