Papers with kNN-LM
Regularized Training of Nearest Neighbor Language Models (2022.naacl-srw)
Copied to clipboard
| Challenge: | kNN-LM uses pre-trained language models and an exhaustive knn search to improve performance. |
| Approach: | They build upon kNN-LM, which uses a pre-trained language model and a knn search through the training data to achieve state-of-the-art results. |
| Outcome: | The proposed method improves on language modeling tasks on WIKI-2 and WIKI-103. |
Plug and Play Knowledge Distillation for kNN-LM with External Logits (2022.aacl-short)
Copied to clipboard
| Challenge: | Despite the promising evaluation results by knowledge distillation (KD) in natural language understanding (NLU) and sequence-to-sequence (seq2sequ) tasks, KD for causal language modeling (LM) remains a challenge. |
| Approach: | They propose to use external logits to improve a student's kNN-LM by leveraging teacher's knowledge at test time. |
| Outcome: | The proposed method improves a student's kNN-LM in multiple language modeling datasets and improves perplexity. |
Nearest Neighbor Zero-Shot Inference (2022.emnlp-main)
Copied to clipboard
| Challenge: | Using non-parametric memory for retrieval-augmented language models yields significant performance boosts over strong zeroshot baselines. |
| Approach: | They propose a retrieval-augmented language model with fuzzy verbalizers that expands the verbalizes that define different end-task class labels. |
| Outcome: | The proposed model outperforms non-retrieval-augmented language models on perplexity-based evaluations but gains transfer marginally . the main challenge is to achieve coverage of the verbalizer tokens that define the different end-task class labels. |
You can’t pick your neighbors, or can you? When and How to Rely on Retrieval in the kNN-LM (2022.findings-emnlp)
Copied to clipboard
| Challenge: | Recent studies have shown that retrieval-enhanced language models can improve perplexity by combining text from large external datastores with a k-nearest neighbors model. |
| Approach: | They propose a retrieval-enhanced language model that interpolates existing LMs with a k-nearest neighbors model and requires no additional training. |
| Outcome: | The proposed model improves on two English language modeling datasets and shows that it is most effective when items have high semantic similarity with the query. |
Predicting Numerals in Text Using Nearest Neighbor Language Models (2023.findings-acl)
Copied to clipboard
| Challenge: | naive language models treat numerals as string tokens, resulting in difficulty in acquiring commonsense . kNN-LM is an extension of pre-trained neural LMs with the k-nearest neighbor (kNN) search . |
| Approach: | They apply k-nearest neighbor LM to a masked numeral prediction task . they found it is effective for fine-grained predictions of numerals from context . |
| Outcome: | The retrieval-based method is effective for fine-grained numeral prediction from context . it improves accuracy for the OOV numerals, the study shows . |
Long-Tail Crisis in Nearest Neighbor Language Models (2025.findings-naacl)
Copied to clipboard
| Challenge: | Prior studies have shown that kNN-LM can retrieve long-tail contexts, leaving the model’s performance underexplored in estimating the probabilities of long-tailed target tokens. |
| Approach: | They investigate the behavior of kNN-LM on low-frequency tokens, examining prediction probability, retrieval accuracy, and token distribution in the datastore. |
| Outcome: | The proposed model improves the perplexity of given text by directly accessing a large datastore built from any text data during inference. |
kNN-LM Does Not Improve Open-ended Text Generation (2023.emnlp-main)
Copied to clipboard
| Challenge: | Interpolation-based retrieval-augmented language models (LMs) are a subtype of retrieval augmented language model that computes the probability of the next token by interpolating between the softmax distribution of the original LM and a token distribution formed by retrieving over an external datastore. |
| Approach: | They propose to interpolate the predicted distribution of the next word with a distribution formed from the most relevant retrievals for a given prefix. |
| Outcome: | The proposed methods do not exhibit improvements in open-ended generation quality, as measured by automatic evaluation metrics and human evaluations. |
Can Retriever-Augmented Language Models Reason? The Blame Game Between the Retriever and the Language Model (2023.findings-emnlp)
Copied to clipboard
| Challenge: | kNN-LM, REALM, DPR + FiD, Contriever + ATLAS, and Contriver + Flan-T5 are popular retriever-augmented language models for a variety of tasks. |
| Approach: | They evaluate the strengths and weaknesses of kNN-LM, REALM, DPR + FiD, Contriever + ATLAS, and Contriver + Flan-T5 in reasoning over retrieved statements across different tasks. |
| Outcome: | The proposed models do not exhibit strong reasoning even when provided with only the required statements. |
KoCo-Bench: Can Large Language Models Leverage Domain Knowledge in Software Development? (2026.acl-long)
Copied to clipboard
Xue Jiang, Ge Li, Jiaru Qian, Xianjie Shi, Chenjie Li, Hao Zhu, Ziyu Wang, Jielun Zhang, Zeyu Zhao, Kechi Zhang, Jia Li, Wenpin Jiao, Zhi Jin, Yihong Dong
| Challenge: | Existing domain-specific code benchmarks focus on assessing what knowledge LLMs possess rather than how they acquire and apply new knowledge. |
| Approach: | They propose a benchmark to evaluate domain specialization methods in real-world software development. |
| Outcome: | KOCO-bench is a new benchmark for evaluating domain specialization methods in real-world software development. |
Learn to Memorize: Scalable Continual Learning in Semiparametric Models with Mixture-of-Neighbors Induction Memory (2025.acl-long)
Copied to clipboard
| Challenge: | Semiparametric language models (LMs) use static storage, which lacks learning capability and is disconnected from the internal information flow of the parametric models. |
| Approach: | They reconceptualize the non-parametric memory represented by kNN-LM as a learnable Mixture-of-Neighbors Induction Memory (MoNIM) this synergizes the induction capabilities of attention heads with the memorization strength of feed-forward networks . |
| Outcome: | The proposed model is a learnable Mixture-of-neighbors induction memory (MoNIM) it synergizes the induction capabilities of attention heads with the memorization strength of feed-forward networks (FFNs). |