Function Vectors in Large Language Models

“We report the presence of a simple neural mechanism that represents an input-output function as a vector within autoregressive transformer language models (LMs). Using causal mediation analysis on a diverse range of in-context-learning (ICL) tasks, we find that a small number attention heads transport a compact representation of the demonstrated task, which we call a function vector (FV). … We test FVs across a range of tasks, models and layers and find strong causal effects across settings in middle layers.”

Find the paper and full list of authors at ArXiv.

View on Site: Function Vectors in Large Language Models
,
,