Implementation of Feature Extraction Using BERT in Aspect Based Sentiment Analysis
DOI:
https://doi.org/10.21776/jeeccis.v19i2.1770Keywords:
Machine learning, word embedding, BERT, CNN+BiLSTM+Attention MechanismAbstract
Aspect Based Sentiment Analysis (ABSA) is a sentiment analysis technique that not only identifies overall sentiment, but also reveals opinions on specific aspects of an entity. To facilitate computer processing, a numerical representation of words into vectors (word embedding) is used, where each word or phrase is mapped into a vector of dimension N. Although static embedding such as Word2Vec or GloVe has been widely used, these approaches have limitations in capturing the dynamic context essential for deep sentiment analysis. This research develops and tests several deep learning algorithms, namely CNN, Bi-LSTM, CNN+BiLSTM, and CNN+BiLSTM+Attention Mechanism, which initially use static embedding and then modified by integrating BERT as contextual embedding. The results show that the use of BERT improves sentiment prediction accuracy by 15% and aspect prediction accuracy by 11% compared to models with static embedding. In particular, the combination of BERT+CNN obtained the best accuracy, which was 94% for aspect prediction and the combination of BERT+CNN+BiLSTM+Attention Mechanism 87% for sentiment prediction. These findings demonstrate the significant potential of BERT integration in improving ABSA performance, which can be applied in social media opinion analysis and sentiment-based recommendation systems.
References
[1] N. Y. A. Faradhillah, R. P. Kusumawardani, and I. Hafidz, “Eksperimen Sistem Klasifikasi Analisa Sentimen Twitter pada Akun Resmi Pemerintah Kota Surabaya Berbasis Pembelajaran Mesin (Experiments on Sentiment Classification System for Tweets of the Official Account of the City Government of Surabaya based on Mach,” Pros. Semin. Nas. Sist. Inf. Indones. 2016, pp. 15–24, 2016, [Online]. Available: http://is.its.ac.id/pubs/oajis/index.php/home/detail/1645/Eksperimen-Sistem-Klasifikasi-Analisa-Sentimen-Twitter-Pada-Akun-Resmi-Pemerintah-Kota-Surabaya-Berbasis-Pembelajaran-Mesin
[2] M. Hoang, O. Alija Bihorac, and J. Rouces, “Aspect-Based Sentiment Analysis Using BERT,” Proc. 22nd Nord. Conf. Comput. Linguist., pp. 187–196, 2019, [Online]. Available: https://aclanthology.org/W19-6120
[3] S. Imron, E. I. Setiawan, and J. Santoso, “Deteksi Aspek Review E-Commerce Menggunakan IndoBERT Embedding dan CNN,” J. Intell. Syst. Comput., vol. 5, no. 1, pp. 10–16, 2023, doi: 10.52985/insyst.v5i1.267.
[4] A. Bello, S. C. Ng, and M. F. Leung, “A BERT Framework to Sentiment Analysis of Tweets,” Sensors, vol. 23, no. 1, 2023, doi: 10.3390/s23010506.
[5] Siddharth M, “Feature Extraction and Embeddings in NLP: A Beginners guide to understand Natural Language Processing,” 2021.
[6] Archana Goyal, Vishal Gupta, Manish Kumar, “A deep learning-based bilingual Hindi and Punjabi named entity recognition system using enhanced word embeddings, Knowledge-Based Systems,” vol. 234, no. 0950–7051, p. 107601, 2021, [Online]. Available: https://www.sciencedirect.com/science/article/pii/S0950705121008637
[7] Z. Khaerunnisa, “Perbandingan Penggunaan Word Embedding Word2Vec, GloVe, dan FastText dalam Peringkasan Teks Ekstraktif Berita Berbahasa Indonesia Menggunakan RNN.” Universitas Gadjah Mada, 2022.
[8] P. R. Amalia and E. Winarko, “Aspect-Based Sentiment Analysis on Indonesian Restaurant Review Using a Combination of Convolutional Neural Network and Contextualized Word Embedding,” IJCCS (Indonesian J. Comput. Cybern. Syst., vol. 15, no. 3, p. 285, 2021, doi: 10.22146/ijccs.67306.
[9] A. Subakti, H. Murfi, and N. Hariadi, “The performance of BERT as data representation of text clustering,” J. Big Data, vol. 9, no. 1, 2022, doi: 10.1186/s40537-022-00564-9.
[10] F. Pradana Rachman, H. Santoso, and A. History, “Jurnal Teknologi dan Manajemen Informatika Perbandingan Model Deep Learning untuk Klasifikasi Sentiment Analysis dengan Teknik Natural Languange Processing Article Info ABSTRACT,” J. Teknol. dan Manaj. Inform., vol. 7, no. 2, pp. 103–112, 2021, [Online]. Available: http://http//jurnal.unmer.ac.id/index.php/jtmi
[11] B. Jang, M. Kim, G. Harerimana, S. U. Kang, and J. W. Kim, “Bi-LSTM model to increase accuracy in text classification: Combining word2vec CNN and attention mechanism,” Appl. Sci., vol. 10, no. 17, 2020, doi: 10.3390/app10175841.
[12] B. Jang, M. Kim, G. Harerimana, S. Kang, and J. W. Kim, “Bi-LSTM Model to Increase Accuracy in Text Classification: Combining Word2vec CNN and Attention Mechanism,” Appl. Sci., 2020, doi: 10.3390/app10175841.
[13] M. Rhanoui, M. Mikram, S. Yousfi, and S. Barzali, “A CNN-BiLSTM Model for Document-Level Sentiment Analysis,” Mach. Learn. Knowl. Extr., vol. 1, no. 3, pp. 832–847, 2019, doi: 10.3390/make1030048.
[14] C. Chai, “The Importance of Data Cleaning: Three Visualization Examples,” CHANCE, vol. 33, pp. 4–9, 2020, doi: 10.1080/09332480.2020.1726112.
[15] K. Ethayarajh, “How Contextual are Contextualized Word Representations? Comparing the Geometry of BERT, ELMo, and GPT-2 Embeddings,” pp. 55–65, 2019, doi: 10.18653/v1/D19-1006.
[16] Y. Zheng, Z. Gao, J. Shen, and X. Zhai, “Optimizing Automatic Text Classification Approach in Adaptive Online Collaborative Discussion–A Perspective of Attention Mechanism-Based Bi-LSTM,” IEEE Trans. Learn. Technol., vol. 16, pp. 591–602, 2023, doi: 10.1109/TLT.2022.3192116.
[17] S. Schmidt, C. Zorenböhmer, D. Arifi, and B. Resch, “Polarity-Based Sentiment Analysis of Georeferenced Tweets Related to the 2022 Twitter Acquisition,” Inf., vol. 14, no. 2, pp. 1–11, 2023, doi: 10.3390/info14020071.
[18] J. Howard and Fast.ai, “AdamW and Super-convergence is now the fastest way to train neural nets.” [Online]. Available: https://www.fast.ai/2018/07/02/adam-weight-decay/%0Ahttps://www.fast.ai/2018/07/02/adam-weight-decay/#appendix-full-results
[19] Y. Kim, “Convolutional neural networks for sentence classification,” EMNLP 2014 - 2014 Conf. Empir. Methods Nat. Lang. Process. Proc. Conf., pp. 1746–1751, 2014, doi: 10.3115/v1/d14-1181.
[20] Yudi Widhiyasana, Transmissia Semiawan, Ilham Gibran Achmad Mudzakir, and Muhammad Randi Noor, “Penerapan Convolutional Long Short-Term Memory untuk Klasifikasi Teks Berita Bahasa Indonesia,” J. Nas. Tek. Elektro dan Teknol. Inf., vol. 10, no. 4, pp. 354–361, 2021, doi: 10.22146/jnteti.v10i4.2438.
[21] D. Bergmann and C. Stryker, “What is an attention mechanism?,” IBM. [Online]. Available: https://www.ibm.com/think/topics/attention-mechanism
[22] B. P. Yusuf, “Analisis Sentimen Berbasis Aspek Terhadap Ulasan Aplikasi Market Place Menggunakan Bidirectional Long Short-Term Memory.” Universitas Komputer Indonesia, 2023.




