Skip to content
Open access

Implementation of the IndoBERT-LSTM Model for Indonesian Sentiment Analysis withan Explainable AI Approach Using SHAP

Aug 2026 · Journal of Electrical Engineering and Informatics · 0 citations

TL;DR

The integration of the IndoBERT-BiLSTM architecture with SHAP is demonstrated to deliver accurate and explainable Indonesian sentiment analysis, which effectively bridges the gap between deep learning performance and decision transparency without compromising classification accuracy.

Abstract

This study aims to develop an Indonesian sentiment analysis model that achieves high classification performance while providing post-hoc explanations of prediction results.The study utilized a quantitative experimental approach using the IndoNLU SmSA dataset, comprising 11,000 training and 1,260 validation samples across positive, neutral, and negative categories. The proposed model integrates an IndoBERT contextual representation generator with a Bidirectional Long Short-Term Memory (BiLSTM) network to model sequential relationships. Furthermore, SHapley Additive exPlanations (SHAP) are applied to provide post-hoc interpretations of the model's predictions by identifying individual token contributions. The IndoBERT-BiLSTM model achieved an accuracy of 92.78%, a Macro F1-score of 0.9013, and a Macro Average AUC of 0.976, outperforming standard LSTM and fine-tuned IndoBERT baselines. However, learning curve analysis indicated mild overfitting during the training process. SHAP visualizations successfully explained the token-level contributions to the classification decisions, providing transparency into the model's reasoning. This study demonstrates the integration of the IndoBERT-BiLSTM architecture with SHAP to deliver accurate and explainable Indonesian sentiment analysis. The approach effectively bridges the gap between deep learning performance and decision transparency without compromising classification accuracy.

Read PDF

Similar papers

Review Open access Jul 2026

A Hybrid VADER–IndoBERT Framework for Robust Sentiment Analysis of Long and Ambiguous Indonesian Texts

A Hybrid VADER–IndoBERT framework designed to improve sentiment classification robustness on complex Indonesian texts is introduced, demonstrating the superiority of Transformer-based architectures in capturing long-range dependencies and handling ambiguous sentiment cues.

Margareta Valencia Suci Handayani, R. S. Basuki, Muljono et al. · 0 citations
Open access Jul 2026

LSTM-Based Classification of Indonesian Regional Song Lyrics by Language

This study successfully proposes a Long Short-Term Memory (LSTM)-based model for automatic classification of Indonesian regional song lyrics by language, demonstrating that LSTM effectively captures sequential linguistic patterns and contextual relationships within regional languages.

Muhammad Rizky, Anandita Priatama, Aviv Yuniar Rahman et al. · 0 citations
Open access Aug 2026

A transfer learning with data augmentation approach to emotion classification of Indonesian tweets

Emotion classification on social media provides valuable insights into public sentiment, but the performance of existing models is often limited by corpus size and linguistic variability. This research presents a transfer learning approach to analyze the benchmark EmoT corpus of 4401 emotion-labeled Indonesian Tweets, combined with a task-specific data augmentation strategy to enhance model generalization. Statistical analysis is performed using a linear mixed model of 10-fold cross validation folds, with folds modeled as a random intercept to control for within-fold variation. Results reveal that both Model and Augmentation Strategy have a significant effect on Accuracy, Macro F1, and Weighted F1 metrics. The top-performing model-strategy combination is IndoRoBERTa with augmentation via one-phase back translation, achieving a Weighted F1 score of approximately 0.859. These results highlight the effectiveness of integrating transfer learning with textual data augmentation for emotion classification in low-resource languages and suggest promising directions for future research in natural language processing.

Dvir Levi, Phillip M. LaCasse, Lyssa A. White · 0 citations
Review Open access Jul 2026

Two-Stage Framework Using IndoBERT for Sentiment Analysis of Tokopedia Reviews under Extreme Class Imbalance

The rapid growth of the Indonesian e-commerce industry has generated a large volume of customer reviews for sentiment analysis, but the data distribution often suffers from extreme class imbalance. The review dataset exhibits a 97.6% dominance of the positive class, causing the single-stage transformer model to produce high accuracy that does not fully represent classification capability. The baseline model achieves a macro-averaged F1-score of 0.599, with a neutral-class recall of 26.3%. Approaches based on loss function adjustment, such as class-balanced loss, focal loss, weighted cross-entropy, and decision-threshold adjustment, are unable to fundamentally address this issue, yielding only limited performance improvements. This study proposes a two-stage classification approach that decomposes the multi-class classification task into two sequential binary classification stages using a BERT-based Indonesian-language transformer model (IndoBERT). The first stage separates the positive class from the non-positive class, while the second stage distinguishes between the neutral and negative classes in a more balanced decision space. The proposed approach achieves a macro-averaged F1-score of 0.761, representing a 16.2% improvement over the baseline and outperforming all loss-function-based methods. These findings suggest that, under conditions of extreme class imbalance, simplifying the decision space through gradual task decomposition is more effective than intervention at the loss-function level. Furthermore, error propagation analysis and qualitative evaluations demonstrate that this approach improves sensitivity to minority classes, although challenges remain in cases involving ambiguous expressions.

Ades Tikaningsih, Imam Tahyudin, Berlilana Berlilana · 0 citations