Streaming Architecture for Large-Scale Quantized Neural Networks on an FPGA-Based Dataflow Platform

Chaim Baskin, Natan Liss, Evgenii Zheltonozhskii, Alexander M. Bronstein, Avi MendelsonWorkshops @ IPDPS 2017 · DOI

Abstract

Deep neural networks (DNNs) are used by different applications that are executed on a range of computer architectures, from IoT devices to supercomputers. The footprint of these networks is huge as well as their computational and communication needs. In order to ease the pressure on resources, research indicates that in many cases a low precision representation (1-2 bit per parameter) of weights and other parameters can achieve similar accuracy while requiring less resources. Using quantized values enables the use of FPGAs to run NNs, since FPGAs are well fitted to these primitives; e.g., FPGAs provide efficient support for bitwise operations and can work with arbitrary-precision representation of numbers. This paper presents a new streaming architecture for running QNNs on FPGAs. The proposed architecture scales out better than alternatives, allowing us to take advantage of systems with multiple FPGAs. We also included support for skip connections, that are used in state-of-the art NNs, and shown that our architecture allows to add those connections almost for free. All this allowed us to implement an 18-layer ResNet for 224x224 images classification, achieving 57.5% top-1 accuracy. In addition, we implemented a full-sized quantized AlexNet. In contrast to previous works, we use 2-bit activations instead of 1-bit ones, which improves AlexNet's top-1 accuracy from 41.8% to 51.03% for the ImageNet classification. Both AlexNet and ResNet can handle 1000-class real-time classification on an FPGA. Our implementation of ResNet-18 consumes 5x less power and is 4x slower for ImageNet, when compared to the same NN on the latest Nvidia GPUs. Smaller NNs, that fit a single FPGA, are running faster then on GPUs on small (32x32) inputs, while consuming up to 20x less energy and power.

Introduction

Deep Neural Networks (DNNs) have become essential across various domains, yet their deployment is often hindered by massive memory, computational, and energy requirements. This is particularly problematic for edge devices and power-constrained environments. While Quantized Neural Networks (QNNs)—using ultra-low precision (1-2 bits) for weights and activations—offer a path forward, traditional hardware like GPUs is optimized for high-precision floating-point arithmetic rather than the bitwise operations central to QNNs.

FPGAs (Field-Programmable Gate Arrays) are naturally suited for bitwise logic and arbitrary-precision math. However, scaling FPGAs to handle complex modern network features, such as the skip connections found in ResNet architectures, remains a significant challenge. This research introduces a programmable, scalable streaming dataflow architecture designed to bridge this gap.

Streaming Dataflow Architecture

The proposed architecture is built on the Maxeler platform using High-Level Synthesis (HLS). Unlike GPUs that process data in batches, this system utilizes functional decomposition to break the network into independent "kernels" or layers.

The system architecture overview illustrates the interaction between the CPU application and the DataFlow Engine (DFE), where kernels process streaming data.

Data flows through these kernels as a continuous stream. This allows subsequent layers to begin processing as soon as the preceding layer produces its initial outputs, minimizing latency. To optimize for accuracy and hardware efficiency, the team employed a 1-bit weight and 2-bit activation quantization strategy. The choice of 2-bit activations proved critical, providing a significant accuracy jump over purely binary networks with minimal hardware overhead.

Hardware-Optimized Skip Connections

A major contribution of this work is the efficient implementation of skip connections, which are vital for state-of-the-art architectures like ResNet-18. In a streaming model, a skip connection is effectively a delay buffer.

The hardware implementation of a residual block shows how skip connections are integrated with convolution and activation layers using specialized buffers.

By precisely matching the buffer size to the internal latency of the convolutional path, the "skipped" data can be synchronized with the "processed" data without stalling the pipeline. This allows skip connections to be added "almost for free" in terms of performance impact. Furthermore, the design is modular and can scale across multiple FPGAs via high-speed daisy chains (MaxRing) to accommodate networks too large for a single chip.

Experimental Results

The architecture was evaluated on CIFAR-10, STL-10, and the large-scale ImageNet dataset. Key findings include:

  • Accuracy: Quantized ResNet-18 achieved 57.5% top-1 accuracy on ImageNet. AlexNet reached 51.03%, a substantial improvement over the 41.8% achieved by 1-bit activation models.
  • Efficiency: On ImageNet, the FPGA implementation consumed 5x less power than an Nvidia Tesla P100 GPU. For smaller 32x32 inputs, the FPGA demonstrated 20x better energy efficiency.
  • Latency: While GPUs offer higher raw throughput for massive batch processing, the FPGA architecture excels in real-time applications. It achieved 12% faster classification for small-input real-time tasks due to lower overhead compared to GPU batching.

Conclusion

This streaming architecture demonstrates that FPGAs can efficiently host large-scale QNNs with competitive accuracy and superior power efficiency. By optimizing for bitwise operations and implementing low-cost skip connections, the system provides a viable alternative to GPUs for real-time, power-sensitive AI deployment. Future work may leverage next-generation FPGAs to further close the performance gap with high-end GPUs while maintaining the energy advantage.

Summary updated

BibTeX
@inproceedings{baskin2017streaming,
  author = {Chaim Baskin and Natan Liss and Evgenii Zheltonozhskii and Alexander M. Bronstein and Avi Mendelson},
  title = {{Streaming Architecture for Large-Scale Quantized Neural Networks on an FPGA-Based Dataflow Platform}},
  booktitle = {Workshops @ IPDPS},
  year = {2017},
  doi = {10.1109/ipdpsw.2018.00032},
}
Figure