TL;DR
E-RNN is a systematic framework that optimizes Recurrent Neural Networks (RNNs) for FPGA deployment by using block-circulant matrices and ADMM-based training. It achieves up to a 37.4× energy efficiency improvement over state-of-the-art pruning methods (ESE) and more than 2× improvement over previous structured compression techniques (C-LSTM) with negligible accuracy loss.
What Problem Does This Paper Address?
Recurrent Neural Networks, specifically LSTMs and GRUs, are the backbone of time-series tasks like speech recognition. However, they are notoriously difficult to implement on hardware for two reasons:
- Computational Intensity: They require massive matrix-vector multiplications and complex activation functions (tanh/sigmoid).
- Irregularity: Standard compression techniques like "weight pruning" result in sparse, irregular matrices that are hard to parallelize efficiently on FPGAs.
Previous attempts either suffered from this irregularity (ESE) or lacked a systematic way to optimize the "block size" of the matrices alongside hardware constraints. The authors identify a gap: there was no cross-layer framework that jointly optimized the algorithm (model type, compression ratio) and the hardware (parallelism, quantization).
Methods
The authors propose E-RNN, which utilizes block-circulant matrices to represent weights. In this format, a weight matrix is divided into square blocks where each row is a cyclic shift of the one above it. This allows the model to:
- Reduce storage complexity from $O(n^2)$ to $O(n)$.
- Transform expensive matrix multiplications into Fast Fourier Transforms (FFT), reducing computational complexity from $O(n^2)$ to $O(n \log n)$.
Key Innovations:
- ADMM-Based Training: Instead of simply forcing a pre-trained model into a block-circulant format (which kills accuracy), they use the Alternating Direction Method of Multipliers (ADMM). This technique treats the block-circulant requirement as a constraint during training, "nudging" the weights into the desired structure while maintaining high accuracy.
- Two-Phase Optimization:
- Phase I (Algorithm): Determines the model type (LSTM vs. GRU), layer size, and optimal block size.
- Phase II (Hardware): Optimizes the Processing Elements (PEs), quantization (12-bit fixed-point), and activation function implementation using High-Level Synthesis (HLS).
- FFT-IFFT Decoupling: In hardware, they pre-calculate the FFT of weights and reuse input FFTs across multiple blocks, significantly reducing the number of operations.
Datasets
The framework was evaluated using the TIMIT dataset, a standard benchmark for Automatic Speech Recognition (ASR). It contains broadband recordings of 630 speakers and is used to measure the Phone Error Rate (PER).
Key Insights and Ideas
- Block Size > Layer Size: A major "aha" moment in the paper is that increasing the block size (compression ratio) has a much smaller impact on accuracy than reducing the number of hidden neurons (layer size). This suggests that designers should prioritize aggressive block-circulant compression over shrinking the network width.
- The "Symmetry" Bonus: Since RNN inputs and weights are real-valued (not complex), the FFT results are symmetric. The authors exploited this to cut the multiplication and storage requirements for intermediate FFT results by half.
- GRU vs. LSTM: The framework makes it easy to swap between model types. They found that switching from LSTM to GRU with a fixed block size often yields better performance/area because GRUs have fewer gates and less internal state to manage.
Key Results
The authors deployed E-RNN on Xilinx Kintex UltraScale and Virtex-7 FPGAs.
- Energy Efficiency: E-RNN is 37.4× more energy-efficient than ESE and 2× more than C-LSTM.
- Throughput: It achieved a massive jump in Frames Per Second (FPS). For example, on the 7V3 platform, E-RNN (FFT16) reached over 382,000 FPS, compared to ESE's ~17,500.
- Accuracy: Even with a 16× parameter reduction (block size 16), the Phone Error Rate degradation was only ~0.3%, making it highly practical for real-world ASR.
Limitations and Future Work
While the results are impressive, the paper focuses primarily on the inference phase. The ADMM training itself still happens on a general-purpose computer/GPU. Additionally, the framework is currently tailored for Automatic Speech Recognition; while the authors claim it is generalizable, its performance on other RNN tasks like video analysis or complex natural language generation remains to be seen. The authors also suggest that this systematic framework could be extended to ASIC (Application-Specific Integrated Circuit) designs for even greater efficiency.
Summary updated