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

preprint OA: closed CC-BY-4.0
📄 Open PDF Full text JSON View at publisher

Abstract

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. Understanding how public opinion evolves during international conflicts is important for researchers, policymakers, and media analysts. 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. Topic-wise sentiment analysis further revealed that discussions about geopolitical tensions and political controversies generated higher negative sentiment, while topics related to leadership, religion, and peace showed comparatively more positive reactions.
Full text 14,818 characters · extracted from preprint-html · click to expand
Privacy-Preserving Topic-wise Sentiment Analysis of the Iran–Israel–USA Conflict Using Federated Transformer Models | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Article Privacy-Preserving Topic-wise Sentiment Analysis of the Iran–Israel–USA Conflict Using Federated Transformer Models Md Saiful Islam, Tanjim Taharat Aurpa, Sharad Hasan, Farzana Akter This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-9196503/v1 This work is licensed under a CC BY 4.0 License Status: Under Review Version 1 posted 11 You are reading this latest preprint version 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. Understanding how public opinion evolves during international conflicts is important for researchers, policymakers, and media analysts. 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. Topic-wise sentiment analysis further revealed that discussions about geopolitical tensions and political controversies generated higher negative sentiment, while topics related to leadership, religion, and peace showed comparatively more positive reactions. Physical sciences/Mathematics and computing Social science/Science technology and society Iran-Israel-USA Topic wise Sentiment analysis Federated Learning XAI ELECTRA Full Text Additional Declarations No competing interests reported. Cite Share Download PDF Status: Under Review Version 1 posted Reviews received at journal 03 May, 2026 Reviews received at journal 28 Apr, 2026 Reviews received at journal 20 Apr, 2026 Reviewers agreed at journal 16 Apr, 2026 Reviewers agreed at journal 11 Apr, 2026 Reviewers agreed at journal 10 Apr, 2026 Reviewers invited by journal 10 Apr, 2026 Editor invited by journal 01 Apr, 2026 Editor assigned by journal 27 Mar, 2026 Submission checks completed at journal 27 Mar, 2026 First submitted to journal 23 Mar, 2026 You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-9196503","acceptedTermsAndConditions":true,"allowDirectSubmit":false,"archivedVersions":[],"articleType":"Article","associatedPublications":[],"authors":[{"id":624023064,"identity":"fcfe1810-6b08-41ef-bb9d-c3e983fa221b","order_by":0,"name":"Md Saiful Islam","email":"","orcid":"","institution":"University of Frontier Technology, Bangladesh (UFTB)","correspondingAuthor":false,"prefix":"","firstName":"Md","middleName":"Saiful","lastName":"Islam","suffix":""},{"id":624023066,"identity":"c2fc0f34-8267-4d3b-b148-d0085416d7a8","order_by":1,"name":"Tanjim Taharat Aurpa","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA30lEQVRIiWNgGAWjYNACAwkeNvYGhg+MDSAeD4MEYS0VNnJ8PAcYZxwkXsuZNGM5iQQitfDPyH324Gfb4cQ2yTeGzR93MMjzN/AevIFPi8SNdHPDXpAW6RzDhoNnGAxnHOBLtsDrphtpbBK8EC3mDw62MTBuYOAxw+sweaAWyb9gh50B2tLGYE9QiwFQizQP0PtsEjxgLYkEtRieecZuLAMMZDaetMKGs2ckkmccJuAXueNpbA/fAKNSvv3wxobKHTa2/e29+EMMCNiQOUAnMRNQj65lFIyCUTAKRgEmAADtEEnQy//bLQAAAABJRU5ErkJggg==","orcid":"","institution":"University of Frontier Technology, Bangladesh (UFTB)","correspondingAuthor":true,"prefix":"","firstName":"Tanjim","middleName":"Taharat","lastName":"Aurpa","suffix":""},{"id":624023067,"identity":"5a4c21de-97f5-48f9-990a-d5202f1a572a","order_by":2,"name":"Sharad Hasan","email":"","orcid":"","institution":"University of Frontier Technology, Bangladesh (UFTB)","correspondingAuthor":false,"prefix":"","firstName":"Sharad","middleName":"","lastName":"Hasan","suffix":""},{"id":624023068,"identity":"05885e69-34e9-4fae-9282-edfc027b590e","order_by":3,"name":"Farzana Akter","email":"","orcid":"","institution":"University of Frontier Technology, Bangladesh (UFTB)","correspondingAuthor":false,"prefix":"","firstName":"Farzana","middleName":"","lastName":"Akter","suffix":""}],"badges":[],"createdAt":"2026-03-23 06:53:19","currentVersionCode":1,"declarations":"","doi":"10.21203/rs.3.rs-9196503/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-9196503/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":107481857,"identity":"68fb8405-c6b5-411d-949b-8ee9ef78ecff","added_by":"auto","created_at":"2026-04-22 02:20:29","extension":"pdf","order_by":1,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":3186102,"visible":true,"origin":"","legend":"","description":"","filename":"IIUSentimentAnalysis.pdf","url":"https://assets-eu.researchsquare.com/files/rs-9196503/v1_covered_69d967bc-8f4f-4f5a-bab8-eff55dde9892.pdf"}],"financialInterests":"No competing interests reported.","formattedTitle":"Privacy-Preserving Topic-wise Sentiment Analysis of the Iran–Israel–USA Conflict Using Federated Transformer Models","fulltext":[],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":false,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":false,"hideJournal":false,"highlight":"","institution":"","isAcceptedByJournal":false,"isAuthorSuppliedPdf":true,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":true,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"[email protected]","identity":"scientific-reports","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"scirep","sideBox":"Learn more about [Scientific Reports](http://www.nature.com/srep/)","snPcode":"","submissionUrl":"","title":"Scientific Reports","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"stoa","reportingPortfolio":"Scientific Reports","inReviewEnabled":true,"inReviewRevisionsEnabled":true},"keywords":"Iran-Israel-USA, Topic wise Sentiment analysis, Federated Learning, XAI, ELECTRA","lastPublishedDoi":"10.21203/rs.3.rs-9196503/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-9196503/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"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. Understanding how public opinion evolves during international conflicts is important for researchers, policymakers, and media analysts. 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. Topic-wise sentiment analysis further revealed that discussions about geopolitical tensions and political controversies generated higher negative sentiment, while topics related to leadership, religion, and peace showed comparatively more positive reactions.","manuscriptTitle":"Privacy-Preserving Topic-wise Sentiment Analysis of the Iran–Israel–USA Conflict Using Federated Transformer Models","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2026-04-17 18:05:07","doi":"10.21203/rs.3.rs-9196503/v1","editorialEvents":[{"type":"communityComments","content":0},{"type":"editorInvitedReview","content":"","date":"2026-05-03T07:02:09+00:00","index":"hide","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2026-04-28T13:18:35+00:00","index":"hide","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2026-04-20T04:41:02+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"180397964042122123743424775952945086232","date":"2026-04-16T04:52:29+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"12996111510943553291609662308270584047","date":"2026-04-11T13:36:58+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"69107761259856175767394702222556979502","date":"2026-04-10T11:16:52+00:00","index":"hide","fulltext":""},{"type":"reviewersInvited","content":"","date":"2026-04-10T08:31:17+00:00","index":"","fulltext":""},{"type":"editorInvited","content":"","date":"2026-04-01T13:34:30+00:00","index":"","fulltext":""},{"type":"editorAssigned","content":"","date":"2026-03-27T09:25:44+00:00","index":"","fulltext":""},{"type":"checksComplete","content":"","date":"2026-03-27T09:25:04+00:00","index":"","fulltext":""},{"type":"submitted","content":"Scientific Reports","date":"2026-03-23T06:39:19+00:00","index":"","fulltext":""}],"status":"published","journal":{"display":true,"email":"[email protected]","identity":"scientific-reports","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"scirep","sideBox":"Learn more about [Scientific Reports](http://www.nature.com/srep/)","snPcode":"","submissionUrl":"","title":"Scientific Reports","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"stoa","reportingPortfolio":"Scientific Reports","inReviewEnabled":true,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"9e24470c-1520-45eb-8b74-3dc311dec3e6","owner":[],"postedDate":"April 17th, 2026","published":true,"recentEditorialEvents":[{"type":"editorInvitedReview","content":"","date":"2026-05-03T07:02:09+00:00","index":65,"fulltext":""}],"rejectedJournal":[],"revision":"","amendment":"","status":"under-review","subjectAreas":[{"id":66413542,"name":"Physical sciences/Mathematics and computing"},{"id":66413543,"name":"Social science/Science technology and society"}],"tags":[],"updatedAt":"2026-04-17T18:05:07+00:00","versionOfRecord":[],"versionCreatedAt":"2026-04-17 18:05:07","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-9196503","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-9196503","identity":"rs-9196503","version":["v1"]},"buildId":"XKTyCvWXoU3ODBz1xrDgd","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}

Text is read by the "Ask this paper" AI Q&A widget below. Extraction quality varies by source — PMC NXML preserves structure cleanly, OA-HTML may include some navigation residue, and OA-PDF can have broken hyphenation. The publisher copy (via DOI) is the canonical version.

My notes (saved in your browser only)

Ask this paper AI returns verbatim quotes from the full text · source: preprint-html

Answers must be backed by verbatim quotes from this paper's full text. Hallucinated quotes are dropped automatically; if no verbatim passage answers the question, we say so. How this works

Citation neighborhood (no data yet)

We don't have any in-corpus citations linked to this paper yet. This is a recent paper (2026) — citers typically take a year or two to land, and the OpenAlex reference graph may still be filling in.

Source provenance

europepmc
last seen: 2026-05-20T01:45:00.602351+00:00
unpaywall
last seen: 2026-05-20T11:00:21.680559+00:00
License: CC-BY-4.0