This is a
Cross Encoder model finetuned from
microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract-fulltext using the
sentence-transformers library. It computes scores for pairs of texts, which can be used for text reranking and semantic search.
The training dataset was generated using a random sample of
PubMed title-abstract pairs along with similar title pairs.
This model can be used to score a list of text pairs. This is useful as a reranking pipeline after an initial semantic search operation.
1from txtai.pipeline import Similarity
2
3ranker = Similarity(path="neuml/biomedbert-base-reranker", crossencode=True)
4ranker("query", ["document1", "document2"])
Alternatively, the model can be loaded with
sentence-transformers.
1from sentence_transformers import CrossEncoder
2
3model = SentenceTransformer("neuml/biomedbert-base-reranker")
4model.predict([["query", "document1"], ["query", "document2"]])
Performance of this model is compared to previously released models trained on medical literature.
The following datasets were used to evaluate model performance.
Evaluation results are shown below. The
Pearson correlation coefficient is used as the evaluation metric.
As expected, this cross-encoder model scores much higher than bi-encoder models and late interaction models. The tradeoff is that this is expensive to run and there is no way to scale it past small batches of data. But it's a great model for re-ranking medical literature.