[Paper Review] Convolutional neural network compression for natural language processing
This paper proposes a hybrid compression framework for convolutional neural networks (CNNs) in natural language processing, combining quantization and pruning to reduce model size for deployment on resource-constrained embedded systems. The method achieves up to 93% memory reduction with less than 1% accuracy drop, demonstrating that 5-bit quantization preserves performance and FPGA implementation enables efficient hardware mapping with 3.3× reduction in flip-flop usage and 4.2× reduction in LUT usage.
Convolutional neural networks are modern models that are very efficient in many classification tasks. They were originally created for image processing purposes. Then some trials were performed to use them in different domains like natural language processing. The artificial intelligence systems (like humanoid robots) are very often based on embedded systems with constraints on memory, power consumption etc. Therefore convolutional neural network because of its memory capacity should be reduced to be mapped to given hardware. In this paper, results are presented of compressing the efficient convolutional neural networks for sentiment analysis. The main steps are quantization and pruning processes. The method responsible for mapping compressed network to FPGA and results of this implementation are presented. The described simulations showed that 5-bit width is enough to have no drop in accuracy from floating point version of the network. Additionally, significant memory footprint reduction was achieved (from 85% up to 93%).
Motivation & Objective
- To address the challenge of deploying large, memory-intensive CNNs for NLP on embedded systems with limited memory and power.
- To evaluate the feasibility and efficiency of using FPGAs for deploying compressed NLP models.
- To investigate the impact of quantization and pruning on model size and accuracy in sentiment analysis tasks.
- To identify optimal precision settings and pruning thresholds that maintain high accuracy while minimizing model footprint.
Proposed method
- The authors apply post-training quantization to weights and activations, mapping floating-point values to lower-bit fixed-point representations (e.g., 5-bit, 8-bit) using a dynamic fixed-point format.
- A random-restart hill climbing algorithm is used to search for optimal bit-width configurations per layer, minimizing accuracy drop below a 0.2% threshold.
- Pruning is applied using a magnitude-based approach, where weights below a threshold are set to zero, reducing MAC operations and model size.
- The combined quantization and pruning pipeline is implemented on an FPGA (Xilinx Virtex-7 VC707) to evaluate hardware resource utilization and performance.
- The method evaluates compression across multiple NLP datasets, analyzing layer-wise sensitivity to quantization and pruning.
- A general quantization mapping function is defined: $ q_{\text{fxp}} = \mu + \sigma \cdot \text{round}(\sigma^{-1} \cdot (x - \mu)) $, enabling dynamic fixed-point representation.
Experimental results
Research questions
- RQ1What is the minimal bit-width required for quantization that maintains near-identical accuracy to the full-precision model?
- RQ2How does the combination of quantization and pruning affect model size and inference accuracy in NLP tasks?
- RQ3What is the optimal configuration of bit-widths and pruning thresholds per layer that minimizes model size with acceptable accuracy loss?
- RQ4To what extent can FPGA-based deployment reduce hardware resource usage while maintaining model performance?
Key findings
- 5-bit quantization preserves model accuracy within 1% of the full-precision floating-point version, with no significant drop in performance.
- The model size was reduced by 84% to 93% across datasets, with word embeddings accounting for over 93% of the model's memory footprint.
- Joint quantization and pruning reduced FPGA flip-flop usage by 3.3× and LUT usage by 4.2×, with minimal impact on accuracy.
- The random-restart hill climbing algorithm successfully identified optimal bit-width configurations, achieving high compression with less than 0.2% accuracy degradation.
- Pruning thresholds between 0.03 and 0.035 caused a significant drop in accuracy, while thresholds above 0.055 led to rapid performance degradation.
- The study found that joint reduction of weights and activations outperformed individual compression strategies, especially at lower bit-widths.
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.