[Paper Review] Grow and Prune Compact, Fast, and Accurate LSTMs
This paper proposes Hidden-layer LSTMs (H-LSTMs) with grow-and-prune (GP) training to create compact, fast, and accurate models. By adding internal hidden layers to LSTM control gates and using gradient-based growth and magnitude-based pruning, the method reduces parameters by up to 38.7×, FLOPs by 45.5×, and latency by 4.5×, while improving CIDEr score by 2.6 and reducing WER from 12.9% to 8.7% in speech recognition.
Long short-term memory (LSTM) has been widely used for sequential data modeling. Researchers have increased LSTM depth by stacking LSTM cells to improve performance. This incurs model redundancy, increases run-time delay, and makes the LSTMs more prone to overfitting. To address these problems, we propose a hidden-layer LSTM (H-LSTM) that adds hidden layers to LSTM's original one level non-linear control gates. H-LSTM increases accuracy while employing fewer external stacked layers, thus reducing the number of parameters and run-time latency significantly. We employ grow-and-prune (GP) training to iteratively adjust the hidden layers through gradient-based growth and magnitude-based pruning of connections. This learns both the weights and the compact architecture of H-LSTM control gates. We have GP-trained H-LSTMs for image captioning and speech recognition applications. For the NeuralTalk architecture on the MSCOCO dataset, our three models reduce the number of parameters by 38.7x [floating-point operations (FLOPs) by 45.5x], run-time latency by 4.5x, and improve the CIDEr score by 2.6. For the DeepSpeech2 architecture on the AN4 dataset, our two models reduce the number of parameters by 19.4x (FLOPs by 23.5x), run-time latency by 15.7%, and the word error rate from 12.9% to 8.7%. Thus, GP-trained H-LSTMs can be seen to be compact, fast, and accurate.
Motivation & Objective
- Address the trade-off between model accuracy, inference speed, and parameter efficiency in deep LSTMs.
- Overcome limitations of stacked LSTMs, which increase latency, parameters, and overfitting risk.
- Develop a method to jointly learn optimal network architecture and weights for compact, high-performance LSTMs.
- Enable deployment of accurate LSTMs on resource-constrained devices like mobile and embedded systems.
- Achieve superior performance across three key metrics: model size, inference speed, and accuracy.
Proposed method
- Propose H-LSTM, which enhances LSTM control gates with multiple hidden layers to enable multi-level abstraction within the cell.
- Introduce a grow-and-prune (GP) training framework that combines gradient-based growth and magnitude-based pruning to co-optimize weights and architecture.
- Use leaky ReLU during the growth phase to prevent dying ReLU neurons, then switch to ReLU for final training and pruning.
- Apply magnitude-based pruning to remove low-importance connections after growth, achieving high sparsity (up to 94.22%).
- Leverage ReLU activation in H-LSTM gates to reduce FLOPs by 14.5% at inference due to sparse activation patterns.
- Train models end-to-end with backpropagation, allowing the network to learn both the optimal structure and weights.
Experimental results
Research questions
- RQ1Can adding internal hidden layers to LSTM control gates improve model accuracy while reducing parameter count and inference latency?
- RQ2Can a combined grow-and-prune (GP) training strategy effectively learn both the weights and the architecture of H-LSTMs?
- RQ3Does the use of ReLU in H-LSTM gates lead to measurable FLOPs and latency reductions compared to standard LSTM with sigmoid/tanh gates?
- RQ4Can H-LSTMs with reduced width still outperform standard stacked LSTMs in terms of accuracy, speed, and compactness?
- RQ5To what extent does regularization (e.g., dropout) improve generalization in H-LSTM models?
Key findings
- For image captioning on MSCOCO, the GP-trained H-LSTM reduced parameters by 38.7× and FLOPs by 45.5×, with a 4.5× reduction in run-time latency and a 2.6-point improvement in CIDEr score.
- For speech recognition on AN4, the H-LSTM reduced parameters by 19.4× and FLOPs by 23.5×, with a 15.7% reduction in latency and a word error rate drop from 12.9% to 8.7%.
- The final compact H-LSTM model achieved 94.22% sparsity through compounding growth and pruning, significantly reducing model size.
- Using ReLU in H-LSTM gates reduced FLOPs by 14.5% at inference due to 48.3% average activation sparsity.
- A single-layer H-LSTM with reduced width (320 instead of 512) achieved better performance than a standard LSTM in all three design dimensions: accuracy, speed, and compactness.
- Dropout regularization improved CIDEr by 2.0 points and reduced WER by 0.96 points, confirming its importance in H-LSTM generalization.
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.