Sarcasm is a form of irony that requires readers or listeners to interpret its intended meaning by considering context and social cues. Machine learning classification models have long had difficulty detecting sarcasm due to its social complexity and contradictory nature. This paper explores the applications of the Generative Pretrained Transformer (GPT) models, including GPT-3, InstructGPT, GPT-3.5, and GPT-4, in detecting sarcasm in natural language. It tests fine-tuned and zero-shot models of different sizes and releases. The GPT models were tested on the political and balanced (pol-bal) portion of the popular Self-Annotated Reddit Corpus (SARC 2.0) sarcasm dataset. In the fine-tuning case, the largest fine-tuned GPT-3 model achieves accuracy and $F_1$-score of 0.81, outperforming prior models. In the zero-shot case, one of GPT-4 models yields an accuracy of 0.70 and $F_1$-score of 0.75. Other models score lower. Additionally, a model's performance may improve or deteriorate with each release, highlighting the need to reassess performance after each release.
翻译:讽刺是一种需要读者或听众结合语境和社会线索解读其隐含意义的反语形式。由于讽刺具有社会复杂性和矛盾性特征,传统机器学习分类模型长期以来难以有效检测。本文探讨了生成式预训练Transformer(GPT)模型(包括GPT-3、InstructGPT、GPT-3.5和GPT-4)在自然语言讽刺检测中的应用,测试了不同规模和版本的微调模型与零样本模型。在流行的自标注Reddit语料库(SARC 2.0)讽刺数据集的"政治与平衡"(pol-bal)子集上,实验结果表明:微调场景下,最大规模的GPT-3微调模型取得了0.81的准确率和$F_1$值,优于此前所有模型;零样本场景下,某GPT-4模型取得0.70的准确率和0.75的$F_1$值,其余模型得分较低。此外,模型性能可能随版本迭代产生正向或负向变化,这凸显了每次版本更新后重新评估模型性能的必要性。