A basic RNN compresses the entire past into one hidden vector updated at every step — and gradients over long unrolls vanish before they reach distant inputs. For credit-event sequences, order-book updates, or text, that bottleneck makes long-range dependencies unreliable. Long short-term memory (LSTM) and gated recurrent unit (GRU) cells add learned gates that decide what to remember, overwrite, and expose, giving the network a controllable memory path instead of an all-or-nothing state update.
In this lesson
- Learning objectives
- The LSTM cell
- The GRU cell
- Worked example
Before you start
The full lesson, with worked examples and exercise solutions, is for members.
Read the full lessonNew to SelfMadeQuant.com? See membership options or explore the curriculum.