File size: 6,355 Bytes
c0cbb5e
 
 
 
9a4c044
 
c0cbb5e
 
 
 
 
 
 
 
 
92ef90e
c0cbb5e
d309958
c0cbb5e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f9fa6a1
c0cbb5e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f9fa6a1
c0cbb5e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
---
license: cc-by-nc-4.0
tags:
- generated_from_trainer
language: 
- es
metrics:
- precision
- recall
- f1
- accuracy
model-index:
- name: roberta-es-clinical-trials-neg-spec
  results: []
widget:
- text: "Pacientes sanos, sin ninguna enfermedad, que no tomen medicamentos"
- text: "Sujetos adultos con cáncer de próstata asintomáticos y no tratados previamente"
- text: "Enfermedades con posibles síntomas de urticaria o angioedema"
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# roberta-es-clinical-trials-neg-spec

This named entity recognition model detects negation and speculation entities, and negated and speculated concepts:
- Neg_cue: negation cue (e.g. *no*, *sin*)
- Negated: negated entity or event (e.g. *sin **dolor***)
- Spec_cue: speculation cue (e.g. *posiblemente*)
- Speculated: speculated entity or event (e.g. *posiblemente **sobreviva***)

The model achieves the following results on the test set (when trained with the training and development set; results are averaged over 5 evaluation rounds):
- Precision: 0.833 (±0.001)
- Recall: 0.870 (±0.001)
- F1: 0.851 (±0.001)
- Accuracy: 0.956 (±0.001)

## Model description

This model adapts the pre-trained model [bsc-bio-ehr-es](https://huggingface.co/PlanTL-GOB-ES/bsc-bio-ehr-es), presented in [Pio Carriño et al. (2022)](https://aclanthology.org/2022.bionlp-1.19/). 
It is fine-tuned to conduct medical named entity recognition on Spanish texts about clinical trials. 
The model is fine-tuned on the [NUBEs corpus (Lima et al. 2020)](https://aclanthology.org/2020.lrec-1.708/) and on the [CT-EBM-SP corpus (Campillos-Llanos et al. 2021)](https://bmcmedinformdecismak.biomedcentral.com/articles/10.1186/s12911-021-01395-z).

## Intended uses & limitations

**Disclosure**: *This model is under development and needs to be improved. It should not be used for medical decision making without human assistance and supervision*

This model is intended for a generalist purpose, and may have bias and/or any other undesirable distortions.

Third parties who deploy or provide systems and/or services using any of these models (or using systems based on these models) should note that it is their responsibility to mitigate the risks arising from their use. Third parties, in any event, need to comply with applicable regulations, including regulations concerning the use of artificial intelligence.

The owner or creator of the models will in no event be liable for any results arising from the use made by third parties of these models.

**Descargo de responsabilidad**: *Esta herramienta se encuentra en desarrollo y no debe ser empleada para la toma de decisiones médicas*

La finalidad de este modelo es generalista, y se advierte que puede tener sesgos y/u otro tipo de distorsiones indeseables.

Terceras partes que desplieguen o proporcionen sistemas y/o servicios usando alguno de estos modelos (o utilizando sistemas basados en estos modelos) han tener presente que es su responsabilidad abordar y minimizar los riesgos derivados de su uso. Las terceras partes, en cualquier circunstancia, deben cumplir con la normativa aplicable, incluyendo la normativa que concierne al uso de la inteligencia artificial.

El propietario o creador de los modelos de ningún modo será responsable de los resultados derivados del uso que las terceras partes hagan de estos modelos.


## Training and evaluation data

The data used for fine-tuning are:

1) The [Negation and Uncertainty in Spanish Corpus (NUBes)](https://github.com/Vicomtech/NUBes-negation-uncertainty-biomedical-corpus):
It is a collection of 29 682 sentences (518 068 tokens) from anonymised health records in Spanish, annotated with negation and uncertainty cues and their scopes.

2) The [Clinical Trials for Evidence-Based-Medicine in Spanish corpus](http://www.lllf.uam.es/ESP/nlpdata/wp2/):
It is a collection of 1200 texts about clinical trials studies and clinical trials announcements:
- 500 abstracts from journals published under a Creative Commons license, e.g. available in PubMed or the Scientific Electronic Library Online (SciELO)
- 700 clinical trials announcements published in the European Clinical Trials Register and Repositorio Español de Estudios Clínicos

If you use the CT-EBM-SP resource, please, cite as follows:

```
@article{campillosetal-midm2021,
        title = {A clinical trials corpus annotated with UMLS© entities to enhance the access to Evidence-Based Medicine},
        author = {Campillos-Llanos, Leonardo and Valverde-Mateos, Ana and Capllonch-Carri{\'o}n, Adri{\'a}n and Moreno-Sandoval, Antonio},
        journal = {BMC Medical Informatics and Decision Making},
        volume={21},
        number={1},
        pages={1--19},
        year={2021},
        publisher={BioMed Central}
}
```



## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 16
- eval_batch_size: 16
- seed: we used different seeds for 5 evaluation rounds, and uploaded the model with the best results
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 4


### Training results (test set; average and standard deviation of 5 rounds with different seeds)

|   Precision    |     Recall     |       F1       |    Accuracy    |
|:--------------:|:--------------:|:--------------:|:--------------:|
| 0.833 (±0.001) | 0.870 (±0.001) | 0.851 (±0.001) | 0.986 (±0.001) |


**Results per class (test set; average and standard deviation of 5 rounds with different seeds)**  

| Class       |   Precision    |     Recall     |       F1       |  Support  |
|:-----------:|:--------------:|:--------------:|:--------------:|:---------:|
| Neg_cue     | 0.944 (±0.001) | 0.963 (±0.002) | 0.954 (±0.001) |    2416   |
| Negated     | 0.805 (±0.003) | 0.843 (±0.005) | 0.823 (±0.003) |    3064   |
| Spec_cue    | 0.800 (±0.005) | 0.862 (±0.006) | 0.830 (±0.002) |     746   |
| Speculated  | 0.683 (±0.009) | 0.735 (±0.010) | 0.708 (±0.009) |     993   |


### Framework versions

- Transformers 4.17.0
- Pytorch 1.10.2+cu113
- Datasets 1.18.4
- Tokenizers 0.11.6