<!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 Cross Modal Deep Learning Based Approach for Caption Prediction and Concept Detection by CS Morgan State</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Md Mahmudur Rahman</string-name>
          <email>md.rahman@morgan.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Morgan State University</institution>
          ,
          <addr-line>Baltimore MD 21251</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
      </contrib-group>
      <abstract>
        <p />
      </abstract>
      <kwd-group>
        <kwd>Caption generation</kwd>
        <kwd>Concept Detection</kwd>
        <kwd>Cross Modality</kwd>
        <kwd>Deep Learning</kwd>
        <kwd>Encoder-Decoder</kwd>
        <kwd>Merge Architecture</kwd>
        <kwd>Performance evaluation</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        This article describes the participation of the Computer Science Department of
Morgan State University, Baltimore, Maryland, USA in the ImageCLEFcaption
under ImageCLEF 2018. The problem of automatic image caption prediction
involves outputting a human-readable and concise textual description of the
contents of a figure appeared in a biomedical journal. It is a challenging
problem in biomedical literature as it requires techniques from both the fields of
Computer Vision to understand the visual contents of the image and Natural
Language Processing (NLP) to turn the understanding of the image into words
in the right order to generate the textual description for caption. Recently, deep
learning methods have achieved state-of-the-art results on this challenging
problem in general domain of natural photographic images. For the tasks of
caption prediction and concept detection, we used the merge architectures for
the encoder-decoder recurrent neural network (RNN) due to it’s success over
inject for caption generation. The merge model combines both the encoded
form of the image input with the encoded form of the text description generated
so far. The combination of these two encoded inputs is then used by a very
simple decoder model to generate the next word in the sequence. In this article, we
present main objectives of experiments, overview of these approaches,
resources employed, and describe our submitted runs and results with conclusions
and future directions.
This article describes our second year’s participation in ImageCLEF 2018 [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] for the
ImageCLEF caption track which consists of both Concept Detection and Caption
Prediction Tasks [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. For the Concept Detection, participating systems are tasked with
identifying the presence of relevant UMLS concepts in images appeared in
biomedical journal articles (PubMed Central). For the Caption Prediction, participating
systems are tasked with composing coherent captions for the entirety of an image
based on the interaction of visual information content and the detected concepts from
the first task.
      </p>
      <p>
        There has been a lot of interest recently from Computer Vision, Machine Learning
and NLP community in developing deep learning-based approaches for automatic
caption generation of natural photographic images [
        <xref ref-type="bibr" rid="ref3 ref4">3,4</xref>
        ]. The problem of image
caption generation involves outputting a readable and concise description of the contents
of a photograph. It is a challenging artificial intelligence problem as it requires both
techniques from computer vision to interpret the contents of the photograph and
techniques from natural language processing to generate the textual description. Recently,
deep learning methods have achieved state of the art results on examples of this
problem. In general, a standard encoder-decoder recurrent neural network architecture is
used to address the image caption generation problem. Generally, a pre-trained
convolutional neural network (CNN) is used to encode the images and a recurrent neural
network, such as a Long Short-Term Memory (LSTM) network, is used to either
encode the text sequence generated so far, and/or generate the next word in the sequence
[
        <xref ref-type="bibr" rid="ref5 ref6">5,6</xref>
        ].
      </p>
    </sec>
    <sec id="sec-2">
      <title>2 Our Approach of Developing Deep Learning Model</title>
      <p>The provided datasets have separate training and test sets, which are really just
different groups of image identifiers in separate text files respectively (such as
CaptionTraining2018-List.txt and CaptionTesting2018-List.txt in case of caption prediction
task). From these file names, we extracted the photo identifiers and use these
identifiers as keys to filter photos and descriptions for each set.</p>
      <p>
        The merge model (Fig. 1) combines both the encoded form of the image input with
the encoded form of the text description generated so far, which is handled by
Recurrent Neural Networks (RNNs). This separates the concern of modeling the image
input, the text input and the combining and interpretation of the encoded inputs [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. It
is experimentally found [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] that the merge architecture is more effective compared to
the inject approach, where both image and word information is injected into the RNN.
Hence, we followed this approach for both tasks in ImageCLEFcaption.
      </p>
      <p>The entire process of the model generation is shown as a plot in Fig. 2 and can be
described in three parts as follows:</p>
      <sec id="sec-2-1">
        <title>2.1 Visual Feature Extractor</title>
        <p>
          We loaded all the images from a subset of the original training set, extract their
features using a pre-trained 16-layer VGG model [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ], and store the extracted features
keyed on the image id to a new file that is later loaded and used as input for training a
language model. We pre-processed the images with the VGG model (without the
output layer) trained on ImageNet dataset [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] and used the extracted features
predicted by this model as input. Keras also provides tools for reshaping the loaded photo
into the preferred size for the model (e.g. 3 channel 224 x 224 pixel image). The
Visual Feature Extractor model expects input photo features to be a vector of 4,096
elements. These are processed by a Dense layer to produce a 256-element representation
of the photo.
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2 Text Feature Extractor and Sequence Processor</title>
        <p>The training dataset contains caption for each image, which requires some minimal
cleaning. Each image name without the file extension (e.g., .jpg) is acted as a unique
identifier in a processed text file of descriptions. The descriptions are cleaned and
tokenized in order to reduce the size of the vocabulary of words; this means that each
token is comprised of words separated by white space where words are transformed to
lowercase, all punctuation are removed from tokens and tokens that contain one or
fewer characters are also removed. Finally, we save the dictionary of image identifiers
and descriptions to a new file named descriptions.txt, with one image identifier and
description per line.</p>
        <p>
          This is a word embedding layer for handling the text input, followed by a LSTM
layer. The model expects input sequences with a pre-defined length which are fed
into an embedding layer that uses a mask to ignore padded values. This is followed by
an LSTM layer with 256 memory units. Both the input models produce a 256-element
vector. Further, both input models use regularization in the form of 50% dropout. This
is to reduce overfitting the training dataset, as this model configuration learns very
fast. The Decoder model merges the vectors from both input models using an addition
operation. This is then fed to a Dense 256 neuron layer and then to a final output
Dense layer that makes a softmax prediction over the entire output vocabulary for the
next word in the sequence [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ].
        </p>
      </sec>
      <sec id="sec-2-3">
        <title>2.3 Decoder</title>
        <p>Both the feature extractor and sequence processor output a fixed-length vector. These
are merged together and processed by a Dense layer to make a final prediction. The
model we will develop will generate a caption given a photo, and the caption will be
generated one word at a time. The sequence of previously generated words will be
provided as input. Therefore, we will need a first word to kick-of the generation
process and a last word to signal the end of the caption. We used the strings startseq and
endseq for this purpose.</p>
        <p>Each caption of an associated image is tokenized into words after performing some
text processing and cleaning operations. The model is provided one word and the
photo and generate the next word. Then the first two words of the description will be
provided to the model as input with the image to generate the next word. For example,
the input sequence “Mandibular true occlusal radiograph" would be split into five
input-output pairs to train the model:</p>
        <p>
          The Decoder model merges the vectors from both input models using an addition
operation. This is then fed to a Dense 256 neuron layer and then to a final output
Dense layer that makes a softmax prediction over the entire output vocabulary for the
next word in the sequence. Later, when the model is used to generate descriptions,
the generated words are concatenated and recursively provided as input to generate a
caption for an image. The Keras functional API [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ] is used to define the model
(Figure 2) as it provides the flexibility needed to define a model that takes two input
streams and combines them.
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3 Software and Experimental Environment</title>
      <p>For implementation of our deep learning model and submission of the runs, we used
Keras (version 2.1.5) library in a Python 3 (version 3.5.2) SciPy environment on top
of TensorFlow (version 1.1.0) backend. Keras provides a clean and convenient way to
create a range of deep learning models on top of both Theano or TensorFlow backend
which can be executed on both GPUs and CPUs given the underlying frameworks.
Other necessary libraries, such as scikit-learn, OpenCV, Pandas, NumPy pickle, and
Matplotlib are also installed and used to support visual and text feature extraction for
model inputs as well as model generation, and saving and plotting the model. For
training, the model was fitted for 30 epochs and given the amount of training data
each epoch took around 3 hours in a window-based workstation.</p>
    </sec>
    <sec id="sec-4">
      <title>4 Submitted Runs and Results</title>
      <p>This section provides descriptions of our submitted runs and analysis of the result. We
(morgan_cs) tried to submit few runs for each task of caption prediction and concept
detection. However, only a single run for each task was graded successfully, whereas
others were failed due to processing errors.</p>
      <p>Both runs are generated based on the deep learning method (merge model) described
in previous sections. We almost implemented the same process of feature (textual
caption and visual) extraction and model generation for training for both tasks.
Results are generated based on the test sets (9,938 images) for captions and concepts.
However, for training we only used only a small subset (around 4K images) of the
original training set (&gt; 222K images) as provided by the organizers. This limitation is
due to the limited resources (both memory and computing power) that was available
during the model generation and result submission steps in this evaluation campaign.
UMMS
morgan_cs
0.25
0.18</p>
      <p>Our successful submission (morgan_cs) of caption prediction (ID: 6202) received a
BLUE score of 0.1724, which is ranked third (group submission wise) as shown in
Table 1. We also submitted mistakenly a run for caption prediction (which was
graded successfully with a 0.0 score although it was meant for the submission of concept
detection task). We failed to submit few other runs. However, there were some
problems in our runs (result files) and received errors while the files were parsed by the
online evaluation tool under crowdAI provided by the CLEF organizer.</p>
      <p>For the sole submission (ID: 6216) of concept detection, we received a F1 score of
0.0417 (ranked 4th group wise) which is comparatively lower compared to the leading
group (UA.PT_Bioinformatics) with a score of 0.11.</p>
    </sec>
    <sec id="sec-5">
      <title>5 Conclusions</title>
      <p>
        This article describes the strategies of the second year’s participation of the Morgan
CS group for the concept detection and caption prediction tasks of
ImageCLEFcaption [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Motivated by the state-of-the-art results on caption generation problems in
general domain, we developed a cross modal deep learning model by using both
image and text features in a merge architecture to accomplish these tasks. We achieved
comparable results (ranked in the middle group wise for both tasks) considering the
limited resources (computing and memory power) we had at the time of the
submission. In future, we plan to experiment with larger pre-trained models (such as,
Inception, ResNet, Google Net, etc.) for photo feature extraction that offer better
performance on the ImageNet dataset [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. Also, better performance might be achieved by
using word vectors trained on a much larger corpus of text, such as news articles or
Wikipedia. We will also perform our experiments (e.g. model generation and
prediction) in a cloud infrastructure (such, as Amazon AWS) by exploring alternate
configuration and exploiting to full capacity of the ground truth dataset (e.g., training sets).
This work is supported by an NSF HBCU-UP Research Initiation Award (ID.
1601044).
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>Bogdan</given-names>
            <surname>Ionescu</surname>
          </string-name>
          , Henning Müller, Mauricio Villegas,
          <string-name>
            <surname>Alba García Seco de Herrera</surname>
          </string-name>
          , et all.
          <source>Overview of ImageCLEF</source>
          <year>2018</year>
          :
          <article-title>Challenges, Datasets and Evaluation</article-title>
          ,
          <source>Proceedings of the Ninth International Conference of the CLEF Association, CLEF</source>
          <year>2018</year>
          , (
          <year>2018</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>Alba</given-names>
            <surname>García Seco de Herrera</surname>
          </string-name>
          , Carsten Eickhoff, Vincent Andrearczyk and
          <string-name>
            <given-names>Henning</given-names>
            <surname>Müller</surname>
          </string-name>
          .
          <article-title>Overview of the ImageCLEF 2018 caption prediction tasks</article-title>
          ,
          <source>CLEF working notes</source>
          , CEUR, (
          <year>2018</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>Oriol</given-names>
            <surname>Vinyals</surname>
          </string-name>
          , Alexander Toshev, Samy Bengio, Dumitru Erhan,
          <article-title>Show and Tell: A Neural Image Caption Generator</article-title>
          ,
          <string-name>
            <surname>CVPR</surname>
          </string-name>
          <year>2015</year>
          :
          <fpage>3156</fpage>
          -
          <lpage>3164</lpage>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>Oriol</given-names>
            <surname>Vinyals</surname>
          </string-name>
          , Alexander Toshev, Samy Bengio, Dumitru Erhan:
          <article-title>Show and Tell: Lessons Learned from the 2015 MSCOCO Image Captioning Challenge</article-title>
          .
          <source>IEEE Trans. Pattern Anal. Mach. Intell</source>
          .
          <volume>39</volume>
          (
          <issue>4</issue>
          ):
          <fpage>652</fpage>
          -
          <lpage>663</lpage>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <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>
          . “
          <article-title>Very Deep Convolutional Networks for LargeScale Image Recognition”</article-title>
          .
          <source>In: CoRR abs/1409</source>
          .1556 (
          <year>2014</year>
          ). URL: http://arxiv.org/abs/1409.1556 (cited on pages
          <fpage>32</fpage>
          ,
          <issue>86</issue>
          , 171).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6. Jason Brownlee Blog: https://machinelearningmastery.com
          <article-title>/develop-a-deep-learningcaption-generation-model-in-python/</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>J.</given-names>
            <surname>Deng</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Dong</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Socher</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.-J.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Li</surname>
          </string-name>
          , and
          <string-name>
            <given-names>L.</given-names>
            <surname>Fei-Fei. ImageNet: A Large-Scale Hierarchical Image Database. In</surname>
          </string-name>
          <string-name>
            <surname>CVPR</surname>
          </string-name>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>Marc</given-names>
            <surname>Tanti</surname>
          </string-name>
          ,
          <string-name>
            <surname>Albert Gatt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Kenneth P.</given-names>
            <surname>Camilleri</surname>
          </string-name>
          ,
          <article-title>Where to put the Image in an Image Caption Generator</article-title>
          ,
          <source>Natural Language Engineering</source>
          ,
          <volume>24</volume>
          (
          <issue>03</issue>
          ), DOI: 10.1017/S1351324918000098, (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>Marc</given-names>
            <surname>Tanti</surname>
          </string-name>
          ,
          <string-name>
            <surname>Albert Gatt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Kenneth P.</given-names>
            <surname>Camilleri</surname>
          </string-name>
          ,
          <article-title>What is the Role of Recurrent Neural Networks (RNNs) in an Image Caption Generator?</article-title>
          ,
          <source>Proc. 10th International Conference on Natural Language Generation (INLG'17)</source>
          , cited as arXiv:
          <fpage>1708</fpage>
          .
          <year>02043</year>
          [cs.CL], (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Keras Applications</surname>
            <given-names>API</given-names>
          </string-name>
          , https://keras.io/applications/
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>