TSDAE: Using Transformer-based Sequential Denoising Auto-Encoderfor Unsupervised Sentence Embedding Learning

Kexin Wang, Nils Reimers, Iryna Gurevych

Introduction

Sentence embeddings are fundamental to modern Natural Language Processing (NLP), enabling tasks such as information retrieval, clustering, and paraphrase detection. While supervised models like SBERT achieve high performance, they rely on extensive labeled datasets, which are often unavailable in specialized domains like technical support or scientific research. Existing unsupervised methods, such as SimCSE or BERT-flow, frequently over-optimize for the Semantic Textual Similarity (STS) benchmark, which may not reflect real-world performance on heterogeneous, domain-specific data.

TSDAE (Transformer-based Sequential Denoising Auto-Encoder) addresses these limitations by adapting the Denoising Auto-Encoder (DAE) framework to Transformer architectures, specifically designed for robust unsupervised sentence embedding learning. It outperforms previous state-of-the-art techniques by up to 6.4 points on specialized benchmarks.

Methodology

The core of TSDAE is an encoder-decoder Transformer architecture that utilizes a strict "bottleneck" to force the model to learn deep semantic representations.

TSDAE Architecture: The encoder-decoder setup with a strict bottleneck.

During training, input sentences are corrupted—primarily through word deletion (a 60% deletion rate was found optimal). Unlike standard encoder-decoder models where the decoder can attend to all encoder hidden states via cross-attention, TSDAE restricts the decoder's view. The decoder is only permitted to access a single, fixed-size vector produced by the encoder's pooling layer. The objective is to reconstruct the original, undamaged sentence from this solitary vector. This bottleneck ensures that the encoder packs maximum semantic information into the embedding. Post-training, the decoder is discarded, and the encoder is used to generate embeddings for downstream tasks.

Experimental Setup

To evaluate the generalizability of TSDAE, the authors moved beyond standard STS benchmarks and tested the model on four diverse, real-world datasets:

  • AskUbuntu: Re-ranking technical questions on a forum.
  • CQADupStack: Information retrieval across 12 different StackExchange communities (e.g., Physics, WordPress).
  • TwitterPara: Identifying paraphrases in noisy, informal social media text.
  • SciDocs: A complex benchmark involving re-ranking scientific papers based on citations and reading patterns.

Results and Discussion

TSDAE establishes a new state-of-the-art for unsupervised sentence embeddings, significantly closing the gap with supervised models. It achieved up to 93.1% of the performance of models trained on expensive, in-domain labeled data.

Performance of TSDAE compared to other unsupervised methods across four domain-specific benchmarks.

Key findings from the experimental results include:

  • The Bottleneck is Crucial: Without the restricted vector access, the model fails to learn meaningful semantics, instead relying on positional cues to "cheat" the reconstruction task.
  • STS Performance vs. Real-World Utility: Models ranking high on STS benchmarks often underperform on domain-specific tasks. TSDAE demonstrates superior robustness across varied domains where methods like SimCSE struggle.
  • Semantic Focus: Analysis indicates that TSDAE effectively identifies "content words" (nouns) as primary semantic carriers, which is vital for technical and scientific domains.
  • Data Efficiency: The method is highly efficient, showing significant gains with as few as 1,000 unlabeled sentences and typically plateauing around 10,000 sentences.

Furthermore, TSDAE serves as an excellent pre-training step for supervised learning and acts as a strong domain adaptation tool, allowing models to quickly specialize using only raw, unlabeled text.

Conclusion and Future Work

TSDAE provides a powerful, data-efficient solution for generating high-quality sentence embeddings without labeled data. While its encoder-decoder training is more computationally intensive than single-encoder methods, the performance gains in specialized domains are substantial. The authors noted that starting from pre-trained encoder-decoder models like BART or T5 can lead to overfitting; starting with a BERT encoder and a fresh decoder yielded the best results. Future research will explore alternative noise functions and scaling the architecture to multi-lingual or longer-sequence contexts.

Summary updated

BibTeX
@inproceedings{wang2021tsdae,
  author = {Kexin Wang and Nils Reimers and Iryna Gurevych},
  title = {{TSDAE: Using Transformer-based Sequential Denoising Auto-Encoderfor Unsupervised Sentence Embedding Learning}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2021},
  doi = {10.18653/v1/2021.findings-emnlp.59},
}
Figure