[Paper Review] Dynamically Hierarchy Revolution: DirNet for Compressing Recurrent Neural Network on Mobile Devices
DirNet is a dynamic model compression framework for recurrent neural networks that jointly optimizes sparsity and dictionary learning across hierarchical layers to enable high-rate compression with minimal accuracy loss. By dynamically mining dictionary atoms and adaptively adjusting sparsity per layer, DirNet achieves up to 8× model compression on mobile devices with real-time inference and negligible WER degradation on ASR and language modeling tasks.
Recurrent neural networks (RNNs) achieve cutting-edge performance on a variety of problems. However, due to their high computational and memory demands, deploying RNNs on resource constrained mobile devices is a challenging task. To guarantee minimum accuracy loss with higher compression rate and driven by the mobile resource requirement, we introduce a novel model compression approach DirNet based on an optimized fast dictionary learning algorithm, which 1) dynamically mines the dictionary atoms of the projection dictionary matrix within layer to adjust the compression rate 2) adaptively changes the sparsity of sparse codes cross the hierarchical layers. Experimental results on language model and an ASR model trained with a 1000h speech dataset demonstrate that our method significantly outperforms prior approaches. Evaluated on off-the-shelf mobile devices, we are able to reduce the size of original model by eight times with real-time model inference and negligible accuracy loss.
Motivation & Objective
- To address the challenge of deploying large RNNs on resource-constrained mobile devices due to high computational and memory demands.
- To overcome the limitations of existing compression methods that lack dynamic adaptation to varying layer-level redundancies and fixed compression rates.
- To enable high compression rates with minimal accuracy loss by jointly optimizing inter-layer and recurrent weight matrix compression.
- To develop a method that adaptively adjusts sparsity across hierarchical layers based on structural and functional differences in RNNs.
- To achieve real-time inference on off-the-shelf mobile hardware while preserving model performance.
Proposed method
- DirNet employs a fast dictionary learning algorithm to dynamically mine dictionary atoms from the projection dictionary matrix within each layer, enabling layer-specific compression rate control.
- It jointly compresses both recurrent and inter-layer weight matrices using a shared projection dictionary to maintain representation consistency across the network.
- The method adaptively sets different sparsity levels for sparse codes in each hidden layer based on the layer's functional role and redundancy, minimizing performance drop.
- A dynamic shrinking mechanism adjusts the compression rate via a parameterized sparsity control (Θ⁰) and a shrinking factor (γ), optimizing convergence and compression quality.
- The framework uses a hierarchical optimization strategy that iteratively refines the dictionary and sparse codes while preserving model accuracy.
- It integrates a shared codebook representation across layers to improve parameter efficiency and generalization during compression.
Experimental results
Research questions
- RQ1Can dynamic, layer-specific compression via dictionary learning achieve higher compression rates than static or uniform methods in RNNs?
- RQ2How does adaptive sparsity control across hierarchical layers affect model accuracy and inference speed in compressed RNNs?
- RQ3To what extent can DirNet maintain near-original performance while reducing model size by up to 8× on mobile devices?
- RQ4How does the combination of dynamic dictionary atom mining and adaptive sparsity compare to SVD or pruning-based compression in terms of speedup and accuracy?
- RQ5What parameter settings (Θ⁰ and γ) yield optimal trade-offs between compression efficiency and model performance?
Key findings
- DirNet achieves 4.3× compression with 1.3M parameters and 12.9% WER on LibriSpeech, matching the original 10.3M-parameter model’s 12.7% WER, while SVD and ODL methods suffer 3.4–3.9% WER degradation at similar compression levels.
- At 7.9× compression, DirNet maintains 12.9% WER, whereas LSTM-SVD and LSTM-ODL degrade to 16.1% and 14.3% WER, respectively, demonstrating superior accuracy retention.
- DirNet achieves 4.2× speedup on mobile CPU compared to 1.4× and 2.6× for LSTM-SVD and LSTM-ODL, respectively, under the same compression level.
- The optimal initial sparsity parameter Θ⁰ = 10⁷ and shrinking factor γ = 0.4 were found to balance convergence speed and compression quality, with performance dropping sharply at lower Θ⁰ values.
- Adaptive hierarchy compression allows DirNet to maintain lower WER than LSTM-SVD even with identical neuron counts, confirming the benefit of layer-specific sparsity tuning.
- DirNet enables real-time inference on off-the-shelf mobile devices with 8× model compression and negligible accuracy loss, demonstrating practical deployability.
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.