nicolauduran45 commited on
Commit
9eed4ee
1 Parent(s): dc8f5aa

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +216 -157
README.md CHANGED
@@ -1,199 +1,258 @@
1
  ---
2
  library_name: transformers
3
- tags: []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  ---
5
 
6
- # Model Card for Model ID
7
 
8
- <!-- Provide a quick summary of what the model is/does. -->
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
 
 
11
 
12
- ## Model Details
 
13
 
14
- ### Model Description
15
 
16
- <!-- Provide a longer summary of what this model is. -->
17
 
18
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
19
 
20
- - **Developed by:** [More Information Needed]
21
- - **Funded by [optional]:** [More Information Needed]
22
- - **Shared by [optional]:** [More Information Needed]
23
- - **Model type:** [More Information Needed]
24
- - **Language(s) (NLP):** [More Information Needed]
25
- - **License:** [More Information Needed]
26
- - **Finetuned from model [optional]:** [More Information Needed]
27
 
28
- ### Model Sources [optional]
29
 
30
- <!-- Provide the basic links for the model. -->
31
 
32
- - **Repository:** [More Information Needed]
33
- - **Paper [optional]:** [More Information Needed]
34
- - **Demo [optional]:** [More Information Needed]
 
 
 
 
35
 
36
- ## Uses
37
 
38
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
 
40
- ### Direct Use
41
 
42
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
 
 
43
 
44
- [More Information Needed]
45
 
46
- ### Downstream Use [optional]
47
 
48
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
 
50
- [More Information Needed]
 
51
 
52
- ### Out-of-Scope Use
 
 
 
 
 
 
 
 
 
53
 
54
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
 
56
- [More Information Needed]
57
 
58
- ## Bias, Risks, and Limitations
59
 
60
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
 
 
 
 
 
 
 
 
 
 
61
 
62
- [More Information Needed]
63
 
64
- ### Recommendations
65
 
66
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
 
68
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
 
 
69
 
70
- ## How to Get Started with the Model
71
 
72
- Use the code below to get started with the model.
73
 
74
- [More Information Needed]
75
 
76
- ## Training Details
77
 
78
- ### Training Data
79
 
80
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
 
 
 
 
81
 
82
- [More Information Needed]
83
 
84
- ### Training Procedure
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
 
86
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
 
88
- #### Preprocessing [optional]
89
-
90
- [More Information Needed]
91
-
92
-
93
- #### Training Hyperparameters
94
-
95
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
-
97
- #### Speeds, Sizes, Times [optional]
98
-
99
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
-
101
- [More Information Needed]
102
-
103
- ## Evaluation
104
-
105
- <!-- This section describes the evaluation protocols and provides the results. -->
106
-
107
- ### Testing Data, Factors & Metrics
108
-
109
- #### Testing Data
110
-
111
- <!-- This should link to a Dataset Card if possible. -->
112
-
113
- [More Information Needed]
114
-
115
- #### Factors
116
-
117
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
-
119
- [More Information Needed]
120
-
121
- #### Metrics
122
-
123
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
-
125
- [More Information Needed]
126
-
127
- ### Results
128
-
129
- [More Information Needed]
130
-
131
- #### Summary
132
-
133
-
134
-
135
- ## Model Examination [optional]
136
-
137
- <!-- Relevant interpretability work for the model goes here -->
138
-
139
- [More Information Needed]
140
-
141
- ## Environmental Impact
142
-
143
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
-
145
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
-
147
- - **Hardware Type:** [More Information Needed]
148
- - **Hours used:** [More Information Needed]
149
- - **Cloud Provider:** [More Information Needed]
150
- - **Compute Region:** [More Information Needed]
151
- - **Carbon Emitted:** [More Information Needed]
152
-
153
- ## Technical Specifications [optional]
154
-
155
- ### Model Architecture and Objective
156
-
157
- [More Information Needed]
158
-
159
- ### Compute Infrastructure
160
-
161
- [More Information Needed]
162
-
163
- #### Hardware
164
-
165
- [More Information Needed]
166
-
167
- #### Software
168
-
169
- [More Information Needed]
170
-
171
- ## Citation [optional]
172
-
173
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
-
175
- **BibTeX:**
176
-
177
- [More Information Needed]
178
-
179
- **APA:**
180
-
181
- [More Information Needed]
182
-
183
- ## Glossary [optional]
184
-
185
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
-
187
- [More Information Needed]
188
-
189
- ## More Information [optional]
190
-
191
- [More Information Needed]
192
-
193
- ## Model Card Authors [optional]
194
-
195
- [More Information Needed]
196
-
197
- ## Model Card Contact
198
-
199
- [More Information Needed]
 
1
  ---
2
  library_name: transformers
3
+ license: apache-2.0
4
+ language:
5
+ - af
6
+ - am
7
+ - ar
8
+ - as
9
+ - az
10
+ - be
11
+ - bg
12
+ - bn
13
+ - br
14
+ - bs
15
+ - ca
16
+ - cs
17
+ - cy
18
+ - da
19
+ - de
20
+ - el
21
+ - en
22
+ - eo
23
+ - es
24
+ - et
25
+ - eu
26
+ - fa
27
+ - fi
28
+ - fr
29
+ - fy
30
+ - ga
31
+ - gd
32
+ - gl
33
+ - gu
34
+ - ha
35
+ - he
36
+ - hi
37
+ - hr
38
+ - hu
39
+ - hy
40
+ - id
41
+ - is
42
+ - it
43
+ - ja
44
+ - jv
45
+ - ka
46
+ - kk
47
+ - km
48
+ - kn
49
+ - ko
50
+ - ku
51
+ - ky
52
+ - la
53
+ - lo
54
+ - lt
55
+ - lv
56
+ - mg
57
+ - mk
58
+ - ml
59
+ - mn
60
+ - mr
61
+ - ms
62
+ - my
63
+ - ne
64
+ - nl
65
+ - 'no'
66
+ - om
67
+ - or
68
+ - pa
69
+ - pl
70
+ - ps
71
+ - pt
72
+ - ro
73
+ - ru
74
+ - sa
75
+ - sd
76
+ - si
77
+ - sk
78
+ - sl
79
+ - so
80
+ - sq
81
+ - sr
82
+ - su
83
+ - sv
84
+ - sw
85
+ - ta
86
+ - te
87
+ - th
88
+ - tl
89
+ - tr
90
+ - ug
91
+ - uk
92
+ - ur
93
+ - uz
94
+ - vi
95
+ - xh
96
+ - yi
97
+ - zh
98
  ---
99
 
100
+ # AffilGood-NER-multilingual
101
 
102
+ ## Overview
103
 
104
+ <details>
105
+ <summary>Click to expand</summary>
106
+
107
+ - **Model type:** Language Model
108
+ - **Architecture:** XLM-RoBERTa-base
109
+ - **Language:** Multilingual
110
+ - **License:** Apache 2.0
111
+ - **Task:** Named Entity Recognition
112
+ - **Data:** AffilGood-NER
113
+ - **Additional Resources:**
114
+ - [Paper](https://https://aclanthology.org/2024.sdp-1.13/)
115
+ - [GitHub](https://github.com/sirisacademic/affilgood)
116
+ </details>
117
 
118
+ ## Model description
119
 
120
+ The multilingual version of **affilgood-NER-multilingual** is a Named Entity Recognition (NER) model for identifying named entities in raw affiliation strings from scientific papers and projects,
121
+ fine-tuned from the [AffilRoberta](https://huggingface.co/SIRIS-Lab/affilgood-affilroberta) model, a [XLM-RoBERTa](https://arxiv.org/abs/1911.02116) base model futher pre-trained for MLM task on a medium-size corpus of raw affiliation stirngs collected from OpenAlex.
122
 
123
+ It has been trained with a dataset that contains 7 main types of entities from multilingual raw affiliation strings texts, with 5,266 texts.
124
 
125
+ After analyzing hundreds of affiliations from multiple countries and languages, we defined seven entity types: `SUB-ORGANISATION`, `ORGANISATION`, `CITY`, `COUNTRY`, `ADDRESS`, `POSTAL-CODE`, and `REGION`, detailed [annotation guidelines here].
126
 
127
+ **Identifying named entities** (organization names, cities, countries) in affiliation strings not only enables more effective linking with external organization registries, but it can also play an essential role in the geolocation of organizations and can also contribute to identify organizations and their position in an institutional hierarchy -- especially for those not listed in external databases. Information automatically extracted by means of a NER model can also facilitate the construction of knowledge graphs, and support the development of manually curated registries.
128
 
129
+ ## Intended Usage
 
 
 
 
 
 
130
 
131
+ This model is intended to be used for multilingual raw affiliation strings, because this model is pre-trained on XLM-RoBERTa, NER and large further pre-training corpora are both multilingual.
132
 
133
+ ## How to use
134
 
135
+ ```python
136
+ from transformers import pipeline
137
+ affilgood_ner_pipeline("ner", model=model, tokenizer=tokenizer, aggregation_strategy="simple")
138
+ sentence = "CSIC, Global ecology Unit CREAF-CSIC-UAB, Bellaterra 08193, Catalonia, Spain."
139
+ output = affilgood_ner_pipeline(sentence)
140
+ print(output)
141
+ ```
142
 
 
143
 
144
+ ## Limitations and bias
145
 
146
+ No measures have been taken to estimate the bias and toxicity embedded in the model.
147
 
148
+ The NER dataset contains 5,266 raw affiliation strings obtained from OpenAlex.
149
+ It includes multilingual samples from all available countries and geographies to ensure comprehensive coverage and diversity.
150
+ To enable our model to recognize various affiliation string formats, the dataset includes a wide range of structures, different ways of grouping main and subsidiary institutions and various methods of separating organization names. We also included ill-formed affiliations and those containing errors resulting from automatic extraction from PDF files.
151
 
 
152
 
153
+ ## Training
154
 
155
+ We used the [AffilGood-NER dataset](link) for training and evaluation.
156
 
157
+ We fine-tuned the adapted and base models for token classification with the IOB annotation schema.
158
+ We trained the models for 25 epochs, using 80% of the dataset for training, 10% for validation and 10% for testing.
159
 
160
+ Hyperparameters used for training are described here:
161
+ - Learning Rate: 2e-5
162
+ - Learning Rate Decay: Linear
163
+ - Weight Decay: 0.01
164
+ - Warmup Portion: 0.06
165
+ - Batch Size: 128
166
+ - Number of Steps: 25k steps
167
+ - Adam ε: 1e-6
168
+ - Adam β<sub>1</sub>: 0.9
169
+ - Adam β<sub>2</sub>: 0.999
170
 
171
+ The **best performing epoch (considering macro-averaged F1 with *strict* matching criteria) was used to select the model**.
172
 
173
+ ### Evaluation
174
 
175
+ The model's performance was evaluated on a 10% of the dataset.
176
 
177
+ | Category| RoBERTa | XLM | AffilRoBERTa | **AffilXLM (this model)** |
178
+ |-----|------|------|------|----------|
179
+ | ALL | .910 | .915 | .920 | **.925** |
180
+ |-----|------|------|------|----------|
181
+ | ORG | .869 | .886 | .879 | **.906** |
182
+ | SUB | .898 | .890 | **.911** | .892 |
183
+ | CITY | .936 | .941 | .950 | **.958** |
184
+ | COUNTRY | .971 | .973 | **.980** | .970 |
185
+ | REGION | .870 | .876 | .874 | **.882** |
186
+ | POSTAL | .975 | .975 | **.981** | .966 |
187
+ | ADDRESS | .804 | .811 | .794 | **.869** |
188
 
189
+ All the numbers reported above represent F1-score with *strict* match, when both the boundaries and types of the entities match.
190
 
191
+ ## Additional information
192
 
193
+ ### Authors
194
 
195
+ - SIRIS Lab, Research Division of SIRIS Academic, Barcelona, Spain
196
+ - LaSTUS Lab, TALN Group, Universitat Pompeu Fabra, Barcelona, Spain
197
+ - Institute of Computer Science, Polish Academy of Sciences, Warsaw, Poland
198
 
199
+ ### Contact
200
 
201
+ For further information, send an email to either <[email protected]> or <info@sirisacademic.com>.
202
 
203
+ ### License
204
 
205
+ This work is distributed under a [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0).
206
 
207
+ ### Funding
208
 
209
+ This work was partially funded and supporter by:
210
+ - Industrial Doctorates Plan of the Department of Research and Universities of the Generalitat de Catalunya, by Departament de Recerca i Universitats de la Generalitat de Catalunya (ajuts SGR-Cat 2021),
211
+ - Maria de Maeztu Units of Excellence Programme CEX2021-001195-M, funded by MCIN/AEI /10.13039/501100011033
212
+ - EU HORIZON SciLake (Grant Agreement 101058573)
213
+ - EU HORIZON ERINIA (Grant Agreement 101060930)
214
 
215
+ ### Citation
216
 
217
+ ```bibtex
218
+ @inproceedings{duran-silva-etal-2024-affilgood,
219
+ title = "{A}ffil{G}ood: Building reliable institution name disambiguation tools to improve scientific literature analysis",
220
+ author = "Duran-Silva, Nicolau and
221
+ Accuosto, Pablo and
222
+ Przyby{\l}a, Piotr and
223
+ Saggion, Horacio",
224
+ editor = "Ghosal, Tirthankar and
225
+ Singh, Amanpreet and
226
+ Waard, Anita and
227
+ Mayr, Philipp and
228
+ Naik, Aakanksha and
229
+ Weller, Orion and
230
+ Lee, Yoonjoo and
231
+ Shen, Shannon and
232
+ Qin, Yanxia",
233
+ booktitle = "Proceedings of the Fourth Workshop on Scholarly Document Processing (SDP 2024)",
234
+ month = aug,
235
+ year = "2024",
236
+ address = "Bangkok, Thailand",
237
+ publisher = "Association for Computational Linguistics",
238
+ url = "https://aclanthology.org/2024.sdp-1.13",
239
+ pages = "135--144",
240
+ }
241
+ ```
242
 
243
+ ### Disclaimer
244
 
245
+ <details>
246
+ <summary>Click to expand</summary>
247
+
248
+ The model published in this repository is intended for a generalist purpose
249
+ and is made available to third parties under a Apache v2.0 License.
250
+
251
+ Please keep in mind that the model may have bias and/or any other undesirable distortions.
252
+ When third parties deploy or provide systems and/or services to other parties using this model
253
+ (or a system based on it) or become users of the model itself, they should note that it is under
254
+ their responsibility to mitigate the risks arising from its use and, in any event, to comply with
255
+ applicable regulations, including regulations regarding the use of Artificial Intelligence.
256
+
257
+ In no event shall the owners and creators of the model be liable for any results arising from the use made by third parties.
258
+ </details>