<!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>Quest for Insight: Predicting Memorability based on Frequency of N-Grams</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Muhammad Mustafa Ali Usmani</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sumaiyah Zahid</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Muhammad Atif Tahir</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>National University of Computer and Emerging Sciences (FAST-NUCES)</institution>
          ,
          <addr-line>Karachi</addr-line>
          ,
          <country country="PK">Pakistan</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>With every passing minute the video content being generated is multiplying exponentially. To filter and analyze this content in order to keep the relevant videos, we take the help of memorability scores. In this paper we discuss a new approach to calculate the memorability of the video clips using the captions that are provided as descriptions. This quest by FAST-NUCES team is based on basic text normalization techniques, and memorability is predicted using both unigrams and bigrams. Results show that bigrams give a better accuracy as compared to unigrams as they add more context and meaning to the model. It was also inferred that the frequency and memorability of the words were inversely correlated.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>The world has progressed in such a way that we see media all around us all the time. This media
can come in the form of text written in newspapers, images on billboards, video advertisements
on television, or music on the radio, to name a few. We continually perceive a lot of the media
through diferent senses and the brain decides if we want to remember it or get rid of it. Since
there is a huge amount of content generated continuously that is floating around the brain
needs to filter what is important enough to remember. Memorability is a measure of how likely
any media is to be retained by the brain.</p>
      <p>Memorability can be afected by a lot of factors, the most important of which are the features
present in the media. Other things that can afect memorability can be the association of the
media with the person consuming it, or its cultural or religious importance to a particular group
of people.</p>
      <p>
        In the MediaEval challenge [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] the goal is to predict video memorability. As a side quest we
have used the text captions associated with videos to predict their influence on the memorability
of a video. The prediction of memorability will enable a system to identify if the video is relevant
and can be used for diferent purposes such as education, summarizing or storytelling.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Motivation</title>
      <p>Explainable artificial intelligence aims to decipher and decode the black box that is machine
learning. Using this concept as the motivation, after building the models for memorability
prediction, we move towards finding the factors that contribute most to the memorability of a
video.</p>
      <p>Video captions are analyzed to see what words independently contribute to the most
memorability. Furthermore, the captions are used to calculate the memorability score of the videos. A
comparison of of-the-shelf models is also presented as a foundation for more complex models.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Approach</title>
      <sec id="sec-3-1">
        <title>3.1. Data and Preprocessing</title>
        <p>
          The Memento10k [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ] dataset provided by the organizers was used to conduct the experiments.
This dataset consists of 10,000 three second videos with their memorability scores. Each video
clip has 5 human generated textual captions associated with it.
        </p>
        <p>
          To make the captions processable by the model and reduce randomness, we normalize it. The
captions are converted to lowercase then the stopping words and punctuations are removed.
The words in the captions are then lemmatized to reduce them to their base words. The captions
are broken down into pairs of words called bigrams [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ] or are tokenized into singular words
called unigrams.
        </p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. Data Mining</title>
        <p>After preprocessing, the frequency of each pair of words in the captions is computed and stored
in a dictionary. This pair will be referred to as a bigram. Each time the bigram appears in a
caption, the associated memorability is added to the total memorability score of the bigram.
At the end the total score of each bigram is divided by its frequency, this gives the average
memorability score of the bigram. The importance of the pair is given by</p>
        <p>= 1 − (/)
To get the final memorability score we multiply the average memorability of the bigram by its
importance. By multiplying the average memorability score by the importance we ensure that
the percentage of the bigram in the whole dataset is considered while computing the final score.
As a way of comparing the results obtained on bigrams and to see what value a pair of words
brings, we also apply the above outlined procedure on unigrams, those are single words.</p>
      </sec>
      <sec id="sec-3-3">
        <title>3.3. Exploratory Data Analysis</title>
        <p>The dataset and n-grams was explored to get a summary of its main characteristics and see how
each statistic afects the memorability. The dataset was analysed and explored while keeping in
mind the memorability scores that were provided in the dataset.</p>
      </sec>
      <sec id="sec-3-4">
        <title>3.4. Predicting Memorability using a caption</title>
        <p>
          The caption whose memorability we want to predict, known as the query caption, is preprocessed
in the same way as the data. Bigrams are created from this caption. For each bigram, its Jaccard
similarity [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ] with every other bigram in the dataset is computed.
        </p>
        <p>Jaccard similarity can have values ranging from 0 to 1. Where 0 indicates no similarity and 1
indicates the most similarity. After the similarities with each bigram in the dataset are obtained,
the most similar bigram is chosen and its memorability is added to the total memorability of
the query caption.</p>
        <p>In the same way the most similar memorability for each bigram in the query caption is
obtained by using jaccard similarity. All the obtained memorabilities are added and divided by
the total number of bigrams in the query caption to give the predicted memorability score of
the query caption.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Results and Analysis</title>
      <p>As a result of the exploratory data analysis, some statistics were summarized. It was seen that
in amongst all colors white appeared 2394 times throughout the dataset. Pink color had the
most memorability and blue had the least memorability. The frequency of men and women
is 5097 and 2625 respectively, with women having a higher memorability score. Car had the
most occurrences in the dataset. Amongst the vehicles van had the highest memorability while
helicopters had the lowest memorability.</p>
      <p>From the analysis of the dataset it was seen that the bigram [’group’, ’people’] had the highest
frequency in the dataset, and [’girl’, ’lip’] was the most memorable bigram from the dataset.
Table 1 lists some other bigrams that had high frequencies and memorability scores. Conversely
it also lists bigrams that have the worst memorability scores.</p>
      <p>Analysis of the unigram showed that man and people were the single most occurring words
in the dataset while sweaty, hotdog and artillery were some of the most memorable words in
the dataset.</p>
      <p>It was observed that memorability score and frequency of the word were inversely
proportional, i.e. rare words and objects are more memorable. The correlation of frequency and
memorability score came out to be -0.30.</p>
      <p>The prediction model using captions was tested on both unigrams and bigrams; a significant
decrease in error was observed when bigrams were used. Here the memorability scores that
came with the original dataset are used as ground truth. This is used to calculate the error and
accuracy with respect to the predicted memorability score of the caption. It was perceived that
the better accuracy when using bigrams was because they add more meaning and context as
compared to unigrams. (Table 2)</p>
      <p>
        For further analysis as a separate quest, some of the shelf machine learning models were
applied on the features that were provided by the organizers. The models were trained, tested
and validated on the same dataset, but video features instead of captions. The results were
then compared and captured. AlexNet, VGG and ResNet gave the best memorability scores
compared to features extracted from any other model. On the other hand it was seen that
AdaBoost[
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] gave the best performance on the features, and Linear Regression the worst. The
best performance given by AdaBoost is owed to the ensemble techniques used in the model.
      </p>
    </sec>
    <sec id="sec-5">
      <title>5. Discussion and Outlook</title>
      <p>It was seen that frequency is inversely correlated to memorability score which means that rare
words and objects are more memorable. In the dataset it was observed that some words that
occurred only once had a memorability score of 1.0.</p>
      <p>Bigrams were better than unigrams at predicting the memorability scores, as they provided
more meaning. Bigrams also performed better than the regression techniques. A potential
problem with prediction using text can be that long sentences will lose their context and
meaning.</p>
      <p>From the results we can conclude that AdaBoost gives the best results on features from all
models, and features from AlexNet give the best result as compared to other features. AdaBoost
gives the best results beacuse it used ensemble techniques to reduce overfitting and increase
the accuracy.</p>
    </sec>
    <sec id="sec-6">
      <title>6. Acknowledgement</title>
      <p>This work was supported in part by the Higher Education Commission (HEC) Pakistan, and in
part by the Ministry of Planning Development and Reforms under the National Center in Big
Data and Cloud Computing.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>L.</given-names>
            <surname>Sweeney</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. G.</given-names>
            <surname>Constantin</surname>
          </string-name>
          ,
          <string-name>
            <surname>C.-H. Demarty</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Fosco</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>García Seco de Herrera</surname>
            , S. Halder,
            <given-names>G.</given-names>
          </string-name>
          <string-name>
            <surname>Healy</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          <string-name>
            <surname>Ionescu</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Matran-Fernandez</surname>
            ,
            <given-names>A. F.</given-names>
          </string-name>
          <string-name>
            <surname>Smeaton</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <article-title>Sultana, Overview of the MediaEval 2022 predicting video memorability task</article-title>
          , in: MediaEval Multimedia Benchmark Workshop Working Notes,
          <year>2023</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>A.</given-names>
            <surname>Newman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Fosco</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Casser</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B. A.</given-names>
            <surname>McNamara</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Oliva</surname>
          </string-name>
          , Multimodal memorability:
          <article-title>Modeling efects of semantics and decay on video memorability</article-title>
          , CoRR abs/
          <year>2009</year>
          .02568 (
          <year>2020</year>
          ). URL: https://arxiv.org/abs/
          <year>2009</year>
          .02568. arXiv:
          <year>2009</year>
          .02568.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>C.-M. Tan</surname>
          </string-name>
          , Y. fang
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Lee</surname>
          </string-name>
          ,
          <article-title>The use of bigrams to enhance text categorization</article-title>
          ,
          <source>Inf. Process. Manag</source>
          .
          <volume>38</volume>
          (
          <year>2002</year>
          )
          <fpage>529</fpage>
          -
          <lpage>546</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>S.</given-names>
            <surname>Niwattanakul</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Singthongchai</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Naenudorn</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Wanapu</surname>
          </string-name>
          ,
          <article-title>Using of jaccard coeficient for keywords similarity</article-title>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>T.</given-names>
            <surname>Chengsheng</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Huacheng</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Bing</surname>
          </string-name>
          ,
          <article-title>Adaboost typical algorithm and its application research</article-title>
          ,
          <source>MATEC Web of Conferences</source>
          <volume>139</volume>
          (
          <year>2017</year>
          )
          <article-title>00222</article-title>
          . doi:
          <volume>10</volume>
          .1051/matecconf/201713900222.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>