Reproduce “Towards the Effect of Examples on In-Context Learning: A Theoretical Case Study” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Pengfei He, Yingqian Cui, Han Xu, Hui Liu, Makoto Yamada, Jiliang Tang, Yue Xing

This paper provides a theoretical case study for In-Context Learning (ICL) in binary classification using a probabilistic model, quantifying how pre-training knowledge and in-context examples influence predictions. It details the impact of example quantity, class imbalance, and label noise, and identifies a novel "mean reversion" effect where LLMs may attempt to balance output labels based on pre-trained prompt statistics.

Key insights

  • ICL prediction accuracy is quantifiable through an interplay between pre-training knowledge and example-derived knowledge; sufficient examples can override contradicting pre-training biases.
  • Class imbalance significantly degrades ICL performance for the minority class, and label noise impacts accuracy in a nuanced way, potentially leading to degenerate decision boundaries at critical levels.
  • A novel "mean reversion" effect occurs when LLMs are pre-trained on prompts with fixed label fractions, causing them to make test query predictions that revert the overall prompt's label distribution to the pre-trained fraction.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.