<!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>A Game of Lines: Developing Game Mechanics for Text Classi cation</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Giorgio Maria Di Nunzio</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Maria Maistro</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Daniel Zilio</string-name>
          <email>daniel.zilio@unipd.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Dept. of Cultural Heritage</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Dept. of Information Engineering</institution>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>University of Padua</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>In this paper, we describe a set of experiments that turn the machine learning classi cation task into a game, through gami cation techniques, and let non expert users to perform text classi cation without even knowing the problem. The application is implemented in R using the Shiny package for interactive graphics. We present the outcome of three di erent experiments: a pilot experiment with PhD and post-doc students, and two experiments carried out with primary and secondary school students. The results show that the human aided classi er performs similarly and sometimes even better than state of the art classi ers.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        The creation of a labelled dataset for supervised learning is slow and expensive.
In the last years, mixed approaches that use crowd-sourcing and interactive
machine learning [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] have shown that it is possible to create annotated datasets at
a ordable costs [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. One major challenge in motivating people to participate in
these labelling tasks is to design a system that promotes and enables the
formation of positive motivations towards work as well as ts the type of the activity.
In this context, an approach named `gami cation' has become popular. Gami
cation is de ned as \the use of game design elements in non-game contexts" [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ],
i.e. tipical game elements, like rankings, leaderboards, points, badges, etc, are
used for purposes di erent from their normal expected employment.
      </p>
      <p>Nowadays, gami cation spreads through a wide range of disciplines and its
applications are implemented in di erent areas. For instance, an increasingly
common feature of online communities and social media sites is a mechanism
for rewarding user achievements based on a system of badges and points. They
have been employed in many domains, including educational sites like Khan
Academy3, and tourist review sites like Tripadvisor4. At the most basic level,
these game elements serve as a summary of a users key accomplishments;
however, experience with these sites also shows that users will put in non-trivial</p>
      <sec id="sec-1-1">
        <title>3 https://www.khanacademy.org/</title>
      </sec>
      <sec id="sec-1-2">
        <title>4 https://www.tripadvisor.com/</title>
        <p>
          amounts of work to achieve particular badges, and as such, badges can act as
powerful incentives [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ].
        </p>
        <p>
          The use of gami cation in academic research areas has been introduced very
recently and its potential is still to be explored and validated. Information
Retrieval (IR) has recently dealt with gami cation, as witnessed by the GamifIR in
2014, 2015 and 20165. In [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ], the authors describe the fundamental elements and
mechanics of a game and provide an overview of possible applications of
gami cation to the IR process. In [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ], approaches to properly gamify Web search
are presented, i.e. making the search of information and the scanning of results
a more enjoyable activity. Other approaches of game applied to di erent aspects
of IR have been proposed. For example in [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ], the authors describe a game that
turns document tagging into the activity of taking care of a garden, with the
aim of managing private archives.
        </p>
        <p>
          In this paper, we present the recent studies of gami cation in text classi
cation and the development of a Web application written in R with the package
Shiny [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]. This application, initially designed to understand probabilistic
models, has been redesigned as a game to train a text classi er with the aid of non
experts, especially kids from primary and secondary schools, during the
European Researchers' Night in September 2016 at the University of Padua6. We
tested this application with a two-fold goal in mind: i) how the gami cation of a
classi cation problem can be used to understand the `price' of labelling a small
amount of objects for building a reasonably accurate classi er, ii) to analyze
the classi cation performance given the presence of small sample sizes and little
training.
2
        </p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>The Classi cation Game</title>
      <p>
        In this section, we present the re nements of a visualization approach of
probabilistic text classi ers that was transformed into a game. The application was
implemented with the Shiny package in R that allows to build interactive
graphics [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. This two-dimensional representation allows non experts to visually
interact with the algorithm and, at the same time, to gather new training labels.
In this section, we rst describe the mathematical idea that supports the game,
then we describe the rule of the game and how players can interact with the
algorithm.
2.1
      </p>
      <sec id="sec-2-1">
        <title>Math Background</title>
        <p>
          The game is based on the two-dimensional representation of probabilities, also
known as Likelihood Spaces [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ], which is a very intuitive way of presenting the
problem of classi cation on a two-dimensional space (full mathematical details
        </p>
        <sec id="sec-2-1-1">
          <title>5 http://gamifir.com</title>
        </sec>
        <sec id="sec-2-1-2">
          <title>6 http://www.venetonight.it/</title>
          <p>
            can be found in [
            <xref ref-type="bibr" rid="ref5 ref6 ref7 ref8">8, 7, 6, 5</xref>
            ]). Given two classes c1 and c2, an object o is assigned
to category c1 if the following inequality holds:
          </p>
          <p>P (ojc2) &lt; m P (ojc1) +q
| {yz } | {xz }
(1)
where P (ojc1) and P (ojc2) are the likelihoods of the object o given the two
categories, while m and q are two parameters that can be either set
automatically, for example by optimizing a measure of classi cation accuracy, or
semiautomatically by asking to a user to suggest the initial conditions based on a
visual inspection of the problem. In fact, if we interpret the two likelihoods as
two coordinates x and y of a two dimensional space, the problem of classi cation
can be studied on a two-dimensional plot where: i) the decision of the classi
cation is represented by the line y = mx + q that splits the plane into two parts,
ii) the points that fall `below' this line belongs to class c1.
2.2</p>
        </sec>
      </sec>
      <sec id="sec-2-2">
        <title>Game Mechanics</title>
        <p>The initial version of the interface7, shown in Figure 1, was designed to be used
by experts to understand how to optimize the search of the optimal parameters.</p>
        <sec id="sec-2-2-1">
          <title>7 Available at https://gmdn.shinyapps.io/shinyK/</title>
          <p>In the \gami ed" version of this problem, players have to nd the best
combination of m and q having a xed amount of resources available to train and
validate the algorithm. The game is organized in N levels (that corresponds to
the binary classi cation problems), which are presented from the easiest to the
most di cult and which correspond to the di erent classi cation tasks of the
top N classes of the Reuters 21578 dataset8. A level is di cult when it is hard
to linearly separate the positive class c1 and the negative class c2. An object can
be used during the game either as a training example or a validation sample,
but not both. The goal of each level (and in general of the game) is to nd the
best classi er, i.e. the line which best separates the two categories, c1 and c2 and
therefore which maximizes the F1 score, with the least amount or resources.</p>
          <p>Resources can be used to increase the number of objects of the training
and/or the validation set. At any point in the game, the player can use some
resources to buy additional training or validation objects. By doing so, an
additional 5% of the collection is added to either the training set (more precise) or
the validation set (more objects on the screen). Once the player has found what
he/she considers the best classi er, he/she can proceed with the test, thus the
classi er is tested on the test set and the F1 score is computed. At this point,
the level is completed and the player is forced to go to the next level or conclude
the game.
3</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Experiments</title>
      <p>In the previous section, we presented how the players can interact with the
classi cation game by \investing" a limited amount of resources to buy training
and validation data and, consequently, to nd a better combination of the two
parameters m and q.</p>
      <p>In this section, we present the results of three di erent experiments of the
gami cation of text classi cation that involved di erent users and di erent
interfaces.
3.1</p>
      <sec id="sec-3-1">
        <title>Pilot Experiment: PhD and Post-doc students</title>
        <p>
          A second version of the interface was designed for PhD and post-doc students9
and a pilot study was carried out to test this preliminary version of the game
and to collect opinions and suggestions regarding possible improvements of the
game. In this rst experiment, we were positively surprised by two results (a
complete description of the results can be found in [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ]). First, on average, the
players could reach the `goal' (i.e., the score that a state-of-the-art classi
cation algorithm would reach with the whole labelled dataset) more easily than
expected, by using only 25% of the available data. The second interesting aspect
is that a support vector machine trained on the same reduced dataset (around
        </p>
        <sec id="sec-3-1-1">
          <title>8 http://www.daviddlewis.com/resources/testcollections/reuters21578/</title>
        </sec>
        <sec id="sec-3-1-2">
          <title>9 Available at https://gmdn.shinyapps.io/Classification/</title>
          <p>25% of the annotated dataset) performed as well as the same SVM trained on
the whole dataset. This results are very promising since, the gami cation of text
classi cation may give a reliable indication about when to stop the labelling
process and use the annotated dataset to train with good classi cation performances
a state-of-the-art-algorithm. This second part will require a deep analysis and
further experiments to con rm the statistical signi cance of this process.
3.2</p>
        </sec>
      </sec>
      <sec id="sec-3-2">
        <title>Second Experiment: primary and secondary school students</title>
        <p>During the European Researcher's Night at the University of Padua in September
2016, we designed a new interface to make the game easier for kids of primary and
secondary schools who played the application. The interface, shown in Figure 2,
lets users play only three levels (each level corresponds to a di erent category)
and give feedback about the current performance whenever the line is adjusted.
In this experiment, we also added some incentives like a public leaderboard that
was displayed and regularly updated and chocolate candies for the top scorer. A
total of 28 players used the interface.</p>
        <p>Considering that these users did not know anything about machine learning
or text classi cation, the results in terms of classi cation performance were even
more surprising compared to the rst experiment. In Table 1, we compare the
average results of the classi cation performance of the players (column manual )
with the classi cation performance of a Nave Bayes classi er (NB) and a
Support Vector Machine (SVM) as well as the `goal' performance. You can notice
that the results obtained by participants are very close to the one obtained with
the NB and in the case of the second class, the users achieves better performances
than NB. On average, the classi er with the human contribution is performing
better than NB and worse than SVM.
3.3</p>
      </sec>
      <sec id="sec-3-3">
        <title>Third experiment: General Public</title>
        <p>The rst week of April 2017, during an event at one of branches of Banca d'Italia
in Padua for the brand new 50 euro note, we presented a third version of the
game that was available for the public a whole week. For this study, we decided
to make the layout cleaner, see Figure 3, and add keyboard controls to change
the decision line instead of using sliders. We kept the same game incentives,
chocolate candies and leaderboard, and we added an instructional presentation
of the problem to help the player to understand what `machine learning' and
`training set' are.</p>
        <p>A total of 27 participants played with the game and their results are reported
in Table 2. Even in this case the human aided classi er achieves good results
and the interaction of users with the algorithm through the gami ed approach
reached performances close to SVM and often better than NB. In this case the
results are much closer to SVM than NB even if the amount of resources used was
comparable to the second experiments: players tend to consider the performance
of the classi er satisfactory when 30% of the resources are used.</p>
        <p>Finally, notice that the algorithms were trained on a di erent amount of data
during the game, the scores in Table 1 and Table 2 are not directly comparable.
This explains the di erent results reported for NB and SVM in Table 1 and
Table 2.
In this paper, we presented the ongoing work on gami cation for text classi
cation that involves non expert users in the task of labelling data and produce an
estimate of the monetary cost of creating the training dataset. Considering the
very abstract game (a line and some dots), the rst three preliminary studies
were successful in terms of participation and initial results. The goals of these
studies is to have feedback and collect enough data to study how to design the
game in order to make it open to the general public; in addition, we want to
understand whether a `serious' game can be implemented in order to gather
labelled data for machine learning.</p>
        <p>Future work aims at extending the proposed game and transform it in an
application for di erent mobile devices. Therefore, further e ort is needed to
design the interface of the mobile application with integrated environments like
Unity10. Moreover, considering that the players are not expert in classi cation
the rules of the game should be presented clearly and some concepts, as for
example the validation phase, need to be explained in an easier way.</p>
        <p>Finally, we aim at investigating a di erent game mode with two players
collaborating together to reach a common goal. For instance, the users can share
the controls so they need to cooperate to nd the best solution, or an alternative
is to assign di erent tasks to each user, one user will control the classi cation
line while the other user will assess documents to help him or her to get more
training examples.
10 https://unity3d.com</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>Saleema</given-names>
            <surname>Amershi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Maya</given-names>
            <surname>Cakmak</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W. Bradley</given-names>
            <surname>Knox</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Todd</given-names>
            <surname>Kulesza</surname>
          </string-name>
          .
          <article-title>Power to the People: The Role of Humans in Interactive Machine Learning</article-title>
          .
          <source>AI Magazine</source>
          ,
          <volume>35</volume>
          (
          <issue>4</issue>
          ):
          <volume>105</volume>
          {
          <fpage>120</fpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Ashton</surname>
            <given-names>Anderson</given-names>
          </string-name>
          , Daniel Huttenlocher, Jon Kleinberg, and
          <string-name>
            <given-names>Jure</given-names>
            <surname>Leskovec</surname>
          </string-name>
          .
          <article-title>Steering user behavior with badges</article-title>
          .
          <source>In Proceedings of the 22Nd International Conference on World Wide Web, WWW '13</source>
          , pages
          <fpage>95</fpage>
          {
          <fpage>106</fpage>
          , New York, NY, USA,
          <year>2013</year>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>Winston</given-names>
            <surname>Chang</surname>
          </string-name>
          . Shiny: Web Application Framework for
          <string-name>
            <surname>R</surname>
          </string-name>
          ,
          <year>2015</year>
          .
          <source>R package version 0</source>
          .11.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>Sebastian</given-names>
            <surname>Deterding</surname>
          </string-name>
          , Dan Dixon, Rilla Khaled, and
          <string-name>
            <given-names>Lennart</given-names>
            <surname>Nacke</surname>
          </string-name>
          . From Game Design Elements to Gamefulness: De ning \
          <article-title>Gami cation"</article-title>
          .
          <source>In Proc. of the 15th International Academic MindTrek Conference: Envisioning Future Media Environments, MindTrek '11</source>
          , pages
          <fpage>9</fpage>
          {
          <fpage>15</fpage>
          , New York, NY, USA,
          <year>2011</year>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>Giorgio</given-names>
            <surname>Maria Di Nunzio</surname>
          </string-name>
          .
          <article-title>Using Scatterplots to Understand and Improve Probabilistic Models for Text Categorization and Retrieval</article-title>
          .
          <source>Int. J. Approx. Reasoning</source>
          ,
          <volume>50</volume>
          (
          <issue>7</issue>
          ):
          <volume>945</volume>
          {
          <fpage>956</fpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>Giorgio</given-names>
            <surname>Maria Di Nunzio</surname>
          </string-name>
          .
          <article-title>A New Decision to Take for Cost-Sensitive Nave Bayes Classi ers</article-title>
          .
          <source>Information Processing &amp; Management</source>
          ,
          <volume>50</volume>
          (
          <issue>5</issue>
          ):
          <volume>653</volume>
          {
          <fpage>674</fpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>Giorgio</given-names>
            <surname>Maria Di Nunzio</surname>
          </string-name>
          .
          <article-title>Interactive machine learning with r</article-title>
          .
          <source>In Francesco Mola and Claudio Conversano</source>
          , editors,
          <source>CLADAG 2015</source>
          10th
          <article-title>Scienti c Meeting of the Classi cation and Data Analysis Group of the Italian Statistical Society</article-title>
          . Book of Abstracts., pages
          <volume>333</volume>
          {
          <fpage>338</fpage>
          .
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>Giorgio</given-names>
            <surname>Maria Di Nunzio</surname>
          </string-name>
          .
          <source>Interactive Text Categorisation: The Geometry of Likelihood Spaces</source>
          , pages
          <volume>13</volume>
          {
          <fpage>34</fpage>
          . Springer International Publishing, Cham,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>Giorgio</given-names>
            <surname>Maria Di Nunzio</surname>
          </string-name>
          , Maria Maistro, and Daniel Zilio.
          <article-title>Gami cation for machine learning: The classi cation game</article-title>
          .
          <source>In Proceedings of the Third International Workshop on Gami cation for Information Retrieval co-located with 39th International ACM SIGIR Conference on Research and Development in Information Retrieval (SIGIR</source>
          <year>2016</year>
          ), Pisa, Italy, July
          <volume>21</volume>
          ,
          <year>2016</year>
          ., pages
          <volume>45</volume>
          {
          <fpage>52</fpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Luca</surname>
            <given-names>Galli</given-names>
          </string-name>
          , Piero Fraternali, and
          <string-name>
            <given-names>Alessandro</given-names>
            <surname>Bozzon</surname>
          </string-name>
          .
          <article-title>On the Application of Game Mechanics in Information Retrieval</article-title>
          .
          <source>In Proc. of the 1st Int. Workshop on Gamication for Information Retrieval</source>
          ,
          <source>GamifIR'14</source>
          , pages
          <fpage>7</fpage>
          {
          <fpage>11</fpage>
          , New York, NY, USA,
          <year>2014</year>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Carlos</surname>
            <given-names>Maltzahn</given-names>
          </string-name>
          , Arnav Jhala,
          <string-name>
            <given-names>Michael</given-names>
            <surname>Mateas</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Jim</given-names>
            <surname>Whitehead</surname>
          </string-name>
          .
          <article-title>Gami cation of private digital data archive management</article-title>
          .
          <source>In Proceedings of the First International Workshop on Gami cation for Information Retrieval</source>
          ,
          <source>GamifIR '14</source>
          , pages
          <fpage>33</fpage>
          {
          <fpage>37</fpage>
          , New York, NY, USA,
          <year>2014</year>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <given-names>B.</given-names>
            <surname>Morschheuser</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Hamari</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Koivisto</surname>
          </string-name>
          .
          <article-title>Gami cation in crowdsourcing: A review</article-title>
          .
          <source>In 2016 49th Hawaii International Conference on System Sciences (HICSS)</source>
          , pages
          <fpage>4375</fpage>
          {
          <fpage>4384</fpage>
          ,
          <string-name>
            <surname>Jan</surname>
          </string-name>
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <given-names>Mark</given-names>
            <surname>Shovman</surname>
          </string-name>
          .
          <article-title>The Game of Search: What is the Fun in That?</article-title>
          <source>In Proc. of the 1st Int. Workshop on Gami cation for Information Retrieval</source>
          ,
          <source>GamifIR'14</source>
          , pages
          <fpage>46</fpage>
          {
          <fpage>48</fpage>
          , New York, NY, USA,
          <year>2014</year>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <given-names>Rita</given-names>
            <surname>Singh</surname>
          </string-name>
          and
          <string-name>
            <given-names>Bhiksha</given-names>
            <surname>Raj</surname>
          </string-name>
          .
          <article-title>Classi cation in Likelihood Spaces</article-title>
          . Technometrics,
          <volume>46</volume>
          (
          <issue>3</issue>
          ):
          <volume>318</volume>
          {
          <fpage>329</fpage>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>