All models

DiffuSeq

A diffusion model that generates a target sentence from a source sentence by denoising word embeddings.

Language · 379 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 (30 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
91.2M
Operations
379
Framework
PyTorch
Recurrent
No
Published
ICLR 2023
Cited by
123 (as of 3 November 2026)
Authors
Shansan Gong, Mukai Li, Jiangtao Feng and others
License
MIT
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
m16133
Graph hash
e4b457942c51f67f4dd3d296bb5329735909f593fc672152ca2f09e406bb8ea8
Skeleton hash
b051490eb1e374ba4ee160e756c39524ced38419340c9be84db6d46c12c88a3b
Architecture hash
e0d7466e88c33b71ca9c91187f89371ade83cf3b98c6d857b84f73b6fd32b8e9
Diagram SHA-256
345341f7a3ada3edc8eb0085fbe992e721a17230603eed2b430369ccbcd1a438
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

DiffuSeq is a diffusion model for sequence-to-sequence text generation, where a source sentence conditions the generation of a target sentence. The paper notes that adapting diffusion models to language was under-explored because text is discrete, especially for conditional generation. The authors describe their work as the first to deploy a diffusion model on sequence-to-sequence text generation.

Source and target are mapped into one continuous sequence by embedding and concatenation. Noise is then added only to the target part, which the paper calls partial noising, so the source part stays as the condition during denoising. No extra-trained classifier controls the denoising process. The denoiser is a Transformer with 12 layers and 12 attention heads, and the time step embedding is added in the same way as the position embedding. The paper's setup uses a maximum sequence length of 128, an embedding dimension of 128, 2,000 diffusion steps and a square-root noise schedule.

The paper reports performance comparable to or better than six established baselines. Its comparison table lists DiffuSeq at 91M parameters. For decoding, the authors generate candidates from different random seeds and select one with Minimum Bayes Risk decoding.

Key idea. DiffuSeq adapts diffusion models to sequence-to-sequence text generation by noising only the target part of a joint source-target embedding sequence and denoising it without a separate classifier.

  • DiffuSeq
  • diffusion language model
  • sequence to sequence text generation
  • Seq2Seq diffusion
  • text diffusion
  • partial noising
  • non-autoregressive text generation
  • conditional text generation
  • paraphrase generation

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

Cite the paper

@misc{gong2023diffuseqsequencesequencetext,
      title={DiffuSeq: Sequence to Sequence Text Generation with Diffusion Models}, 
      author={Shansan Gong and Mukai Li and Jiangtao Feng and Zhiyong Wu and Lingpeng Kong},
      year={2023},
      eprint={2210.08933},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2210.08933}, 
}