Prompt-Based Editing for Text Style Transfer

Guoqing Luo, Yu Tong Han, Lili Mou, Mauajama Firdaus
1/27/2023
cs.CLcs.AIcs.LG

No official code found. Best implementation: MANGA-UOFA/Prompt-Edit (13 stars, MIT, last commit 2023-12-09).

Abstract

Prompting approaches have been recently explored in text style transfer, where a textual prompt is used to query a pretrained language model to generate style-transferred texts word by word in an autoregressive manner. However, such a generation process is less controllable and early prediction errors may affect future word predictions. In this paper, we present a prompt-based editing approach for text style transfer. Specifically, we prompt a pretrained language model for style classification and use the classification probability to compute a style score. Then, we perform discrete search with word-level editing to maximize a comprehensive scoring function for the style-transfer task. In this way, we transform a prompt-based generation problem into a classification one, which is a training-free process and more controllable than the autoregressive generation of sentences. In our experiments, we performed both automatic and human evaluation on three style-transfer benchmark datasets, and show that our approach largely outperforms the state-of-the-art systems that have 20 times more parameters. Additional empirical analyses further demonstrate the effectiveness of our approach.

View on arXivView PDF

Code Implementations(1)

MIT

An official implementation for the EMNLP 2023 Findings paper "Prompt-Based Editing for Text Style Transfer"

130Perl, RoffNov 5, 20232 years agoMIT

Similar Papers

Cite this paper

@article{luo2023promptbased,
  title  = {Prompt-Based Editing for Text Style Transfer},
  author = {Guoqing Luo and Yu Tong Han and Lili Mou and Mauajama Firdaus},
  year   = {2023},
  eprint = {2301.11997},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2301.11997v2}
}

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/2301.11997.svg)](https://codeofpaper.com/paper/2301.11997)

Discussion