Home ➤ Publications ➤ chavinda2026emotion

An emotion aware context adaptive machine learning approach for detecting hate speech in social media

Krishan Chavinda, Pasan Kalansooriya, Thushalya Weerasuriya, Nisansa de Silva, Uthayasanker Thayasivam, Kogul Srikandabala, Kirishnni Prabagar, Damminda Alahakoon
Q1 Journal Neural Computing and Applications

Detecting hate speech is challenging because language constantly evolves, often carrying subtle emotional undertones that can be difficult to interpret. While many existing approaches rely on semantic analysis, they frequently miss these emotional cues and struggle to adapt to different contexts. This paper introduces an enhanced Dual Contrastive Learning (DCL) framework, integrating emotion profiling with fine-tuned language models (BERTweet, RoBERTa, TimeLMs) to address these gaps. By using SHAP (SHapley Additive exPlanations) for interpretability, our approach enhances both detection accuracy and explainability. Experiments on SemEval-2019, Davidson, and a Unified Twitter corpus show that our EmotionDCL models outperform baseline methods, with TimeLMs achieving 81.20\% accuracy on SemEval and 94.04\% on Davidson. Ablation studies confirm the synergy between contrastive learning and emotion integration, highlighting anger, fear, and anticipation as dominant emotional drivers of hate speech. These findings show the importance of emotion-aware, context-adaptive detection systems and the need for strategies to address class imbalance and linguistic evolution.

Keywords: Natural Language Processing | Machine Learning / Deep Learning | | Hate Speech Detection | Contrastive Learning | Emotion Recognition |

@article{chavinda2026emotion,
  title={{An emotion aware context adaptive machine learning approach for detecting hate speech in social media}},
  author={Chavinda, Krishan and Kalansooriya, Pasan and Weerasuriya, Thushalya and de Silva, Nisansa and Thayasivam, Uthayasanker and Srikandabala, Kogul and Prabagar, Kirishnni and Alahakoon, Damminda},
  journal={Neural Computing and Applications},
 pages={1433-3058},
  year={2026},
abstract={Detecting hate speech is challenging because language constantly evolves, often carrying subtle emotional undertones that can be difficult to interpret. While many existing approaches rely on semantic analysis, they frequently miss these emotional cues and struggle to adapt to different contexts. This paper introduces an enhanced Dual Contrastive Learning (DCL) framework, integrating emotion profiling with fine-tuned language models (BERTweet, RoBERTa, TimeLMs) to address these gaps. By using SHAP (SHapley Additive exPlanations) for interpretability, our approach enhances both detection accuracy and explainability. Experiments on SemEval-2019, Davidson, and a Unified Twitter corpus show that our EmotionDCL models outperform baseline methods, with TimeLMs achieving 81.20\% accuracy on SemEval and 94.04\% on Davidson. Ablation studies confirm the synergy between contrastive learning and emotion integration, highlighting anger, fear, and anticipation as dominant emotional drivers of hate speech. These findings show the importance of emotion-aware, context-adaptive detection systems and the need for strategies to address class imbalance and linguistic evolution.},
  doi={10.1007/s00521-026-12029-8},
 volume={38},
  number={8},
  publisher={Springer},
misc={https://link.springer.com/content/pdf/10.1007/s00521-026-12029-8.pdf,NLP:ML,https://goo.gl/iY6aTr}
}



Related Projects

Social Media Text Analysis

Active

PI: Nisansa de Silva

We propose to advance social media text analysis by combining linguistic study, preprocessing, and deep learning models to better capture sentiment, structure, and meaning in informal, large-scale user-generated text.