Deep Learning ยท Supervised learning

Recurrent Neural Networks

Neural networks with memory that read sequences such as text, transactions, or sensor streams.

Recurrent neural network shown folded and unfolded across time steps
Diagram: fdeloche, CC BY-SA 4.0, via Wikimedia Commons

Category

Deep Learning

Learning type

Supervised

Complexity

High

Interpretability

Low

Overview

What recurrent neural networks does

A recurrent neural network (RNN) processes a sequence one step at a time and carries a hidden state forward, so what it saw earlier shapes how it reads what comes next. Variants such as LSTM and GRU add gates that decide what to remember and what to forget, which lets them learn longer-range patterns in text, time series, and event logs.

Formula

hโ‚œ = tanh(Wโ‚•hโ‚œโ‚‹โ‚ + Wโ‚“xโ‚œ + b)

Quick profile

ComplexityHighInterpretabilityLow

Data it needs: Long histories of sequential data

Process

How it works, step by step

  1. 1

    Reads the first element of the sequence and updates a hidden state

  2. 2

    Combines each new element with the previous hidden state at every step

  3. 3

    Shares the same weights across all time steps

  4. 4

    Outputs a prediction at each step or once at the end of the sequence

  5. 5

    Trains with backpropagation through time; LSTM and GRU gates keep gradients stable over long sequences

Worked example

Predictive maintenance

Compressors report temperature, vibration, and pressure every minute. An LSTM reads the last few days of readings and flags units whose pattern resembles the run-up to past failures, so maintenance happens on a planned visit instead of an emergency call.

When to use it

  • When order matters, as in text, speech, or time series
  • For forecasting from recent history
  • For classifying sequences of events, such as a session or a transaction trail
  • When inputs vary in length
  • For streaming data that arrives step by step

Strengths

  • Models order and context in sequential data
  • Handles variable-length inputs
  • Weight sharing keeps the model compact
  • LSTM and GRU variants capture longer dependencies
  • Works on streams in real time

Limitations

  • Slow to train because steps run in order
  • Plain RNNs struggle with long-range dependencies
  • Transformers now outperform them on most language tasks
  • Hard to interpret
  • Sensitive to hyperparameters

Applications

Where it is used

01Demand and sensor forecasting
02Fraud detection on transaction sequences
03Predictive maintenance from equipment logs
04Speech recognition
05Next-action prediction in apps and websites

Need a model built on your data?

Tell us the decision you want to improve. We will tell you whether your data can support it and which approach fits.