Next Article in Journal
AI-Driven Generation of Old English: A Framework for Low-Resource Languages
Next Article in Special Issue
Green Cryptos or Echo Chambers? Analyzing Community Discourse on Blockchain Environmental Impacts
Previous Article in Journal
Evaluating Computational Approaches for Harmful Content Analysis: Promise, Pitfalls and Tools for Responsible Research
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

HYSARD: A Hybrid Feature-Fusion Model for Sarcasm Detection Using RoBERTa Embeddings and Linguistic Features

by
Ismail Jabri
1,*,
Zine Eddine Louriga
2,
Aziza El Ouaazizi
1,2 and
Abdelaziz Ahaitouf
2
1
Laboratory of Innovative Technologies and Informatics (LT2I), EST Fez, Sidi Mohamed Ben Abdellah University, Fez 30000, Morocco
2
Laboratory of Engineering Sciences (LSI), Polydisciplinary Faculty of Taza, Sidi Mohamed Ben Abdellah University, Fez 30000, Morocco
*
Author to whom correspondence should be addressed.
Big Data Cogn. Comput. 2026, 10(5), 144; https://doi.org/10.3390/bdcc10050144
Submission received: 15 March 2026 / Revised: 22 April 2026 / Accepted: 24 April 2026 / Published: 6 May 2026
(This article belongs to the Special Issue Natural Language Processing and Text Analysis in Social Media)

Abstract

Sarcasm detection remains a challenging task in natural language processing because sarcastic expressions often convey meanings that contradict their literal wording. Although transformer-based encoders such as RoBERTa capture contextual semantics effectively, sparse linguistic signals common in sarcastic user-generated text, such as exaggerated punctuation, elongated words, capitalization, and sentiment contrast, may not always remain explicitly accessible in the final sentence representation. To address this limitation, we propose HYSARD, a hybrid feature-fusion model that combines RoBERTa-based sentence embeddings with complementary linguistic features, including sentiment polarity, stylistic markers, syntactic patterns, and TF-IDF lexical cues. The resulting feature space is refined through Random Forest-based feature selection to reduce redundancy and improve robustness, while SMOTE mitigates class imbalance during training. We evaluate HYSARD on the SemEval-2022 iSarcasmEval dataset and the balanced Main and Political subsets of SARC 2.0. Results show strong and consistent performance across datasets, with an F1-score of 0.80 on iSarcasmEval, while held-out test-set error analysis further highlights strong class-wise discrimination. The ablation study further confirms that combining contextual embeddings with explicit linguistic cues improves sarcasm detection over reduced feature configurations. These findings show that hybrid feature fusion remains an effective and practical strategy for sarcasm detection in noisy social media text.

Graphical Abstract

1. Introduction

Sarcasm presents a unique challenge in natural language processing (NLP) due to its intrinsic deviation from literal meaning. It operates through irony, exaggeration, or contradiction, often reversing surface-level sentiment to convey an opposite intention. This subtle form of expression is pervasive in online discourse, particularly on platforms such as Twitter, Reddit, and discussion forums. Detecting sarcasm remains difficult for automated systems, primarily because textual data lack the vocal intonation and facial cues that typically signal sarcastic intent in human communication. Effective sarcasm detection is essential for sentiment analysis, opinion mining, and social media monitoring. Misinterpreting sarcasm can invert sentiment polarity and distort the results of downstream applications, including brand reputation tracking, political discourse analysis, and customer feedback interpretation. For instance, a sarcastic comment praising a malfunctioning service may be incorrectly classified as positive sentiment, misleading analytics and decision-making processes.
Early approaches to sarcasm detection relied on rule-based and traditional machine learning models built on handcrafted features. These included syntactic patterns, sentiment polarity contrast, and stylistic cues such as capitalization, punctuation frequency, and word elongation. Riloff et al. [1] demonstrated that sarcasm often arises from the juxtaposition of overtly positive sentiment and a negative situational context. Although these approaches offered interpretability, they lacked robustness when applied to noisy or domain-shifted data due to their limited contextual understanding.
The emergence of deep learning has substantially improved the ability to model linguistic context and nuance. Architectures such as recurrent neural networks (RNNs), convolutional neural networks (CNNs), and attention-based models have enabled the sequential modeling of sentiment and context, achieving significant gains over static feature-based methods. More recently, contextual deep learning models and transformer architectures have significantly improved sarcasm detection by leveraging richer contextual dependencies, as demonstrated in recent works such as Helal et al. (2024) [2] and transformer-based architectures like BERT and RoBERTa [3]. These models perform strongly on benchmarks such as iSarcasmEval and SARC 2.0 by capturing fine-grained semantic dependencies.
However, transformer-based systems still face notable limitations. Although they are exposed to stylistic cues such as exaggerated punctuation, elongated words (e.g., “Sooo helpful”), or capitalization, these sparse signals may not always remain explicitly preserved in the final sentence representation, especially in noisy user-generated text [4]. These stylistic markers, although subtle, are often more salient than semantics in informal, user-generated content. Additionally, fine-tuning large-scale transformers demands extensive computational resources, which restricts their use in real-time or low-resource environments.
Recent research has sought to integrate user-centric or contextual metadata to enhance sarcasm detection. The CASCADE model, for example, incorporates historical user behavior and conversational context, while other works such as Interpretable Self-Attention and fine-tuned GPT-3 [5] models have demonstrated strong performance. Nonetheless, these methods introduce architectural complexity and often depend on external contextual metadata or proprietary resources, which reduces scalability and reproducibility in general NLP pipelines.
A key limitation across many existing systems lies in the absence of a unified and efficient model capable of jointly modeling deep semantic representations and surface-level linguistic features. Transformer-based embeddings capture contextual depth effectively, yet sparse stylistic and pragmatic cues may not always remain explicitly accessible in the final fused representation, especially when sarcasm depends on localized markers such as punctuation emphasis, capitalization, or elongation. Conversely, handcrafted linguistic features provide explicit indicators such as punctuation exaggeration or sentiment contrast but typically fail to generalize across diverse domains. When these two feature spaces are combined, the resulting high dimensionality frequently introduces noise and overfitting, issues that most existing systems do not adequately address through feature selection or regularization mechanisms. Beyond these architectural concerns, sarcasm-detection models continue to face several fundamental research challenges:
  • The ambiguity of sentiment inversion, where literal polarity diverges from intended meaning;
  • Domain and context dependency, as sarcastic cues vary significantly across platforms, cultures, and topics;
  • Data imbalance and annotation subjectivity, since sarcastic expressions are relatively infrequent and often inconsistently labeled;
  • Limited generalization to implicit or multi-sentence sarcasm, which requires pragmatic and discourse-level reasoning; and
  • Lack of interpretability, as deep models rarely reveal which linguistic or contextual factors drive sarcastic inference.
Collectively, these limitations underscore the need for hybrid architectures that combine semantic understanding with explicit linguistic and pragmatic cues while maintaining interpretability and robustness across domains.
To address these challenges, we propose HYSARD, a hybrid feature-fusion model for sarcasm detection that combines contextual sentence embeddings with explicit linguistic descriptors. Specifically, the model integrates RoBERTa-based sentence embeddings with sentiment polarity scores derived from VADER [6], stylistic markers such as punctuation usage, elongated words, and capitalization, syntactic information derived from part-of-speech tags, and TF-IDF lexical features. To reduce redundancy in the fused representation, we apply a Random Forest-based feature selection strategy that preserves the most informative dimensions [4]. Furthermore, to mitigate the bias introduced by class imbalance, we employ the Synthetic Minority Over-Sampling Technique (SMOTE) during training [7].
The main contribution of this work lies in the design and empirical validation of a hybrid sarcasm-detection pipeline rather than in the introduction of a fundamentally new deep neural architecture. Specifically, HYSARD combines frozen contextual sentence embeddings with explicit sentiment, stylistic, syntactic, and lexical descriptors within a unified text-only hybrid architecture. In addition, the proposed pipeline incorporates Random Forest-based feature selection to control redundancy in the fused space and to provide insight into the relative contribution of feature groups. The model is evaluated on three widely used sarcasm detection benchmarks, namely iSarcasmEval [8], SARC 2.0 Main Balanced, and SARC 2.0 Political Balanced, and is further analyzed through an ablation study to quantify the contribution of each feature family.
Experimental results show that HYSARD achieves strong performance across the evaluated datasets, including an F1-score of 0.80 on iSarcasmEval. These findings suggest that combining contextual embeddings with carefully selected linguistic features remains an effective strategy for sarcasm detection, particularly in noisy and stylistically rich social media text.
The remainder of this paper is organized as follows. Section 2 reviews related work on sarcasm detection. Section 3 presents the materials and methods, including the proposed HYSARD model, the datasets, and the experimental protocol. Section 4 reports the experimental results and discusses the main findings. Section 5 concludes the paper and outlines future research directions.

2. Related Work

Sarcasm detection has evolved significantly over the past decade, transitioning from rule-based and feature-engineered approaches to deep neural networks and transformer-based language models. Despite this progress, capturing the duality of sarcastic intent, often expressed through subtle linguistic cues and complex contextual dependencies, remains a core challenge. This section reviews the major methodological directions in sarcasm detection, critically assessing their contributions and limitations in the context of our proposed hybrid system.

2.1. Feature-Based and Traditional Machine Learning Approaches

Early work on sarcasm detection predominantly relied on manually crafted linguistic features. These systems aimed to detect textual incongruities such as sentiment polarity shifts, where positively framed language contrasts with a negative scenario, as shown by Riloff et al. [1]. Their work notably modeled this contrast, highlighting how overtly positive statements can carry implicit negative intent, an observation that remains foundational to sarcasm modeling [9].
Commonly used features included sentiment scores, part-of-speech (POS) distributions, syntactic irregularities, and stylistic markers such as repeated punctuation, all-caps words, and emoticons. Classical machine learning models such as Support Vector Machines, Logistic Regression, Decision Trees, and Random Forests were applied to these features with considerable success on curated datasets. Their simplicity and interpretability made them appealing for early experimentation [10].
However, these approaches lacked semantic depth. Their performance dropped sharply when faced with domain shifts, informal language, or implicit sarcasm. For example, a sarcastic tweet that relies on cultural references or understated phrasing may evade models trained on overt lexical patterns. Moreover, handcrafted features are inherently brittle; their relevance can degrade quickly in real-world, user-generated content streams.

2.2. Deep Learning with Distributed Representations

The shift from sparse lexical representations to distributed embeddings marked an important transition in sarcasm detection. Static word-embedding methods such as Word2Vec [11] and GloVe [12] enabled richer semantic comparisons than bag-of-words representations by encoding distributional similarity in continuous vector spaces. These embeddings were subsequently integrated into neural architectures such as Convolutional Neural Networks (CNNs), Recurrent Neural Networks (RNNs), and their gated variants, including LSTM and GRU, to model local and sequential dependencies in sarcastic text.
Distributed representations improved sarcasm detection by allowing models to learn patterns beyond fixed lexical cues, including sentiment shifts, rhetorical contrasts, and context-sensitive usage. However, static embeddings remained limited because each word was assigned a single representation regardless of context, making them less suitable for figurative and polarity-reversing language. Sequence models partially alleviated this issue by modeling word order and local context, but they still struggled with long-range dependencies and with the subtle pragmatic nature of sarcasm in short, noisy social-media text.
These limitations motivated the transition toward contextualized encoders and transformer-based models. At the same time, earlier work on deep contextualized sarcasm modeling, such as the ACE model of Babanejad et al. [13], already showed that embedding-based sarcasm detection can benefit from the integration of contextual and affective cues rather than relying on semantic representations alone.

2.3. Transformer-Based Language Models

Transformer architectures, especially BERT and RoBERTa [3] and GPT variants [5], have substantially raised the performance ceiling in sarcasm detection. These models are pre-trained on massive corpora and can capture context-sensitive representations of language via self-attention mechanisms. Their ability to encode long-distance dependencies and disambiguate figurative language has proven especially useful in detecting sarcasm, which often relies on subtle shifts in tone and implication.
For instance, Potamias et al. [14] demonstrated that using RoBERTa [3] embeddings in combination with a recurrent-convolutional architecture enhances the model’s sensitivity to sarcasm and irony. Fine-tuning transformer models on sarcasm datasets such as iSarcasmEval and SARC 2.0 has produced strong baseline results.
Nevertheless, these models are not without drawbacks. While effective at encoding semantic context, they frequently provide limited transparency regarding which cues drive sarcastic predictions, and they may underutilize sparse surface-level signals such as punctuation bursts, uppercase emphasis, or elongated forms when these cues are not explicitly modeled. Additionally, the high computational cost of training and inference limits their applicability in latency-sensitive or resource-constrained environments. Recent studies have continued to strengthen transformer-based sarcasm detection through contextual modeling. For example, Helal et al. [2] showed that incorporating contextual information into transformer architectures such as RoBERTa and DistilBERT can substantially improve sarcasm recognition, while Dubey et al. [15] highlighted the growing importance of context-aware and transformer-centered pipelines in recent sarcasm-detection research.

2.4. Context-Aware and User-Centric Models

Sarcasm is often context-dependent, not only linguistically but also socially and behaviorally. Recognizing this, researchers have increasingly turned toward context-aware and user-centric models, most notably the work of Hazarika et al. [16]. Their CASCADE model captures speaker-specific behavior and conversational interaction history to improve sarcasm detection. The study demonstrated that incorporating author-level and discourse-level information leads to notable improvements in performance.
Other studies have employed conversation threads, reply hierarchies, and user engagement metrics to enrich text representations. These models are particularly effective when sarcasm is expressed through subtle contradiction or irony that becomes evident only within conversational context.
However, the dependency on external metadata poses practical limitations. In many real-world scenarios, access to user history, prior posts, or thread structures may be restricted due to privacy concerns, API limitations, or platform differences. These dependencies also reduced portability across domains and make large-scale deployment more complex.

2.5. Hybrid Approaches and Feature Fusion

To address the limitations of purely shallow feature-engineered methods and purely end-to-end deep architectures, recent sarcasm-detection research has increasingly explored hybrid models that combine contextual encoders with auxiliary linguistic, affective, or structural features. The central motivation behind these approaches is that sarcastic meaning rarely depends on semantics alone; rather, it often emerges from the interaction between contextual meaning, sentiment incongruity, lexical emphasis, discourse structure, and other explicit cues.
A representative early contribution in this direction is the ACE model proposed by Babanejad et al. [13], which extends BERT-based sarcasm detection by integrating affective and contextual information. Their results showed that this hybrid design can achieve strong performance across multiple benchmarks, with reported F1-scores of 92.21 on Onion, 89.22 on Reddit, 80.71 on Ptáček, 84.57 on SemEval-2018, and 93.14 on IAC. These findings suggest that contextual embeddings can benefit substantially from complementary affective signals rather than operating as standalone semantic encoders.
More recent studies have reinforced the effectiveness of hybrid sarcasm-detection pipelines. Khan et al. [17] introduced a hybrid transformer-based architecture that combines RoBERTa, Bi-LSTM, and multi-head attention for sarcasm detection in news headlines. Their model illustrates the value of coupling contextual embeddings with sequential modeling and attention-based refinement in order to better capture sarcastic incongruity. Along a different line, Awan et al. [18] proposed a hybrid CapsNet–LSTM architecture with feature optimization for social-media sarcasm detection and reported 86.0% accuracy with an F1-score of 81.6% on Reddit, together with 78.5% accuracy on Twitter. Safeer et al. [19] introduced SarcAE, a hybrid model that combines embedding fusion, autoencoder-based abstraction, and fuzzy-logic reasoning, and reported 98.53% accuracy on a news-headline dataset and 89.83% accuracy on an ironic-tweet dataset.
Taken together, these studies confirm that hybrid sarcasm-detection systems can achieve strong empirical performance by combining contextual representations with complementary linguistic, affective, or reasoning-oriented components. At the same time, their results should be interpreted cautiously because they were obtained on different datasets, class distributions, preprocessing pipelines, and evaluation protocols. Consequently, these reported scores are more useful for demonstrating the general effectiveness of hybrid modeling than for establishing direct head-to-head superiority across studies.
Our work belongs to this hybrid line of research, but it differs in three practical respects. First, it operates solely on text, without requiring user history, conversational metadata, or multimodal signals. Second, it combines frozen RoBERTa sentence embeddings with explicit sentiment, stylistic, syntactic, and TF-IDF features. Third, it introduces a Random Forest–based feature selection stage to reduce redundancy in the fused representation and retain only the most informative dimensions. This design yields a compact and portable model for sarcasm detection across multiple benchmark datasets.

3. Materials and Methods

In this section, we describe HYSARD, a hybrid feature-fusion model for sarcasm detection that integrates contextual sentence embeddings with explicit linguistic features. The architecture is designed to capture both deep semantic information and surface-level stylistic cues that frequently signal sarcasm in user-generated text. Figure 1 presents an overview of the full pipeline. The model consists of five main stages: text preprocessing, feature extraction, feature fusion, feature selection, and final classification.

3.1. Data Preprocessing

Each input instance consists of a raw textual utterance drawn from one of the benchmark sarcasm detection datasets described in Section 3.7. The preprocessing pipeline is intentionally lightweight in order to preserve stylistic and pragmatic cues that may be informative for sarcasm detection.
First, the text is normalized through lowercasing. Second, tokenization is applied to prepare the input for feature extraction. Third, noisy artifacts that do not contribute to sarcasm modeling, such as malformed URLs or irrelevant markup when present, are removed. Importantly, expressive textual markers such as repeated punctuation, elongated words, and capitalization are preserved because they are later used as stylistic features. This preprocessing strategy ensures consistency across datasets while maintaining the linguistic signals that are often suppressed by more aggressive cleaning procedures.

3.2. Feature Extraction

To capture the multifaceted nature of sarcasm, we extract several feature types from the preprocessed text:

3.2.1. Sentiment Features

Sarcastic utterances often invert the apparent sentiment. We use the VADER [6] (Valence Aware Dictionary and sEntiment Reasoner) tool to compute four sentiment scores (negative, neutral, positive, and compound) for each sentence. These scores quantitatively reflect the sentiment polarity, providing a signal for potential sentiment inversion in sarcastic expressions.

3.2.2. Stylistic Features

Certain stylistic attributes are indicative of sarcasm. We extract:
  • Punctuation Usage: Counts of exclamation marks, question marks, and periods capture the emphasis or hyperbole often used in sarcastic language.
  • Capitalization Patterns: The number of all-uppercase words can denote exaggeration.
  • Elongated Words: The frequency of words with repeated characters (e.g., “Soooo”) highlights emotive or emphatic emphasis.

3.2.3. Syntactic Features

To encode grammatical structure, we extract part-of-speech (POS) tag distributions using spaCy’s POS tagging pipeline [20]. Chiche and Yitagesu (2022) [21] demonstrated that POS information provides a reliable structural representation of text by assigning grammatical roles such as nouns, verbs, adjectives, and adverbs to each token. Variations in POS tag frequencies can reveal structural patterns that differentiate sarcastic from non-sarcastic text, enabling the model to capture how meaning is shaped through syntactic organization rather than relying solely on lexical cues. Such structural regularities are particularly useful in distinguishing straightforward statements from rhetorically complex or contextually shifting expressions.
The effectiveness of POS-based syntactic information in improving contextual interpretation, stability, and downstream task performance has been widely recognized in the NLP literature. Motivated by these findings, POS-derived syntactic descriptors in our model serve as complementary structural features that enrich the feature space and contribute to more reliable sarcasm discrimination.

3.2.4. Lexical Features via TF-IDF

To capture lexical salience across the corpus, we employed the Term Frequency–Inverse Document Frequency (TF-IDF) representation [22], a widely used weighting scheme in text mining. Each sentence or tweet is transformed into a TF-IDF vector by assigning higher weights to terms that occur frequently in a given document but are less common across the entire dataset. This allows the model to focus on distinctive lexical cues that are often associated with sarcastic intent. For computational efficiency, the feature space was restricted to the top 5000 n-grams.
Formally, the TF-IDF weight for a term t in document D is given as:
T F - I D F ( t , D ) = T F ( t , D ) × I D F ( t ) ,
where T F ( t , D ) denotes the term frequency of t in document D and I D F ( t ) the inverse document frequency. Specifically,
T F ( t , D ) = N ( t ) T ,
I D F ( t ) = log n d f ( t ) .
Here, N ( t ) is the number of times word t occurs in the document, T is the total number of words in the document, n is the total number of documents in the corpus, and d f ( t ) is the number of documents in which t appears.
This representation enables the model to discriminate between high-utility tokens (e.g., sarcastic markers or contextually charged words) and ubiquitous terms that carry limited information. By encoding these weighted lexical features, TF-IDF provides a robust foundation for subsequent classification layers to detect subtle cues underlying sarcastic utterances.

3.2.5. Deep Contextual Features

To capture sentence-level semantics, we use the SentenceTransformer implementation of the pre-trained all-roberta-large-v1 model [3,23]. This model maps each input sentence to a 1024-dimensional dense embedding vector, providing a compact contextual representation of semantic and pragmatic content. In our model, these embeddings are used as frozen sentence representations rather than being fine-tuned end-to-end, which keeps the overall pipeline computationally efficient while preserving strong contextual encoding capacity.

3.3. Feature Fusion and Random Forest–Based Feature Selection

After extraction, all feature groups were aligned and concatenated into a unified high-dimensional representation for each input text. The fused vector combined the 1024-dimensional RoBERTa sentence embedding with sentiment, stylistic, syntactic, and TF-IDF features. Before concatenation, dense numerical feature blocks, namely the RoBERTa embeddings, sentiment features, stylistic features, and POS-based syntactic features, were normalized using MinMax scaling fitted on the training data only. In contrast, TF-IDF retained its standard weighted representation. This design ensured that dense semantic embeddings and sparse lexical descriptors were merged on comparable numerical scales while avoiding information leakage from the validation or test data.
Although the fused space is highly informative, direct use of all concatenated dimensions may introduce redundancy, irrelevant features, and overfitting. To address this issue, we apply a Random Forest–based feature selection strategy [24]. In the implementation, feature selection is performed using SelectFromModel with a Random Forest estimator and an importance threshold of median. Only features whose importance exceeds this threshold are retained for final classification. This step reduces noise, limits dimensional inflation, and helps identify the most discriminative feature dimensions.
In our final implementation, this procedure reduced the fused feature space from 6051 to 3026 dimensions.

3.4. Handling Class Imbalance

The iSarcasmEval dataset presents a considerable class imbalance, comprising 2601 non-sarcastic instances and 867 sarcastic ones, corresponding to a 75%/25% distribution in the training split. Because such skewed distributions can bias the classifier toward the majority class, we compared several imbalance-handling strategies before selecting the final configuration. In particular, we evaluated four settings: (i) no imbalance correction, (ii) class weighting, (iii) random undersampling, and (iv) SMOTE.
In the final configuration, we retained the Synthetic Minority Over-sampling Technique (SMOTE) [7]. Table 1 reports the class distribution before and after applying SMOTE. As shown, the algorithm transformed the original 2601/867 distribution into a balanced 2601/2601 training set.
The SMOTE procedure can be summarized in three steps:
  • For each minority instance y S , identify its k nearest minority-class neighbors in feature space.
  • Randomly select one neighbor y k from this set.
  • Generate a synthetic sample by interpolation:
    y = y + λ ( y k y ) ,   λ [ 0 , 1 ] .
Importantly, in our pipeline SMOTE was applied in the learned feature space rather than at the raw-text level. Consequently, it generated interpolated feature representations instead of artificial textual sequences. As shown later in the imbalance-handling ablation, this choice provided the most favorable trade-off between global performance and minority-class sensitivity among the tested strategies.
  • Note. SMOTE was applied only to the training split in order to balance the sarcastic and non-sarcastic classes during model training.

3.5. Final Classification and Model Training

The final classifier used in HYSARD is a Random Forest model. We selected this classifier because it performed strongly in preliminary experiments while also providing feature importance estimates that help characterize the relative contribution of feature groups. Hyperparameter optimization was performed using GridSearchCV [25] on the training portion of each dataset only.
For datasets with official train/test splits, model selection was conducted exclusively on the training split using stratified 5-fold cross-validation. Within each fold, feature extraction components that require fitting, feature selection, and SMOTE were applied only on the training fold and then transferred to the corresponding validation fold. After hyperparameter selection, the final model was retrained on the full training split and evaluated once on the held-out test set. This protocol was adopted to avoid information leakage and to ensure a fair evaluation of generalization performance.

3.6. Model Evaluation

We evaluate HYSARD on three benchmark datasets: iSarcasmEval from SemEval 2022 [9], SARC 2.0 Main Balanced, and SARC 2.0 Political Balanced [26]. The evaluation metrics used in this work are accuracy, precision, recall, and F1-score. For iSarcasmEval, we additionally report the sarcastic-class F1-score because performance on the minority sarcastic class is particularly important in imbalanced settings.
These metrics are defined as follows:
Accuracy = T P + T N T P + T N + F P + F N , Precision = T P T P + F P , Recall = T P T P + F N , F 1   Score = 2 × Precision × Recall Precision + Recall .
These measures jointly assess overall correctness, class-specific reliability, and the balance between precision and recall.

3.7. Datasets and Statistics

3.7.1. iSarcasmEval (SemEval-2022 Task 6)

  • Source: Tweets.
  • Annotation: Self-reported sarcasm labels and non-sarcastic rephrases provided by the original authors. For English tweets, additional fine-grained ironic categories (e.g., satire, understatement, overstatement, rhetorical question) were annotated by trained linguists.
  • Statistics: The dataset comprises several thousand English tweets, exhibiting a moderate class imbalance (approximately 25% sarcastic). Sarcastic tweets tend to be slightly longer on average, reflecting more elaborate expression and contextual framing.
    The following table (Table 2) summarizes the dataset composition, showing the distribution of sarcastic and non-sarcastic samples in both the training and test splits, as well as the corresponding average word counts.

3.7.2. SARC 2.0 Main Balanced

  • Source: Reddit comments collected from multiple subreddits, primarily including r/politics.
  • Annotation: Sarcasm was self-reported by users using explicit markers such as “/s”, which were later removed during preprocessing to prevent data leakage.
  • Statistics: The dataset is balanced across classes, containing an equal number of sarcastic and non-sarcastic comments. Each comment averages approximately 55 words.
    The following table (Table 3) presents the detailed class distribution for the training and test splits.

3.7.3. SARC 2.0 Political (Balanced)

  • Source: A subset of the SARC 2.0 corpus restricted to political discussions drawn from Reddit.
  • Annotation: Sarcasm was self-reported by users using explicit markers such as “/s”, which were subsequently removed during preprocessing.
  • Statistics: The dataset maintains a perfectly balanced distribution between sarcastic and non-sarcastic comments. Political discussions in this subset tend to be slightly longer on average than those in the general SARC 2.0 corpus, reflecting the more elaborate and argumentative nature of political discourse.
    The following table (Table 4) summarizes the class distribution and average word counts across the training and test sets.

3.8. Experimental Setup

The experimental pipeline used in this work consists of the following stages:
  • Training–test protocol: For each dataset, we used the official training and test partitions when available. Hyperparameter tuning and model selection were performed only on the training split using stratified 5-fold cross-validation. The held-out test split was used only once for final evaluation.
  • Preprocessing: Raw text was lowercased and tokenized while preserving stylistic cues such as punctuation, capitalization, and elongated words.
  • Feature extraction: For each input text, we extracted the following feature groups:
    • Sentiment features: VADER negative, neutral, positive, and compound scores [6];
    • Stylistic features: punctuation counts, all-uppercase words, and elongated-word frequency;
    • Syntactic features: part-of-speech tag distributions obtained with spaCy [20,21];
    • Lexical features: TF-IDF features with a maximum vocabulary of 5000 n-grams;
    • Contextual features: sentence embeddings extracted with SentenceTransformer using all-roberta-large-v1 [23,27].
  • Feature fusion and selection: All feature groups were concatenated into a unified representation. A Random Forest-based feature selection stage was then applied to retain the most informative dimensions and reduce redundancy.
  • Class imbalance handling: SMOTE was applied only on the training fold within each cross-validation split and only on the final training split before test-time evaluation. No oversampling was applied to validation or test data.
  • Classification: A Random Forest classifier was trained on the selected feature space. Hyperparameters were optimized using GridSearchCV.
  • Evaluation: Final results were reported using accuracy and F1-score across datasets. For iSarcasmEval, only the F1-score is reported, with particular emphasis on the sarcastic-class F1, as it provides a more informative evaluation under class imbalance.

3.9. Implementation Details

The implementation was based on Python 3.10 and relied on the scikit-learn 1.5.0, spaCy 3.7, sentence-transformers 2.7, PyTorch 2.2, and imbalanced-learn 0.12 libraries. Sentence embeddings were generated using the SentenceTransformer implementation of all-roberta-large-v1, and TF-IDF lexical features were restricted to the top 5000 n-grams. The fused representation was refined using SelectFromModel with a Random Forest estimator and a median importance threshold. Final prediction was performed with a Random Forest classifier whose hyperparameters were optimized through GridSearchCV. All randomized procedures were executed with a fixed random seed. Experiments were carried out in Google Colab on an NVIDIA Tesla V100 GPU (NVIDIA Corporation, Santa Clara, CA, USA).
The final fused representation consisted of 6051 dimensions: 1024 RoBERTa embedding dimensions, 4 sentiment features, 5 stylistic features, 18 POS-based syntactic features, and 5000 TF-IDF lexical features. After feature selection, 3026 dimensions were retained. Table 5 summarizes the dimensionality of each feature group before and after feature selection.

In-House Fine-Tuned RoBERTa Baseline

For controlled comparison with HYSARD, we implemented an in-house fine-tuned RoBERTa baseline for binary sarcasm classification on iSarcasmEval. In contrast to HYSARD, which uses frozen sentence embeddings, this baseline was trained end-to-end for sequence classification using the pretrained roberta-large checkpoint with a task-specific classification head.
The model was trained on the official iSarcasmEval training split. Hyperparameter selection for the RoBERTa baseline was performed using the same stratified 5-fold cross-validation protocol adopted for HYSARD, and the final configuration was selected according to the mean validation sarcastic-class F1-score. Because the dataset is imbalanced, weighted cross-entropy was used during training. The final hyperparameter configuration is reported in Table 6.

4. Results and Discussion

In this section, we present the experimental results of HYSARD, including the ablation study, the comparative evaluation against representative baseline models, and a discussion of the main findings. For datasets with official train/test splits, all model selection and hyperparameter tuning procedures were conducted exclusively on the training split using stratified 5-fold cross-validation, whereas final performance was reported separately on the corresponding held-out test split. Unless otherwise stated, cross-validation results reported in this section correspond to model development on the training data and should not be directly compared with final held-out test results obtained under a different evaluation protocol. The main evaluation metrics are accuracy and F1-score, with additional emphasis on sarcastic-class F1-score for iSarcasmEval.

4.1. Ablation Study

To assess the contribution of individual feature groups within our hybrid model, we conducted an ablation study on the iSarcasmEval (SemEval 2022 Task 6) dataset. Each configuration was evaluated using stratified 5-fold cross-validation on the training split only. Table 7 reports the mean cross-validation accuracy and F1-score for five representative feature combinations.
Feature Groups:
  • R: Deep contextual embeddings from the pretrained RoBERTa-large model [3].
  • S: Sentiment features generated using VADER [6].
  • Sty: Stylistic features (punctuation counts, capitalization patterns, elongated words).
  • POS: Syntactic features derived from spaCy’s POS tagging.
  • TF-IDF: Lexical features obtained via TF-IDF vectorization (up to 5000 n-grams).
Configurations:
  • C1: R + S;
  • C2: R + S + Sty;
  • C3: R + S + POS;
  • C4: R + S + Sty + POS;
  • C5: R + S + Sty + POS + TF-IDF (full model).
Figure 2 illustrates the performance trend across the five configurations and highlights the progressive improvement obtained as additional feature groups are incorporated. As shown in Table 7, the strongest performance is achieved by the full configuration (C5), which combines contextual, sentiment, stylistic, syntactic, and lexical information. This result indicates that sarcasm detection benefits from integrating complementary feature families rather than relying on contextual embeddings alone.
Cross-Validation Performance: To assess the robustness of the proposed model, we additionally report the mean and standard deviation of the full HYSARD configuration (C5) across the same 5-fold cross-validation procedure used during model selection. As shown in Table 8, C5 achieves an average F1-score of 0.80 with a standard deviation of 0.018 and an average accuracy of 0.85 with a standard deviation of 0.015. These results indicate low variance across folds, suggesting stable performance across different training partitions. The corresponding 95% confidence interval for the F1-score is [0.784, 0.816], further supporting the robustness of the model.
Qualitative Insights:
  • Stylistic Features (Sty): Their inclusion in configuration C2 improves performance by capturing hyperbolic and emphatic expressions.
  • Syntactic Features (POS): Although POS features alone (C3) provide only modest gains, combining them with stylistic features (C4) yields a clear improvement.
  • Lexical TF-IDF Features: The integration of TF-IDF in the full model (C5) leads to the highest performance, underscoring the value of domain-specific lexical cues in sarcasm detection.
  • Note. The results reported in Table 7 and Table 8 correspond to cross-validation performance on the training split during model development. They should not be directly compared with the held-out test-set results reported later in the error analysis section, as they are obtained under different evaluation protocols.

4.2. Imbalance-Handling Ablation

Because sarcasm detection datasets are typically imbalanced, we performed an ablation study to evaluate the impact of different class-imbalance handling strategies on iSarcasmEval. Specifically, we compared four settings: (i) no imbalance correction, (ii) class weighting, (iii) random undersampling, and (iv) SMOTE. The results are presented in Table 9.
The baseline model without rebalancing achieved an F1-score of 0.69, indicating weaker performance under the original class imbalance. Introducing class weighting improved the results substantially, raising the F1-score to 0.76. Among the evaluated rebalancing strategies, SMOTE produced the best ablation result, achieving the highest F1-score of 0.80 together with the strongest balance between precision and recall. In comparison, random undersampling reached an F1-score of 0.72 and remained below both class weighting and SMOTE.
These findings indicate that, within the ablation setting, SMOTE provided the most effective imbalance-handling strategy. This also addresses the common limitation of SMOTE in text classification, since synthetic samples are generated in the learned feature space rather than as artificial text, avoiding unrealistic textual artifacts.
  • Note. It is important to note that these results correspond to cross-validation performance on the training split during model selection. The final generalization performance on the held-out test set is reported separately in the error analysis section and should not be directly compared to these ablation values, as the two sets of results are obtained under different evaluation protocols.

4.3. Feature Importance Analysis

To provide insight into the model’s behavior, we analyzed feature importance using the Random Forest classifier. It is important to note that these importance scores reflect the relative contribution of feature groups within the model rather than a complete explanation of model behavior.
The results indicate that contextual embeddings and TF-IDF lexical features contribute the largest share of importance, confirming that both semantic understanding and lexical cues are critical for sarcasm detection. As shown in Figure 3, contextual embeddings account for the highest contribution, followed by TF-IDF features, while stylistic, syntactic, and sentiment features provide complementary but smaller contributions.
Although their individual importance scores are lower, these auxiliary features remain valuable because they capture explicit surface-level signals such as punctuation usage, capitalization, and sentiment contrast, which are often not fully preserved in dense contextual representations. These findings validate the design of HYSARD, demonstrating that hybrid feature fusion effectively combines complementary information sources rather than relying solely on deep contextual embeddings.

4.4. Performance Comparison

To assess the empirical effectiveness of HYSARD, we compare it with representative models reported in the sarcasm detection literature, including traditional machine learning baselines, contextual encoders, and large language model-based approaches. Because these reference results were originally reported under different preprocessing choices, optimization settings, and evaluation protocols, they should be interpreted as literature reference points rather than strictly controlled head-to-head reproductions. Under this caveat, the comparison remains useful for situating the proposed model with respect to existing methods.
For iSarcasmEval, we report both literature reference models and one controlled in-house transformer baseline. The literature reference results include representative classical, neural, and large language model approaches, namely STCE [8], X-PuDu [28], TUG-CIC [28], L2-Logistic Regression [29], the official SVM baseline [28], and the fine-tuned Llama 2 13B model [30]. In addition, we include a fine-tuned RoBERTa baseline reproduced under the same train/test split and evaluation protocol as HYSARD. Table 10 summarizes these results. HYSARD achieves strong performance on this dataset, reaching an F1-score of 0.80.
The in-house fine-tuned RoBERTa baseline obtained an F1-score of 0.45. Although lower than some literature-reported results, it provides a controlled internal neural reference for comparison with HYSARD.
For the SARC 2.0 Main Balanced dataset, we compare HYSARD with high-performing contextual and attention-based models, including CASCADE [16], Interpretable Multi-Head Self-Attention [31], ELMo-BiLSTM Full [32], and RCNN-RoBERTa [14]. As shown in Table 11, HYSARD achieves competitive performance, with 0.846 accuracy and 0.830 F1-score on this benchmark.
Table 12 reports the results on the SARC 2.0 Political (Balanced) subset. HYSARD again performs strongly, achieving 0.85 accuracy and 0.83 F1-score. These results suggest that the proposed hybrid representation remains effective even in politically polarized discourse, where sarcasm is often expressed through domain-specific rhetoric and implicit contrast.

4.5. Error Analysis

To better understand the limitations of HYSARD, we conducted an error analysis on the held-out iSarcasmEval test set. Figure 4 presents the confusion matrix, and Table 13 reports class-wise precision, recall, and F1-score.
The error analysis shows that HYSARD achieves strong and relatively balanced performance across the two classes, while still performing better on non-sarcastic posts than on sarcastic ones. As reported in Table 13, the model attains a precision, recall, and F1-score of 0.9667 for the non-sarcastic class, compared with 0.8000 precision, recall, and F1-score for the sarcastic class. These results indicate that the model identifies non-sarcastic instances with very high reliability while also maintaining solid performance on sarcastic posts, which remain the more challenging category.
The confusion matrix in Figure 4 further shows that 1160 out of 1200 non-sarcastic instances were correctly classified, with only 40 misclassified as sarcastic, whereas 160 out of 200 sarcastic instances were correctly identified and 40 were misclassified as non-sarcastic. This pattern suggests that the proposed hybrid representation is effective for capturing both literal and sarcastic cues, although a performance gap persists in favor of the majority non-sarcastic class.
A qualitative inspection of representative errors shows that false positives often correspond to emotionally charged complaints, colloquial frustration, or humorous remarks that contain expressive language without a true sarcastic reversal. In contrast, false negatives frequently involve implicit sarcasm, praise–blame inversion, understated criticism, or politically charged statements whose sarcastic intent depends on pragmatic inference or contextual knowledge rather than overt lexical markers. These observations indicate that, although the proposed hybrid representation improves class-balanced detection, some remaining errors still stem from sarcasm conveyed through subtle contextual incongruity rather than explicit stylistic signals.
Although the broader iSarcasmEval dataset includes fine-grained irony categories, subtype-wise error analysis could not be performed on the held-out evaluation split used in our experiments because the available test file contained only the text and binary sarcasm labels.

4.6. Discussion

The results presented in Table 7, Table 8, Table 9, Table 10, Table 11 and Table 12 indicate that HYSARD benefits from combining contextual sentence embeddings with explicit linguistic descriptors. Across the evaluated benchmarks, the model shows strong performance, suggesting that sarcasm detection remains well suited to hybrid representations that integrate semantic, lexical, stylistic, and syntactic information.
The ablation study in Table 7 provides a clearer view of how each feature group contributes to performance. RoBERTa embeddings and sentiment features establish a strong semantic foundation, while the gains observed after adding stylistic, syntactic, and lexical descriptors suggest that these signals provide complementary information under our experimental setting. Although transformer encoders are exposed to punctuation, capitalization, and elongated forms at the token level, the ablation results indicate that explicitly encoded linguistic descriptors can still contribute useful surface-level cues for sarcasm detection. In this sense, handcrafted feature blocks preserve indicators such as punctuation density, uppercase emphasis, elongated-word frequency, sentiment polarity contrast, and domain-specific lexical salience in dedicated dimensions. The improved performance of the full model therefore supports an empirical interpretation of complementarity rather than a definitive claim about a general limitation of transformer models.
The imbalance-handling ablation further supports this design choice. Among the tested strategies, SMOTE provided the most favorable trade-off between overall performance and balanced detection, outperforming no rebalancing, class weighting, and random undersampling on iSarcasmEval. This result suggests that, when applied in the learned feature space rather than at the raw-text level, SMOTE can improve robustness to class imbalance without sacrificing the stability of the overall pipeline.
On the iSarcasmEval dataset (Table 10), HYSARD achieves an F1-score of 0.80. This result suggests that combining contextual embeddings with explicit linguistic signals is effective for short and informal social media texts, where sarcasm is often expressed through sentiment contrast, rhetorical emphasis, or stylistic exaggeration. The result is particularly relevant because iSarcasmEval is based on self-reported sarcasm, making it a challenging benchmark for models that rely solely on surface semantics.
The comparatively modest performance of the in-house fine-tuned RoBERTa baseline, together with the ablation results, suggests that the proposed hybrid design benefits from explicitly encoded linguistic cues under the evaluated experimental conditions. This observation should be interpreted as empirical evidence of complementarity in our setting rather than as a definitive limitation of transformer-based models in general.
On the SARC 2.0 Main Balanced dataset (Table 11), HYSARD attains 0.846 accuracy and 0.830 F1-score, while on the SARC 2.0 Political Balanced dataset (Table 12) it reaches 0.85 accuracy and 0.83 F1-score. These results suggest that the proposed hybrid representation generalizes reasonably well across different forms of user-generated discourse, including longer and more domain-specific Reddit comments. In particular, the results on the political subset indicate that the model remains effective even when sarcasm is expressed through topic-specific rhetoric and implicit contrast.
Another practical strength of HYSARD is that it relies on frozen RoBERTa embeddings instead of full transformer fine-tuning. This design simplifies training and makes the model easier to deploy in settings where computational resources are limited. At the same time, the Random Forest-based feature selection stage highlights the relative importance of feature groups while reducing the fused space to a smaller subset of discriminative features.
Despite these strengths, several limitations remain. First, the current study is restricted to English-language datasets. Second, sarcasm annotations, particularly self-reported or user-marked labels, may still contain subjectivity or platform-specific bias. Third, the model operates purely at the text level and does not incorporate conversational context, user history, emojis, images, or multimodal signals that may further improve sarcasm detection. Fourth, the TF-IDF component may capture dataset-specific lexical cues that are strongly associated with sarcasm in the evaluated corpora but may not transfer equally well across domains or platforms with different lexical distributions. This suggests a degree of domain dependence in the lexical feature space and should be considered when interpreting cross-dataset generalization. Finally, because the comparative baselines reported in Table 10, Table 11 and Table 12 were collected from prior studies, some differences should be interpreted cautiously unless all systems are reproduced under an identical protocol. In addition, although literature-reported LLM results are included for contextual positioning, zero-shot and few-shot LLM evaluations were not reproduced in-house in the current study.
Overall, the findings suggest that HYSARD provides a robust model for sarcasm detection and that hybrid feature fusion remains a strong alternative to purely end-to-end transformer approaches in noisy social media environments.

5. Conclusions

This paper presented HYSARD, a hybrid feature-fusion model for sarcasm detection that combines RoBERTa-based sentence embeddings with sentiment, stylistic, syntactic, and TF-IDF lexical features. The proposed model was designed to capture both contextual meaning and explicit linguistic signals that are often important in sarcastic user-generated text.
Experimental results on iSarcasmEval, SARC 2.0 Main Balanced, and SARC 2.0 Political Balanced show that HYSARD achieves strong and consistent performance across datasets, with particularly encouraging results on iSarcasmEval in terms of F1-score and class-wise discrimination. The ablation study further demonstrates that the integration of multiple feature groups improves sarcasm detection relative to reduced configurations. In addition, the Random Forest-based feature selection stage helps reduce redundancy in the fused representation and provides insight into relative feature contribution, while SMOTE improves learning balance in imbalanced settings.
These results indicate that hybrid feature fusion remains an effective and computationally practical strategy for sarcasm detection, particularly when stylistic and lexical cues play an important role. At the same time, the study has several limitations, including its restriction to English-language datasets, its dependence on text-only input, and the absence of controlled in-house reproductions for all literature baselines.
Future work will focus on multilingual sarcasm detection, multimodal extensions, and the integration of conversational context. Additional research should also examine the efficiency–accuracy tradeoff of hybrid models under identical experimental conditions and on broader cross-domain benchmarks.

Author Contributions

Conceptualization, I.J.; methodology, I.J.; software, I.J.; validation, I.J., Z.E.L., A.E.O. and A.A.; formal analysis, I.J. and Z.E.L.; investigation, I.J.; writing—original draft preparation, I.J.; writing—review and editing, Z.E.L., A.E.O. and A.A.; supervision, A.E.O. and A.A. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The datasets analyzed in this study are publicly available. The iSarcasmEval dataset is available at https://github.com/iabufarha/iSarcasmEval (accessed on 15 March 2026). The SARC 2.0 dataset is available at https://github.com/NLPrinceton/SARC (accessed on 15 March 2026). The SARC 2.0 Main Balanced and SARC 2.0 Political Balanced subsets used in this study were derived from the official SARC 2.0 release.

Acknowledgments

The authors would like to thank all contributors and reviewers whose work helped shape the scientific context of this study.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
NLPNatural Language Processing
RNNRecurrent Neural Network
CNNConvolutional Neural Network
POSPart-of-Speech
TF-IDFTerm Frequency–Inverse Document Frequency
SMOTESynthetic Minority Over-sampling Technique
VADERValence Aware Dictionary and sEntiment Reasoner

References

  1. Riloff, E.; Qadir, A.; Surve, P.; De Silva, L.; Gilbert, N.; Huang, R. Sarcasm as Contrast Between a Positive Sentiment and Negative Situation. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing (EMNLP); Association for Computational Linguistics: Stroudsburg, PA, USA, 2013; pp. 704–714. [Google Scholar]
  2. Helal, N.A.; Hassan, A.; Badr, N.L.; Afify, Y.M. A contextual-based approach for sarcasm detection. Sci. Rep. 2024, 14, 15415. [Google Scholar] [CrossRef] [Scilit]
  3. Liu, Y.; Ott, M.; Goyal, N.; Du, J.; Joshi, M.; Chen, D.; Levy, O.; Lewis, M.; Zettlemoyer, L.; Stoyanov, V. RoBERTa. arXiv 2019, arXiv:1907.11692. [Google Scholar] [CrossRef] [Scilit]
  4. Govindan, V.; Balakrishnan, V. A machine learning approach in analysing the effect of hyperboles using negative sentiment tweets for sarcasm detection. J. King Saud Univ.—Comput. Inf. Sci. 2022, 34, 5110–5120. [Google Scholar] [CrossRef] [Scilit]
  5. Gole, M.; Nwadiugwu, W.-P.; Miranskyy, A. On Sarcasm Detection with OpenAI GPT-Based Models. In 2024 34th International Conference on Collaborative Advances in Software and Computing (CASCON 2024); IEEE: New York, NY, USA, 2024. [Google Scholar] [CrossRef] [Scilit]
  6. Hutto, C.J.; Gilbert, E. VADER: A Parsimonious Rule-based Model for Sentiment Analysis of Social Media Text. In Proceedings of the International Conference on Weblogs and Social Media (ICWSM); The Association for the Advancement of Artificial Intelligence (AAAI): Washington, DC, USA, 2014; pp. 5–9. Available online: https://www.researchgate.net/publication/275828927_VADER_A_Parsimonious_Rule-based_Model_for_Sentiment_Analysis_of_Social_Media_Text (accessed on 15 March 2026).
  7. Elreedy, D.; Atiya, A.F. A Comprehensive Analysis of Synthetic Minority Oversampling Technique (SMOTE) for handling class imbalance. Inf. Sci. 2019, 505, 32–64. [Google Scholar] [CrossRef] [Scilit]
  8. Yuan, M.; Zhou, M.; Jiang, L.; Mo, Y.; Shi, X. stce at SemEval-2022 Task 6: Sarcasm Detection in English Tweets. In Proceedings of the 16th International Workshop on Semantic Evaluation (SemEval-2022); Association for Computational Linguistics: Stroudsburg, PA, USA, 2022; pp. 820–826. [Google Scholar] [CrossRef] [Scilit]
  9. Abu Farha, I.; Oprea, S.V.; Wilson, S.; Magdy, W. SemEval-2022 Task 6: iSarcasmEval, Intended Sarcasm Detection in English and Arabic. In Proceedings of the 16th International Workshop on Semantic Evaluation (SemEval-2022); Association for Computational Linguistics: Stroudsburg, PA, USA, 2022; pp. 802–814. [Google Scholar] [CrossRef] [Scilit]
  10. Teles, G.; Rodrigues, J.J.P.C.; Rabêlo, R.a.L.; Kozlov, S.A. Comparative study of support vector machines and random forests machine learning algorithms on credit operation. Softw. Pract. Exp. 2020, 51, 2492–2500. [Google Scholar] [CrossRef] [Scilit]
  11. Mikolov, T.; Chen, K.; Corrado, G.; Dean, J. Efficient Estimation of Word Representations in Vector Space. arXiv 2013, arXiv:1301.3781. [Google Scholar] [CrossRef] [Scilit]
  12. Pennington, J.; Socher, R.; Manning, C.D. GloVe: Global Vectors for Word Representation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP); Association for Computational Linguistics: Stroudsburg, PA, USA, 2014; pp. 1532–1543. [Google Scholar] [CrossRef] [Scilit]
  13. Babanejad, N.; Davoudi, H.; An, A.; Papagelis, M. Affective and Contextual Embedding for Sarcasm Detection. In Proceedings of the 28th International Conference on Computational Linguistics; International Committee on Computational Linguistics: Stroudsburg, PA, USA, 2020; pp. 225–243. [Google Scholar] [CrossRef] [Scilit]
  14. Potamias, R.A.; Siolas, G.; Stafylopatis, A.G. A transformer-based approach to irony and sarcasm detection. Neural Comput. Appl. 2020, 32, 17309–17320. [Google Scholar] [CrossRef] [Scilit]
  15. Dubey, P.; Dubey, P.; Bokoro, P.N. Unpacking Sarcasm: A Contextual and Transformer-Based approach for improved detection. Computers 2025, 14, 95. [Google Scholar] [CrossRef] [Scilit]
  16. Hazarika, D.; Poria, S.; Gorantla, S.; Cambria, E.; Zimmermann, R. CASCADE: Contextual Sarcasm Detection in Online Discussion Forums. In Proceedings of the 27th International Conference on Computational Linguistics; Association for Computational Linguistics: Stroudsburg, PA, USA, 2018; pp. 1837–1848. Available online: https://aclanthology.org/C18-1/ (accessed on 15 March 2026).
  17. Khan, A.; Majumdar, D.; Mondal, B. A hybrid transformer based model for sarcasm detection from news headlines. J. Intell. Inf. Syst. 2025, 63, 1339–1359. [Google Scholar] [CrossRef] [Scilit]
  18. Awan, S.S.; Amjad, S.; Ali, S.; Shah, D.; Tahir, M. Efficient sarcasm detection in social media using hybrid CapsNet-LSTM fusion and feature optimization. Soc. Netw. Anal. Min. 2026, 16, 41. [Google Scholar] [CrossRef] [Scilit]
  19. Safeer, E.; Tahir, S.; Rehman, S.U.; Abdel Samee, N.; Mahmood, K.; Park, Y.; Ashraf, I. SarcAE: Embedding fusion and fuzzy logic for advanced sarcasm detection. Knowl. Inf. Syst. 2026, 68, 104. [Google Scholar] [CrossRef] [Scilit]
  20. Toprak, A.; Turan, M. Automated thematic dictionary creation using the web based on WordNet, Spacy, and Simhash. Data Inf. Manag. 2024, 9, 100088. [Google Scholar] [CrossRef] [Scilit]
  21. Chiche, A.; Yitagesu, B. Part of speech tagging: A systematic review of deep learning and machine learning approaches. J. Big Data 2022, 9, 10. [Google Scholar] [CrossRef] [Scilit]
  22. Wan, Q.; Xu, X.; Han, J. A dimensionality reduction method for large-scale group decision-making using TF-IDF feature similarity and information loss entropy. Appl. Soft Comput. 2024, 150, 111039. [Google Scholar] [CrossRef] [Scilit]
  23. Reimers, N.; Gurevych, I. Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing; Association for Computational Linguistics: Stroudsburg, PA, USA, 2019; pp. 3982–3992. [Google Scholar] [CrossRef] [Scilit]
  24. Aljohani, A.; Alharbe, N.; Al Mamlook, R.E.; Khayyat, M.M. A hybrid combination of CNN Attention with optimized random forest with grey wolf optimizer to discriminate between Arabic hateful, abusive tweets. J. King Saud Univ.—Comput. Inf. Sci. 2024, 36, 101961. [Google Scholar] [CrossRef] [Scilit]
  25. Ahmad, G.N.; Fatima, H.; Ullah, S.; Saidi, A.S.; Imdadullah. Efficient Medical Diagnosis of Human Heart Diseases Using Machine Learning Techniques With and Without GridSearchCV. IEEE Access 2022, 10, 80151–80173. [Google Scholar] [CrossRef] [Scilit]
  26. Khodak, M.; Saunshi, N.; Vodrahalli, K. A Large Self-Annotated Corpus for Sarcasm. In Proceedings of the Eleventh International Conference on Language Resources and Evaluation (LREC 2018); European Language Resources Association (ELRA): Paris, France, 2018; Available online: https://aclanthology.org/L18-1102/ (accessed on 15 March 2026).
  27. Lak, A.J.; Boostani, R.; Alenizi, F.A.; Mohammed, A.S.; Fakhrahmad, S.M. RoBERTa, ResNeXt and BiLSTM with self-attention: The ultimate trio for customer sentiment analysis. Appl. Soft Comput. 2024, 164, 112018. [Google Scholar] [CrossRef] [Scilit]
  28. Han, Y.; Chai, Y.; Wang, S.; Sun, Y.; Huang, H.; Chen, G.; Xu, Y.; Yang, Y. X-PuDu at SemEval-2022 Task 6: Multilingual Learning for English and Arabic Sarcasm Detection. In Proceedings of the 16th International Workshop on Semantic Evaluation (SemEval-2022); Association for Computational Linguistics: Stroudsburg, PA, USA, 2022; pp. 999–1004. [Google Scholar] [CrossRef] [Scilit]
  29. Qin, J.; Lou, Y. L1-2 Regularized Logistic Regression. In Conference Record—53rd Asilomar Conference on Circuits, Systems and Computers (ACSSC 2019); IEEE: New York, NY, USA, 2019; pp. 779–783. [Google Scholar] [CrossRef] [Scilit]
  30. Heraldi, F.D.; Ruskanda, Z. Effective Intended Sarcasm Detection Using Fine-tuned Llama 2 Large Language Models. In 2024 11th International Conference on Advanced Informatics: Concept, Theory and Application (ICAICTA); IEEE: New York, NY, USA, 2024; pp. 1–6. [Google Scholar] [CrossRef] [Scilit]
  31. Akula, R.; Garibay, I. Interpretable Multi-Head Self-Attention Architecture for Sarcasm Detection in Social Media. Entropy 2021, 23, 394. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  32. Ilic, S.; Marrese-Taylor, E.; Balazs, J.A.; Matsuo, Y. Deep contextualized word embeddings for detecting sarcasm and irony. In Proceedings of the 9th Workshop on Computational Approaches to Subjectivity, Sentiment and Social Media Analysis; Association for Computational Linguistics: Stroudsburg, PA, USA, 2018; pp. 2–11. Available online: https://aclanthology.org/W18-6200/ (accessed on 15 March 2026).
Figure 1. Architecture of HYSARD, the proposed hybrid model for sarcasm detection, unifying RoBERTa embeddings with linguistic features, feature selection, and class imbalance handling.
Figure 1. Architecture of HYSARD, the proposed hybrid model for sarcasm detection, unifying RoBERTa embeddings with linguistic features, feature selection, and class imbalance handling.
Bdcc 10 00144 g001
Figure 2. Mean 5-fold cross-validation performance of the five ablation configurations on the iSarcasmEval training split.
Figure 2. Mean 5-fold cross-validation performance of the five ablation configurations on the iSarcasmEval training split.
Bdcc 10 00144 g002
Figure 3. Feature importance analysis of HYSARD, showing the relative contribution of each feature group to sarcasm detection.
Figure 3. Feature importance analysis of HYSARD, showing the relative contribution of each feature group to sarcasm detection.
Bdcc 10 00144 g003
Figure 4. Confusion matrix of HYSARD on the iSarcasmEval test set.
Figure 4. Confusion matrix of HYSARD on the iSarcasmEval test set.
Bdcc 10 00144 g004
Table 1. Class distribution before and after applying SMOTE on iSarcasmEval.
Table 1. Class distribution before and after applying SMOTE on iSarcasmEval.
Class DistributionNon-Sarcastic (0)Sarcastic (1)
Before SMOTE2601867
After SMOTE26012601
Table 2. iSarcasmEval dataset statistics.
Table 2. iSarcasmEval dataset statistics.
StatisticTraining SetTest Set
Non-Sarcastic
No. of Comments26011200
Avg. Words/Comment *19.0115.42
Sarcastic
No. of Comments867200
Avg. Words/Comment *18.3022.28
Note. * Average words per comment were calculated by the authors based on the official iSarcasmEval splits, as these values are not explicitly reported in the dataset documentation.
Table 3. SARC 2.0 Main Balanced dataset statistics.
Table 3. SARC 2.0 Main Balanced dataset statistics.
StatisticTraining SetTest Set
Non-Sarcastic Class
No. of Comments68341703
Avg. Words/Comment55.1355.55
Sarcastic Class
No. of Comments68341703
Avg. Words/Comment55.0855.01
Table 4. SARC 2.0 Political (Balanced) dataset statistics.
Table 4. SARC 2.0 Political (Balanced) dataset statistics.
StatisticTraining SetTest Set
Non-Sarcastic Class
No. of Comments68341703
Avg. Words/Comment64.7462.99
Sarcastic Class
No. of Comments68341703
Avg. Words/Comment62.3662.14
Table 5. Dimensionality of feature groups before and after feature selection.
Table 5. Dimensionality of feature groups before and after feature selection.
Feature GroupBefore SelectionAfter Selection
RoBERTa embeddings10241024
Sentiment features44
Stylistic features54
POS features1818
TF-IDF features50001976
Total60513026
Table 6. Configuration of the in-house fine-tuned RoBERTa baseline on iSarcasmEval.
Table 6. Configuration of the in-house fine-tuned RoBERTa baseline on iSarcasmEval.
ParameterValue
Checkpointroberta-large
Task formulationBinary sequence classification
Maximum sequence length128
Batch size16
Gradient accumulation steps2
Effective batch size32
OptimizerAdamW
Learning rate 2 × 10 5
Weight decay0.01
Warmup ratio0.10
Learning-rate schedulerLinear decay
Epochs4
Dropout0.10
Gradient clipping1.0
Loss functionWeighted cross-entropy
Model selection criterionValidation sarcastic-class F1-score
Early stoppingPatience = 2
Random seed42
HardwareNVIDIA Tesla V100
Table 7. Mean 5-fold cross-validation performance of the ablation configurations on the iSarcasmEval training split.
Table 7. Mean 5-fold cross-validation performance of the ablation configurations on the iSarcasmEval training split.
CombinationAccuracyF1 Score
C1: R + S0.650.60
C2: R + S + Sty0.690.67
C3: R + S + POS0.650.64
C4: R + S + Sty + POS0.760.73
C5: R + S + Sty + POS + TF-IDF0.850.80
Table 8. 5-fold cross-validation mean and standard deviation for the full HYSARD configuration (C5) on the iSarcasmEval training split.
Table 8. 5-fold cross-validation mean and standard deviation for the full HYSARD configuration (C5) on the iSarcasmEval training split.
MetricMeanStd
Accuracy0.850.015
F1-score0.800.018
Table 9. Ablation study of imbalance-handling strategies on iSarcasmEval. Accuracy, precision, recall, and F1-score are reported for each imbalance-handling strategy.
Table 9. Ablation study of imbalance-handling strategies on iSarcasmEval. Accuracy, precision, recall, and F1-score are reported for each imbalance-handling strategy.
StrategyAccuracyPrecisionRecallF1 Score
None0.700.710.670.69
ClassWeight0.790.770.750.76
SMOTE0.850.810.790.80
UnderSampling0.740.710.730.72
Table 10. Performance comparison on the iSarcasmEval dataset (SemEval-2022 Task 6). Literature-reported models are shown for contextual comparison, while the fine-tuned RoBERTa baseline was reproduced in-house under the same evaluation protocol as HYSARD.
Table 10. Performance comparison on the iSarcasmEval dataset (SemEval-2022 Task 6). Literature-reported models are shown for contextual comparison, while the fine-tuned RoBERTa baseline was reproduced in-house under the same evaluation protocol as HYSARD.
ModelF1 Score
STCE [8]0.605
X-PuDu [28]0.569
TUG-CIC [28]0.530
L2-Logistic Regression [29]0.765
SVM Baseline [28]0.640
LLaMA 2 13B (fine-tuned, literature) [30]0.687
RoBERTa (fine-tuned, in-house)0.450
Proposed Model (HYSARD)0.800
Table 11. Performance comparison on the SARC 2.0 Main Balanced dataset.
Table 11. Performance comparison on the SARC 2.0 Main Balanced dataset.
ModelAccuracyF1 Score
CASCADE [16]0.7700.770
Interpretable Multi-Head Self-Attention [31]0.8100.810
ELMo-BiLSTM Full [32]0.7020.760
RCNN-RoBERTa [14]0.7900.780
Proposed Model (HYSARD)0.8460.830
Table 12. Performance comparison on the SARC 2.0 Political (Balanced) dataset.
Table 12. Performance comparison on the SARC 2.0 Political (Balanced) dataset.
ModelAccuracyF1 Score
CASCADE [16]0.7400.750
Interpretable Multi-Head Self-Attention [31]0.8000.800
RCNN-RoBERTa [14]0.7900.780
Fine-tuned GPT-3 [5]0.8100.808
ELMo-BiLSTM Full [32]0.7100.765
Proposed Model (HYSARD)0.8500.830
Table 13. Class-wise error analysis on the iSarcasmEval test set.
Table 13. Class-wise error analysis on the iSarcasmEval test set.
ClassPrecisionRecallF1-ScoreSupport
Non-sarcastic0.96670.96670.96671200
Sarcastic0.80000.80000.8000200
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Jabri, I.; Louriga, Z.E.; Ouaazizi, A.E.; Ahaitouf, A. HYSARD: A Hybrid Feature-Fusion Model for Sarcasm Detection Using RoBERTa Embeddings and Linguistic Features. Big Data Cogn. Comput. 2026, 10, 144. https://doi.org/10.3390/bdcc10050144

AMA Style

Jabri I, Louriga ZE, Ouaazizi AE, Ahaitouf A. HYSARD: A Hybrid Feature-Fusion Model for Sarcasm Detection Using RoBERTa Embeddings and Linguistic Features. Big Data and Cognitive Computing. 2026; 10(5):144. https://doi.org/10.3390/bdcc10050144

Chicago/Turabian Style

Jabri, Ismail, Zine Eddine Louriga, Aziza El Ouaazizi, and Abdelaziz Ahaitouf. 2026. "HYSARD: A Hybrid Feature-Fusion Model for Sarcasm Detection Using RoBERTa Embeddings and Linguistic Features" Big Data and Cognitive Computing 10, no. 5: 144. https://doi.org/10.3390/bdcc10050144

APA Style

Jabri, I., Louriga, Z. E., Ouaazizi, A. E., & Ahaitouf, A. (2026). HYSARD: A Hybrid Feature-Fusion Model for Sarcasm Detection Using RoBERTa Embeddings and Linguistic Features. Big Data and Cognitive Computing, 10(5), 144. https://doi.org/10.3390/bdcc10050144

Article Metrics

Back to TopTop