Many-Shot In-Context Learning
Abstract
Large language models (LLMs) excel at few-shot in-context learning (ICL) -- learning from a few examples provided in context at inference, without any weight updates. Newly expanded context windows allow us to investigate ICL with hundreds or thousands of examples – the many-shot regime. Going from few-shot to many-shot, we observe significant performance gains across a wide variety of generative and discriminative tasks. While promising, many-shot ICL can be bottlenecked by the available amount of human-generated outputs. To mitigate this limitation, we explore two new settings: (1) "Reinforced ICL" that uses model-generated chain-of-thought rationales in place of human rationales, and (2) "Unsupervised ICL" where we remove rationales from the prompt altogether, and prompts the model only with domain-specific inputs. We find that both Reinforced and Unsupervised ICL can be quite effective in the many-shot regime, particularly on complex reasoning tasks. We demonstrate that, unlike few-shot learning, many-shot learning is effective at overriding pretraining biases, can learn high-dimensional functions with numerical inputs, and performs comparably to supervised fine-tuning. Finally, we reveal the limitations of next-token prediction loss as an indicator of downstream ICL performance
Cite
Text
Agarwal et al. "Many-Shot In-Context Learning." ICML 2024 Workshops: ICL, 2024.Markdown
[Agarwal et al. "Many-Shot In-Context Learning." ICML 2024 Workshops: ICL, 2024.](https://mlanthology.org/icmlw/2024/agarwal2024icmlw-manyshot/)BibTeX
@inproceedings{agarwal2024icmlw-manyshot,
title = {{Many-Shot In-Context Learning}},
author = {Agarwal, Rishabh and Singh, Avi and Zhang, Lei M and Bohnet, Bernd and Rosias, Luis and Chan, Stephanie C.Y. and Zhang, Biao and Faust, Aleksandra and Larochelle, Hugo},
booktitle = {ICML 2024 Workshops: ICL},
year = {2024},
url = {https://mlanthology.org/icmlw/2024/agarwal2024icmlw-manyshot/}
}