MeisterMorxrc at SemEval-2020 Task 9: Fine-Tune Bert and Multitask Learning for Sentiment Analysis of Code-Mixed Tweets

Qi Wu, Peng Wang, Chenghao Huang

Abstract

The MeisterMorxrc team addressed the challenge of sentiment analysis in code-mixed social media text for the SemEval-2020 Task 9 (Sentimix). Code-mixing, the practice of alternating between two or more languages within a single conversation, presents significant hurdles for traditional NLP models. Our approach utilizes a Bidirectional Encoder Representations from Transformers (BERT) model, optimized through semantic-preserving preprocessing and a multi-task learning (MTL) framework. By training the model to concurrently identify sentiment and language tags, we achieved an averaged F1 score of 0.730, demonstrating the efficacy of domain-specific fine-tuning and auxiliary task regularization.

Introduction

Natural Language Processing (NLP) has traditionally focused on monolingual datasets. However, global social media platforms like Twitter exhibit high frequencies of code-mixing, such as "Spanglish" (English-Spanish) or "Hinglish" (English-Hindi). Standard sentiment analysis tools often struggle with the shifting syntax, informal slang, and vocabulary overlaps inherent in these mixed-language environments. The SemEval-2020 Sentimix Task requires systems to classify the sentiment of such tweets as positive, negative, or neutral. This paper details our strategy for building a robust model capable of navigating the linguistic noise of 280-character code-mixed tweets.

Methodology

Our system architecture is centered on the BERT model, enhanced by three primary components:

1. Semantic-Preserving Preprocessing

To mitigate data sparsity, we employed Emoji Substitution, where unicode emojis are mapped to descriptive English phrases (e.g., "smiling face"). This preserves emotional signals that are often lost when emojis are simply removed. Additionally, we normalized URLs and removed non-emotive characters like '@' symbols to focus the model on sentiment-bearing tokens.

2. Multi-task Learning (MTL)

A key innovation in our approach is the use of Multi-task Learning. In addition to sentiment prediction, the model was trained on an auxiliary task: identifying English words within the mixed-language text. This secondary objective acts as a regularizer, helping the model develop a deeper understanding of the underlying language structure and reducing the risk of overfitting to the primary sentiment labels.

3. Fine-tuning and Feature Filtering

We experimented with various fine-tuning strategies, including the NFT-TM method, which involves adding a task-specific layer on top of a partially frozen BERT encoder. Furthermore, TF-IDF (Term Frequency-Inverse Document Frequency) was utilized to digitize text and filter out low-information words, ensuring the model prioritized high-impact sentiment carriers.

Datasets

The system was evaluated using the official SemEval-2020 Task 9 (Sentimix) datasets, which include:

  • English-Spanish (Spa-En) code-mixed tweets.
  • English-Hindi (Hi-En) code-mixed tweets. Each tweet is annotated with a sentiment tag (positive, negative, neutral) and word-level language tags (e.g., en, spa, hi, mixed, univ).

Results and Discussion

Our experiments demonstrated that both fine-tuning and multi-task learning are critical for high performance in code-mixed sentiment analysis.

Performance comparison of the proposed systems showing the impact of fine-tuning and multi-task learning.

As shown in the results, the transition from a vanilla "Original BERT" (0.589 F1) to a "Fine-tuned BERT" (0.687 F1) yielded a significant performance gain. The integration of Multi-task Learning provided the final performance boost, reaching a peak averaged F1 score of 0.730. This suggests that forcing the model to recognize language boundaries improves its internal representation of code-switching points, which in turn aids sentiment classification.

Conclusion

The MeisterMorxrc system highlights the importance of domain-specific adaptation for social media tasks. By treating emojis as linguistic features and leveraging multi-task learning, we successfully addressed the complexities of code-mixed sentiment analysis. Future work will focus on improving model stability across diverse language pairs and exploring more advanced architectures to handle the inherent noise of multilingual social media data.

Summary updated

BibTeX
@inproceedings{wu2020meistermorxrc,
  author = {Qi Wu and Peng Wang and Chenghao Huang},
  title = {{MeisterMorxrc at SemEval-2020 Task 9: Fine-Tune Bert and Multitask Learning for Sentiment Analysis of Code-Mixed Tweets}},
  booktitle = {SemEval @ COLING},
  year = {2020},
  doi = {10.18653/v1/2020.semeval-1.174},
}
Figure