Skip to main content
QUICK REVIEW

[Paper Review] Embedded Binarized Neural Networks

Bradley McDanel, Surat Teerapittayanon|arXiv (Cornell University)|Sep 6, 2017
Advanced Neural Network ApplicationsComputer Science9 references76 citations
TL;DR

eBNN reorders BNN inference to use binary temporaries, achieving ~32x reduction in intermediate memory and enabling on-device DNN inference on devices with tens of KB of RAM; demonstrated on MNIST and CIFAR10-Easy with Curie/Intel Curie hardware and provided an auto-generation service.

ABSTRACT

We study embedded Binarized Neural Networks (eBNNs) with the aim of allowing current binarized neural networks (BNNs) in the literature to perform feedforward inference efficiently on small embedded devices. We focus on minimizing the required memory footprint, given that these devices often have memory as small as tens of kilobytes (KB). Beyond minimizing the memory required to store weights, as in a BNN, we show that it is essential to minimize the memory used for temporaries which hold intermediate results between layers in feedforward inference. To accomplish this, eBNN reorders the computation of inference while preserving the original BNN structure, and uses just a single floating-point temporary for the entire neural network. All intermediate results from a layer are stored as binary values, as opposed to floating-points used in current BNN implementations, leading to a 32x reduction in required temporary space. We provide empirical evidence that our proposed eBNN approach allows efficient inference (10s of ms) on devices with severely limited memory (10s of KB). For example, eBNN achieves 95\% accuracy on the MNIST dataset running on an Intel Curie with only 15 KB of usable memory with an inference runtime of under 50 ms per sample. To ease the development of applications in embedded contexts, we make our source code available that allows users to train and discover eBNN models for a learning task at hand, which fit within the memory constraint of the target device.

Motivation & Objective

  • Motivate running deep neural networks on severely memory-constrained embedded devices.
  • Reduce memory footprint by reordering inference to store temporaries as binary values.
  • Preserve BNN accuracy while minimizing temporary memory usage.
  • Demonstrate practical performance (ms-range runtimes) on a 15 KB SRAM device.
  • Provide tooling and a cloud-based service to train and generate eBNN implementations.

Proposed method

  • Reorder inference within BNNs into fused binary blocks to minimize intermediate floating-point temporaries.
  • Use a single floating-point accumulator per fused block and binary outputs between blocks.
  • Fuse convolution and pooling (or fully connected) into Binary Convolution-Pool or Binary FC blocks.
  • Quantize intermediates to binary values to achieve ~32x memory reduction for temporaries.
  • Maintain original network structure and accuracy while changing only the computation order.
  • Provide an automated pipeline to train models in Python and generate embedded C code for deployment.

Experimental results

Research questions

  • RQ1Can eBNN reduce the memory footprint of temporaries enough to fit standard BNNs on ultra-constrained embedded devices?
  • RQ2Does reordering inference preserve accuracy while enabling practical on-device runtime?
  • RQ3What are the trade-offs between memory, runtime, and accuracy for various eBNN architectures on MNIST and CIFAR10-Easy?
  • RQ4How does eBNN performance scale with network depth and block fusion strategies?
  • RQ5Is there an accessible tooling/service model to automatically learn and deploy eBNN models on target devices?

Key findings

  • Temporaries in BNNs dominate memory; eBNN reduces this by storing intermediate results in binary form, allowing very small devices (e.g., 15 KB usable SRAM) to perform inference.
  • On MNIST and CIFAR10-Easy, eBNN models achieve accuracy comparable to the corresponding BNNs under the same memory constraints (Table 1 results).
  • Across evaluated networks, temporaries occupy at most 3% of total inference memory, with parameters making up the rest.
  • Inference runtimes range from tens of milliseconds to under 1 second per sample on the tested devices, enabling 10s of ms for smaller configurations.
  • An automated cloud-based service is provided to train eBNNs and generate embedded C code for deployment, facilitating rapid prototyping on constrained hardware.

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.