Restricted Recurrent Neural Networks

Enmao Diao, Jie Ding, Vahid Tarokh · DOI

Introduction

Recurrent Neural Networks (RNNs), particularly Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU) architectures, have long been the standard for sequence modeling tasks. However, their effectiveness comes at a significant computational cost. An LSTM, for example, typically contains four times the parameters of a vanilla RNN, making deployment on resource-constrained edge devices—such as smartphones or IoT sensors—a significant challenge.

Traditional approaches to model compression, such as pruning or quantization, often require a complex, multi-stage pipeline involving training a large "teacher" model followed by iterative fine-tuning. This paper introduces Restricted Recurrent Neural Networks (RRNN), a structural approach that achieves significant compression (often 50%) by design, allowing models to be trained from scratch with a reduced parameter footprint.

The RRNN Architecture

The core innovation of the RRNN is Parameter Sharing by Design. In a standard recurrent cell, the model utilizes two distinct weight matrices at each time step: $W_{xh}$ for the current input and $W_{hh}$ for the previous hidden state. The authors posit that these two sources of information often contain redundant or highly dependent features.

Instead of maintaining separate matrices, RRNN introduces a sharing rate ($r$). Under this framework:

  1. A central pool of parameters is created.
  2. The matrices $W_{xh}$ and $W_{hh}$ are constructed by indexing into this shared pool.
  3. The hyperparameter $r$ determines the overlap; for instance, at $r=0.5$, approximately half of the parameters used to process the input are identical to those used for the hidden state.

This mechanism is generalized across LSTMs and GRUs, where sharing can occur not only between input and hidden states but also across the various functional gates (input, forget, and output gates) that regulate information flow.

Experimental Methodology

The authors evaluated the RRNN framework on two prominent natural language processing benchmarks:

  • Penn Treebank (PTB): A classic dataset with a 10k vocabulary, used to evaluate next-word prediction.
  • WikiText-2 (WT2): A more modern and complex dataset (33k vocabulary) sourced from Wikipedia, featuring a wider range of punctuation and capitalization, providing a more robust test of language modeling capabilities.

Key Insights

Compression as Regularization

One of the paper's most compelling findings is that restricting parameters does not merely save space—it can actually improve model performance. By limiting the "superfluous degrees of freedom" inherent in large LSTMs, the parameter sharing acts as a form of structural regularization. This prevents the model from overfitting to the training data, often leading to better generalization on unseen text.

The Phase Transition

The experiments identified a "phase transition" in model performance relative to the sharing rate. Moving from no sharing ($r=0$) to partial sharing ($r=0.5$) frequently maintains or even improves accuracy. However, there is a distinct tipping point as $r$ approaches 1.0; at this level of extreme sharing, the model loses the capacity to distinguish between new input and historical context, leading to a degradation in performance.

Efficiency and Control

Unlike post-hoc compression methods like pruning, RRNNs offer a "train-from-scratch" solution. The compression rate is explicitly controlled by the hyperparameter $r$, providing engineers with a predictable "knob" to balance model size against performance requirements for specific hardware targets.

Results

The Restricted LSTM (RLSTM) demonstrated impressive results on the PTB benchmark. With a sharing rate of $r=0.5$, the RLSTM achieved a test perplexity of 103.5, outperforming several larger, non-restricted models. Furthermore, the study showed that a Restricted LSTM could outperform a classical vanilla RNN while utilizing significantly fewer total parameters.

Conclusion and Future Work

Restricted Recurrent Neural Networks provide a streamlined path toward efficient sequence modeling. By enforcing parameter sharing at the architectural level, the authors demonstrate that it is possible to halve the size of recurrent models without sacrificing accuracy—and in some cases, improving it through regularization.

While the current research focuses on language modeling, future applications could extend to speech recognition and time-series forecasting. Additionally, the authors suggest that RRNNs could be combined with traditional pruning as a secondary stage, potentially pushing the boundaries of neural network compression even further.

Summary updated

BibTeX
@inproceedings{diao2019restricted,
  author = {Enmao Diao and Jie Ding and Vahid Tarokh},
  title = {{Restricted Recurrent Neural Networks}},
  booktitle = {IEEE BigData},
  year = {2019},
  doi = {10.1109/bigdata47090.2019.9006257},
}
Figure