mlsanityData to 7 Oct 2026

Naive Bayes-based Context Extension for Large Language Models

arXiv 2403.17552 ↗First posted 26 Mar 2024cs.CLcited by 5

Not on the map. Why?

Abstract (arXiv)

Large Language Models (LLMs) have shown promising in-context learning abilities. However, conventional In-Context Learning (ICL) approaches are often impeded by length limitations of transformer architecture, which pose challenges when attempting to effectively integrate supervision from a substantial number of demonstration examples. In this paper, we introduce a novel framework, called Naive Bayes-based Context Extension (NBCE), to enable existing LLMs to perform ICL with an increased number of demonstrations by significantly expanding their context size. Importantly, this expansion does not require fine-tuning or dependence on particular model architectures, all the while preserving linear efficiency. NBCE initially splits the context into equal-sized windows fitting the target LLM's maximum length. Then, it introduces a voting mechanism to select the most relevant window, regarded as the posterior context. Finally, it employs Bayes' theorem to generate the test task. Our experimental results demonstrate that NBCE substantially enhances performance, particularly as the number of demonstration examples increases, consistently outperforming alternative methods. The NBCE code will be made publicly accessible. The code NBCE is available at: https://github.com/amurtadha/NBCE-master

Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Builds on 34 of its 47 references that are in the map. First posted on arXiv 26 Mar 2024.

Builds on

34 of 47 references.

References · 34

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
  3. 2020Measuring Massive Multitask Language Understandingcited by 7,768
  4. 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,018
  5. 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,464
  6. 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,818
  7. 2015Character-level Convolutional Networks for Text Classificationcited by 2,293
  8. 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,114
  9. 2019SuperGLUE: A Stickier Benchmark for General-Purpose Language Understanding Systemscited by 1,718
  10. 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,371
  11. 2020Leveraging Passage Retrieval with Generative Models for Open Domain Question Answeringcited by 1,203
  12. 2021What Makes Good In-Context Examples for GPT-3?cited by 1,184
22 more
  1. 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,122
  2. 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,085
  3. 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
  4. 2021Learning To Retrieve Prompts for In-Context Learningcited by 641
  5. 2020Pre-trained Models for Natural Language Processing: A Surveycited by 504
  6. 2021MetaICL: Learning to Learn In Contextcited by 450
  7. 2020Efficient Intent Detection with Dual Sentence Encoderscited by 419
  8. 2019An Evaluation Dataset for Intent Classification and Out-of-Scope Predictioncited by 378
  9. 2021Pre-Trained Models: Past, Present and Futurecited by 319
  10. 2023Trusting Your Evidence: Hallucinate Less with Context-aware Decodingcited by 319
  11. 2021LongT5: Efficient Text-To-Text Transformer for Long Sequencescited by 232
  12. 2019Benchmarking Natural Language Understanding Services for building Conversational Agentscited by 166
  13. 2021Noisy Channel Language Model Prompting for Few-Shot Text Classificationcited by 163
  14. 2021Meta-learning via Language Model In-context Tuningcited by 163
  15. 2022Structured Prompting: Scaling In-Context Learning to 1,000 Examplescited by 81
  16. 2021Think you have Solved Direct-Answer Question Answering? Try ARC-DA, the Direct-Answer AI2 Reasoning Challengecited by 79
  17. 2022Efficient Long-Text Understanding with Short-Text Modelscited by 71
  18. 2022Prototypical Calibration for Few-shot Learning of Language Modelscited by 58
  19. 2023Pre-Training to Learn in Contextcited by 41
  20. 2023In-Context Learning with Many Demonstration Examplescited by 39
  21. 2022BERT-ASC: Auxiliary-Sentence Construction for Implicit Aspect Learning in Sentiment Analysiscited by 4
  22. 2023Rank-Aware Negative Training for Semi-Supervised Text Classificationcited by 3

Built on by

Cited by year

Citing papers per year: 2024: 4; 2025: 1.

5 papers.