Learning to Substitute Words with Model-based Score Ranking

Hongye Liu, Ricardo Henao
2/9/2025
cs.CLcs.AI

Official code: Hyfred/Substitute-Words-with-Ranking (0 stars, last commit 2026-04-13).

Abstract

Smart word substitution aims to enhance sentence quality by improving word choices; however current benchmarks rely on human-labeled data. Since word choices are inherently subjective, ground-truth word substitutions generated by a small group of annotators are often incomplete and likely not generalizable. To circumvent this issue, we instead employ a model-based score (BARTScore) to quantify sentence quality, thus forgoing the need for human annotations. Specifically, we use this score to define a distribution for each word substitution, allowing one to test whether a substitution is statistically superior relative to others. In addition, we propose a loss function that directly optimizes the alignment between model predictions and sentence scores, while also enhancing the overall quality score of a substitution. Crucially, model learning no longer requires human labels, thus avoiding the cost of annotation while maintaining the quality of the text modified with substitutions. Experimental results show that the proposed approach outperforms both masked language models (BERT, BART) and large language models (GPT-4, LLaMA). The source code is available at https://github.com/Hyfred/Substitute-Words-with-Ranking.

View on arXivView PDF

Code Implementations(1)

01Python, Jupyter NotebookJan 31, 20256 months ago

Similar Papers

Cite this paper

@article{liu2025learning,
  title  = {Learning to Substitute Words with Model-based Score Ranking},
  author = {Hongye Liu and Ricardo Henao},
  year   = {2025},
  eprint = {2502.05933},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.05933v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.05933.svg)](https://codeofpaper.com/paper/2502.05933)

Discussion