โ›ฉ๏ธ Gated Recurrent Unit

Deep Learning / Natural Language Processing

Theory

GRUs tackle the vanishing gradient problem in ๐Ÿ’ฌ Recurrent Neural Networks by selecting which parts of the hidden state to modify; its idea is similar to ๐ŸŽฅ Long Short-Term Memory, but it maintains only the hidden state and no long-term cell state.

GRUs modify the hidden state using two gates.

  1. Reset gate uses and to choose parts of to zero out.
  2. Update gate uses and to select how much of the past information from to keep.

Model

The model structure is depicted below.

Note that sigmoids (in red) are used for selection since they're bounded from to , and tanh (in blue) is used for activations.

Content by William Liang, written in Obsidian.
Thank you to all the educators who made these notes possible.