Separating Text from Context in Sarcasm with an Intervenable Concept Bottleneck

Sarcasm detectors fail in a specific way. They see a cheerful sentence such as "great, another Monday flood" and have no principled way to say why it is not cheerful. A small detector that runs on a phone should output a label together with a short account a person can check and correct: "the wording is positive, the situation described is bad, and this author often speaks this way." We propose a concept bottleneck model for intended sarcasm. A concept bottleneck model is a classifier forced to predict a few human-readable intermediate quantities first and then compute its answer from only those quantities. In our model, sarcasm is computed from three things: the polarity of the surface wording, the default valence of the situation described, and a separately estimated "neighbor" term. That neighbor term summarizes how sarcastic the author's recent posts, conversation partners, or region have been.

The neighbor term is borrowed from spatial econometrics. That field models how one unit's outcome spills over from its neighbors and splits every effect into a direct part and a spillover part. Applying the same split to each sarcasm prediction gives a measurable answer to an open dispute in the literature: is intended sarcasm mostly a property of the text or of the person? All interpretation is produced by the bottleneck itself, with no text generation at inference time. That keeps the whole system within edge memory and latency budgets, which generative sarcasm "translators" cannot meet.

Core Claim

Two claims are testable. First, a bottleneck that encodes semantic inversion explicitly, as an incongruity between literal polarity and situation valence, can match fine-tuned black-box detectors on author-labeled sarcasm within a small margin. It also supports test-time interventions whose effect on the label is predictable. A flat concept bottleneck with the same concepts cannot offer that. Second, a lagged neighbor term with a spillover-style decomposition recovers most of the large gain that author history gives. It does so from a single cached number per author rather than hundreds of stored tweets, and it reports per prediction how much of the decision came from context.

Why This Gap Is Real

The motivating evidence comes from three places. iSarcasm: A Dataset of Intended Sarcasm collected tweets labeled by their own authors. It showed that classifiers scoring up to 0.874 F on hashtag-labeled data drop to at most 0.364 on intended sarcasm, and that third-party humans reach only 0.616. Exploring Author Context for Detecting Intended vs Perceived Sarcasm found that a model reading only the author's history, never the target tweet, reaches 0.922 F1 on the Ptacek dataset. Adding the tweet raises that only to 0.934, while on perceived sarcasm (Riloff) context helps modestly (0.739 vs. 0.711). MarSan at SemEval-2022 Task 6 had no author history available and used T5 features with sequence layers, reaching 58.89% F1 on English and 76.29% on Arabic. Read together, these papers leave the text-versus-person question unresolved. No existing model reports the answer per decision.

On the interpretability side, Concept Bottleneck Models introduced the concept-then-label structure and showed that correcting two concepts cut knee-grading error from above 0.4 to about 0.3. Adaptive Concept Discovery for Interpretable Few-Shot Text Classification (StructCBM) moved this to text. An LLM builds a concept library offline (173 API calls on AGNews), a small embedding model makes predictions, and no LLM is called at inference, reaching 85.45% 10-shot accuracy. StructCBM supplies our construction recipe. Its concepts, however, are positive evidence for a class. Sarcasm breaks that assumption, because the surface concepts point the wrong way.

Sarcasm SIGN takes the generative route. It translates sarcastic tweets into literal ones and achieved 46.2% human-rated adequacy against 25.7% for phrase-based translation. It motivates the view that the useful output is the intended meaning. It also marks the limit of that route: generating text per input is exactly the overhead that SnapFusion and Speed Is All You Need spend distillation and kernel fusion to shrink for image generators. The best they achieve is 1.84 s and 11.5 s per image on phones, with gigabytes of weights. We move all generation offline instead of compressing it.

The spillover machinery comes from the Spatial Durbin Model used in Heterogeneous effects of the digital economy on high-quality green development. That model estimates a neighbor-feedback coefficient (0.391 across 32 cities) and splits effects into direct and indirect parts. Inference in Spatial Experiments with Interference shows that non-spatial analysis can miss real spillovers entirely. We reuse the decomposition idea. Confounds and Consequences in Geotagged Twitter Data constrains the design: geotagged users skew younger and more urban. Any geographic neighbor matrix therefore needs demographic adjustment, and it cannot be the main source of signal.

The Model

A small encoder of about 25M parameters, suitable for phones, maps a post $x$ to a few scalar concepts. The literal polarity $\ell \in [-1,1]$ is the sentiment of the wording taken at face value. The situation valence $v \in [-1,1]$ is how good or bad the described event is by ordinary expectations. The marker vector $m$ holds sparse indicators such as hyperbole, intensifiers, and mock politeness. The sarcasm score is

$$\text{logit}\, p(y{=}1 \mid x, i) = a\,(-\ell v) + b^\top m + \rho\,(W\hat{y})_i + c,$$

where $-\ell v$ is positive when wording and situation disagree in sign. The quantity $(W\hat{y})_i$ is the weighted average of the model's past sarcasm predictions over author $i$'s neighbors, as defined by a row-normalized weight matrix $W$. The coefficients $a$, $b$, $\rho$, and $c$ are the only task parameters. $W$ comes in three variants: the author's own earlier posts with temporal decay (the neighbor set that W-CASCADE uses), conversation partners, and geographic region. Because $W$ only looks at earlier posts, there is no simultaneous feedback. The costly $(I-\rho W)^{-1}$ inversion of spatial econometrics is therefore unnecessary. The neighbor term is a running average that updates in constant time and memory.

For each prediction we report the direct share, the contribution of the text terms, and the indirect share, the contribution of $\rho(W\hat{y})_i$. These are the per-decision analogues of the direct and spillover effects.

Intervention works as follows. A user who tells the model "the situation was actually good" sets $v$ positive. The incongruity term flips sign and the label moves predictably. Clearing the neighbor term gives a text-only judgment, which matters for privacy and for new users.

Concept supervision is cheap because iSarcasm ships author-written explanations and literal rephrasals. Following StructCBM's generate-predict-refine loop, an LLM labels offline $\ell$ from the original text, $v$ from the rephrasal and explanation, and the markers. The small encoder is then trained on these labels jointly with the task loss. To guard against the leakage problem in joint bottlenecks, where continuous concepts smuggle in task information, we also train a sequential variant and compare the two.

Research Program

The work has three parts. First, we build the concept labeler, measure its agreement with human raters on a 500-post sample for $\ell$ and $v$, and train the encoder on English iSarcasm, extending to Arabic via ArSarcasm. Second, we fit the neighbor term on Ptacek, which has author histories, and on iSarcasm threads where replies exist. The central measurement is how much of history-based models' advantage the single scalar $(W\hat{y})_i$ keeps. Third, as an explicitly secondary and killable study, we test a geographic $W$ on the geotagged subset of self-labeled tweets, reweighted for the age and urban skew documented by Pavalanathan and Eisenstein. Its coefficient is compared against region fixed effects. If the geographic coefficient is not reliably nonzero after reweighting, we report that null and drop the geographic variant. The core claims do not depend on it.

Baselines

The naive reference is a text-only logistic model on literal sentiment alone. It shows how much inversion structure adds over "sentiment is sarcasm-blind." We also report the majority class and the human F-score of 0.616 from iSarcasm as a reference for how hard intended sarcasm is.

The strongest text-only competitor is a fine-tuned T5-plus-sequence-learner in the style of MarSan. It reports 58.89% F1 on English iSarcasm Subtask A and 76.29% on Arabic. We rerun it on the same splits, with the same number of hyperparameter trials as our model, and also at our encoder's parameter budget. That lets us separate model size from architecture. Beating it means coming within 2 F1 points of the full-size version and exceeding the size-matched version, since the claim is parity plus intervenability, not raw accuracy.

The strongest context competitor is IN-W-CASCADE from Oprea and Magdy, reporting 0.934 F1 on Ptacek and 0.739 on Riloff. EX-W-CASCADE, which sees only history, reports 0.922 on Ptacek. We retrain it with our encoder on the same author histories. Success means retaining at least 80% of its gain over text-only while storing one number per author.

The key ablation is a flat concept bottleneck with the same concepts $\ell$, $v$, and $m$ fed to an unconstrained linear layer, StructCBM-style, with no product term and no neighbor term. A second ablation removes only the neighbor term. A third replaces the lagged $W$ with author or region fixed effects.

For the interpretation output we compare against SIGN-context on its parallel corpus, which reports 46.2% adequacy and polarity. There we check whether our $v$ and intended polarity agree with the five human interpretations. For on-device cost, we found no reported result on Lacuna for latency or memory of text sarcasm detectors or interpreters on mobile hardware. We will measure both ourselves.

Why not just…?

Why not just fine-tune a small transformer and add saliency maps? This is the most serious accuracy threat. A size-matched fine-tuned model may beat us by a few F1 points, and we will report that honestly. What it cannot provide is a checkable reason: highlighting "wonderful" does not say why "wonderful" means its opposite. It also cannot provide a correction with a predictable effect. The decisive test is intervention. We flip the situation valence on held-out posts with human-verified corrected valence. We then measure how often our label moves the right way, compared with editing the black-box input text.

Why not just use a flat concept bottleneck, as StructCBM does? If the flat bottleneck matches both our accuracy and our intervention behavior, the inversion structure is unnecessary and we will say so. We expect it to fall short on intervention. A linear layer can learn that "positive wording" and "bad situation" each mildly predict sarcasm without learning that their combination is what matters. A flip of $v$ alone should then move its label weakly or inconsistently. The counterfactual-flip experiment settles this directly.

Why not just feed the whole author history to the model, as CASCADE does? On Ptacek it works extremely well, reaching 0.922 from history alone. That is precisely why it is suspicious as a detector of sarcasm in a given post, and costly on a device that would have to store and encode hundreds of tweets. Our lagged scalar is a compressed version of the same signal. If it keeps most of the gain, full history is unjustified. If it keeps little, that is evidence the history models exploit rich stylistic features we are discarding, and we will report the gap. Either way, the direct and indirect shares show how often "sarcastic" really means "this author is usually sarcastic."

Why not just use region or author fixed effects instead of a neighbor matrix? Fixed effects absorb a per-unit baseline but cannot carry information from neighbors, and they are undefined for new authors. The spatial-econometrics work cited above shows non-spatial controls missing real spillovers. The fixed-effects ablation, evaluated on authors unseen in training, tests whether this matters here.

Why not just prompt a cloud LLM? We found no reported iSarcasm result for LLM prompting in the file, so we will run one as an accuracy ceiling. It still requires sending private messages off-device, pays per call, and produces rationales with no guaranteed link to its answer. Our model spends LLM calls only during offline labeling.

Proposed Experiments and Decisive Checks

We evaluate on iSarcasm and SemEval-2022 Task 6 (English and Arabic, Subtask A F1), Ptacek and Riloff for context, and the SIGN parallel corpus for interpretation agreement. On-device measurement uses a mid-tier Android phone, reporting median latency and peak memory for our model against a quantized small generative rephraser that produces SIGN-style literal paraphrases. Paired bootstrap confidence intervals accompany every F1 comparison.

Three results decide the proposal. The first is parity: within 2 F1 of full-size MarSan-style fine-tuning on English iSarcasm, and above the size-matched version. The second is intervention: flipping $v$ moves the label in the intended direction substantially more often than it does in the flat bottleneck. The third is context compression: the scalar neighbor term retains most of CASCADE's gain on Ptacek, and the direct and indirect shares differ sharply between Ptacek and Riloff. That last result would turn the intended-versus-perceived contrast into a measured quantity rather than an inference across papers. If the second check fails, the inversion claim is wrong. If the third fails, the spillover term is decoration and we would retain only the text bottleneck.