Mixtures of In-Context Learners
Giwon Hong, Emile Van Krieken, Edoardo Ponti, Nikolay Malkin, Pasquale Minervini
Abstract
In-context learning (ICL) adapts LLMs by providing demonstrations without fine-tuning the model parameters; however, it is very sensitive to the choice of in-context demonstrations, and processing many demonstrations can be computationally demanding. We propose Mixtures of In-Context Learners (MoICL), a novel approach that uses subsets of demonstrations to train a set of experts via ICL and learns a weighting function to merge their output distributions via gradient-based optimisation. In our experiments, we show performance improvements on 5 out of 7 classification datasets compared to a set of strong baselines (e.g., up to +13% compared to ICL and LENS). Moreover, we improve the Pareto frontier of ICL by reducing the inference time needed to achieve the same performance with fewer demonstrations. Finally, MoICL is more robust to out-of-domain (up to +11%), imbalanced (up to +49%) and perturbed demonstrations (up to +38%).
BibTeX
@inproceedings{hong-etal-2025-mixtures,
title = "Mixtures of In-Context Learners",
author = "Hong, Giwon and
Van Krieken, Emile and
Ponti, Edoardo and
Malkin, Nikolay and
Minervini, Pasquale",
editor = "Che, Wanxiang and
Nabende, Joyce and
Shutova, Ekaterina and
Pilehvar, Mohammad Taher",
booktitle = "Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
month = jul,
year = "2025",
address = "Vienna, Austria",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2025.acl-long.1277/",
doi = "10.18653/v1/2025.acl-long.1277",
pages = "26332--26351",
ISBN = "979-8-89176-251-0"
}