Home/Deep Learning/RNN (Recurrent Neural Network)
Deep Learning

RNN (Recurrent Neural Network)

A network that reads a sequence one step at a time, carrying a memory forward — the obvious way to handle language, and the reason it took so long to work.

Reviewed July 12, 2026Stable
Reading level: Curious
Pick your depth ↓

When not to use it

  • For anything you'd use a transformer for. It's sequential, so you can't parallelise training, and that's the whole ballgame on modern hardware.
  • On long dependencies, in vanilla form. The memory decays geometrically. That's the point of LSTMs.
  • When you can see the whole sequence. Attention connects every position directly. Recurrence makes you walk there.

Reach for something else instead

  • Transformer — parallel, direct connections, quadratic cost. What won.
  • LSTM / GRU — recurrence with additive gates so the gradient survives.
  • State-space models (Mamba) — recurrence done properly. Linear cost, constant state, competitive.
  • 1D convolutions — for local patterns in sequences, often enough and fully parallel.

An RNN reads a sequence one step at a time, passing a memory forward.

step 1x1y1step 2x2y2step 3x3y3 hidden state

Unlike a feedforward network, a recurrent network has a loop: at each step it takes the current input and its own previous hidden state, so information from earlier in the sequence carries forward. This is what lets it handle text, audio, and time series — but the same loop is why long sequences cause vanishing gradients, the problem LSTMs were built to fix.

Further reading

  • Elman (1990), Finding Structure in Time — the simple recurrent network; where the idea gets its modern form.
  • Bengio, Simard & Frasconi (1994), Learning Long-Term Dependencies with Gradient Descent is Difficult — the proof that it's structural, not a training bug.
  • Gu & Dao (2023), Mamba: Linear-Time Sequence Modeling with Selective State Spaces — recurrence, rebuilt properly.

Primary sources, listed so you can check the claims on this page rather than take them on trust.

Where people go wrong

  • Thinking transformers won on modelling elegance. They won on parallelism, which is a hardware fact.
  • Using a vanilla RNN for long sequences. It cannot retain the information; that isn't a tuning issue.
  • Forgetting truncated BPTT caps what the model can learn. Dependencies longer than the window are invisible.
  • Treating recurrence as dead. State-space models are recurrence, and they're a live contender.

At a glance

FieldDeep Learning
Idearead one step at a time, carry a hidden state
Two fatal flawssequential (no parallelism), memory decays geometrically
The mathsgradient involves Uᵏ; below 1 vanishes, above 1 explodes
Statusreplaced, and returning as state-space models
DifficultyIntermediate
Flashcards for this concept · study, save or share them →
Question
Answer
1 / 4

Often compared with

RNN vs. transformer — one walks through the sequence carrying a memory; the other connects every position directly. The second is parallel, which decided it.

Where this sits

4 concepts come first. Understanding it opens up 80 more.

4Levelsteps in
4Needs firstconcepts
80Opens up26% of 310
8Areascrosses fields
Learn these firstNeural Network
LEARN FIRST Neural Network RNN Encoder-Decoder Attention LSTM State Space Model UNLOCKS
RNN sits after Neural Network, and leads to 4 concepts.

Computed from the prerequisite graph, not assigned. How this works