Table of Contents
Fetching ...

Text Style Transfer with Parameter-efficient LLM Finetuning and Round-trip Translation

Ruoxi Liu, Philipp Koehn

TL;DR

This paper proposes a novel method for Text Style Transfer based on parameter-efficient fine-tuning of Large Language Models (LLMs) based on roundtrip translation to synthesize such parallel datasets from monolingual corpora to create'neutralized'text devoid of stylistic attributes.

Abstract

This paper proposes a novel method for Text Style Transfer (TST) based on parameter-efficient fine-tuning of Large Language Models (LLMs). Addressing the scarcity of parallel corpora that map between styles, the study employs roundtrip translation to synthesize such parallel datasets from monolingual corpora. This approach creates 'neutralized' text devoid of stylistic attributes, essentially creating a shared input style at training-time and inference-time. Experimental results demonstrate consistent superiority of this method over zero-shot prompting and fewshot ICL techniques measured by BLEU scores and style accuracy scores across four investigated domains. Furthermore, the integration of retrieval-augmented generation (RAG) for terminology and name knowledge enhances robustness and stylistic consistency.

Text Style Transfer with Parameter-efficient LLM Finetuning and Round-trip Translation

TL;DR

This paper proposes a novel method for Text Style Transfer based on parameter-efficient fine-tuning of Large Language Models (LLMs) based on roundtrip translation to synthesize such parallel datasets from monolingual corpora to create'neutralized'text devoid of stylistic attributes.

Abstract

This paper proposes a novel method for Text Style Transfer (TST) based on parameter-efficient fine-tuning of Large Language Models (LLMs). Addressing the scarcity of parallel corpora that map between styles, the study employs roundtrip translation to synthesize such parallel datasets from monolingual corpora. This approach creates 'neutralized' text devoid of stylistic attributes, essentially creating a shared input style at training-time and inference-time. Experimental results demonstrate consistent superiority of this method over zero-shot prompting and fewshot ICL techniques measured by BLEU scores and style accuracy scores across four investigated domains. Furthermore, the integration of retrieval-augmented generation (RAG) for terminology and name knowledge enhances robustness and stylistic consistency.
Paper Structure (25 sections, 5 figures, 7 tables)

This paper contains 25 sections, 5 figures, 7 tables.

Figures (5)

  • Figure 1: Our proposed workflow for finetuning large language models (LLMs) for text style transfer (TST) using only non-parallel dataset in the target domain. A bilingual general-domain parallel dataset is used to train a pair of neural machine translation (NMT) models capable of translating between English and a pivot language. We then obtain machine-translated style-neutral texts of the original in-domain texts by roundtrip translating the in-domain set with the NMT models. This enables supervised finetuning of LLMs for TST, where we finetune LLMs for MT-output-domain to target-domain transfer using the synthetic parallel corpus.
  • Figure 2: Example sentences illustrating semantically equivalent content in various styles. Outputs of our roundtrip translation pipeline is considered as stylistically neutral.
  • Figure 3: Our proposed workflow. We show two inference routes that we tested on: route i (blue in figure) involves first roundtrip translate the input to match the training-time input domains and then perform RAG-enhanced TST-LLM inference with two retrievers we built (§\ref{['sec:method_RAG']}) on the intermediary text, where as route ii (red in figure) directly performs RAG-enhanced TST-LLM inference using the original input. Controlled experiments on these methods demonstrate that roundtrip translating the input first significantly enhances model's performance, bringing especially considerable improvements facing stylistically diverse and complex queries. Findings in this experiment are described in §\ref{['sec:exp_inference']}.
  • Figure 4: Retrieval augmentation workflow. Left (a): Similarity-based example retriever. We vectorize and index the target-side texts of the parallel synthetic datasets for nearest-neighbor search. For each query, we first do k-shot inference with the finetuned TST-LLM to obtain an "in-domain" sketch, which is used as search query in the target-side dataset to obtain k most similar pairs. Note that this is for inference-time RAG. For finetuning prompts, we can search with the target side texts directly without the need for an in-domain sketch. Right (b) Terminology and name retriever: For each instance in the synthetic parallel datasets, the first LLM call extracts relevant words from the source side, then the second call matches them with their counterparts in the target side, yielding a terminology pair list for each domain. During inference, each input is checked against these term pairs; where relevant matches are found, a concise guiding sentence is appended to the prompt.
  • Figure 5: The prompt template we use for Text Style Transfer Finetuning. Performances of other prompts that we experimented on are put in Appendix \ref{['sec:appendix_prompt']}.