English
Related papers

Related papers: Generalization through Memorization: Nearest Neigh…

200 papers

Retrieval-enhanced language models (LMs), which condition their predictions on text retrieved from large external datastores, have recently shown significant perplexity improvements compared to standard LMs. One such approach, the $k$NN-LM,…

Computation and Language · Computer Science 2022-10-31 Andrew Drozdov , Shufan Wang , Razieh Rahimi , Andrew McCallum , Hamed Zamani , Mohit Iyyer

Semi-parametric Nearest Neighbor Language Models ($k$NN-LMs) have produced impressive gains over purely parametric LMs, by leveraging large-scale neighborhood retrieval over external memory datastores. However, there has been little…

Computation and Language · Computer Science 2023-06-13 Rishabh Bhardwaj , George Polovets , Monica Sunkara

$K$-nearest neighbor language models ($k$NN-LMs), which integrate retrieval with next-word prediction, have demonstrated strong performance in language modeling as well as downstream NLP benchmarks. These results have led researchers to…

Computation and Language · Computer Science 2024-08-22 Shangyi Geng , Wenting Zhao , Alexander M Rush

Non-parametric neural language models (NLMs) learn predictive distributions of text utilizing an external datastore, which allows them to learn through explicitly memorizing the training datapoints. While effective, these models often…

Computation and Language · Computer Science 2021-11-16 Junxian He , Graham Neubig , Taylor Berg-Kirkpatrick

Language models (LMs) compute the probability of a text by sequentially computing a representation of an already-seen context and using this representation to predict the next word. Currently, most LMs calculate these representations…

Computation and Language · Computer Science 2023-01-18 Frank F. Xu , Uri Alon , Graham Neubig

In recent years, many deep-learning based models are proposed for text classification. This kind of models well fits the training set from the statistical point of view. However, it lacks the capacity of utilizing instance-level information…

Computation and Language · Computer Science 2017-08-29 Zhiguo Wang , Wael Hamza , Linfeng Song

Retrieval-augmented language models (LMs) use non-parametric memory to substantially outperform their non-retrieval counterparts on perplexity-based evaluations, but it is an open question whether they achieve similar gains in few- and…

Computation and Language · Computer Science 2022-11-03 Weijia Shi , Julian Michael , Suchin Gururangan , Luke Zettlemoyer

We introduce $k$-nearest-neighbor machine translation ($k$NN-MT), which predicts tokens with a nearest neighbor classifier over a large datastore of cached examples, using representations from a neural translation model for similarity…

Computation and Language · Computer Science 2021-07-23 Urvashi Khandelwal , Angela Fan , Dan Jurafsky , Luke Zettlemoyer , Mike Lewis

The $k$-nearest-neighbor language model ($k$NN-LM), one of the retrieval-augmented language models, improves the perplexity for given text by directly accessing a large datastore built from any text data during inference. A widely held…

Computation and Language · Computer Science 2025-03-31 Yuto Nishida , Makoto Morishita , Hiroyuki Deguchi , Hidetaka Kamigaito , Taro Watanabe

Pre-trained Language Models (PLMs), as parametric-based eager learners, have become the de-facto choice for current paradigms of Natural Language Processing (NLP). In contrast, k-Nearest-Neighbor (kNN) classifiers, as the lazy learning…

Computation and Language · Computer Science 2023-06-21 Lei Li , Jing Chen , Bozhong Tian , Ningyu Zhang

Augmenting a language model (LM) with $k$-nearest neighbors ($k$NN) retrieval on its training data alone can decrease its perplexity, though the underlying reasons for this remain elusive. In this work, we rule out one previously posited…

Computation and Language · Computer Science 2024-04-03 Ting-Rui Chiang , Xinyan Velocity Yu , Joshua Robinson , Ollie Liu , Isabelle Lee , Dani Yogatama

Inspired by the notion that ``{\it to copy is easier than to memorize}``, in this work, we introduce GNN-LM, which extends the vanilla neural language model (LM) by allowing to reference similar contexts in the entire training corpus. We…

Computation and Language · Computer Science 2022-05-05 Yuxian Meng , Shi Zong , Xiaoya Li , Xiaofei Sun , Tianwei Zhang , Fei Wu , Jiwei Li

Including memory banks in a natural language processing architecture increases model capacity by equipping it with additional data at inference time. In this paper, we build upon $k$NN-LM \citep{khandelwal20generalization}, which uses a…

Computation and Language · Computer Science 2021-09-20 Jean-Francois Ton , Walter Talbott , Shuangfei Zhai , Josh Susskind

Inspired by recent advances in retrieval augmented methods in NLP~\citep{khandelwal2019generalization,khandelwal2020nearest,meng2021gnn}, in this paper, we introduce a $k$ nearest neighbor NER ($k$NN-NER) framework, which augments the…

Computation and Language · Computer Science 2022-04-01 Shuhe Wang , Xiaoya Li , Yuxian Meng , Tianwei Zhang , Rongbin Ouyang , Jiwei Li , Guoyin Wang

$k$NN-MT is a straightforward yet powerful approach for fast domain adaptation, which directly plugs pre-trained neural machine translation (NMT) models with domain-specific token-level $k$-nearest-neighbor ($k$NN) retrieval to achieve…

Computation and Language · Computer Science 2023-02-24 Yuhan Dai , Zhirui Zhang , Qiuzhi Liu , Qu Cui , Weihua Li , Yichao Du , Tong Xu

Trustworthiness in model predictions is crucial for safety-critical applications in the real world. However, deep neural networks often suffer from the issues of uncertainty estimation, such as miscalibration. In this study, we propose…

Computation and Language · Computer Science 2025-02-07 Wataru Hashimoto , Hidetaka Kamigaito , Taro Watanabe

Previous knowledge graph embedding approaches usually map entities to representations and utilize score functions to predict the target entities, yet they typically struggle to reason rare or emerging unseen entities. In this paper, we…

Computation and Language · Computer Science 2023-08-01 Peng Wang , Xin Xie , Xiaohan Wang , Ningyu Zhang

Neural network classifiers have become the de-facto choice for current "pre-train then fine-tune" paradigms of visual classification. In this paper, we investigate k-Nearest-Neighbor (k-NN) classifiers, a classical model-free learning…

Computer Vision and Pattern Recognition · Computer Science 2021-12-21 Menglin Jia , Bor-Chun Chen , Zuxuan Wu , Claire Cardie , Serge Belongie , Ser-Nam Lim

Adapting Large Language Models (LLMs) that are extensively trained on abundant text data, and customizing the input prompt to enable time series forecasting has received considerable attention. While recent work has shown great potential…

Machine Learning · Computer Science 2024-12-09 Jayanie Bogahawatte , Sachith Seneviratne , Maneesha Perera , Saman Halgamuge

Nearest Neighbor Machine Translation ($k$NN-MT) has achieved great success in domain adaptation tasks by integrating pre-trained Neural Machine Translation (NMT) models with domain-specific token-level retrieval. However, the reasons…

Computation and Language · Computer Science 2023-10-25 Ruize Gao , Zhirui Zhang , Yichao Du , Lemao Liu , Rui Wang
‹ Prev 1 2 3 10 Next ›