paper-with-me

Papers

Generalization through Memorization: Nearest Neighbor Language Models

2019-11-01 · ICLR 2020 1 · Urvashi Khandelwal, Omer Levy, Dan Jurafsky, Luke Zettlemoyer, Mike Lewis

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 space, and can be drawn from any text collection, including the original LM training data. Applying this augmentation to a strong Wikitext-103 LM, with neighbors drawn from the original training set, our $k$NN-LM achieves a new state-of-the-art perplexity of 15.79 - a 2.9 point improvement with no additional training. We also show that this approach has implications for efficiently scaling up to larger training sets and allows for effective domain adaptation, by simply varying the nearest neighbor datastore, again without further training. Qualitatively, the model is particularly helpful in predicting rare patterns, such as factual knowledge. Together, these results strongly suggest that learning similarity between sequences of text is easier than predicting the next word, and that nearest neighbor search is an effective approach for language modeling in the long tail.

📄 PDF Abstract BibTeX arXiv:1911.00172

Code (5)

urvashik/knnlm 공식 구현 pytorch
MS-Mind/MS-Code-06/tree/main/Neighbor2Neighbor mindspore
cordercorder/knn-models pytorch
labmlai/annotated_deep_learning_paper_implementations pytorch
neulab/knn-transformers pytorch

Tasks

Domain AdaptationLanguage ModelingLanguage ModellingMemorization

Similar Papers 제목 키워드 기반

Cross-Domain Generalization Through Memorization: A Study of Nearest Neighbors in Neural Duplicate Question Detection

2020-11-22 · Yadollah Yaghoobzadeh, Alexandre Rochette, Timothy J. Hazen

Duplicate question detection (DQD) is important to increase efficiency of community and automatic question answering systems. Unfortunately, gathering supervised data in a domain is time-consuming and expensive, and our …

Domain GeneralizationMemorizationQuestion AnsweringRetrieval

ResMem: Learn what you can and memorize the rest

2023-02-03 · NeurIPS 2023 11

The impressive generalization performance of modern neural networks is attributed in part to their ability to implicitly memorize complex training patterns. Inspired by this, we explore a novel mechanism to improve model…

MemorizationPrediction

Reasoning Through Memorization: Nearest Neighbor Knowledge Graph Embeddings

2022-01-14 · Peng Wang, Xin Xie, Xiaohan Wang, Ningyu Zhang

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…

Graph EmbeddingKnowledge Graph EmbeddingKnowledge Graph EmbeddingsLink Prediction+1

K-Nearest Neighbor Classification Using Anatomized Data

2016-10-19 · Koray Mancuhan, Chris Clifton

This paper analyzes k nearest neighbor classification with training data anonymized using anatomy. Anatomy preserves all data values, but introduces uncertainty in the mapping between identifying and sensitive values. We…

AnatomyClassificationGeneral Classification

Personalized Federated Learning through Local Memorization

2021-11-17 · Othmane Marfoq, Giovanni Neglia, Laetitia Kameni, Richard Vidal

Federated learning allows clients to collaboratively learn statistical models while keeping their data local. Federated learning was originally used to train a unique global model to be served to all clients, but this ap…

Binary ClassificationFairnessFederated LearningGeneralization Bounds+2