Skip to main navigation Skip to search Skip to main content

Example Selection for In-Context Learning via Conditional Mutual Information

  • Shanyu Zhang
  • , Di Zhang*
  • *Corresponding author for this work
  • Xi'an Jiaotong-Liverpool University

Research output: Chapter in Book or Report/Conference proceeding › Conference Proceeding › peer-review

Abstract

In-context learning (ICL) is highly sensitive to which demonstrations are chosen, yet existing methods rely on embedding similarity as a proxy for example value. We argue that similarity is flawed: a similar example may repeat what the model already knows, and selecting similar examples independently ignores inter-example redundancy. We reformulate example selection as conditional mutual information (MI) maximisation and propose MI-Greedy, which greedily selects demonstrations to maximise I(Y; S | x) between the selected set S and the answer Y given test input x. We prove this objective is monotone submodular, guaranteeing a (1 − 1/e) greedy approximation and deriving diversity as a formal consequence. Experiments on SST-2, TREC, RTE, and GSM8K with Qwen2.5-3B show MI-Greedy beats SBERT-kNN at small k (+1.0–+2.7 pp. on TREC at k = 2, 4; +1.4–+1.8 pp. on RTE), but the advantage reverses at k = 8 as similarity-based coverage dominates. A two-stage pipeline (SBERT pre-filter → MI-Greedy) cuts forward passes by up to 83% with no accuracy loss. Under 30% label-noisy candidate pools, MI-Greedy degrades up to 9× less than SBERT-kNN. On GSM8K the token-entropy estimator is ineffective (49% at k = 2, below random 72.3%; Pearson r ≈ − 0.06 to correctness); a pilot answer-consistency estimator recovers 75%, confirming the MI objective is sound but the estimator is the bottleneck for generative tasks.

Original languageEnglish
Title of host publicationAdvanced Intelligent Computing Technology and Applications - 22nd International Conference on Intelligent Computing, ICIC 2026, Proceedings
EditorsDe-Shuang Huang, Chuanlei Zhang, Wei Chen, Yijie Pan, Prashan Premaratne
PublisherSpringer Science and Business Media Deutschland GmbH
Pages380-389
Number of pages10
ISBN (Print)9789819234349
DOIs
Publication statusPublished - 2027
Event22nd International Conference on Intelligent Computing, ICIC 2026 - Toronto, Canada
Duration: 22 Jul 2026 → 26 Jul 2026

Publication series

NameLecture Notes in Computer Science
Volume16665 LNAI
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Conference

Conference22nd International Conference on Intelligent Computing, ICIC 2026
Country/TerritoryCanada
CityToronto
Period22/07/26 → 26/07/26

Keywords

  • Example selection
  • In-context learning
  • Large language models
  • Mutual information
  • Submodular optimisation

Cite this