EMNLP Findings2024
Analyzing Context Contributions in LLM-based Machine Translation
Emmanouil Zaranis, Nuno Miguel Guerreiro, André F. T. Martins
Abstract
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.
Bengio. 2016. Neural machine translation by jointly learning to align and translate. Preprint, arXiv:1409.0473.
Kenza Benkirane, Laura Gongas, Shahar Pelles, Naomi Fuchs, Joshua Darmon, Pontus Stenetorp, David Ifeoluwa Adelani, and Eduardo Sánchez. 2024. Ma- chine translation hallucination detection for low and high resource languages using large language models. Preprint, arXiv:2407.16470.
Ask Lune
Ask anything. The answer quotes the paper.
Lune reads all of it and the papers around it, then shows you the passages behind every answer.
Lune answers from
the full paper · 3 top-tier papers that cite it · related work
Free to start. No credit card required.
Cited by top-tier papers3
- Watching the Watchers: Exposing Gender Disparities in Machine Translation Quality EstimationEmmanouil Zaranis, Giuseppe Attanasio, Sweta Agrawal, André F. T. MartinsACL 2025 · 8 citations
- Exploring the Translation Mechanism of Large Language ModelsHongbin Zhang, Kehai Chen, Xuefeng Bai, Xiucheng Li et al.NeurIPS 2025 · 4 citations
- Mind the Inclusivity Gap: Multilingual Gender-Neutral Translation Evaluation with mGeNTEBeatrice Savoldi, Giuseppe Attanasio, Eleonora Cupin, Eleni Gkovedarou et al.EMNLP 2025
Builds on16
- Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order SensitivityYao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel et al.ACL 2022 · 1,494 citations
- Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?Sewon Min, Xinxi Lyu, Ari Holtzman, Mikel Artetxe et al.EMNLP 2022 · 634 citations
- Prompting Large Language Model for Machine Translation: A Case StudyBiao Zhang, Barry Haddow, Alexandra BirchICML 2023 · 402 citations
- The Unreasonable Effectiveness of Few-shot Learning for Machine TranslationXavier Garcia, Yamini Bansal, Colin Cherry, George F. Foster et al.ICML 2023 · 133 citations
- In-context Examples Selection for Machine TranslationSweta Agrawal, Chunting Zhou, Mike Lewis, Luke Zettlemoyer et al.ACL Findings 2023 · 78 citations
Related papers
- Paying More Attention to Source Context: Mitigating Unfaithful Translations from Large Language ModelHongbin Zhang, Kehai Chen, Xuefeng Bai, Yang Xiang et al.ACL Findings 2024 · 2 citations
- Dissecting In-Context Learning of Translations in GPT-3Vikas Raunak, Arul Menezes, Hany Hassan AwadallaEMNLP Findings 2023 · 2 citations
- An Empirical Study of In-context Learning in LLMs for Machine TranslationPranjal A. Chitale, Jay P. Gala, Raj DabreACL Findings 2024 · 10 citations
- Exploring Context Strategies in LLMs for Discourse-Aware Machine TranslationRitvik Choudhary, Rem Hida, Masaki Hamada, Hayato Futami et al.EMNLP Findings 2025 · 1 citation
- Machine Translation Hallucination Detection for Low and High Resource Languages using Large Language ModelsKenza Benkirane, Laura Gongas, Shahar Pelles, Naomi Fuchs et al.EMNLP Findings 2024 · 7 citations
