Optimizing Temporal Convolutional Network inference on FPGA-based accelerators

Marco Carreras, Gianfranco Deriu, Luigi Raffo, Luca Benini, Paolo Meloni

Abstract

Temporal Convolutional Networks (TCNs) are emerging as powerful alternatives to Recurrent Neural Networks (RNNs) for sequence modeling. However, their deployment on edge devices is hindered by memory bandwidth bottlenecks and the lack of specialized hardware support for 1D dilated convolutions. This paper presents a hardware-software co-design framework for FPGA-based TCN acceleration. By extending the NEURAghe architecture with a kernel-size agnostic Convolution Engine and implementing a batch-processing scheduling strategy, the proposed system achieves up to 111.8 GOPS/s and a 10x speedup over high-performance mobile CPUs, significantly improving operational intensity and energy efficiency.

Introduction

While Convolutional Neural Networks (CNNs) are the gold standard for image processing, Temporal Convolutional Networks (TCNs)—which utilize 1D dilated convolutions—have proven superior to Recurrent Neural Networks (RNNs) in accuracy and training time for tasks like speech recognition and signal analysis.

However, running TCNs on edge devices (like IoT sensors or wearables) is difficult. Most existing hardware accelerators are optimized for 2D image data. Furthermore, TCNs often process data sample-by-sample in real-time. This creates a "bandwidth wall": the system spends more time moving weights from memory to the processor than actually performing calculations, leading to extremely low efficiency.

Visualization of a Temporal Convolutional Network (TCN) showing dilated convolutions and the resulting receptive field.

Proposed Framework and Architecture

The authors propose a hardware-software co-design approach based on an extension of the NEURAghe framework. The core of the system is the Convolution Specific Processor (CSP), which manages the specialized arithmetic logic and memory interactions.

High-level architecture of the Convolution Specific Processor (CSP) integrated within the FPGA framework.

Key components of the architecture include:

  • Flexible Hardware Template: The Convolution Engine (CE) was modified to be "kernel-size agnostic." It uses a matrix of Sum-of-Product (SoP) units that can handle arbitrary dilation rates and strides without needing to reconfigure the FPGA logic.
  • RISC-V Scheduling: A lightweight RISC-V soft-core is integrated into the FPGA to manage data transfers and convolutions via optimized firmware, allowing for double-buffering to hide memory latency.
  • Batch Processing (Sequence Buffering): To solve the low operational intensity problem, the system buffers input samples into batches. Instead of loading weights to process one sample, the system reuses the same weights to process a sequence of samples, moving the operation from the "bandwidth-limited" zone to the "computation-limited" zone of the roofline model.

Experimental Evaluation

The architecture was evaluated using three distinct TCN benchmarks representing different complexity levels:

  1. ECG Classification: A plain TCN for monitoring heart signals.
  2. Res-TCN: A residual-unit-based network used for 3D human action recognition.
  3. WN-PNT: A complex network based on WaveNet for Polyphonic Note Transcription of audio signals.

Testing was conducted on Xilinx Zynq Z-7020 (Zedboard) and Zynq UltraScale+ ZU3EG (Ultra96) devices. The batching strategy allowed the hardware to reach 96% of its theoretical peak performance in high-throughput modes.

Key Results and Insights

  • The "Aha" Moment on Batching: The authors demonstrated that for TCNs, "operational intensity" (the ratio of operations to memory traffic) is the primary bottleneck. By increasing the batch size, they could boost efficiency from near-zero to over 90% of the hardware's theoretical peak.
  • Performance Metrics: The system achieved up to 111.8 GOPS/s on the UltraScale+ device and reached 33.9 GOPS/s/W, a 3x improvement over pure software implementations.
  • Speedup: The design provided up to a 10x speedup compared to an ARM Cortex-A53 quad-core processor running the ARM Compute Library.
  • Receptive Field Awareness: The system calculates the "local receptive field"—the minimum samples needed to produce a valid output—to optimize how much data is fetched from off-chip DDR memory.

Conclusion and Future Work

While batching significantly improves throughput and efficiency, it inherently increases latency. For ultra-low-latency applications where a result is needed the microsecond a sample arrives, batching cannot be used, and the system remains bandwidth-limited. Additionally, for very deep TCNs, the activation and weight memory footprint can exceed on-chip BRAM, requiring more frequent interactions with external DDR memory.

Future research will explore "extreme quantization" (binary or ternary weights) specifically for TCN-related tasks to further reduce memory pressure and improve performance on resource-constrained edge devices.

Summary updated

BibTeX
@article{carreras2020optimizing,
  author = {Marco Carreras and Gianfranco Deriu and Luigi Raffo and Luca Benini and Paolo Meloni},
  title = {{Optimizing Temporal Convolutional Network inference on FPGA-based accelerators}},
  journal = {IEEE J. Emerg. Sel. Topics Circuits Syst.},
  year = {2020},
  doi = {10.1109/jetcas.2020.3014503},
}
Figure