<!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>Understanding Fine-tuned BERT Models for Flood Location Extraction on Twitter Data</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Jane Arleth dela Cruz</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Iris Hendrickx</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Martha Larson</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Centre for Language Studies, Centre for Language and Speech Technology, Radboud University</institution>
          ,
          <country country="NL">Netherlands</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>We address the two subtasks of the Disaster-Related Social Media Data (DisasterMM) Task at MediaEval 2022: flood relevance classification and location extraction for Italian tweets. We demonstrate the ability of BERT-based deep learning models to address these subtasks. We then carry out error analysis, with an emphasis on the location extraction task, and find that our models (1) perform well with limited training data, (2) are robust in handling text with punctuation and special characters, and (3) are capable of detecting phrasal locations that can be expressed in diferent ways and can be very challenging for conventional gazetteer-based approaches.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
    </sec>
    <sec id="sec-2">
      <title>2. Related Work</title>
      <p>
        With the advent of pre-trained language models such as BERT, once a suficient amount of
training data is available for specific NLP tasks, fine-tuning is often employed to address these
tasks successfully [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Furthermore, irrelevant changes in punctuation are correctly ignored
by recent transformer models such as BERT while older RNN-based models were sensitive to
them, making BERT attractive to use on tweet text data that is typically written in an informal
and noisy style [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Zahera [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] employed a fine-tuned BERT model first to filter relevant tweets
during disasters and then to assign these tweets to relevant information types. Also in the
MediaEval task 2020 [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] on labeling Italian tweets related to floods, a pre-trained Italian BERT
model was used as tokenizer [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] and one was used as their classifier [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] where using the classifier
yielded the better performance so we follow this approach.
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. Approach</title>
      <sec id="sec-3-1">
        <title>3.1. Relevance Classification of Twitter Posts</title>
        <p>For RCTP, we employed diferent preprocessing techniques on the RCTP development dataset
like stopword removal and stemming. However, best results were obtained with ‘Clean text’
consisting of lowercased tweet data, removing of whitespace, usernames, URL’s and retweets.
Upon removing duplicate tweets and retweets, 2,524 tweets remained, which were then split in
80%-20% training-validation via stratified sampling. We ran Logistic Regression, Support Vector
Machine (SVM) and Naive Bayes (NB) algorithms with default parameters on the diferent
preprocessed text data.</p>
        <p>
          For the training of our BERT models, we used the Transformer Toolkit [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ]. We used the
BERTbase Multilingual cased model and BERT-based Italian cased model. The BERT-base Multilingual
cased model contains 104 languages, 12-layer, 768-hidden, 12-heads, 110M parameters developed
by Google Research [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ]. The source data for the BERT-base Italian model consists of a recent
Wikipedia dump and various texts from the OPUS corpora collection [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ].
        </p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. Location Extraction from Twitter Texts</title>
        <p>
          As the automatic recognition of locations is one of the subtasks of Named Entity Recognition
(NER), it is an obvious choice to evaluate the efectiveness of existing NER tools for this specific
task of recognizing Italian locations mentioned in flood-related tweets. We did not employ any
text preprocessing techniques on the LETT development dataset. We did a train-validation
stratified sampling split of 80%-20%, resulting in 3,146 tweets as training set and 787 tweets
as validation set. We fine-tuned 4 diferent BERT-base models: BERT-base Multilingual Cased,
BERT-base Italian Cased and pretrained NER models called BERT-base NER and WikiNEuRal
Mulitilingual NER, all using the same 3,146 tweets train set. We selected the cased models to
better recognize locations that are proper nouns such as cities, towns, provinces, etc. BERT-base
NER is ready to use for NER, trained to recognize four types of entities and fine-tuned on the
English version of the standard CoNLL-2003 NER dataset [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ] [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ]. WikiNEuRal Multilingual
NER is a BERT model fine-tuned on the recently-introduced WikiNEuRal dataset for Multilingual
NER, it supports 9 languages, including Italian [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ].
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Experimental Results</title>
    </sec>
    <sec id="sec-5">
      <title>5. Error analysis on validation set</title>
      <p>On Punctuations and Special Characters
We observed that all our BERT-base models are very robust against punctuations and special
characters (periods, commas, hashtags, colons, ellipses, and others), which is useful as the tweet
text format is unstructured. Although the BERT-base Italian Cased model had the lowest error
rate at 0.038 when considering all special characters, it has a high error rate on other special
characters (- ! " ()) at 0.142. Hence, we select the WikiNEuRal Multilingual NER having an error
rate of 0.04 as the better choice when we want to catch all locations with special characters.</p>
      <p>Learning from limited training
We can confirm that our models were able to generalize street names when we investigated
into the training data. Not only can our models capture street name tokens such as "#SS340",
"A51", and "SS36", it was also able to predict these streets as "B-LOC" of phrasal locations. Here
we show an example:
(1)</p>
      <p>SS36 Del Lago Di Como E Dello Spluga</p>
      <p>B-LOC I-LOC I-LOC I-LOC I-LOC I-LOC I-LOC I-LOC
However, there is still room for improvement. "Faro#Fiumicino," was annotated as "B-LOC" in
the dataset, but were annotated as "O" by all the models. "Faro#Fiumicino," seems to be a flight
route from Faro in Portugal to Fiumicino in Italy, making this specific token ambiguous. Our
models were also not able to detect a very specific long location phrase "Tronco Maestro del
Bacchiglione" which is a branch of the river Bacchiglione. Instead, all models predicted only the
word "Bacchiglione" as a location.</p>
      <p>Going beyond the gazetteer
We want to confirm whether deep learning can detect locations above and beyond what can
be detected by a simple, transparent, gazetteer-based approach. Our error analysis revealed
that one place in which BERT has an advantage over gazetteer-based approaches is locations
that consist of multiple words (“phrasal locations”), which are highly variable and would be
dificult to find in a gazetteer or include in a fixed vocabulary. Take for example "Milano". In
our validation set, it appears 61% of the time as "B-LOC" and 33% as "I-LOC" (ínside a phrasal
location) and 6% as "O". WikiNEuRaL NER and BERT-based Multilingual predicted all of these
instances correctly.</p>
    </sec>
    <sec id="sec-6">
      <title>6. Outlook</title>
      <p>We are particularly interested in considering the fit between the ground truth of the DisasterMM
task and possible real-world applications of the technology for disaster management. Here, we
mention two aspects of the ground truth that we discovered while carrying out the task that
would be interesting to address in the future.</p>
      <p>First, we observed some inconsistencies in the annotations. For example, we observed in the
ground truth that "Toscana" appeared 69 times in the validation set, 48 annotated as "B-LOC"
(location) and 21 annotated as "O" (not location). Examples of the mismatches are:
Both occurrences of Toscana were annotated as Not Location: Allerta meteo Toscana
- 05/04/2017 12:00 - Regione Toscana - https://t.co/NwsxgzAAiK https://t.co/6Rli3ttdfs
Both occurrences of Toscana were annotated as Location: Allerta meteo Toscana
14/06/2017 02:00 - Regione Toscana - https://t.co/NwsxgzAAiK https://t.co/VrQtOuYV7J
We infer that these were annotation errors: "Toscana" should be location. All of our models
tag "Toscana" as "B-LOC" in all instances, meaning that some of the errors our model makes
might not be actual errors. Other possible inconsistencies are "Bacchiglione...", "vicentino:",
"Roma." and "Incrocio" (Eng. “intersection”).</p>
      <p>Second, we observe that there are some location-related entities in the data set that are not
annotated as locations, but would be important in the context of flood disaster management.
Specifically, flooding events will often refer to rivers, and valleys crucial locations, but do
not appear to be included in the definition of the location used to annotate the data. These
events do not have a single location in terms of latitude and longitude. However, there is no
principled reason for which they cannot be considered locations, since roads are annotated
as locations in the dataset. The conventional datasets used to train NER tools are based on
standard news articles that usually refer to cities and country names. Future work should focus
on designing annotation protocols with experts that annotate all location- related entities that
could possibly be relevant for flooding. Looking towards real world applications, we intend
to improve our methodology to better detect specific phrasal locations for decision support in
disaster management.</p>
      <p>Acknowledgments This work is partly financed by the Dutch Research Council (NWO)
with project number NWA.1292.19.399.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>S.</given-names>
            <surname>Andreadis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Bozas</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Gialampoukidis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Moumtzidou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Fiorin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Lombardo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Mavropoulos</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Norbiato</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Vrochidis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Ferri</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Kompatsiaris</surname>
          </string-name>
          ,
          <source>DisasterMM: Multimedia Analysis of DisasterRelated Social Media Data Task at MediaEval</source>
          <year>2022</year>
          , in: Proceedings of the MediaEval 2022 Workshop, Bergen, Norway and Online,
          <year>2023</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>J.</given-names>
            <surname>Devlin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</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>
          ,
          <article-title>BERT: pre-training of deep bidirectional transformers for language understanding</article-title>
          , CoRR abs/
          <year>1810</year>
          .04805 (
          <year>2018</year>
          ). URL: http://arxiv.org/abs/
          <year>1810</year>
          .04805. arXiv:
          <year>1810</year>
          .04805.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>A.</given-names>
            <surname>Ek</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.-P.</given-names>
            <surname>Bernardy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Chatzikyriakidis</surname>
          </string-name>
          ,
          <article-title>How does punctuation afect neural models in natural language inference</article-title>
          ,
          <source>in: Proceedings of the Probability and Meaning Conference (PaM</source>
          <year>2020</year>
          ),
          <article-title>Association for Computational Linguistics</article-title>
          , Gothenburg,
          <year>2020</year>
          , pp.
          <fpage>109</fpage>
          -
          <lpage>116</lpage>
          . URL: https: //aclanthology.org/
          <year>2020</year>
          .pam-
          <volume>1</volume>
          .
          <fpage>15</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>H. M.</given-names>
            <surname>Zahera</surname>
          </string-name>
          ,
          <article-title>Fine-tuned bert model for multi-label tweets classification</article-title>
          , in: Text Retrieval Conference,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>S.</given-names>
            <surname>Hicks</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Jha</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Pogorelov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. G. S. D.</given-names>
            <surname>Herrera</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Bogdanov</surname>
          </string-name>
          , P.-E. Martin,
          <string-name>
            <given-names>S.</given-names>
            <surname>Andreadis</surname>
          </string-name>
          , M.-
          <string-name>
            <given-names>S.</given-names>
            <surname>Dao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Vargas-Quirós</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Kille</surname>
          </string-name>
          , M. Larson (Eds.),
          <source>Working Notes Proceedings of the MediaEval 2020 Workshop, CEUR Workshop Proceedings</source>
          ,
          <year>2020</year>
          . URL: https://ceur-ws.
          <source>org/</source>
          Vol-
          <volume>2882</volume>
          /.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>N.</given-names>
            <surname>Said</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Ahmad</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Gul</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Ahmad</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Al-Fuqaha</surname>
          </string-name>
          ,
          <article-title>Floods detection in twitter text and images</article-title>
          ,
          <source>in: [5]</source>
          ,
          <year>2020</year>
          . URL: https://ceur-ws.
          <source>org/</source>
          Vol-
          <volume>2882</volume>
          /paper34.pdf .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>F.</given-names>
            <surname>Alam</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Hassan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Ahmad</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Gul</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. A.</given-names>
            <surname>Riegler</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Conci</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Al-Fuqaha</surname>
          </string-name>
          ,
          <article-title>Flood detection via twitter streams using textual and visual features</article-title>
          ,
          <source>in: [5]</source>
          ,
          <year>2020</year>
          . URL: https://ceur-ws.
          <source>org/</source>
          Vol-
          <volume>2882</volume>
          / paper35.pdf .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>T.</given-names>
            <surname>Wolf</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Debut</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Sanh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Chaumond</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Delangue</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Moi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Cistac</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Rault</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Louf</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Funtowicz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Davison</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Shleifer</surname>
          </string-name>
          , P. von Platen, C. Ma,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Jernite</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Plu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Xu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T. Le</given-names>
            <surname>Scao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Gugger</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Drame</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Lhoest</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Rush</surname>
          </string-name>
          , Transformers:
          <article-title>State-of-the-art natural language processing</article-title>
          ,
          <source>in: Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations</source>
          ,
          <article-title>Association for Computational Linguistics</article-title>
          , Online,
          <year>2020</year>
          , pp.
          <fpage>38</fpage>
          -
          <lpage>45</lpage>
          . URL: https://aclanthology.org/
          <year>2020</year>
          .emnlp-demos.6. doi:
          <volume>10</volume>
          .18653/v1/
          <year>2020</year>
          .emnlp-demos.
          <volume>6</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>M. D. L. Team</surname>
          </string-name>
          , bert
          <article-title>-base-italian-</article-title>
          <string-name>
            <surname>cased</surname>
          </string-name>
          ,
          <year>2019</year>
          . URL: https://huggingface.co/dbmdz/ bert-base
          <article-title>-italian-cased.</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>D. S.</given-names>
            <surname>Lim</surname>
          </string-name>
          ,
          <year>2020</year>
          . URL: https://huggingface.co/dbmdz/bert-base
          <article-title>-italian-cased.</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>E. F.</given-names>
            <surname>Tjong Kim Sang</surname>
          </string-name>
          , F. De Meulder,
          <article-title>Introduction to the CoNLL-2003 shared task: Languageindependent named entity recognition</article-title>
          ,
          <source>in: Proceedings of the Seventh Conference on Natural Language Learning at HLT-NAACL</source>
          <year>2003</year>
          ,
          <year>2003</year>
          , pp.
          <fpage>142</fpage>
          -
          <lpage>147</lpage>
          . URL: https://www.aclweb.org/anthology/ W03-0419.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>S.</given-names>
            <surname>Tedeschi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Maiorca</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Campolungo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Cecconi</surname>
          </string-name>
          , R. Navigli,
          <article-title>WikiNEuRal: Combined neural and knowledge-based silver data creation for multilingual NER, in: Findings of the Association for Computational Linguistics: EMNLP 2021, Association for Computational Linguistics</article-title>
          , Punta Cana, Dominican Republic,
          <year>2021</year>
          , pp.
          <fpage>2521</fpage>
          -
          <lpage>2533</lpage>
          . URL: https://aclanthology.org/
          <year>2021</year>
          .findings-emnlp.
          <volume>215</volume>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>