ParaLS: Lexical Substitution via Pretrained Paraphraser

Jipeng Qiang, Kang Liu, Yun Li, Yunhao Yuan, Yi Zhu · DOI

Abstract

Lexical substitution (LS) aims at finding appropriate substitutes for a target word in a sentence. Recently, LS methods based on pretrained language models have made remarkable progress, generating potential substitutes for a target word through analysis of its contextual surroundings. However, these methods tend to overlook the preservation of the sentence's meaning when generating the substitutes. This study explores how to generate the substitute candidates from a paraphraser, as the generated paraphrases from a paraphraser contain variations in word choice and preserve the sentence's meaning. Since we cannot directly generate the substitutes via commonly used decoding strategies, we propose two simple decoding strategies that focus on the variations of the target word during decoding. Experimental results show that our methods outperform state-of-the-art LS methods based on pre-trained language models on three benchmarks.

Introduction

Lexical Substitution (LS) is the task of replacing a word in a sentence with a suitable alternative without changing the sentence's meaning. It is a foundational NLP task useful for writing assistants, text simplification, and data augmentation. Recently, researchers have relied on Masked Language Models (MLMs) like BERT or XLNet to suggest substitutes based on surrounding context.

However, MLMs have two major blind spots. First, they often ignore meaning preservation, predicting words that fit the context statistically but may be antonyms. For example, in a sentence about a "dry" continent, an MLM might suggest "wet" because it frequently appears in similar geographical contexts. Second, they struggle with multi-token words because they predict single subword tokens.

Comparison of substitute candidates generated by BERT, XLNet, and ParaLS (Ours) against gold labels.

Methodology: The ParaLS Approach

To address these limitations, we introduce ParaLS, which leverages a pretrained paraphraser (BART) fine-tuned on the ParaBank2 dataset. Unlike standard paraphrasers that rewrite entire sentences, ParaLS uses novel decoding strategies to isolate specific substitutes:

  • ParaLS (Fixing Prefixes): The decoder is forced to output the exact words leading up to the target word. At the target position, it generates the top-$K$ most probable tokens.
  • ParaLS* (Lookahead Heuristics): This strategy adds a lookahead heuristic to ensure the generated word flows grammatically into the original suffix, scoring candidates based on their transition into the subsequent words.

Sentence-Level Ranking

After generating candidates, ParaLS evaluates the entire updated sentence using text generation metrics like BARTScore and BLEURT. This captures nuanced semantic changes more effectively than traditional word-vector comparisons, ensuring the substitute maintains the original sentence's intent.

Experimental Results

ParaLS* was evaluated on three major benchmarks: LS07, CoInCo, and the rigorous SwordS benchmark.

State-of-the-Art Performance

ParaLS* outperformed all baseline models, including BERT, GR-RoBERT, and XLNet+Word2Vec. On the CoInCo dataset, it achieved a Precision@1 of 64.1%, a significant improvement over previous methods. Furthermore, the model naturally handles multi-token generation, which is a significant hurdle for standard MLMs.

Comparison with Commercial LLMs

On the SwordS benchmark, ParaLS* achieved superior results compared to large-scale commercial systems like GPT-3 and WordTune, demonstrating the efficiency of a specialized paraphrasing approach over general-purpose language models.

Performance comparison on the SwordS benchmark against commercial LLMs and state-of-the-art LS methods.

Conclusion

ParaLS demonstrates that paraphrasers are inherently better suited for lexical substitution than standard MLMs due to their explicit training in semantic preservation. By employing specialized decoding strategies and sentence-level ranking, ParaLS achieves state-of-the-art performance across multiple benchmarks. Future work will explore extending this approach to low-resource languages and testing its impact on downstream tasks like text simplification.

Summary updated

BibTeX
@inproceedings{qiang2023parals,
  author = {Jipeng Qiang and Kang Liu and Yun Li and Yunhao Yuan and Yi Zhu},
  title = {{ParaLS: Lexical Substitution via Pretrained Paraphraser}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.acl-long.206},
}
Figure