2023 · 32 citations · 13 references
ComputingComputer ScienceComputational LinguisticsMachine LearningNatural Language ProcessingDeep LearningLanguage ModelingLanguage ModelsNatural Language UnderstandingRepresentation LearningIn-context LearningLanguage Model PretrainingLarge Language ModelsNeural Language ModelsTransformer Language ModelsTransformer Models
In-context learning in large language models is a powerful paradigm, yet its underlying mechanism remains poorly understood and difficult to reconcile with conventional machine‑learning frameworks that rely on a training set to fit a function. This study aims to demonstrate that the functions produced by in‑context learning can be represented as a transformer whose only inputs are the query and a single task vector derived from the training set. The authors validate this claim through extensive experiments on diverse models and tasks, showing consistent behavior across settings. They find that in‑context learning effectively compresses the training set into a task vector θ(S), which modulates the transformer to generate outputs, revealing a simple, interpretable structure.
In-context learning (ICL) in Large Language Models (LLMs) has emerged as a powerful new learning paradigm. However, its underlying mechanism is still not well understood. In particular, it is challenging to map it to the “standard’ machine learning framework, where one uses a training set S to find a best-fitting function f(x) in some hypothesis class. Here we make progress on this problem by showing that the functions learned by ICL often have a very simple structure: they correspond to the transformer LLM whose only inputs are the query x and a single “task vector’ calculated from the training set. Thus, ICL can be seen as compressing S into a single task vector 𝜃(S) and then using this task vector to modulate the transformer to produce the output. We support the above claim via comprehensive experiments across a range of models and tasks.
13
LLaMA: Open and Efficient Foundation Language Models
Hugo Touvron, Thibaut Lavril, Gautier Izacard et al. · arXiv (Cornell University) · 2023 · 3.9K citations · Full text
A Survey on In-context Learning
Qingxiu Dong, Lei Li, Damai Dai et al. · arXiv (Cornell University) · 2022 · 252 citations · Full text
Locating and Editing Factual Associations in GPT
Kevin Meng, David Bau, Alex Andonian et al. · arXiv (Cornell University) · 2022 · 175 citations · Full text