Surface-Based Retrieval Reduces Perplexity of Retrieval-Augmented Language Models

Ehsan Doostmohammadi, Tobias Norlund, Marco Kuhlmann, Richard Johansson
5/25/2023
cs.CL

No official code found. Best implementation: edoost/retro_bm25 (3 stars, Apache-2.0, last commit 2025-01-02).

Abstract

Augmenting language models with a retrieval mechanism has been shown to significantly improve their performance while keeping the number of parameters low. Retrieval-augmented models commonly rely on a semantic retrieval mechanism based on the similarity between dense representations of the query chunk and potential neighbors. In this paper, we study the state-of-the-art Retro model and observe that its performance gain is better explained by surface-level similarities, such as token overlap. Inspired by this, we replace the semantic retrieval in Retro with a surface-level method based on BM25, obtaining a significant reduction in perplexity. As full BM25 retrieval can be computationally costly for large datasets, we also apply it in a re-ranking scenario, gaining part of the perplexity reduction with minimal computational overhead.

View on arXivView PDF

Code Implementations(1)

edoost/retro_bm25Community100%
Apache-2.0
30Python, MakefileMay 17, 20231 years agoApache-2.0

Similar Papers

Cite this paper

@article{doostmohammadi2023surfacebased,
  title  = {Surface-Based Retrieval Reduces Perplexity of Retrieval-Augmented Language Models},
  author = {Ehsan Doostmohammadi and Tobias Norlund and Marco Kuhlmann and Richard Johansson},
  year   = {2023},
  eprint = {2305.16243},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.16243v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.16243.svg)](https://codeofpaper.com/paper/2305.16243)

Discussion