<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>CLEF</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>LasigeBioTM team at CLEF2020 ChEMU evaluation lab: Named Entity Recognition and Event extraction from chemical reactions described in patents using BioBERT NER and RE</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Pedro Ruas</string-name>
          <email>psruas@fc.ul.pt</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Andre Lamurias</string-name>
          <email>alamurias@lasige.di.fc.ul.pt</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Francisco M Couto</string-name>
          <email>fcouto@di.fc.ul.pt</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>LASIGE</institution>
          ,
          <addr-line>Faculdade de Ci</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>encias, Universidade de Lisboa</institution>
          ,
          <addr-line>Lisbon 1749-016</addr-line>
          ,
          <country country="PT">Portugal</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2020</year>
      </pub-date>
      <volume>22</volume>
      <fpage>22</fpage>
      <lpage>25</lpage>
      <abstract>
        <p>This manuscript describes the participation of the LasigeBioTM team in the NER and EE tasks of the ChEMU evaluation lab. We have ne-tuned the BioBERT NER model to locate and tag named entities and the BioBERT RE model to detect relations between trigger words and named entities. For the NER task, we obtained a F1-score of 0.9392 (exact matching) and 0.9630 (relaxed matching), which was an improvement over the baseline approach and achieving the 3rd best team result. For the EE task, we were not able to produce all the required annotation les due to the dimension of the test set and, consequently, we did not obtain results in time to submit to the competition. However, we obtained an accuracy of 0.9849 when we applied the BioBERT RE model on the development set.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Chemical patents are a valuable source of information for chemical research.
Every year, thousands of patents are registered, increasing the already large wealth
of information available. Considering only the European Patent O ce (EPO)
and the year 2019, there were 7697 new patents lled in the \Pharmaceuticals"
category and 6197 in the \Organic ne chemistry" category1. The manual
analysis of these documents is costly, both in terms of time and e ort, so it is necessary
to develop text mining approaches to extract information in a more e cient way.</p>
      <p>There are some challenges associated with patent text, like the presence of
longer sentences, the use of speci c terminology, the complexity of the syntactic</p>
      <p>Category Entity type
\REACTION PRODUCT"
\STARTING MATERIAL"
Chemical entity \REAGENT CATALYST"</p>
      <p>\SOLVENT"
\OTHER COMPOUND"</p>
      <p>\TEMPERATURE"
Reaction property \YIEL\DTPIMERE"CENT"</p>
      <p>\YIELD OTHER"</p>
      <p>
        Reaction label \EXAMPLE LABEL"
Table 1. Entity types and the respective broad category in which they are included.
structure, which limits the performance of general text mining models, usually
developed for news text [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. In addition, chemical patents typically contain a
large number of chemical compounds with a complex structure, which originates
ambiguity if, for example, we aim to link those entities to a reference knowledge
base [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>The ChEMU evaluation lab [7] proposed the chemical named entity
recognition (NER) task and the chemical reaction event extraction (EE) task on a large
corpus of chemical patents.</p>
      <p>
        Language representation models, like Bidirectional Encoder Representations
from Transformers (BERT) [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], have shown state-of-the-art performance across
several natural language processing tasks, including Named Entity Recognition
(NER) and Relation Extraction (RE). The goal of NER is to nd in a given
text the location of named entities and to classify them according to pre-de ned
types. Several works have described the application of BERT to the NER task [6,
9]. In turn, the goal of the RE task is the detection and classi cation of semantic
relations between two given entities in a text, and BERT has also been applied
to this task [8].
      </p>
      <p>We describe here our approach to Task 1 (NER) and Task 2 (EE) of ChEMU,
which consisted of the application of the BioBERT NER model for Task 1 and
modelling Task 2 as a joint NER + RE task, in which we applied the BioBERT
NER and the BioBERT RE models.
2
2.1</p>
    </sec>
    <sec id="sec-2">
      <title>Methodology</title>
      <sec id="sec-2-1">
        <title>Task 1 - NER</title>
        <p>Data preparation The objective of the task was to recognise named entities
related to chemical reactions in patents and to tag them according to ten di erent
types:</p>
        <p>We used a rule-based tokenizer proposed by one of the BioBERT authors2
which uses regular expressions. We started by tokenizing the text of the
docu2 https://github.com/dmis-lab/biobert/issues/107#issuecomment-615558492
ments belonging to the released train (900 documents) and development (225
documents) sets. Each token was then tagged according to the IOB2 notation.
The separator between each sentence was an empty line. For each set, there was
a le that included all tokens, one per line, and the respective tags. These les
were the input for ne-tuning the model we have used, which is detailed in the
next section. When the test set was released, we applied the same process to the
respective documents.</p>
        <p>Model We used BioBERT [5], which consists of the BERT model pre-trained on
several general corpora (English Wikipedia and BooksCorpus) and additionally
in biomedical-speci c corpora (PubMed abstracts and PMC full-text articles).
The results reported by the authors show that BioBERT achieves better
performance in the NER of biomedical entities in comparison with the classical
implementation of BERT [5].</p>
        <p>We ne-tuned the BioBERT NER model using the les corresponding to the
competition datasets converted to the IOB2 notation, more concretely, 900
documents in the train set and 113 randomly chosen documents in the development
set. We changed the training batch size from 32 to 24 to lower the memory
requirements. To lower the required time for training, we used the pre-trained
weights \BioBERT-Base v1.0 (+ PubMed 200K)", which corresponds to the
smallest vocabulary available for BioBERT. The number of training epochs, the
learning rate and the maximum sequence length were set to the default values,
respectively, 10.0, 1 5 and 128. We did not have time to explore di erent values
for the referred hyper-parameters, so we opted for the default values as it was
the safest approach (with exception of the training batch size).</p>
        <p>Then, we applied the ne-tuned model to recognise the entities and to predict
the respective type in the remaining 112 documents of the development set that
had not been previously used (inference mode). We used the same values for
the hyper-parameters. We developed a module to process the BioBERT NER
output and to generate the respective annotation les according to the BRAT
stando format3. We submitted the resulting annotation les to the competition
page and obtained a F1-score of 0.9524 using the exact matching criterion and
a F1-score of 0.9904 using the relaxed matching criterion. Given these results,
we ne-tuned again the model, but this time using all documents belonging to
the train (900) and the development (225) sets.</p>
        <p>With the release of the test set, we applied the ne-tuned model to the
converted le containing the tokenized text. We maintained the previous values used
in inference mode for all hyper-parameters, with the exception of the maximum
sequence length, which we changed from 128 to 384, due to the presence of longer
sentences in the test set when comparing with the train and the development
sets.
3 https://brat.nlplab.org/standoff.html
2.2</p>
      </sec>
      <sec id="sec-2-2">
        <title>Task 2 - Event extraction</title>
        <p>Data preparation Our approach was to model the Task 2 as a joint NER and
RE task. The goal was to detect trigger words and to recognise arguments
involving trigger words and the entities described in Task 1. We followed a similar
approach for the Task 1 and converted both the documents of the train and
the development sets to the IOB2 format. But in this case, we only considered
the annotations relative to event trigger words, i.e., words associated with
individual steps in the context of the reaction. These event trigger words belonged
to two additional entity types not present in Task 1: \REACTION STEP" and
\WORKUP". Like in the Task 1, for each set there was a le that included all
tokens and the respective tags.</p>
        <p>For the RE part of the task, there were two labels for a relation between an
event trigger words and a chemical entity: \ARG1", to label a relation between
a trigger word and a chemical entity, and \ARGM", to label a relation between
a trigger word an adjunct entity, like temperature, yield or time. First, we
performed sentence segmentation of the text present in the documents of the train
and the development sets and, for each sentence containing at least a trigger
word and an entity, we assumed that it could potentially contain a relation. For
sentence segmentation, we used the same script referred in the Task 1, which
consists of a rule-based model proposed by one of the BioBERT authors. In each
sentence, the trigger word and the entity were replaced, respectively, by the tags
\@TRIGGER$" and \@LABEL$". If the trigger word and the entity were e
ectively part of an argument in the gold standard annotations, the sentence would
be assigned the label \1", otherwise the label would be \0". Besides, if in a given
sentence, for example, there were present a trigger word and two di erent
entities, the sentence would appear in two di erent lines of the nal le, each one
associated with a trigger word - entity pair. At the end, for each set we obtained
a le containing a sentence per line, with the respective relation label and the
tags @TRIGGER$ and @LABEL$ in the correct position.</p>
        <p>Model For the NER step, we ne-tuned the BioBERT NER model using the
les corresponding to the documents of the train (900) and development (225)
sets converted to the IOB2 notation. We used the same hyper-parameter values
for ne-tuning as described in Task 1. The documents of the test set were also
converted into a single le according to the IOB2 notation and the approach was
similar to that of Task 1.</p>
        <p>For the RE step, we considered the les containing the sentences of the train
in the format described above to ne-tune the BioBERT RE model. We used
the pre-trained weights \BioBERT-Base v1.0 (+ PubMed 200K) and changed
the batch size from 32 to 24. The number of training epochs, the learning rate
and the maximum sequence length were set to the default values, respectively,
3.0, 2 5 and 128. We evaluated the ne-tuned model on the development set
and obtained an accuracy of 0.9849. We ne-tuned again the model using all the
sentences in the train and development sets. We applied the ne-tuned model
to predict the relation labels in the converted documents of the test set only
changing the maximum sequence length from 128 to 384. At last, we developed
a module to import the output of the RE model of BioBERT and to determine
the type of the argument: \ARG1" if the relation was between a trigger word
and a chemical entity, \ARGM" if the relation was between a trigger word and
an adjunct entity.
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Results</title>
      <p>The evaluation results for Task 1 (NER) are available in Table 2 and the Table
3 shows the results for the task according to each entity type.</p>
      <p>For Task 2 (EE) we did not obtain any results for the test set, but we obtained
an accuracy of 0.9849 when we applied the BioBERT RE model on the dev set.</p>
    </sec>
    <sec id="sec-4">
      <title>Discussion</title>
      <sec id="sec-4-1">
        <title>Task 1 (NER)</title>
        <p>Overall, the results obtained for this task, both using exact (F1-score of 0.9392)
and relaxed matching (F1-score of 0.9630) criteria were positive. Comparing with
the baseline approach, we obtained a higher F1-score, both considering the exact
matching (+0.0499) and the relaxed matching (+0.0577) criteria. These results
represent the 3rd best position in terms of team results and the 5th best position
in the overall submission rank.</p>
        <p>The good performance of the BioBERT model is due to the fact that it
produces contextualised word representations that consider both the left and the
right contexts of the words. The meaning of the words is usually related with the
context where they appear, i.e., a given word can have two (or more) di erent
meanings in di erent contexts. This is particularly relevant for chemical
compounds, which can have di erent roles according to the reaction (i.e. the context)
in which they participate. The BioBERT NER model obtained higher F1-score
when recognising the entities of the type \YIELD PERCENT", both using the
exact (0.9910) and the relaxed matching (0.9987) criteria. This is related with
the fact that this type of entities always included the character \%" in their
surface form after a numerical value (for example, \53%"), which was an immutable
pattern easily recognisable. In the other hand, the model obtained the lowest
results when recognising the entities of the type \REACTION PRODUCT" using
the exact matching criteria (F1-score of 0.8625) and the entities of the type
\REACTION CATALYST" using the relaxed matching (F1-score of 0.9118).
There was more ambiguity associated with these two types of entities (and also
with the entities of the type \STARTING MATERIAL") since they were related
with chemical compounds, which can have di erent roles. This means that, for
example, the chemical compound \4-nitropyridin-2-amine" can be the reaction
product of a given reaction but in other reaction can participate as the
reaction catalyst or as the starting chemical compound. The BioBERT NER model
was able to correctly recognise almost all entities belonging to these types,
however, the fact that it was originally pre-trained on scienti c articles and general
corpora and not on patents including chemical compounds, prevented an even
higher performance.
4.2</p>
      </sec>
      <sec id="sec-4-2">
        <title>Task 2 (EE)</title>
        <p>The test set was too large (10000 documents) when comparing with the other
sets, and the text of the documents was signi cantly larger too: the average
number of characters present in the documents of the test set was 61002, whereas
in the documents of the train and development sets was 835 and 772, respectively.
This di erence increased the required time to ne-tune and apply our model. Due
to the limited time participants had to submit the results, we were only able to
produce annotations for 1126 documents out of the necessary 10000 comprising
the test set.</p>
        <p>The entities and events to extract were located in the description of chemical
reactions within the patents text. So the inclusion of a module able to detect
the chemical reactions within the text would lter out irrelevant text and,
consequently, would allow a faster application of our approach, which would be
specially relevant for Task 2.</p>
        <p>As it was previously referred, instead of using BioBERT, a model pre-trained
directly over chemical patents text would possibly obtain higher performance in
both tasks.
5</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Conclusion</title>
      <p>
        In Task 1 (NER), we obtained a F1-score of 0.9392 (exact matching) and 0.9630
(relaxed matching), which corresponds, respectively, to an increase of 0.0499
and 0.0577 over the baseline performance and to the 3rd best performing
system. For Task 2 we were not able to produce results due to the lack of time to
apply our approach over the entire test set. Consequently, our future work will
focus mainly on the resolution of the problems associated with the poor
performance in this task. First, we will explore other RE systems, like for example
\BO-LSTM" [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Second, we will apply a module like Yoshikawa et al. [10] to
extract the speci c snippets describing chemical reactions within the patents text.
The machine learning model (BiLSTM-CRF) proposed by the authors obtained
a signi cantly higher performance in the extraction of chemical reactions
comparing with simpler baseline approaches, including a rule-based model, which we
expect will enhance our approach.
      </p>
    </sec>
    <sec id="sec-6">
      <title>Acknowledgements</title>
      <p>This project was supported by FCT through funding of the DeST: Deep
SemanticTagger project, ref. PTDC/CCI-BIO/28685/2017, and the LASIGE
ResearchUnit, ref. UIDB/00408/2020
5. Lee, J., Yoon, W., Kim, S., Kim, D., Kim, S., So, C.H., Kang, J.:
BioBERT: A pre-trained biomedical language representation model
for biomedical text mining. Bioinformatics 36(4), 1234{1240 (2020).
https://doi.org/10.1093/bioinformatics/btz682
6. Moon, T., Awasthy, P., Ni, J., Florian, R.: Towards Lingua Franca Named Entity</p>
      <p>Recognition with BERT. Tech. rep. (2019)
7. Nguyen, D.Q., Zhai, Z., Yoshikawa, H., Fang, B., Druckenbrodt, C., Thorne, C.,
Hoessel, R., Akhondi, S.A., Cohn, T., Baldwin, T., Verspoor, K.: ChEMU: Named
entity recognition and event extraction of chemical reactions from patents.
Lecture Notes in Computer Science (including subseries Lecture Notes in Arti cial
Intelligence and Lecture Notes in Bioinformatics) 12036 LNCS, 572{579 (2020).
https://doi.org/10.1007/978-3-030-45442-5 74
8. Papanikolaou, Y., Roberts, I., Pierleoni, A.: Deep Bidirectional
Transformers for Relation Extraction without Supervision pp. 67{75 (2019).
https://doi.org/10.18653/v1/d19-6108
9. Peng, Y., Yan, S., Lu, Z.: Transfer Learning in Biomedical Natural Language
Processing: An Evaluation of BERT and ELMo on Ten Benchmarking Datasets (2019).
https://doi.org/10.18653/v1/w19-5006, https://www.mendeley.com/catalogue/
2347f426-b409-3772-9174-688480ed2a76/
10. Yoshikawa, H., Nguyen, D.Q., Zhai, Z., Druckenbrodt, C., Thorne, C., Akhondi,
S.A., Baldwin, T., Verspoor, K.: Detecting Chemical Reactions in Patents.
Proceedings of the The 17th Annual Workshop of the Australasian Language
Technology Association (3), 100{110 (2019), https://www.aclweb.org/anthology/
U19-1014</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Akhondi</surname>
            ,
            <given-names>S.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Klenner</surname>
            ,
            <given-names>A.G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tyrchan</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Manchala</surname>
            ,
            <given-names>A.K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Boppana</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lowe</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zimmermann</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jagarlapudi</surname>
            ,
            <given-names>S.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sayle</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kors</surname>
            ,
            <given-names>J.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Muresan</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Annotated chemical patent corpus: A gold standard for text mining</article-title>
          .
          <source>PLoS ONE</source>
          <volume>9</volume>
          (
          <issue>9</issue>
          ), 1{
          <issue>8</issue>
          (
          <year>2014</year>
          ). https://doi.org/10.1371/journal.pone.0107477
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Devlin</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chang</surname>
            ,
            <given-names>M.W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lee</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Toutanova</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          : BERT:
          <article-title>Pre-training of Deep Bidirectional Transformers for Language Understanding</article-title>
          (oct
          <year>2018</year>
          ), http://arxiv. org/abs/
          <year>1810</year>
          .04805
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Hu</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cinciruk</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Walsh</surname>
            ,
            <given-names>J.M.</given-names>
          </string-name>
          : Improving Automated Patent Claim Parsing: Dataset, System, and
          <string-name>
            <surname>Experiments</surname>
          </string-name>
          (
          <year>2016</year>
          ), http://arxiv.org/abs/1605.01744
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Lamurias</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sousa</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Clarke</surname>
            ,
            <given-names>L.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Couto</surname>
            ,
            <given-names>F.M.:</given-names>
          </string-name>
          <article-title>BO-LSTM: Classifying relations via long short-term memory networks along biomedical ontologies</article-title>
          .
          <source>BMC Bioinformatics</source>
          <volume>20</volume>
          (
          <issue>10</issue>
          ),
          <volume>1</volume>
          {
          <fpage>12</fpage>
          (
          <year>2019</year>
          ). https://doi.org/10.1186/s12859-018-2584-5
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>