Sequence to Sequence Learning with Neural Networks

The paper made sequence-to-sequence learning a practical end-to-end neural architecture by using deep LSTMs to encode a variable-length input sequence and decode a variable-length output sequence.

Metadata

FieldValue
PaperSequence to Sequence Learning with Neural Networks
AuthorsIlya Sutskever, Oriol Vinyals, Quoc V. Le
Year2014
VenueNeurIPS 2014
arXiv1409.3215
NeurIPSproceedings page
Statusfull note started

Question

Before attention became standard, the key architecture question was:

For machine translation, the input and output lengths differ:

A fixed-size classifier cannot directly express this mapping. The paper asks whether a deep recurrent encoder-decoder can handle it by compressing the source sentence into a vector and then generating the target sentence autoregressively.

This sits between LSTM as a memory cell and Bahdanau attention as the next step that removes the single-vector bottleneck.

Main Claim

The main architecture claim is:

In words: one deep LSTM reads the source sequence into a fixed-dimensional vector, and another deep LSTM decodes a target sequence from that vector.

The target probability is factorized left to right:

where:

SymbolMeaning
source token sequence
target token sequence
fixed-dimensional sentence representation from the encoder
decoder next-token distribution

The durable contribution is not the exact BLEU number. It is the encoder-decoder contract for variable-length sequence transduction.

Architecture Contract

ItemContract
Inputvariable-length source sentence
Outputvariable-length target sentence
Encodermulti-layer LSTM over source tokens
Bridgefinal encoder state used as a fixed-length sentence vector
Decodermulti-layer LSTM language model conditioned on the encoder vector
Generationautoregressive next-token prediction
Training objectivemaximum likelihood / cross-entropy over target tokens
Core bottleneckthe full source sequence must fit into one vector
Important trickreverse the source token order to shorten dependency paths

The architecture can be read as three blocks:

This pattern later survives in encoder-decoder Transformers, but the bridge changes from one vector to cross-attention over all encoder states.

Encoder

The encoder is an LSTM recurrence over the source tokens:

Here is the exposed hidden state and is the LSTM memory cell. A simplified sentence vector is:

or, in stacked LSTMs, the final hidden and cell states across layers initialize the decoder.

The important compression is:

No matter how long the source sentence is, the decoder initially receives a fixed-size summary.

Decoder

The decoder is an autoregressive LSTM:

The output logits are:

and the next-token distribution is:

where is the target vocabulary size.

The training loss for one target sentence is:

This is teacher-forced maximum likelihood: during training, the decoder conditions on the gold previous target token .

Why Source Reversal Helps

The paper found that reversing source sentence order improves optimization.

Without reversal:

With reversal:

The intuition is dependency path length. In many translation pairs, early target words align with early source words. If the source is read in normal order, information about must survive until the final encoder state and then pass into early decoder steps:

If the source is reversed, the source word that often aligns with is closer to the final encoder state:

This does not change model expressivity. It changes the optimization geometry by shortening many effective credit-assignment paths.

Relation To Cho Encoder-Decoder

Both this paper and Cho et al. RNN Encoder-Decoder use the same high-level decomposition:

The difference is emphasis:

PaperUnitScopeMain Role
Cho et al. 2014gated recurrent unit / phrase encoder-decoderphrase scoring in SMTcompact gated recurrence and phrase representation
Sutskever et al. 2014deep LSTM encoder-decoderfull sentence translationpractical end-to-end seq2seq translation

Together they define the pre-attention seq2seq baseline.

Relation To Bahdanau Attention

The limitation of this paper is the fixed vector:

Bahdanau attention changes the bridge from one vector to a sequence of encoder annotations:

and computes a decoder-step-specific context:

The architectural move is:

Fixed-vector seq2seqAttention seq2seq
one context vector for the whole sentenceone context vector per output step
all source information compressed into decoder can query source positions
source reversal helps optimizationlearned alignment handles reordering more directly
bottleneck grows with task difficultymemory grows with source length

This makes the seq2seq paper important historically: it shows the contract, and attention shows where that contract was too narrow.

Evidence To Read Carefully

The paper reports strong English-to-French translation results on WMT’14 using a deep LSTM system, including a standalone neural translation system and reranking of phrase-based SMT candidates.

For architecture reading, separate three claims:

ClaimWhat Supports ItWhat It Does Not Prove Alone
Variable-length seq2seq is trainableend-to-end LSTM translation works competitivelythat fixed-vector bottlenecks are optimal
Deep LSTMs can store sentence-level informationtranslation quality and learned phrase/sentence representationsthat long-context memory is solved generally
Source reversal improves optimizationperformance improves after reversing source orderthat word order can be ignored

The reported result is not just an architecture result. It also depends on data, tokenization, decoding, model size, training setup, and reranking protocol.

Failure Modes

Failure ModeMechanismLater Response
Fixed-vector bottleneckall source information compressed into attention and cross-attention expose all source states
Long-range dependency burdenearly source information must survive many recurrent stepsLSTM gates, source reversal, attention
Sequential training/inferencerecurrence prevents full time-axis parallelismTransformer self-attention parallelizes token mixing
Exposure biastraining conditions on gold previous tokens, generation conditions on model outputsscheduled sampling, sequence-level objectives, better decoding
Search dependencetranslation quality depends on beam search and rerankingstronger decoders and direct generation pipelines

Why It Still Matters

This paper is worth keeping in an architecture shelf because it defines an interface that still appears everywhere:

Examples:

  • machine translation: source sentence to target sentence;
  • captioning: image representation to caption tokens;
  • speech recognition: acoustic sequence to text sequence;
  • code generation: prompt/context to output tokens;
  • molecular design: condition representation to generated string, graph, or coordinate trajectory.

Even when the recurrent LSTM is replaced by a Transformer, diffusion backbone, or graph network, the conditional generation contract remains useful.

Practical Checks

When reading a later seq2seq paper, check:

QuestionWhy It Matters
What is the encoder state exposed to the decoder?determines the information bottleneck
Is the decoder autoregressive, parallel, or iterative?determines factorization and inference cost
Does the model use teacher forcing?affects train-test mismatch
Is alignment learned explicitly, implicitly, or not at all?affects long input handling
Are gains from architecture, decoding, data, or reranking?prevents over-crediting the block

Where It Fits

AxisPlacement
Architecture familyrecurrent encoder-decoder
Core inductive biasordered causal recurrence with compressed memory
Main conceptsequence-to-sequence
PredecessorLSTM
Parallel lineRNN Encoder-Decoder
SuccessorBahdanau attention
Later replacementTransformer