BERT-Enhanced Bi-LSTM with weighted cross-entropy for multilingual sentiment classification

(1) * Mohammad Mustafa Siddique Mail (Christ University, Bengaluru, India)
(2) Sandeep Kumar Mail (Christ University, Bengaluru, India)
*corresponding author

Abstract


With the increasing volume of multilingual user-generated content across social media platforms, effective sentiment analysis (SA) becomes crucial, especially for low-resource languages. However, traditional models relying on context-independent embeddings, such as Word2Vec, GloVe, and fastText, struggle to handle the complexity of multilingual sentiment classification. To address this, we propose an Automatic Multilingual Sentiment Detection (AMSD) framework that leverages the contextual capabilities of BERT for feature extraction and a Bidirectional Long Short-Term Memory (Bi-LSTM) network for classification. Our method, termed Elite Opposition Cross-Entropy Weighted Bi-LSTM (EOCEWBi-LSTM), integrates elite opposition-based learning to optimize hyperparameters and enhance classification accuracy. A weighted cross-entropy loss function further refines the model's sensitivity to class imbalance, thereby improving its performance. The model is trained and evaluated on the NEP_EDUSET corpus, comprising 45,434 tweets in English, Hindi, and Tamil. Experimental results demonstrate notable improvements in precision, recall, F1-score, and accuracy, highlighting the effectiveness of EOCEWBi-LSTM in multilingual sentiment analysis, especially across both high-resource and low-resource languages. The experimental results show that the proposed EOCEWBi-LSTM achieves a high F1-score ratio of 93.83% and an accuracy ratio of 93.83% compared to other existing methods. EOCEWBi-LSTM provides an effective solution for multilingual sentiment analysis, especially for languages with limited resources.

Keywords


BERT; Bi-LSTM; Contextual embeddings; Low-Resource languages; Multilingual sentiment analysis

   

DOI

https://doi.org/10.26555/ijain.v11i3.2003
      

Article metrics

Abstract views : 438 | PDF views : 107

   

Cite

   

Full Text

Download

References


[1] A. Ghafoor et al., “The Impact of Translating Resource-Rich Datasets to Low-Resource Languages Through Multi-Lingual Text Processing,” IEEE Access, vol. 9, pp. 124478–124490, 2021, doi: 10.1109/ACCESS.2021.3110285.

[2] X. Ou and H. Li, “YNU@Dravidian-CodeMix-FIRE2020: XLM-RoBERTa for multi-language sentiment analysis,” CEUR Workshop Proc., vol. 2826, pp. 560–565, 2020, [Online]. Available at: https://ceur-ws.org/Vol-2826/T4-13.pdf.

[3] M. K. Nazir, C. N. Faisal, M. A. Habib, and H. Ahmad, “Leveraging Multilingual Transformer for Multiclass Sentiment Analysis in Code-Mixed Data of Low-Resource Languages,” IEEE Access, vol. 13, pp. 7538–7554, 2025, doi: 10.1109/ACCESS.2025.3527710.

[4] M. Wankhade, A. C. S. Rao, and C. Kulkarni, “A survey on sentiment analysis methods, applications, and challenges,” Artif. Intell. Rev., vol. 55, no. 7, pp. 5731–5780, Oct. 2022, doi: 10.1007/s10462-022-10144-1.

[5] Muhammad Zulqarnain et al., “Text Classification Using Deep Learning Models: A Comparative Review,” Cloud Comput. Data Sci., pp. 80–96, Oct. 2023, doi: 10.37256/ccds.5120243528.

[6] O. Habimana, Y. Li, R. Li, X. Gu, and G. Yu, “Sentiment analysis using deep learning approaches: an overview,” Sci. China Inf. Sci., vol. 63, no. 1, p. 111102, Jan. 2020, doi: 10.1007/s11432-018-9941-6.

[7] A. Rogers, O. Kovaleva, and A. Rumshisky, “A Primer in BERTology: What We Know About How BERT Works,” Trans. Assoc. Comput. Linguist., vol. 8, pp. 842–866, Dec. 2020, doi: 10.1162/tacl_a_00349.

[8] F. Carneiro, D. Vianna, J. Carvalho, A. Plastino, and A. Paes, “BERTweet.BR: a pre-trained language model for tweets in Portuguese,” Neural Comput. Appl., vol. 37, no. 6, pp. 4363–4385, Feb. 2025, doi: 10.1007/s00521-024-10711-3.

[9] G. Manias, A. Mavrogiorgou, A. Kiourtis, C. Symvoulidis, and D. Kyriazis, “Multilingual text categorization and sentiment analysis: a comparative analysis of the utilization of multilingual approaches for classifying twitter data,” Neural Comput. Appl., vol. 35, no. 29, pp. 21415–21431, Oct. 2023, doi: 10.1007/s00521-023-08629-3.

[10] A. Amrullah, “Advanced Sentiment Analysis Using Deep Learning: A Comprehensive Framework for High-Accuracy and Interpretable Models,” Intellithings J., vol. 1, no. 1, pp. 21–31, 2025. [Online]. Available at: https://e-jurnal.unisda.ac.id/index.php/intellithings/article/view/8972.

[11] A. Bello, S.-C. Ng, and M.-F. Leung, “A BERT Framework to Sentiment Analysis of Tweets,” Sensors, vol. 23, no. 1, p. 506, Jan. 2023, doi: 10.3390/s23010506.

[12] A. S. Talaat, “Sentiment analysis classification system using hybrid BERT models,” J. Big Data, vol. 10, no. 1, p. 110, Jun. 2023, doi: 10.1186/s40537-023-00781-w.

[13] M. Pota, M. Ventura, H. Fujita, and M. Esposito, “Multilingual evaluation of pre-processing for BERT-based sentiment analysis of tweets,” Expert Syst. Appl., vol. 181, p. 115119, Nov. 2021, doi: 10.1016/j.eswa.2021.115119.

[14] T. S. Sai Kumar, K. Arunaggiri Pandian, S. Thabasum Aara, and K. Nagendra Pandian, “A Reliable Technique for Sentiment Analysis on Tweets via Machine Learning and BERT,” in 2021 Asian Conference on Innovation in Technology (ASIANCON), Aug. 2021, pp. 1–5, doi: 10.1109/ASIANCON51346.2021.9545013.

[15] S. Mann, J. Arora, M. Bhatia, R. Sharma, and R. Taragi, “Twitter Sentiment Analysis Using Enhanced BERT,” in Lecture Notes in Electrical Engineering, vol. 959, Springer, Singapore, 2023, pp. 263–271, doi: 10.1007/978-981-19-6581-4_21.

[16] N. Azzouza, K. Akli-Astouati, and R. Ibrahim, “TwitterBERT: Framework for Twitter Sentiment Analysis Based on Pre-trained Language Model Representations,” in Advances in Intelligent Systems and Computing, vol. 1073, Springer, Cham, 2020, pp. 428–437, doi: 10.1007/978-3-030-33582-3_41.

[17] N. J. Prottasha et al., “Transfer Learning for Sentiment Analysis Using BERT Based Supervised Fine-Tuning,” Sensors, vol. 22, no. 11, p. 4157, May 2022, doi: 10.3390/s22114157.

[18] P. K. Jain, W. Quamer, V. Saravanan, and R. Pamula, “Employing BERT-DCNN with sentic knowledge base for social media sentiment analysis,” J. Ambient Intell. Humaniz. Comput., vol. 14, no. 8, pp. 10417–10429, Aug. 2023, doi: 10.1007/s12652-022-03698-z.

[19] M. Anwar Hussen Wadud, M. F. Mridha, J. Shin, K. Nur, and A. Kumar Saha, “Deep-BERT: Transfer Learning for Classifying Multilingual Offensive Texts on Social Media,” Comput. Syst. Sci. Eng., vol. 44, no. 2, pp. 1775–1791, Jun. 2023, doi: 10.32604/csse.2023.027841.

[20] H. Cam, A. V. Cam, U. Demirel, and S. Ahmed, “Sentiment analysis of financial Twitter posts on Twitter with the machine learning classifiers,” Heliyon, vol. 10, no. 1, p. e23784, Jan. 2024, doi: 10.1016/j.heliyon.2023.e23784.

[21] P. Nandhini, R. Karunamoorthi, P. Mariappan, and S. Revathi, “Multilingual Offensive Language Detection In Social Media Content Using BERT-Base-Multilingual-Cased Model,” in 2024 15th International Conference on Computing Communication and Networking Technologies (ICCCNT), Jun. 2024, pp. 1–6, doi: 10.1109/ICCCNT61001.2024.10726015.

[22] P. Kakati and D. Dandotiya, “Automatic detection of hate speech in code-mixed Indian languages in twitter social media interaction using DConvBLSTM-MuRIL ensemble method,” Soc. Netw. Anal. Min., vol. 14, no. 1, p. 108, May 2024, doi: 10.1007/s13278-024-01264-3.

[23] P. K. Roy, “Deep Ensemble Network for Sentiment Analysis in Bi-lingual Low-resource Languages,” ACM Trans. Asian Low-Resource Lang. Inf. Process., vol. 23, no. 1, pp. 1–16, Jan. 2024, doi: 10.1145/3600229.

[24] A. G. A. and V. V., “Sentiment analysis on a low-resource language dataset using multimodal representation learning and cross-lingual transfer learning,” Appl. Soft Comput., vol. 157, p. 111553, May 2024, doi: 10.1016/j.asoc.2024.111553.

[25] M. R. Hossain, M. M. Hoque, M. A. A. Dewan, E. Hoque, and N. Siddique, “AFuNet: an attention-based fusion network to classify texts in a resource-constrained language,” Neural Comput. Appl., vol. 37, no. 9, pp. 6725–6748, Mar. 2025, doi: 10.1007/s00521-024-10953-1.

[26] D. R. Kubal and A. S. Nagvenkar, “Leveraging Multilingual Models for Robust Grammatical Error Correction Across Low-Resource Languages,” in Proceedings of the 31st International Conference on Computational Linguistics: Industry Track, 2025, pp. 505–510. [Online]. Available at: https://aclanthology.org/2025.coling-industry.43/.

[27] J. Liu et al., “Application of Deep Learning-Based Natural Language Processing in Multilingual Sentiment Analysis,” Mediterr. J. Basic Appl. Sci., vol. 08, no. 02, pp. 243–260, 2024, doi: 10.46382/MJBAS.2024.8219.

[28] N. Prova, “Multilingual Emotion Classification in E-Commerce Customer Reviews Using GPT and Deep Learning-Based Meta-Ensemble Model,” SSRN. p. 19, Mar. 02, 2025, doi: 10.2139/ssrn.5161505.

[29] M. S. U. Miah, M. M. Kabir, T. Bin Sarwar, M. Safran, S. Alfarhood, and M. F. Mridha, “A multimodal approach to cross-lingual sentiment analysis with ensemble of transformer and LLM,” Sci. Rep., vol. 14, no. 1, p. 9603, Apr. 2024, doi: 10.1038/s41598-024-60210-7.

[30] R. Geethanjali and A. Valarmathi, “A novel hybrid deep learning IChOA-CNN-LSTM model for modality-enriched and multilingual emotion recognition in social media,” Sci. Rep., vol. 14, no. 1, p. 22270, Sep. 2024, doi: 10.1038/s41598-024-73452-2.

[31] V. Dhananjaya, S. Ranathunga, and S. Jayasena, “Lexicon‐based fine‐tuning of multilingual language models for low‐resource language sentiment analysis,” CAAI Trans. Intell. Technol., vol. 9, no. 5, pp. 1116–1125, Oct. 2024, doi: 10.1049/cit2.12333.

[32] A. Onan and M. A. Tocoglu, “A Term Weighted Neural Language Model and Stacked Bidirectional LSTM Based Framework for Sarcasm Identification,” IEEE Access, vol. 9, pp. 7701–7722, 2021, doi: 10.1109/ACCESS.2021.3049734.

[33] Y. Zhang, W. Yang, J. Wang, Q. Ma, and J. Xiong, “CAMEF: Causal-Augmented Multi-Modality Event-Driven Financial Forecasting by Integrating Time Series Patterns and Salient Macroeconomic Announcements,” Proc. Make sure to enter correct Conf. title from your rights confirmation emai (Conference Acron. ’XX), vol. 1, pp. 1–12, 2018, [Online]. Available at: https://arxiv.org/pdf/2502.04592.

[34] J. Misra, “autoNLP: NLP Feature Recommendations for Text Analytics Applications,” arxiv Artif. Intell., pp. 1–11, 2020, [Online]. Available at: http://arxiv.org/abs/2002.03056.

[35] X. Ding, X. Zhang, C. Liang, B. Liu, and L. Niu, “A Composite Recognition Method Based on Multimode Mutual Attention Fusion Network,” Appl. Artif. Intell., vol. 39, no. 1, Dec. 2025, doi: 10.1080/08839514.2025.2462371.

[36] A. Rush, “The Annotated Transformer,” in Proceedings of Workshop for NLP Open Source Software (NLP-OSS), Jun. 2018, pp. 52–60, doi: 10.18653/v1/W18-2509.

[37] B. Jlifi, C. Abidi, and C. Duvallet, “Beyond the use of a novel Ensemble based Random Forest-BERT Model (Ens-RF-BERT) for the Sentiment Analysis of the hashtag COVID19 tweets,” Soc. Netw. Anal. Min., vol. 14, no. 1, p. 88, Apr. 2024, doi: 10.1007/s13278-024-01240-x.

[38] A. Razaq, Z. Halim, A. Ur Rahman, and K. Sikandar, “Identification of paraphrased text in research articles through improved embeddings and fine-tuned BERT model,” Multimed. Tools Appl., vol. 83, no. 30, pp. 74205–74232, Feb. 2024, doi: 10.1007/s11042-024-18359-w.

[39] M. Badrani, A. Marouan, N. Kannouf, and A. Chetouani, “Personalized Guidance for Moroccan Students: An Approach Based on Machine Learning and Big Data,” Int. J. Eng. Pedagog., vol. 15, no. 1, pp. 125–136, Jan. 2025, doi: 10.3991/ijep.v15i1.51985.

[40] D. Naik and C. D. Jaidhar, “A novel Multi-Layer Attention Framework for visual description prediction using bidirectional LSTM,” J. Big Data, vol. 9, no. 1, p. 104, Nov. 2022, doi: 10.1186/s40537-022-00664-6.




Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

___________________________________________________________
International Journal of Advances in Intelligent Informatics
ISSN 2442-6571  (print) | 2548-3161 (online)
Organized by UAD and ASCEE Computer Society
Published by Universitas Ahmad Dahlan
W: http://ijain.org
E: info@ijain.org (paper handling issues)
 andri.pranolo.id@ieee.org (publication issues)

View IJAIN Stats

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0