Home / Journals / CMC / Online First / doi:10.32604/cmc.2024.058248
Special Issues
Table of Content

Open Access

ARTICLE

Improving Machine Translation Formality with Large Language Models

Murun Yang1,*, Fuxue Li2
1 School of Computer Science and Engineering, Northeastern University, Shenyang, 110819, China
2 College of Electrical Engineering, Yingkou Institute of Technology, Yingkou, 115014, China
* Corresponding Author: Murun Yang. Email: email

Computers, Materials & Continua https://doi.org/10.32604/cmc.2024.058248

Received 08 September 2024; Accepted 18 November 2024; Published online 13 December 2024

Abstract

Preserving formal style in neural machine translation (NMT) is essential, yet often overlooked as an optimization objective of the training processes. This oversight can lead to translations that, though accurate, lack formality. In this paper, we propose how to improve NMT formality with large language models (LLMs), which combines the style transfer and evaluation capabilities of an LLM and the high-quality translation generation ability of NMT models to improve NMT formality. The proposed method (namely INMTF) encompasses two approaches. The first involves a revision approach using an LLM to revise the NMT-generated translation, ensuring a formal translation style. The second approach employs an LLM as a reward model for scoring translation formality, and then uses reinforcement learning algorithms to fine-tune the NMT model to maximize the reward score, thereby enhancing the formality of the generated translations. Considering the substantial parameter size of LLMs, we also explore methods to reduce the computational cost of INMTF. Experimental results demonstrate that INMTF significantly outperforms baselines in terms of translation formality and translation quality, with an improvement of +9.19 style accuracy points in the German-to-English task and +2.16 COMET score in the Russian-to-English task. Furthermore, our work demonstrates the potential of integrating LLMs within NMT frameworks to bridge the gap between NMT outputs and the formality required in various real-world translation scenarios.

Keywords

Neural machine translation; formality; large language model; text style transfer; style evaluation; reinforcement learning
  • 109

    View

  • 19

    Download

  • 0

    Like

Share Link