Scaling Laws for Many-Shot In-Context Learning with Self-Generated Annotations

Zhengyao Gu, Henry Peng Zou, Yankai Chen, Aiwei Liu, Weizhi Zhang +1 more
3/4/2025
cs.CLcs.AIcs.IR

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

The high cost of obtaining high-quality annotated data for in-context learning (ICL) has motivated the development of methods that use self-generated annotations in place of ground-truth labels. While these approaches have shown promising results in few-shot settings, they generally do not scale to many-shot scenarios. In this work, we study ICL with self-generated examples using a framework analogous to traditional semi-supervised learning, consisting of annotation generation, demonstration selection, and in-context inference. Within this framework, we propose a simple baseline that outperforms ground-truth ICL in zero-shot, few-shot, and many-shot settings. Notably, we observe a scaling law with this baseline, where optimal performance is achieved with more than 1,000 demonstrations. To fully exploit the many-shot capabilities of semi-supervised ICL, we introduce IterPSD, an iterative annotation approach that integrates iterative refinement and curriculum pseudo-labeling techniques from semi-supervised learning, yielding up to 6.8% additional gains on classification tasks.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{gu2025scaling,
  title  = {Scaling Laws for Many-Shot In-Context Learning with Self-Generated Annotations},
  author = {Zhengyao Gu and Henry Peng Zou and Yankai Chen and Aiwei Liu and Weizhi Zhang and Philip S. Yu},
  year   = {2025},
  eprint = {2503.03062},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.03062v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2503.03062.svg)](https://codeofpaper.com/paper/2503.03062)

Discussion