paper-with-me

홈 › Papers

Scaling In-Context Demonstrations with Structured Attention

2023-07-05 · Tianle Cai, Kaixuan Huang, Jason D. Lee, Mengdi Wang

The recent surge of large language models (LLMs) highlights their ability to perform in-context learning, i.e., "learning" to perform a task from a few demonstrations in the context without any parameter updates. However, their capabilities of in-context learning are limited by the model architecture: 1) the use of demonstrations is constrained by a maximum sentence length due to positional embeddings; 2) the quadratic complexity of attention hinders users from using more demonstrations efficiently; 3) LLMs are shown to be sensitive to the order of the demonstrations. In this work, we tackle these challenges by proposing a better architectural design for in-context learning. We propose SAICL (Structured Attention for In-Context Learning), which replaces the full-attention by a structured attention mechanism designed for in-context learning, and removes unnecessary dependencies between individual demonstrations, while making the model invariant to the permutation of demonstrations. We evaluate SAICL in a meta-training framework and show that SAICL achieves comparable or better performance than full attention while obtaining up to 3.4x inference speed-up. SAICL also consistently outperforms a strong Fusion-in-Decoder (FiD) baseline which processes each demonstration independently. Finally, thanks to its linear nature, we demonstrate that SAICL can easily scale to hundreds of demonstrations with continuous performance gains with scaling.

📄 PDF Abstract BibTeX arXiv:2307.02690

Code (0)

등록된 구현이 없습니다.

Tasks

DecoderIn-Context LearningSentence

Similar Papers 제목 키워드 기반

Scaling Performance and Low-Resource Annotation with Many-Shot In-Context Learning for Named Entity Recognition

2026-06-20 · Qi Zhang, Fangping Lan, Cornelia Caragea, Longin Jan Latecki 외 arxiv

In-context learning (ICL) with large language models (LLMs) has emerged as a powerful alternative to fine-tuning for Named Entity Recognition (NER), achieving strong performance with minimal annotation and no additional …

Many-Shot CoT-ICL: Making In-Context Learning Truly Learn

2026-05-13 · Tsz Ting Chung, Lemao Liu, Mo Yu, Dit-Yan Yeung arxiv

While many-shot ICL achieves remarkable performance, prior studies of its scaling behavior have mainly focused on non-reasoning tasks. In this work, we study many-shot ICL on reasoning tasks, with a particular focus on m…

CroSTAta: Cross-State Transition Attention Transformer for Robotic Manipulation

2025-10-01 · Giovanni Minelli, Giulio Turrisi, Victor Barasuol, Claudio Semini arxiv

Learning robotic manipulation policies through supervised learning from demonstrations remains challenging when policies encounter execution variations not explicitly covered during training. While incorporating historic…

ReasonCACHE: Teaching LLMs To Reason Without Weight Updates

2026-02-02 · Sharut Gupta, Phillip Isola, Stefanie Jegelka, David Lopez-Paz 외 arxiv

Can Large language models (LLMs) learn to reason without any weight update and only through in-context learning (ICL)? ICL is strikingly sample-efficient, often learning from only a handful of demonstrations, but complex…

Theory of Scaling Laws for In-Context Regression: Depth, Width, Context and Time

2025-10-01 · Blake Bordelon, Mary I. Letey, Cengiz Pehlevan arxiv

We study in-context learning (ICL) of linear regression in a deep linear self-attention model, characterizing how performance depends on various computational and statistical resources (width, depth, number of training s…