Abstract
This study explores the implementation of stochastically binarized neural networks on FPGAs using the OpenCL framework. By transitioning Deep Neural Network (DNN) workloads from high-power GPUs to energy-efficient FPGAs and employing weight binarization, the authors achieve significant improvements in power efficiency and inference speed. The results demonstrate over 16x better power efficiency and 25% faster inference compared to high-end GPUs, facilitating high-performance AI on low-power edge devices.
Introduction
Modern deep learning predominantly relies on GPUs for their massive parallelism. However, the high power consumption of GPUs (often hundreds of watts) makes them unsuitable for Internet of Things (IoT) and portable edge applications. Field Programmable Gate Arrays (FPGAs) offer a power-efficient alternative but are traditionally difficult to program and constrained by limited hardware multipliers (DSP blocks).
Binarized Neural Networks (BNNs) address these constraints by restricting weights to +1 or -1, transforming expensive multiplications into simple additions or subtractions. While deterministic binarization is common, this paper presents the first FPGA-accelerated implementation of stochastic binarization, which uses probability to set weights and often yields superior accuracy.
System Architecture and Methodology
The researchers utilized High-Level Synthesis (HLS) via the OpenCL framework to bridge the gap between software-defined AI and hardware-optimized execution. This approach allows hardware logic to be described using C-based code, significantly reducing development time compared to traditional Hardware Description Languages (HDLs).
The implementation includes both deterministic (sign function) and stochastic (hard sigmoid function) binarization schemes. The designs were deployed on an Intel DE1-SoC, which integrates an ARM processor with FPGA logic, enabling standalone operation without a host computer. A specialized training loop maintains high-precision "latent" weights for gradient accumulation while utilizing binarized weights for forward and backward passes.
Experimental Setup
The architectures were evaluated using two standard benchmarks:
- MNIST: 70,000 handwritten digits tested on a permutation-invariant Fully Connected (FC) network.
- CIFAR-10: 60,000 color images tested on a VGG-16 Convolutional Neural Network (CNN) architecture.
Results and Discussion
The FPGA implementation was benchmarked against an NVIDIA Titan V GPU. The primary findings highlight the efficiency of the FPGA-based BNNs.
Key performance metrics include:
- Power Efficiency: The FPGA networks consumed approximately 6-8W, representing a >16x reduction compared to the GPU's 126W.
- Inference Speed: The FPGA achieved >25% shorter inference times per image for binarized models.
- Accuracy: The "accuracy tax" for binarization was minimal. On MNIST, the drop was less than 1%. On CIFAR-10, the stochastic BNN achieved 86.75% accuracy, nearly matching the non-regularized baseline.
- Stochasticity as Regularization: Stochastic binarization acted as a powerful regularizer, outperforming the deterministic version in CIFAR-10 tests.
Conclusion
This research demonstrates that OpenCL is a viable and accessible path for targeting FPGAs in AI applications. By bypassing multiplier bottlenecks through binarization, high-performance, standalone AI deployment becomes feasible on edge devices. Future work will focus on scaling these methods to larger architectures like ResNet and utilizing higher-end FPGA platforms to further enhance performance.
Summary updated