Vector-ICL: In-context Learning with Continuous Vector Representations
Yufan Zhuang, Chandan Singh, Liyuan Liu, Jingbo Shang, Jianfeng Gao
TL;DR
Vector-ICL investigates whether large language models trained on text can perform in-context learning on continuous vectors from diverse domains. It introduces embedding projection to map encoder outputs into the LLM's context as box tokens, with projectors pretrained via next-token prediction and optionally finetuned for downstream tasks. Across nine tasks spanning text, time-series, graphs, and neuroscience data, Vector-ICL frequently matches or surpasses few-shot ICL and domain-specific baselines, and the finetuned projectors yield the strongest performance gains. This work broadens the applicability of LLMs by enabling learning from non-textual, continuous representations, with implications for multimodal reasoning and cross-domain transfer.
Abstract
Large language models (LLMs) have shown remarkable in-context learning (ICL) capabilities on textual data. We explore whether these capabilities can be extended to continuous vectors from diverse domains, obtained from black-box pretrained encoders. By aligning input data with an LLM's embedding space through lightweight projectors, we observe that LLMs can effectively process and learn from these projected vectors, which we term Vector-ICL. In particular, we find that pretraining projectors with general language modeling objectives enables Vector-ICL, while task-specific finetuning further enhances performance. In our experiments across various tasks and modalities, including text reconstruction, numerical function regression, text classification, summarization, molecule captioning, time-series classification, graph classification, and fMRI decoding, Vector-ICL often surpasses both few-shot ICL and domain-specific model or tuning. We further conduct analyses and case studies, indicating the potential of LLMs to process vector representations beyond traditional token-based paradigms.
