All models

DeCLUTR

A sentence encoder trained with a contrastive objective on unlabeled text, built on RoBERTa-base.

Language · 320 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 (21 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
124.6M
Operations
320
Framework
PyTorch
Recurrent
No
Published
ACL-IJCNLP 2021
Cited by
85 (as of 24 October 2026)
Authors
John Giorgi, Osvald Nitski, Bo Wang, Gary Bader
License
Apache-2.0
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
m15799
Graph hash
9b68f8ffa8d55e164a4b2bac2732642b6fde681f9d50bfaa8c16850f93e20329
Skeleton hash
06a15b6fd481c50e95088a312830b5b16ff1e012d4b119de968173431559a80f
Architecture hash
621e514e94b59512a6454b5397f8851f5be2cffdcf97328563b7987b9798dc14
Diagram SHA-256
e8529b4a9baf5a9b85f379cae2c4cc9bc5e8c32de241fd97d2e9231f74b5c775
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

DeCLUTR is a universal sentence encoder, a model that turns a piece of text into one embedding vector. The name stands for Deep Contrastive Learning for Unsupervised Textual Representations. Its training objective is self-supervised and needs no labeled data.

The objective trains the encoder to minimize the distance between the embeddings of text segments sampled from nearby in the same document. This contrastive loss is summed with the masked language modeling (MLM) loss. The authors do not train from scratch but continue training a model that was already pretrained with MLM. The sentence embedding is the mean of the token-level embeddings, which the paper calls mean pooling.

This model is DeCLUTR-base, which extends the pretraining of RoBERTa-base, while the smaller DeCLUTR-small extends DistilRoBERTa. The training text was 497,868 documents with a minimum length of 2048 tokens, collected from OpenWebText. The paper's experiments suggest that the quality of the embeddings scales with both the number of trainable parameters and the amount of unlabeled training data.

Key idea. DeCLUTR is a self-supervised contrastive objective that learns universal sentence embeddings without labeled data by extending the pretraining of transformer-based language models.

  • DeCLUTR
  • DeCLUTR-base
  • deep contrastive learning for unsupervised textual representations
  • sentence embeddings
  • sentence encoder
  • contrastive learning
  • sentence similarity
  • text embedding
  • unsupervised sentence embeddings

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

Cite the paper

@misc{giorgi2021declutrdeepcontrastivelearning,
      title={DeCLUTR: Deep Contrastive Learning for Unsupervised Textual Representations}, 
      author={John Giorgi and Osvald Nitski and Bo Wang and Gary Bader},
      year={2021},
      eprint={2006.03659},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2006.03659}, 
}