Edit model card
YAML Metadata Warning: The pipeline tag "relation-classification" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, text2text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, any-to-any, other

Biomedical relation classifier with SetFit in Spanish

Table of contents

Click to expand

Model description

This is a Transformer's SetFit model trained for biomedical text pairs classification in Spanish.

Intended uses and limitations

The model is prepared to classify hierarchical relations among medical terms. This includes the following types of relations: BROAD, EXACT, NARROW, NO_RELATION.

How to use

This model is implemented as part of the KeyCARE library. Install first the keycare module to call the SetFit classifier:

python -m pip install keycare

You can then run the KeyCARE pipeline that uses the SetFit model:

from keycare install RelExtractor.RelExtractor

# initialize the termextractor object
relextractor = RelExtractor(relation_method='setfit')
# Run the pipeline
source = ["cáncer", "enfermedad de pulmón", "mastectomía radical izquierda", "laparoscopia"]
target = ["cáncer de mama", "enfermedad pulmonar", "mastectomía", "Streptococus pneumoniae"]
relextractor(source, target)
# You can also access the class storing the SetFit model
relator = relextractor.relation_method

Training

The model has been trained using an efficient few-shot learning technique that involves:

  1. Fine-tuning a Sentence Transformer with contrastive learning. The used pre-trained model is SapBERT-from-roberta-base-biomedical-clinical-es from the BSC-NLP4BIA reserch group.
  2. Training a classification head with features from the fine-tuned Sentence Transformer.

The training data has been obtained using the hirerarchical structure of SNOMED-CT mapped to the medical terms present in UMLS.

Evaluation

To be published

Additional information

Author

NLP4BIA at the Barcelona Supercomputing Center

Licensing information

Apache License, Version 2.0

Citation information

To be published

Disclaimer

Click to expand

The models published in this repository are intended for a generalist purpose and are available to third parties. These models may have bias and/or any other undesirable distortions.

When third parties, deploy or provide systems and/or services to other parties using any of these models (or using systems based on these models) or become users of the models, they should note that it is their responsibility to mitigate the risks arising from their use and, in any event, to comply with applicable regulations, including regulations regarding the use of Artificial Intelligence.

Downloads last month
7
Inference API
Unable to determine this model’s pipeline type. Check the docs .