Home Journals:
Author Services About Submit Article


Academic Publishing

E-ISSN 3118-5533
Archives of Applied Sciences
« Previous Article
Next Article »

Research Article
Online Published: 09 Feb 2026
 


A Hybrid Large Language Model-Graph Neural Network Framework for Arabic Sentiment Analysis

Hani Iwidat.


Abstract
Background: Arabic sentiment analysis (SA) faces significant challenges due to the language’s morphological richness and dialectal diversity. This study introduces a novel hybrid Large Language Model-Graph Neural Network (LLM–GNN) framework designed to address these challenges.
Methods: The proposed model integrates the contextual understanding of AraBERT v2 with the structural learning capability of a Graph Convolutional Network (GCN). It constructs a graph of sentences using cosine similarity, allowing the GCN to capture crucial inter-sentence semantic dependencies often missed by sequential models. The model is evaluated on a publicly available Arabic 100k Reviews dataset consisting of authentic user-generated Arabic reviews balanced across Positive, Negative, and Mixed sentiment classes.
Results: The results demonstrate that the proposed LLM–GNN model performed better as compared to the baseline models, including fine-tuned AraBERT, AraBERT–BiLSTM, AraBERT–MLP, and multilingual BERT. The hybrid model achieves an overall accuracy of 66.8% and a F1-score of 66.55%, with an improvement of 7.6% and 4.4%, respectively. The model demonstrated stable convergence from the first training epoch.
Conclusion: The results show that the hybrid model identifies subtle sentiment cues that sequential models frequently miss by fusing relational graph reasoning with contextual embeddings. By effectively identifying subtle sentiment cues, the hybrid model can significantly enhance the accuracy of real-world applications such as social media monitoring and customer review analysis for Arabic content. Research Limitations/Implications: The graph construction is performed at the mini-batch level, which restricts the modeling of global semantic relationships across the entire corpus.

Key words: Arabic; Sentiment Analysis; Large Language Models; Graph Neural Networks; Machine Learning


 
ARTICLE TOOLS
Abstract
PDF Fulltext
How to cite this articleHow to cite this article
Citation Tools
Related Records
 Articles by Hani Iwidat
on Google
on Google Scholar


Introduction

The rise of ecommerce platforms and social media networks has changed the way people express opinions, exchange information, and connect with products and services [1]. This expansion has generated a large volume of content, reviews, comments, and discussions that reflect different perspectives and emotions [2]. Sentiment analysis (SA) is also known as opinion mining [3,4] and uses computational techniques to automatically identify, extract, and analyze subjective opinions and emotions from text [5]. It classifies the viewpoints expressed about particular subjects, things, or events using different terms such as positive, negative, or neutral [6]. SA monitored investor behavior and market trends in the finance industry [7]. The companies collect data from news, articles, social media posts, and other sources to understand the market sentiments of consumers [8]. SA improves risk assessments and combines market data with macroeconomic indicators to strengthen decisionmaking [9]. It is used on Twitter, Facebook, and Instagram. In such platforms, billions of users are generating content daily and are the realtime repositories of public opinion. SA also improves customer experience and market competitiveness in digital commerce. To determine customer preferences, identify dissatisfaction, and forecast purchasing behavior, ecommerce platforms examine product reviews, feedback, and service interactions [8]. The healthcare system uses SAdriven techniques and examines electronic health records, online health forums, and patient reviews [10]. In literature, studies have applied natural language processing (NLP) and ML techniques for SA. For example, Hota et al applied lexiconbased and VADER SA on Twitter data. In order to categorize public sentiment as positive, neutral, or negative, data were gathered from six countries during the COVID-19 outbreak [11]. The results showed negativity in the UK and France, while in India, the negativity rose after the lockdown. The contextually enriched graph neural network (CE-GNN) was developed by Jin et al. to enhance SA in Chinese microblogs [1]. They combined selfsupervised learning, context sentiment embeddings, and GNNs to handle complex sentence structures and sentiment patterns. Khan et al. employed the intelligent hybrid feature selection for SA (IHFSSA). It addressed the high dimensionality of unstructured usergenerated content by combining wrapperbased and ensemble filter approaches [12]. Accuracy has increased in various benchmark datasets due to the smaller feature space. Gokalp et al. employed the iterated greedy metaheuristic to improve sentiment classification used and used Amazon review and public sentiment datasets [13]. Noura et al. [14] investigated the impact of feature extraction techniques, such as Bagof-Words, Word2Vec, TF-IDF, Ngrams, Hashing Vectorizer, and GloVe on SA performance. The feature extraction techniques used with the Random Forest (RF) classifier and the Term Frequency-Inverse Document Frequency, have an accuracy of 99% on Amazon reviews and 96% on Twitter data. Al Sari et al. developed SA datasets from Instagram, Snapchat, and Twitter to examine public impressions of Saudi cruises [15]. They employed ML algorithms such as Multi-Layer Perceptron (MLP), NB, Support Vector Machine (SVM), RF, and voting. The RF model accuracy was 100 %. Mukherjee et al. [16] examined the effect of negations on sentiment polarity detection using a customized negation marking algorithm. They used Amazon product reviews data and applied different classifiers such as SVM, Naïve Bayes, Artificial Neural Network (ANN), and RNN. The RNN achieved an accuracy of 95.67%. Noori et al. developed a framework for classifying customer sentiments and used reviews collected from an international hotel [17]. They applied TF-IDF for feature extraction and tested several models. The decision tree has an accuracy of 98.9%.LSTM networks are extensively employed in SA due to their effectiveness in modeling longterm dependencies. Chatterjee et al. employed a multichannel LSTM model, SS-BED, for emotion detection in tweets [18]. GloVe and a sentimentspecific word embedding were used, along with three sequential LSTM layers, to model contextual dependencies [19]. Li et al. introduced a hybrid CNN–LSTM model for Chinese news text classification [20]. The LSTM was used to capture longterm dependencies, and a shallow CNN with max pooling was used to extract semantic features. The model showed better performance on the News dataset. Liu et al. and later Liu and Guo [21] developed an AC-BiLSTM model that combines bidirectional LSTM, CNN, and an attention mechanism [22]. Basiri et al. applied an attentionbased bidirectional CNN-RNN deep model (ABCDM) for SA [23]. They integrated BiLSTM and GRU with an attention mechanism to capture contextual dependencies. The hybrid model used convolutional and pooling layers to reduce dimensionality and extract local features. ABCDM performed better than the other DL models. Abimbola et al. developed a CNN–LSTM framework for legal SA in Canadian maritime case law [24]. The model achieved 98.05% accuracy. The SVM, Naïve Bayes (NB), and logistic regression had accuracy of 52.57%, 57.44%, and 61.86%, respectively. Mohammed et al. proposed a SA framework for Facebook and Twitter posts by combining five ML techniques with three deep learning models [25]. The LSTM has an accuracy of 0.99 on Facebook data. The framework also showed significant improvements in other metrics. It improved precision by 1.23%, recall by 11.11%, and F1-score by 3.61%. Alhayan et al. developed an ensemble learning framework to detect humanand computergenerated Arabic reviews [26]. The softvoting model combining LR and CNN achieved 89.70% accuracy, close to Arabic Bidirectional Encoder Representations from Transformers (AraBERT’s) 90.0%. Linguistic analysis showed computergenerated reviews used more adjectives and helped to distinguish them from genuine ones. Bayazed et al. introduced the Arabic Comparative Opinion Mining (ACOM) approach and constructed a domainspecific ACOM corpus from the X platform for the comparative opinions in the technology sector [27]. They evaluated CNN, LSTM, and BiLSTM models and achieved 91% for the BiLSTM.The significant progress in SA across multiple languages is available in the literature, while studies focusing on Arabic are limited. The Arabic language’s rich morphology, dialectal variation, and contextdependent semantics pose challenges for conventional techniques. Deep learning models and embeddingbased techniques have limitations in balancing semantic details with structural precision. DNNs are effective at modeling longrange dependencies but introduce irrelevant features and fail to capture subtle sentiment cues. The traditional feature extraction techniques have limited classification accuracy. In this study, a hybrid (LLM–GNN) framework is used for Arabic SA. The LLM captures contextual dependencies and semantic variations, while GNNs explicitly model syntactic and relational structures that sequential models tend to overlook. The contributions of the study are: •  A balanced Arabic sentiment dataset was synthetically generated using manually curated Modern Standard Arabic (MSA) seed sentences.•  The hybrid framework was developed to integrate AraBERT v2 for contextual feature extraction with a GNN.•  The framework was trained and evaluated against baseline models, and the performance was measured.

The study has been organized into sections, e.g., Section 2 describes the Methodology, Section 3 discusses the results and discussion, and Section 4 includes the conclusion.

Materials and Methods

Dataset description

In this study, the publicly available dataset from Kaggle is used. It has an Arabic 100k Reviews dataset designed for Arabic SA tasks [28]. The dataset is collected from ecommerce platforms, hospitality services, and product reviews and has 99,999 authentic Arabic text reviews. The genuine linguistic patterns and sentiment expressions in the dataset represent the realworld Arabic text. The corpus has a balanced distribution across three sentiment classes: Positive, Negative, and Mixed (33,333 samples per class). The balanced distribution prevents class imbalance issues that could potentially bias the model’s learning process. The dataset has distinct sentiment expressions such as explicit praise and criticism, nuanced mixed opinions, and varied linguistic patterns characteristic of authentic Arabic usergenerated content.The sample of data with 9,999 reviews was selected for training and evaluation of the model. It ensures computational efficiency and maintains the 1:1:1 class ratio for each sentiment category. The dataset distribution is given in Figure 1. The morphological and dialectical variations present in the Arabic text are covered in the sample. The dataset was divided into 80/20 for the training and testing of the hybrid model. The 7,999 samples from each class were used for the training, and 2,000 for the testing. The training set has 666 Negative, 667 Positive, and 667 Mixed samples. It maintains the original class ratio for the evaluation metrics and prevents distribution shift between training and evaluation phases.





Figure 1 . Dataset structure: (a) balanced distribution of 9,999 samples across three sentiment classes (33.3% each),  (b) equal class representation (3,333samples per class), and (c) stratified 80:20 train-test split with class balance.

Figure 1 . Dataset structure: (a) balanced distribution of 9,999 samples across three sentiment classes (33.3% each), (b) equal class representation (3,333samples per class), and (c) stratified 80:20 train-test split with class balance.

Data preprocessing and tokenization

The preprocessing pipeline is a multistage approach for MSA text, and it has different requirements as compared to dialectal Arabic. The dataset contains only MSA text, as shown by formal constructions such as “خدمة سيئة للغاية” (very bad service) rather than dialectal variants such as Egyptian “خدمة وحشة أوي” or Levantine “خدمة كتير سيئة”. It allows full use of the AraBERT v2 tokenizer, which was trained on 70 million MSA sentences drawn from news articles, Wikipedia, and online sources. The MSA design has advantages, such as the tokenizer covers 98.6% of the vocabulary in the dataset compared to only 73% when applied to dialectal text. It does not require extra procedures like codeswitching detection, dialectal morphological analysis, or transliteration normalization, which are usually necessary when processing mixed Arabic varieties. The MSA simplifies the preprocessing pipeline while improving model performance. The dialectal Arabic has high orthographic variability (the word “what” alone has 15+ dialectal variations: شو، إيش، أيه، شنو، وش، etc.), while MSA maintains consistent orthography that aligns perfectly with AraBERT’s pretraining corpus. The preprocessing pipeline employs targeted normalizations for the Modern Standard Arabic. Variations of Alif (أ، إ، آ) are standardized in base form (ا), reducing vocabulary sparsity by 15-20%. MSA text on digital platforms lacks full vocalization, and Diacritical marks are also removed. The tokenization process uses WordPiece segmentation for MSA’s morphology, decomposing words like “وسيذهبون” into meaningful subunits [“و”, “##سي”, “##ذهب”, “##ون”]. These subunits preserve the conjunction, aspect marker, trilateral root, and inflectional suffix. The systematic decomposition is effective in MSA but is often less reliable for dialectal Arabic, which does not follow the same consistent morphological patterns. MSAs play a significant role in enabling systematic, wellstructured data organization. The data organization has an average text length of approximately 250 characters. It has MSA’s predictable sentence structure. Dynamic batching utilizes data efficiency by padding each 64-sample batch to its maximum length, rather than the full 128 tokens, and it reduces computational overhead. The MSAbased preprocessing pipeline achieves full vocabulary coverage on the test set without depending on dialectspecific tools such as Multi Arabic Dialect Applications and Resources (MADAR) corpus mappings or dialect identification modules.

Hybrid LLM–GNN architecture The Hybrid framework is given in Figure 2, and it integrates the capabilities of Large Language Models with the relational learning strengths of GNNs. It has multiple interconnected components that capture both semantic and structural patterns in SA.

AraBERT v2 backbone The hybrid architecture employs AraBERT v2 (‟aubmindlab/bertbasearabertv2”), a pretrained transformer model developed specifically for Arabic language understanding [29]. The model functions as the primary feature extractor, utilizing its 12-layer transformer design with 768-dimensional hidden states. For each input sentence, the model generates contextualized representations through multihead selfattention mechanisms. The [CLS] token embedding from the final transformer layer is extracted as a 768-dimensional dense vector, representing the sentencelevel semantic information.





Figure 2 . Hybrid LLM–GNN framework for Arabic SA.

Figure 2 . Hybrid LLM–GNN framework for Arabic SA.

Finetuning is carried out to adapt the pretrained model to the sentiment classification task. In this configuration, only the transformer layers are updated during training, while the embedding layer remains frozen. Freezing the embedding layer preserves the original lexical representations learned during pretraining and reduces the number of trainable parameters. The approach allows the model to learn taskspecific sentiment features without overriding its general linguistic knowledge.

[ℎ[CLS]=AraBERT(????tokens)[0]]

ℎ[????????????] ∈ ℝ768 ???????????????????????????? ???? ∈ ℝ????×????

[????????????=ℎ???????? ⋅ ℎ????|ℎ????| ⋅ |ℎ????|.]
[H(l + 1)=σ(ÃH(l)W(l)).]
[zfused=[ h[CLS] | hGCN ].]
[zproj=ReLU (BatchNorm(Wproj ⋅ zfused + bproj)).]
[ℒ=− ∑ ∑ ????????????log (????̂????????)]

3

[????=1]

????

[????=1]

(1)

where

[ℎ[CLS]=AraBERT(????tokens)[0]]

ℎ[????????????] ∈ ℝ768 ???????????????????????????? ???? ∈ ℝ????×????

[????????????=ℎ???????? ⋅ ℎ????|ℎ????| ⋅ |ℎ????|.]
[H(l + 1)=σ(ÃH(l)W(l)).]
[zfused=[ h[CLS] | hGCN ].]
[zproj=ReLU (BatchNorm(Wproj ⋅ zfused + bproj)).]
[ℒ=− ∑ ∑ ????????????log (????̂????????)]

3

[????=1]

????

[????=1]

is the extracted sentence embedding and

[ℎ[CLS]=AraBERT(????tokens)[0]]

ℎ[????????????] ∈ ℝ768 ???????????????????????????? ???? ∈ ℝ????×????

[????????????=ℎ???????? ⋅ ℎ????|ℎ????| ⋅ |ℎ????|.]
[H(l + 1)=σ(ÃH(l)W(l)).]
[zfused=[ h[CLS] | hGCN ].]
[zproj=ReLU (BatchNorm(Wproj ⋅ zfused + bproj)).]
[ℒ=− ∑ ∑ ????????????log (????̂????????)]

3

[????=1]

????

[????=1]

represents the tokenized input sequence.Graph construction and GCNbased representation learning A graph is constructed for each minibatch to model relationships among sentences. For a batch of B sentences, a cosine similarity matrix

[ℎ[CLS]=AraBERT(????tokens)[0]]

ℎ[????????????] ∈ ℝ768 ???????????????????????????? ???? ∈ ℝ????×????

[????????????=ℎ???????? ⋅ ℎ????|ℎ????| ⋅ |ℎ????|.]
[H(l + 1)=σ(ÃH(l)W(l)).]
[zfused=[ h[CLS] | hGCN ].]
[zproj=ReLU (BatchNorm(Wproj ⋅ zfused + bproj)).]
[ℒ=− ∑ ∑ ????????????log (????̂????????)]

3

[????=1]

????

[????=1]

is computed using the [CLS] embeddings [30]:

[ℎ[CLS]=AraBERT(????tokens)[0]]

ℎ[????????????] ∈ ℝ768 ???????????????????????????? ???? ∈ ℝ????×????

[????????????=ℎ???????? ⋅ ℎ????|ℎ????| ⋅ |ℎ????|.]
[H(l + 1)=σ(ÃH(l)W(l)).]
[zfused=[ h[CLS] | hGCN ].]
[zproj=ReLU (BatchNorm(Wproj ⋅ zfused + bproj)).]
[ℒ=− ∑ ∑ ????????????log (????̂????????)]

3

[????=1]

????

[????=1]

(2) where hi and hj represent the [CLS] embeddings of sentences i and j. To form the graph structure, each sentence node selects its five most similar neighbors, and an edge is added when the similarity exceeds 0.7. This step retains only semantically meaningful links while avoiding a fully dense graph.The adaptive thresholding mechanism is used for the graph topology. In the graph construction process, five nearest semantic neighbors for each node are selected. When the similarity threshold is above 0.7, the edges are created. The relevant semantic relationships are captured, and computational efficiency is improved. If this results in isolated nodes, a fallback knearest neighbors approach with k=5 is applied to maintain the graph connectivity. Edge weights are derived from the cosine similarity values. The graph is unweighted in the current implementation to maintain computational simplicity.The resulting graph is processed using a twolayer graph convolutional network (GCN), and it updates each node representation by aggregating information from its neighbors [31]. The layerwise propagation is given as:

[ℎ[CLS]=AraBERT(????tokens)[0]]

ℎ[????????????] ∈ ℝ768 ???????????????????????????? ???? ∈ ℝ????×????

[????????????=ℎ???????? ⋅ ℎ????|ℎ????| ⋅ |ℎ????|.]
[H(l + 1)=σ(ÃH(l)W(l)).]

(3)where H(l) is the node features at layer l, Ȃ is the normalized adjacency matrix with selfloops, W(l) is the learnable weight matrix, and σ is the activation function. In order to improve generalization, the model applies batch normalization and dropout (0.3) between layers while reducing dimensionality in steps (768 → 256 → 128). The model does not use global pooling because each node represents a single sentence. The GCN outputs a 128-dimensional representation for each sentence and captures its individual semantic content and relational context in the batch.

Model training and evaluation

This section presents the fusion mechanism, model training, and the evaluation criterion for the hybrid framework and its variants.Sentencelevel representations from the GNN and the language encoder are combined by the fusion mechanism. In particular, an enriched 896-dimensional feature vector is created by concatenating the 768-dimensional AraBERT [CLS] embedding with the 128-dimensional GCNderived sentence representation:

[ℎ[CLS]=AraBERT(????tokens)[0]]

ℎ[????????????] ∈ ℝ768 ???????????????????????????? ???? ∈ ℝ????×????

[????????????=ℎ???????? ⋅ ℎ????|ℎ????| ⋅ |ℎ????|.]
[H(l + 1)=σ(ÃH(l)W(l)).]
[zfused=[ h[CLS] | hGCN ].]
[zproj=ReLU (BatchNorm(Wproj ⋅ zfused + bproj)).]
[ℒ=− ∑ ∑ ????????????log (????̂????????)]

3

[????=1]

????

[????=1]

(4) A fully connected layer with batch normalization and ReLU activation is used to project the fused vector into a 256-dimensional space:

[ℎ[CLS]=AraBERT(????tokens)[0]]

ℎ[????????????] ∈ ℝ768 ???????????????????????????? ???? ∈ ℝ????×????

[????????????=ℎ???????? ⋅ ℎ????|ℎ????| ⋅ |ℎ????|.]
[H(l + 1)=σ(ÃH(l)W(l)).]
[zfused=[ h[CLS] | hGCN ].]
[zproj=ReLU (BatchNorm(Wproj ⋅ zfused + bproj)).]
[ℒ=− ∑ ∑ ????????????log (????̂????????)]

3

[????=1]

????

[????=1]

(5) The classification head consists of a feedforward network with dropout (rate=0.5) and two linear layers (256→128→3). The final layer outputs logits corresponding to the three sentiment categories. The architecture refines the feature and prevents overfitting through aggressive dropout and dimensionality reduction.The model is trained using crossentropy loss for threeclass classification:

[ℎ[CLS]=AraBERT(????tokens)[0]]

ℎ[????????????] ∈ ℝ768 ???????????????????????????? ???? ∈ ℝ????×????

[????????????=ℎ???????? ⋅ ℎ????|ℎ????| ⋅ |ℎ????|.]
[H(l + 1)=σ(ÃH(l)W(l)).]
[zfused=[ h[CLS] | hGCN ].]
[zproj=ReLU (BatchNorm(Wproj ⋅ zfused + bproj)).]
[ℒ=− ∑ ∑ ????????????log (????̂????????)]

3

[????=1]

????

[????=1 (6)]

where N is the batch size, yic is the ground truth label, and

[ℎ[CLS]=AraBERT(????tokens)[0]]

ℎ[????????????] ∈ ℝ768 ???????????????????????????? ???? ∈ ℝ????×????

[????????????=ℎ???????? ⋅ ℎ????|ℎ????| ⋅ |ℎ????|.]
[H(l + 1)=σ(ÃH(l)W(l)).]
[zfused=[ h[CLS] | hGCN ].]
[zproj=ReLU (BatchNorm(Wproj ⋅ zfused + bproj)).]
[ℒ=− ∑ ∑ ????????????log (????̂????????)]

3

[????=1]

????

[????=1 is the predicted class probability. The]

AdamW optimizer with a learning rate of

and weight decay for improved generalization is used. The training schedule spans 50 epochs and employs ReduceLROnPlateau, which adjusts the learning rate based on validation F1-score stagnation. The full architecture contains approximately 135.7M parameters, with 86.1M trainable, due to the frozen embedding layers.To evaluate the specific contribution of the graphbased representation learning component, an alternative model variant is constructed in which the graph module is replaced by an eighthead selfattention mechanism applied directly to the tokenlevel AraBERT embeddings. The resulting attended representation is averaged and then fused with the [CLS] vector, followed by the same projection and classification layers used in the primary model. This variant is used as an ablation model to distinguish the contribution of graphbased relational reasoning from the effects of standard tokenlevel attention. Model performance is evaluated using accuracy, precision, recall, and macroaveraged F1-score in order to ensure balanced assessment across the three sentiment classes. The confusion matrix is used to describe how the model distinguishes between the sentiment categories and to find systematic misclassification patterns.

Results and Discussion

Training dynamics and convergence characteristics The experimental evaluation of the proposed AraBERT-GNN hybrid model was conducted on the heldout test set comprising 2,000 instances from the Arabic 100k Reviews dataset, maintaining balanced representation with 666 Negative, 667 Positive, and 667 Mixed samples. The comprehensive performance assessment demonstrates strong classification capabilities that reflect realistic performance on authentic Arabic text data. The model achieves an overall classification accuracy of 66.80%, with macroaveraged precision of 66.47%, recall of 66.80%, and F1-score of 66.55%. The detailed classification report for different sentiment categories is given in Table 1. The model has F1=0.72 for Positive sentiment classification, F1=0.71 for Negative sentiment, and F1=0.56 with Mixed sentiment, presenting the challenge The training dynamics of the hybrid model show stable and consistent convergence across 50-epochs, as given in Figure 3. The loss and accuracy curves show important insights about model learning behavior on the diverse Arabic 100k Reviews dataset. The loss curves decrease monotonically for training and validation sets, and there is no overfitting. The training loss begins at 1.063 and decreases sharply in the first few epochs; the substantial change occurs during the first 10 epochs, and then gradually declines. The loss stabilizes at 0.16 by the end of the 50 epochs, which is 85% less than the starting value. The decrease demonstrates that the model successfully adjusted to the distribution of training data. The test loss begins at 0.96 and decreases to 0.74 in the first four epochs. The initial test loss is low as compared to the training loss, and it has good initialization and immediate generalization capability. The continued reduction in test loss without divergence indicates no overfitting. Subsequently, the validation loss exhibits a gradual increase, stabilizing around 1.14 by the final epoch. The divergence between training and validation loss after epoch 4 indicates the onset of overfitting, a common phenomenon when training large transformerbased models on limited data. The best model checkpoint is saved at epoch 4 based on the F1-score. The accuracy curve is given in Figure 3 for training and test sets. Training accuracy shows continuous improvement and rises from 41.5% at epoch 1 to approximately 96% by epoch 50. Test accuracy shows rapid initial improvement, and it reaches a peak of 66.8% at epoch 4, then stabilizes around 65% for the remainder of training. The test accuracy shows epoch 4 as the optimal checkpoint for generalization.

Classwise performance analysis

The model has a precision of 0.71, a recall of 0.71, and an F1-score of 0.71. Out of 666 negative test samples, 476 were correctly classified (71.5% accuracy). It identified negative sentiment expressions and showed a detailed understanding of linguistic


Table 1.   Classification performance metrics per sentiment class on the Arabic 100k Review

Table 1.   Classification performance metrics per sentiment class on the Arabic 100k Review

cues such as criticism patterns, adverse opinions, and contextual indicators of negativity. The precision and recall suggest that the model neither overpredicts nor underpredicts negative sentiment. Positive sentiment has a precision of 0.70, a recall of 0.75, and an F1-score of 0.72. It has the best performance among the three classes. The model correctly classified 502 out of 667 positive samples (75.3% accuracy). The recall is high compared to precision. It shows that the model successfully captures most positive instances. The Mixed category has a precision of 0.59, a recall of 0.54, and an F1-score of 0.56. Only 358 out of 667 mixed samples were correctly classified (53.7% accuracy). The lower performance shows the inherent difficulty of identifying mixed sentiments, which has both positive and negative indicators within the same text. The mixed class shows the highest confusion with both positive and negative categories, as these reviews typically express nuanced opinions that share linguistic features with both polar sentiment classes.

Confusion matrix analysis

The model’s classification results across sentiment categories are given in the confusion matrix in Figure 4. The diagonal elements have correctly classified instances with negative and positive samples. It has accurately identified 476 negative samples (71.5%) and 502 positive samples (75.3%). The mixed class has low accuracy, and 358 instances (53.7%) are correctly classified. The offdiagonal elements have a high misclassification rate, and 152 instances are predicted as negative and 157 as positive. It shows the inherent ambiguity in this class. Negative samples have moderate confusion, and 138 instances are misclassified as mixed and 52 as positive, while positive samples have high discrimination and 35 instances are misclassified as negative and 130 as mixed.





Figure 3 . Training dynamics: (top-left) loss curves and validation loss, (top-right) accuracy convergence with test  accuracy stabilizing around 65-67%, (bottom-left) precision, recall, and F1 trajectories, and (bottom-right) final per- class performance metrics.

Figure 3 . Training dynamics: (top-left) loss curves and validation loss, (top-right) accuracy convergence with test accuracy stabilizing around 65-67%, (bottom-left) precision, recall, and F1 trajectories, and (bottom-right) final per- class performance metrics.

Qualitative prediction analysis

The prediction probabilities presented in Figure 5 show the model’s differentiation between sentiment classes for representative examples. The model assigns high probability to clearly expressed sentiments. For the positive case (Case 1: “هذا المنتج ممتاز وأنصح الجميع بشرائه”-This product is excellent and I recommend everyone buy it), it predicts the Positive class with 88.0% confidence, and allocates only 3.6% and 8.3% to Negative and Mixed, respectively. In the negative case (Case 2: “ ولن اعود مرة اخرىخدمة العملاء كانت سيئة جداً “ - Customer service was very bad and I will not return), it predicts the Negative class with 77.9% confidence and shows separation between opposing sentiments. For the mixed sentiment case, the model has 55%–60% confidence. The uncertainty in mixed expressions is the major reason for the low confidence in the neutral sentiment case. The probability distributions show that the model’s confidence is related to the sentiment clarity. Statements with clear emotional cues have high confidence predictions (>75%). The balanced or unclear statements produce evenly distributed probabilities across classes. The model has no confusion between opposing sentiment classes (Positive vs. Negative). The uncertainty is present in the neutral classes.

Comparative Performance Analysis

The hybrid model was compared with: (i) finetuned AraBERT without graph components, (ii) AraBERT with MLP classifier, (iii) AraBERT– BiLSTM





Figure 4 . Confusion matrix on the held-out test set (2,000 samples) for Negative, Positive, and Mixed sentiment  classes.

Figure 4 . Confusion matrix on the held-out test set (2,000 samples) for Negative, Positive, and Mixed sentiment classes.

layer (shown in Figure 6), and (iv) multilingual BERT (mBERT) finetuned for Arabic sentiment classification.

As illustrated in Table 2 and Figure 6, the AraBERT-GNN hybrid model has improved performance across all evaluation metrics. The model has





Figure 5 . The confidence scores across three sentiment classes. High-confidence classifications (77%–88%) for  positive/negative sentiments versus medium confidence (55-60%) for mixed sentiment.

Figure 5 . The confidence scores across three sentiment classes. High-confidence classifications (77%–88%) for positive/negative sentiments versus medium confidence (55-60%) for mixed sentiment.





Figure 6 . Comparative performance analysis: (left) metric comparison across all models showing AraBERT-GNN’s  consistent superiority, (right) relative F1-score improvement of the proposed model over each baseline.

Figure 6 . Comparative performance analysis: (left) metric comparison across all models showing AraBERT-GNN’s consistent superiority, (right) relative F1-score improvement of the proposed model over each baseline.

an F1-score of 0.666 and shows significant improvements over all baseline approaches. Figure 7 presents the perclass F1-score comparison for all models. It shows how models handle important patterns in various sentiment categories. The AraBERT-GNN has improvements across all three sentiment classes: For Negative sentiment classification, the proposed model achieves F1=0.71, compared to 0.66 for AraBERT finetuned and 0.68 for AraBERT+BiLSTM. It has improvement of 7.6% and 4.4%, respectively. The improved performance on negative sentiment suggests that the graph component effectively captures the patterns characteristic of critical and negative reviews. For Positive sentiment, the improvement is most pronounced, with AraBERT-GNN having F1=0.72 compared to 0.68 for AraBERT finetuned (5.9% improvement). The GNN is effective at identifying and propagating positive sentiment signals across semantically similar reviews. For the Mixed sentiment category, the model achieves F1=0.56, and the AraBERT baseline (F1=0.49), resulting in an improvement of 14.3%. The significant improvement shows that the GNN disambiguates mixed sentiments by using similarity patterns with neighboring reviews in the embedding space.

The experimental results on the Arabic 100k Reviews dataset show that the hybrid AraBERT-GNN has better sentiment classification as compared to multiple baseline models. The accuracy of 66.8% and the F1-score of 66.55% is achieved. It has better performance levels for threeclass sentiment classification on user data.The model has a significant improvement of 5.5% to 16.8% relative F1-score over all baselines models. It shows the effectiveness of a transformerbased language and GNN model. The significant improvements are observed in the Mixed sentiment category (14.3% improvement over the AraBERT baseline). It suggests that the GNN component is important for disambiguating nuanced sentiments that have both positive and negative indicators. The strong performance on Positive (F1=0.72) and Negative (F1=0.71) sentiments shows that the model effectively captures explicit sentiment indicators and distinguishes between opposing polarities. The graph component appears to reinforce sentiment signals by propagating information between semantically similar reviews, enhancing the model’s discriminative capability. The training dynamics show characteristic patterns for transformerbased models on the Kaggle dataset [28]. The divergence between


Table 2.   Comparison  of the AraBERT-GNN model with baseline approaches.

Table 2.   Comparison of the AraBERT-GNN model with baseline approaches.





Figure 7 . Per-class F1-score comparison across all models for Negative, Positive, and Mixed sentiment categories.

Figure 7 . Per-class F1-score comparison across all models for Negative, Positive, and Mixed sentiment categories.

training and validation loss after epoch 4 shows overfitting, and it is a major challenge for the large pretrained models. The best model is selected based on validation F1-score, and successfully captures the optimal balance between model expressiveness and generalization. It is useful for early stopping and checkpoint selection in practical deployments.The comparison with multilingual BERT (mBERT) is useful. Despite mBERT’s larger parameter count (178.9M vs. 135.7M), the Arabicspecific AraBERT backbone combined with GNN performs better as compared to the multilingual approach (13.7% F1 improvement). The graph component in this study provides batchlevel connectivity based on embedding similarity, which appears to offer meaningful improvements through semantic neighborhood modeling. The dynamic graph construction, where each batch forms its own similarity graph, allows the model to use local semantic structure without requiring static corpuslevel graphs that may become outdated or computationally prohibitive at scale. The hybrid LLM-GNN is a promising solution for Arabic SA and has consistent improvements over both standard finetuning approaches and sequential modeling alternatives.

Conclusion

The study presents a hybrid LLM–GNN framework for Arabic SA. It combines the semantic understanding of transformerbased models with the structural reasoning capability of GNNs. The architecture successfully captures linguistic and syntactic dependencies in Arabic text by combining a twolayer Graph GCN for relational learning with AraBERT v2 for contextual embedding. The framework performs better compared to models such as finetuned AraBERT, AraBERT–BiLSTM, AraBERT–MLP, and mBERT. The hybrid framework also exhibits rapid convergence and stable loss reduction, confirming its training efficiency and robustness. The graph construction operates at the minibatch level; extending it to corpuslevel graph formation using a memory bank of sentence embeddings could enable richer modeling of global semantic relationships. Parameterefficient finetuning strategies, such as Low-Rank Adaptation (LoRA), can reduce computational overhead while improving performance. The Mixed sentiment class is a large source of classification errors due to its ambiguity; incorporating graph attention mechanisms or hierarchical classification strategies may improve discrimination in sentiment boundary cases.

Acknowledgment

During the preparation of this paper, the author has used AI generative tools to improve English. The authors have reviewed and take full responsibility for the content of this publication.

Funding

The authors state no funding is involved.

Conflict of interest

The authors state no conflict of interest.

Ethical approval

This paper does not involve people or animals; no investigation has involved human subjects. Therefore, the authors did not seek approval from any institutional review board.

Data availability

The data that support the findings of this study are available from the corresponding author, [S], upon reasonable request.

References

1. Jin Z, Zhang Y. A graph neural networkbased contextaware framework for sentiment analysis classification in Chinese microblogs. Mathematics 2025; 13(6):997.

2. Anoop VS, Subin Krishna C, Govindarajan UH. Graph embedding approaches for social media sentiment analysis with model explanation. Int J Inf Manag Data Insights 2024; 4(1):100221; doi:10.1016/j.jjimei.2024.100221

3. Chaturvedi I, Cambria E, Welsch RE, Herrera F. Distinguishing between facts and opinions for sentiment analysis: survey and challenges. Inf Fusion 2018; 44:65–77.

4. Mao Y, Liu Q, Zhang Y. Sentiment analysis methods, applications, and challenges: a systematic literature review. J King Saud Univ Comput Inf Sci 2024; 36(4):102048; doi:10.1016/j.jksuci.2024.102048

5. Fuchs C, Baidu, Weibo R. Baidu, Weibo, and Renren: the Global Political Economy of Social Media in China. In: Culture and Economy in the Age of Social Media Routledge, London, United Kingdom, 2015, p 246, 2015.

6. Mohammad SM. Sentiment analysis: detecting valence, emotions, and other affectual states from text. In: Emotion Measurement 2016, Meiselman HL, (ed.), p 201, 2016.

7. Xiang C, Zhang J, Li F, Fei H, Ji D. A semantic and syntactic enhanced neural model for financial sentiment analysis. Inf Process Manag 2022; 59(4):102943.

8. Duan G, Yan S, Zhang M. A hybrid neural network model for sentiment analysis of financial texts using topic extraction, pretrained model, and enhanced attention mechanism methods. IEEE Access 2024; 12:98207–24; doi:10.1109/ACCESS.2024.3429150

9. García-Méndez S, De Arribapérez F, Barros-Vila A, González-Castaño FJ. Targeted aspectbased emotion analysis to detect opportunities and precaution in financial Twitter messages. Expert Syst With Applications 2023; 218:119611; doi:10.1016/j.eswa.2023.119611

10. Chen X, Shen Z, Guan T, Tao Y, Kang Y, Zhang Y. Analyzing patient experience on Weibo: machine learning approach to topic modeling and sentiment analysis. JMIR Med Inf 2024; 12:e59249.

11. Hota HS, Sharma DK, Verma N. Lexiconbased sentiment analysis using Twitter data: a case of COVID-19 outbreak in India and abroad. In: Kose U, Gupta D, Albuquerque VHC, Khanna AB ed.s . Data Science for COVID-19 Academic Press, 2021, p 275, 2021. doi:10.1016/B978-0-12-824536-1.00015-0

12. Khan J, Alam A, Lee Y. Intelligent hybrid feature selection for textual sentiment classification. IEEE Access 2021; 9:140590–608; doi:10.1109/ACCESS.2021.3118982

13. Gokalp O, Tasci E, Ugur A. A novel wrapper feature selection algorithm based on iterated greedy metaheuristic for sentiment classification. Expert Syst With Applications 2020; 146:113176; doi:10.1016/j.eswa.2020.113176

14. A. Semary N, Ahmed W, Amin K, Pławiak P, Hammad M. Enhancing machine learningbased sentiment analysis through feature extraction techniques. PLoS One 2024; 19(2):294968.

15. Al Sari B, Alkhaldi R, Alsaffar D, Alkhaldi T, Almaymuni H, Alnaim N, et al. Sentiment analysis for cruises in Saudi Arabia on social media platforms using machine learning algorithms. J Big Data 2022; 9(1):21.

16. Mukherjee P, Badr Y, Doppalapudi S, Srinivasan SM, Sangwan RS, Sharma R. Effect of negation in sentences on sentiment analysis and polarity detection. Procedia Comput Sci 2021; 185:370–9; doi:10.1016/j.procs.2021.05.038

17. Noori B. Classification of customer reviews using machine learning algorithms. Appl Artif Intell 2021; 35(8):567–88; doi:10.1080/08839514.2021.1922843

18. Chatterjee A, Gupta U, Chinnakotla MK, Srikanth R, Galley M, Agrawal P. Understanding emotions in text using deep learning and big data. Comput Hum Behav 2019; 93:309–17; doi:10.1016/j.chb.2018.12.029

19. Pennington J, Socher R, Manning CD. GloVe: global vectors for word representation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), Association for Computational Linguistics, Stroudsburg, PA, 2014, 2014, pp. 1532–43.

20. Li X, Ning H. Chinese text classification based on hybrid model of CNN and LSTM. In Proceedings of the 3rd International Conference on Data Science and Information Technology, Association for Computing Machinery, New York, NY, 2020, pp. 129–34.

21. Liu G, Guo J. Bidirectional LSTM with attention mechanism and convolutional layer for text classification. Neurocomputing 2019; 337:325–38.

22. Hu M, Liu B. Mining and summarizing customer reviews. In Proceedings of the Tenth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Association for Computing Machinery, New York, NY, 2004, pp. 168–77.

23. Basiri ME, Nemati S, Abdar M, Cambria E, Acharya UR. ABCDM: an attentionbased bidirectional CNN-RNN deep model for sentiment analysis. Future Gener Comput Syst 2021; 115:279–94; doi:10.1016/j.future.2020.08.005

24. Abimbola B, De La Cal Marin E, Tan Q. Enhancing legal sentiment analysis: a convolutional neural network–long shortterm memory documentlevel model. Mach Learn Knowl Extr 2024; 6(2):877–97.

25. Mohammed Alsekait D, Fathi H, Abdallah Ibrahim S, Shdefat AY, Saleh Alattas A, Salama Abdelminaam D. Sentiment analysis: a machine learning utilisation for analyzing the sentiments of Facebook and Twitter posts. Intell Data Anal 2025.

26. Alhayan F, Himdi H. Ensemble learning approach for distinguishing human and computergenerated Arabic reviews. PeerJ Comput Sci 2024; 10:2345.

27. Bayazed AA, Almagrabi H, Alahmadi D, Alghamdi HS. ACOM: arabic comparative opinion mining in social media utilizing word embedding, deep learning model, and LLM-GPT. IEEE Access 2024; 12:148741–55; doi:10.1109/ACCESS.2024.3476336

28. Kaggle. Arabic 100k reviews. Available from: https://www.kaggle.com/datasets/abedkhooli/arabic-100kreviews/ (accessed 31 December, 2025).

29. Labib M, Ashraf N, Aldawsari M, Nayel H. REGLAT at AraGenEval shared task: morphologyaware AraBERT for detecting Arabic AIgenerated text. In Proceedings of the Third Arabic Natural Language Processing Conference: Shared Tasks, Association for Computational Linguistics, Stroudsburg, PA, 2025, pp. 94–8.

30. Qiao L, Zhang L, Chen S, Shen D. Datadriven graph construction and graph learning: a review. Neurocomputing 2018; 312:336–51.

31. Zhang S, Tong H, Xu J, Maciejewski R. Graph convolutional networks: a comprehensive review. Comput Soc Netw 2019; 6(1):1–23.

How to Cite this Article
Pubmed Style

Hani Iwidat. A Hybrid Large Language Model-Graph Neural Network Framework for Arabic Sentiment Analysis. Arch Appl Sci. 2026; 1(1): 11-22. doi:10.5455/AAS.20251118051203


Web Style

Hani Iwidat. A Hybrid Large Language Model-Graph Neural Network Framework for Arabic Sentiment Analysis. https://www.wisdomgale.com/aas//?mno=297697 [Access: June 27, 2026]. doi:10.5455/AAS.20251118051203


AMA (American Medical Association) Style

Hani Iwidat. A Hybrid Large Language Model-Graph Neural Network Framework for Arabic Sentiment Analysis. Arch Appl Sci. 2026; 1(1): 11-22. doi:10.5455/AAS.20251118051203



Vancouver/ICMJE Style

Hani Iwidat. A Hybrid Large Language Model-Graph Neural Network Framework for Arabic Sentiment Analysis. Arch Appl Sci. (2026), [cited June 27, 2026]; 1(1): 11-22. doi:10.5455/AAS.20251118051203



Harvard Style

Hani Iwidat (2026) A Hybrid Large Language Model-Graph Neural Network Framework for Arabic Sentiment Analysis. Arch Appl Sci, 1 (1), 11-22. doi:10.5455/AAS.20251118051203



Turabian Style

Hani Iwidat. 2026. A Hybrid Large Language Model-Graph Neural Network Framework for Arabic Sentiment Analysis. Archives of Applied Sciences, 1 (1), 11-22. doi:10.5455/AAS.20251118051203



Chicago Style

Hani Iwidat. "A Hybrid Large Language Model-Graph Neural Network Framework for Arabic Sentiment Analysis." Archives of Applied Sciences 1 (2026), 11-22. doi:10.5455/AAS.20251118051203



MLA (The Modern Language Association) Style

Hani Iwidat. "A Hybrid Large Language Model-Graph Neural Network Framework for Arabic Sentiment Analysis." Archives of Applied Sciences 1.1 (2026), 11-22. Print. doi:10.5455/AAS.20251118051203



APA (American Psychological Association) Style

Hani Iwidat (2026) A Hybrid Large Language Model-Graph Neural Network Framework for Arabic Sentiment Analysis. Archives of Applied Sciences, 1 (1), 11-22. doi:10.5455/AAS.20251118051203