Skip to main content
QUICK REVIEW

[Paper Review] TIM: Teaching Large Language Models to Translate with Comparison

Jiali Zeng, Fandong Meng|arXiv (Cornell University)|Jul 10, 2023
Natural Language Processing TechniquesComputer Science8 citations
TL;DR

TIM fine-tunes open-source LLMs for translation by using output and preference comparisons, improving translation quality, zero-shot performance, and robustness across model sizes.

ABSTRACT

Open-sourced large language models (LLMs) have demonstrated remarkable efficacy in various tasks with instruction tuning. However, these models can sometimes struggle with tasks that require more specialized knowledge such as translation. One possible reason for such deficiency is that instruction tuning aims to generate fluent and coherent text that continues from a given instruction without being constrained by any task-specific requirements. Moreover, it can be more challenging for tuning smaller LLMs with lower-quality training data. To address this issue, we propose a novel framework using examples in comparison to teach LLMs to learn translation. Our approach involves presenting the model with examples of correct and incorrect translations and using a preference loss to guide the model's learning. We evaluate our method on WMT2022 test sets and show that it outperforms existing methods. Our findings offer a new perspective on fine-tuning LLMs for translation tasks and provide a promising solution for generating high-quality translations. Please refer to Github for more details: https://github.com/lemon0830/TIM.

Motivation & Objective

  • Motivate improved translation for open-source LLMs beyond standard instruction tuning.
  • Leverage a small set of high-quality translation data through novel comparison mechanisms.
  • Introduce output and preference comparison signals to regularize and guide translation learning.
  • Assess how TIM scales with model size and generalizes to zero-shot translation.
  • Provide insights into inference strategies and data types that influence translation quality.

Proposed method

  • Introduce output comparison to learn responses to different instructions for the same input.
  • Introduce a preference comparison loss to distinguish better translations from worse ones.
  • Add a token-level preference loss L_pl to regularize outputs (L_pl formula provided in the paper).
  • Combine L_pl with standard language modeling loss (L = L_lm + λ L_pl, with λ = 1.0).
  • Construct three data types for comparisons: order-guided, dictionary-guided, and error-guided data.
  • Explore three tuning strategies (LoRA, FixEmb, Full) to assess parameter efficiency and performance.
  • Evaluate on WMT22 and FLORES-200 across EN ⇄ DE and ZH ⇄ EN, with multiple backbone models (e.g., BLOOMZ-7b-mt, LLaMA-2-7b/13b).
Figure 1: Illustration of three types of output comparison. The text in blue highlights the difference between the added notes and the resulting difference due to these specific notes.
Figure 1: Illustration of three types of output comparison. The text in blue highlights the difference between the added notes and the resulting difference due to these specific notes.

Experimental results

Research questions

  • RQ1Can comparison-based fine-tuning improve translation quality versus standard instruction tuning on open-source LLMs?
  • RQ2How do output comparison and preference comparison contribute to reducing hallucinations and improving faithfulness in translations?
  • RQ3What is the impact of data types (order-guided, dictionary-guided, error-guided) on translation quality and robustness?
  • RQ4How does TIM performance scale with model size and across language directions, including zero-shot settings?
  • RQ5Are TIM-tuned models competitive with or superior to supervised baselines and multilingual MT models on standard MT benchmarks?

Key findings

  • TIM and its variants consistently outperform several baselines (e.g., Alpaca-*, MT-*, WMT22 winners) on WMT22 and FLORES-200 in four translation directions.
  • TIM-LLaMA-13b achieves top-1 quality-estimation performance without references in English↔German translation.
  • TIM improvements are more pronounced for smaller models, indicating better efficiency when coupled with comparison signals.
  • Zero-shot multilingual translation capabilities of TIM show strong performance compared to several open-source models, and TIM closes gaps with NLLB-3.3B in many directions, notably Ja→En.
  • Ablation studies indicate that dictionary-guided data, output comparison, and the LM-based bad-output variant provide meaningful signals, while random noise is less effective.
  • MT metrics evaluation reveals TIM-LLaMA-13b and TIM-BLOOMZ-7b can outperform reference-free metrics in correlating with MQM scores (system-level accuracy and Pearson correlation).
Figure 2: Overall framework of our proposed TIM. Given the contrastive outputs of each instance, we optimize the LLMs with the general language modeling loss and the token-level preference loss.
Figure 2: Overall framework of our proposed TIM. Given the contrastive outputs of each instance, we optimize the LLMs with the general language modeling loss and the token-level preference loss.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.