Before 2017, Recurrent Neural Networks (RNNs) and their gated variant LSTMs were the default architecture for sequential data — text, speech, time series, even music. Understanding what they did right and where they hit a wall is the cleanest way to see why the Transformer was such a big deal.
An RNN consumes a sequence one element at a time, carrying a hidden state that compresses everything it has seen so far. At each step, the network mixes the current input with the previous hidden state, producing the next hidden state and (optionally) an output token.
LSTMs improved on vanilla RNNs by adding gating — forget gates, input gates, output gates — that explicitly control which information to keep, overwrite, or release. This made longer-range dependencies easier to learn, but the fundamentally sequential update remained.
What was actually wrong
Three problems that all stem from "one element at a time":
- No parallelism inside a sequence. Position 100's hidden state requires position 99's, which requires 98's, all the way down. GPUs love parallel matmuls; RNNs starve them.
- Vanishing/exploding gradients across many steps. Even with LSTM gates, gradients shrink or blow up after a few hundred steps in practice.
- Information bottleneck. Everything earlier than the current step must squeeze through a single hidden state vector. Long-range dependencies get blurred.
This isn't ancient history. RNNs and LSTMs powered Google Translate (2016), early Siri voice recognition, and most production NLP through 2017. They worked. The Transformer didn't replace something broken — it replaced something fundamentally bottlenecked.