<!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>I. Segura-Bedmar)
orcid:</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Exploring Deep Learning for Named Entity Recognition of Tumor Morphology Mentions</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Gema de Vargas Romero</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Isabel Segura-Bedmar</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Computer Science Department, Universidad Carlos III de Madrid (UC3M)</institution>
          ,
          <addr-line>Leganés, 28911, Madrid</addr-line>
          ,
          <country country="ES">Spain</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2020</year>
      </pub-date>
      <volume>000</volume>
      <fpage>0</fpage>
      <lpage>0002</lpage>
      <abstract>
        <p>This paper describes the development of a Named Entity Recognition (NER) system to automatically detect tumor morphology mentions in medical documents, known as ICD-O codes, International Classiifcation of Diseases for Oncology. This study is developed as part of the Cantemist program of the Plan of Advancement of Language Technologies (Plan TL). This work tries to contribute to the existing NER technologies that focus on Spanish health-related documents. This is a necessary task given the amount of research, regarding the health sector, that is written in Spanish and the benefits it could bring to the medical environment. In fact, since most NER techniques are developed for English, this research cannot be completely exploited. In this research, we explore diferent machine learning techniques such as CRF, a Bidirectional Long short-term memory (Bi-LSTM) and a Bidirectional Encoder Representations from Transformers (BERT) to address the task of detecting tumor morphology mentions from clinical texts written in Spanish.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Named Entity Recognition</kwd>
        <kwd>BiLSTM</kwd>
        <kwd>BERT</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Natural Language Processing (NLP) has become vital since the amount of information to which
people have access nowadays cannot be easily managed. To solve this, NLP ofers tools that vary
based on the intention of the user, such as translating, summarizing or extracting information
from a text. [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] Named Entity Recognition (NER) is a specific Natural Language Processing
(NLP) task that focuses on information extraction.
      </p>
      <p>
        Focusing on NER, there are currently many technologies that achieve state-of-the-art
performance. However, there are two key aspects that force to keep developing in this field. On the
one hand, the performance of NER systems is dependent on the domain. As a result, this makes
it necessary to construct domain specific NER systems. In fact, this task becomes crucial in the
medical domain given the amount of research in this field and the advantages it could bring to
patient diagnosis, prognosis and further research. [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]
      </p>
      <p>On the other hand, despite the generalization that some NER systems can achieve, the
performance of the systems is also dependent on the language it was built for. Therefore, this
makes it necessary to build systems specific for the diferent languages. For instance, focusing on
Spanish, there is a huge amount of biomedical research written in this language. However, since
most NER techniques are developed for English, this research cannot be completely exploited.</p>
      <p>
        Disease recognition and normalization in medical texts is a challenging task given the
variability and complexity of the disease mentions. Currently, the main technique followed in this
context is the clinical coding, which consists in the collection of codes regarding the taxonomy
of a disease, signs, symptoms and medical procedures. These are standard codes provided by
the ICD10, International Classification of Diseases (CIE10 in Spanish). In particular, the ICD-O
codes (CIE-O-3.1 in Spanish), International Classification of Diseases for Oncology, allows to
code tumor morphology mentions in health-related documents written in Spanish. [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]
      </p>
      <p>
        Under this context, this study proposes a NER system to automatically detect tumor
morphology mentions in a medical document. It is developed as part of the Cantemist track [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ],
which is sponsored by Plan de Impulso de las Tecnologías del Lenguaje (Plan TL) and is part of
the IberLEF 2020 evaluation campaign. The Cantemist track is organized into 3 subtasks:
1. NER which consists on finding tumor morphology mentions;
2. NORM which involves finding tumor morphology mentions and assigning an ICD-O code;
3. CODING which consists on assigning an ICD-O code to documents.
      </p>
      <p>We focus on the NER task. This way, it will aim at constructing a system to identify tumor
morphology mentions in the corpus provided by the Cantemist organizers and contribute to
the existing NER technologies and resources that focus on Spanish health-related documents.
Our study explores three diferent machine learning approaches: 1) CRF classifier as baseline, 2)
Bidirectional Long short-term memory (Bi-LSTM) and 3) Bidirectional Encoder Representations
from Transformers (BERT) to address the task of detecting tumor morphology mentions from
clinical texts written in Spanish.</p>
      <p>This study will be focusing on domain specific NEs, more specifically, on a unique entity
type: “Morfología Neoplasia”.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Related Work</title>
      <p>
        NER aims to identify and categorize words or expressions inside a text that represent entities.
NER systems must confront many challenges such as the construction of a generic entity tagger
given the variability of the entity set among diferent domains, the diversity of languages and
the ambiguity within each of them [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], the dependency on the quality of the annotations and
the existence of infrequent entities.
      </p>
      <p>
        Two key aspects in NER systems are to employ context information in the identification of
entities and assume inter-dependency between the words in the text. [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]
      </p>
      <p>
        Since entities can be words or phrases, they are usually labeled following the IOB format,
where every token that conforms an entity is assigned a tag ‘I’, ‘O’ or ‘B’ based on its location,
followed by the entity type. In fact, the IOB format stands for “Inside, Outside, Beginning”.
Therefore, if a token is at the beginning of an entity, it will be labeled as “B”, as “I” if the token
is inside an entity and as “O” if the token is not part of an entity. [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]
      </p>
      <p>Along the years, several approaches have been employed to address the NER task. The main
approaches include:</p>
      <sec id="sec-2-1">
        <title>1. Rule-based;</title>
      </sec>
      <sec id="sec-2-2">
        <title>2. Unsupervised learning;</title>
      </sec>
      <sec id="sec-2-3">
        <title>3. Feature based supervised learning;</title>
      </sec>
      <sec id="sec-2-4">
        <title>4. Deep learning.</title>
        <p>
          Rule-based It is based on hand-crafted rules, that can be either semantic or syntactic. This
approach does not require annotated data and is highly dependent on the domain and can rely
on dictionaries. It usually provides high precision but with a low recall.[
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]
Unsupervised learning It involves training unsupervised methods without using labeled
data. The main unsupervised learning technique employed in NER is clustering. For this, the
system clusters the data into groups based on “context similarity” and assigns them a named
entity by means of “entity extraction”. [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]
Feature based supervised learning This approach involves prior feature engineering to
construct features (usually vectors) that represent each instance (word or sentence). Features
can be word level features or document and corpus features among others. This approach needs
a dataset of annotations, which are used for train a model. In this scenario, the NER task is
considered as a multi-class classification problem, where the variety of entity types conform
the set of classes.
        </p>
        <p>
          Common supervised methods employed in NER are Hidden Markov Models, Decision Trees,
Maximum Entropy Models, Support Vector Machines and Conditional Random Fields. [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]. This
last method, CRF, considers context information and achieves to outperform the previous ones.
[
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] Therefore, we propose CRF as our baseline system.
        </p>
        <p>
          Deep learning The use of deep learning in NER became more common in recent years. As
an advantage to previous techniques, the extraction of features is learned automatically by the
model, without complex feature engineering. This is done by stacking various layers in the
neural network, where diferent abstractions of the data are obtained. Another advantage of
deep learning is the use of non-linear activation functions that allow to learn more complex
features. [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]
        </p>
        <p>
          As previously mentioned, NER is a challenging task for various reasons such as the variability
of the entity sets among diferent domains and the dependency on the quality of the annotations.
However, when it comes to the biomedical domain, the NER task becomes even more challenging
given the domain specific terminology, the use of acronyms or abbreviations and non-standard
terms. Furthermore, Bio-NER systems are afected by the lack of comprehensive biomedical
entities dictionaries. [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]
        </p>
        <p>
          Many studies have shown that the combination of a Bidirectional Long short-term memory
(BiLSTM) followed by a CRF achieves state-of-the-art performance in NER [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]. Zhai et al. [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]
made a comparison of various systems combining deep learning models such as Bidirectional
Long short-term memory (Bi-LSTM) and Convolutional Neural Network (CNN) to recognize
chemical and diseases mentions. To initialize the deep learning networks, the author used a
Word2Vec word embedding model trained over MEDLINE abstracts. The authors employed the
BioCreative V CDR corpus [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ], which is a manually annotated dataset. 1,965 disease entities,
1,467 chemical entities and 1,038 chemical disease relations (CDRs) were employed in the
training dataset. Moreover, 1,865 disease entities, 1,507 chemical entities and 1,012 CDRs were
employed in the development dataset. Finally, 1,988 disease entities, 1,435 chemical entities
and 1,066 CDRs were employed in the test set. [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] Focusing on the tasks of disease recognition,
the best performance (F1=83.01%) was provided by a hybrid architecture combining a Bi-LSTM
with a CRF classifier a CNN initialized with character embedding. [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]
        </p>
        <p>
          Wei et al. [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ] proposed various systems for disease named entity recognition combining
Conditional Random Fields (CRF) and Bidirectional Recursive Neural Network (Bi-RNN). For
this purpose, the authors also employed the BioCreative V CDR corpus [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]. They found that the
best performance (F1=82.88%) was obtained when combining the results of a Bi-RNN with the
CRF based model through a Support Vector Machine (SVM). On the one hand, the Bi-RNN was
trained using pre-trained vectors on a PubMed corpus. On the other hand, the CRF-based model
employed input features such as PoS tag, word shape, prefix and sufix among others [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ].
        </p>
        <p>
          Moreover, Choo and Lee [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ] proposed a system, CLSTM (Contextual LSTM with CRF) that
focuses on "capturing local context information based on n-gram characters" and employs word
embeddings. The system was evaluated over three biomedical corpora: the National Center for
Biotechnology Information (NCBI) [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ], the BioCreative II Gene Mention (GM) corpus [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ], and
the BioCreative V [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] corpus. Their analysis showed that, focusing on a strict entity matching,
the CLSTM system trained using word and character embeddings achieved the best performance
(F1=86.44%) over the BioCreative V corpus. Regarding the results over the BioCreative V corpus,
CLSTM with word level embedding and CLSTM with Character level embedding achieved
F1 scores of 86.36 and 85.92 respectively, followed by GRAM-CNN (F1=85.79%), BERT [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ]
(F1=85.72%), BiLSTM-CRF (F1=85.50%) and BiLSTM (F1=81.88%) [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ].
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Methods</title>
      <sec id="sec-3-1">
        <title>3.1. The Cantemist corpus</title>
        <p>
          The Cantemist corpus [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ] is formed by 3,000 clinical cases stored in diferent files. These are
plain text with UTF-8 encoding. Each text file is associated to an annotation file (see Figure 1)
in BRAT format which has been manually annotated by clinical experts. These annotations are
tumor mentions, more specifically, ICD-O codes. The total corpus has been divided into 4 sets;
train set, two development sets and test set. A detailed description of this dataset can be found
in [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ].
        </p>
        <p>
          In the BRAT format, each line represents an entity mention. Each entity annotation includes
an ID (‘T1’, ‘T2’. . . ) where ‘T’ stands for “text bound annotation”, followed by the entity type
(‘MORFOLOGIA NEOPLASIA’), start-end ofsets and the text of the annotation. The start-end
ofset indicates the position within the file of the first and last character in the entity. [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]
        </p>
        <p>
          Entities can be formed by several tokens (words). In fact, the average number of words that
conform each entity is 2. However, the BRAT format in which the annotations are given show
continuous text-bound annotations, where only the start ofset of the first word and the end
ofset of the last word that form the entity are given (see Figure 2). That is why, a pre-processing
stage that involves converting such annotations into discontinuous text-bound annotations has
been applied (see Figure 3). [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]
        </p>
        <p>
          The IOB format is mostly used to tag each token. However, after analyzing the Cantemist
corpus, the presence of nested entities, which are entities embedded in another entity, was
noticed (see Figure 4). On the contrary, those entities that do not appear in various annotations
are known as flat entities. To solve this problem, we have used an extension of the IOB format,
the BIOES-V format. [
          <xref ref-type="bibr" rid="ref6">6, 13</xref>
          ] This way, if the entity is a single token entity it will be labeled as
"S" and “V” if the token is part of a nested entity. To preprocess the texts and represent their
tokens with the BIOES-V format, we have used Spacy, a popular library for NLP. Spacy allows
us to perform several tasks such as sentence splitting, tokenization and PoS tagging.
        </p>
        <p>Regarding the training dataset, over which the following methods will be trained, the
distribution of tokens belonging to each BIOES-V tag is presented in Table 1. Table 1 also includes
the distribution of tokens of the test set.
Figure 5 shows the main preprocessing tasks involved in our study.</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. Machine Learning models</title>
        <p>As baseline, we propose the use of a CRF classifier, a type of probabilistic discriminative model
which aims to predict an output variable while giving huge relevance to the sequence of
predictions. The main diference with generative models is that these rely on strict dependency
assumptions, whilst this discriminative model relaxed such assumptions. This way, it can employ
features where it exists a dependency. Until the implementation of deep learning methods, CRF
provided the best performance in NER tasks among machine learning methods.</p>
        <p>
          CRF models the conditional distribution p(y|x), which is the probability of label sequences
given observation sequences and follows the formula below. [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]
        </p>
        <p>
          1
  ( )
 
 =1  =1
  ( | ) =
exp (∑
∑     (  −1,   ,   )),
normalization factor defined as follows. [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]
the transition from state   −1 to state   , being   −1 and
        </p>
        <p>Here,   represents the parameters of the distribution and  
is the function that defines
the sequences’ labels.  
is the
  ( ) = ∑ exp (∑</p>
        <p>∑     (  −1,   ,   )),</p>
        <p>=1  =1</p>
        <p>The training of the model involves working with sentences as the input sequence. In addition,
for every token in a sequence, the model needs as parameters, the position of the current token,
 
its PoS (Part of Speech) tag, the BIOES-V label of the current token and the label of the previous
token. This way, context information is also being considered. [14]</p>
        <p>We also implement a BiLSTM (Long Short-Term Memory) network followed by a CRF classifier.
On the one hand, the LSTM is a type of RNN (Recurrent Neural Network). The main aspect
of these RNNs is that they employ context information, more specifically, information from
past observations, to make predictions over the current observation. [15] In this study, the
observations are tokens from the text that are used as sequential inputs to the network. This
ability to “remember” information is crucial in NER since this is a sequence labelling problem
where there is interdependency between the tokens in the text. However, RNNs sufer from
vanishing gradient problem caused by the increasing amount of information to be “remembered”.
To solve this, LSTMs difer from common RNNs by “forgetting” information and “making space”
for more important one. [15] In addition, the implementation of a bidirectional LSTM becomes
more appropriate when working with NER since it allows not only to remember information
from past observations but also to consider future information. This is achieved by employing
two independent LSTM processes working in opposite directions. As a result, the final layer
(a CRF classifier) in the network receives two vectors, the outputs of the two LSTMs layers,
as an input. Then, the CRF considers the label predicted for the previous observation in order
to predict the label of the current one. This behavior is necessary in an NER task given the
interdependency between tokens. We have implemented three diferent approaches based on
BiLSTM-CRF.</p>
      </sec>
      <sec id="sec-3-3">
        <title>Approach 1: BiLSTM-CRF with random initialization of vectors It consists on creating</title>
        <p>
          a word vocabulary from the words present in the training dataset and map each word to a
numeric vector of 40 components. It must be mentioned that the length of each sentence is
being set to a fixed size, 75. Then, it assigns a random vector for each token in the vocabulary.
Unfortunately, it does not capture relationships or similarities between tokens. In addition, it
may occur that certain tokens in the test dataset do not appear in the training dataset. Therefore,
regardless of the similarity of these tokens to others in the vocabulary, these tokens will be
mapped to the value that identifies the “Unknown” label. [15]
Approach 2: BiLSTM-CRF with a pre-trained word embedding in Spanish Word
embedding is a technique that consists on representing words in a vocabulary as vectors of real
numbers while capturing semantic and syntactic information. [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] However, word embeddings
are not able to capture other features such as PoS tags. Among word embedding methods it
can be found Word2Vec[16], which is a neural network-based model, and can be implemented
using two diferent algorithms; Continuous Bag of Words model (CBOW) and Skip-gram model
(SG). Other word embedding methods are Global Vector (GloVe)[17] and fastText[18]. The main
disadvantage of using word embeddings is that there may be words in the test set that are not
represented in the initial vocabulary. These are out-of-vocabulary words (OOV). For this study,
the pre-trained word embedding employed is the Scielo + Wikipedia health cased skip-gram
model developed by Plan TL [19]. This model was trained using FasText implementation over a
corpus created as a combination of the SciELO database, which contains articles in Spanish,
English and Portuguese, and a health-related subset of Wikipedia that includes Pharmacology,
Pharmacy, Medicine and Biology related documents. A very common pre-trained word
embedding model employed in NLP tasks in Spanish is the Spanish Billion Words Corpus and
Embedding, SBWCE. [20] However, given the specificity of the domain subject of this study, the
Scielo + Wikipedia health cased skip-gram model [19] seems more appropriate since it contains
specific medical terms that may be found in the Cantemist corpus. Thus, this approach involves
representing each token in the training dataset as a 300-element numeric vector using the
vocabulary from the pre-trained Scielo + Wikipedia health cased word embedding model. Also,
this approach also involves fixing the parameter that defines the maximum sentence length to
75.
        </p>
        <p>Approach 3: BiLSTM-CRF with character embedding This technique implements the
pre-trained word embedding explained in approach 2. As a novelty from the previous approach,
it represents each character in the words as a vector of a fixed dimension. For this, it performs
character embedding as a previous layer to represent words as characters. This approach is
useful when working with out of vocabulary words (OOV), which are words that do not appear
in the vocabulary that the model was trained with. In sum, this approach combines two feature
representations of the text as inputs to the system. On the one hand, every token in the text is
encoded into a 300-element vector using a vocabulary from a pre-trained word embedding. On
the other hand, every character that conforms a token is encoded using a character vocabulary
also learned from the pre-trained word embedding. This way, this approach considers two fixed
parameters; the maximum sequence length, fixed to 75, and the maximum word length, fixed to
10.</p>
        <p>
          Finally, we also explore the use of Bidirectional Encoder Representations from Transformers
(BERT) [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ]. BERT is a more recent deep learning approach for NLP that has outperformed prior
language models [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ]. The main diference between BERT and other strategies is that BERT
overcomes the limitation of standard language models based on a unidirectional constraint and
allows to consider context information from both directions without the need to employ two
independent LSTMs. [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ]
        </p>
        <p>
          Furthermore, the process of BERT consists of two stages. The first stage is the model
pretraining over unlabeled data and the second stage is approached either by performing feature
based or fine-tuning tasks. [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ] In our work, we employ a pre-trained BERT model and then
perform fine-tuning over it to find the optimal combination of parameters for this specific
NER task. On the bright side, focusing on fine-tuning an already trained model is less time
consuming and has a good generalization since very few parameters have to be learned.
        </p>
        <p>
          Since this task involves working with clinical cases in Spanish, a multilingual cased version
of BERT is employed instead [21]. It has fixed model sizes: L=12, H=768, A=12, and Total
Parameters=110M. Here, L denotes the number of layers (or transformer blocks), H is the hidden
size and A is the number of self-attention heads. This way, the only parameters to focus on
while performing fine-tuning are maximum length (the context or sequence length to consider),
batch size, learning rate and number of epochs. [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ]
        </p>
        <p>In sum, we use an already pre-trained cased text BERT model. Therefore, no preprocessing
steps has been performed over the corpus. Regarding the method’s parameters, the maximum
sequence length has been fixed to 75, as in previous approaches. When it comes to the training
of the model, a batch size of 32, a learning rate of 3e-5 and 3 epochs have been employed. It
must be mentioned that the number of epochs specify the number of times the model goes
through all the data. Therefore, in order to avoid overfitting, this value must not be too large.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Results</title>
      <p>The performance of the models has been evaluated using several metrics. The primary metrics
employed are precision, recall and f1 score. What’s more, it will also be employing micro-average
scores instead of macro-average scores since the number of tokens belonging to each entity
type is imbalanced. The main diference between micro-average and macro-average scores is
that micro average scores are computed jointly for all the entity types whilst the macro average
scores involve computing the metrics individually for each entity type and then combining
them by performing the mean.</p>
      <p>The following methods have been trained using the training dataset and fine-tuned employing
the labeled development datasets. Then, once the optimal parameter combination had been
achieved, the final model has been trained employing the training and development datasets.</p>
      <p>First, we will present and discuss the performance of our approaches by considering their
micro-average results calculated over the BIOES-V tags used to represent our tokens. Finally,
we also present the general results provided by the Cantemist organizers.</p>
      <p>
        First, we propose the CRF classifier, which has shown good performance in literature [
        <xref ref-type="bibr" rid="ref3">3, 14</xref>
        ].
This allows to establish a baseline. Focusing on the performance of the CRF classifier in
identifying tokens that belong to an entity, this baseline method achieved a micro average F1
score 0.74 and 0.77 on the development datasets 1 and 2 respectively. Regarding the test set,
this method has achieved a micro average F1 score of 0.78 as seen in Figure 6.
      </p>
      <p>BiLSTM-CRF with random initialization achieves a micro average F1 score of 0.71 and 0.73 on
the development datasets 1 and 2 respectively, when analyzing its performance in identifying
tokens that belong to an entity. Regarding the test dataset, it has achieved a micro average F1
score of 0.78 as seen in Figure 7.</p>
      <p>BiLSTM-CRF with a pre-trained word embedding in Spanish shows a micro average F1 score
of 0.75 and 0.78 on the training and development datasets 1 and 2 respectively, when analyzing
its performance in identifying tokens that belong to an entity. On the other hand, an f1 score of
0.81 has been obtained over the test dataset as seen in Figure 8.</p>
      <p>BiLSTM-CRF with character embedding obtains a micro average F1 score of 0.75, 0.72 and 0.76
on the training and development datasets 1 and 2 respectively, when analyzing its performance
in identifying tokens that belong to an entity. Regarding the test dataset, it has obtained an F1
score of 0.78 as seen in Figure 9.</p>
      <p>Finally, BERT achieves a micro average F1 score of 0.78 and 0.80 on the development datasets
1 and 2 respectively, when analyzing its performance in identifying tokens that belong to an
entity. Focusing on the test set, it achieved a micro average f1 score of 0.82.</p>
      <p>In short, CRF established a baseline with a micro average f1 score of 0.78. Then, focusing
on the deep learning methods, three strategies that implement a Bidirectional LSTM combined
with CRF have been approached. The first strategy consisted on a random initialization of the
vectors in the vocabulary and did not succeed in defeating the baseline method (see Figure
11). The second BiLSTM-CRF strategy involved a pre-trained word embedding in Spanish for
token representation. It achieved a better performance than the first BILSTM-CRF approach
and baseline approach, CRF, (see Figure 11). The third BiLSTM-CRF strategy consisted on
incorporating a character embedding along with the token representation did not achieve a
better performance than the second approach of BiLSTM-CRF nor the baseline approach (see
Figure 11). Finally, the last deep learning approach to be assessed was BERT. This method
achieved to defeat both the baseline method (CRF) and the previous Bi-LSTM approaches
explored (see Figure 11). Therefore, we can conclude that BERT is the best option to recognize
tumor morphology mentions in clinical texts.</p>
      <p>However, the performance of the models must also be assessed based on the correctly
identified entities in each clinical case. This way, this assessment does not consider if a token
has been correctly identified as part of an entity, but if an entity, which can be formed by
several tokens, has been identified in its complete form. The results of this evaluation have
been captured in Table 2. It shows that the second approach of BiLSTM-CRF initialized with
a pre-trained word embedding model has the best performance among the diferent methods
explored.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Conclusion</title>
      <p>This study has focused on developing a NER system to automatically identify tumor morphology
entity mentions in health-related documents in Spanish. As previously mentioned, it has been
developed under the Cantemist track, from which the corpus employed has been obtained.</p>
      <p>For this purpose, we have explored diferent machine learning approaches such as CRF,
Bi-LSTM and BERT. Although the approaches show very similar performance, we can conclude
that Bi-LSTM with pre-trained word embeddings shows the top F1 (0.797). However, if we study
the micro-average F1 calculated over the BIOES-V format to represent our tokens, we see that
BERT provides better results (micro F1=0.82) than the other approaches.</p>
      <p>As future work, we plan to extend our deep learning models by incorporating semantic
information from biomedical dictionaries (such as entity embeddings). We will also explore
other hybrid deep learning architecture.</p>
    </sec>
    <sec id="sec-6">
      <title>6. Acknowledgments</title>
      <p>This work was supported by the Research Program of the Ministry of Economy and
Competitiveness - Government of Spain, (DeepEMR project TIN2017-87548-C2-1-R) and the Interdisciplinary
Projects Program for Young Researchers at Universidad Carlos III of Madrid founded by the
Community of Madrid (NLP4Rare-CM-UC3M). .
[13] R. M. R. Zavala, P. Martínez, I. Segura-Bedmar, A hybrid bi-lstm-crf model for knowledge
recognition from ehealth documents., in: TASS@ SEPLN, 2018, pp. 65–70.
[14] N. Patil, A. Patil, B. Pawar, Named entity recognition using conditional random fields,</p>
      <p>Procedia Computer Science 167 (2020) 1181–1188.
[15] X. Ma, E. Hovy, End-to-end sequence labeling via bi-directional lstm-cnns-crf, arXiv
preprint arXiv:1603.01354 (2016).
[16] Y. Goldberg, O. Levy, word2vec explained: deriving mikolov et al.’s negative-sampling
word-embedding method, arXiv preprint arXiv:1402.3722 (2014).
[17] J. Pennington, R. Socher, C. D. Manning, Glove: Global vectors for word representation, in:
Proceedings of the 2014 conference on empirical methods in natural language processing
(EMNLP), 2014, pp. 1532–1543.
[18] P. Bojanowski, E. Grave, A. Joulin, T. Mikolov, Enriching word vectors with subword
information, Transactions of the Association for Computational Linguistics 5 (2017)
135–146.
[19] F. Soares, M. Villegas, A. Gonzalez-Agirre, M. Krallinger, J. Armengol-Estapé, Medical
word embeddings for spanish: Development and evaluation, in: Proceedings of the 2nd
Clinical Natural Language Processing Workshop, 2019, pp. 124–133.
[20] C. Cardellino, Spanish billion words corpus and embeddings (march 2016), URL
http://crscardellino. me/SBWCE (2016).
[21] J. Cañete, G. Chaperon, R. Fuentes, J.-H. Ho, H. Kang, J. Pérez, Spanish pre-trained bert
model and evaluation data, in: Practical ML for Developing Countries Workshop@ ICLR
2020, 2020.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>J.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Sun</surname>
          </string-name>
          , J. Han,
          <string-name>
            <given-names>C.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <article-title>A survey on deep learning for named entity recognition</article-title>
          ,
          <source>IEEE Transactions on Knowledge and Data Engineering</source>
          (
          <year>2020</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>A.</given-names>
            <surname>Miranda-Escalada</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Farré</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Krallinger</surname>
          </string-name>
          ,
          <article-title>Named entity recognition, concept normalization and clinical coding: Overview of the cantemist track for cancer text mining in spanish, corpus, guidelines, methods and results</article-title>
          ,
          <source>in: Proceedings of the Iberian Languages Evaluation Forum (IberLEF</source>
          <year>2020</year>
          ),
          <source>CEUR Workshop Proceedings</source>
          ,
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>T.</given-names>
            <surname>Nguyen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Nguyen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Rao</surname>
          </string-name>
          ,
          <article-title>Adaptive name entity recognition under highly unbalanced data</article-title>
          , arXiv preprint arXiv:
          <year>2003</year>
          .
          <volume>10296</volume>
          (
          <year>2020</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>P.</given-names>
            <surname>Stenetorp</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Pyysalo</surname>
          </string-name>
          , G. Topić,
          <string-name>
            <given-names>T.</given-names>
            <surname>Ohta</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Ananiadou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Tsujii</surname>
          </string-name>
          ,
          <article-title>Brat: a web-based tool for nlp-assisted text annotation</article-title>
          ,
          <source>in: Proceedings of the Demonstrations at the 13th Conference of the European Chapter of the Association for Computational Linguistics</source>
          ,
          <year>2012</year>
          , pp.
          <fpage>102</fpage>
          -
          <lpage>107</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>V.</given-names>
            <surname>Cotik</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Rodríguez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Vivaldi</surname>
          </string-name>
          ,
          <article-title>Spanish named entity recognition in the biomedical domain</article-title>
          ,
          <source>in: Annual International Symposium on Information Management and Big Data</source>
          , Springer,
          <year>2018</year>
          , pp.
          <fpage>233</fpage>
          -
          <lpage>248</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Zhai</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. Q.</given-names>
            <surname>Nguyen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Verspoor</surname>
          </string-name>
          ,
          <article-title>Comparing cnn and lstm character-level embeddings in bilstm-crf models for chemical and disease named entity recognition</article-title>
          , arXiv preprint arXiv:
          <year>1808</year>
          .
          <volume>08450</volume>
          (
          <year>2018</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>J.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Sun</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. J.</given-names>
            <surname>Johnson</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Sciaky</surname>
          </string-name>
          ,
          <string-name>
            <surname>C.-H. Wei</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <string-name>
            <surname>Leaman</surname>
            ,
            <given-names>A. P.</given-names>
          </string-name>
          <string-name>
            <surname>Davis</surname>
            ,
            <given-names>C. J.</given-names>
          </string-name>
          <string-name>
            <surname>Mattingly</surname>
            ,
            <given-names>T. C.</given-names>
          </string-name>
          <string-name>
            <surname>Wiegers</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          <string-name>
            <surname>Lu</surname>
          </string-name>
          ,
          <article-title>Biocreative v cdr task corpus: a resource for chemical disease relation extraction</article-title>
          ,
          <year>Database 2016</year>
          (
          <year>2016</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Q.</given-names>
            <surname>Wei</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Xu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>He</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Gui</surname>
          </string-name>
          ,
          <article-title>Disease named entity recognition by combining conditional random fields and bidirectional recurrent neural networks</article-title>
          ,
          <source>Database</source>
          <year>2016</year>
          (
          <year>2016</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>H.</given-names>
            <surname>Cho</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <article-title>Biomedical named entity recognition using deep neural networks with contextual information</article-title>
          ,
          <source>BMC bioinformatics 20</source>
          (
          <year>2019</year>
          )
          <fpage>735</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>R. I. Doğan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Leaman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Lu</surname>
          </string-name>
          ,
          <article-title>Ncbi disease corpus: a resource for disease name recognition and concept normalization</article-title>
          ,
          <source>Journal of biomedical informatics 47</source>
          (
          <year>2014</year>
          )
          <fpage>1</fpage>
          -
          <lpage>10</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>L.</given-names>
            <surname>Smith</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L. K.</given-names>
            <surname>Tanabe</surname>
          </string-name>
          , R. J. nee Ando,
          <string-name>
            <surname>C.-J. Kuo</surname>
            ,
            <given-names>I.-F.</given-names>
          </string-name>
          <string-name>
            <surname>Chung</surname>
            ,
            <given-names>C.-N.</given-names>
          </string-name>
          <string-name>
            <surname>Hsu</surname>
            ,
            <given-names>Y.-S.</given-names>
          </string-name>
          <string-name>
            <surname>Lin</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <string-name>
            <surname>Klinger</surname>
            ,
            <given-names>C. M.</given-names>
          </string-name>
          <string-name>
            <surname>Friedrich</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          <string-name>
            <surname>Ganchev</surname>
          </string-name>
          , et al.,
          <article-title>Overview of biocreative ii gene mention recognition</article-title>
          ,
          <source>Genome biology 9</source>
          (
          <year>2008</year>
          )
          <article-title>S2</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>J.</given-names>
            <surname>Devlin</surname>
          </string-name>
          , M.-
          <string-name>
            <given-names>W.</given-names>
            <surname>Chang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Toutanova</surname>
          </string-name>
          , Bert:
          <article-title>Pre-training of deep bidirectional transformers for language understanding</article-title>
          , arXiv preprint arXiv:
          <year>1810</year>
          .
          <volume>04805</volume>
          (
          <year>2018</year>
          ).
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>