Research map / Architectures and efficiency / Attention and transformers
Efficient Many-Shot In-Context Learning with Dynamic Block-Sparse Attention
Emily Xiao, Chin-Jou Li, Yilin Zhang, Graham Neubig, Amanda Bertsch
Carnegie Mellon University
Read the paperPlace an idea next to itCheck your own paper ↗
11measured effects
7improved
1no clear effect
3hurt
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 |
|---|---|---|---|
| keep local attention to previous blocks in addition to the sink during encoding (ablation) | DBSA block-sparse encoding · 5 classification datasets, Llama-2 30k | average accuracy: 0.27 -> 0.82 | Improved |
| add an attention sink block to self-only block encoding (ablation) | block-sparse encoding · 5 classification datasets, Llama-2 30k | average accuracy: 0.09 -> 0.27 | Improved |
| sparse sink+prev+self encoding instead of full attention (ablation) | DBSA · 5 classification datasets, Llama-2 30k | average accuracy: 0.84 -> 0.82 | Hurt |
| use block-level instead of example-level demonstration selection with sparse KV reuse (ablation) | DBSA · 30k Llama-2, 10% retrieval ratio | accuracy: 0.79 -> 0.79 (gap to standard inference 0.03 -> 0.00) | Improved |
| swap 10% of examples between BM25 clusters to add diversity within blocks (ablation) | clustered block grouping · 5 classification datasets, Llama-2 30k | average accuracy: 0.764 -> 0.810 | Improved |
| group blocks by BM25 clustering instead of randomly (ablation) | DBSA · 5 classification datasets, Llama-2 30k | average accuracy: 0.827 -> 0.764 | Hurt |
| reverse the order of cached blocks at inference (ablation) | DBSA · 5 classification datasets, Llama-2 30k | average accuracy: 0.834 -> 0.794 | Hurt |
| reorder cached blocks from low to high relevance (ablation) | DBSA · 5 classification datasets, Llama-2 30k | average accuracy: 0.834 -> 0.835 | No clear effect |
| use DBSA instead of cached fixed ICL for inference | Llama-2-7B, 30k context · relative inference latency | latency relative to RetICL: 0.51x -> 0.22x | Improved |
| use DBSA instead of LoRA finetuning at 90k | Llama-3.1-8B · 5 classification datasets, 90k context | average accuracy: 0.83 -> 0.90 | Improved |
| finetune on all training data instead of the 90k demonstration pool (ablation) | LoRA finetuning, Llama-3.1-8B · 5 classification datasets | average accuracy: 0.832 -> 0.904 | Improved |
Open problems in sparse attention for long-context LLMs
Which attention can a long-context model drop without losing the answer?
- The overhead does not vanish. · 14 papers state it
- Very long contexts hit memory limits or go untested. · 8 papers state it
- Sparsity speeds up prefill or decoding, not both. · 6 papers state it
Closest papers by meaning
- Many-Shot In-Context Learning (NeurIPS 2024 · similarity 0.92)
- From Few to Many: Self-Improving Many-Shot Reasoners Through Iterative Optimization and Generation (ICLR 2025 · similarity 0.90)
- Many-Shot CoT-ICL: Making In-Context Learning Truly Learn (ICML 2026 · similarity 0.89)
- Capturing In-Context Learning Dynamics with Task Operators (NeurIPS 2026 · similarity 0.88)
- MAPLE: Many-Shot Adaptive Pseudo-Labeling for In-Context Learning (ICML 2025 · similarity 0.88)
- Multimodal Task Vectors Enable Many-Shot Multimodal In-Context Learning (NeurIPS 2024 · similarity 0.87)
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.