Approximate FPGA-Based LSTMs Under Computation Time Constraints

Michalis Rizakis, Stylianos I. Venieris, Alexandros Kouris, Christos-Savvas Bouganis

Abstract

Recurrent Neural Networks, specifically Long Short-Term Memory (LSTM) networks, have achieved state-of-the-art accuracy in various Artificial Intelligence tasks. However, high-performing LSTM models are increasingly demanding in terms of computational and memory load. This poses a challenge for latency-sensitive applications, such as mobile robots and autonomous vehicles, which operate under stringent computation time constraints. This paper introduces an approximate computing scheme combining iterative low-rank compression and pruning with a novel FPGA-based LSTM architecture. Integrated into an end-to-end framework, the approximation parameters and hardware configuration are optimized to meet specific time budgets. Evaluation on an image captioning application shows the system requires up to 6.5x less time to achieve target accuracy and provides 25x higher accuracy under identical time constraints compared to baseline methods.

Introduction

Long Short-Term Memory (LSTM) networks are the standard for processing sequential data in applications like image captioning and trajectory prediction. Despite their effectiveness, they are computationally intensive. In real-world robotics, decisions must often be made within millisecond-level windows. Standard LSTMs typically follow an "all-or-nothing" execution model: if the hardware cannot complete the full computation before a deadline, no result is produced. This research addresses the challenge of computation time constraints by providing a framework for "anytime" computing, where the model's accuracy improves progressively as more computation time becomes available, without requiring expensive retraining.

Methodology

The proposed framework integrates an algorithmic approximation scheme with a specialized hardware design, managed by an automated design space exploration (DSE) process.

Overview of the end-to-end framework for deploying approximate LSTMs on FPGAs.

Iterative Approximation Scheme

Instead of traditional one-shot compression, the framework uses a hybrid iterative algorithm:

  • Low-Rank Approximation: Singular Value Decomposition (SVD) approximates large weight matrices.
  • Pruning (Sparsification): Less significant connections are removed to reduce the total workload.
  • Iterative Refinement: The algorithm computes an initial rough approximation and refines it through rank-1 updates. This allows the system to stop at any iteration and still provide a valid, progressively more precise output.

Custom FPGA Architecture

The hardware is designed to exploit the inherent parallelism of LSTMs while accommodating the approximation scheme.

Detailed hardware architecture showing inter-gate parallelism and tiled processing units.
  • Inter-gate Parallelism: All four LSTM gates (input, forget, output, and cell) are processed simultaneously in dedicated hardware units.
  • Fine-grained Tuning: The architecture is parameterized by "tile sizes," allowing it to be optimized for specific FPGA resources and memory bandwidth using a Roofline Model.

Design Space Exploration (DSE)

The framework automatically searches for the optimal combination of pruning levels and hardware configurations to meet user-specified time or accuracy requirements. This ensures the best possible performance for a given FPGA target.

Experimental Evaluation

The researchers evaluated the framework using a real-life image captioning application based on the MSCOCO (Microsoft Common Objects in Context) dataset. A pre-trained model served as the baseline, and accuracy was measured using BLEU scores.

Key Results

Testing on a Xilinx Zynq ZC706 board demonstrated significant advantages over high-performance baseline architectures:

  • Speedup: To reach the same application-level accuracy, the proposed method was up to 6.5x faster.
  • Accuracy Gains: Under identical, strict time constraints, the system achieved an average of 25x higher accuracy.
  • Throughput: The custom hardware architecture demonstrated up to 3.72x higher performance (GOPs/s) compared to standard tiled implementations.
  • Dynamic Switching: The framework identifies "switching points" where it becomes more efficient to transition from the approximate model to the full baseline model to maximize accuracy if time permits.

Conclusion and Future Work

This framework enables the deployment of computationally demanding LSTMs in time-constrained environments without the need for retraining. This is particularly beneficial for privacy-sensitive applications where original training data is unavailable. Future work will explore integrating quantization (e.g., 8-bit or 16-bit integers) for further speedups and extending the design space exploration to other edge devices like ASICs and DSPs.

Summary updated

BibTeX
@inproceedings{rizakis2018approximate,
  author = {Michalis Rizakis and Stylianos I. Venieris and Alexandros Kouris and Christos-Savvas Bouganis},
  title = {{Approximate FPGA-Based LSTMs Under Computation Time Constraints}},
  booktitle = {ARC},
  year = {2018},
  url = {https://openreview.net/forum?id=bET6s--IEOo},
}
Figure