Revisiting the Hypothesis: Do pretrained Transformers Learn In-Context by Gradient Descent?

  • 2024-02-29 18:47:18
  • Lingfeng Shen, Aayush Mishra, Daniel Khashabi
  • 0

Abstract

The emergence of In-Context Learning (ICL) in LLMs remains a significantphenomenon with little understanding. To explain ICL, recent studies try totheoretically connect it to Gradient Descent (GD). We ask, does this connectionhold up in actual pre-trained models? We highlight the limiting assumptions in prior works that make their contextconsiderably different from the practical context in which language models aretrained. For example, the theoretical hand-constructed weights used in thesestudies have properties that don't match those of real LLMs. Furthermore, theirexperimental verification uses ICL objective (training models explicitly forICL), which differs from the emergent ICL in the wild. We also look for evidence in real models. We observe that ICL and GD havedifferent sensitivity to the order in which they observe demonstrations.Finally, we probe and compare the ICL vs. GD hypothesis in a natural setting.We conduct comprehensive empirical analyses on language models pre-trained onnatural data (LLaMa-7B). Our comparisons of three performance metrics highlightthe inconsistent behavior of ICL and GD as a function of various factors suchas datasets, models, and the number of demonstrations. We observe that ICL andGD modify the output distribution of language models differently. These resultsindicate that the equivalence between ICL and GD remains an open hypothesis andcalls for further studies.

 

Quick Read (beta)

loading the full paper ...