Skip to content
Back to skills

Contextual Sarcasm Detection Eval

ASecurity

Evaluates a model's ability to detect sarcasm in contextual settings across Reddit comments, tweets, and multi-turn dialogues. It probes the capacity to capture sentiment incongruity and contextual cues rather than relying on surface-level lexical features. Use when the user wants to benchmark on SARC 2.0, Twitter, Sarcasm Corpus V2 Dialogues, or asks about evaluating this task. Reports F1-Score.

  • 3 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 11, 2026
researchpythongoperformance

Works with

  • cli

Security analysis

A100/100

Scanned September 11, 2026

npx -y skills add qhjqhj00/research-skills-pool --skill contextual-sarcasm-detection-eval --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Contextual Sarcasm Detection Eval?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Contextual Sarcasm Detection Eval
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/qhjqhj00-contextual-sarcasm-detection-eval/badge)](https://www.skillsdirectory.com/skills/qhjqhj00-contextual-sarcasm-detection-eval)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: contextual-sarcasm-detection-eval
description: Evaluates a model's ability to detect sarcasm in contextual settings across Reddit comments, tweets, and multi-turn dialogues. It probes the capacity to capture sentiment incongruity and contextual cues rather than relying on surface-level lexical features. Use when the user wants to benchmark on SARC 2.0, Twitter, Sarcasm Corpus V2 Dialogues, or asks about evaluating this task. Reports F1-Score.
metadata:
  skill_kind: dataset_eval
  source_arxiv: 2503.11838
  bibtex_key: [REDACTED]
  confidence: high
---

# contextual-sarcasm-detection-eval

> A Transformer and Prototype-based Interpretable Model for Contextual Sarcasm Detection — Wen et al. (2025) (arXiv:2503.11838, 2025)

## What this evaluates

Evaluates a model's ability to detect sarcasm in contextual settings across Reddit comments, tweets, and multi-turn dialogues. It probes the capacity to capture sentiment incongruity and contextual cues rather than relying on surface-level lexical features.

## Datasets

- **SARC 2.0** — total 1300000; splits: train (118940), test (56118); repo https://nlp.cs.princeton.edu/old/SARC/2.0/
- **Twitter** — total 1956; splits: train (1368), test (588)
- **Sarcasm Corpus V2 Dialogues** — total ?; splits: train (-1), test (-1)

## Metrics

- `accuracy` — range: [0, 1]
  - Fraction of correctly classified instances out of the total number of instances.
- `recall` — range: [0, 1]
  - True positive rate: proportion of actual sarcastic instances correctly identified by the model.
- `F1-Score` **(primary)** — range: [0, 1]
  - Harmonic mean of precision and recall. The final reported value is the average across 5-fold cross-validation runs.

## Input / output format

**Input**: Raw text of a social media comment, tweet, or dialogue turn.

**Output**: Binary classification label indicating whether the text is sarcastic or non-sarcastic.

## Scoring recipe

```python
def compute_metrics(preds, gold):
    tp = sum(p == 1 and g == 1 for p, g in zip(preds, gold))
    fp = sum(p == 1 and g == 0 for p, g in zip(preds, gold))
    fn = sum(p == 0 and g == 1 for p, g in zip(preds, gold))
    acc = (tp + sum(p == g for p, g in zip(preds, gold))) / len(gold)
    rec = tp / (tp + fn) if (tp + fn) > 0 else 0.0
    prec = tp / (tp + fp) if (tp + fp) > 0 else 0.0
    f1 = 2 * prec * rec / (prec + rec) if (prec + rec) > 0 else 0.0
    return acc, rec, f1
# Final reported metric = mean(metric_values across 5 CV folds)
```

## Common pitfalls

- Must use the 'primary main balanced variation' of SARC 2.0, not the raw imbalanced corpus, as class distribution significantly impacts metrics.
- Results must be averaged across 5-fold cross-validation; single-run or single-split scores are not comparable to the reported protocol.
- Prototype distance metric (Euclidean for RoBERTa vs Cosine for SBERT) affects interpretability but does not change the primary classification metric calculation.

## Evidence (verbatim from paper)

> We used accuracy, recall, and F1-Score as metrics to evaluate models’ performance. Since we use 5-fold cross-validation, we calculated the average of 5 experiment results on the test dataset for each metric as the final result.

## Citation

```bibtex
@misc{wen2025transformer,
  title={A Transformer and Prototype-based Interpretable Model for Contextual Sarcasm Detection},
  author={Wen et al. (2025)},
  year={2025},
  note={arXiv:2503.11838}
}
```

- arXiv: 2503.11838

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.