Downloads · 30 days
106
4% of all-time downloads
PM-AI/sts_paraphrase_xlm-roberta-base_de-en
sts_paraphrase_xlm-roberta-base_de-en is a sentence similarity model from PM-AI. Use it when you need a score for how close two texts are. It is set up for transformers. The card lists the license as mit.
Transformer model for Semantic Textual Similarity (STS) for German and Englisch sentences/texts. The embeddings output can be used for semantic search, paraphrasing and retrieval with cosine similarity. The Model is a…
Downloads · 30 days
106
4% of all-time downloads
All-time downloads
2.4K
Public
Repo size
2.2 GB
Likes
4
Public
Click a slice to open those files.
.bin1.1 GB · 99%
From the Hugging Face model README
Transformer model for Semantic Textual Similarity (STS) for German and Englisch sentences/texts. The embeddings output can be used for semantic search, paraphrasing and retrieval with cosine similarity. The Model is applicable to Englisch-German-Mixed sentences/texts but also for Englisch only and German only.
The model can be easily used with Sentence Transformer library.
This model is based on a training approach from 2020 by Philip May, who published the T-Systems-onsite/cross-en-de-roberta-sentence-transformer model. We updated this approach by a new base model for fine-tuning and some extensions to the training data. These changes are discussed in the next sections.
The model is based on training with samples from STSb, SICK and Priya22 semantic textual relatedness datasets. They contain about 76.000 sentence pairs in total. These sentence pairs are based on German-German, English-English and German-English mixed. The training object is to optimize for cosine similarity loss based on a human annoted sentence similarity score. In terms of content, the samples are based on rather simple sentences.
When the TSystems model was published, only the STSb dataset was used for STS training. Therefore it is included in our model, but expanded to include SICK and Priya22 semantic textual relatedness:
All training and test data (STSb, Sick, Priya22) were checked for duplicates within and with each other and removed if found. Because the test data is prioritized, duplicated entries between test-train are exclusively removed from train split. The final used datasets can be viewed here: datasets_sts_paraphrase_xlm-roberta-base_de-en
Befor fine-tuning for STS we made the English paraphrasing model paraphrase-distilroberta-base-v1 usable for German by applying Knowledge Distillation (Teacher-Student approach). The TSystems model used version 1, which is based on 7 different datasets and contains around 24.6 million samples. We are using version 2 with 12 datasets and about 83.3 million examples. Details for this process here: PM-AI/paraphrase-distilroberta-base-v2_de-en
For fine-tuning we are using SBERT's training_stsbenchmark_continue_training.py training script. One thing has been changed in this training script: when a sentence pair consists of identical utterances the score is set to 5.0 (maximum). It makes no sense to say identical sentences have a score of 4.8 or 4.9.
Now the performance is measured cross-lingually as well as for German and English only. In addition, the test samples used are evaluated individually for each data set (STSb, SICK, Priya22), as well as in a large combined test data set (all). This subdivision per data set allows for a fair overall assessment, since external models are not built on the same data basis as the model presented here. The data is not evenly distributed in either training or testing!
❗Some models are only usable for one language (because they are monolingual). They will almost not perform at all in the other two tables. Still, they are good models in certain applications❗
The first table shows the evaluation results for cross-lingual (German-English-Mixed) based on Spearman:
The second table shows the evaluation results for German only based on Spearman:
And last but not least our third table which shows the evaluation results for English only based on Spearman:
❗It is crucial to understand that:
This work is a collaboration between Technical University of Applied Sciences Wildau (TH Wildau) and sense.ai.tion GmbH. You can contact us via:
This work was funded by the European Regional Development Fund (EFRE) and the State of Brandenburg. Project/Vorhaben: "ProFIT: Natürlichsprachliche Dialogassistenten in der Pflege".
<div style="display:flex"> <div style="padding-left:20px;"> <a href="https://efre.brandenburg.de/efre/de/"><img src="https://huggingface.co/datasets/PM-AI/germandpr-beir/resolve/main/res/EFRE-Logo_rechts_oweb_en_rgb.jpeg" alt="Logo of European Regional Development Fund (EFRE)" width="200"/></a> </div> <div style="padding-left:20px;"> <a href="https://www.senseaition.com"><img src="https://senseaition.com/wp-content/uploads/thegem-logos/logo_c847aaa8f42141c4055d4a8665eb208d_3x.png" alt="Logo of senseaition GmbH" width="200"/></a> </div> <div style="padding-left:20px;"> <a href="https://www.th-wildau.de"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/TH_Wildau_Logo.png/640px-TH_Wildau_Logo.png" alt="Logo of TH Wildau" width="180"/></a> </div> </div>