<!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>Prompt-based Alignment of Headlines and Images Using OpenCLIP</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Lucien Heitz</string-name>
          <email>heitz@ifi.uzh.ch</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Yuin Kwan Chan</string-name>
          <email>yuinkwan.chan@uzh.ch</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Hongji Li</string-name>
          <email>hongji.li@uzh.ch</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Kerui Zeng</string-name>
          <email>kerui.zeng@uzh.ch</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Abraham Bernstein</string-name>
          <email>bernstein@ifi.uzh.ch</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Luca Rossetto</string-name>
          <email>rossetto@ifi.uzh.ch</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>UZH - Digital Society Initiative</institution>
          ,
          <country country="CH">Switzerland</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Zurich</institution>
          ,
          <country country="CH">Switzerland</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>In this paper, we describe how we leverage OpenCLIP to generate automated image recommendations for online news articles for the MediaEval 2023 NewsImages task. By exploring diferent text prompting techniques, a total of five retrieval approaches were devised. Results show, however, that the bestperforming approach is an unmodified CLIP version with the raw article headline as input. We reflect on this finding and its implication for future NewsImages tasks.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        In recent years, methods for aligning visual media, such as images with short textual descriptions
covering their semantic content, have enjoyed increased attention. The introduction of the first
CLIP model [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] can be considered a step-change in this regard. In this paper, we leverage these
methods for our contribution to the MediaEval 2023 NewsImages task, which aims to align
news articles with fitting images [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
      <p>Given a non-literal relationship between the content of a news article and its corresponding
image, this task is slightly diferent from the more classical problem of semantic text and image
alignment. An additional complicating factor is that a news article is often substantially longer
than an image caption, introducing further challenges.</p>
      <p>
        In our approach outlined in this paper, we rely on an OpenCLIP model [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], pre-trained on
the LAION-5B dataset [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. It consists of over five billion web-sourced image-caption pairs,
which is six orders of magnitude larger than the provided task training set. Furthermore, as the
LAION-5B dataset is web-sourced, it features a relevant subset of online news images.
      </p>
      <p>
        We opt not to fine-tune the OpenCLIP model but instead experiment with diferent ways
of how best to generate textual input from the available article data. The textual input we
generated serves as a pseudo caption for a news article. The motivation behind doing so is due to
distinct linguistic features of news headlines (e.g., frequent use of noun strings and omission of
auxiliary verbs [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]). These features set headlines apart from image captions, the latter of which
was used to train the CLIP model. With the input sensitivity of CLIP in mind [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], we, therefore,
tried to close this linguistic gap when using headlines as input prompts for better query results.
      </p>
      <p>The remainder of this paper is structured as follows: Section 2 describes the details of the
setup of our retrieval pipeline, we then present the run evaluations in Section 3, and we conclude
our paper with a discussion of these results in Section 4, together with the lessons learned and
the implications for the next iterations of this task.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Approach</title>
      <p>Our main approach for the image retrieval task is generating a representative pseudo caption
from the textual content of an article. This text will then be used as an input prompt for an
unmodified OpenCLIP model in order to select fitting images. The motivation behind focusing
on the text prompt is twofold: First, there are stylistic diferences between article headlines and
leads on the one hand and image captions—which is what CLIP was trained on—on the other
hand. Second, the dataset provided for the task was too small to meaningfully fine-tune the
CLIP model, which is why an unmodified version was used instead.</p>
      <p>In total, we used five diferent text generation strategies and submitted one run for each
approach. We discuss the details of each of the five approaches in the overview below.
Run 1 - Raw Title For the first run, simply use the article’s title as it is stored in the provided
dataset. No additional tags, leads, or outlet information were used. This approach serves
as the internal baseline for assessing the performance of the subsequent approaches.
Run 2 - Pre-processed Title For the second run, we included a text-cleaning pre-processing
step. This included removing stop words, punctuation, and other special characters that
could potentially result from encoding mismatches (e.g., ‘Ã’ or ‘¢’). Furthermore, we
removed any mention of the news outlet and converted the entire text to lowercase. The
motivation behind doing so is to create a structurally more caption-like input text without
performing any semantic manipulation.</p>
      <p>Run 3 - Raw Tags Run three uses the tags provided in the dataset rather than the article title.</p>
      <p>The tags are concatenated into a string using a comma as a separator. As the RT dataset
did not contain any tags, we used the article text instead. The inclusion of tags allows
us to include more information, potentially on what is depicted in the image, without
exceeding the token limit of the text encoder of the CLIP model.</p>
      <p>
        Run 4 - T5 For the fourth run, we use a pre-trained T5 model [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] to automatically rephrase the
article text into a descriptive statement. The goal of this text transformation is to represent
the information contained in an article’s title in a form that is closer to a traditional image
caption or alt-text, which comprises the training data of the OpenCLIP model. This
rewriting aims to produce text that is both structurally and semantically similar to an
image caption.
      </p>
      <p>
        Run 5 - NER-TextRank 10 For run five, we used named entity recognition provided by the
spaCy1 framework to extract relevant entities from the article title and text. The extracted
entities were scored using TextRank [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] to sort them by predicted relevance and remove
generic ones. The entities were combined into a string (using the same procedure as in
Run 3), to again produce text similar to an image caption.
1Oficial website of spaCy: https://www.spacy.io/
      </p>
      <p>The diferent methods of the run submissions are a first approach to create pseudo captions
for news headlines. However, it remains an open question what the recommendations and
precise requirements are that result in an optimal rephrasing of the article title. Please see
Section 4 for a more detailed discussion of alternative approaches.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Results and Analysis</title>
      <p>Table 1 summarizes the achieved results from the five submitted runs. The numbers show that
Run 1 achieved the highest scores for all Hits@k across all three task datasets; using the raw
title as input to the CLIP model substantially outperformed all other approaches.</p>
      <p>Text cleaning (Run 2) and rephrasing (Run 3) did not improve the retrieval process by
producing more caption-like input text. Rewriting news article headlines and teasers into
statement sentences with T5 seems to have the opposite efect, as it did not improve the raw
title. Similarly, adding named entities to the input text via text augmentation processes (Run 3
and Run 5) seems to mainly introduce more noise into the retrieval process. TextRank’s text
keyword extraction was especially detrimental to the retrieval tasks, resulting in the overall
lowest scores (see Table 1, Run 5).</p>
      <p>Comparing the achieved scores across datasets, we see our approach performing best on
GDELT1, followed by GDELT2, and RT. The analysis of the results suggests that this is mainly
due to the inclusion of AI-generated content in GDELT2 and RT. The reason for generated
content performing worse might be due to the fact that the contents of the image, e.g., human
subjects, can be heavily stylized in the GDELT1 and RT datasets.</p>
      <p>Evaluations of the training runs showed that retrieving the correct image—if the matching
image was AI-generated—was highly dependent on knowing the details of the model used
to create the image in the first place. As this information was not communicated for the
provided task datasets, this made it very dificult to include any AI-specific text rephrasing or
augmentation technique to account for the characteristics of the AI images properly.</p>
      <p>Overall, we do take the performance of the raw title baseline as an indicator for editors to
select images mainly based on the headline of a news story. As such, we think generating
pseudo-captions remains a worthwhile strategy to pursue.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Discussion and Outlook</title>
      <p>Leading up to the submission, we explored several alternative text-image embedding approaches.
Approaches included training feed-forward networks, LSTM options, and Siamese networks.
We combined these approaches with various techniques to rewrite the text prompts, such as
employing vector combinations of title, lead, tags, and text. Unfortunately, no approach was
able to beat the baseline of using the raw article title as input for the OpenCLIP model.</p>
      <p>We believe this shortcoming is partly due to the limited size of our training dataset when
exploring alternative text-image embedding approaches. The task dataset was too small to serve
as a training set for model fine-tuning. For future iterations of the NewsImages task, having
access to a larger training dataset is, therefore, critical.</p>
      <p>Looking at future iterations of the NewsImages task, we would like to highlight two possible
strategies that could lead to an improvement of the retrieval pipeline. The first option to explore
is creating a dedicated model that transforms article headlines into caption-like descriptions.
For that, we would need to more closely investigate outlet- and story-specific requirements
for rephrasing. The second option is to take the current pipeline and reverse it. The resulting
workflow would start with the image selection, generating a caption for each image, and then
ifnding the most closely matching title/news headline.</p>
      <p>
        In concluding our working notes paper, we want to briefly comment on two shortcomings we
saw in connection with the evaluation process and goal of the task. The first point we want to
address is that by allowing one and only one image to be a valid match for a given news article,
the evaluation process seemingly implies there to be a one-to-one relationship between article
text and image (cf. [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]). This introduces an artificial quality standard that does not exist in the
editorial process of selecting an image for a news article. For a given story, editors can select
from among multiple images. Ideally, this is reflected in the evaluation process; the fit of a given
image-article pair should have a more fine-grained score than the current binary one of either
being the original image or not.
      </p>
      <p>Our second point focused on AI-generated content. We found that the inclusion of
AIgenerated images in GDELT2 and RT not only led to an overall lower score compared to GDELT1,
but their inclusion potentially entails a major shift in the task’s goal. Instead of focusing on
providing meaningful image recommendations for article headlines, the task instead becomes
more focused on trying to recreate the exact image generation pipelines.</p>
      <p>
        For more details on the two highlighted aspects, please see our Quest for Insight paper [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
Acknowledgments This work was partially funded by the Digital Society Initiative (DSI) of
the University of Zurich under a grant of the DSI Excellence Program and the Swiss National
Science Foundation through project MediaGraph (contract no. 202125).
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>A.</given-names>
            <surname>Radford</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. W.</given-names>
            <surname>Kim</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Hallacy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Ramesh</surname>
          </string-name>
          , G. Goh,
          <string-name>
            <given-names>S.</given-names>
            <surname>Agarwal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Sastry</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Askell</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Mishkin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Clark</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Krueger</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Sutskever</surname>
          </string-name>
          ,
          <article-title>Learning transferable visual models from natural language supervision</article-title>
          , in: M.
          <string-name>
            <surname>Meila</surname>
          </string-name>
          , T. Zhang (Eds.),
          <source>Proceedings of the 38th International Conference on Machine Learning</source>
          ,
          <string-name>
            <surname>ICML</surname>
          </string-name>
          <year>2021</year>
          ,
          <volume>18</volume>
          -
          <issue>24</issue>
          <year>July 2021</year>
          ,
          <string-name>
            <given-names>Virtual</given-names>
            <surname>Event</surname>
          </string-name>
          , volume
          <volume>139</volume>
          <source>of Proceedings of Machine Learning Research, PMLR</source>
          ,
          <year>2021</year>
          , pp.
          <fpage>8748</fpage>
          -
          <lpage>8763</lpage>
          . URL: http://proceedings.mlr.press/v139/radford21a. html.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>A.</given-names>
            <surname>Lommatzsch</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Kille</surname>
          </string-name>
          , Özlem Özgöbek,
          <string-name>
            <given-names>M.</given-names>
            <surname>Elahi</surname>
          </string-name>
          ,
          <string-name>
            <surname>D.-T.</surname>
          </string-name>
          Dang-Nguyen,
          <article-title>News Images in MediaEval 2023</article-title>
          , in: Working
          <source>Notes Proceedings of the MediaEval 2023 Workshop</source>
          ,
          <year>2024</year>
          , p.
          <fpage>4</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>M.</given-names>
            <surname>Cherti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Beaumont</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Wightman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Wortsman</surname>
          </string-name>
          , G. Ilharco,
          <string-name>
            <given-names>C.</given-names>
            <surname>Gordon</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Schuhmann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Schmidt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Jitsev</surname>
          </string-name>
          ,
          <article-title>Reproducible scaling laws for contrastive language-image learning</article-title>
          ,
          <source>in: IEEE/CVF Conference on Computer Vision</source>
          and Pattern Recognition,
          <string-name>
            <surname>CVPR</surname>
          </string-name>
          <year>2023</year>
          , Vancouver, BC, Canada, June 17-24,
          <year>2023</year>
          , IEEE,
          <year>2023</year>
          , pp.
          <fpage>2818</fpage>
          -
          <lpage>2829</lpage>
          . URL: https://doi.org/10.1109/CVPR52729.
          <year>2023</year>
          .
          <volume>00276</volume>
          . doi:
          <volume>10</volume>
          .1109/CVPR52729.
          <year>2023</year>
          .
          <volume>00276</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>C.</given-names>
            <surname>Schuhmann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Beaumont</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Vencu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Gordon</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Wightman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Cherti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Coombes</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Katta</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Mullis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Wortsman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Schramowski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Kundurthy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Crowson</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Schmidt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Kaczmarczyk</surname>
          </string-name>
          , J. Jitsev, LAION-5B:
          <article-title>an open large-scale dataset for training next generation image-text models</article-title>
          ,
          <source>in: NeurIPS</source>
          ,
          <year>2022</year>
          . URL: http://papers.nips.cc/paper_files/paper/2022/hash/ a1859debfb3b59d094f3504d5ebb6c25-Abstract-Datasets_and_Benchmarks.html.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>S.</given-names>
            <surname>Marcoci</surname>
          </string-name>
          , et al.,
          <article-title>Some typical linguistic features of english newspaper headlines, Linguistic</article-title>
          and Philosophical
          <string-name>
            <surname>Investigations</surname>
          </string-name>
          (
          <year>2014</year>
          )
          <fpage>708</fpage>
          -
          <lpage>714</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>C.</given-names>
            <surname>Rafel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Shazeer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Roberts</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Narang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Matena</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Zhou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P. J.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <article-title>Exploring the limits of transfer learning with a unified text-to-text transformer</article-title>
          ,
          <source>J. Mach. Learn. Res</source>
          .
          <volume>21</volume>
          (
          <year>2020</year>
          )
          <volume>140</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>140</lpage>
          :
          <fpage>67</fpage>
          . URL: http://jmlr.org/papers/v21/
          <fpage>20</fpage>
          -
          <lpage>074</lpage>
          .html.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>F.</given-names>
            <surname>Barrios</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>López</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Argerich</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Wachenchauzer</surname>
          </string-name>
          ,
          <article-title>Variations of the similarity function of textrank for automated summarization</article-title>
          ,
          <source>CoRR abs/1602</source>
          .03606 (
          <year>2016</year>
          ). URL: http://arxiv.org/abs/1602.03606. arXiv:
          <volume>1602</volume>
          .
          <fpage>03606</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>L.</given-names>
            <surname>Heitz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Bernstein</surname>
          </string-name>
          ,
          <string-name>
            <surname>L. Rossetto,</surname>
          </string-name>
          <article-title>An empirical exploration of perceived similarity between news article texts and images</article-title>
          ,
          <source>in: Working Notes Proceedings of the MediaEval 2023 Workshop</source>
          ,
          <year>2024</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>