English
Related papers

Related papers: KNN-BERT: Fine-Tuning Pre-Trained Models with KNN …

200 papers

Khandelwal et al. (2020) use a k-nearest-neighbor (kNN) component to improve language model performance. We show that this idea is beneficial for open-domain question answering (QA). To improve the recall of facts encountered during…

Computation and Language · Computer Science 2020-10-14 Nora Kassner , Hinrich Schütze

When adapting large language models (LLMs) to a specific downstream task, two primary approaches are commonly employed: (1) prompt engineering, often with in-context few-shot learning, leveraging the model's inherent generalization…

Machine Learning · Computer Science 2025-12-24 Jorg Bornschein , Clare Lyle , Yazhe Li , Amal Rannen-Triki , Xu Owen He , Razvan Pascanu

Recently, graph neural networks (GNNs) have been shown powerful capacity at modeling structural data. However, when adapted to downstream tasks, it usually requires abundant task-specific labeled data, which can be extremely scarce in…

Machine Learning · Computer Science 2022-03-04 Yupeng Hou , Binbin Hu , Wayne Xin Zhao , Zhiqiang Zhang , Jun Zhou , Ji-Rong Wen

Learning a robust classifier from a few samples remains a key challenge in machine learning. A major thrust of research has been focused on developing $k$-nearest neighbor ($k$-NN) based algorithms combined with metric learning that…

Machine Learning · Statistics 2022-02-17 Shixiang Zhu , Liyan Xie , Minghe Zhang , Rui Gao , Yao Xie

Fine-tuning a visual pre-trained model can leverage the semantic information from large-scale pre-training data and mitigate the over-fitting problem on downstream vision tasks with limited training examples. While the problem of…

Computer Vision and Pattern Recognition · Computer Science 2023-08-16 Junyang Wang , Yuanhong Xu , Juhua Hu , Ming Yan , Jitao Sang , Qi Qian

Feature representations from pre-trained deep neural networks have been known to exhibit excellent generalization and utility across a variety of related tasks. Fine-tuning is by far the simplest and most widely used approach that seeks to…

Computer Vision and Pattern Recognition · Computer Science 2017-10-09 Donghyun Yoo , Haoqi Fan , Vishnu Naresh Boddeti , Kris M. Kitani

Recently, pre-trained language models like BERT have shown promising performance on multiple natural language processing tasks. However, the application of these models has been limited due to their huge size. To reduce its size, a popular…

Computation and Language · Computer Science 2020-10-15 Zihan Zhao , Yuncong Liu , Lu Chen , Qi Liu , Rao Ma , Kai Yu

K-nearest neighbors (KNN) is one of the earliest and most established algorithms in machine learning. For regression tasks, KNN averages the targets within a neighborhood which poses a number of challenges: the neighborhood definition is…

Machine Learning · Computer Science 2022-05-18 Youssef Nader , Leon Sixt , Tim Landgraf

$K$-NN classifier is one of the most famous classification algorithms, whose performance is crucially dependent on the distance metric. When we consider the distance metric as a parameter of $K$-NN, learning an appropriate distance metric…

Machine Learning · Computer Science 2019-11-26 Kun Song

Traditionally artificial neural networks (ANNs) are trained by minimizing the cross-entropy between a provided groundtruth delta distribution (encoded as one-hot vector) and the ANN's predictive softmax distribution. It seems, however,…

Computer Vision and Pattern Recognition · Computer Science 2018-12-31 Pooran Singh Negi , David chan , Mohammad Mahoor

For most natural language processing tasks, the dominant practice is to finetune large pretrained transformer models (e.g., BERT) using smaller downstream datasets. Despite the success of this approach, it remains unclear to what extent…

Computation and Language · Computer Science 2023-05-29 Kundan Krishna , Saurabh Garg , Jeffrey P. Bigham , Zachary C. Lipton

With the rise of powerful foundation models, a pre-training-fine-tuning paradigm becomes increasingly popular these days: A foundation model is pre-trained using a huge amount of data from various sources, and then the downstream users only…

Machine Learning · Computer Science 2025-04-16 Meiqi Liu , Zhuoqun Huang , Yue Xing

Multimodal models leverage large-scale pre-training to achieve strong but still imperfect performance on tasks such as image captioning, visual question answering, and cross-modal retrieval. In this paper, we present a simple and efficient…

Computer Vision and Pattern Recognition · Computer Science 2024-11-01 Neil Chowdhury , Franklin Wang , Sumedh Shenoy , Douwe Kiela , Sarah Schwettmann , Tristan Thrush

Naive Bayes Nearest Neighbour (NBNN) is a simple and effective framework which addresses many of the pitfalls of K-Nearest Neighbour (KNN) classification. It has yielded competitive results on several computer vision benchmarks. Its central…

Machine Learning · Computer Science 2016-07-12 Daniel Jiwoong Im , Graham W. Taylor

Named entity recognition (NER) models generally perform poorly when large training datasets are unavailable for low-resource domains. Recently, pre-training a large-scale language model has become a promising direction for coping with the…

Computation and Language · Computer Science 2021-12-02 Zihan Liu , Feijun Jiang , Yuxiang Hu , Chen Shi , Pascale Fung

Many applications of machine learning require a model to make accurate pre-dictions on test examples that are distributionally different from training ones, while task-specific labels are scarce during training. An effective approach to…

Machine Learning · Computer Science 2020-02-20 Weihua Hu , Bowen Liu , Joseph Gomes , Marinka Zitnik , Percy Liang , Vijay Pande , Jure Leskovec

The k-Nearest Neighbor (kNN) classification approach is conceptually simple - yet widely applied since it often performs well in practical applications. However, using a global constant k does not always provide an optimal solution, e.g.,…

Computer Vision and Pattern Recognition · Computer Science 2018-01-08 Mark Kibanov , Martin Becker , Juergen Mueller , Martin Atzmueller , Andreas Hotho , Gerd Stumme

The increasing size of Deep Neural Networks (DNNs) poses a pressing need for model compression, particularly when employed on resource constrained devices. Concurrently, the susceptibility of DNNs to adversarial attacks presents another…

Machine Learning · Computer Science 2023-08-17 Brijesh Vora , Kartik Patwari , Syed Mahbub Hafiz , Zubair Shafiq , Chen-Nee Chuah

k-Nearest-Neighbor Machine Translation (kNN-MT) has been recently proposed as a non-parametric solution for domain adaptation in neural machine translation (NMT). It aims to alleviate the performance degradation of advanced MT systems in…

Computation and Language · Computer Science 2022-05-04 Dexin Wang , Kai Fan , Boxing Chen , Deyi Xiong

Foundation models and their checkpoints have significantly advanced deep learning, boosting performance across various applications. However, fine-tuned models often struggle outside their specific domains and exhibit considerable…