Efficient Many-Shot In-Context Learning with Dynamic Block-Sparse Attention

Many-shot in-context learning has recently shown promise as an alternative to finetuning, with the major advantage that the same model can be served for multiple tasks.However, this shifts the computational burden from training-time to inference-time, making deployment of many-shot ICL challenging to justify in-practice.This cost is further increased if a custom demonstration set is retrieved for each inference example.We present Dynamic Block-Sparse Attention, a training-free framework for retrieval-based many-shot in-context learning.By combining carefully designed blocksparse attention and retrieval of cached groups of demonstrations, we achieve comparable perexample latency to finetuning while maintaining on average >95% of the best method's accuracy across strong ICL and finetuning baselines.We hope that this will further enable the deployment of many-shot ICL at scale. 1

Authors

Institutions

Publication Details

Published
2025-01-01
DOI
https://doi.org/10.18653/v1/2025.acl-long.1542
Citations
1
Primary Topic
Domain Adaptation and Few-Shot Learning
Type
article
Field-Weighted Citation Impact
2.48

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Efficient Many-Shot In-Context Learning with Dynamic Block-Sparse Attention

Amanda Bertsch, C. H. Li, Graham Neubig, Yilin Zhang et al.
1 citations
Domain Adaptation and Few-Shot Learning
2.48
article

Efficient Many-Shot In-Context Learning with Dynamic Block-Sparse Attention

Amanda Bertsch, C. H. Li, Graham Neubig, Yilin Zhang, Emily Xiao
article en
1 citations

Abstract

Many-shot in-context learning has recently shown promise as an alternative to finetuning, with the major advantage that the same model can be served for multiple tasks.However, this shifts the computational burden from training-time to inference-time, making deployment of many-shot ICL challenging to justify in-practice.This cost is further increased if a custom demonstration set is retrieved for each inference example.We present Dynamic Block-Sparse Attention, a training-free framework for retrieval-based many-shot in-context learning.By combining carefully designed blocksparse attention and retrieval of cached groups of demonstrations, we achieve comparable perexample latency to finetuning while maintaining on average >95% of the best method's accuracy across strong ICL and finetuning baselines.We hope that this will further enable the deployment of many-shot ICL at scale. 1

Carnegie Mellon University (US)
National Science Foundation
Openalex Percentile: Top 9%
Domain Adaptation and Few-Shot Learning
2.48
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Efficient Many-Shot In-Context Learning with Dynamic Block-Sparse Attention — Amanda Bertsch, C. H. Li, et al. · (2025) | TGRS Research Map | TGRS