All models

One2Set

Transformer that generates a set of keyphrases in parallel from learned control codes.

Language · 483 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 (16 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
97.7M
Operations
483
Framework
PyTorch
Recurrent
No
Published
ACL-IJCNLP 2021
Cited by
0 (as of 24 October 2026)
Authors
Jiacheng Ye, Tao Gui, Yichao Luo and others
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
m18991
Graph hash
a579542e7cd40f478a4731e86b34609666c443614dc10b9870f3ec1e7c321571
Skeleton hash
7ae7da47539fd5fa3bf59337fcb0989b8012d22d6dce1ebb36cc12483861349f
Architecture hash
a9db01bb1c1fa813b71d99da2342ed97817ef6532e7849e04f193ce83e414ef5
Diagram SHA-256
03cec9373aed8cd96c2b66342d51b65637bd854b71f9366969e75c362fa4badc
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

One2Set is a way of training keyphrase generation models that treats a document's keyphrases as an unordered set instead of a sequence in a fixed order. The paper argues that imposing a predefined order introduces a wrong bias during training, because shifts in the order between keyphrases are heavily penalized.

The model built for this paradigm, SetTrans, takes the Transformer as its main architecture and adds a fixed set of learned control codes as additional decoder inputs. For each code the model generates either a keyphrase or a special token that stands for no corresponding keyphrase, and all codes are handled in parallel. Since the match between predictions and targets is not known during training, the model first generates K words for each code and the targets are then assigned by bipartite matching. Half of the codes are trained to predict the keyphrases present in the document and the other half the absent ones.

The paper's setup uses a Transformer with six layers, eight self-attention heads and 2048 dimensions for hidden states. All models in the paper are trained on KP20k, the largest of its datasets. The number of control codes is set to 20, which the authors found covers 99.5% of the samples in their validation set.

Key idea. The paper proposes training keyphrase generation on unordered sets and builds SetTrans, a Transformer that generates keyphrases in parallel from learned control codes with targets assigned by bipartite matching.

  • one2set
  • settrans
  • kg_one2set
  • keyphrase generation
  • keyphrases as a set
  • set prediction
  • control codes
  • bipartite matching

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

Cite the paper

@misc{ye2021one2setgeneratingdiversekeyphrases,
      title={One2Set: Generating Diverse Keyphrases as a Set}, 
      author={Jiacheng Ye and Tao Gui and Yichao Luo and Yige Xu and Qi Zhang},
      year={2021},
      eprint={2105.11134},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2105.11134}, 
}