LexMatcher: Dictionary-centric Data Collection for LLM-based Machine Translation

Yongjing Yin, Jiali Zeng, Yafu Li, Fandong Meng, Yue ZhangarXiv 2024 · DOI · arXiv

Abstract

In the field of Neural Machine Translation (NMT), the prevailing paradigm has long emphasized the acquisition of massive parallel datasets. However, as Large Language Models (LLMs) are increasingly fine-tuned for translation tasks, this "more is better" approach often leads to overfitting on common linguistic patterns while neglecting the "long tail" of rare word senses. This paper introduces LexMatcher, a novel dictionary-centric data curation strategy that prioritizes semantic diversity. By utilizing bilingual dictionaries to guide the selection of a compact yet representative training subset—comprising only 0.1% of standard datasets—LexMatcher achieves state-of-the-art translation performance. Our results demonstrate significant improvements in word sense disambiguation and technical terminology handling, even in zero-shot multilingual scenarios.

Introduction: The Data Distribution Challenge

The evolution of Neural Machine Translation has been driven by the availability of large-scale, web-crawled parallel corpora. While these datasets provide broad coverage, they are inherently skewed toward high-frequency words and common semantic contexts. For instance, a polysemous word like "bank" may appear thousands of times in a financial context but rarely in a geographical one. When fine-tuning LLMs like LLaMA, this imbalance can "wash out" the model's reasoning capabilities, causing it to default to the most frequent sense regardless of context.

The core challenge lies in the data distribution. Standard training sets fail to provide sufficient examples of the full spectrum of meanings found in a language. LexMatcher addresses this by shifting the focus from data quantity to data quality and semantic uniformity, proving that a smarter selection of data can outperform sheer volume.

Methodology: The LexMatcher Pipeline

LexMatcher employs a two-stage pipeline designed to curate a balanced instruction fine-tuning dataset.

1. Data Retrieval via a "Quota" System

Instead of random sampling, LexMatcher uses bilingual dictionaries (such as Open Multilingual WordNet) as a roadmap. The system traverses a massive corpus and identifies sentence pairs containing specific dictionary senses. To ensure a uniform distribution, a threshold $K$ is implemented. Once $K$ examples of a specific word-sense pair are collected, the system stops retrieving that sense. This prevents common words from dominating the dataset and ensures that rare senses receive equal representation.

2. Data Augmentation for Missing Senses

To address gaps in natural corpora—particularly for rare or highly polysemous words—LexMatcher utilizes a commercial LLM (e.g., GPT-3.5) to synthetically generate precise sentence pairs. These pairs are designed to illustrate specific meanings that are underrepresented in the retrieved data.

The LexMatcher pipeline consists of dictionary-guided data retrieval and LLM-based data augmentation to ensure semantic diversity.

The curated data is then used for instruction fine-tuning of LLaMA2 models. The training includes both general translation instructions and "constrained" instructions that provide dictionary hints, teaching the model to leverage external lexical knowledge effectively.

Experimental Setup

The authors evaluated LexMatcher using LLaMA2-7B and 13B models. Source corpora included WMT22 training data for German, Chinese, and Russian paired with English. Evaluation was conducted across several benchmarks:

  • WMT2022 Test Sets: For general translation quality.
  • DiBiMT: A specialized benchmark for Word Sense Disambiguation (WSD).
  • WMT23 Terminology Task: To test the model's ability to handle domain-specific terms.
  • Zero-Shot Sets: Czech, Japanese, and Ukrainian to English to test multilingual generalization.

Key Results and Insights

LexMatcher demonstrated superior performance across all evaluated tasks. Notably, LexMatcher-7B outperformed established baselines such as ALMA-7B and Parrot-7B on the WMT22 test sets. In English-to-X tasks, the model achieved an average improvement of 17.02 BLEU points over the base LLaMA2 model.

Uniformity Trumps Quantity

LexMatcher extracts only about 1 million samples, which is roughly 0.1% of the original WMT data. Despite this massive reduction, the models perform better because the data distribution is "flatter"—rare senses get as much exposure as common ones. This efficiency makes fine-tuning significantly faster and less computationally expensive.

Multilingual Generalization

One of the most striking findings was the model's performance in zero-shot scenarios. Despite not being specifically trained on languages like Japanese or Ukrainian, LexMatcher showed significant improvements. This suggests that high-quality, sense-diverse data helps the model better align its internal multilingual representations.

LexMatcher-13B achieves competitive BLEU scores on zero-shot language pairs, outperforming several larger models and approaching GPT-4 performance.

Disambiguation Excellence

On the DiBiMT benchmark, LexMatcher-13B achieved accuracy rates for Chinese (59.09%) and Russian (69.93%) that surpassed commercial systems like Google Translate and DeepL in specific disambiguation categories. This confirms that the dictionary-centric approach effectively addresses the "long tail" of word meanings.

Conclusion

The success of LexMatcher underscores the principle that "less is more" when the data is carefully curated. By reducing the training data volume while flattening the sense distribution, the authors achieved higher efficiency and superior translation quality. The surgical use of synthetic data for missing senses proved to be a powerful tool for precision training. Future research will focus on extending this approach to low-resource languages and other semantic-heavy NLP tasks.

Summary updated

Abstract

The fine-tuning of open-source large language models (LLMs) for machine translation has recently received considerable attention, marking a shift towards data-centric research from traditional neural machine translation. However, the area of data collection for instruction fine-tuning in machine translation remains relatively underexplored. In this paper, we present LexMatcher, a simple yet effective method for data curation, the design of which is driven by the coverage of senses found in bilingual dictionaries. The construction process comprises data retrieval from an existing corpus and data augmentation that supplements the infrequent senses of polysemous words. Utilizing LLaMA2 as our base model, our approach outperforms the established baselines on the WMT2022 test sets and also exhibits remarkable performance in tasks related to word sense disambiguation and specialized terminology translation. These results underscore the effectiveness of LexMatcher in enhancing LLM-based machine translation. The code, data, and models are available at https://github.com/ARIES-LM/Lexmatcher-MT.git.
BibTeX
@misc{yin2024lexmatcher,
  author = {Yongjing Yin and Jiali Zeng and Yafu Li and Fandong Meng and Yue Zhang},
  title = {{LexMatcher: Dictionary-centric Data Collection for LLM-based Machine Translation}},
  year = {2024},
  eprint = {2406.01441},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.01441},
}
Figure