Skip to main content
LawSphereX

Analyzing Context Contributions in LLM-based Machine Translation

Subject: Translation and Multilingual Computing

Author or source: Emmanouil Zaranis, Nuno M Guerreiro, Andre Martins

Updated:

However, the mechanisms by which LLMs use different parts of the input context remain largely unexplored.

Emmanouil Zaranis, Nuno M Guerreiro, Andre Martins. 2024. Analyzing Context Contributions in LLM-based Machine Translation. Findings of the Association for Computational Linguistics: EMNLP 2024. Association for Computational Linguistics. DOI 10.18653/v1/2024.findings-emnlp.876. CC BY 4.0. Original PDF and author abstract are reproduced unchanged apart from whitespace in the abstract. LawSphereX prepared the reading prompt and cover. No endorsement implied.

Publication sources

Authors’ abstract

Source page 1–26

Large language models (LLMs) have achieved state-of-the-art performance in machine translation (MT) and demonstrated the ability to leverage in-context learning through few-shot examples. However, the mechanisms by which LLMs use different parts of the input context remain largely unexplored. In this work, we provide a comprehensive analysis of context utilization in MT, studying how LLMs use various context parts, such as few-shot examples and the source text, when generating translations. We highlight several key findings: (1) the source part of few-shot examples appears to contribute more than its corresponding targets, irrespective of translation direction; (2) finetuning LLMs with parallel data alters the contribution patterns of different context parts; and (3) there is a positional bias where earlier few-shot examples have higher contributions to the translated sequence. Finally, we demonstrate that inspecting anomalous context contributions can potentially uncover pathological translations, such as hallucinations. Our findings shed light on the internal workings of LLM-based MT which go beyond those known for standard encoder-decoder MT models.

Reading guide for translation and multilingual computing

Source page 1–26

List the languages and directions in the evaluation. Compare scores within a language pair before drawing conclusions across languages or domains.