mlsanityData to 7 Oct 2026

Where does In-context Translation Happen in Large Language Models

arXiv 2403.04510 ↗First posted 7 Mar 2024cs.CL cs.AIcited by 1

Not on the map. Why?

Abstract (arXiv)

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 the task with respect to prompt instructions and demonstration examples. In this work, we attempt to characterize the region where large language models transition from in-context learners to translation models. Through a series of layer-wise context-masking experiments on textscGPTNeo2.7B, textscBloom3B, textscLlama7b and textscLlama7b-chat, 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. We further observe correspondence between the low performance when masking out entire layers, and the task recognition layers. Taking advantage of this redundancy results in 45% computational savings when prompting with 5 examples, and task recognition achieved at layer 14 / 32. Our layer-wise fine-tuning experiments indicate that the most effective layers for MT fine-tuning are the layers critical to task recognition.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 41 of its 47 references that are in the map. First posted on arXiv 7 Mar 2024.

Builds on

41 of 47 references.

References · 41

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
  3. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  4. 2021On the Opportunities and Risks of Foundation Modelscited by 3,961
  5. 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,346
  6. 2022BLOOM: A 176B-Parameter Open-Access Multilingual Language Modelcited by 1,968
  7. 2018A Call for Clarity in Reporting BLEU Scorescited by 1,790
  8. 2021Multitask Prompted Training Enables Zero-Shot Task Generalizationcited by 1,462
  9. 2021What Makes Good In-Context Examples for GPT-3?cited by 1,184
  10. 2016The Concrete Distribution: A Continuous Relaxation of Discrete Random Variablescited by 1,135
  11. 2019What Does BERT Look At? An Analysis of BERT's Attentioncited by 994
  12. 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
29 more
  1. 2022Super-NaturalInstructions: Generalization via Declarative Instructions on 1600+ NLP Taskscited by 858
  2. 2019Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Prunedcited by 844
  3. 2019Are Sixteen Heads Really Better than One?cited by 803
  4. 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
  5. 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
  6. 2019Designing and Interpreting Probes with Control Taskscited by 608
  7. 2017Learning Sparse Neural Networks through L0 Regularizationcited by 571
  8. 2021The FLORES-101 Evaluation Benchmark for Low-Resource and Multilingual Machine Translationcited by 556
  9. 2023How Good Are GPT Models at Machine Translation? A Comprehensive Evaluationcited by 344
  10. 2021Layer-wise Analysis of a Self-supervised Speech Representation Modelcited by 293
  11. 2021Few-shot Learning with Multilingual Language Modelscited by 278
  12. 2022Why Can GPT Learn In-Context? Language Models Implicitly Perform Gradient Descent as Meta-Optimizerscited by 204
  13. 2022In-context Examples Selection for Machine Translationcited by 172
  14. 2023The BigScience ROOTS Corpus: A 1.6TB Composite Multilingual Datasetcited by 148
  15. 2019The Bottom-up Evolution of Representations in the Transformer: A Study with Machine Translation and Language Modeling Objectivescited by 139
  16. 2023The Learnability of In-Context Learningcited by 126
  17. 2020On the Effect of Dropping Layers of Pre-trained Transformer Modelscited by 118
  18. 2023The unreasonable effectiveness of few-shot learning for machine translationcited by 91
  19. 2021A Practical Survey on Faster and Lighter Transformerscited by 73
  20. 2022Rethinking the Role of Scale for In-Context Learning: An Interpretability-based Case Study at 66 Billion Scalecited by 64
  21. 2020How do Decisions Emerge across Layers in Neural Models? Interpretation with Differentiable Maskingcited by 63
  22. 2023Adaptive Machine Translation with Large Language Modelscited by 58
  23. 2023The Closeness of In-Context Learning and Weight Shifting for Softmax Regressioncited by 41
  24. 2021Fine-Tuned Transformers Show Clusters of Similar Representations Across Layerscited by 29
  25. 2022Nearest Class-Center Simplification through Intermediate Layerscited by 20
  26. 2022On the Transformation of Latent Space in Fine-Tuned NLP Modelscited by 19
  27. 2022Hidden State Variability of Pretrained Language Models Can Guide Computation Reduction for Transfer Learningcited by 13
  28. 2023In-context Learning as Maintaining Coherency: A Study of On-the-fly Machine Translation Using Large Language Modelscited by 10
  29. 2023TART: A plug-and-play Transformer module for task-agnostic reasoningcited by 10

Built on by

Cited by year

Citing papers per year: 2025: 1.

1 paper.