AI Navigate

Privacy Preserving Topic-wise Sentiment Analysis of the Iran Israel USA Conflict Using Federated Transformer Models

arXiv cs.CL / 3/17/2026

💬 OpinionDeveloper Stack & InfrastructureIdeas & Deep AnalysisTools & Practical UsageModels & Research

Key Points

  • A privacy-preserving framework for topic-wise sentiment analysis is proposed, combining topic modeling, transformer-based sentiment classifiers, and federated learning to analyze YouTube comments about the Iran-Israel-USA conflict.
  • The study collected around 19,000 comments from major international news channels; initial sentiment labeling used VADER and was validated manually; LDA identified key topics related to the conflict.
  • Fine-tuned transformer models (BERT, RoBERTa, XLNet, DistilBERT, ModernBERT, ELECTRA) were evaluated, with ELECTRA achieving the best accuracy at 91.32%; the federated setup achieved 89.59% accuracy with two clients, preserving privacy.
  • Explainable AI with SHAP was used to interpret predictions and identify influential words, demonstrating interpretability alongside strong performance.

Abstract

The recent escalation of the Iran Israel USA conflict in 2026 has triggered widespread global discussions across social media platforms. As people increasingly use these platforms for expressing opinions, analyzing public sentiment from these discussions can provide valuable insights into global public perception. This study aims to analyze global public sentiment regarding the Iran Israel USA conflict by mining user-generated comments from YouTube news channels. The work contributes to public opinion analysis by introducing a privacy preserving framework that combines topic wise sentiment analysis with modern deep learning techniques and Federated Learning. To achieve this, approximately 19,000 YouTube comments were collected from major international news channels and preprocessed to remove noise and normalize text. Sentiment labels were initially generated using the VADER sentiment analyzer and later validated through manual inspection to improve reliability. Latent Dirichlet Allocation (LDA) was applied to identify key discussion topics related to the conflict. Several transformer-based models, including BERT, RoBERTa, XLNet, DistilBERT, ModernBERT, and ELECTRA, were fine tuned for sentiment classification. The best-performing model was further integrated into a federated learning environment to enable distributed training by preserving user data privacy. Additionally, Explainable Artificial Intelligence (XAI) techniques using SHAP were applied to interpret model predictions and identify influential words affecting sentiment classification. Experimental results demonstrate that transformer models perform effectively, and among them, ELECTRA achieved the best performance with 91.32% accuracy. The federated learning also maintained strong performance while preserving privacy, achieving 89.59% accuracy in a two client configuration.