EMNLP Findings2023
kNN-CM: A Non-parametric Inference-Phase Adaptation of Parametric Text Classifiers
Rishabh Bhardwaj, Yingting Li, Navonil Majumder, Bo Cheng, Soujanya Poria
Abstract
Semi-parametric models exhibit the properties of both parametric and non-parametric modeling and have been shown to be effective in the next-word prediction language modeling task. However, there is a lack of studies on the text-discriminating properties of such models. We propose an inference-phase approach-k-Nearest Neighbor Classification Model (kNN-CM)-that enhances the capacity of a pretrained parametric text classifier by incorporating a simple neighborhood search through the representation space of (memorized) training samples. The final class prediction of kNN-CM is based on the convex combination of probabilities obtained from kNN search and prediction of the classifier. Our experiments show consistent performance improvements on eight SuperGLUE tasks, three adversarial natural language inference (ANLI) datasets, 11 question-answering (QA) datasets, and two sentiment classification datasets. The source code of the proposed approach is available at https: //github.com/Bhardwaj-Rishabh/kNN-CM.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
1 top-tier paper has cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Measuring and Enhancing Trustworthiness of LLMs in RAG through Grounded Attributions and Learning to Refuse cites Generalization through Memorization: Nearest Neighbor Language Models
- Few-Shot Parameter-Efficient Fine-Tuning is Better and Cheaper than In-Context Learning cites Adversarial NLI: A New Benchmark for Natural Language Understanding
Cited by top-tier papers1
Builds on11
- Deberta: decoding-Enhanced Bert with Disentangled AttentionPengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu ChenICLR 2021 · 3,729 citations
- PIQA: Reasoning about Physical Commonsense in Natural LanguageYonatan Bisk, Rowan Zellers, Ronan Le Bras, Jianfeng Gao et al.AAAI 2020 · 2,916 citations
- Few-Shot Parameter-Efficient Fine-Tuning is Better and Cheaper than In-Context LearningHaokun Liu, Derek Tam, Mohammed Muqeeth, Jay Mohta et al.NeurIPS 2022 · 1,483 citations
- Generalization through Memorization: Nearest Neighbor Language ModelsUrvashi Khandelwal, Omer Levy, Dan Jurafsky, Luke Zettlemoyer et al.ICLR 2020 · 1,038 citations
- Adversarial NLI: A New Benchmark for Natural Language UnderstandingYixin Nie, Adina Williams, Emily Dinan, Mohit Bansal et al.ACL 2020 · 602 citations
Related papers
- Adaptation Approaches for Nearest Neighbor Language ModelsRishabh Bhardwaj, George Polovets, Monica SunkaraACL Findings 2023 · 7 citations
- Efficient Nearest Neighbor Emotion Classification with BERT-whiteningWenbiao Yin, Lin ShangEMNLP 2022 · 7 citations
- You can't pick your neighbors, or can you? When and How to Rely on Retrieval in the kNN-LMAndrew Drozdov, Shufan Wang, Razieh Rahimi, Andrew McCallum et al.EMNLP Findings 2022 · 10 citations
- Why do Nearest Neighbor Language Models Work?Frank F. Xu, Uri Alon, Graham NeubigICML 2023 · 33 citations
- Nearest Neighbor Zero-Shot InferenceWeijia Shi, Julian Michael, Suchin Gururangan, Luke ZettlemoyerEMNLP 2022 · 26 citations
