Situation-First Sarcasm Detection That Survives Rephrasing

Sarcasm means saying something whose literal content clashes with what the speaker actually means, as in "Stuck in traffic makes me happy." Recognizing it usually takes background knowledge: the reader has to know that traffic jams are annoying. Recent detectors supply this knowledge by querying commonsense generators or web retrieval, then attaching the results to the sentence's grammatical parse. No one has checked whether these systems still work when the same sarcastic thought is phrased differently, for instance "What makes me happy is being stuck in traffic." That gap matters for two reasons. First, work on syntactic paraphrase shows that sentiment classifiers change their prediction on 41.8% of meaning-preserving rewrites. Second, the leading knowledge-augmented sarcasm models tie their knowledge lookup directly to the original parse tree.

We propose separating the situation being described from the attitude being expressed, and making every knowledge query depend only on the situation. The model first rewrites the input into a neutral, syntax-free description of the event ("the author is stuck in traffic"). It retrieves the typical human reaction to that event, and it flags sarcasm when the speaker's expressed attitude clashes with that expected reaction. We test this with a two-sided benchmark built from iSarcasm. The benchmark contains rewrites that change the grammar but keep the sarcasm, where a good detector should not change its answer. It also contains the authors' own non-sarcastic rephrasings of their tweets, which describe the same situation but drop the irony, and there a good detector must change its answer. A model that is only robust will fail the second half, and a model that only matches surface cues will fail the first half.

Core Claim

External knowledge helps sarcasm detection only when two conditions hold. The knowledge has to be retrieved from a representation of the situation that does not depend on sentence structure, and it has to be used only through an explicit comparison with the speaker's expressed attitude. When both hold, the detector should keep its prediction under sarcasm-preserving syntactic rewrites and flip it under situation-preserving de-sarcastification. Current dependency-graph models and end-to-end reasoning models will fall short on at least one of the two.

The claim reconciles a contradiction in the literature. Does Commonsense help in detecting Sarcasm? fed COMET intent and effect outputs into a DistilBERT-plus-GraphSage model and found no gain (96.18% vs. 96.13% accuracy on News Headlines). More than 90% of its predictions were identical to the baseline, and irrelevant commonsense made the model hallucinate sarcasm on literal sentences. In contrast, CSDGCN grafts COMET inferences into dependency-tree slots and reports large gains, including 87.16% accuracy on Riloff. EICR grounds commonsense with BERT-BM25 web retrieval, prunes a dependency graph, and reports 70.4% Macro-F1 on iSarcasm. Our hypothesis is that the structured models succeed partly by exploiting canonical tweet syntax, and that the "noise" found by Roy Chowdhury and Chaturvedi comes back once that syntax changes. Using knowledge only through a clash score should suppress that noise: knowledge that is irrelevant to a literal sentence produces no clash, so it cannot push the prediction toward sarcasm.

Research Program

The first component is the evaluation set, which motivates everything else. We start from iSarcasm. Its 4,484 tweets carry labels from the original authors, not from third-party annotators, and it is the dataset where hashtag-trained models collapse to 0.364 F1. Its sarcastic tweets also come with author explanations and non-sarcastic rephrasings. Those rephrasings form our "flip" half of the benchmark: the same situation without the irony.

For the "keep" half, we generate structural rewrites of both sarcastic and non-sarcastic tweets. Two generators are used. One is the parse-template approach of Syntactically Controlled Paraphrase Networks, which produces passives, clefts, fronting, and clause reordering. The other is an LLM prompted with the same target structures. Iyyer et al. report that only 62–64% of their outputs were grammatical and meaning-preserving, and sarcasm is more fragile than plain sentiment, so every rewrite is verified by humans. Annotators see the author's explanation and judge whether the rewrite conveys the same intent. Showing the explanation is deliberate: Oprea and Magdy found that third-party readers miss 30% of intended sarcasm, and the explanation reduces that problem. We apply the same protocol to Riloff and Ghosh so results can be compared with CSDGCN and EICR on their home benchmarks.

The second component is the detector, which has three parts. The first part is a situation extractor: an instruction-tuned LLM, lightly fine-tuned, that rewrites the input into a neutral event statement with evaluative words removed. We train it with a consistency objective, so that all verified structural rewrites of a tweet should produce the same event statement. The second part queries knowledge on the event statement alone. It uses COMET reaction and effect relations, with an optional EICR-style retrieval branch, and outputs an expected valence $k$, meaning the typical emotional reaction to the situation. The third part is a stance head over the original text, which outputs the expressed valence $e$ toward that situation.

The classifier sees the text encoding together with $k$, $e$, and the clash $|e-k|$. It is trained with

$$ \mathcal{L} = \mathcal{L}_{\text{cls}} + \lambda_1 \, \mathrm{KL}\big(p(x)\,\|\,p(x')\big) + \lambda_2 \max\big(0,\ m - |p(x) - p(\tilde{x})|\big), $$

where $p(\cdot)$ is the predicted sarcasm probability, $x'$ is a sarcasm-preserving rewrite of tweet $x$, $\tilde{x}$ is its de-sarcastified rephrasing, $m$ is a margin, and $\lambda_1,\lambda_2$ weight the two pair terms. The KL term enforces invariance, and the margin term enforces sensitivity. Only training-split pairs are used; the evaluation pairs are held out by tweet. The key design choice is that knowledge never touches the original parse. That is the main difference from CSDGCN and EICR, which both attach knowledge to a dependency graph of the surface sentence.

We also measure knowledge-query stability directly: how much the retrieved commonsense overlaps across rewrites of the same tweet. This lets us attribute any label flips to the knowledge step or to the classifier.

Baselines

The naive reference points are a fine-tuned RoBERTa-large classifier without external knowledge, and a trivial majority-class predictor for the imbalanced iSarcasm split. The knowledge-free encoder matters because Roy Chowdhury and Chaturvedi found it matches the COMET-augmented model. If our system cannot beat it on the combined keep-and-flip score, the knowledge pathway has earned nothing.

The strongest existing method on iSarcasm is Sarcasm-R1. It is Qwen2.5-7B trained with group-relative policy optimization, using separate reward models for linguistic, contextual, and emotional reasoning, and it reports 85.4% accuracy and 72.3% Macro-F1 on iSarcasm. It is the most serious competitor because its contextual dimension already reasons about commonsense inside one model, and its reasoning chain could in principle handle rephrasing without any explicit separation. We run it on our benchmark using released weights if they are available. Otherwise we reproduce its training on Qwen2.5-7B with an equal GPU-hour budget.

EICR (70.4% Macro-F1 on iSarcasm) and CSDGCN (87.16% accuracy on Riloff, 85.93% on Ghosh) are the strongest structure-plus-knowledge competitors. They directly test the parse-dependence hypothesis. GPT-4o is included as the prompting reference; Sarcasm-R1 reports it at 76.0% accuracy and 59.4% Macro-F1 on iSarcasm.

No reported result was found on Lacuna for any sarcasm detector's label flip rate under syntactic paraphrase, so the robustness numbers of every baseline will be new measurements. For fairness, our detector uses the same Qwen2.5-7B backbone as Sarcasm-R1, the same training splits, and the same hyperparameter search budget. Every baseline that trains is given access to the same augmented pairs.

Two ablations isolate the key ingredient. The first queries knowledge on the raw tweet instead of the event statement. The second replaces the clash score with plain concatenation of the knowledge. Beating the field means three things at once: matching Sarcasm-R1's clean iSarcasm Macro-F1 within one point, achieving a lower flip rate on the keep half, and achieving a higher flip rate on the flip half. We report paired bootstrap confidence intervals, because the sarcastic subset of iSarcasm is small (about 750 tweets, given the 1:5 ratio).

Why not just…?

Why not just train a strong detector with paraphrase augmentation and a consistency loss? This is the most serious threat. It is exactly the method of Guarding the Meaning, which cut the label flip rate of a safety classifier from 27.87% to 9.14% using LLM paraphrases and a consistency loss. We expect it to do well on the keep half. Our concern is that sarcasm is fragile: an invariance-only objective also pushes the model to ignore rephrasings that do remove the irony, so the flip half should suffer. We run this baseline on Sarcasm-R1's backbone, and we also run a version that includes our margin term but no situation extractor. If that version matches the full system on both halves, then the situation-first design is unnecessary. The contribution would then reduce to the benchmark and the two-sided objective, and we would report it that way.

Why not just rely on Sarcasm-R1 or a frontier LLM, whose reasoning should already abstract over syntax? They may. That is precisely what nobody has measured, and our benchmark measures it. Two pieces of evidence give reason for doubt. Sarcasm-R1's own ablation shows its surface-linguistic dimension carries 7.6 points of Macro-F1, which suggests heavy reliance on form. Its authors also report that unconstrained chain-of-thought hallucinates sarcasm. If Sarcasm-R1 shows low flip rates on the keep half and correct flips on the flip half, the central hypothesis is refuted for end-to-end reasoners.

Why not just drop external knowledge, since it did not help? Roy Chowdhury and Chaturvedi's null result is the reason we route knowledge only through a clash score. A null result on clean test sets does not show that knowledge is useless on rewritten inputs, where surface cues are disrupted. The knowledge-free RoBERTa baseline and the concatenation ablation settle this directly.

Why not just use back-translation for augmentation? Iyyer et al. found that back-translation flips predictions in only 20.2% of cases, compared with 41.8% for controlled syntactic rewrites. It mostly swaps words and rarely produces the structural shifts we target. We include it as an augmentation baseline, expecting it to improve the keep half less than template rewrites do.

Proposed Experiments

The first decisive check is diagnostic and does not depend on our model. On the keep half, do CSDGCN and EICR flip their predictions more often than the knowledge-free encoder? And does the commonsense they retrieve change across rewrites of the same tweet? If the flip rates are similar and retrieval is stable, the parse-dependence hypothesis fails, and the proposal narrows to the sensitivity side.

The second check is the main comparison on iSarcasm, Riloff, and Ghosh. We report three quantities for each model: clean Macro-F1, flip rate on the keep half, and correct-flip rate on the flip half, using the baselines above. Results are broken down by rewrite type (passive, cleft, fronting, clause reordering) and by sarcasm type, since situational incongruity is the case our design targets. We expect little gain on sarcasm that is purely rhetorical or hyperbolic, and we will report that explicitly.

The third check tests Roy Chowdhury and Chaturvedi's noise problem. On non-sarcastic tweets and their rewrites, we measure false-positive rates for concatenated knowledge versus clash-mediated knowledge. We also repeat their occlusion analysis to see whether our model actually uses the knowledge pathway.