Transfer Learning for Sentiment Analysis Using BERT Based Supervised Fine-Tuning

Nusrat Jahan Prottasha, Abdullah As Sami, Md. Kowsher, Saydul Akbar Murad, Anupam Kumar Bairagi, Mehedi Masud, Mohammed Baz

TL;DR

This paper tackles the challenge of sentiment analysis for the Bangla language, which suffers from a scarcity of labeled data. The authors propose a novel approach by fine-tuning a pre-trained Bangla-BERT model and integrating it with a CNN-BiLSTM architecture, achieving state-of-the-art results that significantly outperform existing methods.

What Problem Does This Paper Address?

Sentiment analysis, the task of determining the emotional tone of text, is crucial for understanding public opinion and improving services. However, for low-resource languages like Bangla, a significant hurdle is the lack of standardized, labeled datasets. Traditional approaches often rely on context-independent word embeddings (like Word2Vec, GloVe, fastText), which assign a fixed representation to each word, failing to capture its nuanced meaning in different contexts. While pre-trained language models like BERT have revolutionized NLP by understanding context, their application to Bangla has been limited due to the absence of a robust, language-specific BERT model. This paper aims to bridge this gap by developing and evaluating a fine-tuned Bangla-BERT model for sentiment analysis.

Methods

The core of this research lies in leveraging the power of transfer learning with BERT for Bangla sentiment analysis. The authors propose a hybrid model that combines a fine-tuned Bangla-BERT model with a Convolutional Neural Network (CNN) and a Bidirectional Long Short-Term Memory (BiLSTM) network.

Here's a breakdown of their approach:

  • Bangla-BERT Fine-tuning: They utilize a pre-trained Bangla-BERT model, specifically trained on the BanglaLM dataset. This model is then fine-tuned for the sentiment analysis task.
  • CNN-BiLSTM Architecture: The output embeddings from the fine-tuned Bangla-BERT are fed into a CNN-BiLSTM network. The CNN layers extract local features, while the BiLSTM layers capture sequential dependencies in the text, creating a robust representation for sentiment classification.
  • Comparison with Traditional Embeddings: To demonstrate the superiority of BERT, the authors also compare their proposed model with traditional word embedding techniques (Word2Vec, GloVe, fastText) when used with various classification algorithms, including CNN-BiLSTM.
  • Classical Machine Learning Comparison: The performance of their hybrid CNN-BiLSTM model is also compared against several classical machine learning algorithms (SVM, Random Forest, Naive Bayes, KNN, LDA, Decision Trees, ANN, Impact Learning) to provide a comprehensive evaluation.

Datasets

The research utilizes a custom-collected dataset for sentiment analysis, comprising 8952 samples. This data was gathered from various online sources, including:

  • Facebook
  • Twitter
  • YouTube comments
  • Online retailer product reviews
  • Film and book reviews

The dataset was manually labeled by ten native Bangla speakers using web annotation software, with a 7:3 split for training and testing.

Key Insights and Ideas

  • Context is King: The study strongly emphasizes that context-aware embeddings, like those from BERT, significantly outperform traditional, context-independent embeddings for sentiment analysis, especially in a low-resource language like Bangla.
  • Bangla-Specific BERT is Crucial: The development and fine-tuning of a Bangla-specific BERT model are shown to be vital for achieving high performance, outperforming general multilingual BERT models.
  • Hybrid Architectures Shine: Combining the powerful contextual representations from BERT with the feature extraction capabilities of CNNs and the sequential modeling of BiLSTMs creates a highly effective architecture for sentiment analysis.
  • Transfer Learning's Power: The research highlights the immense potential of transfer learning, where knowledge gained from a large pre-trained model can be effectively adapted to a specific task with limited labeled data.

Key Results

The paper presents compelling quantitative results demonstrating the effectiveness of their proposed approach:

  • State-of-the-Art Performance: The fine-tuned Bangla-BERT model integrated with the CNN-BiLSTM architecture achieved a remarkable 94.15% accuracy on the sentiment analysis task.
  • Superiority over Embeddings: This accuracy significantly surpasses the performance achieved using Word2Vec (84.93%), fastText (88.35%), and GloVe (84.53%) embeddings with the same CNN-BiLSTM architecture.
  • Outperforming Traditional Methods: The proposed model also outperformed various classical machine learning algorithms, with SVM achieving the second-highest accuracy (92.83%) when using Bangla-BERT embeddings.
  • Hate Speech Detection: In a comparative analysis on a hate speech detection dataset, their Bangla-BERT model achieved an F1 score of 0.941, outperforming existing methods by a significant margin.

Limitations and Future Work

The authors acknowledge a few limitations and suggest avenues for future research:

  • Dataset Size: While the dataset is substantial for Bangla, the authors note that a larger, more enriched, and balanced dataset would further improve model efficiency and performance.
  • API Development: They plan to develop a Python API that is compatible with any web framework, making their model more accessible for practical applications.
  • Word Extraction System: Future work will explore using a particular word extraction algorithm to analyze the truth word extraction system for Bangla topic classification.
  • Real-World Application: The authors aim to offer an approach for assessing the performance of their proposed model in real-world applications.

Summary updated

BibTeX
@article{prottasha2022transfer,
  author = {Nusrat Jahan Prottasha and Abdullah As Sami and Md. Kowsher and Saydul Akbar Murad and Anupam Kumar Bairagi and Mehedi Masud and Mohammed Baz},
  title = {{Transfer Learning for Sentiment Analysis Using BERT Based Supervised Fine-Tuning}},
  journal = {Sensors},
  year = {2022},
  doi = {10.3390/s22114157},
}
Figure