<!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>Corresponding author.
† These authors contributed equally.
$ corentin.forler@insa-lyon.fr (C. Forler); elod.egyed-zsigmond@insa-lyon.fr (E. Egyed-Zsigmond)</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Studies on Interactive Event Detection and Labeling from Timestamped Texts</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Corentin Forler</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Előd Egyed-Zsigmond</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Institut National des Sciences Appliquées de Lyon (INSA Lyon)</institution>
          ,
          <addr-line>20 av. Albert Einstein, Villeurbanne, 69100</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2022</year>
      </pub-date>
      <volume>000</volume>
      <fpage>0</fpage>
      <lpage>0002</lpage>
      <abstract>
        <p>In this paper we present a work on interactive event detection, visualization and labeling. We started from an unsupervised one-shot event detection system created by A. Guille and A.-C. Favre and modified it to optimize its interactive usage. We also added a new event labeling approach to enable a more meaningful event description for the human users, by selecting representative documents, in addition to the keywords extracted by the original method. The source code of our work is available online at https://github.com/CorentinForler/mabed-interactive-labeling.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;dataset creation</kwd>
        <kwd>event detection</kwd>
        <kwd>event labeling</kwd>
        <kwd>text mining</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>events are described by a set of primary and secondary keywords and a time-based impact score
histogram. This histogram describes, in a way, the life cycle of the event.</p>
      <p>Our work focuses on two extensions of the method of Guille and Favre: its optimization
for an interactive use, and an event labeling by full-text fragments, instead of keywords, for
a better understanding. Indeed, one of the limitations of the original method is the need to
precise the number of events to detect. Our system proposes an interactive interface to adjust
in an assisted manner this number. We also extended the method to detect events from any
timestamped text, not only tweets like the original method. In this paper, we will present our
event detection interface, emphasizing the improvements we made on the original method to
decrease its response time in an interactive event detection use case. We then present our label
extraction approach having as objective selecting the most representative text(s) for a given
event, described by keywords and an impact histogram.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Approach and Implementation</title>
      <p>
        We did a first implementation of the method described in [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], called MABED, using the code
available on GitHub1. The method requires several parameters, such as: the basic time-slice
length (tsl) to consider as atomic2, the number of events to extract (ec), the number of primary
and secondary keywords to extract for each event (kwc). The original method was created
to run once in a command-line environment. We implemented an interactive interface and
optimized its execution to reduce calculation times when changing the parameters.
      </p>
      <sec id="sec-2-1">
        <title>2.1. Dataset</title>
        <p>The chosen dataset is a list of 238 872 news articles, collected using RSS feeds of mainly
economyrelated English language newspapers, spanning from 2020-01-01 to 2020-09-30 (9 months), with
a vocabulary amounting to 25 097 distinct words/tokens. This dataset was then used to extract
50 events, using the following parameters:
• length of each time-slice tsl : 24 hours (1440 minutes)
• number of events to extract ec : 50
• number of keywords to extract kwc : 10</p>
        <p>Once events were computed, the event labeling step was then run. Example events produced
by MABED are:
• Event 1
– Begin/End date : 2020-03-16 – 2020-06-04
– Impact over time :
– Main terms : global, pandemic, health, due, covid-19, amid, economic
1https://github.com/AdrienGuille/pyMABED
2The tsl parameter controls the temporal precision of the algorithm, because the input dataset is split into time-slices
of equal duration of tsl hours (or minutes, seconds,... unit to choose).</p>
        <p>– Related terms : package, trillion, ministry, postponed, impact, closed, concerns,
confirmed, demand, deaths
– Human-made description : On March 25, 2020, the U.S. Senate passed a $2 trillion
coronavirus economic relief package.
– Selected article : U.S. senators were set to vote on Wednesday on a $2 trillion
bipartisan package of legislation to alleviate the devastating economic impact of the
coronavirus pandemic.
• Event 33
– Begin/End date : 2020-03-13 – 2020-07-29
– Impact over time :
– Main terms : order, gov
– Related terms : andrew, issued, cuomo, stay-at-home, executive, businesses, spread,
york, court, health
– Human-made description : On March 20, 2020, New York governor Andrew</p>
        <p>Cuomo announced a stay-at-home executive order. It ended on May 15, 2020.
– Selected article : New York Gov Andrew Cuomo is ordering all workers in
nonessential businesses to stay home and banning gatherings statewide.</p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2. User interface</title>
        <p>
          We created a new user interface for the method provided in [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]. Ours is composed of three
parts, and is based on a client-server architecture, where the front-end uses JavaScript libraries
such as D3.js and billboard.js, and the back-end uses Python 3 and the Flask web server
framework. We added a web-form in order to change the parameters.
        </p>
        <p>A simple form is shown to the user. While the event detection algorithm can be adjusted
with various parameters, most of them could be dificult to explain in the interface, and some
are only used to fine tune the results. Therefore, we chose to emphasize three parameters: the
duration of each time-slice, the number of events to detect, and the maximum number of words
to describe an event.</p>
        <p>The form is shown on Figure 1. It includes a button to start the computation once the desired
parameters are entered. Below the form, and once a computation is done, the table of events,
depicted in Figure 2, is presented to the user.</p>
        <p>Its first column, titled “Event Terms”, contains main and secondary terms of the event given
by the original algorithm (the two kinds of terms are styled diferently and secondary terms
(in brown) are sorted by decreasing magnitude). The second column, titled “Proposed Articles”,
contains a list of proposed descriptions for each event. Each description can be marked correct
or incorrect by clicking on it, initially being in a neutral state (not shown on Figure 2). Moreover,
each description can be moved up or down among the proposed descriptions of a given event,
efectively allowing the users to rank the descriptions. These behaviors have been added for an
easier data annotation during the experimental evaluation of the system, and won’t be shown
to the final users. The third and last column, titled “Event Impact”, contains a graph showing
the impact of the event over time.</p>
        <p>The user can, at any time, change the values and click on the "Compute results" button to
update the table of events and the graphs. This work on the user interface is supported by a set
of improvements to the original MABED implementation.</p>
      </sec>
      <sec id="sec-2-3">
        <title>2.3. Optimizations and improvements</title>
        <p>Given that our goal is to provide an interactive event visualization service, we had to make
the whole system faster, especially for consecutive runs where few parameters change. While
we added many improvements to the original method, which we are going to present in the
following sections, we mostly improved the response time of the service with a cache system.</p>
        <sec id="sec-2-3-1">
          <title>2.3.1. Cache system</title>
          <p>In the initial MABED implementation, intermediary computations are not permanently stored,
therefore all executions take the same time (when given the same parameters). To allow faster
successive computations, we needed to store the results of these intermediary steps. We designed
a cache system, allowing to keep these results instead of discarding them. For the same dataset
and the same parameters, the computation time is zero, and only the parsing time of the cache
ifles is required. If some parameters change, only the computations that depend on them need
to be carried out again.</p>
          <p>To measure the efect of this optimization, we performed a series of experiments whose
results are presented in Table 1. First, we did three unoptimized runs that do not use the cache
system, labeled “from scratch”. In the initial version of MABED, all runs would have lasted the
same duration as these unoptimized computations.</p>
          <p>Then, we ran a single “Baseline” computation, storing its results in an initially empty cache,
using the following parameters: tsl of 1440 minutes (24 hours), ec of 10 events, kwc of 10
words. The run labeled “Baseline (cached)” shows that running the same computation again,
using the cache, is very fast.</p>
          <p>We then performed three computations, labeled “With cache”, each run with a cache containing
only the results of the Baseline run, potentially reusing intermediary results, each one can be
compared to its corresponding “From scratch” run duration. The runs labeled “—” show the
speed gains when running with other parameter values. The values of parameters are shown in
columns: tsl, ec and kwc.</p>
          <p>With this cache system, computations could be performed of-line , allowing users to change
parameters while benefiting form cached results.</p>
        </sec>
        <sec id="sec-2-3-2">
          <title>2.3.2. Reduced number of file operations</title>
          <p>Another optimization is the reduction of the number of file openings/closures during the
discretization step. Time-slice files were opened and closed for each document, but, after
implementing this optimization, the files are kept open as long as possible thanks to a circular
bufer system (at most 512 files are kept open by the bufer to comply to the limitations imposed
by the operating system, see ulimit open files). On a database composed of 20 000
documents, where 14 time-slices were needed, those files are opened/closed only once, at the
beginning/end of the discretization step, saving 1.5 seconds on the total runtime.</p>
        </sec>
        <sec id="sec-2-3-3">
          <title>2.3.3. Various other improvements</title>
          <p>• Multi-threading to speed up compatible computations
• Automatic CSV format detection (separator, date/time format, column names)
• Compatibility with date-only or date-time timestamps</p>
        </sec>
      </sec>
      <sec id="sec-2-4">
        <title>2.4. Labeling methods</title>
        <p>We noticed that the keywords produced by the original MABED implementation to describe an
event were often dificult to understand, as they covered several contexts. Therefore, we decided
to label events with full-text excerpts (short descriptions of existing press articles) in order to
enable an easier understanding by users. In order to do this we implemented a keyword based
document search method to find the best matching texts according to the keywords generated
to describe the event.</p>
        <p>On the dataset were run 4 diferent methods to find descriptions for the detected events, used
to query and rank potential descriptions (documents taken from the main dataset, for instance)
and pick the best one(s) to describe a specific event.</p>
        <sec id="sec-2-4-1">
          <title>2.4.1. SKC: Simple keyword counting</title>
          <p>With this method, the score of a document is simply the number of event terms that appear at
least once in the document. Repetitions of a word do not increase the score of a document. Let
T, the set of main and secondary terms of the event  ( ∈ T) that are also present in the
document ( ∈ W). The score of a document is:
, = |T,| ∈ [0; 1]</p>
          <p>|T|</p>
        </sec>
        <sec id="sec-2-4-2">
          <title>2.4.2. OKC: Occurrence-based keyword counting</title>
          <p>With this method, the score of a document is the weighted sum of the number of event terms
that appear at least once in the document. Repetitions of a word do increase the score of a
document, but this efect is mitigated by the use of a logarithmic factor. Let , be the count
of occurrences of the event term  in the document . The weight of a term is 1 for the main
terms, and their normalized magnitude for the secondary terms. The score of a document is:
, =
∑︁  · (1 + log (,))
∈T,
2.4.3. BM25: Okapi BM25
BM25 is a ranking function developed in the 1970s used to estimate the relevance of documents
to a given search query. Despite its old age, variants of BM25 are still considered to be
state-ofthe-art. For our experiment, we chose to use the ATIRE BM25 variant, which is often considered
a baseline implementation. This variant is biased towards shorter documents, a drawback which
becomes a desired property when we want concise event descriptions.</p>
        </sec>
        <sec id="sec-2-4-3">
          <title>2.4.4. TE: Text Embedding based ranking</title>
          <p>Using the spaCy Python Natural Language Processing framework, we produced an average
vector embedding for each event based on documents that could describe it. With this average
vector, we can rank each document by its distance to this average embedding (cosine similarity).</p>
          <p>Let V the vector embedding of document . To construct document embeddings, spaCy
computes the average of all the embeddings of the words of the document. Let V the mean
vector embedding of the set of all documents  ∈  that include at least one of the terms of
the event , i.e. documents that could describe the event. The score formula is:
, = cos (︀ V, V)︀ =</p>
          <p>V · V
‖V‖ ‖V‖</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Event labeling evaluation</title>
      <sec id="sec-3-1">
        <title>3.1. Experimental setup</title>
        <p>The goal of our experiment is to evaluate the accuracy of each of the 4 labeling methods we
described in the Section 2.4. Participants ( = 2) were provided with the interface depicted
in Figure 2. They were given a list of 32 events, with 3 proposed descriptions for each. They
were asked, for each full-text description, to indicate whether the proposed text is a correct
description of the event, in their opinion, and rank the description according to its perceived
correctness.</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. Experimental Results</title>
        <p>Based on the human annotators’ answers, we arrive at the results shown in Table 3. The first
column is the name of the event description ranking method being evaluated. The following
four columns present the percentage of correct proposals for which: the first ranked text is
valid, the first ranked text is the best among the 3 presented texts, the top three proposed texts
are valid, and finally the percentage of events for which all 3 proposed text are valid and their
order is correct (the first description being the best, and the third being the least representative).</p>
        <p>The most relevant metrics for our use case are the first two columns (1 st correct, 1st best).
Indeed, they indicate the quality of the first description produced by each method, which would
be the only description shown to end users. As we can see, the best results are given by the SKC
Simple Keyword Counting method, which is also the fastest to run. The Term Embedding
method might need thorougher work to be on par with the other methods.
In this short paper, we presented an ongoing work on event detection optimization and event
labeling 3. We optimized an existing method to be usable in an interactive event visualization
context. We have also tested several event label search methods and were able to select a simple
yet eficient one, that selects an event description taken from the input texts in order to complete
the keywords provided by the baseline method.</p>
        <p>We are currently working on the automatic estimation of the number of events present in
the dataset, as well as on the dynamic estimation of the best value for the time-slice length. The
creation of a larger event detection dataset and a larger scale user evaluation of user proposed
labels are also in our future plans.
3The source code of our work is available online at https://github.com/CorentinForler/mabed-interactive-labeling</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Ding</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Zheng</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Qin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Huang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Shah</surname>
          </string-name>
          ,
          <article-title>A history and theory of textual event detection and recognition</article-title>
          ,
          <source>IEEE Access 8</source>
          (
          <year>2020</year>
          )
          <fpage>201371</fpage>
          -
          <lpage>201392</lpage>
          . doi:
          <volume>10</volume>
          .1109/ACCESS.
          <year>2020</year>
          .
          <volume>3034907</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>K.</given-names>
            <surname>Morabia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N. L. Bhanu</given-names>
            <surname>Murthy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Malapati</surname>
          </string-name>
          , S. Samant,
          <article-title>SEDTWik: Segmentation-based event detection from tweets using Wikipedia, in: Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics</article-title>
          : Student Research Workshop, Association for Computational Linguistics, Minneapolis, Minnesota,
          <year>2019</year>
          , pp.
          <fpage>77</fpage>
          -
          <lpage>85</lpage>
          . URL: https://aclanthology.org/N19-3011. doi:
          <volume>10</volume>
          .18653/v1/
          <fpage>N19</fpage>
          -3011.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>G.</given-names>
            <surname>Jacobs</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Hoste</surname>
          </string-name>
          ,
          <article-title>Extracting fine-grained economic events from business news</article-title>
          ,
          <source>in: Proceedings of the 1st Joint Workshop on Financial Narrative Processing and MultiLing Financial Summarisation</source>
          ,
          <string-name>
            <surname>COLING</surname>
          </string-name>
          , Barcelona,
          <source>Spain (Online)</source>
          ,
          <year>2020</year>
          , pp.
          <fpage>235</fpage>
          -
          <lpage>245</lpage>
          . URL: https://aclanthology.org/
          <year>2020</year>
          .fnp-
          <volume>1</volume>
          .
          <fpage>36</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>G. A.</given-names>
            <surname>Al-Sultany</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H. J.</given-names>
            <surname>Aleqabie</surname>
          </string-name>
          ,
          <article-title>Events Tagging in Twitter Using Twitter Latent Dirichlet Allocation</article-title>
          ,
          <source>International Journal of Engineering &amp; Technology</source>
          <volume>7</volume>
          (
          <year>2018</year>
          )
          <fpage>884</fpage>
          -
          <lpage>888</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>D.</given-names>
            <surname>Kilroy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Caton</surname>
          </string-name>
          , G. Healy,
          <article-title>Finding short lived events on social media</article-title>
          , in: L.
          <string-name>
            <surname>Longo</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          <string-name>
            <surname>Rizzo</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          <string-name>
            <surname>Hunter</surname>
            ,
            <given-names>A</given-names>
          </string-name>
          . Pakrashi (Eds.),
          <source>Proceedings of The 28th Irish Conference on Artificial Intelligence and Cognitive Science</source>
          , Dublin, Republic of Ireland, December 7-
          <issue>8</issue>
          ,
          <year>2020</year>
          , volume
          <volume>2771</volume>
          <source>of CEUR Workshop Proceedings, CEUR-WS.org</source>
          ,
          <year>2020</year>
          , pp.
          <fpage>49</fpage>
          -
          <lpage>60</lpage>
          . URL: http://ceur-ws.
          <source>org/</source>
          Vol-
          <volume>2771</volume>
          /AICS2020_paper_19.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>D.</given-names>
            <surname>Gao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Cai</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Zhang</surname>
          </string-name>
          , Y. Ouyang, Sequential Summarization:
          <article-title>A Full View of Twitter Trending Topics</article-title>
          , IEEE/ACM Transactions on Audio,
          <source>Speech, and Language Processing</source>
          <volume>22</volume>
          (
          <year>2014</year>
          )
          <fpage>293</fpage>
          -
          <lpage>302</lpage>
          . URL: http://dl.acm.org/citation.cfm?id=
          <volume>2584479</volume>
          .2584480. doi:
          <volume>10</volume>
          .1109/ TASL.
          <year>2013</year>
          .
          <volume>2282191</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>A.</given-names>
            <surname>Guille</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Favre</surname>
          </string-name>
          , Event Detection,
          <source>Tracking and Visualization in Twitter: A Mentionanomaly-based Approach</source>
          ,
          <source>Springer Social Network Analysis and Mining</source>
          <volume>5</volume>
          (
          <year>2015</year>
          )
          <volume>18</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>18</lpage>
          :
          <fpage>18</fpage>
          . doi:
          <volume>10</volume>
          .1007/s13278-015-0258-0.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>