Abstract
This paper presents an integrated framework for cross-language hotel review sentiment analysis that combines multi-agent federated learning with heterogeneous graph attention networks to address privacy preservation and multilingual data processing challenges in hospitality reputation management. Our system enables collaborative model training across distributed review platforms while maintaining data locality requirements and achieving improved cross-language sentiment classification performance. Beyond sentiment analysis, we developed dynamic reputation management and fake review detection capabilities that enable proactive intervention strategies for hospitality businesses. The heterogeneous graph architecture captures complex relationships between multilingual textual content, user behaviors, temporal patterns, and service attributes through specialized attention mechanisms. Experimental evaluation on a comprehensive multilingual dataset of 154,680 reviews across four languages demonstrates 89.7 ± 0.007 accuracy in sentiment classification with 0.925 privacy preservation score (Table 6), representing 2.6% point improvement over the strongest baseline XLM-RoBERTa large (87.1 ± 0.008 accuracy, paired t-test p = 0.002). The dynamic reputation management component provides real-time monitoring capabilities with early warning detection, achieving 93.4 ± 0.012 fake review identification accuracy and 66.2% reduction in response time compared to traditional centralized approaches (Table 9). The system offers practical applications for hospitality businesses seeking proactive reputation management while ensuring compliance with international data privacy regulations including GDPR and CCPA.
Data availability
Due to privacy regulations and platform terms of service agreements, the complete multilingual hotel review dataset containing 154,680 reviews cannot be publicly released to protect user privacy and comply with data protection laws including GDPR and CCPA. To support research reproducibility while respecting these constraints, we provide Supplementary File 1 accompanying this manuscript. Supplementary File 1 contains the following materials: (1) A representative sample dataset of 5,000 anonymized reviews with 1,250 reviews per language covering English, Chinese, French, and German, where all personally identifiable information has been removed and hotel names replaced with anonymous identifiers while preserving sentiment labels and temporal metadata; (2) A synthetic dataset of 10,000 reviews matching the statistical properties of the original data including sentiment distribution, review length distribution, and cross-language correlation patterns, generated using a conditional variational autoencoder trained on the original dataset, suitable for algorithm development and preliminary testing; (3) Complete data collection scripts for gathering publicly available hotel reviews from TripAdvisor and Booking.com APIs with rate limiting and ethical scraping practices, including documentation for API authentication, data extraction, and preprocessing pipelines; (4) The full data processing pipeline including language detection using langdetect v1.0.9, text normalization using NLTK v3.8.1, sentiment annotation using multilingual BERT, and quality filtering, with detailed documentation and example notebooks; (5) Source code for the multi-agent federated learning framework, heterogeneous graph attention network, and dynamic reputation management system with configuration files matching our experimental setup. Researchers requiring access to the full dataset for verification purposes may contact the corresponding author at hanxiao202411@163.com with a detailed research proposal describing intended use, institutional affiliation, and ethical approval documentation, subject to a data sharing agreement requiring compliance with applicable privacy regulations and restrictions on commercial use.
Code availability
The complete implementation of our proposed cross-language hotel review sentiment analysis framework is provided in Supplementary File 1 to facilitate reproducibility and enable future research extensions. The supplementary materials contain modular implementations of the multi-agent federated learning framework built with PyTorch 2.0.1 and FederatedScope 0.3.0 including agent coordination protocols, secure aggregation mechanisms, and differential privacy modules with configurable epsilon and delta parameters. The heterogeneous graph attention network architecture is implemented using PyTorch Geometric 2.3.1 with custom message passing functions for heterogeneous node types and relation-specific attention mechanisms. The dynamic reputation management system includes real-time monitoring and fake review detection algorithms combining linguistic analysis and graph-based behavioral pattern recognition. Supplementary File 1 also includes evaluation scripts for baseline comparisons with implementations of mBERT, XLM-RoBERTa, FedAvg, FedProx, GraphSAGE, and HAN-Basic methods with hyperparameter configurations matching our experimental setup. Comprehensive documentation covers installation instructions, API reference, usage examples, and environment setup files including requirements.txt specifying all Python package dependencies with version numbers. Docker configuration ensures environment reproducibility across different systems. Detailed tutorials address dataset preparation, model training with single-agent and multi-agent modes, hyperparameter tuning using Bayesian optimization, evaluation on custom datasets, and deployment guidelines for production environments. Pre-trained model checkpoints trained on our full dataset achieving 89.7% cross-language accuracy are included, enabling direct inference without retraining, with separate checkpoints for each language-specific agent and the global aggregated model. Additional materials include detailed algorithm pseudocode, mathematical derivations for optimization objectives, ablation study code analyzing individual component contributions, and privacy attack implementations for membership inference and attribute inference attacks used in our evaluation. All code is released under Apache License 2.0 to maximize research impact and facilitate industrial adoption.
References
Alaei, A. R., Becken, S. & Stantic, B. Sentiment analysis in tourism: Capitalizing on big data. J. Travel Res. 58 (2), 175–191 (2019).
Álvarez-Carmona, M. Á. et al. Natural language processing applied to tourism research: A systematic review and future research directions. J. King Saud University-Computer Inform. Sci. 34 (10), 10125–10138 (2022).
Antonio, N., de Almeida, A., Nunes, L., Batista, F. & Ribeiro, R. Hotel online reviews: Different languages, different opinions. Inform. Technol. Tourism. 18 (1–4), 157–185 (2018).
Devlin, J., Chang, M. W., Lee, K. & Toutanova, K. BERT: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv :181004805. (2018).
Ounacer, S., Mhamdi, D., Ardchir, S., Daif, A. & Azzouazi, M. Customer sentiment analysis in hotel reviews through natural language processing techniques. Int. J. Adv. Comput. Sci. Appl., 14(1). (2023).
Weber, J. et al. Federated learning for privacy-preserving feedforward control in multi-agent systems. arXiv preprint arXiv :250302693. (2025).
Xu, X. Mining and application of tourism online review text based on natural language processing and text classification technology. Wireless Communications and Mobile Computing, 2022. (2022).
Vaswani, A. et al. Attention is all you need. Adv. Neural. Inf. Process. Syst., 30. (2017).
Pang, B., Lee, L. & Vaithyanathan, S. Thumbs up? Sentiment classification using machine learning techniques. arXiv preprint cs/0205070. (2002).
Zhang, L., Wang, S. & Liu, B. Sentiment analysis methods, applications, and challenges: A systematic literature review. J. King Saud University-Computer Inform. Sci. 36 (4), 101576 (2024).
Wahyuni, E. D. & Djunaidy, A. Deep learning-based application for multilevel sentiment analysis of Indonesian hotel reviews. Heliyon, 9(6), e16347. (2023).
Jain, P. K. et al. Sentiment analysis classification system using hybrid BERT models. J. Big Data. 10 (1), 1–23 (2023).
Karthikeyan, K., Wang, Z., Mayhew, S. & Roth, D. Cross-lingual ability of multilingual BERT: An empirical study. International Conference on Learning Representations. (2020).
Pires, T., Schlinger, E. & Garrette, D. How multilingual is multilingual BERT? Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, 4996–5001. (2019).
Devlin, J. Multilingual BERT readme document (Google Research, 2018).
Rogers, A. et al. BERT applications in natural language processing: a review. Artif. Intell. Rev. 58 (3), 1–58 (2025).
Wu, S. & Dredze, M. Are all languages created equal in multilingual BERT? Proceedings of the 5th Workshop on Representation Learning for NLP, 120–130. (2020).
Chen, X. & Cardie, C. Hierarchical mapping for crosslingual word embedding alignment. Trans. Association Comput. Linguistics. 8, 589–601 (2020).
Biesialska, M. & Costa-jussà, M. R. Refinement of unsupervised cross-lingual word embeddings. (2020). arXiv preprint arXiv:2002.09213.
Schuster, T., Schick, T. & Schütze, H. Cross-lingual alignment of contextual word embeddings, with applications to zero-shot dependency parsing. (2019). arXiv preprint arXiv:1902.09492.
Li, T., Sahu, A. K., Talwalkar, A. & Smith, V. A multi-agent reinforcement learning approach for efficient client selection in federated learning. Proceedings of the AAAI Conference on Artificial Intelligence, 36(7), 7091–7099. (2022).
Lozano, A. C. et al. Asynchronous consensus for multi-agent systems and its application to federated learning. Eng. Appl. Artif. Intell. 133, 108321 (2024).
Zhou, Y. et al. FedQMIX: Communication-efficient federated learning via multi-agent reinforcement learning. Inform. Fusion. 101, 101875 (2023).
Mishra, A. et al. Federated control with hierarchical multi-agent deep reinforcement learning (Google Research, 2023).
Yoon, T. et al. An innovative multi-agent approach for robust cyber–physical systems using vertical federated learning. Neurocomputing 589, 127686 (2024).
Abadi, M. et al. Deep learning with differential privacy. In Proceedings of the 2016 ACM SIGSAC conference on computer and communications security (pp. 308–318). (2016).
Ji, Z., Lipton, Z. C. & Elkan, C. Differential privacy and machine learning: a survey and review. (2014). arXiv preprint arXiv:1412.7584.
Yin, X., Zhu, Y. & Hu, J. A comprehensive survey of privacy-preserving federated learning: A taxonomy, review, and future directions. ACM Comput. Surveys. 54 (6), 1–36 (2021).
Wang, S. et al. Privacy preservation in federated learning: An insightful survey from the GDPR perspective. Computers Secur. 110, 102402 (2021).
Xu, R., Baracaldo, N., Zhou, Y., Anwar, A. & Ludwig, H. Privacy-preserving machine learning: Methods, challenges and directions. arXiv preprint arXiv :210804417. (2021).
Wu, Z. et al. A comprehensive survey on graph neural networks. IEEE Trans. Neural Networks Learn. Syst. 32 (1), 4–24 (2020).
Zhou, J. et al. Graph neural networks: A review of methods and applications. AI Open. 1, 57–81 (2021).
Wang, X. et al. Heterogeneous graph attention network. In The World Wide Web Conference (pp. 2022–2032). (2019).
Schlichtkrull, M. et al. Modeling relational data with graph convolutional networks. In European Semantic Web Conference (pp. 593–607). Springer, Cham. (2018). https://doi.org/10.1007/978-3-319-93417-4_38
Bahdanau, D., Cho, K. & Bengio, Y. Neural machine translation by jointly learning to align and translate. (2014). arXiv preprint arXiv:1409.0473.
Linmei, H., Yang, T., Shi, C., Ji, H. & Li, X. Heterogeneous graph attention networks for semi-supervised short text classification. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing (pp. 4821–4830). (2019).
Zhang, Y. et al. Hybrid-attention mechanism based heterogeneous graph representation learning. Expert Syst. Appl. 248, 123372 (2024).
Li, X. et al. Heterogeneous graph neural network with hierarchical attention for group-aware paper recommendation in scientific social networks. Knowl. Based Syst. 304, 112477 (2024).
Khan, A. et al. A review of graph neural networks: concepts, architectures, techniques, challenges, datasets, applications, and future directions. J. Big Data. 11 (1), 18 (2024).
Ye, F. et al. Federated learning-enabled cooperative localization in multi-agent system. Int. J. Wireless Inf. Networks. 31, 61–72 (2024).
Wang, H. et al. Multi-agent visualization for explaining federated learning. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence (IJCAI-19) (pp. 4572–4578). (2019).
Domingo-Ferrer, J., Sánchez, D. & Blanco-Justicia, A. A critical review on the use (and misuse) of differential privacy in machine learning. ACM Comput. Surveys. 55 (8), 1–16 (2022).
Baraheem, S. & Yao, Z. A survey on differential privacy with machine learning and future outlook. (2022). arXiv preprint arXiv:2211.10708.
Pan, K. et al. Differential privacy in deep learning: A literature survey. Knowl. Based Syst. 294, 111698 (2024).
Tang, J. et al. Learning with privacy at scale (Apple Machine Learning Research, 2017).
Yoon, T. & Loizou, N. Federated learning meets game theory: The next generation of AI multi-agent systems (Johns Hopkins University Department of Applied Mathematics and Statistics, 2025).
Saha, S., Hota, A., Chattopadhyay, A. K., Nag, A. & Nandi, S. A multifaceted survey on privacy preservation of federated learning: progress, challenges, and opportunities. Artif. Intell. Rev. 57, 184. https://doi.org/10.1007/s10462-024-10766-7 (2024).
Miah, M. S. U. et al. A multimodal approach to cross-lingual sentiment analysis with ensemble of transformer and LLM. Sci. Rep. 14 (1), 9603. https://doi.org/10.1038/s41598-024-60210-7 (2024).
Zhang, S. et al. Graph convolutional networks: a comprehensive review. Comput. Social Networks. 6 (1), 11 (2019).
Bing, R. et al. Heterogeneous graph neural networks analysis: a survey of techniques, evaluations and applications. Artif. Intell. Rev. 56, 8003–8042. https://doi.org/10.1007/s10462-022-10375-2 (2023).
Devlin, J., Chang, M. W., Lee, K. & Toutanova, K. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics (pp. 4171–4186). (2019).
Xu, R., Yang, Y., Liu, J. & Zhu, X. A survey of cross-lingual sentiment analysis: methodologies, models and evaluations. Data Sci. Eng. 7 (2), 172–193. https://doi.org/10.1007/s41019-022-00187-3 (2022).
Chen, M., Tian, Y., Yang, M. & Zaniolo, C. Multilingual knowledge graph embeddings for cross-lingual knowledge alignment. In Proceedings of the 26th International Joint Conference on Artificial Intelligence (pp. 1511–1517). (2017).
Yang, X., Yan, M., Pan, S., Ye, X. & Fan, D. Simple and efficient heterogeneous graph neural network. In Proceedings of the AAAI Conference on Artificial Intelligence, 37, 10816–10824. (2023).
Barros, C. D. T., Mendonça, M. R. F., Vieira, A. B. & Ziviani, A. A survey on embedding dynamic graphs. ACM Comput. Surveys. 55, 1–37. https://doi.org/10.1145/3483595 (2021).
Kamata, H. et al. Unveiling the spatial and temporal variation of customer sentiment in hotel experiences: a case study of Beppu City, Japan. Humanit. Social Sci. Commun. 11 (1), 1–15 (2024).
Hu, Z., Dong, Y., Wang, K. & Sun, Y. Heterogeneous graph transformer. In Proceedings of The Web Conference, 2704–2710. (2020). https://doi.org/10.1145/3366423.3380027
Kumar, A. et al. Sentiment analysis of hotel reviews - a comparative study. In 2023 IEEE International Conference on Contemporary Computing and Communications (InC4) (pp. 1–6). (2023).
Rakibullah, H. M. et al. Sentiment analysis of hotel reviews - performance evaluation of machine learning algorithms. Int. J. Eng. Res. Technol., 9(5). (2020).
Buhalis, D. et al. Artificial intelligence in tourism and hospitality: Bibliometric analysis and research agenda. Int. J. Contemp. Hospitality Manage. 34 (8), 2883–2917 (2022).
Ma, Y., Yan, N., Li, J., Mortazavi, M. & Chawla, N. V. HetGPT: harnessing the power of prompt tuning in pre-trained heterogeneous graph neural networks. (2024). arXiv preprint arXiv:2310.12580.
Nilashi, M. et al. Travelers decision making using online review in social network sites: A case on TripAdvisor. J. Comput. Sci. 28, 168–179. https://doi.org/10.1016/j.jocs.2018.09.006 (2018).
Valdivia, A., Luzón, M. V. & Herrera, F. Sentiment analysis in TripAdvisor. IEEE. Intell. Syst. 32 (4), 72–77. https://doi.org/10.1109/MIS.2017.3121555 (2017).
Gaschi, F., Boukhers, Z., Pulido, L. & Moens, M. F. Understanding cross-lingual alignment—A survey. arXiv preprint arXiv:2404.06228. (2024).
Li, Z., Fan, Y., Jiang, B., Lei, T. & Liu, W. A survey on sentiment analysis and opinion mining for social multimedia. Multimedia Tools Appl. 82 (3), 4271–4308. https://doi.org/10.1007/s11042-022-13428-4 (2023).
Ahuja, R. et al. A survey on sentiment analysis methods, applications, and challenges. Artif. Intell. Rev. 55 (7), 5731–5780 (2022).
Medhat, W., Hassan, A. & Korashy, H. Sentiment analysis algorithms and applications: A survey. Ain Shams Eng. J. 5 (4), 1093–1113. https://doi.org/10.1016/j.asej.2014.04.011 (2014).
Khattak, F. K. et al. A comprehensive survey of text classification techniques and their research applications: Observational and experimental insights. Inf. Process. Manag. 61 (5), 103481 (2024).
Wei, K. et al. Federated learning with differential privacy: Algorithms and performance analysis. IEEE Trans. Inf. Forensics Secur. 15, 3454–3469. https://doi.org/10.1109/TIFS.2020.2988575 (2020).
Sun, C., Huang, L. & Qiu, X. Utilizing BERT for aspect-based sentiment analysis via constructing auxiliary sentence. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers) (pp. 380–385). (2019). https://doi.org/10.18653/v1/N19-1035
Zhao, Y., Xu, S. & Duan, H. HGNN-BRFE: Heterogeneous graph neural network model based on region feature extraction. Electronics 13 (22), 4447. https://doi.org/10.3390/electronics13224447 (2024).
Ünal, E., Özdemir, A. & Yıldız, B. Developing a deep learning-based sentiment analysis system of hotel customer reviews for sustainable tourism. Sustainability 17 (13), 5756. https://doi.org/10.3390/su17135756 (2025).
Barbado, R., Araque, O. & Iglesias, C. A. A framework for fake review detection in online consumer electronics retailers. Inf. Process. Manag. 56 (4), 1234–1244. https://doi.org/10.1016/j.ipm.2019.03.002 (2019).
Dai, E. et al. A comprehensive survey on trustworthy graph neural networks: Privacy, robustness, fairness, and explainability. Mach. Intell. Res. 21, 1011–1061 (2024).
Mujahid, M. et al. Generalizing sentiment analysis: a review of progress, challenges, and emerging directions. Social Netw. Anal. Min. 15 (1), 1–29 (2025).
Zhao, W. X. et al. A survey of large language models. (2023). arXiv preprint arXiv:2303.18223.
Li, N., Qardaji, W., Su, D. & Cao, J. Privacy-preserving collaborative machine learning: A survey. IEEE Trans. Big Data. 9 (3), 847–865. https://doi.org/10.1109/TBDATA.2022.3206736 (2023).
Muennighoff, N. et al. Crosslingual generalization through multitask finetuning. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 15991–16111. Association for Computational Linguistics. (2023). https://doi.org/10.18653/v1/2023.acl-long.891
Hu, E. J. et al. LoRA: Low-rank adaptation of large language models. In International Conference on Learning Representations. https://openreview.net/forum?id=nZeVKeeFYf9 (2022).
Bourtoule, L. et al. Machine unlearning. In 2021 IEEE Symposium on Security and Privacy (SP), 141–159. IEEE. (2021). https://doi.org/10.1109/SP40001.2021.00019
Bradford, A. The Brussels Effect: How the European Union Rules the World (Oxford University Press, 2020). https://doi.org/10.1093/oso/9780190088583.001.0001
European Commission. Regulation (EU) 2024/1689 of the European Parliament and of the Council of 13 June 2024 laying down harmonised rules on artificial intelligence (Artificial Intelligence Act). Official Journal of the European Union, L series, 2024/1689. (2024). https://eur-lex.europa.eu/eli/reg/2024/1689/oj
Funding
No funding was received for this research.
Author information
Authors and Affiliations
Contributions
XH conceived and designed the study, developed the multi-agent federated learning framework and heterogeneous graph attention network architecture, implemented the dynamic reputation management system, conducted the experimental evaluation and data analysis, and wrote the manuscript. XH is responsible for the overall research design, methodology development, result interpretation, and manuscript preparation. The author read and approved the final manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Conflict of interest
The authors declare that they have no competing interests or conflicts of interest regarding the publication of this research.
Ethics approval
This study was conducted in accordance with ethical guidelines for computational research involving user-generated content. The research protocol was reviewed and approved by the Institutional Review Board of Qingdao Vocational and Technical College of Hotel Management (Ethics Approval Number: QVTHM-2024-CS-047). All hotel review data used in this study consisted of publicly available information from commercial review platforms. Data collection procedures followed platform terms of service and applicable data protection regulations. Personal identifying information was removed during preprocessing, and all data was anonymized prior to analysis. The federated learning framework was designed to ensure privacy preservation and comply with GDPR and other international data protection standards.
Clinical Trial Number
Not applicable.
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary Information
Below is the link to the electronic supplementary material.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Han, X. Cross-language hotel review sentiment analysis via multi-agent federated learning with heterogeneous graph attention networks. Sci Rep (2026). https://doi.org/10.1038/s41598-026-41500-8
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41598-026-41500-8