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-kNearest Neighbor Classification Model (kNNCM)-that enhances the capacity of a pre-trained parametric text classifier by incorporating a simple neighborhood search through the representation space of (memorized) training samples. The final class prediction of kNNCM 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.
Cite
CITATION STYLE
Bhardwaj, R., Li, Y., Majumder, N., Cheng, B., & Poria, S. (2023). kNN-CM: A Non-parametric Inference-Phase Adaptation of Parametric Text Classifiers. In Findings of the Association for Computational Linguistics: EMNLP 2023 (pp. 13546–13557). Association for Computational Linguistics (ACL). https://doi.org/10.18653/v1/2023.findings-emnlp.903
Register to see more suggestions
Mendeley helps you to discover research relevant for your work.