Abstract
Paraphrase generation is a fundamental task in natural language processing that involves rewriting a sentence while preserving its original meaning. Current models often struggle to balance semantic fidelity with syntactic diversity. We introduce PGKPR, a framework that utilizes gradient-based attribution to identify keywords and a multi-task learning approach to reconstruct both these keywords and the sentence's syntactic structure (Part-of-Speech tags). Our experiments on the Quora Question Pairs and MSCOCO datasets demonstrate that PGKPR achieves state-of-the-art performance in terms of fluency, accuracy, and diversity.
Introduction
The core challenge in paraphrase generation lies in distinguishing between the "skeleton" (syntax) and the "meat" (semantics) of a sentence. A successful paraphrase must retain the essential keywords while significantly altering the auxiliary content and structure. Traditional sequence-to-sequence models often treat the source sentence as an undifferentiated sequence of tokens, failing to capture these distinct components explicitly. PGKPR addresses this by forcing the model to "rebuild" the source sentence's core meaning and grammar simultaneously through a multi-task learning objective.
Methodology: The PGKPR Framework
The PGKPR approach consists of two primary stages: keyword identification and multi-task training.
Stage One: Keyword Prediction via Attribution
Rather than relying on static dictionaries or manual rules, PGKPR identifies keywords dynamically. A BERT model is first fine-tuned for paraphrase detection. The model then uses a prediction attribution technique—calculating the L2-norm of the gradient of the output with respect to input embeddings—to assign "saliency" scores to each word. Words with high scores are designated as keywords, representing the semantic core of the sentence.
Stage Two: Multi-task Learning
The architecture employs a Transformer-based encoder-decoder trained on three concurrent tasks:
- Reconstruction (Task 1): The encoder receives a "perturbed" sequence where non-keywords are replaced by their POS tags. The model must learn to reconstruct the original keywords and the POS tags of the non-keywords, effectively learning the "recipe" of the sentence.
- Contrastive Learning (Task 2): This task aligns the representations of true paraphrase pairs in the latent space while distancing non-paraphrase pairs.
- Paraphrase Generation (Task 3): The standard generative task of predicting the target sentence token-by-token.
Experimental Results
The model was evaluated on two major benchmarks: Quora Question Pairs (QQP) and MSCOCO. QQP consists of duplicate questions, while MSCOCO uses multiple captions for the same image as paraphrase pairs.
Quantitative Performance
PGKPR outperformed several strong baselines, including standard Transformers and the previous state-of-the-art IANet. On the Quora dataset, PGKPR achieved a BLEU-4 score of 29.23, compared to 27.79 for the standard Transformer. Similar improvements were observed across ROUGE metrics and on the MSCOCO dataset.
Qualitative Analysis and Ablation
Human evaluations confirmed the model's superiority, with PGKPR scoring highest in fluency (1.79/2.0), accuracy (1.5/2.0), and diversity (1.29/2.0). Ablation studies highlighted the Reconstruction task as the most critical component; its removal led to a more significant performance drop than removing the contrastive learning task, validating the importance of explicitly modeling keywords and syntax.
Conclusion
PGKPR demonstrates that explicitly reconstructing the semantic and syntactic components of a sentence significantly enhances paraphrase generation. By moving beyond "black box" modeling and incorporating data-driven keyword identification, the framework produces paraphrases that are more fluent, accurate, and diverse. Future work may explore adapting this framework for controllable generation, allowing users to specify target styles or syntactic structures.
Summary updated