Paper commentary
Gate-Variants of Gated Recurrent Unit (GRU) Neural Networks
- Problem Each GRU gate has its own weights and bias, so parameters grow with every gate. It is unclear whether fewer gate signals can keep accuracy.
- Method GRU1, GRU2 and GRU3 drive both gates from fewer signals. GRU1 uses the previous state and a bias, GRU2 the previous state alone, and GRU3 a bias alone.
- Results On IMDB, GRU1 reached 84.1 test accuracy against 83.7 for the original GRU.
Why the gates cost parameters
Gated recurrent networks handle long sequences well, but every gate brings its own weights and bias, so parameters and computation rise with each gate added. The LSTM uses three gates while the GRU works with two, and an earlier proposal went further by reducing the external gates to one. This study keeps the GRU interpolation intact and asks whether the gates themselves can be driven by fewer signals while the model keeps its accuracy.
From the simple RNN to the GRU
A simple RNN builds its hidden state from the current input and the previous hidden state, using an input weight matrix, a recurrent weight matrix and a bias. The LSTM treats the simple RNN computation as a candidate for an internal memory cell, which is combined element-wise with the previous cell value through gating signals, and its three gates use the logistic function.
The LSTM therefore needs 4 × (n² + nm + n) parameters, against the simple RNN count of the same form for one block, where n is the hidden size and m is the input size.
The GRU replaces the memory cell with a direct interpolation between the previous hidden state and a candidate state, and the interpolation is steered by two gates, an update gate and a reset gate. Because of the interpolation, the GRU needs fewer gating signals than the LSTM, and its total parameter count is 3 × (n² + nm + n).
Three gate variants
The argument starts from the observation that gates are built like the simple RNN and are trained through backpropagation through time, so each gate update already reflects the state of the whole network. The argument then holds that the current input and the earlier hidden states are both already carried by the latest state, so the gates should be driven by the state rather than by redundant signals.
GRU1 computes each gate from the previous hidden state and a bias, and removes the input weights from both gates. That saves 2 × nm parameters relative to the GRU. GRU2 computes each gate from the previous hidden state alone, which removes the input weights and the bias of both gates, a saving of 2 × (nm + n) parameters.
GRU3 computes each gate from a bias vector alone, so the gate output no longer depends on the current input or on the hidden state at run time, and the learned bias is the only thing the gate sees. Relative to the GRU this removes 2 × (nm + n²) parameters. Each variant applies the same change to both the update gate and the reset gate, and the rest of the GRU structure stays as it is.
Training and model settings
The models were built in Python with the Keras library on Theano, and the Keras GRU layer class was modified into classes for GRU1, GRU2 and GRU3. All variants use ReLU as the recurrent activation, with a softmax output for MNIST and a logistic output for IMDB. Table I fixes 100 hidden units for pixel-wise MNIST, 100 for row-wise MNIST and 128 for IMDB, a sigmoid gate activation, RMSprop, 20% dropout and a batch size of 32, with 100, 50 and 100 epochs for the three tasks.
The learning rate starts from a base constant value and decays exponentially with the cost of the previous epoch, which speeds up training. The base constant learning rate was varied across the experiments, so each reported result is tied to the value it was run at.
Pixel-wise MNIST results
The MNIST set has 60000 training images and 10000 test images, and each image becomes a single-element sequence of length 784, one pixel at a time. At the base learning rate of 1e-3, GRU0 reached 99.19 train and 98.59 test, GRU1 98.88 and 98.37, and GRU2 98.90 and 98.10. At that rate GRU3 has no reported result, and the table lists 30600 parameters for GRU0, 30400 for GRU1, 30200 for GRU2 and 10400 for GRU3.
GRU1 and GRU2 stay close to GRU0 on this task at the rates where they were reported. GRU3 did not match them at the higher rate, but lowering the base learning rate to 0.0001 or below raised its test accuracy to 59.6 after 100 epochs. The curve still had a positive slope at 100 epochs, so the authors expect further gains with more training.
GRU3 uses about 33% of the adaptively computed parameters of GRU0 here, so the result shows a trade-off between accuracy and parameter count rather than a free saving. The experiments stop at 100 epochs and did not reach saturation for GRU3, so its converged accuracy on this task is not known from these runs.
Row-wise MNIST results
In the row-wise setting each image becomes a sequence of length 28 whose elements are 28-element vectors, trained for 50 epochs at three constant base learning rates. At 1e-2 the test accuracies were 98.49 for GRU0, 98.55 for GRU1, 98.71 for GRU2 and 98.85 for GRU3. At 1e-3 the test accuracies were 98.85 for GRU0, 98.93 for GRU1, 98.93 for GRU2 and 97.39 for GRU3.
At 1e-4 GRU3 is clearly behind, with 80.33 train and 87.96 test against 93.02 train and 96.66 test for GRU0, and its curve had not levelled off after 50 epochs. GRU3 has 13100 parameters against 38700 for GRU0, roughly one third, and the authors expect more epochs to bring it closer to the other variants. The parameter saving may matter more in some applications than in others, depending on the available resources.
IMDB sentiment results
The IMDB set has 25000 training and 25000 test reviews, each represented by up to 80 frequent words from a vocabulary of 20000 words. The models use 128-dimensional GRU variants with batch size 32 and train for 100 epochs at base learning rates of 1e-3 and 1e-4. At 1e-3 the test accuracies were 83.7 for GRU0, 84.1 for GRU1, 84.2 for GRU2 and 83.2 for GRU3, with 98688, 65920, 65664 and 33152 parameters.
At 1e-3 the accuracy curve fluctuates visibly, while at 1e-4 the curves progress steadily. At 1e-4 the test accuracies were 84.8 for GRU0, 84.8 for GRU1, 84.6 for GRU2 and 84.5 for GRU3, with GRU3 training at 86.8 against 87.4 for GRU0. The authors describe the IMDB results as the most favourable, since all three variants stay comparable to GRU0 with fewer parameters, and GRU3 follows the others in learning pace at 1e-4.
Limitations
GRU3 frequently lags in performance, especially for relatively long sequences, and the authors note that it may need more execution time to reach comparable performance. The pixel-wise curves were run for 100 epochs and did not reach saturation, so converged performance is not established.
The efficiency comparison in the tables is a count of parameters, and the tables report no training or inference time. The three variants have only been evaluated on the three sequence settings reported here, and the conclusion calls for evaluation on more diverse datasets.
Why a bias-only gate might still work
The authors suggest that the main signal driving the gates is the recurrent state, since it already contains the essential information about the other signals. They further argue that the stochastic gradient descent updates carry information about the network state into the gate biases, which would explain why a bias alone can still give comparable results.
This is an interpretation offered in the conclusion; the experiments compare accuracy and parameter counts and do not isolate the gate signal directly.
Paper info
- Authors
- Rahul Dey, Fathi M. Salem
- Venue
- arXiv · Preprint
- First published
- 2017-1-20
- Added
- 2026-11-12
- Updated
- 2017-1-20
- Version
- v1
- arXiv
- 1701.05923
- Category
- cs.NE · stat.ML
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Rahul Dey, Fathi M. Salem (2017). Gate-Variants of Gated Recurrent Unit (GRU) Neural Networks. arXiv:1701.05923v1. https://arxiv.org/abs/1701.05923v1
BibTeX
@misc{dey2017gate,
title = {{Gate-Variants of Gated Recurrent Unit (GRU) Neural Networks}},
author = {Rahul Dey and Fathi M. Salem},
year = {2017},
eprint = {1701.05923},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1701.05923v1}
}