<!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 />
    <article-meta>
      <title-group>
        <article-title>Yunnan-1 at eHealth-KD Challenge 2021: Deep-Learning Methods for Entity Recognition in Medical Text</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Yunnan University</institution>
          ,
          <addr-line>Yunnan</addr-line>
          ,
          <country country="CN">P.R. China</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>The IberLEF eHealth-KD Challenge 2021, held at IberLEF 2021, proposes two subtasks to encourage the development of systems for automatically extracting knowledge from unstructured Spanish eHealth texts. I only participate in subtask A: Entity Recognition. This subtask aims to identify all the entities and their types for the given eHealth documents. This paper describes the system presented by team-Maoqin in the challenge. Several deep learning models are used in plain text documents, such as BERT-CRF, BiLSTM-CRF. Only the best result running in the local has been submitted. But the nal result of my method is indeed very low, with a score of 0.173 (F1), ranking 9th on the leaderboard. Additional work needs to be done to improve the nal result and complete the subtask B: relation extraction.</p>
      </abstract>
      <kwd-group>
        <kwd>eHealth</kwd>
        <kwd>Entity Recognition</kwd>
        <kwd>Deep-Learning Model</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        In recent years, the amount of medical documents produced by the scienti c
community has been increased. Those texts combine many corporates, it is
necessary to extract useful knowledge with automatic methods. Therefore, various
competitions have been held in the past years such as task 7 of SemEval 2018 [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]
and the eHealth-KD challenge at IberLEF 2020 [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. This paper presents the
system description of team-Maoqin in the IberLEF eHealth-KD challenge
subtask A at IberLEF 2021 [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. The purpose of this task is to identify all entities
of a given Spanish document and determining which of the four categories of
"Action","Concept", "Predicate", and "Preference" these entities belong to.
      </p>
      <p>
        The pre-trained and deep learning models have shown excellent performance
in many NLP tasks such as text classi cation, reading comprehension and
question answering [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. So the system uses several deep learning methods. Advanced
methods for named entity recognition (NER) such as BERTbase [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], BiLSTM [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]
have been the main components of the model. Both of these methods add a
CRF [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] layer in that the CRF layer can add some constraints to the last
predicted label to ensure that the predicted label is legal. In the training process of
training data, these constraints can be automatically learned through the CRF
layer.
      </p>
      <p>The rest of this article is arranged as follows. Section 2 introduces the di erent
architectures used by the system. In Section 3, the formal results obtained in the
challenge are introduced. In Section 4, some ideas on improving the quality of
each strategy and some un nished experiments will be shared. Finally, Section
5 introduces the conclusions of this paper and some opinions for future work.
2</p>
    </sec>
    <sec id="sec-2">
      <title>System Description</title>
      <p>
        This part is used to comprehensively describe the model mentioned and how to
process input and output data. Input handling, where I adjust the data format
for use in the model. The description of the structure includes architecture and
parameters set. After getting the prediction result, the result format should
comply with o cial rules.
2.1 Input Handling
The o cial sentence example is shown in gure 1 and the corresponding format
should be predicted as gure 2. The training and development corpora are both
provided in Brat format which consists of an id increasing by row, the entity
type, the next two numbers indicate the span of this entity and the word in
last. If adjacent words belong to the same entity, write them on one line, the
span should be separated by semicolons. The neural network only accepts token
level so the documents will be converted to output the models can use with the
provided txt and ann le. The input le is nally changed into BIO format and
input into the model. Among them, B means beginning, I means inside, and O
means non-entity. This scheme is the most popular in the NER task although it
presents problems when the entity contains discontinuous tokens [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
This section will introduce my models and show their structure. The model
is trained and evaluated on the o cial training set. The training set and the
development set each contains 100 pieces of data, and the test set has 50 pieces.
The models are deep neural networks that receive the input tokens and jointly
emit predictions for several di erent output variables. These predictions can be
classi ed into tokens. All codes are executed on the GPU version of the colab
platform.
      </p>
      <p>BERT-CRF Model The BERT model has performed excellently in many areas
in NLP. The tokens are fed into the BERT model to obtain their contextual
embeddings. These embeddings are passed to a classi cation layer that emits
logits with the prediction about each token being or not an entity of a certain
type. Each entity type has B and I (8 in total) plus O, P AD, SEP , and CLS,
so the input contains a total of 12 labels.</p>
      <p>An early stopping mechanism (stop training when the accuracy drops within
2 consecutive epochs) is set up to prevent excessive invalid training in the
experiment. The max sequence length is 200, the batch size is 4, the amount of hidden
layer is 12, the number of training steps is 500, the number of attention heads
is 12, the learning rate is 0.5, and the dropout probability is 0.1. The activation
function used is ReLU. The best results on the validation set were obtained with
an F1 score of 0.55 ( precision = 0.53, recall = 0.57).</p>
      <p>
        BiLSTM-CRF Model By combining BiLSTM and CRF [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], the model can
consider the correlation between the sequence before and after the sequence like
CRF and have the feature extraction and tting capabilities of LSTM. The whole
model is presented in gure 3.
      </p>
      <p>The input of the model is a word sequence, each word in the sentence is
expressed as a vector, which should include word embedding and character
embedding. And the output is the label predicted by the model for each word,
which is a label sequence. The BiLSTM model is used to generate the emission
matrix, that is, the probability that each word is marked as a certain label. The
emission matrix of the BiLSTM model does not take the constraint relationship
between labels into account. For example, in the BIO system, I can not appear
after O. So the connection order of tags has to restrict, which will be generated
by the CRF model. The CRF model is used to learn the constraint relationship
between labels and generate a transition matrix, which can be understood as the
probability of connecting another tag behind one tag. When the entire model
predicts, it combines the transmission matrix and the transition matrix and uses
the V iterbi decoding algorithm to calculate the label sequence with the highest
score. The whole process is as follows: the text data is input into the LSTM
network, and then into the upper CRF network, and nally, the annotation data
is generated.</p>
      <p>
        In this model, the learning rate is 0.001, the batch size is 5, the dropout is
0.5, the optimization algorithm used is Adam. The best results on the validation
set are obtained with an F1 score of 0.56 ( precision = 0.53, recall = 0.61).
The output of the neural network needs to be converted back to Brat's [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]
format and the annotation schema proposed in the task. Please remind me that
I do not use the o cial ann generator le to get the word span information. I
only predict the entity type, because when the input text has span information,
a little error occurred, so all the span produces from my own code. When getting
the predicted le, then combine the span to get the submit le.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Results</title>
      <p>The results for each method are shown in Table 1. I provide the results on the
development data and the o cially published results on the training data. I have
tried to replace the BERT model with the ALBERT model, but the e ect was
not as good as BERT, so abandoned this idea. The BioBERT-CRF model was
also had been tried, the e ect was similar to BERT-CRF, so it was not been
included in the selection.</p>
      <p>The best performing version of both the BERT-CRF and the BiLSTM-CRF
model is then run on the test set of the eHealthKD corpus. The best score
obtained is from the BiLSTM-CRF model is 0.56 of F1. The BERT-CRF model,
however, obtained an F1 score of 0.55 on the shared task. Even after downloading
my own results, I manually checked the meaning of words with a browser and
checked some entities' span. Most of the entity classi cations are ne. I don't
know why the score is so low.</p>
      <p>All in all, this task is still a long way from being completely completed. Both
the problem of the model and the problem of the task need to be solved in the
future.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Discussion</title>
      <p>Several models were trained and tested in the test set. Using BERT to embed
words can bene t the performance of subtask A. In fact, only by using BERT
representations and linear dense layers, competitive results can be obtained in
the test set. Although the o cial gave us the code to extract the relationship,
I still at the rst step and failed to extract all the relationships. This is a very
simple step, but this is the rst time have done such a task, and this di culty
has not yet been e ectively resolved. Later, due to time constraints, gave up
subtask 2.</p>
      <p>The nal result only scores 0.17, the possible reasons are as follows:
. There is a problem with the evaluation method used locally, which makes
the local score look good.
. The o cial evaluation result is for English plus Spanish, and I only completed
the entity classi cation of Spanish, so the overall e ect is much worse than
that in the local area.
. The span straddling is realized by myself, and something may have gone
wrong.</p>
      <p>. The data number is less.
5</p>
    </sec>
    <sec id="sec-5">
      <title>Conclusions</title>
      <p>This paper describes the participation of team Maoqin in the eHealth-KD
challenge at IberLEF 2021. For one method, the pre-trained BERT model has been
taken as the basic representation. For another method, BiLSTM has been
preferred. The system achieved unsatis ed results in the challenge for o cial
evaluation in subtask A. Due to the colab's time and resources limitation, some
strategies were not achieved. And subtask B: Relation Extraction has not been
completed.</p>
      <p>
        Future work will be done to solve those remainders. More work needs to be
done to improve the performance. Other methods such as transfer learning need
to try. Still, further experimentation is required to understand the impact of the
network's components and how to improve them, which I will explore in future
work. Citing an external corpus may improve the results. The BETO [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] model,
a BERT model pre-trained on Spanish text may improve the results.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Canete</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chaperon</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fuentes</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Perez</surname>
          </string-name>
          , J.:
          <article-title>Spanish pre-trained bert model and evaluation data</article-title>
          .
          <source>PML4DC at ICLR</source>
          <year>2020</year>
          (
          <year>2020</year>
          )
        </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>
          :
          <article-title>Bert: 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 id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Gabor</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Buscaldi</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schumann</surname>
            ,
            <given-names>A.K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>QasemiZadeh</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zargayouna</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Charnois</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Semeval-2018 task 7: Semantic relation extraction and classi cation in scienti c papers</article-title>
          .
          <source>In: Proceedings of The 12th International Workshop on Semantic Evaluation</source>
          . pp.
          <volume>679</volume>
          {
          <issue>688</issue>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Graves</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schmidhuber</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          :
          <article-title>Framewise phoneme classi cation with bidirectional lstm and other neural network architectures</article-title>
          .
          <source>Neural networks 18(5-6)</source>
          ,
          <volume>602</volume>
          {
          <fpage>610</fpage>
          (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Huang</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xu</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yu</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>Bidirectional lstm-crf models for sequence tagging</article-title>
          .
          <source>arXiv preprint arXiv:1508</source>
          .
          <year>01991</year>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>La</surname>
            <given-names>erty</given-names>
          </string-name>
          , J.,
          <string-name>
            <surname>McCallum</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pereira</surname>
            ,
            <given-names>F.C.</given-names>
          </string-name>
          :
          <article-title>Conditional random elds: Probabilistic models for segmenting and labeling sequence data (</article-title>
          <year>2001</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Lopez-Ubedaa</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Perea-Ortegab</surname>
            ,
            <given-names>J.M.,</given-names>
          </string-name>
          <article-title>D az-</article-title>
          <string-name>
            <surname>Galianoa</surname>
            ,
            <given-names>M.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mart</surname>
            n-Valdiviaa,
            <given-names>M.T.</given-names>
          </string-name>
          ,
          <article-title>Uren~a-</article-title>
          <string-name>
            <surname>Lopeza</surname>
            ,
            <given-names>L.A.</given-names>
          </string-name>
          :
          <article-title>Sinai at ehealth-kd challenge 2020: Combining word embeddings for named entity recognition in spanish medical records (</article-title>
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Piad-Mor s</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gutierrez</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Estevez-Velarde</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Almeida-Cruz</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          , Mun~oz, R.,
          <string-name>
            <surname>Montoyo</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Overview of the eHealth Knowledge Discovery Challenge at IberLEF 2021</article-title>
          .
          <source>Procesamiento del Lenguaje Natural</source>
          <volume>67</volume>
          (
          <issue>0</issue>
          ) (
          <year>2021</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Piad-Mor s</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gutierrez</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <article-title>Can~izares-</article-title>
          <string-name>
            <surname>Diaz</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Estevez-Velarde</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , Mun~oz, R.,
          <string-name>
            <surname>Montoyo</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Almeida-Cruz</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>Overview of the eHealth Knowledge Discovery Challenge at IberLEF 2020</article-title>
          .
          <article-title>In: Proceedings of the Iberian Languages Evaluation Forum co-located with 36th Conference of the Spanish Society for Natural Language Processing (</article-title>
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Stenetorp</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pyysalo</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Topic</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ohta</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ananiadou</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tsujii</surname>
          </string-name>
          , J.:
          <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>
          . pp.
          <volume>102</volume>
          {
          <issue>107</issue>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Su</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xu</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Winata</surname>
            ,
            <given-names>G.I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xu</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kim</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fung</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Generalizing question answering system with pre-trained language model ne-tuning</article-title>
          .
          <source>In: Proceedings of the 2nd Workshop on Machine Reading for Question Answering</source>
          . pp.
          <volume>203</volume>
          {
          <issue>211</issue>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>