Aug 22, 2025

How LSTMs and GRUs Improve RNNs (and Why Elman Is the Base)

Classic RNNs (like the Elman network) introduced recurrence but struggled with vanishing gradients, making long‑term memory hard. LSTMs and GRUs solve this by adding gates that control what to remember and what to forget.

Elman as the foundation

The Elman network is the simplest RNN:

  • It passes the previous hidden state into the next step.
  • That recurrence is the core idea behind LSTMs and GRUs.

LSTMs and GRUs keep the same recurrence structure, but add learned gates to preserve memory over longer sequences.

How LSTM improves RNNs

LSTMs add a cell state and three gates:

  • Forget gate: decides what to drop from memory.
  • Input gate: decides what to store.
  • Output gate: decides what to expose.

This allows the network to keep information for many time steps without gradients vanishing.

How GRU improves RNNs

GRUs simplify LSTMs with two gates:

  • Update gate: mixes old and new information.
  • Reset gate: clears irrelevant past context.

GRUs are simpler and often faster, while still handling long‑term dependencies better than Elman RNNs.

Where they are used

  • NLP: language modeling, translation, speech recognition.
  • Time‑series forecasting: demand prediction, anomaly detection.
  • Signals: sensor streams, audio processing, finance.

Quick comparison

ModelMemory lengthComplexityNotes
Elman RNNShortLowSimple, but vanishing gradients
LSTMLongHighBest long‑term memory, heavier compute
GRULongMediumFaster than LSTM, fewer parameters

Summary

Elman RNNs introduced recurrence, but LSTMs and GRUs made it practical for long sequences. If you need long‑term memory, LSTMs or GRUs are usually better choices; if your sequences are short or compute is limited, Elman‑style RNNs can still work.


Thanks for reading! If you want to see future content, you can follow me on Twitter or get connected over at LinkedIn.


Support My Content

If you find my content helpful, consider supporting a humanitarian cause (building homes for elderly people in rural Terai region of Nepal) that I am planning with your donation:

Ethereum (ETH)

0xB62409A5B227D2aE7D8C66fdaA5EEf4eB4E37959

Thank you for your support!