GRU Architecture › Summary
Language AI HandbookAll chapters GRU Architecture › SummaryOne section · Sections in this chapter13 / 15 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
This chapter introduced the Gated Recurrent Unit as a streamlined alternative to LSTMs for sequence modeling.
The GRU achieves similar long-range memory capabilities as LSTMs while using a simpler architecture with fewer parameters. The key simplifications are:
- Single state vector: GRUs merge the cell state and hidden state into one, reducing memory overhead and simplifying the information flow.
- Two gates instead of three: The reset gate controls how much past context influences the candidate computation, while the update gate creates a weighted average between old and new states.
- Constrained update: The update gate enforces that the amount "forgotten" and the amount "added" sum to 1, which acts as implicit regularization.
The complete GRU equations, given previous hidden state and current input , are:
- Update gate:
- Reset gate:
- Candidate:
- Hidden state:
where is the sigmoid function, is the hyperbolic tangent, and denotes element-wise multiplication.
When choosing between GRUs and LSTMs, start with GRUs for their simplicity and efficiency. Switch to LSTMs if you need maximum performance on complex tasks or very long sequences. In practice, the differences are often small enough that other factors matter more.
In the next chapter, we'll explore bidirectional RNNs, which process sequences in both forward and backward directions to capture context from both past and future positions.