mlsanityData to 14 Oct 2026

Improving Input-label Mapping with Demonstration Replay for In-context Learning

arXiv 2310.19572 ↗First posted 30 Oct 2023cs.CLcited by 2

Not on the map. Why?

Abstract (arXiv)

In-context learning (ICL) is an emerging capability of large autoregressive language models where a few input-label demonstrations are appended to the input to enhance the model's understanding of downstream NLP tasks, without directly adjusting the model parameters. The effectiveness of ICL can be attributed to the strong language modeling capabilities of large language models (LLMs), which enable them to learn the mapping between input and labels based on in-context demonstrations. Despite achieving promising results, the causal nature of language modeling in ICL restricts the attention to be backward only, i.e., a token only attends to its previous tokens, failing to capture the full input-label information and limiting the model's performance. In this paper, we propose a novel ICL method called Repeated Demonstration with Sliding Causal Attention, (RdSca). Specifically, we duplicate later demonstrations and concatenate them to the front, allowing the model to `observe' the later information even under the causal restriction. Besides, we introduce sliding causal attention, which customizes causal attention to avoid information leakage. Experimental results show that our method significantly improves the input-label mapping in ICL demonstrations. We also conduct an in-depth analysis of how to customize the causal attention without training, which has been an unexplored area in previous research.

Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 19 of its 27 references that are in the map. First posted on arXiv 30 Oct 2023.

Builds on

19 of 27 references.

References · 19

  1. 2017Attention Is All You Needcited by 60,361
  2. 2020Language Models are Few-Shot Learnerscited by 32,419
  3. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
  4. 2020Measuring Massive Multitask Language Understandingcited by 7,963
  5. 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
  6. 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,899
  7. 2020Longformer: The Long-Document Transformercited by 3,413
  8. 2015Character-level Convolutional Networks for Text Classificationcited by 2,330
  9. 2019SuperGLUE: A Stickier Benchmark for General-Purpose Language Understanding Systemscited by 1,729
  10. 2020Reformer: The Efficient Transformercited by 1,668
  11. 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,434
  12. 2021What Makes Good In-Context Examples for GPT-3?cited by 1,195
7 more
  1. 2023In-Context Retrieval-Augmented Language Modelscited by 702
  2. 2021Learning To Retrieve Prompts for In-Context Learningcited by 648
  3. 2023Larger language models do in-context learning differentlycited by 394
  4. 2022PromptSource: An Integrated Development Environment and Repository for Natural Language Promptscited by 289
  5. 2022Demystifying Prompts in Language Models via Perplexity Estimationcited by 216
  6. 2023Dr.ICL: Demonstration-Retrieved In-context Learningcited by 72
  7. 2022Prototypical Calibration for Few-shot Learning of Language Modelscited by 58

Built on by

Cited by year

Citing papers per year: 2025: 2.

2 papers.