Mixtures of In-Context Learners
Preprint
Abstract
In-context learning (ICL) adapts LLMs by providing demonstrations without fine-tuning the model parameters; however, it does not differentiate between demonstrations and quadratically increases the complexity of Transformer LLMs, exhausting the memory. As a solution, we propose Mixtures of In-Context Learners (MoICL), a novel approach to treat subsets of demonstrations as experts and learn a weighting function to merge their output distributions based on a training set. In our experiments, we show performance improvements on 5 out of 7 classification datasets compared to a set of strong baselines (up to +13\% compared to ICL and LENS). Moreover, we enhance 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\%), or noisy demonstrations (up to +38\%) or can filter these out from datasets. Overall, MoICL is a more expressive approach to learning from demonstrations without exhausting the context window or memory.Keywords
All Related Versions
This publication has 14 references indexed in Scilit:
- Adaptive Perturbation-Based Gradient Estimation for Discrete Latent Variable ModelsProceedings of the AAAI Conference on Artificial Intelligence, 2023
- FiD-ICL: A Fusion-in-Decoder Approach for Efficient In-Context Learning2023
- Mitigating Label Biases for In-context Learning2023
- Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?2022
- Few-Shot Anaphora Resolution in Scientific Protocols via Mixtures of In-Context Experts2022
- Noisy Channel Language Model Prompting for Few-Shot Text Classification2022
- Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity2022
- TweetEval: Unified Benchmark and Comparative Evaluation for Tweet Classification2020
- Natural Questions: A Benchmark for Question Answering ResearchTransactions of the Association for Computational Linguistics, 2019
- The Probabilistic Relevance Framework: BM25 and BeyondFoundations and Trends® in Information Retrieval, 2009