Why So Separate: Analyzing In-Context Learning from a Vector Space Perspective

Tobias Kalmbach, Sandipan Sikdar


Abstract
In-context learning (ICL) is a popular prompting strategy for large language models. ICL allows models to learn tasks using demonstrative examples alone, without any weight updates or training. Nevertheless, it is still largely unclear why ICL works. In this paper, we investigate ICL from a new viewpoint, namely a vector space perspective, and extract insights for ICL from this analysis. In our experiments, we extract the hidden representations, i.e., embeddings, created by a large language model when passing an ICL prompt through it. We find that these embeddings generated by large language models are separable in the vector space when applying ICL. The degree of separability is dependent on the difficulty of the task, the size of the model and other factors, like the labels of demonstrative examples. We also find that, especially for large models, the separability is indicative of the classification performance. As an application, we utilize our findings to explain peculiarities of ICL and to select demonstrative examples for ICL. Experiments across multiple datasets show that this way of selecting examples consistently outperforms the commonly used random selection method.
Anthology ID:
2026.lrec-1.7
Volume:
Proceedings of the Fifteenth Language Resources and Evaluation Conference
Month:
May
Year:
2026
Address:
Palma de Mallorca, Spain
Editors:
Stelios Piperidis, Núria Bel, Henk van den Heuvel, Nancy Ide, Simon Krek, Antonio Toral
Venue:
LREC
SIG:
Publisher:
ELRA Language Resource Association
Note:
Pages:
93–106
Language:
External URL:
https://lrec.elra.info/lrec2026-main-007
DOI:
10.63317/2o2ek4komzqz
Bibkey:
Cite (ACL):
Tobias Kalmbach and Sandipan Sikdar. 2026. Why So Separate: Analyzing In-Context Learning from a Vector Space Perspective. In Proceedings of the Fifteenth Language Resources and Evaluation Conference, pages 93–106, Palma de Mallorca, Spain. ELRA Language Resource Association.
Cite (Informal):
Why So Separate: Analyzing In-Context Learning from a Vector Space Perspective (Kalmbach & Sikdar, LREC 2026)
Copy Citation: