Retrofitting Light-weight Language Models for Emotions using Supervised Contrastive Learning

Sapan Shah, Sreedhar Reddy, Pushpak Bhattacharyya


Abstract
We present a novel retrofitting method to induce emotion aspects into pre-trained language models (PLMs) such as BERT and RoBERTa. Our method updates pre-trained network weights using contrastive learning so that the text fragments exhibiting similar emotions are encoded nearby in the representation space, and the fragments with different emotion content are pushed apart. While doing so, it also ensures that the linguistic knowledge already present in PLMs is not inadvertently perturbed. The language models retrofitted by our method, i.e., BERTEmo and RoBERTaEmo, produce emotion-aware text representations, as evaluated through different clustering and retrieval metrics. For the downstream tasks on sentiment analysis and sarcasm detection, they perform better than their pre-trained counterparts (about 1% improvement in F1-score) and other existing approaches. Additionally, a more significant boost in performance is observed for the retrofitted models over pre-trained ones in few-shot learning setting.
Anthology ID:
2023.emnlp-main.222
Volume:
Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing
Month:
December
Year:
2023
Address:
Singapore
Editors:
Houda Bouamor, Juan Pino, Kalika Bali
Venue:
EMNLP
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
3640–3654
Language:
URL:
https://aclanthology.org/2023.emnlp-main.222
DOI:
10.18653/v1/2023.emnlp-main.222
Bibkey:
Cite (ACL):
Sapan Shah, Sreedhar Reddy, and Pushpak Bhattacharyya. 2023. Retrofitting Light-weight Language Models for Emotions using Supervised Contrastive Learning. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 3640–3654, Singapore. Association for Computational Linguistics.
Cite (Informal):
Retrofitting Light-weight Language Models for Emotions using Supervised Contrastive Learning (Shah et al., EMNLP 2023)
Copy Citation:
PDF:
https://aclanthology.org/2023.emnlp-main.222.pdf
Video:
 https://aclanthology.org/2023.emnlp-main.222.mp4