RoBERTa-BiLSTM: A Context-Aware Hybrid Model for Sentiment Analysis

Md. Mostafizer Rahman, Ariful Islam Shiplu, Yutaka Watanobe, Md. Ashad Alam
6/1/2024
cs.CLcs.AIcs.CE

No official code found. Best implementation: ArifulShiplu/RoBERTaBiLSTM (1 star, last commit 2025-08-19).

Abstract

Effectively analyzing the comments to uncover latent intentions holds immense value in making strategic decisions across various domains. However, several challenges hinder the process of sentiment analysis including the lexical diversity exhibited in comments, the presence of long dependencies within the text, encountering unknown symbols and words, and dealing with imbalanced datasets. Moreover, existing sentiment analysis tasks mostly leveraged sequential models to encode the long dependent texts and it requires longer execution time as it processes the text sequentially. In contrast, the Transformer requires less execution time due to its parallel processing nature. In this work, we introduce a novel hybrid deep learning model, RoBERTa-BiLSTM, which combines the Robustly Optimized BERT Pretraining Approach (RoBERTa) with Bidirectional Long Short-Term Memory (BiLSTM) networks. RoBERTa is utilized to generate meaningful word embedding vectors, while BiLSTM effectively captures the contextual semantics of long-dependent texts. The RoBERTa-BiLSTM hybrid model leverages the strengths of both sequential and Transformer models to enhance performance in sentiment analysis. We conducted experiments using datasets from IMDb, Twitter US Airline, and Sentiment140 to evaluate the proposed model against existing state-of-the-art methods. Our experimental findings demonstrate that the RoBERTa-BiLSTM model surpasses baseline models (e.g., BERT, RoBERTa-base, RoBERTa-GRU, and RoBERTa-LSTM), achieving accuracies of 80.74%, 92.36%, and 82.25% on the Twitter US Airline, IMDb, and Sentiment140 datasets, respectively. Additionally, the model achieves F1-scores of 80.73%, 92.35%, and 82.25% on the same datasets, respectively.

View on arXivView PDF

Code Implementations(1)

RoBERTa-BiLSTM: A Context-Aware Hybrid Model for Sentiment Analysis

12Jupyter NotebookAug 19, 20251 years ago

Similar Papers

Cite this paper

@article{rahman2024robertabilstm,
  title  = {RoBERTa-BiLSTM: A Context-Aware Hybrid Model for Sentiment Analysis},
  author = {Md. Mostafizer Rahman and Ariful Islam Shiplu and Yutaka Watanobe and Md. Ashad Alam},
  year   = {2024},
  eprint = {2406.00367},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2406.00367v2}
}

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/2406.00367.svg)](https://codeofpaper.com/paper/2406.00367)

Discussion