<!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>Image-Text Re-Matching Using Swin Transformer and DistilBERT</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Yuta Fukatsu</string-name>
          <email>fukatsu.yuta.ye@tut.jp</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Masaki Aono</string-name>
          <email>aono@tut.jp</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science &amp; Engineering, Toyohashi University of Technology</institution>
          ,
          <addr-line>Toyohashi, Aichi</addr-line>
          ,
          <country country="JP">Japan</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2021</year>
      </pub-date>
      <fpage>13</fpage>
      <lpage>15</lpage>
      <abstract>
        <p>In recent years, the news media has become multimodal. The relationship between text and images in news is complex and needs to be understood. In this paper, we work on Image-Text ReMatching to understand the relationship between images and text, and apply and improve the image retrieval method, ADAPT. Improvements are made by reconsidering the feature extraction methods in image retrieval. We employ Swin Transformer for image feature extraction and DistilBERT for text feature extraction. According to the report from organizers, our runs resulted in MRR@100 score of 0.0789 and Recall@100 score of 0.5781 for test set.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>INTRODUCTUIN</title>
      <p>
        Online news articles in recent years have mixed components,
consisting of texts and images. It is often the case that images
are added to text articles to attract attention and to help
readers understand the articles intuitively. Usually, in
research on multimedia and recommendation systems, a
simple relationship between images and text is assumed. As
an example, in the study of image captioning [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], the caption
is assumed to be a literal representation of the image
landscape. However, news-specific studies have pointed out
a more complex relationship [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. The NewsImages task of
MediaEval 2021, investigates this relationship to understand
its impact on journalism and news personalization. Our team
(KDEval 2021) participated in subtask 1, Image-Text
ReMatching. In this task, links between a series of articles and
images have been removed.
      </p>
      <p>
        In MediaEval 2020 [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], metric learning was introduced.
We thus adopt a metric learning based method is inspired by
ADAPT [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Re-Matching is performed by a text-based
image retrieval method. We reconsider and experiment with
image feature extraction and text feature extraction in
ADAPT [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] for NewsImages. After reconsidering the feature
extraction method, we confirmed that the best results are
obtained by using Swin Transformer for image feature
extraction and DistilBERT for text feature extraction.
2
2.1
      </p>
    </sec>
    <sec id="sec-2">
      <title>ADAPT</title>
      <p>ADAPT, which one of the image-to-text (text-to-image)
alignment model are used for cross-modal retrieval. ADAPT
takes a text (image) as input and then searches for the closest
image (text) and outputs it. In ADAPT, the features for the
input modality are used to recalculate the features for the
other modality.
2.2</p>
    </sec>
    <sec id="sec-3">
      <title>DistilBERT</title>
      <p>
        DistilBERT [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] is a distillation of the BERT (Bidirectional
Encoder Representations from Transformers) model, which
is a natural language model that can understand context
backwards and forwards and has been pre-trained on a large
scale. However, BERT has the disadvantage that the model
is too large for its performance, so DistilBERT achieves
lightweight and speedup by distilling the model.
2.3
      </p>
    </sec>
    <sec id="sec-4">
      <title>Swin Transformer</title>
      <p>
        Swin Transformer [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] is a type of Vision Transformer, an
image recognition model that introduces the concept of
Transformer, which has been successful in natural language.
Vision Transformer can benefit from the Transformer by
dividing images into patches and treating them like words in
NLP. Swin Transformer is a model that solves the
shortcoming of Vision Transformer, that is, the fixed size
patches are insufficient for recognizing objects of various
sizes.
3
      </p>
    </sec>
    <sec id="sec-5">
      <title>APPROACH</title>
      <p>As shown in next sections, we reconsider the feature
extraction methods used in ADAPT for the specific case of
news articles and explain our method.
3.1</p>
    </sec>
    <sec id="sec-6">
      <title>Reconsidering of Text Feature Extraction</title>
      <p>GloVe embedding and bi-directional GRU are used in
ADAPT to extract text features considering contextual
information. However, even with context-aware methods
using bi-directional GRU, there is a limitation on
maintaining context information with distant words.
Especially in news articles, it is highly likely that the text
tends to be long. Thus, we have newly adopted DistilBERT
as our text feature extraction method, which can handle
longer texts and can obtain better features due to its rich
pretraining. DistilBERT is also lighter than plain BERT, which
would be more practical for applications to real-time search
and recommendation.
3.2</p>
    </sec>
    <sec id="sec-7">
      <title>Reconsidering of Image Feature Extraction</title>
      <p>
        The image feature extraction in ADAPT is based on a Faster
R-CNN pre-trained on the Visual Genome dataset [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. This
method uses 36 objects as features with high confidence in
the image. However, the images given in news articles are
often abstract or imaginative of the article content. Therefore,
we cannot obtain useful features in such cases, or we need to
extract 36 objects using extremely low confidence
thresholds. Thus, we decided to reconsider how to acquire
useful features while retaining the advantages of ADAPT,
which is more efficient than attention-based methods by
using spatial-level features. To deal this problem, we adopted
the Swin Transformer. By using Swin Transformer, it is
possible to obtain spatial-level and meaningful features.
3.3
      </p>
    </sec>
    <sec id="sec-8">
      <title>Training and Submitted Runs</title>
      <p>In subtask 1, Batch1 to Batch3 over three periods are
provided by organizers as training data and Batch4 is as test
data. Thus, we used Batch1 and Batch2 as training data,
Batch3 as validation data. The predictions for the test data
were conducted by extracting features from all the test data,
followed by using the features to compute cosine similarity
to obtain the top 100 candidates.</p>
      <p>
        In the Run1, we used DistilBERT pre-trained on German
for text feature extraction and Faster R-CNN trained on
Visual Genome dataset for image feature extraction. In Run2,
we changed the image feature extraction to Swin
Transformer pre-trained on ImageNet 21K [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. In Run3 we
changed the batch size from 105 to 32.
4
      </p>
    </sec>
    <sec id="sec-9">
      <title>RESULT AND ANALYSIS</title>
      <p>The results of the submitted runs are summarized in Table 1.
The left column shows the name of the Runs. The evaluation
metrics shown are MRR@100, Recall@5, Recall@10,
Recall@50, and Recall@100. In the table, Recall@k is
written as R@k for simplicity.</p>
      <p>Table2 shows the comparison of evaluation metrics
between the data against Batch3 treated as validation data
and the test data. The results demonstrate that there is no
significant difference in distribution between the data
provided by organizers for training and the test data. This led
us to perform several analyses on Batch3.</p>
      <p>
        Figure 1 and 2 show the word frequency when found in
the top 5 search results and the word frequency when not
found in the top 100. The words displayed here are limited to
the nouns (lemma of tag) in the text that were extracted using
Tree Tagger [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. Comparing the two figures, we can see that
there is no significant difference in the words that frequently
appear in the success and failure cases. Therefore, the
performance of the method in this paper for articles with
similar content is considered to be low.
Table 2 : Comparison between Batch3 as validation data
and Batch4 as test data
      </p>
    </sec>
    <sec id="sec-10">
      <title>CONCLUSION AND FUTUREWORKS</title>
      <p>We changed the image feature extraction in ADAPT to Swin
Transformer and the text feature extraction to DistilBERT.
With this change, we achieved MRR@100 score of 0.07885
and Recall@100 score of 0.57807. This means that using our
retrieval method, we can find relevance with some accuracy
of 50% for matching images and text. Looking at the word
frequency against successful and unsuccessful search results,
the same words are frequently used, and we need to improve
our search method for articles with similar contents.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>MD. Zakir</given-names>
            <surname>Hossain</surname>
          </string-name>
          , Ferdous Sohel, Mohd Fairuz Shiratuddin, and
          <string-name>
            <given-names>Hamid</given-names>
            <surname>Laga</surname>
          </string-name>
          .
          <year>2019</year>
          .
          <article-title>A Comprehensive Survey of Deep Learning for Image Captioning</article-title>
          .
          <source>ACM Comput. Surv</source>
          .
          <volume>51</volume>
          ,
          <issue>6</issue>
          ,
          <string-name>
            <surname>Article 118</surname>
          </string-name>
          (
          <issue>Feb</issue>
          .
          <year>2019</year>
          ). https://doi.org/10.1145/3295748
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Nelleke</given-names>
            <surname>Oostdijk</surname>
          </string-name>
          , Hans van Halteren, Erkan Bas, ar, and
          <string-name>
            <given-names>Martha</given-names>
            <surname>Larson</surname>
          </string-name>
          .
          <year>2020</year>
          .
          <article-title>The Connection between the Text and Images of News Articles:New Insights for Multimedia Analysis</article-title>
          .
          <source>In Proceedings of The 12th Language Resources and Evaluation Conference</source>
          .
          <volume>4343</volume>
          -
          <fpage>4351</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Quang-Thuc</surname>
            <given-names>Nguyen</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tuan-Duy</surname>
            <given-names>Nguyen</given-names>
          </string-name>
          ,
          <article-title>Thang-Long Nguyen-Ho,</article-title>
          <string-name>
            <surname>Anh-Kiet</surname>
            <given-names>Duong</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xuan-Nhat</surname>
            <given-names>Hoang</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vinh-Thuyen</surname>
          </string-name>
          Nguyen-Truong,
          <string-name>
            <surname>Hai-Dang</surname>
            <given-names>Nguyen</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Minh-Triet Tran</surname>
          </string-name>
          .
          <year>2020</year>
          . HCMUS at MediaEval 2020:
          <article-title>Image-Text Fusion for Automatic News-Images Re-Matching</article-title>
          .
          <source>In Proceedings of the MediaEval 2020 Workshop</source>
          , Online,
          <fpage>14</fpage>
          -
          <lpage>15</lpage>
          December
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Wehrmann</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kolling</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          and
          <string-name>
            <given-names>C</given-names>
            <surname>Barros</surname>
          </string-name>
          ,
          <string-name>
            <surname>R.</surname>
          </string-name>
          <year>2020</year>
          .
          <article-title>Adaptive Cross-Modal Embeddings for Image-Text Alignment</article-title>
          .
          <source>Proceedings of the AAAI Conference on Artificial Intelligence</source>
          .
          <volume>34</volume>
          ,
          <issue>07</issue>
          (Apr.
          <year>2020</year>
          ),
          <fpage>12313</fpage>
          -
          <lpage>12320</lpage>
          . DOI:https://doi.org/10.1609/aaai.v34i07.
          <fpage>6915</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Sanh</surname>
            , Victor, Lysandre Debut, Julien Chaumond and
            <given-names>Thomas</given-names>
          </string-name>
          <string-name>
            <surname>Wolf</surname>
          </string-name>
          .
          <year>2019</year>
          .
          <article-title>DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter</article-title>
          . ArXiv abs/
          <year>1910</year>
          .01108 (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Krishna</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhu</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Groth</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          et al.
          <year>2017</year>
          .
          <article-title>Visual Genome: Connecting Language and Vision Using Crowdsourced Dense Image Annotations</article-title>
          . In
          <source>International Journal of Computer Vision</source>
          <volume>123</volume>
          ,
          <fpage>32</fpage>
          -
          <lpage>73</lpage>
          (
          <year>2017</year>
          ). DOI:https://doi.org/10.1007/s11263-016-0981-7
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Ze</given-names>
            <surname>Liu</surname>
          </string-name>
          , Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin,
          <string-name>
            <given-names>Baining</given-names>
            <surname>Guo</surname>
          </string-name>
          .
          <year>2021</year>
          . Swin Transformer:
          <source>Hierarchical Vision Transformer using Shifted Windows In Proceedings of the IEEE/CVF International Conference on Computer Vision</source>
          (ICCV),
          <year>2021</year>
          , pp.
          <fpage>10012</fpage>
          -
          <lpage>10022</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Tal</given-names>
            <surname>Ridnik</surname>
          </string-name>
          , Emanuel Ben-Baruch, Asaf Noy, Lihi Zelnik-Manor.
          <year>2021</year>
          .
          <article-title>ImageNet-21K Pretraining for the Masses</article-title>
          . ArXiv, abs/2104.10972.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>Helmut</given-names>
            <surname>Schmid</surname>
          </string-name>
          .
          <year>1995</year>
          .
          <article-title>Improvements In Part-of-Speech Tagging With an Application To German</article-title>
          .
          <source>In Proceedings of the ACL SIGDAT-Workshop</source>
          , pp
          <fpage>47</fpage>
          -
          <lpage>50</lpage>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>