Hubness Reduction Improves Sentence-BERT Semantic Spaces

Beatrix M. G. Nielsen, Lars Kai Hansen
11/30/2023
cs.CLcs.LGcs.SI

No official code found. Best implementation: bemigini/hubness-reduction-improves-sbert-semantic-spaces (3 stars, Apache-2.0, last commit 2023-12-01).

Abstract

Semantic representations of text, i.e. representations of natural language which capture meaning by geometry, are essential for areas such as information retrieval and document grouping. High-dimensional trained dense vectors have received much attention in recent years as such representations. We investigate the structure of semantic spaces that arise from embeddings made with Sentence-BERT and find that the representations suffer from a well-known problem in high dimensions called hubness. Hubness results in asymmetric neighborhood relations, such that some texts (the hubs) are neighbours of many other texts while most texts (so-called anti-hubs), are neighbours of few or no other texts. We quantify the semantic quality of the embeddings using hubness scores and error rate of a neighbourhood based classifier. We find that when hubness is high, we can reduce error rate and hubness using hubness reduction methods. We identify a combination of two methods as resulting in the best reduction. For example, on one of the tested pretrained models, this combined method can reduce hubness by about 75% and error rate by about 9%. Thus, we argue that mitigating hubness in the embedding space provides better semantic representations of text.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Hubness Reduction Improves Sentence-BERT Semantic Spaces

30Perl, PythonNov 10, 20232 years agoApache-2.0

Similar Papers

Cite this paper

@article{nielsen2023hubness,
  title  = {Hubness Reduction Improves Sentence-BERT Semantic Spaces},
  author = {Beatrix M. G. Nielsen and Lars Kai Hansen},
  year   = {2023},
  eprint = {2311.18364},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2311.18364v1}
}

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/2311.18364.svg)](https://codeofpaper.com/paper/2311.18364)

Discussion