SarcEmp - Fine-tuning DialoGPT for Sarcasm and Empathy
Paper · 2024 · Mohammed Rizwan
Summary
Open-domain chatbots trained on large conversational data tend to answer in a flat, neutral voice. They often miss the user's emotional state and rarely show humour. This short workshop paper tries to give such a model two extra qualities, sarcasm and empathy, by fine-tuning DialoGPT, a GPT-2-based dialogue model pre-trained on Reddit. The author combines two public resources: the Self-Annotated Reddit Corpus (SARC), filtered to its sarcastic replies, and Empathetic Dialogues, where a speaker describes an emotional situation and a listener replies. Both are mapped to a shared context/response format, mixed and shuffled, and split 60/40 into train and test. The resulting model, SarcEmp, reaches a training perplexity of about 3. On 1000 random samples from Empathetic Dialogues, ConvAI2 and DailyDialog it scores roughly on par with the baseline across perplexity, F1, loss and token accuracy. The author concedes that the automatic-metric differences are small and that human evaluation, which the paper does not include, is still needed. The work matters mainly as a simple recipe for adding affective style to a pre-trained dialogue model.
Key points
- Base model: DialoGPT (GPT-2 architecture). The paper describes DialoGPT's maximum mutual information (MMI) reranking, which uses a backward model to push down bland replies.
- Data: about 1.3 million self-annotated sarcastic Reddit comments from SARC, marked with the "/s" tag, plus about 25,000 Empathetic Dialogues conversations covering emotions such as afraid, proud, joyful and angry.
- Preprocessing:
- SARC parent comments become the context and the replies become the response.
- Empathetic Dialogues prompts become the context and the utterances become the response.
- Each pair is joined into one string with an end-of-string token, shuffled with Pandas, and split 60% train / 40% test.
- Results: training perplexity is 2.996. Evaluation uses 1000 random examples each from Empathetic Dialogues, ConvAI2 and DailyDialog, with perplexity, F1, loss and token accuracy. The fine-tuned model is close to the baseline and slightly better in some cells.
- Limitations: there is no human evaluation and no direct measure of whether outputs are actually sarcastic or empathetic.
Interesting ideas
- I1. Self-annotation markers that authors add themselves, such as Reddit's "/s", act as free, large-scale labels for a hard pragmatic phenomenon without paid annotation.
- I2. Sarcasm in SARC is defined relative to the parent comment, so the preceding utterance is treated as essential context rather than optional.
- I3. Converting two very different corpora into one shared context→response schema lets a single model learn from both.
- I4. After fine-tuning on new styles, the model is checked on unrelated held-out dialogue sets to confirm it did not get worse.
- I5. DialoGPT's MMI step uses a backward model that tries to recover the source from the reply, which penalises generic answers.
For Mova
How these ideas could serve Mova, our small open language model — its files, stages and tests:
- I1 (frames): a "/s"-style author marker could seed silver labels for the irony component in prag, provided that negative controls check the marker is not too noisy.
- I2 (frames): irony and implicature rules in prag could compare the frames of the reply against the frames of the prior turn, flagging contradictions between literal content and situation as candidate irony.
- I3 (learn): mapping heterogeneous dialogue or QA sources into one explicit schema before training would make silver data from different origins comparable and easier to audit.
- I4 (learn): every new repair rule or teacher-tier dataset could be validated on untouched corpora as a regression control, not only on the target domain.
- I5 (back): generated text could be re-parsed into a meaning graph and compared with the original graph, preferring outputs that round-trip with the least information loss.
Fields, topics and concepts
📚 Shelves 6The field of science this work belongs to (OpenAlex fields).Computer Science · 16,667 worksArtificial Intelligence · 16,194 worksArts and Humanities · 16,039 worksLanguage and Linguistics · 15,891 worksPsychology · 1,552 worksExperimental and Cognitive Psychology · 870 works
🧭 Topics 1Research subjects and languages the work is about.Sentiment & emotion · 972 works
Cite
Cite as Mohammed Rizwan. 2024. SarcEmp - Fine-tuning DialoGPT for Sarcasm and Empathy. Proceedings of the 1st Workshop on Simulating Conversational Intelligence in Chat (SCI-CHAT 2024).
@inproceedings{rizwan2024sarcemp,
title = {{SarcEmp - Fine-tuning DialoGPT for Sarcasm and Empathy}},
author = {Mohammed Rizwan},
booktitle = {Proceedings of the 1st Workshop on Simulating Conversational Intelligence in Chat (SCI-CHAT 2024)},
year = {2024},
doi = {10.18653/v1/2024.scichat-1.6},
url = {https://doi.org/10.18653/v1/2024.scichat-1.6}
}References
- Michel Galley et.al. Yizhe Zhang, Siqi Sun. Dialogpt : Large-scale generative pre-training for conversational response generation. 2020. et al. Dmitry Davidov, Oren Tsur. Semi-supervised recognition of sarcastic sentences in twitter and amazon. 2010. — Semi-Supervised Recognition of Sarcasm in Twitter and Amazon
- Yanran Li, Hui Su, Xiaoyu Shen, Wenjie Li, Ziqiang Cao, and Shuzi Niu. Dailydialog: A manually labelled multi-turn dialogue dataset, 2017. ↗
- Maynard and Greenwood. Who cares about sarcastic tweets? investigating the impact of sarcasm on sentiment analysis. 2014.
- Anders Søgaard et al. Bjarke Felbo, Alan Mis-love. Using millions of emoji occurrences to learn any-domain representations for detecting sentiment, emotion and sarcasm. 2020. find
- Quoc Le. et al. Oriol Vinyals. A neural conversational model. 2015.
- Jack Urbanek et al. Saizheng Zhang, Emily Dinan. Personalizing dialogue agents: I have a dog, do you have pets too? 2018. ↗
- Chandra Khatri, Behnam Hedayatnia, and Rahul Goel et al. Detecting offensive content in open-domain conversations using two stage semi-supervision, 2018. find
- Hugh Murrell Devin Pelser. Deep and dense sarcasm detection. 2019. ↗
- Margaret Li et al. Hannah Rashkin, Eric Michael Smith. Towards empathetic open-domain conversation models: a new benchmark and dataset. 2019. find
- Tim Salimans Ilya Sutskever Alec Radford, Karthik Narasimhan. Improving language understanding by generative pre-training. 2018. find
Updated
This page in Markdown → https://md.research.elamur.ai/free/en/papers/rizwan-2024-sarcemp-fine-tuning-dialogpt-sarcasm/