Gated recurrent units (GRUs) are a gating mechanism in
recurrent neural networks
A recurrent neural network (RNN) is a class of artificial neural networks where connections between nodes can create a cycle, allowing output from some nodes to affect subsequent input to the same nodes. This allows it to exhibit temporal dynamic ...
, introduced in 2014 by Kyunghyun Cho et al. The GRU is like a
long short-term memory
Long short-term memory (LSTM) is an artificial neural network used in the fields of artificial intelligence and deep learning. Unlike standard feedforward neural networks, LSTM has feedback connections. Such a recurrent neural network (RNN) ca ...
(LSTM) with a forget gate,
but has fewer parameters than LSTM, as it lacks an output gate.
GRU's performance on certain tasks of polyphonic music modeling, speech signal modeling and natural language processing was found to be similar to that of LSTM.
GRUs have been shown to exhibit better performance on certain smaller and less frequent datasets.
[ ]
Architecture
There are several variations on the full gated unit, with gating done using the previous hidden state and the bias in various combinations, and a simplified form called minimal gated unit.
The operator
denotes the
Hadamard product in the following.
Fully gated unit

Initially, for
, the output vector is
.
:
Variables
*
: input vector
*
: output vector
*
: candidate activation vector
*
: update gate vector
*
: reset gate vector
*
,
and
: parameter matrices and vector
Activation function
In artificial neural networks, the activation function of a node defines the output of that node given an input or set of inputs.
A standard integrated circuit can be seen as a digital network of activation functions that can be "ON" (1) or " ...
s
*
: The original is a
sigmoid function
A sigmoid function is a mathematical function having a characteristic "S"-shaped curve or sigmoid curve.
A common example of a sigmoid function is the logistic function shown in the first figure and defined by the formula:
:S(x) = \frac = \ ...
.
*
: The original is a
hyperbolic tangent
In mathematics, hyperbolic functions are analogues of the ordinary trigonometric functions, but defined using the hyperbola rather than the circle. Just as the points form a circle with a unit radius, the points form the right half of the ...
.
Alternative activation functions are possible, provided that