DX Heroes logo
#ai
#machine-learning

What is a recurrent neural network (RNN)?

Length: 

3 min

Published: 

June 9, 2026

What is a recurrent neural network (RNN)?

What is a recurrent neural network?

A recurrent neural network (RNN) is a type of neural network designed for data that comes in order: words in a sentence, samples in an audio clip, or readings over time. It processes the sequence one step at a time and keeps a hidden state, a small running memory that it passes forward. Each new input is read together with that memory, so the network's answer depends not just on the current step but on everything it saw before.

That memory is what makes RNNs different from networks that treat every input in isolation. It lets them notice that the meaning of a word depends on earlier words, or that today's sales depend on last week's. Variants like LSTM and GRU add gates that decide what to remember and what to forget, which helps the network hold on to important context across longer sequences.

In plain words

Think of reading a sentence out loud. You do not understand each word on its own; you carry the gist of what you have read so far and use it to make sense of the next word. An RNN works the same way, holding a short memory that updates with every word it reads.

Where you see it

  • Speech recognition. Turning a stream of audio into text, word by word.
  • Time series. Forecasting sales, demand, or sensor readings from past values.
  • Older translation and text tools. RNNs powered the first wave of neural machine translation and autocomplete.
  • Anomaly detection. Flagging when a sequence of events drifts from its usual pattern.

Common pitfalls

  • They struggle with long context. Plain RNNs forget early information; that is why LSTM and GRU variants exist.
  • Training is slow. Reading one step at a time is hard to parallelise, so large RNNs train slowly.
  • Transformers have largely replaced them. For most language tasks, transformer models now win on quality and speed. RNNs still fit small, on-device, or streaming jobs.
  • Order has to matter. If the sequence is irrelevant, an RNN adds complexity for nothing.

Related articles:

  • What is a neural network? - The broader family that an RNN belongs to.
  • What is a transformer model? - The architecture that largely replaced RNNs for language.
  • What is a convolutional neural network (CNN)? - A sibling network built for images rather than sequences.

Want to stay one step ahead?

Don't miss our best insights. No spam, just practical analyses, invitations to exclusive events, and podcast summaries delivered straight to your inbox.