Capturing Structural Locality in Non-parametric Language Models
Not on the map. Why?
Abstract (arXiv)
Structural locality is a ubiquitous feature of real-world datasets, wherein data points are organized into local hierarchies. Some examples include topical clusters in text or project hierarchies in source code repositories. In this paper, we explore utilizing this structural locality within non-parametric language models, which generate sequences that reference retrieved examples from an external source. We propose a simple yet effective approach for adding locality information into such models by adding learned parameters that improve the likelihood of retrieving examples from local neighborhoods. Experiments on two different domains, Java source code and Wikipedia text, demonstrate that locality features improve model efficacy over models without access to these features, with interesting differences. We also perform an analysis of how and where locality features contribute to improved performance and why the traditionally used contextual similarity metrics alone are not enough to grasp the locality structure.
Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Builds on 30 of its 46 references that are in the map. First posted on arXiv 6 Oct 2021.
Builds on
30 of 46 references.
References · 30
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2014Adam: A Method for Stochastic Optimizationcited by 36,960
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
- 2016Pointer Sentinel Mixture Modelscited by 2,992
- 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,898
- 2019XLNet: Generalized Autoregressive Pretraining for Language Understandingcited by 2,801
- 2020Extracting Training Data from Large Language Modelscited by 2,144
18 more
- 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,830
- 2019Energy and Policy Considerations for Deep Learning in NLPcited by 1,242
- 2019Generalization through Memorization: Nearest Neighbor Language Modelscited by 788
- 2019Universal Adversarial Triggers for Attacking and Analyzing NLPcited by 709
- 2019Defending Against Neural Fake Newscited by 553
- 2018Adaptive Input Representations for Neural Language Modelingcited by 226
- 2017A Survey of Machine Learning for Big Code and Naturalnesscited by 220
- 2017Regularizing and Optimizing LSTM Language Modelscited by 205
- 2015A Neural Network Approach to Context-Sensitive Generation of Conversational Responsescited by 98
- 2021Pretrained Language Models for Text Generation: A Surveycited by 95
- 2017Generating Sentences by Editing Prototypescited by 88
- 2016Improving Neural Language Models with a Continuous Cachecited by 81
- 2018A Retrieve-and-Edit Framework for Predicting Structured Outputscited by 73
- 2020Big Code != Big Vocabulary: Open-Vocabulary Models for Source Codecited by 53
- 2017Unbounded cache model for online language modeling with open vocabularycited by 37
- 2020Learning Sparse Prototypes for Text Generationcited by 15
- 2019Latent Relation Language Modelscited by 14
- 2015Larger-Context Language Modellingcited by 10
Built on by
Citing papers per year: 2022: 5; 2023: 3.
8 papers.
- 2022Repository-Level Prompt Generation for Large Language Models of Codecited by 106
- 2022Neuro-Symbolic Language Modeling with Automaton-augmented Retrievalcited by 60
- 2023RepoFusion: Training Code Models to Understand Your Repositorycited by 40
- 2022Nonparametric Masked Language Modelingcited by 39
- 2023Guiding Language Models of Code with Global Context using Monitorscited by 20
- 2022You can't pick your neighbors, or can you? When and how to rely on retrieval in the kNN-LMcited by 18
- 2022Nearest Neighbor Language Models for Stylistic Controllable Generationcited by 2
- 2023Style Locality for Controllable Generation with kNN Language Modelscited by 0
- 2023Style Locality for Controllable Generation with kNN Language Models1 Nov 2023
- 2023RepoFusion: Training Code Models to Understand Your Repository19 Jun 2023
- 2023Guiding Language Models of Code with Global Context using Monitors19 Jun 2023
- 2022Nonparametric Masked Language Modeling2 Dec 2022
- 2022You can't pick your neighbors, or can you? When and how to rely on retrieval in the kNN-LM28 Oct 2022
- 2022Nearest Neighbor Language Models for Stylistic Controllable Generation27 Oct 2022
- 2022Repository-Level Prompt Generation for Large Language Models of Code26 Jun 2022
- 2022Neuro-Symbolic Language Modeling with Automaton-augmented Retrieval28 Jan 2022