/ Модель

Характеристики

Контекст
512 токенов
Параметры
25,9 млн
Лицензия
Apache 2.0
Архитектура
bert · dense
Базовая модель
all-MiniLM-L6-v2
Библиотека
sentence-transformers
Опубликована
29 июл 2026

Ows2-MiniLM_1

ЭмбеддингиТекст → embedding3 профессии

Дообученный англоязычный энкодер для поиска и сопоставления научных текстов с терминами агропродовольственных онтологий.

71скачиваний за 30 дней0лайковвеса обновлены7 авг 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Эмбеддинги» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Ows2-MiniLM — модель эмбеддингов предложений, разработанная в проекте OWS² исследователями INRAE для семантического сопоставления научного текста с терминами агропродовольственных онтологий. Она предназначена для поиска релевантных понятий из словаря примерно на 14 600 терминов по предложениям из научных аннотаций и публикаций, автоматической разметки текстов и связывания свободных описаний с контролируемыми словарями.

Модель основана на sentence-transformers/all-MiniLM-L6-v2: это биэнкодер на архитектуре BERT с усреднением токеновых представлений и L2-нормализацией. Модель содержит 25,9 млн параметров, принимает текстовые предложения и формирует векторные представления; максимальный контекст — 512 токенов. Модель настроена на английский язык и научную лексику агрономии, растениеводства и пищевой науки. В тестах на экспертных запросах дообученная модель превзошла базовую по поисковым метрикам, но результаты зависят от состава словаря и тестовой выборки.

Модель рассчитана на англоязычный научный поиск в агропродовольственной области; качество на общих и сторонних доменах может быть ниже. Она не найдёт понятия, отсутствующие в используемом словаре, а на запросах без буквального совпадения с целевым термином показатели слабее, что указывает на ограниченную семантическую генерализацию. Распространяется по лицензии Apache-2.0.

Сценарии применения

  • поиск терминов агропродовольственной онтологии по предложению из научной аннотации
  • автоматическая разметка научных публикаций понятиями из контролируемого словаря
  • сопоставление свободных описаний с терминами агрономических тезаурусов
  • ранжирование понятий по релевантности запросу о растениеводстве или пищевой науке

Ограничения

Модель специализирована на англоязычной агропродовольственной научной лексике, поэтому её качество на общих текстах и в других областях может быть ниже. Она не охватывает термины вне используемого словаря и слабее справляется с семантическим поиском без буквального совпадения.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Ows2-MiniLM — Ontology Alignment Model for Agri-Food Domains

Ows2-MiniLM is a sentence embedding model fine-tuned for semantic alignment between scientific text and agri-food ontology terms. It is part of the OWS² (Ontology-based Workflow for Semantic Specialisation) project developed at INRAE (French National Research Institute for Agriculture, Food and Environment).

Given a sentence extracted from a scientific abstract or publication, the model retrieves the most semantically relevant ontology terms from a reference vocabulary of ~14 600 concepts covering plant science, food science, and agronomy domains.

The reference vocabulary incorporates concepts from:

Acknowledgement: This work was supported by INRAE Metaprogramme DIGIT-BIO within the framework of the SEED project, and was carried out within the Plateforme de Profilage Métabolique et de Métabolomique (P2M2) — UMR 1349 IGEPP, INRAE.


Model Details

PropertyValue
Model nameOws2-MiniLM
Base modelsentence-transformers/all-MiniLM-L6-v2
ArchitectureBi-encoder (Transformer + Mean Pooling + L2 Normalize)
Output dimensionality384 dimensions
Maximum sequence length512 tokens
Similarity functionCosine similarity
LicenseApache 2.0 (inherits from base model)
Training lossMultipleNegativesRankingLoss (asymmetric, in-batch negatives)
LanguageEnglish
DomainAgri-food science (plant biology, food science, agronomy)

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'architecture': 'BertModel'})
  (1): Pooling({'pooling_mode': 'mean'})
  (2): Normalize({})
)

Intended Use

This model is designed for ontology-based semantic search in scientific literature, specifically:

  • Automatic annotation of scientific abstracts with ontology concepts
  • Semantic retrieval of the most relevant agri-food ontology terms given a sentence
  • Alignment between free-text descriptions and controlled vocabularies (e.g., PPDO, AgroVoc-related thesauri)

Out-of-scope use: This model is specialized for agri-food science. Performance on general-purpose or non-scientific text may be significantly lower.


Usage

from sentence_transformers import SentenceTransformer, util

model = SentenceTransformer("tcolombu/Ows2-MiniLM_1")

# A sentence from a scientific abstract
query = "Fruit-based sauces exhibited significant variations in antioxidant activity among different cultivars."

# Ontology terms to rank
ontology_terms = [
    "fruit sauce",
    "antioxidant activity",
    "barley powdery mildew disease response",
    "rootless",
]

# Encode and compute cosine similarities
query_embedding = model.encode(query, convert_to_tensor=True)
term_embeddings = model.encode(ontology_terms, convert_to_tensor=True)

scores = util.cos_sim(query_embedding, term_embeddings)[0]
ranked = sorted(zip(ontology_terms, scores.tolist()), key=lambda x: x[1], reverse=True)

for term, score in ranked:
    print(f"{score:.4f}  {term}")
# Expected top result: fruit sauce

Evaluation

Two distinct evaluation protocols were used, each measuring different aspects of model performance. Both are computed on the same 100-query expert goldtest, but differ in corpus construction and scoring logic.

Evaluator 1 — Standard IR (InformationRetrievalEvaluator)

Called during training via python main.py finetune --config <yaml>

This is the standard InformationRetrievalEvaluator from the sentence-transformers library. Each ontology term is registered with a composite key "{ontology_id}_{term}", meaning the same surface form can appear multiple times in the corpus if it has multiple ontology IDs. Relevance is checked by exact doc_id match only.

  • Corpus size: ~14 600 entries (with duplicates)
  • Scoring: Single exact doc_id match required
  • Stored in: metrics_comparison.json
DatasetAcc@1Acc@3MRR@10NDCG@10
Validation set (15% of training data)39.68%53.66%48.08%51.85%
Goldtest (100 expert queries)55.00%75.00%66.63%44.35%

Evaluator 2 — Combined Goldtest Benchmark (CombinedGoldtestEvaluator)

Called post-training via python main.py eval_model <model_path>

A custom three-component evaluator. Terms are deduplicated to 14 544 unique surface forms. Synonymous ontology IDs sharing the same term are merged: a prediction is correct if any valid ID for the target term is retrieved. Queries are split into two subsets:

  • Exact Match: the target term appears verbatim in the query sentence
  • Taboo Match: the target term is absent from the query — pure semantic understanding required
SubsetAcc@1Acc@3MRR@10
Exact Match66.18%79.41%73.94%
Taboo Match37.50%68.75%54.48%
Semantic metricValue
Mean similarity (positive targets)0.5580
Mean similarity (distractors)0.3801
Discrimination margin0.1780
Discrimination accuracy86.36%

Stored in: goldtest_eval/combined_goldtest_metrics.json

Reading the two scores: Evaluator 1 (66.63% MRR) is stricter because duplicated corpus entries act as additional distractors. Evaluator 2 (73.94% MRR) is more semantically faithful because synonyms of the correct answer are also accepted as valid.


Baseline Comparison — all-MiniLM-L6-v2 (no fine-tuning) vs Ows2-MiniLM

All metrics below are computed on our agri-food ontology corpus (not the standard sentence-transformers benchmarks). The base model has never seen this vocabulary.

Validation set — InformationRetrievalEvaluator (2 238 queries, ~14 400 corpus terms)

MetricBase all-MiniLM-L6-v2Ows2-MiniLMΔ Gain
Accuracy@123.15%39.68%+16.5 pts
Accuracy@335.17%53.66%+18.5 pts
Accuracy@541.51%59.20%+17.7 pts
NDCG@1034.46%51.85%+17.4 pts
MRR@1030.76%48.08%+17.3 pts

Goldtest — Expert benchmark (100 queries, ~14 600 corpus terms)

MetricBase all-MiniLM-L6-v2Ows2-MiniLMΔ Gain
Accuracy@122.00%55.00%+33.0 pts
Accuracy@341.00%75.00%+34.0 pts
Accuracy@552.00%84.00%+32.0 pts
NDCG@1024.16%44.35%+20.2 pts
MRR@1034.81%66.63%+31.8 pts

Fine-tuning on the OWS² mixed dataset (real + synthetic pairs) provides a ~+32 points absolute gain on Acc@1 and ~+32 points on MRR@10 on the expert goldtest, demonstrating the strong impact of domain specialisation even with limited real annotated data (~491 expert examples).


Training Details

Training Data

The model was trained on a mixed dataset combining real annotated data and LLM-generated synthetic pairs:

SourceExamplesDescription
Real annotations~491Expert-annotated (sentence, ontology term) pairs from scientific abstracts
Synthetic data~14 428Sentence/term pairs generated with Qwen (local inference), covering the full ontology vocabulary
Total (85% train split)~13 284Used for training
Validation (15%)~2 341Used for in-training evaluation
  • Format: (anchor_sentence, positive_term, hard_negative_term) triplets
  • Loss: MultipleNegativesRankingLoss — uses all other items in the batch as implicit negatives
  • Synthetic generation LLM: Qwen — run locally (Qwen2+ is Apache 2.0; Qwen1.x Tongyi license is compatible with domain-specific fine-tuned model publication)
  • Dataset file: mixed_dataset_v0_full.jsonl

Training Hyperparameters

ParameterValue
Batch size16
Learning rate2e-5
Epochs15
Warmup ratio0.1
LR schedulerLinear
OptimizerAdamW
Freeze layers0 (full fine-tuning)
Seed42

Note on hyperparameter selection: Batch size 16 with LR 2e-5 over 15 epochs was identified as the optimal configuration after a systematic grid search across 44 experiments. Increasing epochs beyond 15 showed no further gain (convergence plateau confirmed).

Training Logs (validation NDCG@10 over 15 epochs)

EpochStepTraining Lossval_evaluator_cosine_ndcg@10
0.121001.04990.3849
0.968000.62360.4861
1.9316000.42120.5072
3.0125000.32280.5107
5.0542000.16080.5094
7.1059000.10850.5137
9.0375000.08900.5177
11.0792000.06670.5170
13.00108000.05370.5173
15.0012465—0.5185

Training Time

  • Training: ~10.7 minutes (NVIDIA GPU, SLURM cluster)
  • Evaluation: ~7.8 minutes
  • Total: ~18.5 minutes

Limitations

  • Domain specificity: The model is fine-tuned on agri-food science vocabulary. Performance on out-of-domain text (e.g., clinical, legal) is expected to be significantly lower.
  • Ontology coverage: The reference ontology contains ~14 600 terms. Terms absent from this vocabulary cannot be retrieved.
  • Real data scarcity: Only ~491 real annotated examples were available. Performance is expected to improve as the real annotation corpus grows.
  • Taboo match gap: The 19-point gap between Exact Match MRR (73.94%) and Taboo Match MRR (54.48%) indicates the model still relies partially on lexical overlap. Improving semantic generalization is an identified next step.

Framework Versions

  • Python: 3.10.20
  • Sentence Transformers: 5.6.0
  • Transformers: 5.14.1
  • PyTorch: 2.10.0+cu128
  • Accelerate: 1.14.0
  • Datasets: 5.0.0

Citation

If you use this model, please cite:

@misc{ows2-minilm-2025,
  title        = {Ows2-MiniLM: An Ontology Alignment Model for Agri-Food Science},
  institution  = {INRAE, P2M2},
  note         = {OWS\textsuperscript{2} -- Ontology-based Workflow for Semantic Specialisation},
  howpublished = {\url{https://huggingface.co/tcolombu/Ows2-MiniLM_1}}
}
@inproceedings{reimers-2019-sentence-bert,
    title     = {Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks},
    author    = {Reimers, Nils and Gurevych, Iryna},
    booktitle = {Proceedings of EMNLP 2019},
    year      = {2019},
    url       = {https://arxiv.org/abs/1908.10084}
}

Related Poster

If you refer to this work, please also cite the related poster:

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · sentence-transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
BertModel
Ревизия весов
78d570b

0 моделей