Skip to main content
QUICK REVIEW

[Paper Review] FANN-on-MCU: An Open-Source Toolkit for Energy-Efficient Neural Network Inference at the Edge of the Internet of Things

Xiaying Wang, Michele Magno|arXiv (Cornell University)|Nov 8, 2019
Advanced Memory and Neural ComputingEngineering43 references9 citations
TL;DR

FANN-on-MCU is an open-source toolkit that enables energy-efficient neural network inference on ultra-low-power microcontrollers (MCUs), targeting ARM Cortex-M and RISC-V PULP platforms. It compiles trained FANN models into optimized C code for MCUs, achieving up to 22× speedup and 69% energy reduction on an octa-core RISC-V platform compared to a single-core ARM Cortex-M4 implementation, with inference latencies in the microsecond range and sub-milliwatt power consumption.

ABSTRACT

The growing number of low-power smart devices in the Internet of Things is coupled with the concept of "Edge Computing", that is moving some of the intelligence, especially machine learning, towards the edge of the network. Enabling machine learning algorithms to run on resource-constrained hardware, typically on low-power smart devices, is challenging in terms of hardware (optimized and energy-efficient integrated circuits), algorithmic and firmware implementations. This paper presents FANN-on-MCU, an open-source toolkit built upon the Fast Artificial Neural Network (FANN) library to run lightweight and energy-efficient neural networks on microcontrollers based on both the ARM Cortex-M series and the novel RISC-V-based Parallel Ultra-Low-Power (PULP) platform. The toolkit takes multi-layer perceptrons trained with FANN and generates code targeted at execution on low-power microcontrollers either with a floating-point unit (i.e., ARM Cortex-M4F and M7F) or without (i.e., ARM Cortex M0-M3 or PULP-based processors). This paper also provides an architectural performance evaluation of neural networks on the most popular ARM Cortex-M family and the parallel RISC-V processor called Mr. Wolf. The evaluation includes experimental results for three different applications using a self-sustainable wearable multi-sensor bracelet. Experimental results show a measured latency in the order of only a few microseconds and a power consumption of few milliwatts while keeping the memory requirements below the limitations of the targeted microcontrollers. In particular, the parallel implementation on the octa-core RISC-V platform reaches a speedup of 22x and a 69% reduction in energy consumption with respect to a single-core implementation on Cortex-M4 for continuous real-time classification.

Motivation & Objective

  • To address the challenge of deploying energy-efficient neural networks on resource-constrained, battery-powered IoT devices with limited computational and memory resources.
  • To enable efficient inference of multi-layer perceptrons on low-power microcontrollers, including both ARM Cortex-M and RISC-V-based PULP platforms.
  • To analyze the trade-offs between parallelization speedup, energy consumption, and memory overhead in multi-core ultra-low-power architectures.
  • To provide a practical, open-source software stack that bridges trained FANN models with efficient, real-time inference on embedded MCUs.
  • To demonstrate the feasibility of running complex neural networks with minimal energy and latency on edge devices using optimized firmware and hardware-aware compilation.

Proposed method

  • The toolkit compiles trained multi-layer perceptron models from the FANN library into hand-optimized C code tailored for microcontroller execution.
  • It supports both 32-bit ARM Cortex-M4 and 32-bit RISC-V RI5CY cores, including variants with and without floating-point units.
  • The framework implements a parallel inference strategy across multiple cores on the PULP platform, managing task distribution and memory access to minimize overhead.
  • Optimizations include fixed-point quantization, loop unrolling, and memory access reduction to minimize energy and latency.
  • Runtime and power measurements are collected via end-to-end profiling on real hardware, including the nRF52832 and Mr. Wolf (PULP) platforms.
  • The system is evaluated across three real-world applications using a self-sustaining wearable multi-sensor bracelet to validate energy efficiency and real-time performance.

Experimental results

Research questions

  • RQ1How can a lightweight neural network framework be efficiently compiled and executed on ultra-low-power microcontrollers with limited memory and processing power?
  • RQ2What are the performance and energy trade-offs of using parallel execution on multi-core RISC-V platforms versus single-core ARM Cortex-M4 for neural network inference?
  • RQ3To what extent can FANN-on-MCU reduce inference latency and energy consumption while maintaining model accuracy on embedded MCUs?
  • RQ4How do parallelization overhead and memory transfers affect speedup and energy efficiency in multi-core embedded systems?
  • RQ5Can the framework support real-time, continuous classification tasks on battery-powered wearable devices with minimal power draw?

Key findings

  • The parallel implementation on the octa-core RISC-V PULP platform achieved a 22× speedup and 69% reduction in energy consumption compared to a single-core ARM Cortex-M4 implementation for continuous real-time classification.
  • Inference on the nRF52832 (ARM Cortex-M4) completed in 17.6 ms with 183.74 µJ of energy, while the same task on Mr. Wolf (8-core RISC-V) was completed in 0.8 ms with only 49.43 µJ, representing a 14× speedup and 73% energy reduction.
  • For a small network, the RISC-V multi-core implementation achieved a 13.33× speedup and 85.15% energy reduction compared to the ARM Cortex-M4 baseline.
  • The framework achieved sub-millisecond inference latencies (as low as 0.004 ms) and power consumption below 10 mW across all evaluated applications, with memory usage well within MCU constraints.
  • The parallel approach on PULP showed up to 7.1× speedup over a single core, though power consumption increased with core count, highlighting the need for dynamic core activation strategies.
  • The toolkit demonstrated that complex neural networks with up to 103,800 multiply-accumulate operations can be efficiently executed on ultra-low-power MCUs with minimal energy and latency.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.