<!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>CLEF 2024 JOKER Task 2 : Using RoBERTa and Bert-uncased for Humour Classification According to Genre and Technique</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Sarvesh Narayanan</string-name>
          <email>sarveshnarayanan4@gmail.com</email>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jayasimman J</string-name>
          <email>jayasimmanj27@gmail.com</email>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Shiva Ganesh V</string-name>
          <email>shivaviswanathan07@gmail.com</email>
        </contrib>
        <contrib contrib-type="author">
          <string-name>SSN College of Engineering</string-name>
        </contrib>
      </contrib-group>
      <pub-date>
        <year>2024</year>
      </pub-date>
      <abstract>
        <p>Humor classification is a complex task in natural language processing (NLP) that involves identifying and categorizing humor based on its various forms and techniques. This study explores the use of two pre-trained transformer models, RoBERTa and BERT-uncased, for humor classification according to genre and technique. The models are fine-tuned on a dataset annotated with diferent humor genres (such as sarcasm, irony, exaggerations and witty jokes). The performance of each model is evaluated based on accuracy, precision, recall, and F1-score. Our results demonstrate that both RoBERTa and BERT-uncased are efective in capturing the nuances of humor, with RoBERTa showing a slight edge in overall performance. This research highlights the potential of transformer models in advancing the field of humor classification and provides insights into their applicability for more nuanced and context-aware NLP tasks.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Humor Classification</kwd>
        <kwd>Natural Language Processing (NLP)</kwd>
        <kwd>RoBERTa</kwd>
        <kwd>BERT-uncased</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>Humor is an intricate aspect of human communication that poses significant challenges for natural
language processing (NLP). The ability to recognize and classify humor is crucial for enhancing
humancomputer interactions, particularly in applications like virtual assistants, chatbots, and social media
analysis. Despite its importance, automatic humor classification remains a dificult task due to the
subjective and context-dependent nature of humor.</p>
      <sec id="sec-1-1">
        <title>1.1. Motivation for Research:</title>
        <p>The motivation for this research stems from the need to improve the accuracy and sophistication of
humor classification systems. Previous approaches have often struggled to capture the subtle nuances
and diverse techniques of humor, which can vary significantly across diferent genres. By leveraging
advanced transformer models such as RoBERTa and BERT-uncased, we aim to develop more robust
and nuanced humor classification methods. These models, pre-trained on vast amounts of text data,
have shown remarkable performance in various NLP tasks and ofer the potential to enhance humor
recognition.</p>
      </sec>
      <sec id="sec-1-2">
        <title>1.2. Task Description:</title>
        <p>
          This paper focuses on humor classification according to genre and technique, as outlined in the CLEF
2024 JOKER task 2 [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ][
          <xref ref-type="bibr" rid="ref2">2</xref>
          ]. The task involves categorizing humorous texts into predefined genres (such
as satire, sarcasm, and puns) and techniques (such as wordplay, incongruity, and exaggeration). The
        </p>
        <p>JOKER lab, introduced in several key publications, provides a comprehensive dataset for this task,
allowing for rigorous evaluation of our models.</p>
      </sec>
      <sec id="sec-1-3">
        <title>1.3. State-of-the-Art Overview:</title>
        <p>Recent advancements in NLP have been dominated by transformer-based models, which have achieved
state-of-the-art results in numerous tasks. RoBERTa, a robustly optimized BERT approach, has
demonstrated superior performance due to its extensive pre-training and fine-tuning capabilities.
BERTuncased, known for its bidirectional training of transformers, excels in understanding context and
nuance in text. Prior studies have explored these models for various classification tasks, but their
application to humor classification remains under-explored. This study seeks to address this gap by
evaluating the performance of RoBERTa and BERT-uncased models in humor classification tasks.</p>
        <p>This structured approach aims to provide a comprehensive understanding of the application of
transformer models in humor classification, highlighting their strengths and limitations in this nuanced
task.</p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>2. Approach</title>
      <p>
        The dataset for this task is provided by the CLEF 2024 JOKER lab, which focuses on automatic humor
analysis. The dataset consists of humorous texts categorized according to genre (such as sarcasm, irony,
exaggerations and witty jokes). This diverse dataset enables the development and evaluation of models
capable of distinguishing between diferent types and techniques of humor. The two datasets train-input
and train-qrels are combined to have the format as in Table 1 .
BERT [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] (Bidirectional Encoder Representations from Transformers) is a transformer model
pretrained on a large corpus of English text. The uncased version ignores case distinctions, making it
robust to variations in capitalization. BERT-uncased is fine-tuned for humor classification by adding a
classification layer on top of the pre-trained model.
2.0.2. RoBERTa
      </p>
      <sec id="sec-2-1">
        <title>2.1. Training Setup</title>
        <p>
          RoBERTa [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ] (A Robustly Optimized BERT Pretraining Approach) builds on BERT’s architecture with
improvements in pre-training methodology. RoBERTa undergoes more extensive training on a larger
dataset, resulting in enhanced performance.
        </p>
        <p>• Data Split: The dataset is split into training, validation, and test sets with an 80-20 ratio.
• Batch Size: 8
• Learning Rate: 5e-5
• Epochs: 3
• Optimizer: Adam
• Loss Function: Sparse Categorical Cross-Entropy Loss</p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2. Fine-Tuning Process</title>
        <p>The models are fine-tuned using the training set, with hyperparameters optimized based on performance
on the validation set. Fine-tuning involves adjusting the weights of the pre-trained model to minimize
the classification error.</p>
      </sec>
      <sec id="sec-2-3">
        <title>2.3. Model Evaluation</title>
        <p>The performance of the models is evaluated based on their accuracy in distinguishing between diferent
genres and techniques of humor. By evaluating the models based on accuracy, we aim to assess
their ability to capture the nuances of humor and classify texts correctly. This metric provides a
straightforward measure of the models’ performance and their efectiveness in humor classification
tasks.</p>
        <p>This methodological approach ensures a rigorous and reproducible framework for humor
classification, leveraging state-of-the-art NLP models to capture the complexities of humor in text.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Results</title>
      <p>Our study delved into the realm of humor classification using state-of-the-art transformer models,
specifically RoBERTa and BERT-uncased. The results of our experiment showcase the efectiveness of
these models in deciphering the intricacies of humor, albeit with some limitations.</p>
      <p>Overall, our models demonstrated competitive performance, with RoBERTa slightly surpassing
BERTuncased by achieving an accuracy of 70% compared to 67%. This indicates that both models are adept
at grasping the nuances of humor, as evidenced by their ability to classify jokes based on genre and
technique with reasonable accuracy.</p>
      <p>model
roberta
bert uncased
accuracy</p>
      <p>SD_precision</p>
      <p>SD_recall SD_f1-score</p>
      <p>SD_support
0.70
0.67
0.37
0.69
0.66
0.84
0.47
0.76
38.00
91.00</p>
      <p>Despite their overall efectiveness, both RoBERTa and BERT-uncased exhibited challenges when
confronted with certain types of humor. Exaggeration-style jokes and those heavily reliant on cultural
references proved to be particularly problematic for the models. These types of humor often require a
deep understanding of context and cultural nuances, which may have posed dificulties for the models’
classification abilities.</p>
      <p>To address these challenges and further enhance the performance of transformer models in humor
classification, several strategies could be explored. One approach could involve incorporating additional
contextual information, such as cultural context or background knowledge, into the models. This could
potentially help the models better understand and classify jokes that rely heavily on cultural references.</p>
      <p>Furthermore, fine-tuning strategies tailored to these specific types of humor could also prove beneficial.
By focusing on optimizing the models’ performance on exaggeration-style jokes and culturally nuanced
humor, we may be able to improve their overall classification accuracy.</p>
      <p>As a result, while transformer models like RoBERTa and BERT-uncased show promise for humor
classification, there is still room for improvement, especially when dealing with more nuanced forms
of humor. Future research in this area could focus on developing more sophisticated models and
ifne-tuning strategies to better capture the complexities of humor in text.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Discussion</title>
      <p>The experiments conducted demonstrate the potential of transformer-based models in humor
classification. Both BERT-uncased and RoBERTa showed considerable efectiveness, but several challenges
remain. These models struggled with jokes heavily dependent on cultural references or requiring an
understanding of specific exaggerations. This indicates a need for incorporating more diverse training
data and possibly integrating external knowledge sources to handle such cases better. Additionally, the
importance of model interpretability should not be overlooked, as understanding why a model classifies
a text as humorous is crucial for further development and trust in AI systems.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Future Work</title>
      <p>Future work could involve exploring more sophisticated ensemble methods, incorporating additional
features such as sentiment and semantic similarity, and applying these models to larger and more diverse
datasets. Further investigation into interpretability and the handling of ambiguous or context-dependent
humor could also provide valuable insights for enhancing humor classification systems. Enhancing the
dataset with more varied and culturally rich humorous texts could also improve the models’ robustness
and applicability across diferent contexts and populations.</p>
    </sec>
    <sec id="sec-6">
      <title>6. Conclusion</title>
      <p>In this paper, we explored the use of advanced transformer-based models, specifically BERT-uncased
and RoBERTa, for humor classification according to genre and technique. By leveraging these
pretrained models and fine-tuning them on the provided dataset, we aimed to improve the accuracy
and robustness of humor classification systems. Our experiments demonstrated that both models are
efective in capturing the nuances of humor, with RoBERTa slightly outperforming BERT-uncased in
overall performance metrics.</p>
      <p>Key observations from our experiments indicate that transformer models, with their deep contextual
understanding and extensive pre-training, can significantly enhance the ability to classify humorous
texts. The results also highlight the importance of fine-tuning and hyperparameter optimization in
achieving optimal performance.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>L.</given-names>
            <surname>Ermakova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Miller</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.-G.</given-names>
            <surname>Bosser</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V. M. P.</given-names>
            <surname>Preciado</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Sidorov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Jatowt</surname>
          </string-name>
          , Overview of joker - clef
          <article-title>-2024 track on automatic humor analysis</article-title>
          , in: L.
          <string-name>
            <surname>Goeuriot</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          <string-name>
            <surname>Mulhem</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          <string-name>
            <surname>Quénot</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <string-name>
            <surname>Schwab</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          <string-name>
            <surname>Soulier</surname>
          </string-name>
          ,
          <string-name>
            <surname>G. M. D. Nunzio</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          <string-name>
            <surname>Galuščáková</surname>
          </string-name>
          ,
          <string-name>
            <surname>A. G. S. de Herrera</surname>
          </string-name>
          , G. Faggioli, N. Ferro (Eds.),
          <source>Experimental IR Meets Multilinguality, Multimodality, and Interaction. Proceedings of the Fifteenth International Conference of the CLEF Association (CLEF</source>
          <year>2024</year>
          ),
          <year>2024</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>V. M. P.</given-names>
            <surname>Preciado</surname>
          </string-name>
          , et al.,
          <article-title>Overview of the clef 2024 joker task 2: Humour classification according to genre and technique</article-title>
          , in: G.
          <string-name>
            <surname>Faggioli</surname>
          </string-name>
          , et al. (Eds.),
          <source>Working Notes of the Conference and Labs of the Evaluation Forum (CLEF</source>
          <year>2024</year>
          ), CEUR Workshop Proceedings, CEUR-WS.org,
          <year>2024</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>M.</given-names>
            <surname>Geetha</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. K.</given-names>
            <surname>Renuka</surname>
          </string-name>
          ,
          <article-title>Improving the performance of aspect based sentiment analysis using ifne-tuned bert base uncased model</article-title>
          ,
          <source>International Journal of Intelligent Networks</source>
          <volume>2</volume>
          (
          <year>2021</year>
          )
          <fpage>64</fpage>
          -
          <lpage>69</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Ott</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Goyal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Du</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Joshi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Levy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Lewis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Zettlemoyer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Stoyanov</surname>
          </string-name>
          ,
          <article-title>Roberta: A robustly optimized bert pretraining approach</article-title>
          , arXiv preprint arXiv:
          <year>1907</year>
          .
          <volume>11692</volume>
          (
          <year>2019</year>
          ). URL: https://doi.org/10.48550/arXiv.
          <year>1907</year>
          .
          <volume>11692</volume>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>