Research map / Large language models / Language, safety and interpretability
Unraveling the Mechanics of Learning-Based Demonstration Selection for In-Context Learning
Hui Liu, Wenya Wang, Hao Sun, Chris Xing Tian, Chenqi Kong, Xin Dong, Haoliang Li
City University of Hong Kong · Nanyang Technological University · Peking University · NVIDIA
Read the paperPlace an idea next to itCheck your own paper ↗
AI-extracted. The measured effects below were read by AI from the paper's full text (no summary yet). Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
This paper tried a common change: Larger batch size
increase the test batch size for MLSM weight learning to 8 · classification tasks · accuracy: over 4% average improvement Improved
What 943 accepted papers report for this change
- 539 improved
- 126 no clear effect
- 61 mixed
- 217 hurt
- Predicting the Emergence of Induction Heads in Language Model Pretraining ICML 2026 · increase batch size (fixed context 1024) · Natural data (CC100) · induction head emergence point (updates): rho=-1.0, p<0.001Improved
- When RL Meets Adaptive Speculative Training: A Unified Training-Serving System ICML 2026 · Increase batch size from 1 to 32 · MiniMax M2.1 FP8 · speedup: 1.57x -> 1.25xHurt
- Untied Ulysses: Memory-Efficient Context Parallelism via Headwise Chunking ICML 2026 · increase per-device batch size to 10 using freed memory · Llama 3-8B, 128K · throughput (TPS): 2464.10 (Ulysses) -> 2526.77 (UPipe)Improved
See this change in detailMatched by the wording of each paper's own result, read by AI from the full text. Papers report gains more often than failures, so this shows what gets published, not the chance a change works.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| replace the final-layer BERT retriever with MLSM (multi-level layer ensemble) | Top-K BERT, GPT-Neo · 5 classification tasks (avg) | accuracy: 47.94 -> 49.36 | Improved |
| replace the best unsupervised retriever with MLSM | Top-K BM25, GPT-Neo · 5 generation tasks (avg) | exact match: 46.48 -> 48.59 | Improved |
| fine-tune the retriever on labeled demonstration data (TTF) instead of LLM-labeled proxy task | EPR/CEIL, GPT-Neo · 5 classification tasks (avg) | accuracy: 55.79 -> 61.06 | Improved |
| use TTF (T5) instead of EPR for generation | EPR, GPT-Neo · 5 generation tasks (avg) | exact match: 53.43 -> 48.80 | Hurt |
| replace EPR with MLSM when transferring across tasks | EPR · cross-task transfer | accuracy/EM | Improved |
| increase the test batch size for MLSM weight learning to 8 (ablation) | MLSM · classification tasks | accuracy: over 4% average improvement | Improved |
| combine MLSM with the TTF-trained retriever (ablation) | TTF · 5 classification tasks (avg) | accuracy: 61.06 -> 53.69 | Hurt |
| combine MLSM with the TTF-trained retriever (ablation) | MLSM · 5 classification tasks (avg) | accuracy: 49.36 -> 53.69 | Improved |
| apply MLSM/TTF to GPT-2 XL, GPT-Neo and text-davinci-002 | MLSM, TTF · cross-LLM | absolute gain over Top-K BERT: TTF avg 3.82 / 12.73 / 6.11; MLSM 1.74 / 2.29 / 2.38 | Mixed |
| use TTF on MRPC with GPT-2 XL | TTF · MRPC, GPT-2 XL | absolute gain over Top-K BERT: 0.00 | No clear effect |
| use MLSM instead of Top-K BERT on SWAG | MLSM, GPT-Neo · SWAG | accuracy: 41.09 -> 41.49 | No clear effect |
| use MLSM instead of Top-K BM25 on Nl2Bash | MLSM, GPT-Neo · NL2Bash | exact match: 58.81 -> 56.11 | Hurt |
Open problems in in-context learning analysis
Which in-context learning methods hold up beyond English classification on small open models, and what do they cost?
- Only a few small or medium open models were tested. · 14 papers state it
- The method needs many extra LLM calls or passes. · 13 papers state it
- Evaluated on English data only, with other languages untested. · 12 papers state it
Closest papers by meaning
- Revisiting Demonstration Selection Strategies in In-Context Learning (ACL 2024 · similarity 0.95)
- Comparative Analysis of Demonstration Selection Algorithms for In-Context Learning in Large Language Models (Student Abstract) (AAAI 2025 · similarity 0.94)
- Large Language Models are Demonstration Pre-Selectors for Themselves (ICML 2025 · similarity 0.90)
- Mixture of Demonstrations for In-Context Learning (NeurIPS 2024 · similarity 0.90)
- Are Human-generated Demonstrations Necessary for In-context Learning? (ICLR 2024 · similarity 0.90)
- What Makes In-context Learning Effective for Mathematical Reasoning (ICML 2025 · similarity 0.90)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.