Elamur Research⌕
☰
home / papers / 2022 / Can Contextualizing User Embeddings Improve Sarcasm and Hate Speech Detection?

Can Contextualizing User Embeddings Improve Sarcasm and Hate Speech Detection?

Paper · 2022 · Kim Breitwieser

Summary

The paper asks whether knowing something about a post's author helps classify the post, and whether a topic-focused author profile works better than one general profile. It uses User2Vec to build implicit user vectors from each author's post history. It then adds "sub-user" embeddings: an LDA model with 10 topics ranks a user's posts by how strongly each belongs to a topic, and the top 500 posts become that user's profile for that topic. These vectors feed a CUE-CNN next to Word2Vec word embeddings. The setup is tested on two tasks: sarcasm on the Bamman Twitter dataset, and hate speech on the Gab portion of Hatexplain.

For sarcasm, user information gives large gains, and every topic-specific profile matches or beats the general one. For hate speech, user embeddings help less, and topic profiles slightly hurt. The author explains the split by who assigned the label. Sarcasm labels reflect what the writer intended, while hate speech labels reflect how annotators perceived the post. This matters for deciding when author context is worth modelling.

Key points

  • Datasets:
    • Bamman sarcasm data: 8741 posts by 5797 users, 56.9% sarcastic, labelled by distant supervision from #sarcasm/#sarcastic hashtags (removed before training).
    • Hatexplain Gab subset: 8365 posts by 1642 users, three classes (neutral, offensive, hate speech) assigned by three MTurk annotators.
  • Model and inputs: a CUE-CNN taken from Amir et al. (2016), with 400-dimensional Word2Vec word vectors and 400-dimensional User2Vec vectors. The general user vector comes from each user's 500 most recent posts, excluding the post being classified.
  • Sarcasm accuracy (10-fold CV):
    • words only: 73.87
    • user only: 76.83
    • words + user: 80.89
    • topic sub-user runs: 80.89–82.31, with school (82.31), politics (82.19) and social media (81.97) on top; the paper reports these as significant by the Wilcoxon test.
  • Randomization checks on sarcasm: random vectors scored 73.63, shuffled post histories 73.79 and shuffled user embeddings 74.02. All three stay at roughly the no-user baseline, so extra input alone gives no gain.
  • Hate speech: topic sub-embeddings scored slightly below the averaged user embedding. The racism/sexism and politics/foreign topics came closest to being useful. The correlation between topic hate rate and results was weak (Pearson r = 0.4873, p = 0.1531).

Interesting ideas

  • I1. Before crediting side information, the author compares it against random vectors, shuffled histories and shuffled embeddings, which shows whether gains come from real signal or just extra input.
  • I2. The paper builds a person's profile from the posts most relevant to the current topic instead of the most recent ones, assuming behaviour depends on the situation.
  • I3. The paper separates author-intended labels (hashtag sarcasm) from annotator-perceived labels (hate speech) and shows that author context helps mainly with the intended kind.
  • I4. The author checks how skewed each topic is toward one label (e.g. politics has only 39.16% sarcastic posts) to explain why selecting a topic helps a binary task.
  • I5. The author rules out a confound by checking that LDA did not simply pick longer posts.

For Mova

How these ideas could serve Mova, our small open language model — its files, stages and tests:

  • I1 (learn): Any added feature or knowledge source in our training could get the same three-level shuffle control as a standard negative control in evaluation.
  • I2 (world): Entity profiles in the world of a text could be kept per context (e.g. how a character acts at school vs. at home), so predictions draw on situation-matched evidence.
  • I3 (frames): When the prag irony detector uses a speaker's past behaviour, it should treat speaker intent and reader perception as distinct targets with different evidence.
  • I4 (learn): When filtering silver data by domain or topic, we should report each slice's label balance so that apparent gains are not just a shift in class priors.
  • I5 (learn): Our data-selection steps should routinely test for length or size bias before attributing improvements to the selection criterion itself.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

 Fields, topics and concepts

Cite

Cite as Kim Breitwieser. 2022. Can Contextualizing User Embeddings Improve Sarcasm and Hate Speech Detection?. Proceedings of the Fifth Workshop on Natural Language Processing and Computational Social Science (NLP+CSS).

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2022.nlpcss-1.14

@inproceedings{breitwieser2022can,
  title = {{Can Contextualizing User Embeddings Improve Sarcasm and Hate Speech Detection?}},
  author = {Kim Breitwieser},
  booktitle = {Proceedings of the Fifth Workshop on Natural Language Processing and Computational Social Science (NLP+CSS)},
  year = {2022},
  doi = {10.18653/v1/2022.nlpcss-1.14},
  url = {https://doi.org/10.18653/v1/2022.nlpcss-1.14}
}

References

60 references, 17 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Silvio Amir, Glen Coppersmith, Paula Carvalho, Mário J. Silva, and Byron C. Wallace. 2017. Quantifying mental health from social media with neural user embeddings. CoRR, abs/1705.00335. ↗
  2. Aniruddha Ghosh and Tony Veale. 2016. Fracking sarcasm using neural network. In Proceedings of the 7th Workshop on Computational Approaches to Subjectivity, Sentiment and Social Media Analysis, pages 161–169, San Diego, California. Association for Computational Linguistics. ↗
  3. Howard Giles and Susan C Baker. 2008. Communication accommodation theory. The international encyclopedia of communication. ↗
  4. Fréderic Godin. 2019. Improving and Interpreting Neural Networks for Word-Level Prediction Tasks in Natural Language Processing. Ph.D. thesis, Ghent University, Belgium. find
  5. Jeffrey T. Hancock. 2004. Verbal irony use in face-to-face and computer-mediated conversations. Journal of Language and Social Psychology, 23(4):447–463. ↗
  6. Silvio Amir, Byron C. Wallace, Hao Lyu, and Paula Carvalho Mário J. Silva. 2016. Modelling context with user embeddings for sarcasm detection in social media.
  7. Devamanyu Hazarika, Soujanya Poria, Sruthi Gorantla, Erik Cambria, Roger Zimmermann, and Rada Mihalcea. 2018. Cascade: Contextual sarcasm detection in online discussion forums.
  8. David Bamman and Noah A. Smith. 2015. Contextualized sarcasm detection on twitter. In ICWSM. find
  9. Irazú Hernández-Farías, José-Miguel Benedí, and Paolo Rosso. 2015. Applying basic features from sentiment analysis for automatic irony detection. In Pattern Recognition and Image Analysis, pages 337–344, Cham. Springer International Publishing. find
  10. Adrian Benton, Raman Arora, and Mark Dredze. 2016. Learning multiview embeddings of Twitter users. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 14–19, Berlin, Germany. Association for Computational Linguistics. find
  11. David Blei, Andrew Ng, and Michael Jordan. 2001. Latent dirichlet allocation. volume 3, pages 601– 608.
  12. Thomas Davidson, Dana Warmsley, Michael W. Macy, and Ingmar Weber. 2017. Automated hate speech detection and the problem of offensive language. CoRR, abs/1703.04009. ↗
  13. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. Bert: Pre-training of deep bidirectional transformers for language understanding.
  14. Karl Ericsson. 2002. Attaining excellence through deliberate practice: Insights from the study of expert performance. The Pursuit of Excellence in Education, pages 21–55. ↗
  15. Karl Ericsson, Ralf Krampe, and Clemens Tesch-Roemer. 1993. The role of deliberate practice in the acquisition of expert performance. Psychological Review, 100:363–406. ↗
  16. Huiji Gao, J. Mahmud, J. Chen, Jeffrey Nichols, and M. Zhou. 2014. Modeling user attitude toward controversial topics in online social media. In ICWSM. https://caisa-lab.github.io ↗
  17. Tianran Hu, Haoyuan Xiao, Thuy vy Thi Nguyen, and Jiebo Luo. 2017. What the language you tweet says about your occupation. find
  18. Michal Kosinski, David Stillwell, and Thore Graepel. 2013. Private traits and attributes are predictable from digital records of human behavior. Proceedings of the national academy of sciences, 110(15):5802– 5805. ↗
  19. György Kovács, Pedro Alonso, and Rajkumar Saini. 2021. Challenges of hate speech detection in social media. SN Computer Science, 2(2):1–15. ↗
  20. Justin Kruger, Nicholas Epley, Jason Parker, and Zhi-Wen Ng. 2006. Egocentrism over e-mail: Can we communicate as well as we think? Journal of personality and social psychology, 89:925–36. ↗
  21. Quoc Le and Tomas Mikolov. 2014. Distributed representations of sentences and documents. In International conference on machine learning, pages 1188– 1196. PMLR. ↗
  22. Jiwei Li, Will Monroe, and Dan Jurafsky. 2017. Data distillation for controlling specificity in dialogue generation. CoRR, abs/1702.06703. ↗
  23. Leqi Liu, Daniel Preotiuc-Pietro, Zahra Riahi Samani, Mohsen E Moghaddam, and Lyle Ungar. 2016. Analyzing personality through social media profile picture choice. In Proceedings of the International AAAI Conference on Web and Social Media, volume 10. find
  24. Peng Liu, Wei Chen, Gaoyan Ou, Tengjiao Wang, Dongqing Yang, and Kai Lei. 2014. Sarcasm detection in social media based on imbalanced classification. In International Conference on Web-Age Information Management, pages 459–471. Springer. find
  25. Shereen Oraby, Lena Reed, Shubhangi Tandon, Sharath T. S., Stephanie M. Lukin, and Marilyn A. Walker. 2018. Controlling personality-based stylistic variation with neural natural language generators. CoRR, abs/1805.08352. ↗
  26. J.M. Lucas, Fernando Fernández-Martínez, J. Salazar, Javier Ferreiros, and Rubén San-Segundo. 2009. Managing speaker identity and user profiles in a spoken dialogue system. Procesamiento del lenguaje natural, ISSN 1135-5948, Nº. 43, 2009, pags. 77-84, 43. find
  27. F. M. R. Pardo, P. Rosso, Irina Chugur, Martin Potthast, Martin Trenkmann, Benno Stein, B. Verhoeven, and W. Daelemans. 2013. Overview of the author profiling task at pan 2013. In CLEF. find
  28. Sean MacAvaney, Hao-Ren Yao, Eugene Yang, Katina Russell, Nazli Goharian, and Ophir Frieder. 2019. Hate speech detection: Challenges and solutions. PloS one, 14(8):e0221152. ↗
  29. Shervin Malmasi and Marcos Zampieri. 2017. Detecting hate speech in social media. In Proceedings of the International Conference Recent Advances in Natural Language Processing, RANLP 2017, pages 467–472, Varna, Bulgaria. INCOMA Ltd. ↗
  30. Binny Mathew, Punyajoy Saha, Seid Muhie Yimam, Chris Biemann, Pawan Goyal, and Animesh Mukherjee. 2020. Hatexplain: A benchmark dataset for explainable hate speech detection. arXiv preprint arXiv:2012.10289. ↗
  31. Diana Maynard and Mark Greenwood. 2014. Who cares about sarcastic tweets? investigating the impact of sarcasm on sentiment analysis. In Proceedings of the Ninth International Conference on Language Resources and Evaluation (LREC’14), pages 4238– 4243, Reykjavik, Iceland. European Language Resources Association (ELRA). ↗
  32. Mohsen Mesgar, Edwin Simpson, Yue Wang, and Iryna Gurevych. 2020. Generating persona-consistent dialogue responses using deep reinforcement learning. find
  33. Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. 2013. Efficient estimation of word representations in vector space. ↗
  34. Pushkar Mishra, Marco Del Tredici, Helen Yannakoudakis, and Ekaterina Shutova. 2018. Author profiling for abuse detection. In Proceedings of the 27th international conference on computational linguistics, pages 1088–1098. find
  35. Mainack Mondal, Leandro Araújo Silva, and Fabrício Benevenuto. 2017. A measurement study of hate speech in social media. In Proceedings of the 28th acm conference on hypertext and social media, pages 85–94. find
  36. Silviu Oprea and Walid Magdy. 2019. Exploring author context for detecting intended vs perceived sarcasm. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 2854– 2859, Florence, Italy. Association for Computational Linguistics. ↗
  37. Wei Peng, Achini Adikari, Damminda Alahakoon, and John Gero. 2019. Discovering the influence of sarcasm in social media responses. Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery, 9. ↗
  38. Rolandos Potamias, Georgios Siolas, and Andreas Stafy-lopatis. 2020. A transformer-based approach to irony and sarcasm detection. Neural Computing and Applications, 32. ↗
  39. Daniel Preoţiuc-Pietro, Vasileios Lampos, and Nikolaos Aletras. 2015. An analysis of the user occupational class through Twitter content. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 1754–1764, Beijing, China. Association for Computational Linguistics. find
  40. Hannah Rashkin, Eric Michael Smith, Margaret Li, and Y-Lan Boureau. 2018. I know the feeling: Learning to converse with empathy. CoRR, abs/1811.00207. ↗
  41. Antonio Reyes, Paolo Rosso, and Tony Veale. 2013. A multidimensional approach for detecting irony in twitter. Language resources and evaluation, 47(1):239–268. ↗
  42. Ellen Riloff, A. Qadir, Pallavi Surve, L. Silva, N. Gilbert, and R. Huang. 2013. Sarcasm as contrast between a positive sentiment and negative situation. Proceedings of EMNLP, pages 704–714.
  43. Lee Ross. 1977. The intuitive psychologist and his shortcomings: Distortions in the attribution process. volume 10 of Advances in Experimental Social Psychology, pages 173–220. Academic Press. find
  44. Gina Roussos and John F. Dovidio. 2018. Hate speech is in the eye of the beholder: The influence of racial attitudes and freedom of speech beliefs on perceptions of racially motivated threats of violence. Social Psychological and Personality Science, 9(2):176–185. ↗
  45. L.A. Rudman and P. Glick. 2012. The Social Psychology of Gender: How Power and Intimacy Shape Gender Relations. Texts in Social Psychology. Guilford Publications. find
  46. H Andrew Schwartz, Johannes C Eichstaedt, Margaret L Kern, Lukasz Dziurzynski, Stephanie M Ra-mones, Megha Agrawal, Achal Shah, Michal Kosinski, David Stillwell, Martin EP Seligman, et al. 2013. Personality, gender, and age in the language of social media: The open-vocabulary approach. PloS one, 8(9):e73791. ↗
  47. Boaz Shmueli, Lun-Wei Ku, and Soumya Ray. 2020a. Reactive supervision: A new method for collecting sarcasm data.
  48. Boaz Shmueli, Lun-Wei Ku, and Soumya Ray. 2020b. Reactive Supervision: A New Method for Collecting Sarcasm Data. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 2553–2559, Online. Association for Computational Linguistics.
  49. Leandro Silva, Mainack Mondal, Denzil Correa, Fabrício Benevenuto, and Ingmar Weber. 2016. Analyzing the targets of hate in online social media. In Proceedings of the International AAAI Conference on Web and Social Media, volume 10. ↗
  50. Xuemeng Song, Liqiang Nie, Luming Zhang, Maofu Liu, and Tat-Seng Chua. 2015. Interest inference via structure-constrained multi-source multi-task learning. In Twenty-Fourth International Joint Conference on Artificial Intelligence. find
  51. Oren Tsur, Dmitry Davidov, and Ari Rappoport. 2010. Icwsm - a great catchy name: Semi-supervised recognition of sarcastic sentences in online product reviews. find
  52. Tony Veale and Yanfen Hao. 2010. Detecting ironic intent in creative comparisons. pages 765–770. find
  53. William Warner and Julia Hirschberg. 2012. Detecting hate speech on the world wide web. In Proceedings of the Second Workshop on Language in Social Media, pages 19–26, Montréal, Canada. Association for Computational Linguistics.
  54. Charlie Welch, Jonathan Kummerfeld, Verónica Pérez-Rosas, and Rada Mihalcea. 2020. Exploring the value of personalized word embeddings. pages 6856– 6862. find
  55. Michael Wiegand and Josef Ruppenhofer. 2021. Exploiting emojis for abusive language detection. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 369–380, Online. Association for Computational Linguistics. find
  56. Frank Wilcoxon. 1945. Individual comparisons by ranking methods. Biometrics Bulletin, 1(6):80–83. ↗
  57. Marcos Zampieri, Shervin Malmasi, Preslav Nakov, Sara Rosenthal, Noura Farra, and Ritesh Kumar. 2019. Semeval-2019 task 6: Identifying and categorizing offensive language in social media (offenseval). In Proceedings of the 13th International Workshop on Semantic Evaluation, pages 75–86. 2020. SemEval-2020 Task 12: Multilingual Offensive Language Identification in Social Media (OffensEval 2020). In Proceedings of SemEval.
  58. Savvas Zannettou, Barry Bradlyn, Emiliano De Cristofaro, Haewoon Kwak, Michael Sirivianos, Gianluca Stringini, and Jeremy Blackburn. 2018. What is gab: A bastion of free speech or an alt-right echo chamber. pages 1007–1014. find
  59. Saizheng Zhang, Emily Dinan, Jack Urbanek, Arthur Szlam, Douwe Kiela, and Jason Weston. 2018a. Personalizing dialogue agents: I have a dog, do you have pets too? In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 2204–2213, Melbourne, Australia. Association for Computational Linguistics. ↗
  60. Wei Zhang, Wen Wang, Jun Wang, and Hongyuan Zha. 2018b. User-guided hierarchical attention network for multi-modal social image popularity prediction. In Proceedings of the 2018 World Wide Web Conference, WWW ’18, page 1277–1286, Republic and Canton of Geneva, CHE. International World Wide Web Conferences Steering Committee. find

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/breitwieser-2022-can-contextualizing-user-embeddings-improve/