All models

Seq2Seq

A recurrent sequence model from early neural machine translation: LSTM or GRU, with or without attention.

Language · 12 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (25 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
384.1M
Operations
12
Framework
PyTorch
Recurrent
No
Published
NeurIPS 2014
Cited by
17,299 (as of 29 October 2026)
Authors
Ilya Sutskever, Oriol Vinyals, Quoc V. Le
License
BSD-3-Clause
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m2782
Graph hash
234632a4b33acc8c24a1104e8425403b999eb40cbe18d6d96a18788f8f62d71b
Skeleton hash
a0c04c9e359bd5ff961702b25c0dfab6319774523f3848ce467f99e39cdb1a90
Architecture hash
80dbbb745fcb71e547b6d9903f8bfc96a3e72bed19129c5e9bfba47121c4facf
Diagram SHA-256
11109fdaad620c460a52a000490a719b42a65fa4b180bc551cd6ad9594dea50c
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

This model is the Seq2Seq encoder-decoder without attention: deep LSTMs with an input vocabulary of 160,000 and an output vocabulary of 80,000.

About this model's family

Sequence to sequence learning with recurrent networks starts from one idea: a multilayered LSTM maps the input sequence to a vector of a fixed dimensionality, and another deep LSTM decodes the target sequence from that vector. The second LSTM is essentially a recurrent neural network language model, except that it is conditioned on the input sequence. The Seq2Seq paper used deep LSTMs with 4 layers, 1000 cells at each layer and 1000 dimensional word embeddings. It also found that reversing the order of the words in all source sentences, but not target sentences, improved the LSTM's performance markedly.

Bahdanau et al. conjecture that the use of a fixed-length vector is a bottleneck in improving the performance of this basic encoder-decoder architecture. Their architecture, RNNsearch, consists of a bidirectional RNN as an encoder and a decoder that emulates searching through a source sentence during decoding a translation. The alignment model is a feedforward neural network trained jointly with all the other components.

Luong et al. examine two classes of attentional mechanism: a global approach which always attends to all source words and a local one that only looks at a subset of source words at a time. Their global attention uses the hidden states at the top LSTM layers in both the encoder and decoder. Their stacking LSTM models have 4 layers, each with 1000 cells, and 1000-dimensional embeddings.

Key idea. Sutskever et al. showed that a multilayered LSTM can map an input sequence to a fixed-dimensional vector that a second deep LSTM decodes into the target sequence.

  • Seq2Seq
  • sequence to sequence
  • LSTM language model
  • GRU language model
  • Bahdanau attention
  • Luong attention
  • RNNsearch
  • neural machine translation
  • RNN encoder-decoder
  • attention-based NMT

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{sutskever2014sequencesequencelearningneural,
      title={Sequence to Sequence Learning with Neural Networks}, 
      author={Ilya Sutskever and Oriol Vinyals and Quoc V. Le},
      year={2014},
      eprint={1409.3215},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/1409.3215}, 
}