A Semantically Consistent and Syntactically Variational Encoder-Decoder Framework for Paraphrase Generation

Wenqing Chen, Jidong Tian, Liqiang Xiao, Hao He, Yaohui Jin

Introduction

Paraphrase generation is the task of restating a sentence's meaning using different wording and structure. This presents a significant challenge: maintaining strict semantic equivalence while maximizing syntactic diversity. Traditional encoder-decoder models are often deterministic, producing a single "best" output that lacks variety. While Variational Autoencoders (VAEs) attempt to introduce diversity through latent variables, they frequently suffer from "semantic contamination," where syntactic variables inadvertently capture meaning, leading to semantic drift when structure is varied. Furthermore, standard training objectives like Maximum Likelihood Estimation (MLE) are overly rigid, penalizing valid synonyms that do not match the reference text exactly.

The SCSVED Framework

To address these issues, we propose the Semantically Consistent and Syntactically Variational Encoder-Decoder (SCSVED) framework. This model decouples what is being said from how it is structured through three primary mechanisms:

  1. Disentangled Latent Variables: The architecture utilizes two distinct encoders. A semantic encoder extracts a representation ($Z_{sem}$) from the source sentence, while a syntactic encoder extracts structural information ($z_{syn}$) from the target.
  2. Adversarial Semantic Scrubbing: To prevent semantic contamination, an adversarial discriminator is employed. It attempts to identify if syntactic vectors originate from the same sentence. The syntactic encoder is trained to "fool" this discriminator, effectively stripping away semantic information and isolating pure structural features.
  3. Semantic Consistency Discriminator: Moving beyond word-level matching, a second discriminator evaluates the semantic equivalence between the generated paraphrase and the reference. By utilizing the Gumbel-softmax trick, this process becomes differentiable, allowing the model to optimize for sentence-level meaning rather than just token-level overlap.
The SCSVED framework architecture, featuring disentangled semantic and syntactic encoders and adversarial discriminators.

Experimental Setup

The framework was evaluated on two benchmark datasets:

  • Quora Question Pairs: Approximately 140,000 paraphrase pairs derived from community-driven questions.
  • MSCOCO: A dataset where each image is associated with five human-written captions, providing natural variations of the same semantic content.

Key Results and Insights

SCSVED demonstrates superior performance across multiple metrics compared to strong baselines, including LBOW-Topk and standard VAE variants.

Performance on Quora

On the Quora dataset, SCSVED achieved a BERTCS score (measuring semantic similarity) of 81.60, a notable improvement over the Seq2Seq-Att baseline of 78.88. The model also showed significant gains in BLEU and ROUGE scores when combined with variational search techniques.

Performance comparison on the Quora dataset. SCSVED outperforms baselines in semantic similarity (BertCS) and diversity metrics.

Overcoming the MLE Trap

A core insight of this work is the limitation of standard cross-entropy loss, which treats all non-target words as equally incorrect. By incorporating a semantic consistency loss, SCSVED can utilize synonyms (e.g., "awesome movie" vs. "excellent film") without being penalized, fostering more natural and creative paraphrasing.

Data-Driven Syntactic Diversity

Unlike methods relying on rigid linguistic tools like parse trees, SCSVED learns syntax in a purely data-driven manner. By ensuring the syntactic variable is semantic-free, the model can sample different $z_{syn}$ values from a prior distribution during inference, allowing a single source sentence to generate multiple, structurally distinct paraphrases. Qualitative analysis confirmed this diversity, showing the model's ability to significantly alter grammatical structures (e.g., changing "doing a trick" to "riding... up the side of a ramp") where beam search-based models remained repetitive.

Conclusion

The SCSVED framework successfully disentangles semantics from syntax, enabling the generation of diverse yet meaning-preserving paraphrases. While the data-driven syntactic variables are not always directly interpretable in formal linguistic terms, they provide a robust mechanism for structural variation. Future work may explore more explicit control over specific syntactic transformations or apply this disentanglement approach to tasks like style transfer and machine translation.

Summary updated

BibTeX
@inproceedings{chen2020semantically,
  author = {Wenqing Chen and Jidong Tian and Liqiang Xiao and Hao He and Yaohui Jin},
  title = {{A Semantically Consistent and Syntactically Variational Encoder-Decoder Framework for Paraphrase Generation}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2020},
  doi = {10.18653/v1/2020.coling-main.102},
}
Figure