On Retrieval Augmentation and the Limitations of Language Model Training
Ting-Rui Chiang, Xinyan Velocity Yu, Joshua Robinson, Ollie Liu, Isabelle Lee, Dani Yogatama
TL;DR
The paper investigates why $k$NN$-$LM retrieval improves perplexity and finds that the softmax bottleneck in the last layer is not the sole reason. It introduces the Macondo dataset to study generalization from over-specification and shows scaling alone (e.g., GPT-3.5-turbo) does not resolve this gap. It demonstrates that an MLP mapping of datastore keys to values can partly replicate $k$NN benefits with far lower storage costs, offering a promising, scalable alternative. The findings suggest that improving LM generalization under over-specification and exploring retrieval-inspired surrogates could yield practical gains beyond simply increasing model size or data.
Abstract
Augmenting a language model (LM) with $k$-nearest neighbors ($k$NN) retrieval on its training data alone can decrease its perplexity, though the underlying reasons for this remain elusive. In this work, we rule out one previously posited possibility -- the "softmax bottleneck." We then create a new dataset to evaluate LM generalization ability in the setting where training data contains additional information that is not causally relevant. This task is challenging even for GPT-3.5 Turbo. We show that, for both GPT-2 and Mistral 7B, $k$NN retrieval augmentation consistently improves performance in this setting. Finally, to make $k$NN retrieval more accessible, we propose using a multi-layer perceptron model that maps datastore keys to values as a drop-in replacement for traditional retrieval. This reduces storage costs by over 25x.
