L'Apprendimento In-Contesto Genera Vettori di Task.
In-Context Learning Creates Task Vectors
October 24, 2023
Autori: Roee Hendel, Mor Geva, Amir Globerson
cs.AI
Abstract
L'apprendimento in contesto (In-context Learning, ICL) nei Modelli Linguistici di Grande Dimensione (Large Language Models, LLMs) è emerso come un nuovo e potente paradigma di apprendimento. Tuttavia, il suo meccanismo sottostante non è ancora ben compreso. In particolare, è difficile mapparlo al framework "standard" del machine learning, in cui si utilizza un insieme di addestramento S per trovare una funzione f(x) che si adatti meglio in una certa classe di ipotesi. In questo lavoro facciamo progressi su questo problema dimostrando che le funzioni apprese tramite ICL hanno spesso una struttura molto semplice: corrispondono al transformer LLM i cui unici input sono la query x e un singolo "vettore di task" calcolato dall'insieme di addestramento. Pertanto, l'ICL può essere visto come un processo che comprime S in un singolo vettore di task theta(S) e poi utilizza questo vettore per modulare il transformer e produrre l'output. Supportiamo questa affermazione attraverso esperimenti completi su una gamma di modelli e task.
English
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
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.