<!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>Beyond Keywords: ChatGPT's Semantic Understanding for Enhanced Media Search</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Hoang-Chau Truong-Vinh</string-name>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Doan-Khai Ta</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Duc-Duy Nguyen</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Le-Thanh Nguyen</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Quang-Vinh Nguyen</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Chonnam National University</institution>
          ,
          <country country="KR">Korea</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Hanoi University of Science and Technology</institution>
          ,
          <country country="VN">Vietnam</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>University of Information Technology, Vietnam National University Ho Chi Minh City</institution>
          ,
          <country country="VN">Vietnam</country>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>Vietnamese-German University</institution>
          ,
          <country country="VN">Vietnam</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>In this paper, we present our participation in media content retrieval, in which we retrieve and connect the image for a specific article, such as news. We propose a method of using prompt engineering techniques and taking advantage of ChatGPT to generate descriptions of potential images in the article, which are then filtered and passed with the corresponding image into the text-image model. Our experiment demonstrates the eficiency of proposed framework in enhancing media content retrieval through high relevant and quality data, presenting an efective approach to combining the LLM model with media content problems.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        The NewsImage task aim to find images being suitable for corresponding articles, according to
Lommatzsch, Kille, Özgöbek Elahi and Dang-Nguyen.[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] This challenge attracts a lot of attention
and investigation, due to it complexity of the relationship between text and image, which is
sometimes direct; the image explicitly describes the text (recording the event, demonstrating
the situation); or sometimes indirect; the image explains in some abstract semantics to attract
the reader’s attention (the image is not taken in the event described in the text, or the image is
a symbolic representation of the text’s main theme); or sometimes the image is generated by
AI. Due to the aforementioned dificulties, this work intend to integrate the Large Language
Model (or LLM) - ChatGPT. Eversince it first appearance, Chat-GPT has shown great potential
in suggesting ideas for a given context, which suited the scenario of NewImages Retrieval where
ideas for an image to be used are various and didn’t appear to follow any rules, limiting the
existing methods to handle the problem. By leveraging prompting techniques and incorporating
ChatGPT, we provide valuable additional context for training dataset. Moreover, we adopt the
capabilities of the vision-language pretrained BLIP [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] model to explore the complex relationship
between text and image. The proposed strategy enhance the eficiency and efectiveness of
retrieving relevant media content based on pseudo-labeling and textual descriptions.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Related Work</title>
      <p>
        Exploring the relation between images and texts remains challenging because of their distinct
representation. Recent studies, such as Zhang et al. [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], introduced context-aware attention
networks to connect important areas in images with associated semantic words. Liu et al. [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]
captured both image-sentence level relations rather than focusing exclusively on the
objectword level. In the NewsImages task, news articles may describe elements not depicted in the
accompanying images, requiring methods that comprehend more complex relationships. Yang
et al. [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] utilized the power of the pretrained model CLIP to boost the performance. Liang et
al. [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] highlighted the significance of extending context by enriching articles through textual
concept expansion, providing potential co-occurrence concepts related to the images. However,
we are unaware of any previous works that exploit LLMs to bridge the semantic gap between
news articles and their cover images.
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. Approach</title>
      <sec id="sec-3-1">
        <title>3.1. Overview</title>
        <p>
          In this section, we present the overall proposed framework taking advantage of ChatGPT and
the BLIP [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ] model to match news and corresponding images. We utilized ChatGPT to create a
new quality dataset by incorporating a greater amount of highly relevant information compared
to titles or texts of the existing data, from where we build the model based on the power of
BLIP. The proposed framework will be explained in further detail in the following subsections.
        </p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. Data Collection and Construction</title>
        <p>
          Text Processing. We preprocess the text by English translating (Google API), lowercasing,
expanding contractions, removing stop words and punctuation. Additionally, the Ekphrasis
library [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] helps correct misspellings and word segmentation issues for cleaner text. Through
performance experiments, we determine the optimal text length of 40 for the model input.
Text-Image Pair Construction. To obtain strongly aligned text-image pairs for fine-tuning
BLIP, we leverage the state-of-the-art ChatGPT agent to automatically generate descriptive
captions for images instead of expensive human annotation [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ] [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ]. Specifically, we utilize
requests to access the URLs provided in the training data. We then use the Beautiful Soup
library to extract any Image Captions (if available) and all text from the webpage. For all the text
extracted, we provide it to ChatGPT with a carefully selected prompt "Summarize this article
and suggest 5 images to use as the cover image, each no more than one sentence" to generate an
additional 5 image descriptions. The RT dataset uses image descriptions and organizers’ images
to create text-image pairs, resulting in 5 pairs per article, and additional of 1 or 2 pairs is formed
due to image captions if present. For the GDELT dataset, one pair is formed per article using
the English title and image. Key keywords from the article text are extracted and paired with
the image to form supplementary text-image pairs.
        </p>
        <p>In our approach, each ChatGPT-generated caption or article title is fed into the BLIP text
encoder, and each corresponding image is fed into the BLIP image encoder. After we compute
the cosine similarity between textual and visual feature vectors, we filter out pairs with similarity
below 0.25. This thresholding balances data size and meaning quality. Ultimately, we constructed
a filtered training dataset with tight image-text semantic alignment for adapting our multimodal
model.</p>
        <p>
          Model Fine-tuning. Having selected relevant text-image training pairs, we further enhance
BLIP’s multimodal representation learning capabilities via model fine-tuning. Previous works
[
          <xref ref-type="bibr" rid="ref10">10</xref>
          ] [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ] have demonstrated that adapting pre-trained models on downstream datasets can
better align the embedding space for the target task.
        </p>
        <p>Specifically, we append a classification head atop the dual BLIP encoders to predict matching
vs non-matching pairs based on feature similarity. The fine-tuning process minimizes binary
cross-entropy loss between predicted and ground-truth matching labels. This contrastive
learning serves to draw associated modalities closer in the embedded space while separating
unrelated pairs. After fine-tuning convergence, we evaluate the model on an image-text retrieval
task using article titles as queries. Image and text encodings are extracted and ranked by cosine
similarity. Top-1 accuracy measures how well the model can retrieve the ground-truth title
associated with each image. For fine-tuning, the initial learning rate was set to 1e-5 with 0.05
weight decay for regularization. The rate gradually decayed to stabilize convergence. These
hyperparameters allowed adaptive updates to the pre-trained parameters without completely
overwriting them.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Results and Analysis</title>
      <p>
        We submitted five runs for each dataset (GDELT1, GDELT2, RT), with the following details.
• Run #1: For this result, we utilized the pretrained model of BLIPv1 [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] on the COCO
dataset to extract embeddings for both article titles and images. We then employed cosine
similarity to calculate the similarity between images and titles, selecting the top 100
images with the highest similarity.
• Run #2: Similar to Run #1, in this result, we used the pretrained model of BLIPv2 [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ].
      </p>
      <p>The purpose of this experiment was to evaluate which model, BLIPv1 or BLIPv2, performs
better on the given data.
• Run #3: Upon observing that the results of BLIPv1 and BLIPv2 did not difer significantly
in the first two runs, and considering that BLIPv1 required less time during the training
process compared to BLIPv2, we decided to use the BLIPv1 model for further training.</p>
      <p>We applied the method described in 3.1 to achieve the results this time.
• Run #4: In the fourth run, we continued to use the BLIPv1 model as in Run #3. For the
GDELT1, there were no changes in this training session. However, for the RT dataset,
beside using ChatGPT to suggest the cover-image descriptions, we also prompted for
keywords which described the article content. Other aspects of the data remained
unchanged.</p>
      <p>Through the utilization of our filtering framework, we are able to generate highly precise
texts for article cover images during the training process. This method outperforms the reliance
solely on article titles, which often have inconsistencies and noise. As a result, the quality of our
results has significantly improved. In Run #4, we achieved the best outcome, with the dataset
GDELT2 performing the best. Our score with the R@100 metric was 0.73800, and there was
also notable improvement for other datasets in Run #4.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Discussion and Outlook</title>
      <p>Despite inconsistent performance throughout the three datasets, we have proved the promising
future of reducing the semantic distance in NewsImage task by integrating large language
models such as ChatGPT into the pipeline. This shed light on another use case of such a gold
mine of LLMs by suggesting descriptions for cover images of news articles based on their
content. This description is then fed into generative models to create more-relevant images. In
future research, we aim to explore the concept of AI-generated images, where pictures are not
captured by humans but produced by machines. The emergence of AI-generated pictures has the
potential to threaten media cohesion, spark discussions among publishers and photographers,
and potentially facilitate the dissemination of misleading information through fabricated images.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>A.</given-names>
            <surname>Lommatzsch</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Kille</surname>
          </string-name>
          , Ö. Özgöbek,
          <string-name>
            <given-names>M.</given-names>
            <surname>Elahi</surname>
          </string-name>
          ,
          <string-name>
            <surname>D.-T.</surname>
          </string-name>
          Dang-Nguyen,
          <source>News Images in MediaEval</source>
          <year>2023</year>
          , CEUR Workshop Proceedings,
          <year>2024</year>
          . URL: http://ceur-ws.org/.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>J.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Xiong</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. C. H.</given-names>
            <surname>Hoi</surname>
          </string-name>
          ,
          <article-title>BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generation</article-title>
          ,
          <source>CoRR abs/2201</source>
          .12086 (
          <year>2022</year>
          ). URL: https://arxiv. org/abs/2201.12086. arXiv:
          <volume>2201</volume>
          .
          <fpage>12086</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Q.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Lei</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. Z.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <article-title>Context-Aware Attention Network for Image-Text Retrieval</article-title>
          ,
          <source>in: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)</source>
          ,
          <year>2020</year>
          , pp.
          <fpage>3533</fpage>
          -
          <lpage>3542</lpage>
          . doi:
          <volume>10</volume>
          .1109/CVPR42600.
          <year>2020</year>
          .
          <volume>00359</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>C.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Mao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Xie</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <surname>Y. Zhang,</surname>
          </string-name>
          <article-title>Graph Structured Network for Image-Text Matching</article-title>
          , CoRR abs/
          <year>2004</year>
          .00277 (
          <year>2020</year>
          ). URL: https://arxiv.org/abs/
          <year>2004</year>
          .00277. arXiv:
          <year>2004</year>
          .00277.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Yang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Yi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Wenbo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Jing</surname>
          </string-name>
          ,
          <string-name>
            <surname>S.</surname>
          </string-name>
          <article-title>Jiande, CLIP Pre-trained Models for Cross-modal Retrieval in NewsImages 2022</article-title>
          , in: Working
          <source>Notes Proceedings of the MediaEval 2022 Workshop, CEUR Workshop Proceedings</source>
          ,
          <year>2022</year>
          . URL: http://ceur-ws.org/.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>L.</given-names>
            <surname>Mingliang</surname>
          </string-name>
          , L. Martha,
          <article-title>Textual Concept Expansion for Text-Image Matching within Online News Content</article-title>
          ,
          <source>in: Working Notes Proceedings of the MediaEval 2022 Workshop, CEUR Workshop Proceedings</source>
          ,
          <year>2022</year>
          . URL: http://ceur-ws.org/.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>C.</given-names>
            <surname>Baziotis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Pelekis</surname>
          </string-name>
          , C. Doulkeridis, DataStories at SemEval
          <article-title>-2017 task 4: Deep LSTM with attention for message-level and topic-based sentiment analysis</article-title>
          ,
          <source>in: Proceedings of the 11th International Workshop on Semantic Evaluation (SemEval-2017)</source>
          ,
          <article-title>Association for Computational Linguistics</article-title>
          , Vancouver, Canada,
          <year>2017</year>
          , pp.
          <fpage>747</fpage>
          -
          <lpage>754</lpage>
          . URL: https://aclanthology.org/S17-2126. doi:
          <volume>10</volume>
          .18653/v1/
          <fpage>S17</fpage>
          -2126.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>T.</given-names>
            <surname>Lin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Maire</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. J.</given-names>
            <surname>Belongie</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L. D.</given-names>
            <surname>Bourdev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. B.</given-names>
            <surname>Girshick</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Hays</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Perona</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Ramanan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Dollár</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C. L.</given-names>
            <surname>Zitnick</surname>
          </string-name>
          ,
          <string-name>
            <surname>Microsoft</surname>
            <given-names>COCO</given-names>
          </string-name>
          :
          <article-title>common objects in context</article-title>
          ,
          <source>CoRR abs/1405</source>
          .0312 (
          <year>2014</year>
          ). URL: http://arxiv.org/abs/1405.0312. arXiv:
          <volume>1405</volume>
          .
          <fpage>0312</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>S.</given-names>
            <surname>Piyush</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Nan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Sebastian</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Radu</surname>
          </string-name>
          , Conceptual Captions:
          <article-title>A Cleaned, Hypernymed, Image Alt-text Dataset For Automatic Image Captioning, Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Long Papers</article-title>
          ),
          <year>2018</year>
          , pp.
          <fpage>2556</fpage>
          -
          <lpage>2565</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>S.</given-names>
            <surname>Gururangan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Marasovic</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Swayamdipta</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Lo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I.</given-names>
            <surname>Beltagy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Downey</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N. A.</given-names>
            <surname>Smith</surname>
          </string-name>
          ,
          <string-name>
            <surname>Don't Stop</surname>
          </string-name>
          <article-title>Pretraining: Adapt Language Models to Domains and Tasks</article-title>
          , CoRR abs/
          <year>2004</year>
          .10964 (
          <year>2020</year>
          ). URL: https://arxiv.org/abs/
          <year>2004</year>
          .10964. arXiv:
          <year>2004</year>
          .10964.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>K.</given-names>
            <surname>Desai</surname>
          </string-name>
          , J. Johnson,
          <article-title>VirTex: Learning Visual Representations from Textual Annotations</article-title>
          , CoRR abs/
          <year>2006</year>
          .06666 (
          <year>2020</year>
          ). URL: https://arxiv.org/abs/
          <year>2006</year>
          .06666. arXiv:
          <year>2006</year>
          .06666.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>J.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Savarese</surname>
          </string-name>
          , S. Hoi, BLIP-2:
          <string-name>
            <given-names>Bootstrapping</given-names>
            <surname>Language-Image</surname>
          </string-name>
          Pre
          <article-title>-training with Frozen Image Encoders</article-title>
          and
          <source>Large Language Models</source>
          ,
          <year>2023</year>
          . arXiv:
          <volume>2301</volume>
          .
          <fpage>12597</fpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>