Enhancing Transformers with Polarity Encoders to Detect Sarcasm

Authors

  • S. Nagini Department of Computer Science and Engineering, VNR Vignana Jyothi Institute of Engineering and Technology, Bachupally, Hyderabad, Telangana, India.
  • Karnam Akhil Department of Computer Science and Engineering, VNR Vignana Jyothi Institute of Engineering and Technology, Bachupally, Hyderabad, Telangana, India.
  • Harshitha Upadhyayula Department of Computer Science and Engineering, VNR Vignana Jyothi Institute of Engineering and Technology, Bachupally, Hyderabad, Telangana, India.
  • Tejasree Lokireddy Department of Computer Science and Engineering, VNR Vignana Jyothi Institute of Engineering and Technology, Bachupally, Hyderabad, Telangana, India.
  • Bharath Siripuram Department of Computer Science and Engineering, VNR Vignana Jyothi Institute of Engineering and Technology, Bachupally, Hyderabad, Telangana, India.
  • Thoran Chandhra Muvvala Department of Computer Science and Engineering, VNR Vignana Jyothi Institute of Engineering and Technology, Bachupally, Hyderabad, Telangana, India.

DOI:

https://doi.org/10.70917/ijcisim-2026-5074

Keywords:

Sarcasm Detection, Transformer, DeBERTa, Sentiment Analysis, Context Modeling, Polarity Modeling, Text Classification, Natural Language Processing

Abstract

Sarcasm detection is a complex task in natural language processing because it depends on implicit mood variations, contextual comparison, and the congruence of polarity between the literal form of expression and its intended meaning. Although the transformer-based models, including BERT and DeBERTa, have been taking a great leap in performance by introducing contextual self-attention, they mainly learn sarcasm patterns with an implicit hypothesis of sentiment polarity contradictions, which define the discourse of sarcasm. In this paper, a polarity-sensitive transformer model that explicitly incorporates sentiment data in representation learning is presented to detect sarcasm. In contrast to traditional fine-tuning methods, which treat sarcasm as a generic classification problem, the methodology adds sentiment-polarity cues to the embedding space, enabling the model to fine-tune contextual representations in a polarity-sensitive way. The proposed method will improve the ability of semantic representations of a context to reflect incongruity patterns in contextual segments. The positive results of experiments on benchmark sarcasm datasets indicate that explicit polarity integration is more robust and generalizes better than traditional transformer baselines, particularly in context-specific situations. The findings indicate that embedding-level sentiment improvement offers a sound theoretical and practical guideline in the process of expanding sarcasm detection beyond implicit contextual modeling.

Downloads

Download data is not yet available.

Downloads

Published

2026-08-24

How to Cite

S. Nagini, Karnam Akhil, Harshitha Upadhyayula, Tejasree Lokireddy, Bharath Siripuram, & Thoran Chandhra Muvvala. (2026). Enhancing Transformers with Polarity Encoders to Detect Sarcasm. International Journal of Computer Information Systems and Industrial Management Applications, 18(19s), 662–678. https://doi.org/10.70917/ijcisim-2026-5074

Issue

Section

Original Articles