Logo image
kNN-CM: A Non-parametric Inference-Phase Adaptation of Parametric Text Classifiers
Conference proceeding

kNN-CM: A Non-parametric Inference-Phase Adaptation of Parametric Text Classifiers

Rishabh Bhardwaj, Yingting Li, Navonil Majumder, Bo Cheng and Soujanya Poria
FINDINGS OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS (EMNLP 2023), pp.13546-13557
01/01/2023

Abstract

Computer Science Computer Science, Artificial Intelligence Computer Science, Interdisciplinary Applications Linguistics Science & Technology Social Sciences Technology
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 (kNNCM)-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.

Metrics

1 Record Views

Details

Logo image