<!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>Recognizing Song Mood and Theme Using Convolutional Recurrent Neural Networks</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Maximilian Mayerl</string-name>
          <email>maximilian.mayerl@uibk.ac.at</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Michael Vötter</string-name>
          <email>michael.voetter@uibk.ac.at</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Hsiao-Tzu Hung</string-name>
          <email>fbiannahung@gmail.com</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Bo-Yu Chen</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Yi-Hsuan Yang</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>Eva Zangerle</string-name>
          <email>eva.zangerle@uibk.ac.at</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Research Center for IT Innovation</institution>
          ,
          <addr-line>Academia Sinica</addr-line>
          ,
          <country country="TW">Taiwan</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Taiwan AI Labs</institution>
          ,
          <country country="TW">Taiwan</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Universität Innsbruck</institution>
          ,
          <country country="AT">Austria</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2019</year>
      </pub-date>
      <fpage>27</fpage>
      <lpage>29</lpage>
      <abstract>
        <p>In this year's MediaEval task, Emotion and Theme Recognition in Music Using Jamendo, the goal is to assign emotion and theme tags to songs. In this paper, we describe our-Team TaiInn (Innsbruck)approach for this task. We use a neural network model consisting of both convolutional and recurrent layers and utilize spectral, highlevel as well as rhythm features. Our approach achieves a ROC-AUC score of 0.723 on the provided test set.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>INTRODUCTION</title>
      <p>At this year’s MediaEval workshop, the task Emotion and Theme
Recognition in Music Using Jamendo deals with detecting mood and
theme tags for songs that are described by audio descriptors. Those
songs are drawn from Jamendo1, and collected in a data set created
by Bogdanov et al. [3]. The tags that have to be predicted cover
a wide range of emotions and themes, and include tags like sad,
heavy, relaxing, and children. More details can be found in [1].</p>
      <p>We use a neural network model to approach this task and show
that our model achieves a performance that is comparable to the
provided baseline (ROC-AUC of 0.723 for our best run), but requires
much fewer training epochs to reach this (16 vs 1,000). We also
show that generating more training samples by drawing random
windows from the provided mel-spectrograms improves results, and
that incorporating high-level features into the model architecture
reduces the number of needed epochs in training while giving
almost the same results. Our code is available on GitHub2.</p>
    </sec>
    <sec id="sec-2">
      <title>APPROACH</title>
      <p>Our approach to the task is an extension to the CRNN
(convolutional recurrent neural network) model proposed by Choi et al. [4].
Hence, we utilize a neural network consisting of a combination
of convolutional, recurrent as well as dense blocks. The network
is structured in a way that allows to eficiently combine diferent
types of features, similar to the approach used by Zangerle et al.
[6] for combining low- and high-level features in a neural network
model for the task of hit song prediction.
†authors contributed equally to this work
1https://www.jamendo.com
2https://github.com/dbis-uibk/MediaEval2019</p>
      <p>In the remainder of this section, we will explain our approach to
the task in detail. Section 2.1 describes how we use the provided
data to train our models. Section 2.2 explains the structure of our
model. Finally, Section 2.3 details the runs we submitted for the
task.
2.1</p>
    </sec>
    <sec id="sec-3">
      <title>Data</title>
      <p>For training our models, we used both the precomputed
mel-spectrograms and audio features computed with Essentia [2] that were
provided by the task organizers. From those, we utilized the
melspectrograms as well as high-level features (like genre and
danceability), and rhythm features (beats per minute). As training data,
the task organizers provided a set of 9,949 songs. We used two
diferent training sets. The Base training set is the set provided by
the task organizers. For the mel-spectrograms, we use a window of
width 1,366 around the temporal center of the song. For the
RandomSampling training set, on the other hand, we generated more
training samples by taking five random windows of width 1,366
from each song. This training set therefore provides us with 49,745
training samples.
2.2</p>
    </sec>
    <sec id="sec-4">
      <title>Model</title>
      <p>Our approach uses a neural network model consisting of
convolutional, recurrent, and dense layers. The mel-spectrograms are fed
into a series of convolutional layers, followed by two recurrent
layers using GRU (gated recurrent unit) cells. High-level and rhythm
features bypass this part of the network and directly feed into
the dense part that comes after the recurrent layers. A schematic
overview of the base network structure is given in Figure 1. Some
of our submissions feature modifications to this structure. Those
modifications are described in more detail in Section 2.3.</p>
      <p>
        Every convolutional block consists of a 2D convolutional layer
followed by batch normalization, ELU activation and a max pooling
layer. After every block, a dropout of 10% is applied. The
convolutional layers have kernel sizes of (
        <xref ref-type="bibr" rid="ref3 ref3">3, 3</xref>
        ), whereas the pooling
layers have pool sizes of (
        <xref ref-type="bibr" rid="ref2 ref2">2, 2</xref>
        ), (
        <xref ref-type="bibr" rid="ref3 ref3">3, 3</xref>
        ), (
        <xref ref-type="bibr" rid="ref4 ref4">4, 4</xref>
        ), and (
        <xref ref-type="bibr" rid="ref4 ref4">4, 4</xref>
        ). The
ifrst convolutional layer uses 64 filters, whereas the latter three
layers use 128 filters. This is followed by two recurrent layers using
GRU cells. Both of these layers use tanh activation. Following that,
the output of the second GRU layer is concatenated with the
highlevel and rhythm features and fed into two dense layers. The first
dense layer has 128 units and uses tanh activation, whereas the
second and final dense layer has 56 units—the number of possible
labels—and uses sigmoid activation. A dropout of 30% is applied
after the first of the dense layers.
      </p>
      <p>The model is trained using the Adam optimizer [5]. As loss
function, we used binary cross-entropy. The output of this model
is a vector of probabilities, where every entry in the vector holds
the probability for one of the labels. To then decide which labels to
assign to a given song, we determine the best probability thresholds
for every label individually, using the provided validation set. For
this, we use a variation of the elbow method on the ROC curve: We
compute the per label ROC curve on the given validation set. Based
on this ROC curve we compute the straight line between the left
most point and the right most point. This line is used as a reference
to find the point on the ROC curve that has the largest orthogonal
distance to that line. We then use the corresponding threshold as
our decision boundary for that label.
2.3</p>
    </sec>
    <sec id="sec-5">
      <title>Submissions</title>
      <p>Using the data and model described above, we build multiple
submission runs:
• Run #1: The base model, but without the high-level and
rhythm features, trained on the Base training set.
• Run #2: The base model, but without the high-level and
rhythm features, trained on the RandomSampling training
set.
• Run #3: The base model, but without the high-level and
rhythm features, and with an attention mechanism after
the second recurrent layer, trained on the RandomSampling
training set.
• Run #4: The base model, as described in Section 2.2, trained
on the RandomSampling training set.
• Run #5: The base model, with an attention mechanism after
the second recurrent layer, trained on the RandomSampling
training set.
3</p>
    </sec>
    <sec id="sec-6">
      <title>RESULTS AND ANALYSIS</title>
      <p>The results for the submissions described in Section 2.3, as well as
how many epochs were used for training the respective model, are
summarized in Table 1. As can be seen, all of our runs outperform
the popularity baseline, but do not manage to beat the VGG-ish
baseline. The best performing runs are run #2 and #3, which both
perform very close to the VGG-ish baseline in terms of ROC-AUC
and PR-AUC, but significantly worse in terms of F 1 score. On the
other hand, our runs require much fewer training epochs to achieve
those results. The fact that ROC-AUC and PR-AUC are similar but
F1 is worse suggests that our choice of probability thresholds for
label assignments is suboptimal.</p>
      <p>Comparing the results for our runs which use both spectrograms
as well as high-level features as input (#4, #5) with the runs that
use only mel-spectrograms (#1, #2, and #3), we observe that the
models without high-level features seem to perform better overall.
Despite this, the models using high-level features learn faster, with
the diference between 8 and 16 epochs of training being much
smaller for run #4 than it is for run #1.</p>
      <p>We can also see that random sampling for increasing the number
of training samples helps to improve results. The PR-AUC increases
from 8% in run #1 to 11% in run #2, which only difer in that run #2
uses random sampling while run #1 does not.
4</p>
    </sec>
    <sec id="sec-7">
      <title>SUMMARY AND OUTLOOK</title>
      <p>In this paper, we described our approach to the Emotion and Theme
Recognition in Music Using Jamendo task at MediaEval 2019. Our
best approach achieved a ROC-AUC score of 0.723, which is slightly
worse than the best baseline provided by the task organizers (0.726),
but needs much fewer training epochs than the baseline. Potential
future work on this approach includes trying diferent ways to
determine probability thresholds for label assignments and applying
this approach to other data sets for the same task.</p>
      <p>Emotion and Theme Recognition in Music Using Jamendo</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Dmitry</given-names>
            <surname>Bogdanov</surname>
          </string-name>
          , Alastair Porter,
          <string-name>
            <given-names>Philip</given-names>
            <surname>Tovstogan</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Minz</given-names>
            <surname>Won</surname>
          </string-name>
          .
          <year>2019</year>
          .
          <article-title>MediaEval 2019: Emotion and Theme Recognition in Music Using Jamendo</article-title>
          .
          <source>In CEURS Working Notes Proceedings of the MediaEval 2019 Workshop. CEUR-WS.org.</source>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Dmitry</given-names>
            <surname>Bogdanov</surname>
          </string-name>
          , Nicolas Wack, Emilia Gómez Gutiérrez, Sankalp Gulati, Perfecto Herrera Boyer, Oscar Mayor, Gerard Roma Trepat, Justin Salamon, José Ricardo Zapata González, and
          <string-name>
            <given-names>Xavier</given-names>
            <surname>Serra</surname>
          </string-name>
          .
          <year>2013</year>
          .
          <article-title>Essentia: An audio analysis library for music information retrieval</article-title>
          . In
          <string-name>
            <surname>Britto</surname>
            <given-names>A</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gouyon</surname>
            <given-names>F</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dixon</surname>
            <given-names>S</given-names>
          </string-name>
          , editors.
          <source>14th Conference of the International Society for Music Information Retrieval (ISMIR); 2013 Nov</source>
          <volume>4</volume>
          -8; Curitiba, Brazil.[place unknown]: ISMIR;
          <year>2013</year>
          . p.
          <fpage>493</fpage>
          -
          <lpage>8</lpage>
          . International Society for Music Information Retrieval (ISMIR).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Dmitry</given-names>
            <surname>Bogdanov</surname>
          </string-name>
          , Minz Sanghee Won, Philip Tovstogan,
          <string-name>
            <given-names>Alastair</given-names>
            <surname>Porter</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Xavier</given-names>
            <surname>Serra</surname>
          </string-name>
          .
          <year>2019</year>
          .
          <article-title>The MTG-Jamendo Dataset for Automatic Music Tagging</article-title>
          . (
          <year>2019</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Keunwoo</given-names>
            <surname>Choi</surname>
          </string-name>
          , György Fazekas,
          <string-name>
            <given-names>Mark</given-names>
            <surname>Sandler</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Kyunghyun</given-names>
            <surname>Cho</surname>
          </string-name>
          .
          <year>2017</year>
          .
          <article-title>Convolutional recurrent neural networks for music classification</article-title>
          .
          <source>In 2017 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)</source>
          . IEEE,
          <fpage>2392</fpage>
          -
          <lpage>2396</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Diederik</given-names>
            <surname>Kingma</surname>
          </string-name>
          and
          <string-name>
            <given-names>Jimmy</given-names>
            <surname>Ba</surname>
          </string-name>
          .
          <year>2014</year>
          .
          <article-title>Adam: A Method for Stochastic Optimization</article-title>
          .
          <source>International Conference on Learning Representations (12</source>
          <year>2014</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Eva</given-names>
            <surname>Zangerle</surname>
          </string-name>
          , Michael Vötter,
          <string-name>
            <given-names>Ramona</given-names>
            <surname>Huber</surname>
          </string-name>
          , and
          <string-name>
            <surname>Yi-Hsuan Yang</surname>
          </string-name>
          .
          <year>2019</year>
          .
          <article-title>Hit Song Prediction: Leveraging Low-</article-title>
          and
          <string-name>
            <surname>High-Level Audio</surname>
          </string-name>
          <article-title>Features</article-title>
          .
          <source>In Proceedings of the 20th International Society for Music Information Retrieval Conference</source>
          <year>2019</year>
          (ISMIR
          <year>2019</year>
          ).
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>