Unsupervised Paraphrasing with Pretrained Language Models

Tong Niu, Semih Yavuz, Yingbo Zhou, Nitish Shirish Keskar, Huan Wang, Caiming Xiong · DOI

Abstract

Paraphrase generation has benefited extensively from recent progress in the designing of training objectives and model architectures. However, previous explorations have largely focused on supervised methods, which require a large amount of labeled data that is costly to collect. To address this drawback, we adopt a transfer learning approach and propose a training pipeline that enables pre-trained language models to generate high-quality paraphrases in an unsupervised setting. Our recipe consists of task-adaptation, self-supervision, and a novel decoding algorithm named Dynamic Blocking (DB). To enforce a surface form dissimilar from the input, whenever the language model emits a token contained in the source sequence, DB prevents the model from outputting the subsequent source token for the next generation step. We show with automatic and human evaluations that our approach achieves state-of-the-art performance on both the Quora Question Pair (QQP) and the ParaNMT datasets and is robust to domain shift between the two datasets of distinct distributions. We also demonstrate that our model transfers to paraphrasing in other languages without any additional finetuning.

Introduction

Paraphrasing—the task of restating a sentence while preserving its original meaning—is a fundamental component of natural language processing, essential for applications ranging from conversational agents to data augmentation. Despite its importance, the field has been dominated by supervised learning methods. These models rely on vast quantities of parallel sentence pairs, which are notoriously difficult and expensive to curate.

Furthermore, even state-of-the-art pretrained models often exhibit a "copying" bias when tasked with paraphrasing. Because they are optimized for accuracy, they frequently default to reproducing the input sentence verbatim. While existing techniques attempt to enforce lexical diversity, they often sacrifice grammatical correctness or semantic fidelity. This research introduces an unsupervised pipeline that leverages the latent knowledge in pretrained language models (LMs) like T5 and BART to generate creative, high-quality paraphrases without labeled data.

Proposed Method: A Three-Stage Recipe

The proposed approach transforms a general-purpose pretrained LM into a specialized paraphraser through a three-stage pipeline: task-adaptation, dynamic blocking, and self-supervision.

Overview of the unsupervised paraphrasing training pipeline.

1. Task-Adaptation

The first stage involves "domain-specific denoising." The researchers take unlabeled sentences from the target domain and apply corruptions, such as deleting or shuffling words. The model is then trained to reconstruct the original, clean sentence. This process adapts the general-purpose LM to the specific vocabulary and syntactic style of the target dataset, teaching it how to reorder and recover information within that domain.

2. Dynamic Blocking (DB)

Dynamic Blocking is the core technical innovation designed to break the model's tendency to copy the input. During the decoding process, if the model generates a token that appeared in the source sentence, the DB algorithm identifies the token that immediately followed it in the original sequence and temporarily blocks the model from generating that specific successor.

The Dynamic Blocking (DB) decoding algorithm.

By disrupting these bi-gram chains, the model is forced to explore alternative linguistic paths—such as using synonyms or restructuring the sentence—while still maintaining the original meaning. This "bi-gram constraint" is effective because it targets the path of least resistance (direct copying) without overly restricting the model's overall vocabulary.

3. Self-Supervision

In the final stage, the task-adapted model uses Dynamic Blocking to generate a large synthetic dataset of paraphrase pairs from unlabeled text. A fresh model is then trained on this synthetic data using standard supervised objectives. This allows the final "Self-supervised Model" to internalize paraphrasing patterns, enabling it to generate diverse outputs naturally at inference time without requiring the explicit DB constraint.

Evaluation and Metrics

The pipeline was evaluated on two major benchmarks: Quora Question Pairs (QQP) and ParaNMT. To better assess performance, the authors introduced BERT-iBLEU. Traditional metrics like BLEU often inadvertently reward models for copying the input. BERT-iBLEU addresses this by combining semantic similarity (via BERT-score) with a penalty for input overlap (self-BLEU), showing a much higher correlation with human judgment.

Key Results and Insights

The unsupervised approach demonstrated several significant advantages:

  • Performance: The model achieved state-of-the-art results for unsupervised paraphrasing, even outperforming several supervised baselines in human preference trials on QQP and ParaNMT.
  • Domain Robustness: Unlike supervised models that often struggle when applied to out-of-distribution data, this unsupervised method proved highly adaptable across different domains.
  • Zero-Shot Multilingualism: By utilizing multilingual models like mBART, the Dynamic Blocking technique was successfully applied to languages like German without any additional fine-tuning, highlighting its generalizability.

Conclusion and Future Work

This work demonstrates that pretrained LMs are "closet" paraphrasers; they already possess the necessary linguistic knowledge, but require specific constraints to unlock it. While the current pipeline is highly effective, it occasionally faces challenges such as antonym substitution or subject-object swapping. Future research may integrate Named Entity Recognition (NER) to protect proper nouns or utilize automated grammar checkers to further refine the synthetic data generation process.

Summary updated

BibTeX
@inproceedings{niu2021unsupervised,
  author = {Tong Niu and Semih Yavuz and Yingbo Zhou and Nitish Shirish Keskar and Huan Wang and Caiming Xiong},
  title = {{Unsupervised Paraphrasing with Pretrained Language Models}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2021},
  doi = {10.18653/v1/2021.emnlp-main.417},
}
Figure