Do Function Vectors and Task Vectors Generalize? A Reproducibility Study Across Model Families and Scale

Serendeep Rudraraju


Abstract
A language model can learn a task from examples in its prompt. Function vectors (FVs) and task vectors (TVs) aim to transfer that behavior to a new prompt by modifying the model’s activations. We reproduce both methods on word-pair tasks across GPT-J, Llama-3.1, and Gemma-2. In held-out tests, FVs outperform random controls on GPT-J and Llama-3.1-8B. TVs outperform shuffled-label controls on GPT-J and both base and instruction-tuned Gemma; the Llama-8B comparison is inconclusive. Our FV implementation achieves zero accuracy on both Gemma checkpoints in a two-task follow-up. Sentiment classification shows a further limitation: in-context learning (ICL) achieves 73.5–94.0% accuracy with arbitrary labels, while TVs achieve only 49.6–52.7%. Successful transfer on word pairs therefore does not extend to this sentiment dataset. Separating vector construction, layer selection, and testing also shows why gains over zero-shot accuracy can overstate the evidence for transfer. Code and data are available online.
Anthology ID:
2026.blackboxnlp-1.57
Volume:
Proceedings of the 9th BlackboxNLP Workshop: Analyzing and Interpreting Neural Networks for NLP
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Dana Arad, Yonatan Belinkov, Hanjie Chen, Nils Feldhus, Aaron Mueller, Hosein Mohebbi, Gabriele Sarti, Martin Tutek
Venues:
BlackboxNLP | WS
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
1017–1028
Language:
URL:
https://aclanthology.org/2026.blackboxnlp-1.57/
DOI:
Bibkey:
Cite (ACL):
Serendeep Rudraraju. 2026. Do Function Vectors and Task Vectors Generalize? A Reproducibility Study Across Model Families and Scale. In Proceedings of the 9th BlackboxNLP Workshop: Analyzing and Interpreting Neural Networks for NLP, pages 1017–1028, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
Do Function Vectors and Task Vectors Generalize? A Reproducibility Study Across Model Families and Scale (Rudraraju, BlackboxNLP 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.blackboxnlp-1.57.pdf