<!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>Emotion and Theme Recognition of Music Using Convolutional Neural Networks</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Shengzhou Yi</string-name>
          <email>yishengzhou@hal.t.u-tokyo.ac.jp</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Xueting Wang</string-name>
          <email>xt_wang@hal.t.u-tokyo.ac.jp</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Toshihiko Yamasaki</string-name>
          <email>yamasaki@hal.t.u-tokyo.ac.jp</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>The University of Tokyo</institution>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2019</year>
      </pub-date>
      <fpage>27</fpage>
      <lpage>29</lpage>
      <abstract>
        <p>Our team, "YL-UTokyo", participated in the task: Emotion and Theme Recognition in Music Using Jamendo. The goal of this task is to recognize moods and themes conveyed by the audio tracks. We tried several Convolutional Neural Networks with diferent architectures or mechanisms. As a result, we nfid that a relatively shallow network achieved better performance on this task.</p>
      </abstract>
      <kwd-group>
        <kwd>Figure 1</kwd>
        <kwd>Mel-spectrogram</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>INTRODUCTION</title>
      <p>We participated in one of the tasks in MediaEval 2019: Emotion
and Theme Recognition in Music Using Jamendo [2]. This task
involves the prediction of moods and themes conveyed by a music
track. Moods are often defined as feelings conveyed by the music
(e.g. happy, sad, dark, melancholy) and themes are associated with
events or contexts where the music is suited to be played (e.g. epic,
melodic, christmas, love, film, space).</p>
      <p>In the task, there are three types of audio representations,
including traditional handcrafted audio features, mel-spectrograms, and
raw audio inputs. We only used the mel-spectrograms as input to
train our model (Figure 1). We tried several Convolutional Neural
Networks (CNNs) to find a suitable model for this task. The simplest
but efective model we tried is provided by the organizers. It only
consists of five convolutional layers and one dense layer at last. We
also tried other models with more layers, but they didn’t always
achieve better results. As a result, the model that achieved the best
performance in our experiments is a shallow neural network with
only six convolutional layers and one dense layer.</p>
    </sec>
    <sec id="sec-2">
      <title>RELATED WORK</title>
      <p>Image classification performance has improved greatly with the
advent of large datasets such as ImageNet [5] using CNN
architectures such as VGG [9], Inception [10], and ResNet [6]. There are
also many research of music emotion recognition or music
classification using CNN architectures [ 4, 7]. Even though statistical
machine learning (e.g. Support Vector Machine [8] and Random
Forest [1]) can still achieve good performance in some tasks, deep
learning, especially CNN based method, is more popular and can
achieve better performance in most tasks. For large-scale datasets,
deep learning is much more practicable than statistical machine
learning.</p>
      <p>Mel-spectrogram</p>
      <p>Conv 3x3x32</p>
      <p>
        MP (
        <xref ref-type="bibr" rid="ref2 ref2">2, 2</xref>
        )
Conv 3x3x64
      </p>
      <p>
        MP (
        <xref ref-type="bibr" rid="ref2 ref4">2, 4</xref>
        )
Conv 3x3x128
      </p>
      <p>
        MP (
        <xref ref-type="bibr" rid="ref2 ref2">2, 2</xref>
        )
Conv 3x3x256
      </p>
      <p>
        MP (
        <xref ref-type="bibr" rid="ref2 ref4">2, 4</xref>
        )
Conv 3x3x512
      </p>
      <p>
        MP (
        <xref ref-type="bibr" rid="ref3 ref5">3, 5</xref>
        )
Conv 3x3x256
      </p>
      <p>
        MP (
        <xref ref-type="bibr" rid="ref2 ref4">2, 4</xref>
        )
Dense
Sigmoid
      </p>
    </sec>
    <sec id="sec-3">
      <title>APPROACH</title>
    </sec>
    <sec id="sec-4">
      <title>Model</title>
      <p>We concentrated on finding the most suitable CNN architecture
for the task. The baseline is a simple but efective model consisting
of five convolutional layers and a final dense layer. We also tried
other models with deeper architecture. We tried models with 6,
16, 18 or 25 convolutional layers. In particular, the most shallow
model we considered is a fully convolution neural network with
ELU activations, six 3x3 convolutional layers, and 32, 64, 128, 256,
512, 256 units for each layer respectively (Table 1).</p>
      <p>We also tried some models with the residual architecture [6].
The convolutional block consists of 1x1, 3x3 and 1x1 convolutional
layer sequentially. This is the architecture for inputs and outputs
with the same size and unit number. For the block that maps inputs
Shengzhou Yi, Xueting Wang and Toshihiko Yamasaki
x
to outputs with smaller size and more units, the stride of 3x3
convolutional layer is two and the shortcut is a 1x1 convolutional layer
for downsampling (Figure 2).
3.2</p>
    </sec>
    <sec id="sec-5">
      <title>Dataset</title>
      <p>The dataset includes 17,982 music tracks with mood and theme
annotations. The split for training, validation and test is about
2 : 1 : 1. In total, there are 56 tags, and tracks can possibly have
more than one tag. There are three types of audio representations,
including traditional handcrafted audio features, mel-spectrograms,
and raw audio inputs. The traditional handcrafted audio features
are from Essentia [3] using the feature extractor for AcousticBrainz.
These features were used in the MediaEval genre recognition tasks.
The number of mel-bands of the mel-spectrograms is 96. The raw
audio inputs are in MP3 format with 44.1 kHz sampling rate.
3.3</p>
    </sec>
    <sec id="sec-6">
      <title>Experiment</title>
      <p>We only used the pre-computed mel-spectrograms (Figure 1) as
inputs, and we used diferent data augumentation methods in
training, validation and test dataset. Let T be the length of input section
[frame]. For training dataset, we randomly cropped a T -frame
section from each audio track in every epoch. For validation and test
dataset, we respectively cropped 10 and 20 T -frame sections from
each audio track at regular intervals. We averaged the predictions
over all sections of each audio track. The length of input section T
is 1,280 frames. We trained our networking using Adam with the
batch size of 64 and the learning rate of 0.001.
4</p>
    </sec>
    <sec id="sec-7">
      <title>RESULTS AND ANALYSIS</title>
      <p>We compared the performance of the models that have diferent
architectures or mechanisms in Table 2. Suprisingly, the model that
achieved the best performance in our experiments was a relatively
shallow model that only consists of six convolutional layers, the
architecture of which is detailed introduced in Section 3.1. Moreover,
the top-5 and bottom-5 tag-wise AUCs of the 6-layer model are
showned in Table 3. The performance achieved by the best 6-layer
model is in the fifth place among all 29 submissions.</p>
      <p>The network with 25 convolutional layers consists of one 7x7, 24
3x3 convolutional layers and five max pooling layers for
downsampling. It’s commonly believed that deep models can achieve a better
performance in image classification task. However, the model with
deep architecture didn’t always achieve a better performance in this
task. We also tried residual architecture that commonly used for
improving the performance of neural networks. However, the models
with residual architecture didn’t have an advantage in performance.
5</p>
    </sec>
    <sec id="sec-8">
      <title>DISCUSSION AND OUTLOOK</title>
      <p>The number of samples (18K) in the dataset is relatively smaller
than some image datasets (e.g. CIFAR-10: 60K, MS-COCO: 200K,
ImageNet: 517K) and the length of audio data (&gt;30s) is relatively
longer than some sound datasets (e.g. UrbanSound8K: &lt;4s, ESC-50:
5s, AudioSet: 10s). According to our experience, the generalization
ability of models is especially important in this task. Therefore, it is
reasonable that relatively shallow VGG-based network with strong
generalization ability can achive better performance.</p>
      <p>In the future, we plan to use all of the audio representations
because we think it is interesting that we treat audio recognition as
a multimodal task. Traditional handcrafted audio features and the
raw audio inputs may bring great improvement in the performance
of our model.
6</p>
    </sec>
    <sec id="sec-9">
      <title>CONCLUSION</title>
      <p>In our experiments, we applied several convolutional neural
networks to recogonize the emotion and theme of music. A
shallow VGG-based network that consists of six convolutional layers
achieved the best performance with PR-AUC-macro of 0.1256 and
ROC-AUC-macro of 0.7532. We think that the generalization
ability of the models is very important in this task. The link to our
source code:
https://github.com/YiShengzhou12330379/Emotionand-Theme-Recognition-in-Music-Using-Jamendo.</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>Miguel</given-names>
            <surname>Angel Ferrer Ballester</surname>
          </string-name>
          .
          <year>2018</year>
          .
          <article-title>A Novel Approach to String Instrument Recognition</article-title>
          .
          <source>In Proceedings of Image and Signal Processing: 8th International Conference</source>
          , Vol.
          <volume>10884</volume>
          .
          <fpage>165</fpage>
          -
          <lpage>175</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <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>
          . In MediaEval Benchmark Workshop.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Dmitry</given-names>
            <surname>Bogdanov</surname>
          </string-name>
          , Nicolas Wack, Emilia Gómez Gutiérrez, Sankalp Gulati, Herrera Boyer, and others.
          <source>2013</source>
          .
          <article-title>Essentia: An audio analysis library for music information retrieval</article-title>
          .
          <source>In Proceedings of the International Society for Music Information Retrieval</source>
          .
          <fpage>493</fpage>
          -
          <lpage>498</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Keunwoo</given-names>
            <surname>Choi</surname>
          </string-name>
          , George Fazekas, and
          <string-name>
            <given-names>Mark</given-names>
            <surname>Sandler</surname>
          </string-name>
          .
          <year>2016</year>
          .
          <article-title>Automatic tagging using deep convolutional neural networks</article-title>
          .
          <source>arXiv preprint arXiv:1606.00298</source>
          (
          <year>2016</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Jia</given-names>
            <surname>Deng</surname>
          </string-name>
          , Wei Dong, Richard Socher,
          <string-name>
            <surname>Li-Jia</surname>
            <given-names>Li</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>Kai</given-names>
            <surname>Li</surname>
          </string-name>
          , and
          <string-name>
            <surname>Li</surname>
          </string-name>
          Fei-Fei.
          <year>2009</year>
          .
          <article-title>Imagenet: A large-scale hierarchical image database</article-title>
          .
          <source>In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition</source>
          .
          <fpage>248</fpage>
          -
          <lpage>255</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Kaiming</given-names>
            <surname>He</surname>
          </string-name>
          , Xiangyu Zhang, Shaoqing Ren, and
          <string-name>
            <given-names>Jian</given-names>
            <surname>Sun</surname>
          </string-name>
          .
          <year>2016</year>
          .
          <article-title>Deep residual learning for image recognition</article-title>
          .
          <source>In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition</source>
          .
          <fpage>770</fpage>
          -
          <lpage>778</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Shawn</given-names>
            <surname>Hershey</surname>
          </string-name>
          , Sourish Chaudhuri, Daniel PW Ellis, Jort F Gemmeke,
          <string-name>
            <surname>Aren</surname>
            <given-names>Jansen</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>R Channing</given-names>
            <surname>Moore</surname>
          </string-name>
          , Manoj Plakal, Devin Platt,
          <article-title>Rif A Saurous, Bryan Seybold, and</article-title>
          <string-name>
            <surname>others.</surname>
          </string-name>
          <year>2017</year>
          .
          <article-title>CNN architectures for large-scale audio classification</article-title>
          .
          <source>In Proceedings of the IEEE International Conference on Acoustics, Speech and Signal Processing</source>
          .
          <fpage>131</fpage>
          -
          <lpage>135</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Renato</given-names>
            <surname>Panda</surname>
          </string-name>
          , Ricardo Malheiro, and Rui Pedro Paiva.
          <year>2018</year>
          .
          <article-title>Musical Texture and Expressivity Features for Music Emotion Recognition</article-title>
          .
          <source>In Proceedings of the International Society for Music Information Retrieval</source>
          .
          <fpage>383</fpage>
          -
          <lpage>391</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>Karen</given-names>
            <surname>Simonyan</surname>
          </string-name>
          and
          <string-name>
            <given-names>Andrew</given-names>
            <surname>Zisserman</surname>
          </string-name>
          .
          <year>2014</year>
          .
          <article-title>Very deep convolutional networks for large-scale image recognition</article-title>
          .
          <source>arXiv preprint arXiv:1409.1556</source>
          (
          <year>2014</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Christian</surname>
            <given-names>Szegedy</given-names>
          </string-name>
          , Wei Liu, Yangqing Jia,
          <string-name>
            <given-names>Pierre</given-names>
            <surname>Sermanet</surname>
          </string-name>
          , Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and
          <string-name>
            <given-names>Andrew</given-names>
            <surname>Rabinovich</surname>
          </string-name>
          .
          <year>2015</year>
          .
          <article-title>Going deeper with convolutions</article-title>
          .
          <source>In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 1-9.</source>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>