It is September 2014. Word vectors can capture that Paris relates to France the way Rome relates to Italy, yet no neural network can reliably read an English sentence and write out its French translation. Within one year, two ideas separated by seventeen years — a memory cell designed in 1997 and an encoder–decoder framing published in 2014 — combine to make “sequence in, sequence out” the default shape of neural language processing.
Where We Were
The language models of chapter 1 predicted the next word from a fixed, short window of preceding words: n-gram counts, and later Bengio’s 2003 neural probabilistic language model, both truncated history at a hard boundary. The embeddings of chapter 2 — word2vec (January 2013) and its relatives — gave each word a fixed vector regardless of context, and gave sentences no representation at all. Language, however, is a sequence of arbitrary length in which the words at position 40 can depend on the words at position 2. A model whose input size is fixed cannot, even in principle, represent that.
Recurrent neural networks were the obvious candidate architecture, and they were not new. Elman (1990) had described a “simple recurrent network” in which the hidden layer’s activations are fed back as input at the next time step, so the network maintains a state that summarizes everything it has read so far (Elman, 1990). Trained on letter and word sequences, Elman networks discovered word boundaries and rough syntactic categories — structure in time, as the title put it.
The problem was training them. Learning long-range dependencies requires propagating error signals backward through many time steps, and Bengio, Simard & Frasconi (1994) proved that this fails in a characteristic way: the gradient signal either decays exponentially toward zero or blows up exponentially as it travels back through time (Bengio et al., 1994). A network could learn dependencies spanning five or ten steps, but not fifty. Nearly two decades later, Pascanu, Mikolov & Bengio (2012) revisited the same pathology with modern tooling, gave it a geometric interpretation, and proposed the fix that became standard practice — clipping the gradient norm to handle explosions, plus a soft constraint to fight vanishing (Pascanu et al., 2012).
There were signs the approach could pay off despite the difficulty. Mikolov et al. (2010) trained recurrent language models for speech recognition and reported that a mixture of several RNN LMs cut perplexity by around 50% versus a state-of-the-art backoff n-gram model (Mikolov et al., 2010) — evidence that a learned, unbounded history beat counted, truncated history when you could get the training to work. What was missing was an architecture that made long-range credit assignment reliable, and a task framing that turned “language model” into “language transformer of input to output.”
The Breakthrough
The breakthrough happened in two acts, seventeen years apart.
Act one: a cell that remembers. LSTM (Hochreiter & Schmidhuber, 1997) attacked the vanishing gradient at its source (Hochreiter & Schmidhuber, 1997). Instead of squashing the entire hidden state through a nonlinearity at every step, the long short-term memory unit maintains a separate cell state — a memory lane along which information can flow across time steps essentially unchanged, which the authors called the constant error carousel. Learned multiplicative gates decide, at each step, what enters this memory, what leaves it, and what is exposed to the rest of the network. Because the cell state is updated additively rather than by repeated matrix multiplication, error signals can travel backward across hundreds of steps without dying. Gers, Schmidhuber & Cummins (2000) completed the design with a forget gate that lets the cell learn to reset its own memory (Gers et al., 2000); the LSTM used in every system discussed below is this three-gate version.
Act two: two networks, one vector. For years the LSTM was applied where inputs and outputs aligned step-for-step — label each frame of audio, predict each next character. Translation does not align: an English sentence of 12 words may become a French sentence of 15, with word order scrambled. In June 2014, Cho et al. proposed the RNN Encoder–Decoder: one recurrent network reads the source sequence and compresses it into a single fixed-length vector; a second recurrent network conditions on that vector and emits the target sequence one symbol at a time (Cho et al., 2014). The same paper introduced a simplified gated unit — later named the gated recurrent unit, or GRU — that merged the LSTM’s gates into two. Cho’s system was still a component, not a replacement: the encoder–decoder scored phrase pairs as an extra feature inside a conventional statistical machine translation (SMT) pipeline.
Three months later, seq2seq (Sutskever, Vinyals & Le, September 2014) removed the pipeline entirely (Sutskever et al., 2014). A deep encoder — four LSTM layers of 1,000 cells each, with 1,000-dimensional word embeddings, 384M parameters in total — read the English sentence; a matching deep LSTM decoder generated the French translation token by token, trained end-to-end on the WMT’14 English-to-French corpus with a 160,000-word source vocabulary and an 80,000-word target vocabulary. On the WMT’14 test set the pure neural system scored 34.8 BLEU against 33.3 for a strong phrase-based SMT baseline — the first time an end-to-end neural model had beaten a mature SMT system on this benchmark — and reranking the SMT system’s 1,000-best lists with the LSTM pushed the score to 36.5.
One detail of the paper became folklore. The authors reversed the word order of every source sentence (but not the target), so that the first words of the input ended up adjacent to the first words of the output. This introduced many short-term dependencies between source and target and, in their words, made the optimization problem markedly easier. It is a telling artifact: even with LSTMs, the model strained to carry information across the full length of two concatenated sentences, and a data trick that shortened the worst-case dependency was worth real BLEU.
The Mathematics
The vanilla recurrence. An Elman-style RNN maintains a hidden state updated at every time step:
| Symbol | Meaning |
|---|---|
| hidden state (the network’s memory) at step | |
| input vector at step , e.g. a word embedding | |
| recurrent weight matrix, applied to the previous state | |
| input weight matrix, applied to the current input | |
| bias vector | |
| elementwise squashing nonlinearity |
Why gradients vanish. Training by backpropagation through time requires the derivative of a late state with respect to an early one, which is a product of one Jacobian per intervening step:
| Symbol | Meaning |
|---|---|
| sensitivity of the state at step to the state at step | |
| product of one factor per intervening time step | |
| transpose of the recurrent weight matrix | |
| diagonal matrix of nonlinearity derivatives at step | |
| pre-activation entering the at step |
The LSTM cell. The LSTM (with the forget gate of Gers et al., 2000) replaces the single squashed state with a gated cell state alongside the hidden state :
| Symbol | Meaning |
|---|---|
| forget, input, and output gates, each in the range 0 to 1 | |
| logistic sigmoid, squashing to the range 0 to 1 | |
| candidate memory content proposed at step | |
| cell state — the protected long-term memory lane | |
| hidden state — the gated, visible output of the cell | |
| learned input weights, recurrent weights, and biases per gate | |
| elementwise multiplication |
Translation as conditional generation. seq2seq frames translation as modeling the probability of an output sequence given an input sequence. The encoder compresses the source into a fixed-dimensional vector (its final hidden and cell states), and the decoder factorizes the output distribution one token at a time:
| Symbol | Meaning |
|---|---|
| source sequence, length | |
| target sequence, length , generated left to right | |
| fixed-dimensional encoding of the entire source sentence | |
| probability of the next token given the encoding and the tokens so far |
What It Enabled
The most immediate effect was on machine translation itself. A discipline built over two decades — word alignment, phrase tables, log-linear feature weighting, separate language models — was matched by a single network trained end-to-end on sentence pairs.
| Phrase-based SMT, circa 2014 | seq2seq NMT, September 2014 | |
|---|---|---|
| System shape | Pipeline of separately built components | One network, trained end-to-end |
| Linguistic knowledge | Hand-engineered features, alignment models | Learned from parallel text alone |
| Sentence representation | None — phrase-level statistics | One fixed vector per sentence |
| Handling of word order | Explicit reordering models | Implicit, learned by the decoder |
| WMT’14 En→Fr BLEU | 33.3 (baseline reported in the paper) | 34.8 direct; 36.5 reranking the SMT n-best lists |
| Vocabulary | Effectively open | Closed: 160k source, 80k target; unknown words penalized |
The second effect was a template. “Encode the input, decode the output” turned out to fit almost any pair of sequences: summarization, dialogue, speech transcription, code generation. The generation loop that seq2seq established — produce one token, feed it back, produce the next — is, unchanged, how every modern chat model emits its answers.
The third effect was a well-defined failure to attack. All information about the source must pass through the single vector — 8,000 numbers in the Sutskever et al. system (four layers of 1,000 hidden and 1,000 cell units) — and translation quality degrades as sentences grow beyond what that bottleneck can hold; the sentence-reversal trick was a symptom, not a cure. In the same month seq2seq appeared (September 2014), Bahdanau et al. proposed letting the decoder look back at all encoder states and learn where to look — soft alignment, soon called attention. That mechanism, which dissolved the bottleneck and set up everything after it, is the subject of chapter 4.
The architecture’s remaining limits defined the next two chapters of research. The closed vocabulary problem — seq2seq penalized for every out-of-vocabulary word — was answered by subword tokenization (chapter 8). The strictly sequential computation — step cannot begin until step finishes, on both the time axis during training and across the eight GPUs of the original run — was answered by an architecture with no recurrence at all, the Transformer (chapter 5). Recurrence itself did not die so much as hibernate: state-space models revived the fixed-state, linear-time idea against attention’s quadratic cost a decade later (The Engine Room, chapter 18).
| Recurrent unit | Gates | State carried | Key property |
|---|---|---|---|
| Elman RNN (1990) | none | Simplest recurrence; gradients vanish beyond short spans | |
| LSTM (1997; forget gate 2000) | forget, input, output | and | Additive cell-state path preserves gradients over long spans |
| GRU (2014) | update, reset | LSTM-like gating with fewer parameters, no separate cell state |
Key Papers
| Paper | Authors | Year | Link | Why it matters |
|---|---|---|---|---|
| Finding Structure in Time | Elman | 1990 | DOI | The simple recurrent network: hidden state as memory, structure discovered from sequence alone |
| Learning Long-Term Dependencies with Gradient Descent is Difficult | Bengio, Simard & Frasconi | 1994 | DOI | Proved gradients through time vanish or explode exponentially — the problem statement for a decade |
| Long Short-Term Memory | Hochreiter & Schmidhuber | 1997 | DOI | Gated cell state with additive updates; made long-range credit assignment learnable |
| Learning to Forget: Continual Prediction with LSTM | Gers, Schmidhuber & Cummins | 2000 | DOI | Added the forget gate, completing the LSTM as used everywhere since |
| Recurrent Neural Network Based Language Model | Mikolov et al. | 2010 | ISCA | A mixture of RNN language models cut perplexity ~50% versus backoff n-grams — recurrence beats counting |
| On the difficulty of training Recurrent Neural Networks | Pascanu, Mikolov & Bengio | 2012 | arXiv | Modern analysis of vanishing/exploding gradients; gradient norm clipping becomes standard |
| Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation | Cho et al. | 2014 | arXiv | The encoder–decoder framing and the GRU; still a component inside an SMT pipeline |
| Sequence to Sequence Learning with Neural Networks | Sutskever, Vinyals & Le | 2014 | arXiv | End-to-end deep LSTM translation beats phrase-based SMT on WMT’14; the seq2seq template |
PM Lens
Papers referenced
- Finding Structure in Time Elman · 1990
- Learning Long-Term Dependencies with Gradient Descent is Difficult Bengio, Simard & Frasconi · 1994
- Long Short-Term Memory Hochreiter & Schmidhuber · 1997
- Learning to Forget: Continual Prediction with LSTM Gers, Schmidhuber & Cummins · 2000
- Recurrent Neural Network Based Language Model Mikolov et al. · 2010
- On the difficulty of training Recurrent Neural Networks Pascanu, Mikolov & Bengio · 2012 · arXiv:1211.5063
- Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation Cho et al. · 2014 · arXiv:1406.1078
- Sequence to Sequence Learning with Neural Networks Sutskever, Vinyals & Le · 2014 · arXiv:1409.3215