Language model: gbert-base-germandpr-reranking Language: German Training data: GermanDPR train set (~ 56MB) Eval data: GermanDPR test set (~ 6MB) Infrastructure: 1x V100 GPU Published: June 3rd, 2021
Details
We trained a text pair classification model in FARM, which can be used for reranking in document retrieval tasks. To this end, the classifier calculates the similarity of the query and each retrieved top k document (e.g., k=10). The top k documents are then sorted by their similarity scores. The document most similar to the query is the best.
We use the GermanDPR test dataset as ground truth labels and run two experiments to compare how a BM25 retriever performs with or without reranking with our model. The first experiment runs retrieval on the full German Wikipedia (more than 2 million passages) and second experiment runs retrieval on the GermanDPR dataset only (not more than 5000 passages). Both experiments use 1025 queries. Note that the second experiment is evaluating on a much simpler task because of the smaller dataset size, which explains strong BM25 retrieval performance.
Full German Wikipedia (more than 2 million passages):
BM25 Retriever without Reranking
recall@3: 0.4088 (419 / 1025)
mean_reciprocal_rank@3: 0.3322
BM25 Retriever with Reranking Top 10 Documents
recall@3: 0.5200 (533 / 1025)
mean_reciprocal_rank@3: 0.4800
GermanDPR Test Dataset only (not more than 5000 passages):
BM25 Retriever without Reranking
recall@3: 0.9102 (933 / 1025)
mean_reciprocal_rank@3: 0.8528
BM25 Retriever with Reranking Top 10 Documents
recall@3: 0.9298 (953 / 1025)
mean_reciprocal_rank@3: 0.8813
Usage
In haystack
You can load the model in haystack for reranking the documents returned by a Retriever: