English
Related papers

Related papers: Efficient Nearest Neighbor Language Models

200 papers

We introduce $k$NN-LMs, which extend a pre-trained neural language model (LM) by linearly interpolating it with a $k$-nearest neighbors ($k$NN) model. The nearest neighbors are computed according to distance in the pre-trained LM embedding…

Computation and Language · Computer Science 2020-02-18 Urvashi Khandelwal , Omer Levy , Dan Jurafsky , Luke Zettlemoyer , Mike Lewis

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

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

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

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

Large language models (LLMs) often hallucinate and lack the ability to provide attribution for their generations. Semi-parametric LMs, such as kNN-LM, approach these limitations by refining the output of an LM for a given prompt using its…

Computation and Language · Computer Science 2025-04-28 Minghan Li , Xilun Chen , Ari Holtzman , Beidi Chen , Jimmy Lin , Wen-tau Yih , Xi Victoria Lin

Non-parametric, k-nearest-neighbor algorithms have recently made inroads to assist generative models such as language models and machine translation decoders. We explore whether such non-parametric models can improve machine translation…

Computation and Language · Computer Science 2023-05-24 Jiayi Wang , Ke Wang , Yuqi Zhang , Yu Zhao , Pontus Stenetorp

Trans-dimensional random field language models (TRF LMs) where sentences are modeled as a collection of random fields, have shown close performance with LSTM LMs in speech recognition and are computationally more efficient in inference.…

Computation and Language · Computer Science 2017-10-31 Bin Wang , Zhijian Ou

Language models typically need to be trained or finetuned in order to acquire new knowledge, which involves updating their weights. We instead envision language models that can simply read and memorize new data at inference time, thus…

Machine Learning · Computer Science 2022-03-18 Yuhuai Wu , Markus N. Rabe , DeLesley Hutchins , Christian Szegedy

In spite of their superior performance, neural probabilistic language models (NPLMs) remain far less widely used than n-gram models due to their notoriously long training times, which are measured in weeks even for moderately-sized…

Computation and Language · Computer Science 2016-06-07 Andriy Mnih , Yee Whye Teh

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

Neural Networks trained with gradient descent are known to be susceptible to catastrophic forgetting caused by parameter shift during the training process. In the context of Neural Machine Translation (NMT) this results in poor performance…

Computation and Language · Computer Science 2019-06-20 Ankur Bapna , Orhan Firat

State-of-the-art neural network language models (NNLMs) represented by long short term memory recurrent neural networks (LSTM-RNNs) and Transformers are becoming highly complex. They are prone to overfitting and poor generalization when…

Computation and Language · Computer Science 2022-08-30 Boyang Xue , Shoukang Hu , Junhao Xu , Mengzhe Geng , Xunying Liu , Helen Meng

Trans-dimensional random field language models (TRF LMs) have recently been introduced, where sentences are modeled as a collection of random fields. The TRF approach has been shown to have the advantages of being computationally more…

Computation and Language · Computer Science 2017-09-20 Bin Wang , Zhijian Ou

Parameter-shared pre-trained language models (PLMs) have emerged as a successful approach in resource-constrained environments, enabling substantial reductions in model storage and memory costs without significant performance compromise.…

Computation and Language · Computer Science 2023-10-20 Weize Chen , Xiaoyue Xu , Xu Han , Yankai Lin , Ruobing Xie , Zhiyuan Liu , Maosong Sun , Jie Zhou

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

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

The high inference demands of transformer-based Large Language Models (LLMs) pose substantial challenges in their deployment. To this end, we introduce Neural Block Linearization (NBL), a novel framework for accelerating transformer model…

Machine Learning · Computer Science 2025-10-21 Mete Erdogan , Francesco Tonin , Volkan Cevher

Nearest Neighbor Machine Translation (kNNMT) is a simple and effective method of augmenting neural machine translation (NMT) with a token-level nearest neighbor retrieval mechanism. The effectiveness of kNNMT directly depends on the quality…

Computation and Language · Computer Science 2022-12-20 Jiahuan Li , Shanbo Cheng , Zewei Sun , Mingxuan Wang , Shujian Huang
‹ Prev 1 2 3 10 Next ›