Sarcasm often depends on facts that are not in the text. "Stuck in a traffic jam makes me happy" is sarcastic only if you know traffic jams are miserable. The obvious fix is to feed a detector extra background statements, produced by a commonsense generator or a retrieval system. The evidence on whether this helps is mixed. One careful study found that generated commonsense gives no gain and makes models invent sarcasm in plain tweets. Other systems report large gains, but only after heavy hand-built filtering. We propose a simpler and more checkable way to decide which background statements matter. We treat each tweet as a bag of candidate pairs, each pairing a short chunk of the tweet with one background statement. We train with only the tweet-level sarcastic/not label, under one asymmetric rule. A sarcastic tweet needs a few pairs to score as clashing. A non-sarcastic tweet must have every pair score low.
That second half of the rule does the pruning. Every plain tweet paired with irrelevant generated knowledge becomes a training signal that pushes irrelevant knowledge toward zero. We therefore expect noise tolerance to come from the loss rather than from lexicons or graph surgery. The same selection also produces, for free, the chunk and the fact that explain each prediction. That output is a word-level rationale that current sarcasm detectors trained on tweet-level labels do not give.
Core Claim
Our claim is that multiple instance learning (MIL) resolves the conflict in the literature about whether commonsense helps sarcasm detection. MIL is learning from labels on groups ("bags") when the thing you care about lives in unlabeled members ("instances"). It works when two conditions hold: the instances are text–knowledge pairs, and the negative-bag constraint is enforced with a max over pairs. Under this setup, adding more generated knowledge should stop hurting, because its false-positive rate on non-sarcastic text stays flat. It should also yield chunk-level localization of the sarcastic situation that competes with a tagger trained on dense word labels.
Formally, a tweet $x$ is split into chunks $S(x)$. A chunk is a noun-phrase or verb-group chunk from a Twitter part-of-speech tagger, or a single emoji or hashtag. Each chunk $s$ receives generated or retrieved background statements, and all of these together form $K(x)$. A scorer $f(s,k)\in[0,1]$ rates how strongly chunk $s$ clashes with statement $k$ in the context of the tweet. Some pairs have $k$ equal to another chunk, so that explicit clashes inside the text are covered too. With label $y\in\{0,1\}$ and $\bar f_k(x)$ the mean of the top-$k$ pair scores, the objective is
$$\mathcal{L}(x,y) = -\,y\log \bar f_k(x)\;-\;(1-y)\log\Big(1-\max_{(s,k)} f(s,k)\Big),$$
plus a small sparsity penalty on the positive-bag scores. The asymmetry is deliberate. Positive bags need only a few high scores. Negative bags are penalized by their single worst pair, so any spurious clash created by noisy knowledge on a plain tweet is directly suppressed.
Relation to Prior Work
Three papers motivate the gap and set the constraints.
Does Commonsense help in detecting Sarcasm? combined COMET intent and effect statements with DistilBERT through graph message passing. It found no significant gain: 96.13% versus 96.18% accuracy on News Headlines. Hiding the commonsense changed model confidence by only 1.38%, and irrelevant statements made plain text look sarcastic. We take this as a negative result that rules out unfiltered fusion. We test whether an MIL loss, rather than architecture, is the missing filter.
Commonsense Knowledge Enhanced Sentiment Dependency Graph for Sarcasm Detection (CSDGCN) filters COMET output with sentiment lexicons and substitutes the survivors into dependency trees. Detecting Emotional Incongruity of Sarcasm by Commonsense Reasoning (EICR) uses retrieval-grounded LLM knowledge, metric learning, meta-path edge pruning, a rule-guided entailment checker and adversarial contrastive training. Both succeed, but both filter by construction. Both also supervise only at the tweet level, so the "suspicious subgraphs" they find are never scored as outputs.
Our proposal replaces lexicon and rule filtering with a learned filter driven by negative bags. It also makes the selected pair an evaluated output rather than an internal step. The affective graph models Affective Dependency Graph for Sarcasm Detection and Augmenting Affective Dependency Graph via Iterative Incongruity Graph Learning share the same tweet-level supervision. They also start from spaCy dependency trees, which are fragile on tweets. The second paper learns to down-weight spurious clashes, but only through the global loss.
The method comes from Robust Hallucination Detection in LLMs via Adaptive Token Selection (HaMI). HaMI treats a generation as a bag of tokens, selects the top-$k$ most suspicious tokens, and adds a smoothness loss. It locates factual errors from response-level labels and reported gains of up to 11.5%. We borrow top-$k$ selection and the code base (mala-lab/HaMI), but change the instances and the setting. HaMI's instances are tokens of a model's own output, scored with that model's hidden states. Ours are pairs of a tweet chunk and an external statement. What is being located is an incongruity between text and world, not a false claim. We use an open encoder as the scorer, which avoids HaMI's need for internal access to a large model. HaMI's smoothness loss assumes contiguous spans, and sarcastic incongruity often links distant pieces. We drop that loss in favor of the pair structure.
The informal-text literature supplies the choice of units. Part-of-Speech is (almost) enough showed that part-of-speech features beat lexical and knowledge-base features for tweet entity extraction, with an F1 of 0.629. Combining linguistic and machine learning techniques for email summarization showed that filtered noun phrases are the reliable units in messy text. IIIDYT at IEST 2018 showed that emojis carry much of the implicit emotion in tweets. We therefore build chunks from shallow tagging and keep emojis and hashtags as their own chunks, instead of parsing full dependency trees. This is a design constraint, not the main contribution, and we test it with one ablation.
Two further papers show the costs we avoid. Multimodal Sarcasm Target Identification in Tweets locates sarcasm targets only with dense word-level BIO tags, a labeling scheme that marks the beginning and inside of each target span. iSarcasm and iSarcasmEval collected author-written literal rephrases but used them only for generation and pairwise tasks.
Research Program
We would build four components.
The first is a chunker for tweets using an off-the-shelf Twitter part-of-speech tagger. Emojis, hashtags and user handles become standalone chunks, and a character-offset map projects chunk scores back to tokens.
The second is a knowledge generator that produces up to $m$ statements per chunk from two sources. One source is COMET-style intent and effect relations, matching the noisy source in the Basu Roy Chowdhury and Chaturvedi study. The other is an open LLM prompted for background facts about the chunk. The number of statements per chunk, $m$, is an experimental dial rather than a tuned constant.
The third is a cross-encoder scorer $f$ (a DeBERTa-class model reading tweet, chunk and statement together), trained with the loss above. We report a pure-MIL variant, whose decision is $\bar f_k(x)$ alone, so that localization and classification share one mechanism. We also report a hybrid variant that adds the tweet encoder's own logit. The hybrid is expected to classify slightly better, and we check whether it bypasses the selected pairs.
The fourth is the analysis. We measure how selected pairs split into explicit clashes (text versus text) and implicit clashes (text versus knowledge). We compare those splits against the explicit/implicit incongruity distinction of Harnessing Context Incongruity for Sarcasm Detection. We also examine failures on situational sarcasm such as "she wrapped all the presents including me", which CSDGCN's authors report as a failure mode.
We would train on the tweet-level labels of iSarcasm, SemEval-2018 Task 3, Riloff, Ghosh and Ptáček. Word-level labels are never used for training.
Baselines
The naive reference point is a fine-tuned text-only encoder of the same size with no knowledge. We run it on identical splits with the same hyperparameter search budget. For spans, we use its integrated-gradient attributions, pooled to chunks. On intended sarcasm this kind of model is weak. The iSarcasmEval BERT baseline reports $F_{\text{sarcastic}}=0.348$ against the top team's 0.605 (iSarcasmEval). Our own tuned version is the fair comparison point.
The strongest existing method is EICR (Qiu et al.). It is the strongest because it already fuses grounded knowledge with explicit noise suppression, and the file reports that it beat GPT-4o prompting even with 10–50% of the training data. It reports Macro-F1 of 70.4% (accuracy 83.3%) on iSarcasm, 80.3% on SemEval-2018, 84.3% on Ghosh, 83.8% on IAC-V2 and 75.3% on Reddit. We compare against these numbers on the same splits. Where code is unavailable, we compare only on the published splits and metric. We count as beating EICR a Macro-F1 at least equal on iSarcasm and SemEval-2018, achieved without its rule-guided entailment checker or adversarial training. Our main claim is noise robustness and localization, not a new top accuracy. Matching EICR with a single loss and publishable rationales would be the result. Falling more than about two points short would count against the claim that the loss can replace hand-built filtering.
For the iSarcasmEval metric we cite the shared task's top $F_{\text{sarcastic}}=0.605$ and report that metric separately. It is not comparable to EICR's Macro-F1. CSDGCN (87.16% accuracy on Riloff, 85.93% on Ghosh, 84.95% on Ptáček) serves as the lexicon-filtered knowledge baseline on the Twitter sets.
For localization, the upper reference is the fully supervised text target model of MSTI, with F1 47.9% and exact match 37.2%. The file lists its BERT-Large text baseline at 32.8% exact match.
Two ablations isolate the key ingredient. The first gives the same scorer, the same knowledge and the same chunks, but replaces the MIL pooling with softmax attention pooling. This roughly reproduces the kind of soft knowledge weighting in TEAM and Basu Roy Chowdhury and Chaturvedi. The second keeps top-$k$ pooling for both classes but removes the max-based negative term. A third ablation swaps shallow chunks for dependency-tree nodes to test the informal-text constraint. All variants share the backbone, the knowledge cache (generated once and frozen) and the tuning budget.
Why not just…?
Why not just fine-tune a strong encoder and read spans off its attributions? This is the cheapest option. Its span quality has not been reported on these datasets, so we measure it rather than dismiss it. The classification evidence against knowledge-free encoders is the collapse on intended sarcasm: hashtag-trained models fall from 0.874 to at most 0.364 F on iSarcasm (Oprea and Magdy). Attributions also cannot point at a fact the text omits. On implicit cases they can only highlight the situational chunk, never why it is negative. If attribution spans match our chunk-level localization on MSTI, the localization claim reduces to the knowledge claim alone, and we would say so.
Why not just filter knowledge with soft attention, as existing systems do? Soft attention normalizes weights within a tweet, so a plain tweet with twenty irrelevant statements still passes a weighted sum of them to the classifier. This matches the failure Basu Roy Chowdhury and Chaturvedi observed. The attention-pooling ablation and the noise stress test below settle this directly. If attention pooling stays flat as knowledge volume grows, our central claim is wrong.
Why not just prompt a large LLM to label and highlight? EICR reports beating GPT-4o prompting across benchmarks, even with a fraction of the training data. That covers classification but not highlighting, where LLMs may do well. We include an LLM highlight baseline on the localization evaluation, scored with the same chunk-level metrics. This is a real threat for span quality, and we would report it plainly if it wins.
Why not just train a tagger on the diff between each sarcastic tweet and its author's literal rephrase? This is the most serious alternative, because iSarcasm provides the rephrases at no extra cost. Its limits are coverage and meaning. Rephrases exist only for that dataset. For implicit sarcasm the author often rewrites the whole tweet, so the changed words are the flipped sentiment word ("happy"), not the situation that needed world knowledge ("traffic jam"). We train this diff tagger as a competitor and evaluate it on MSTI next to our model. If it matches us on both explicit and implicit subsets, MIL's value is limited to datasets without rephrases.
Proposed Experiments
The first decisive check is a noise stress test. We vary knowledge per chunk $m\in\{1,5,20\}$ from the noisy COMET source. For each setting we measure the false-positive rate on non-sarcastic tweets in iSarcasm and SemEval-2018, alongside Macro-F1. The prediction is that the attention-pooling and no-negative-term ablations lose accuracy and gain false positives as $m$ grows, while the full model stays flat. We also rerun the occlusion test of Basu Roy Chowdhury and Chaturvedi. Hiding the selected statements should cause a large confidence drop, compared with their 1.38%, and hiding unselected statements should cause almost none.
The second check is weakly supervised localization. We run models trained only on tweet-level labels, zero-shot, on the text-bearing portion of MSTI, meaning the 41.9% of targets that are text-only plus the 26.4% that appear in both text and image. We score chunk-level F1 and exact match against the gold BIO targets and compare to the supervised 47.9 F1 and 37.2 exact match. We add a second silver evaluation on iSarcasm rephrase diffs. Results are reported separately for explicit and implicit subsets, because targets (what is mocked) and triggers (what flips the meaning) differ, and our selector should find the former on implicit cases.
The third check is classification against EICR and CSDGCN on iSarcasm, SemEval-2018, Ghosh, Riloff and IAC-V2 with the metrics each paper reports. We also include the News Headlines set to confirm that we do not lose to the 96.13% DistilBERT reference.
Finally, a human study of 300 sarcastic predictions asks annotators whether the selected chunk and statement pair explains the sarcasm. It includes the "OUTSIDE" cases, where the target is never named in the text, and physical-irony cases as a test of where the approach fails.
References
- Does Commonsense help in detecting Sarcasm?
- Commonsense Knowledge Enhanced Sentiment Dependency Graph for Sarcasm Detection
- Detecting Emotional Incongruity of Sarcasm by Commonsense Reasoning
- Affective Dependency Graph for Sarcasm Detection
- Augmenting Affective Dependency Graph via Iterative Incongruity Graph Learning for Sarcasm Detection
- Robust Hallucination Detection in LLMs via Adaptive Token Selection
- Part-of-Speech is (almost) enough: SAP Research & Innovation at the #Microposts2014 NEEL Challenge
- Combining linguistic and machine learning techniques for email summarization
- IIIDYT at IEST 2018: Implicit Emotion Classification With Deep Contextualized Word Representations
- Multimodal Sarcasm Target Identification in Tweets
- iSarcasm: A Dataset of Intended Sarcasm
- SemEval-2022 Task 6: iSarcasmEval, Intended Sarcasm Detection in English and Arabic
- Harnessing Context Incongruity for Sarcasm Detection
- Multi-source Semantic Graph-based Multimodal Sarcasm Explanation Generation