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

Sapan Shah, Sreedhar Reddy, Pushpak Bhattacharyya
10/29/2023
cs.CL

No confident code implementation found for this paper.

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{shah2023retrofitting,
  title  = {Retrofitting Light-weight Language Models for Emotions using Supervised Contrastive Learning},
  author = {Sapan Shah and Sreedhar Reddy and Pushpak Bhattacharyya},
  year   = {2023},
  eprint = {2310.18930},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.18930v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2310.18930.svg)](https://codeofpaper.com/paper/2310.18930)

Discussion