<!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>TALP-UPC at eHealth-KD Challenge 2019</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Salvador Medina</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jordi Turmo</string-name>
          <email>turmog@cs.upc.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Relation Extraction eHealth NLP</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Universitat Politecnica de Catalunya</institution>
          ,
          <addr-line>Spain Campus Nord, Carrer de Jordi Girona, 1, 3, 08034 Barcelona</addr-line>
          ,
          <country>Spain Tel.:</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2019</year>
      </pub-date>
      <fpage>78</fpage>
      <lpage>84</lpage>
      <abstract>
        <p>Most eHealth entity recognition and relation extraction models tackle the identi cation of entities and relations with independent specialized models. In this article, we show how a single combined model can exploit the correlation between these two tasks to improve the evaluation score of both, while reducing training and execution time. Our model uses both traditional part-of-speech tagging and dependency-parsing of the documents and state-of-the-art pre-trained Contextual Embeddings as input features. Furthermore, Long-Short Term Memory units are used to model close relationships between words while convolution lters are applied for farther dependencies. Our model was able to get the highest score in all three tasks of IberLEF2019's eHealth-KD competition[7]. This advantage was specially promising in the relation extraction tasks, in which it outperformed the second best model by a margin of 9.3% in F1 Score.</p>
      </abstract>
      <kwd-group>
        <kwd>NERC</kwd>
        <kwd>Embeddings</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        This article describes the model presented by the TALP team for IberLEF2019's
eHealth-KD [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] shared task, which includes the identi cation of relevant
keyphrases and relations among them in Electronic Health (i.e., eHealth) documents
written in Spanish. The task was divided in three scenarios: key-phrase identi
cation and classi cation, relation extraction and full knowledge extraction. Our
model outperformed the rest of competing models in all three scenarios.
      </p>
      <p>
        IberLEF2019's eHealth-KD shared task supersedes and extends previous
year's Taller de Analisis Semantico en la SEPLN 2018's eHealth-KD
(TASS2018's eHealth-KD)[
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] shared task. There are, however, substantial di erences
between both tasks' classes1 and evaluation metrics. Likewise, the task is inspired
by previous competitions such as Semeval-2017 Task 10: ScienceIE [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>
        The models presented for the aforementioned related task incorporate
combinations of several techniques such as Convolutional or Recurrent Neural
Networks, Support Vector Machines, Conditional Random Fields and even
rulebased systems. Our team concurred to the key-phrase classi cation and
relation extraction sub-tasks of TASS-2018's eHealth-KD with a joint CNN -based
model[
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], which ranked in rst place for the relation extraction sub-task. The
model did not support key-phrase recognition though, as it received pairs of
key-phases as input. Our newly presented model overcomes this limitation by
identifying key-phrases and all their related key-phrases at once.
      </p>
      <p>
        Given the similarity to the aforementioned tasks, we decided to rst try a
model for TASS-2018's eHealth-KD data set and then used the model weights as
an starting point. This idea of transferring some of the weights of a model trained
for a di erent task (transfer-learning ), has been extensively used in low-resource
machine learning tasks such as image classi cation, text analysis, question
answering and more[
        <xref ref-type="bibr" rid="ref6">6</xref>
        ][
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Model</title>
      <p>
        The model takes a document and a token's index and computes the boundaries
and classes of the shortest key-phrase it belongs to, and the relations of every
other entities' tokens to it. Hence, the model should be run for each token of
the input document. This approach is inspired by attention-based translation
models such as Transformer [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], in which the output is successively generated by
running the model for one particular input token at a time.
      </p>
      <p>The joint identi cation model's structure is visually described in Figure 1,
and is composed of a set of shared layers and two independent output layers.
Both output layers share the same structure, a fully connected layer and CRF;
which respectively predict the target token's smallest entity sequence and each
other token's relation to it. The core of the shared layer contains a recurrent layer
composed by multiple bidirectional memory units (Either Gated Recurrent Units
or Long-Short Term Memory units) followed by a convolution layer. The RNN
and CNN's outputs are then fed to a fully connected layer with output dropout.</p>
      <p>The recurrent and convolution layers allow for looking to both the local
and global contexts of each input token. The local context is captured by the
RNN Layer's output and the non-pooled convolution layer's output, which are
concatenated for each time-step. The global context is captured by the
maxpooled convolution layer's output. The global context information and the target
token's local context information are added to all time-steps before being fed to
the fully connected shared layer.
1 Two additional key-phrase classes (Predicate and Reference) with their related
relation classes (in-time, in-place, in-context, domain and arg) were added. Moreover,
one relation class was removed (property-of ) and others were added (same-as,
hasproperty, causes and entails)
Ycn Yrn Ycn+1 Yrn+1 Ycn+2 Yrn+2 Ycn+3 Yrn+3</p>
      <p>CRF (Relations)
CRF (Concepts)</p>
      <p>FC FC FC
On+1 On+2
+Concatenate +
m
0.10
saa
í
0.15
sva
o
a
r
0.10 is-a
saitrirspe</p>
      <p>
        The nal outputs are then generated by a Conditional Random Field (CRF)
layer. Output CRF layers have proven to improve the capabilities of GRU and
LSTM networks in low-resource sequence tagging tasks[
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>Fuly-connected</p>
      <p>M
Cn+3 Max-pooling
0.45
0.10
0.85
0.25
0.00
0.00
0.45
caea
ft
0.10
0.45
0.25
0.90
0.15 Subject
0.75 Target
As described in Section 2, the model receives the sequence of tokens of a
document and a token's index and outputs the bounds of the innermost key-phrase
to which the token belongs. These bounds are encoded and decoded by assigning
a Begin, Inside, Unitary and End tag to each token included in that key-phrase
and Out to every other token (BIOUE-tag ). Note that just one key-phrase is
decoded for each token index. Consequently, in order to identify all key-phrases,
the model has to be evaluated for every token.</p>
      <p>We approach relation extraction at the level of tokens. Given a token, the
list of relations' probabilities between the innermost entity to which the token
belongs and each one of the tokens in the document is predicted. Note that
for the source token, we only consider the innermost entity whereas for the
target tokens we consider all parent entities. This restriction is imposed so that
the encoded sequence is not ambiguous. Other alternatives such as source and
target encoding were also considered but ultimately discarded as the increased
decoding complexity did not yield improved results.</p>
      <p>A visual representation of relations' probability predictions is shown in Figure
2. Relations are predicted from the target key-phrase if the aggregated score
inside a key-phrase span surpasses a threshold. Only the key-phrase with the
highest score is selected if multiple key-phrases overlap. A pseudo-code of the
relation decoder is listed below.
Algorithm 1 Relation decoding algorithm
1: procedure decode(is; pc; E; R)</p>
      <p>of class c
2: es innermost entity at index is from E
3: while not done do
4: fet; ptg f ; 0g
5: for e E do
6: p aggregate pci 8i 2 bounds of e</p>
      <p>aggregation function
7: if p &gt; pt ^ p &gt; pth then
8: fet; ptg fe; pg
then
Rc S ffes; et; cgg
0 8i 2 bounds of et
. Relations from token is with probabilities pc</p>
      <p>. Pre-de ned probability
. If probability is above the threshold
. Probabilities in the span are set to 0
. Add relation to the relation set
2.2</p>
      <sec id="sec-2-1">
        <title>Input features</title>
        <p>In section 2 we describe how the model looks at sentences at the token level.
The sentences are rst tokenized, tagged and dependency-parsed by FreeLing.</p>
        <p>We represent each token by a vector, which results from the concatenation
of the features listed below:
{ One-Hot encoding of the category and type elds of the token's
Part-of</p>
        <p>
          Speech Tag from FreeLing's tag-set.
{ Normalized vector encoding the dependencies found in the path between the
token and the target token (the one that is being decoded). It is computed
by adding the one-hot encoding representation of the dependency class for
each hop in the dependency path and normalizing the resulting vector, not
considering its direction. For instance, the representation of the token "I" in
"I eat sh" when the target token is " sh" would be a vector with p2 in the
positions corresponding to "subj" (subject) and "cd" (direct complement);
whereas for "eat" it would be a vector with a single 1 in the "cd" position.
{ One-Hot encoding of the distance between the token and the target token.
{ Contextualized word embedding of the token, computed by extracting the
weights of the last layer of a multi-language, general-purpose pre-trained2
2 We used the BERT-Base, Multilingual Cased model (104 languages, 12-layer,
768-hidden, 12-heads, 110M parameters) from the authors' repository (https://
github.com/google-research/bert)
Bidirectional Encoder Representations from Transformer model (BERT)[
          <xref ref-type="bibr" rid="ref2">2</xref>
          ].
        </p>
        <p>No ne-tuning of the BERT model is done.
2.3</p>
      </sec>
      <sec id="sec-2-2">
        <title>Pre-Training</title>
        <p>
          IberLEF2019's eHealth-KD ' training data-set is arguably small considering the
number of classes and the variability in the examples (3818 concepts and 3503
relations). In order to prevent over- tting and consequently increasing recall, we
opted for using previous years' TASS-2018's eHealth-KD [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ] training and
testing data-sets as a pre-training, transfer-learning step. Transfer-learning in this
case is straightforward, as the two tasks are very similar and our model already
shows positive results for TASS-2018's eHealth-KD 's tasks, as shown in Section
3. However, since output classes for both concept recognition and relation
extraction do not match IberLEF2019's eHeath-KD, the output layers' weights are
discarded after the pre-training phase.
3
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Evaluation and results</title>
      <p>The presented model was evaluated for tuning of hyper-parameters for using
the provided development data-set. For this, we used the evaluation metrics and
scripts provided by the challenge's organizers3. For more information about the
data-set please refer to the tasks' overview paper.</p>
      <p>In addition to this evaluation, we also evaluate the model learned in the
pretraining step using TASS-2018's eHealth-KD 's testing data-set. For the sake of
comparison, we also use the author's evaluation metrics and scripts and contrast
the results to the challenge's contestants4.</p>
      <p>Table 1 shows the relevant evaluation metrics of TASS-2018's eHealth-KD 's
best-performing models for the three scenarios, compared to the presented model
(Joint-RCNN ). The joint identi cation model clearly outperforms our previous
model (talp) in all metrics, also beating the rest of the participants in sub-tasks B
and C. In line with the original task's results, rriveraz 's model shows impressive
results and surpasses our model in black-boxed sub-task A by a margin of 4:1%
in F1 score, which ranks in second position.</p>
      <p>Table 2 shows the shared task's nal evaluation results. Our model ranked
in rst position for all three evaluation scenarios. The largest advantage resides
in the relation extraction task, as it outscores the second runner by a margin
of 9:6% in F1 score. After the competition was closed, we found that our model
was outputting invalid combinations of key-phrase classes and relation classes.
x-relations shows the evaluation of the xed model.
3 IberLEF2019's eHealth-KD data-set and evaluation scripts were downloaded from
https://github.com/knowledge-learning/ehealthkd-2019.
4 TASS-2018's eHealth-KD data-set and evaluation scripts were downloaded from
https://github.com/TASS18-Task3/data.
In this article we have presented a joint concept and relation identi cation and
classi cation model that exploits the mutual information between the entities
and their relations by using a single network that looks at both local and global
textual features. This newly presented model signi cantly outperforms all other
competing models in both TASS-2018's eHealth-KD and IberLEF2019's
eHealthKD shared tasks.</p>
      <p>We hypothesize that the fact that the model shares both structure and
weights allows the full model to more accurately capture the synergy between
the two tasks and hence provide better precision and recall than traditional
stepby-step models. In spite of this, the task is still not fully gured out, and we
argue that further experimentation should be done in this line of research. We
identify three noteworthy challenges:
{ Entities and relations are formally very di erent. The rst is usually encoded
as a sequence and the second as a set of one-to-one labels. These two
representations are di cult to combine, so more appropriate encoding is required
to take full advantage of joint models.
{ Optimization functions are also hard to de ne, as they have to balance both
entity recognition and relation extraction, taking into account the di erent
amounts and di culty of instances of both tasks.
{ Depending on the model's structure, the optimization of the model's hidden
layer's parameters for di erent outputs may be mutually opposite. These
hidden layers should be designed to promote reciprocal collaboration between
both objective functions.
5</p>
    </sec>
    <sec id="sec-4">
      <title>Acknowledgements</title>
      <p>Funding: This contribution has been partially funded by the Spanish Ministry
of Economy (MINECO) and the European Union (TIN2016-77820-C3-3-R and
AEI/ FEDER,UE).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Augenstein</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Das</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Riedel</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vikraman</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>McCallum</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Semeval 2017 task 10: Scienceie-extracting keyphrases and relations from scienti c publications</article-title>
          .
          <source>arXiv preprint arXiv:1704.02853</source>
          (
          <year>2017</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>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="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Mart nez Camara</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Almeida Cruz</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          , D az Galiano,
          <string-name>
            <given-names>M.C.</given-names>
            ,
            <surname>Estevez-Velarde</surname>
          </string-name>
          ,
          <string-name>
            <surname>S.</surname>
          </string-name>
          , Garc a Cumbreras,
          <string-name>
            <surname>M.A.</surname>
          </string-name>
          , Garc a Vega,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Gutierrez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            ,
            <surname>Montejo</surname>
          </string-name>
          <string-name>
            <surname>Raez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Montoyo</surname>
          </string-name>
          ,
          <string-name>
            <surname>A.</surname>
          </string-name>
          , Mun~oz, R., et al.:
          <article-title>Overview of tass 2018: Opinions, health and emotions (</article-title>
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Medina</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Turmo</surname>
          </string-name>
          , J.:
          <article-title>Joint classi cation of key-phrases and relations in electronic health documents</article-title>
          .
          <source>Proceedings of TASS 2172</source>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Pan</surname>
            ,
            <given-names>S.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yang</surname>
            ,
            <given-names>Q.</given-names>
          </string-name>
          :
          <article-title>A survey on transfer learning</article-title>
          .
          <source>IEEE Transactions on knowledge and data engineering</source>
          <volume>22</volume>
          (
          <issue>10</issue>
          ),
          <volume>1345</volume>
          {
          <fpage>1359</fpage>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <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>Consuegra-Ayala</surname>
            ,
            <given-names>J.P.</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</article-title>
          <year>2019</year>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Vaswani</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shazeer</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Parmar</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Uszkoreit</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jones</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gomez</surname>
            ,
            <given-names>A.N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kaiser</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Polosukhin</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>Attention is all you need</article-title>
          .
          <source>In: Advances in Neural Information Processing Systems</source>
          . pp.
          <volume>5998</volume>
          {
          <issue>6008</issue>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>