[Paper Review] C-LSTM: Enabling Efficient LSTM using Structured Compression Techniques on FPGAs
This paper proposes C-LSTM, a framework that uses block-circulant matrix compression and FFT-based computation to enable efficient LSTM inference on FPGAs. By replacing unstructured sparse weights with structured, dense block-circulant matrices, it eliminates irregular memory access and computation, achieving up to 18.8X higher performance and 33.5X better energy efficiency than state-of-the-art FPGA implementations with minimal accuracy loss.
Recently, significant accuracy improvement has been achieved for acoustic recognition systems by increasing the model size of Long Short-Term Memory (LSTM) networks. Unfortunately, the ever-increasing size of LSTM model leads to inefficient designs on FPGAs due to the limited on-chip resources. The previous work proposes to use a pruning based compression technique to reduce the model size and thus speedups the inference on FPGAs. However, the random nature of the pruning technique transforms the dense matrices of the model to highly unstructured sparse ones, which leads to unbalanced computation and irregular memory accesses and thus hurts the overall performance and energy efficiency. In contrast, we propose to use a structured compression technique which could not only reduce the LSTM model size but also eliminate the irregularities of computation and memory accesses. This approach employs block-circulant instead of sparse matrices to compress weight matrices and reduces the storage requirement from $\mathcal{O}(k^2)$ to $\mathcal{O}(k)$. Fast Fourier Transform algorithm is utilized to further accelerate the inference by reducing the computational complexity from $\mathcal{O}(k^2)$ to $\mathcal{O}(k ext{log}k)$. The datapath and activation functions are quantized as 16-bit to improve the resource utilization. More importantly, we propose a comprehensive framework called C-LSTM to automatically optimize and implement a wide range of LSTM variants on FPGAs. According to the experimental results, C-LSTM achieves up to 18.8X and 33.5X gains for performance and energy efficiency compared with the state-of-the-art LSTM implementation under the same experimental setup, and the accuracy degradation is very small.
Motivation & Objective
- Address the inefficiency of sparse LSTM models on FPGAs due to irregular memory access and unbalanced computation caused by unstructured pruning.
- Overcome FPGA on-chip memory limitations by reducing LSTM weight storage from O(k²) to O(k) using block-circulant matrix compression.
- Enable high-performance, energy-efficient FPGA deployment of LSTMs by combining structured compression with FFT-accelerated matrix multiplication.
- Develop an automatic framework to optimize and synthesize diverse LSTM variants for FPGA deployment with minimal manual effort.
- Achieve significant performance and energy efficiency gains over existing FPGA-based LSTM accelerators while maintaining high model accuracy.
Proposed method
- Replace dense LSTM weight matrices with block-circulant matrices, reducing storage complexity from O(k²) to O(k) by representing each block with a single vector.
- Apply the Fast Fourier Transform (FFT) to accelerate block-circulant matrix multiplication, reducing computational complexity from O(k²) to O(k log k).
- Quantize activation functions to 16-bit fixed-point representations and use a 22-segment piecewise linear approximation to reduce resource usage compared to lookup tables.
- Design a hardware-friendly, regular dataflow that supports pipelined, parallel execution of circulant convolutions, avoiding irregular memory access patterns.
- Integrate a high-level synthesis (HLS)-based automatic framework that generates optimized, synthesizable C++ code for various LSTM architectures.
- Use iterative training with structured sparsity to maintain model accuracy during compression, balancing compression ratio and inference performance.
Experimental results
Research questions
- RQ1Can structured compression using block-circulant matrices eliminate the irregular computation and memory access patterns inherent in unstructured sparse pruning for LSTM models on FPGAs?
- RQ2To what extent can FFT-based acceleration of circulant matrix multiplication improve computational efficiency and reduce resource usage in FPGA-accelerated LSTMs?
- RQ3How does the proposed C-LSTM framework compare to state-of-the-art FPGA-based LSTM accelerators in terms of performance, energy efficiency, and accuracy?
- RQ4Can the framework automatically generate high-performance, resource-efficient FPGA implementations for diverse LSTM variants without manual tuning?
- RQ5What is the trade-off between model compression, computational efficiency, and accuracy degradation when using block-circulant compression in LSTMs?
Key findings
- On the KU060 FPGA platform, C-LSTM achieves up to 19.3X performance speedup and 35.9X energy efficiency gain over the ESE baseline for the Small LSTM model.
- On the ADM-7V3 platform, C-LSTM achieves 17.5X performance speedup and 31.9X performance speedup with 34.2X and 59.4X energy efficiency gains, respectively.
- The accuracy degradation for the Small LSTM model is only 0.29% (FFT8) and 1.16% (FFT16), demonstrating minimal impact on model quality.
- The C-LSTM framework achieves up to 18.8X higher performance and 33.5X better energy efficiency than the state-of-the-art FPGA LSTM implementation under identical conditions.
- The use of FFT-based circulant convolution reduces computational complexity from O(k²) to O(k log k), enabling faster inference with lower resource utilization.
- The framework's automatic synthesis pipeline successfully generates optimized, synthesizable C++ code for various LSTM variants, reducing development time and manual effort.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.