English

Adaptation Approaches for Nearest Neighbor Language Models

Computation and Language 2023-06-13 v2

Abstract

Semi-parametric Nearest Neighbor Language Models (kkNN-LMs) have produced impressive gains over purely parametric LMs, by leveraging large-scale neighborhood retrieval over external memory datastores. However, there has been little investigation into adapting such models for new domains. This work attempts to fill that gap and suggests the following approaches for adapting kkNN-LMs -- 1) adapting the underlying LM (using Adapters), 2) expanding neighborhood retrieval over an additional adaptation datastore, and 3) adapting the weights (scores) of retrieved neighbors using a learned Rescorer module. We study each adaptation strategy separately, as well as the combined performance improvement through ablation experiments and an extensive set of evaluations run over seven adaptation domains. Our combined adaptation approach consistently outperforms purely parametric adaptation and zero-shot (kkNN-LM) baselines that construct datastores from the adaptation data. On average, we see perplexity improvements of 17.1% and 16% for these respective baselines, across domains.

Keywords

Cite

@article{arxiv.2211.07828,
  title  = {Adaptation Approaches for Nearest Neighbor Language Models},
  author = {Rishabh Bhardwaj and George Polovets and Monica Sunkara},
  journal= {arXiv preprint arXiv:2211.07828},
  year   = {2023}
}

Comments

10 pages, 4 figures

R2 v1 2026-06-28T05:54:41.252Z