mlsanityData to 14 Oct 2026

Improving Few-Shot Performance of Language Models via Nearest Neighbor Calibration

arXiv 2212.02216 ↗First posted 5 Dec 2022cs.CLcited by 24

Not on the map. Why?

Abstract (arXiv)

Pre-trained language models (PLMs) have exhibited remarkable few-shot learning capabilities when provided a few examples in a natural language prompt as demonstrations of test instances, i.e., in-context learning. However, the performance of in-context learning is susceptible to the choice of prompt format, training examples and the ordering of the training examples. In this paper, we propose a novel nearest-neighbor calibration framework for in-context learning to ease this issue. It is inspired by a phenomenon that the in-context learning paradigm produces incorrect labels when inferring training instances, which provides a useful supervised signal to calibrate predictions. Thus, our method directly augments the predictions with a k-nearest-neighbor (kNN) classifier over a datastore of cached few-shot instance representations obtained by PLMs and their corresponding labels. Then adaptive neighbor selection and feature regularization modules are introduced to make full use of a few support instances to reduce the kNN retrieval noise. Experiments on various few-shot text classification tasks demonstrate that our method significantly improves in-context learning, while even achieving comparable performance with state-of-the-art tuning-based approaches in some sentiment analysis tasks.

Key facts. Cited by 24 papers in the map (data through 14 Oct 2026). Builds on 29 of its 45 references that are in the map. First posted on arXiv 5 Dec 2022.

Builds on

29 of 45 references.

References · 29

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  2. 2014Adam: A Method for Stochastic Optimizationcited by 37,240
  3. 2020Language Models are Few-Shot Learnerscited by 32,419
  4. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
  5. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
  6. 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,148
  7. 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,915
  8. 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,795
  9. 2020REALM: Retrieval-Augmented Language Model Pre-Trainingcited by 2,141
  10. 2019SuperGLUE: A Stickier Benchmark for General-Purpose Language Understanding Systemscited by 1,729
  11. 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,392
  12. 2021Improving language models by retrieving from trillions of tokenscited by 1,293
17 more
  1. 2020Making Pre-trained Language Models Better Few-shot Learnerscited by 1,256
  2. 2021BitFit: Simple Parameter-efficient Fine-tuning for Transformer-based Masked Language-modelscited by 1,245
  3. 2020Leveraging Passage Retrieval with Generative Models for Open Domain Question Answeringcited by 1,210
  4. 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,135
  5. 2020Exploiting Cloze Questions for Few Shot Text Classification and Natural Language Inferencecited by 938
  6. 2021Learning To Retrieve Prompts for In-Context Learningcited by 648
  7. 2021Learning How to Ask: Querying LMs with Mixtures of Soft Promptscited by 377
  8. 2018WiC: the Word-in-Context Dataset for Evaluating Context-Sensitive Meaning Representationscited by 372
  9. 2021True Few-Shot Learning with Language Modelscited by 344
  10. 2020Nearest Neighbor Machine Translationcited by 209
  11. 2021How Many Data Points is a Prompt Worth?cited by 198
  12. 2021Cutting Down on Prompts and Parameters: Simple Few-Shot Learning with Language Modelscited by 139
  13. 2021Adaptive Nearest Neighbor Machine Translationcited by 58
  14. 2022PERFECT: Prompt-free and Efficient Few-shot Learning with Language Modelscited by 40
  15. 2021Non-Parametric Unsupervised Domain Adaptation for Neural Machine Translationcited by 20
  16. 2022Non-Parametric Domain Adaptation for End-to-End Speech Translationcited by 12
  17. 2021Non-Parametric Online Learning from Human Feedback for Neural Machine Translationcited by 8

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2023: 9; 2024: 14; 2025: 0; 2026: 1.

24 papers.

Sort:

By area:

  1. 2023A Survey of Confidence Estimation and Calibration in Large Language Modelscited by 256
  2. 2023Adapted Large Language Models Can Outperform Medical Experts in Clinical Text Summarizationcited by 246
  3. 2023Fairness-guided Few-shot Prompting for Large Language Modelscited by 53
  4. 2024ICLEval: Evaluating In-Context Learning Ability of Large Language Modelscited by 12
  5. 2024Learning Multi-view Molecular Representations with Structured and Unstructured Knowledgecited by 11
  6. 2024Communication-Efficient Personalized Federated Learning for Speech-to-Text Taskscited by 8
  7. 2023Lever LM: Configuring In-Context Sequence to Lever Large Vision Language Modelscited by 7
  8. 2024ELICIT: LLM Augmentation via External In-Context Capabilitycited by 7
  9. 2023RRAML: Reinforced Retrieval Augmented Machine Learningcited by 6
  10. 2023Federated Nearest Neighbor Machine Translationcited by 5
  11. 2024LIVE: Learnable In-Context Vector for Visual Question Answeringcited by 5
  12. 2024Task Diversity Shortens the ICL Plateaucited by 5
12 more
  1. 2023MixPro: Simple yet Effective Data Augmentation for Prompt-based Learningcited by 4
  2. 2024Few-shot Prompting for Pairwise Ranking: An Effective Non-Parametric Retrieval Modelcited by 4
  3. 2024Effective In-Context Example Selection through Data Compressioncited by 2
  4. 2024Can Large Language Models Replace Data Scientists in Biomedical Research?cited by 2
  5. 2023Nearest Neighbor Machine Translation is Meta-Optimizer on Output Projection Layercited by 1
  6. 2024Recall Them All: Retrieval-Augmented Language Models for Long Object List Extraction from Long Documentscited by 1
  7. 2023Multi-Prompt with Depth Partitioned Cross-Modal Learningcited by 0
  8. 2024Leveraging Biases in Large Language Models: "bias-kNN'' for Effective Few-Shot Learningcited by 0
  9. 2024Are LLMs Effective Backbones for Fine-tuning? An Experimental Investigation of Supervised LLMs on Chinese Short Text Matchingcited by 0
  10. 2024Reference Trustable Decoding: A Training-Free Augmentation Paradigm for Large Language Modelscited by 0
  11. 2024GRL-Prompt: Towards Knowledge Graph based Prompt Optimization via Reinforcement Learningcited by 0
  12. 2026When Irrelevant Text Matters: Affine Margin Shifts in Multimodal Large Language Modelscited by 0