In-Context Learning Creates Task Vectors
Hendel, Roee, Geva, Mor, Globerson, Amir
–arXiv.org Artificial Intelligence
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 $\boldsymbol{\theta}(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.
arXiv.org Artificial Intelligence
Oct-24-2023
- Country:
- North America
- Mexico (0.04)
- United States > Illinois
- Cook County > Chicago (0.04)
- Europe
- France (0.04)
- Germany > Berlin (0.04)
- Austria > Vienna (0.04)
- United Kingdom > England
- Cambridgeshire > Cambridge (0.04)
- Spain > Galicia
- Madrid (0.04)
- Russia > Central Federal District
- Moscow Oblast > Moscow (0.04)
- Netherlands > North Holland
- Amsterdam (0.04)
- Asia
- Middle East > Israel
- Tel Aviv District > Tel Aviv (0.04)
- Jerusalem District > Jerusalem (0.04)
- Japan > Honshū
- Kantō > Tokyo Metropolis Prefecture > Tokyo (0.04)
- China > Beijing
- Beijing (0.04)
- Middle East > Israel
- North America
- Genre:
- Research Report (0.82)
- Technology: