Skip to main content
QUICK REVIEW

[Paper Review] Towards Emotion Recognition in Hindi-English Code-Mixed Data: A Transformer Based Approach

Anshul Wadhawan, Akshita Aggarwal|arXiv (Cornell University)|Feb 19, 2021
Sentiment Analysis and Opinion MiningComputer Science14 references20 citations
TL;DR

This paper proposes a transformer-based approach for emotion recognition in Hindi-English code-mixed (Hinglish) social media text, introducing a new 150k-sample, class-balanced dataset. It compares CNNs, RNNs, and transformer models (BERT, RoBERTa, ALBERT) using bilingual word embeddings from FastText and Word2Vec, achieving the highest accuracy of 71.43% with BERT, demonstrating the superiority of multilingual pretraining for code-mixed NLP tasks.

ABSTRACT

In the last few years, emotion detection in social-media text has become a popular problem due to its wide ranging application in better understanding the consumers, in psychology, in aiding human interaction with computers, designing smart systems etc. Because of the availability of huge amounts of data from social-media, which is regularly used for expressing sentiments and opinions, this problem has garnered great attention. In this paper, we present a Hinglish dataset labelled for emotion detection. We highlight a deep learning based approach for detecting emotions in Hindi-English code mixed tweets, using bilingual word embeddings derived from FastText and Word2Vec approaches, as well as transformer based models. We experiment with various deep learning models, including CNNs, LSTMs, Bi-directional LSTMs (with and without attention), along with transformers like BERT, RoBERTa, and ALBERT. The transformer based BERT model outperforms all other models giving the best performance with an accuracy of 71.43%.

Motivation & Objective

  • To address the lack of annotated, large-scale datasets for emotion detection in Hindi-English code-mixed social media text.
  • To evaluate the performance of various deep learning models—CNNs, RNNs, and transformers—on code-mixed Hinglish data.
  • To investigate the impact of bilingual word embeddings (FastText and Word2Vec) trained on mixed Hinglish-English data versus monolingual Hinglish data.
  • To compare the effectiveness of transfer learning via pre-trained transformer models (BERT, RoBERTa, ALBERT) on code-mixed emotion classification.
  • To establish a benchmark for future research in low-resource, multilingual emotion recognition by releasing a publicly available, balanced dataset.

Proposed method

  • Constructed a new, publicly available, class-balanced dataset of 150,000 Hinglish tweets annotated for six emotions: happiness, sadness, anger, surprise, fear, and disgust.
  • Generated two types of word embeddings: one trained solely on Hinglish tweets and another trained on a mix of Hinglish and English tweets using FastText and Word2Vec.
  • Fine-tuned pre-trained transformer models (BERT-base-uncased, RoBERTa-base, ALBERT-base-v2) on the Hinglish dataset using Hugging Face’s API.
  • Trained and compared multiple architectures: CNNs, LSTMs, bidirectional LSTMs (with and without attention), and transformers, using Adam optimizer and categorical cross-entropy loss.
  • Split the dataset into 90% training and 10% testing, with early stopping based on validation performance to prevent overfitting.
  • Used hyperparameter tuning across optimizers, activation functions (ReLU, sigmoid), kernel sizes, and dropout rates to optimize model performance.

Experimental results

Research questions

  • RQ1How do different deep learning architectures—CNNs, RNNs, and transformers—perform on emotion recognition in Hindi-English code-mixed text?
  • RQ2What is the impact of using bilingual word embeddings (trained on mixed Hinglish-English data) versus monolingual Hinglish embeddings on model accuracy?
  • RQ3Can pre-trained transformer models like BERT, RoBERTa, and ALBERT outperform traditional sequence models in code-mixed emotion detection?
  • RQ4Does the inclusion of English word vectors in the embedding space improve performance on Hinglish text, and if so, why?
  • RQ5How does FastText’s subword modeling compare to Word2Vec in capturing code-mixed lexical variations in Hinglish?

Key findings

  • The BERT-base-uncased model achieved the highest accuracy of 71.43%, outperforming all other models, including CNNs, LSTMs, and RoBERTa.
  • Models using word embeddings trained on mixed Hinglish-English data outperformed those trained only on Hinglish data, suggesting benefit from cross-lingual semantic transfer.
  • FastText embeddings consistently yielded better performance than Word2Vec embeddings, likely due to subword modeling handling code-mixed OOV (out-of-vocabulary) words more effectively.
  • The transformer-based models significantly outperformed RNN and CNN baselines, highlighting the advantage of self-attention in capturing long-range and mixed-language dependencies.
  • The baseline SVM model from prior work achieved only 58.2% accuracy, establishing a strong performance gap for deep learning models on this new dataset.
  • The study demonstrates that pre-trained multilingual transformers are highly effective for low-resource, code-mixed NLP tasks, especially when combined with bilingual pretraining.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.