GRU vs LSTM Tradeoffs
GRUs simplify the LSTM's three-gate, separate-cell-state design into two gates that directly blend old and new memory, usually training faster with fewer parameters at a small, task-dependent accuracy cost.
Prerequisites: LSTM Gate Mechanics: Forget, Input, Output, Recurrent Neural Networks
An LSTM regulates what it remembers with three separate gates — input, forget, output — plus a dedicated internal "notebook," the cell state, that those gates write to and read from. That design works well, but it is also relatively heavy: four full weight matrices per layer. A GRU asks whether a lighter design, without the separate notebook, can do nearly as well.
The analogy: two thermostat designs
An LSTM is a thermostat with three independent dials — how much old heat to keep, how much new heat to let in, how much of the result to actually show on the display — writing to a dedicated internal temperature log. A GRU is a simpler thermostat with two dials — how much to update, and how much of the old reading to reset — that blends old and new directly into one running reading, with no separate internal log to maintain.
The mechanics
LSTM's cell state update: — in words, keep a forget-gated fraction of the old cell memory, and add an input-gated fraction of new candidate information, with the hidden state then read out from through a separate output gate. GRU's hidden state update:
In words: the update gate directly decides the mixing proportion between the old hidden state and a new candidate — no separate cell state, no separate output gate, just one running state that is a weighted blend.
Worked example 1: a GRU update by hand
Update gate , old hidden state , candidate : . A low would keep the state close to ; here pulls it moderately toward the new candidate.
Worked example 2: an LSTM update and a parameter count
Forget gate , old cell state , input gate , candidate : . Now compare parameter counts for hidden size 64, input size 32: LSTM needs 4 weight matrices (input, forget, output, candidate) of combined input size , giving roughly parameters per layer; GRU needs 3 such matrices (update, reset, candidate), giving roughly — about 25% fewer parameters for the same hidden size.
GRU replaces LSTM's three gates and separate cell state with two gates that directly blend old and new hidden state, giving roughly 25% fewer parameters and often faster training with comparable accuracy on many mid-length sequence tasks — the right choice is task-dependent, not automatic.
What this means in practice
With a tight data or compute budget — for example, an intraday signal model retrained frequently — GRU's leaner design often trains faster and generalizes at least as well as an LSTM of the same hidden size. LSTM's extra cell state and output gate can help on tasks needing finer control over what is retained internally versus exposed externally, and sometimes edges ahead on longer or more intricate dependencies, but the gap is usually small enough that both should be benchmarked rather than assumed.
Don't assume LSTM is "strictly more powerful, so always better," just because it has more gates. More parameters for the same hidden size means it needs more data to train well and is more prone to overfitting on small datasets — exactly the setting where GRU's leaner design can generalize better in practice, not worse.
Related concepts
Practice in interviews
Further reading
- Cho et al., Learning Phrase Representations using RNN Encoder-Decoder (2014)