ACL2023

What Are You Token About? Dense Retrieval as Distributions Over the Vocabulary

Ori Ram, Liat Bezalel, Adi Zicher, Yonatan Belinkov, Jonathan Berant, Amir Globerson

14 citations

Abstract

Dual encoders are now the dominant architecture for dense retrieval. Yet, we have little understanding of how they represent text, and why this leads to good performance. In this work, we shed light on this question via distributions over the vocabulary. We propose to interpret the vector representations produced by dual encoders by projecting them into the model's vocabulary space. We show that the resulting projections contain rich semantic information, and draw connection between them and sparse retrieval. We find that this view can offer an explanation for some of the failure cases of dense retrievers. For example, we observe that the inability of models to handle tail entities is correlated with a tendency of the token distributions to forget some of the tokens of those entities. We leverage this insight and propose a simple way to enrich query and passage representations with lexical information at inference time, and show that this significantly improves performance compared to the original model in zero-shot settings, and specifically on the BEIR benchmark. 1 * Supported by the Viterbi Fellowship in the Center for Computer Engineering at the Technion. 1 Our code is publicly available at https://github. com/oriram/dense-retrieval-projections . Uninterpretable Q: Where was Michael Jack born? Query Encoder MLM Head michael -0.54 jack -1.39 son -4.19 father -4.58 birth -4.83 boy -5.15 family -5.75 locke -5.78 childhood -6.10 baby -6.11 child -6.15 ⋮ Interpretable CLS where was michael jack born ? 1. michael -0.54 2. jack -1.39 3. son -4.19 4. father -4.58 5. birth -4.83 6. boy -5.15 7. family -5.75 ⋮ Michael Jack, (born 17 September 1946) is a Conservative Party politician in the United Kingdom … Michael Jack was born in Folkestone, Kent, England. Q: How many judges currently serve on the Supreme Court? Query Encoder MLM Head 1.court -1.43 2. judges -1.71 3. justices -2.27 4. judge -2.96 5. judicial -3.52 6. nine -3.81 7. courts -4.33 ⋮ Passage Encoder MLM Head Demographics of the Supreme Court of the United States … In 2008, seven of the nine sitting justices were millionaires 1. he -2.42 2. jack -3.48 3. major -3.83 4. labour -3.84 5. chairman -3.92 ⋮ 146. michael -6.97 ⋮ 1. justices -0.71 2. court -2.82 3. judges -3.11 4. judge -3.74 5. judicial -4.16 ⋮ 20.