Where Does In-context Machine Translation Happen in Large Language Models?
Abstract
Self-supervised large language models have demonstrated the ability to perform Machine Translation (MT) via in-context learning, but little is known about where the model performs MT with respect to prompt instructions and demonstration examples. In this work, we attempt to characterize the region in layer-wise attention heads where GPT models transition from in-context learners to translation models. Through a series of layer-wise context-masking experiments on GPTNeo2.7B and Bloom3B, we demonstrate evidence of a "task recognition" point where the translation task is encoded into the input representations and attention to context is no longer necessary. Our layer-wise fine-tuning experiments indicate that the most effective layers for MT fine-tuning are the layers critical to task recognition. Next, we examine redundancy in layers following task recognition, observing that masking these later layers does not hurt performance significantly. Finally, we train discrete attention head gates with $L_0$ regularisation and find evidence that the most pruneable heads occur after task recognition.
BibTeX
@misc{sia2024where,
author = {Suzanna Sia and David Mueller and Kevin Duh},
title = {{Where Does In-context Machine Translation Happen in Large Language Models?}},
year = {2024},
url = {https://openreview.net/forum?id=3i7iNGxw6r},
howpublished = {OpenReview},
note = {Submitted to ICLR 2024},
}Ask Althea to put this paper to the test.
Loading related content...