Adaptation Approaches for Nearest Neighbor Language Models

Rishabh Bhardwaj, George Polovets, Monica Sunkara


Abstract
Semi-parametric Nearest Neighbor Language Models (kNN-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 kNN-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 (kNN-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.
Anthology ID:
2023.findings-acl.73
Volume:
Findings of the Association for Computational Linguistics: ACL 2023
Month:
July
Year:
2023
Address:
Toronto, Canada
Editors:
Anna Rogers, Jordan Boyd-Graber, Naoaki Okazaki
Venue:
Findings
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
1135–1146
Language:
URL:
https://aclanthology.org/2023.findings-acl.73
DOI:
10.18653/v1/2023.findings-acl.73
Bibkey:
Cite (ACL):
Rishabh Bhardwaj, George Polovets, and Monica Sunkara. 2023. Adaptation Approaches for Nearest Neighbor Language Models. In Findings of the Association for Computational Linguistics: ACL 2023, pages 1135–1146, Toronto, Canada. Association for Computational Linguistics.
Cite (Informal):
Adaptation Approaches for Nearest Neighbor Language Models (Bhardwaj et al., Findings 2023)
Copy Citation:
PDF:
https://aclanthology.org/2023.findings-acl.73.pdf