Research map / Large language models / Reasoning and chain of thought
Linear-Time Demonstration Selection for In-Context Learning via Gradient Estimation
Ziniu Zhang, Zhenshuo Zhang, Dongyue Li, Lu Wang, Jennifer Dy, Hongyang R. Zhang
Northeastern University · University of Michigan
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.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| estimate subset losses with first-order gradient approximation instead of full inference | random ensemble selection · Coin-Flip / SST-2 | relative error and cost: error < 1%; 19.7x speed-up (Coin-Flip) | Improved |
| accelerate forward selection with gradient estimation | forward selection · Coin-Flip | speed-up: 37.7x | Improved |
| gradient-estimated random ensemble instead of top-k | DeepSeek-7B ICL · Modular Addition | F1: 52.2 -> 80.1 | Improved |
| gradient-estimated random ensemble instead of top-k | DeepSeek-7B ICL · Poem Sentiment | F1: 26.3 -> 76.6 | Improved |
| gradient-estimated random ensemble instead of BRIDGE | DeepSeek-7B ICL · Coin Flip | F1: 74.1 -> 75.2 | No clear effect |
| gradient-estimated random ensemble instead of forward selection variant | DeepSeek-7B ICL · SST-2 | F1: 94.2 -> 91.6 | Hurt |
| gradient estimation to accelerate top-k + CE | top-k + CE · six datasets | F1: computation reduced by 88% | No clear effect |
| gradient estimation to accelerate top-k + CE | top-k + CE · SST-2 | F1: 77.2 -> 75.9 | No clear effect |
| increase projection dimension d beyond 400 (ablation) | random ensemble · gradient estimation | approximation error | No clear effect |
| increase number of anchor prompts to 5 (ablation) | random ensemble · SST-2 | approximation error: error below 1% | Improved |
| choose anchors by mean embedding instead of randomly (ablation) | random ensemble · SST-2 | approximation error: differs by less than 2% | No clear effect |
| start estimation in forward selection at step t > 3 (ablation) | forward selection · ICL | performance: same as full forward selection | No clear effect |
Open problems in test-time compute scaling
When does spending more compute at inference pay off, and how should it be spent?
- The gain depends on a verifier that is itself unreliable. · 36 papers state it
- Tested on math and code with checkable answers. · 28 papers state it
- Search and voting act on final answers, not steps. · 10 papers state it
Closest papers by meaning
- Easier to Judge than to Find: Predicting In-Context Learning Success for Demonstration Selection (ICML 2026 · similarity 0.91)
- Long-Context Demonstration Selection Using State Space Models (EMNLP 2026 · similarity 0.90)
- Comparative Analysis of Demonstration Selection Algorithms for In-Context Learning in Large Language Models (Student Abstract) (AAAI 2025 · similarity 0.90)
- Large Language Models are Demonstration Pre-Selectors for Themselves (ICML 2025 · similarity 0.89)
- Demonstration Selection for In-Context Learning via Reinforcement Learning (ICML 2025 · similarity 0.89)
- Mixture of Demonstrations for In-Context Learning (NeurIPS 2024 · similarity 0.88)
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.