School of Artificial Intelligence, Jiangxi Normal University, Nanchang 330022, China
Show less
文章历史+
Received
Accepted
Published
2025-10-23
2025-11-24
2026-07-25
Issue Date
2026-09-16
PDF (1813K)
摘要
讽刺是一种文本字面含义与真实情感意图之间存在不一致的修辞手法,准确建模语义不一致对于实现精准的讽刺检测至关重要。语义不一致不仅存在于文本本身的表述中,更与常识知识和情绪知识密切相关。然而,现有研究一般仅局限于单独探讨文本与常识知识或文本与情绪知识之间的语义不一致,缺乏同时考虑文本与两种外部知识的语义不一致。针对上述问题,该文提出了一种基于常识知识和情绪知识语义不一致的讽刺检测方法(Semantic Incongruity Incorporating Commonsense and Emotional Knowledge for Sarcasm Detection, SIICE)。SIICE模型采用注意力机制对文本语义、常识知识和情绪知识相互之间存在的语义不一致进行建模,并融合三种不一致信息进行讽刺检测。SIICE模型包含四个模块:文本语义不一致感知模块、常识知识语义不一致感知模块、情绪知识语义不一致感知模块和融合预测模块。其中,前三个模块分别利用注意力机制获取文本内部、文本与常识转换器(Commonsense Transformers,COMET)生成的常识知识之间,以及文本与效价、唤醒度与支配度(Valence-Arousal-Dominance,VAD)情绪模型生成的情绪知识之间的语义不一致表示;融合预测模块将上述三种表示拼接后进行讽刺检测。为了验证SIICE模型的有效性,该文在Twitter(Ptáček)、IAC-V1和IAC-V2三个基准数据集上进行实验评估,结果表明SIICE模型在讽刺检测任务中的性能优于多个基线模型,F1值分别达到0.870 3、0.704 9和0.783 5。消融实验表明,同时建模文本与常识知识及情绪知识之间的语义不一致可以有效提升讽刺检测模型的性能。
Abstract
Sarcasm involves semantic incongruity between literal meanings and intended emotions. Accurate modeling of such incongruity is critical for sarcasm detection. Semantic incongruity occurs not only within textual content but also between the text and external commonsense and emotional knowledge. Previous studies typically considered semantic incongruity either between text and commonsense or text and emotional knowledge separately, neglecting their joint influence. This study proposed a sarcasm detection model named Semantic Incongruity Incorporating Commonsense and Emotional Knowledge (SIICE). The SIICE model employed an attention mechanism to model semantic incongruities among textual semantics, commonsense knowledge, and emotional knowledge. SIICE consisted of four modules: a textual semantic incongruity module, a commonsense semantic incongruity module, an emotional semantic incongruity module, and a fusion prediction module. The first three modules utilized attention mechanisms to capture semantic incongruities within the text, between text and commonsense knowledge generated by COMET (Commonsense Transformers), and between text and emotional knowledge represented via the VAD (Valence-Arousal-Dominance) emotional model, respectively. The fusion module integrated these three representations for sarcasm detection. Experiments were conducted on three benchmark datasets: Twitter(Ptáček), IAC-V1, and IAC-V2. SIICE achieved superior performance compared to baseline models, obtaining F1-scores of 0.870 3, 0.704 9, and 0.783 5, respectively. Ablation experiments indicated that simultaneous modeling of semantic incongruities involving text, commonsense, and emotional knowledge effectively enhances sarcasm detection performance.
讽刺是一种广泛存在于社交媒体的修辞手法,通过隐含的嘲讽或轻蔑态度表达与字面含义相反的真实意图[1]。讽刺检测的关键在于识别文本中存在的语义不一致。简单讽刺通常表现为浅层语义冲突,而复杂讽刺则涉及文本之外的常识知识与情绪知识等背景信息,更加隐晦且更难识别[2]。其中,常识知识是指人类在长期社会实践中普遍形成、并用以理解日常情境的背景信息[3];情绪知识是人们对情绪及其表达的共同认知,包括对情绪表现、反应及社交变化的普遍理解[4]。二者在揭示复杂讽刺表达中的隐含语义冲突方面均具有重要作用。如图1所示,句子“I love to see a doctor every day”字面表达积极情绪(“love”),仅凭文本难以察觉其讽刺意图。引入常识知识后可以发现“see a doctor”通常与“痛苦(painful)”“焦虑(anxious)”“紧张(nervous)”等负面体验相关联,这与表面积极情绪构成了语义冲突;从情绪角度分析,个体对于频繁、持续的医疗活动一般不会产生真实的积极情感,进一步揭示了文本表达与真实情感意图之间的不一致。因此,在讽刺检测任务中,同时建模文本语义、常识知识和情绪知识相互之间的不一致,有助于更准确地识别潜在的语义冲突。
另一方面,情绪知识也逐渐成为讽刺检测研究的关注点。一些研究利用情感特征揭示深层次语义矛盾,例如,Babanejad等[10]利用情感与上下文特征来扩展基于Transformer的双向编码器表征(Bidirectional Encoder Representations from Transformers,BERT)结构用于讽刺检测;此外,Lou等[11]通过图卷积神经网络构建情感图和句法依存图,捕获句子内的长程情感不一致;为了减少人工构建情感图带来的误差,Wang等[12]通过迭代的图学习过程对情感图和依存图进行扩充,以获得优化的语义不一致图结构。
尽管上述研究分别探讨了文本与常识知识或情绪知识之间的语义不一致,但缺乏同时考虑文本与两种外部知识之间的语义不一致,限制了模型在更复杂、隐蔽的真实场景中准确识别讽刺意图的能力。针对上述问题,本文提出了一种基于常识知识和情绪知识语义不一致的讽刺检测方法(Semantic Incongruity Incorporating Commonsense and Emotional Knowledge for Sarcasm Detection, SIICE)。SIICE模型采用注意力机制对文本语义、常识知识和情绪知识相互之间的不一致进行建模,并融合三种不一致信息以及文本自身语义表示进行讽刺检测。SIICE模型包括四个模块:(1)文本语义不一致感知模块,利用自注意力机制捕捉文本内部的语义不一致表示;(2)常识知识语义不一致感知模块,利用交互注意力机制建模文本与COMET生成的常识知识之间的语义不一致表示;(3)情绪知识语义不一致感知模块,采用交互注意力机制捕获文本与效价、唤醒度与支配度(Valence-Arousal-Dominance,VAD)情绪模型生成的情绪知识之间的语义不一致表示;(4)融合预测模块,融合上述三种跨域语义不一致表示并与文本语义表示进行拼接,最后通过全连接网络检测讽刺。
为阐明本文融合常识与情绪知识以捕捉语义不一致的作用机制,本文分别从三个数据集中各选取了一个讽刺案例进行分析(见表5)。这些案例共同揭示了讽刺是常识与情绪双重作用下的复杂语言现象,单一维度的外部知识不足以完全揭示讽刺的复杂性。例如句子“Oh great, another Monday. Just what I needed!”,首先从常识维度分析,讽刺产生于句子字面含义与社会文化常识之间的语义冲突。社会文化常识将“周一”这一概念与工作压力、疲惫等负面状态关联,而句子却采用了“great”“just what I needed”等积极词汇进行描述。这种字面措辞与常识知识之间的不一致构成了讽刺;其次,从情绪维度分析,句子体现出典型的情绪反转特征,即表面表达的积极情绪与“another Monday”所隐含的真实负面情绪(如沮丧、厌烦)之间存在冲突。这种表层情绪与真实意图之间的不一致是讽刺的关键来源之一。其余两个案例也呈现出类似的不一致特征,表现为文本字面含义或表面情绪与社会常识、真实情绪意图之间的语义冲突。因此,单独探讨文本与常识知识或文本与情绪知识之间的语义不一致存在局限性,同时考虑文本与两种外部知识之间的语义不一致,模型才能更准确地理解和识别讽刺,从而提升讽刺检测的性能。
GuanX, CaoJ X, ZhangH, et al. MIAN: Multi-head Incongruity Aware Attention Network with Transfer Learning for Sarcasm Detection[J]. Expert Syst Appl, 2025, 263: 125702. DOI: 10.1016/j.eswa.2024.125702 .
[2]
OpreaS, MagdyW. ISarcasm: A Dataset of Intended Sarcasm[C]//Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics. Stroudsburg, PA, USA: ACL, 2020: 1279-1289. DOI: 10.18653/v1/2020.acl-main.118 .
[3]
IlievskiF, OltramariA, MaK X, et al. Dimensions of Commonsense Knowledge[J]. Knowl Based Syst, 2021, 229: 107347. DOI: 10.1016/j.knosys.2021.107347 .
[4]
TuG, LiangB, QinB, et al. An Empirical Study on Multiple Knowledge from ChatGPT for Emotion Recognition in Conversations[C]//Findings of the Association for Computational Linguistics: EMNLP 2023. Stroudsburg, PA, USA: ACL, 2023: 12160-12173. DOI: 10.18653/v1/2023.findings-emnlp.813 .
[5]
XiongT, ZhangP R, ZhuH B, et al. Sarcasm Detection with Self-matching Networks and Low-rank Bilinear Pooling[C]//The World Wide Web Conference. New York: ACM, 2019: 2115-2124. DOI: 10.1145/3308558.3313735 .
[6]
PanH L, LinZ, FuP, et al. Modeling the Incongruity Between Sentence Snippets for Sarcasm Detection[C]//Proceedings of the 24th European Conference on Artificial Intelligence (ECAI). Amsterdam, Netherlands: IOS Press BV, 2020: 2132-2139. DOI: 10.3233/FAIA200337 .
[7]
LiJ N, PanH L, LinZ, et al. Sarcasm Detection with Commonsense Knowledge[J]. IEEE/ACM Trans Audio Speech Lang Process, 2021, 29: 3192-3201. DOI: 10.1109/TASLP.2021.3120601 .
[8]
ChenW Q, LinF Q, LiG W, et al. Commonsense-aware Sarcasm Detection with Heterogeneous Graph Attention Network[C]//2022 IEEE International Conference on Systems, Man, and Cybernetics (SMC). New York: IEEE, 2022: 2181-2188. DOI: 10.1109/SMC53654.2022.9945145 .
[9]
YuZ, JinD, WangX B, et al. Commonsense Knowledge Enhanced Sentiment Dependency Graph for Sarcasm Detection[C]//Proceedings of the Thirty-Second International Joint Conference on Artificial Intelligence. Macao: IJCAI, 2023: 2423-2431. DOI: 10.24963/ijcai.2023/269 .
[10]
BabanejadN, DavoudiH, AnA J, et al. Affective and Contextual Embedding for Sarcasm Detection[C]//Proceedings of the 28th International Conference on Computational Linguistics. Barcelona: ICCL, 2020: 225-243. DOI: 10.18653/v1/2020.coling-main.20 .
[11]
LouC W, LiangB, GuiL, et al. Affective Dependency Graph for Sarcasm Detection[C]//Proceedings of the 44th International ACM SIGIR Conference on Research and Development in Information Retrieval. New York: ACM, 2021: 1844-1849. DOI: 10.1145/3404835.3463061 .
[12]
WangX, DongY, JinD, et al. Augmenting Affective Dependency Graph via Iterative Incongruity Graph Learning for Sarcasm Detection[C]//Proceedings of the AAAI Conference on Artificial Intelligence (AAAI). Washington, USA: AAAI Press, 2023, 37(4): 4702-4710. DOI: 10.1609/aaai.v37i4.25594 .
[13]
YoungT, PandeleaV, PoriaS, et al. Dialogue Systems with Audio Context[J]. Neurocomputing, 2020, 388: 102-109. DOI: 10.1016/j.neucom.2019.12.126 .
[14]
TayY, LuuA T, HuiS C, et al. Reasoning with Sarcasm by Reading In-between[C]//Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Stroudsburg, PA, USA: ACL, 2018: 1010-1020. DOI: 10.18653/v1/p18-1093 .
[15]
PoriaS, CambriaE, HazarikaD, et al. A Deeper Look into Sarcastic Tweets Using Deep Convolutional Neural Networks[C]//Proceedings of the 26th International Conference on Computational Linguistics (COLING). Osaka, Japan: The COLING 2016 Organizing Committee, 2016: 1601-1612. DOI: 10.48550/arXiv.1610.08815 .
[16]
HazarikaD, PoriaS, GorantlaS, et al. CASCADE: Contextual Sarcasm Detection in Online Discussion Forums[C]//Proceedings of the 27th International Conference on Computational Linguistics (COLING). Santa Fe, USA: Association for Computational Linguistics, 2018: 1837-1848.
[17]
SpeerR, ChinJ, HavasiC. ConceptNet 5.5: An Open Multilingual Graph of General Knowledge[C]//Pro-ceedings of the AAAI Conference on Artificial Intelligence (AAAI). San Francisco, USA: AAAI Press, 2017, 31(1): 4444-4451. DOI: 10.1609/aaai.v31i1.11164 .
[18]
SapM, LeB R, AllawayE, et al. ATOMIC: An Atlas of Machine Commonsense for If-Then Reasoning[C]//Proceedings of the AAAI Conference on Artificial Intelligence (AAAI). Honolulu, USA. AAAI Press, 2019, 33(1): 3027-3035. DOI: 10.1609/aaai.v33i01.33013027 .
[19]
BosselutA, RashkinH, SapM, et al. COMET: Commonsense Transformers for Automatic Knowledge Graph Construction[C]//Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics. Stroudsburg, PA, USA: ACL, 2019: 4762-4779. DOI: 10.18653/v1/p19-1470 .
[20]
QiuZ, YuJ, ZhangY, et al. Detecting Emotional Incongruity of Sarcasm by Commonsense Reasoning[C]//Proceedings of the 31st International Conference on Computational Linguistics (COLING). Abu Dhabi, UAE: Association for Computational Linguistics, 2025: 9062-9073.
[21]
RussellJ A, MehrabianA. Evidence for a Three-factor Theory of Emotions[J]. J Res Pers, 1977, 11(3): 273-294. DOI: 10.1016/0092-6566(77)90037-X .
ChauhanD S, DhanushS R, EkbalA, et al. Sentiment and Emotion Help Sarcasm? A Multi-task Learning Framework for Multi-modal Sarcasm, Sentiment and Emotion Analysis[C]//Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics. Stroudsburg, PA, USA: ACL, 2020: 4351-4360. DOI: 10.18653/v1/2020.acl-main.401 .
[24]
AgrawalA, AnA J, PapagelisM. Leveraging Transitions of Emotions for Sarcasm Detection[C]//Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval. New York: ACM, 2020: 1505-1508. DOI: 10.1145/3397271.3401183 .
[25]
ChakrabartyT, GhoshD, MuresanS, et al. Rˆ3: Reverse, Retrieve, and Rank for Sarcasm Generation with Commonsense Knowledge[C]//Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics. Stroudsburg, PA, USA: ACL, 2020: 7976-7986. DOI: 10.18653/v1/2020.acl-main.711 .
WangY Q, WanZ Y, ZengX Q, et al. Valence-arousal-dominance Emotion Knowledge-based Text Emotion Distribution Label Enhancement Method[J]. J Tsinghua Univ Sci Technol, 2024, 64(5): 789-800. DOI: 10.16511/j.cnki.qhdxxb.2023.26.063 .
[30]
WalkerM A, AnandP, TreeJ E F, et al. A Corpus for Research on Deliberation and Debate[C]//Proceedings of the Eighth International Conference on Language Resources and Evaluation (LREC). Istanbul, Turkey: European Language Resources Association, 2012, 12: 812-817.
[31]
PtacekT, HabernalI, HongJ. Sarcasm Detection on Czech and English Twitter[C]//Proceedings of the 25th International Conference on Computational Linguistics (COLING). Dublin, Ireland: Dublin City University and Association for Computational Linguistics, 2014: 213-223.
[32]
SemaryN A, AhmedW, AminK, et al. Improving Sentiment Classification Using a RoBERTa-based Hybrid Model[J]. Front Hum Neurosci, 2023, 17: 1292010. DOI: 10.3389/fnhum.2023.1292010 .