On the compression of recurrent neural networks with an application to LVCSR acoustic modeling for embedded speech recognition

Rohit Prabhavalkar, Ouais Alsharif, Antoine Bruguier, Ian McGraw

Abstract

Modern Large Vocabulary Continuous Speech Recognition (LVCSR) systems often rely on large Recurrent Neural Networks (RNNs), particularly LSTMs, which are computationally expensive and memory-intensive. This paper proposes a novel joint factorization technique using Singular Value Decomposition (SVD) to compress these models for on-device deployment. By introducing a shared projection layer across recurrent and inter-layer weight matrices, the authors achieve a 3x reduction in model size with minimal impact on Word Error Rate (WER).

Introduction

Voice-activated assistants traditionally process speech in the cloud due to the high resource demands of acoustic models. However, moving this processing "on-device" is crucial for reducing latency, enhancing privacy, and enabling offline functionality. Mobile devices are constrained by memory and power, making standard high-performing LSTMs impractical. While compression techniques exist for feed-forward networks, the complex, time-dependent nature of RNNs requires specialized approaches. This paper addresses the challenge of shrinking these models without sacrificing the accuracy required for production-level speech recognition.

Methods: Joint Factorization and Shared Projections

The core innovation is a joint factorization approach. In a standard RNN layer, two primary weight matrices exist: the inter-layer weights ($W_x$) connecting layers and the recurrent weights ($W_h$) connecting the layer's state over time.

Instead of compressing these matrices independently, the authors propose a shared recurrent projection matrix ($P^l$). They decompose the weights such that $W_h \approx Z_h P^l$ and $W_x \approx Z_x P^l$. By sharing $P^l$, a "bottleneck" is created that significantly reduces the total parameter count.

Architecture of standard (a) and compressed (b) RNN layers using a shared projection matrix.

Implementation involves using SVD on the recurrent weights to initialize the shared projection matrix. This is followed by solving a least-squares problem for $Z_x$ and a critical fine-tuning phase using Connectionist Temporal Classification (CTC) and state-level minimum Bayes risk (sMBR) criteria to recover accuracy lost during the initial approximation.

Experimental Setup

The method was evaluated on a large-scale task using approximately 2,000 hours of hand-transcribed, anonymized Google voice search traffic. To ensure robustness, "multi-style" training was employed, adding synthetic noise and reverberation. Evaluation was conducted on 13.3k utterances using a 5-gram language model pruned to fit on-device constraints (approx. 20.3 MB).

Results and Discussion

The researchers found that recurrent and inter-layer matrices share significant structural redundancy, allowing a single projection matrix to represent both effectively. They also observed that earlier layers tend to have lower ranks (higher redundancy) than later layers, which their method automatically accounts for via an explained variance threshold ($\tau$).

Performance metrics for various compression thresholds, showing the trade-off between model size and Word Error Rate (WER).

As shown in the results, the baseline model of 9.7M parameters achieved a 12.4% WER. By setting the explained variance threshold $\tau=0.60$, the model was compressed to 3.1M parameters (a 3x reduction) with a WER of only 12.9%. This represents a highly favorable trade-off for embedded applications. Even at this size, the model's performance remains competitive with much larger "server-side" models (20.1M parameters, 11.3% WER).

Conclusion

The proposed joint factorization method provides a robust framework for compressing RNNs for mobile deployment. While performance begins to degrade significantly when the variance threshold drops below 0.5, the 3x compression achieved at $\tau=0.60$ is highly effective for practical use. Future work may explore layer-specific rank optimization and the integration of weight quantization to further minimize the footprint of on-device speech recognition systems.

Summary updated

BibTeX
@misc{prabhavalkar2016compression,
  author = {Rohit Prabhavalkar and Ouais Alsharif and Antoine Bruguier and Ian McGraw},
  title = {{On the compression of recurrent neural networks with an application to LVCSR acoustic modeling for embedded speech recognition}},
  year = {2016},
  eprint = {1603.08042},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1603.08042},
}
Figure