What Is a Recurrent Neural Network?

Recurrent Neural Network Explainer

A recurrent neural network, or RNN, processes a sequence while carrying a hidden state from one step to the next. The same transition rule is reused across positions, letting the model handle variable-length inputs such as text, audio, sensor readings, or time series.

At each step, the network combines the current input with its previous state to produce a new state and possibly an output. Training unfolds those repeated operations through time and applies backpropagation across the sequence. Parameters are shared rather than creating a separate network for every position.

Basic RNNs struggle with long-range dependencies because gradients can vanish or explode across many repeated steps. Gated designs such as long short-term memory and gated recurrent units help control what information is retained, updated, or forgotten. Gradient clipping can limit unstable updates.

Transformers now dominate many language applications because they connect distant positions more directly and train efficiently in parallel. RNNs remain useful when streaming data arrive one step at a time, memory is constrained, or a compact recurrent state suits the problem. Architecture choice should follow measured task needs.

A recurrent neural network processes a sequence while carrying a hidden state from one position to the next.

Key terms include sequence, hidden state, recurrence, time step, parameter sharing, backpropagation through time, LSTM, GRU and gradient clipping.

The hidden state acts as a running representation of earlier inputs, updated each time a new sequence element arrives.

Outputs can be produced at every step or after the sequence, depending on whether the task labels positions, whole sequences, or another sequence.

Repeated multiplication during training can make early signals shrink toward zero or grow until they destabilize optimization.

Gates, clipping, careful initialization, and alternative architectures reduce these problems but do not remove the need for task-specific evaluation.

Explore more "Explainers"

Discover additional explainers across politics, science, business, technology, and other fields. Each explainer breaks down a complex idea into clear, everyday language—helping you better understand how major concepts, systems, and debates shape the world around us.