journal article·2025-09-15Open access

Unlocking visitor experiences in cultural heritage sites with SHAP-interpretable AI and social media sentiment analysis

Wei Chen, Kai Zhou, Bin Hu, Yujie Yang, Yaru Xu, Deji Zhuoma, Ruisi Zhu, Yu Yang, Jucan Pan

npj Heritage Science· Volume 13· Issue 1

Abstract

This study proposes an AI-driven framework to assess visitor perceptions in historic urban areas using social media data. Unlike traditional models (e.g., XGBoost), our cascaded Aspect-Based Sentiment Analysis (ABSA) with BO-DXGBoost significantly improves prediction accuracy and interpretability. The two-stage system first classifies aspects (service quality) and then analyzes sentiment polarity and intensity, addressing class imbalance via ADASYN and RF-SMOTE. SHAP analysis visualizes feature impacts, while finer-grained interpretability is achieved by decomposing “spatial satisfaction” into 26 secondary indicators, surpassing existing coarse-grained approaches. This framework offers nuanced, data-driven insights into visitor satisfaction, supporting sustainable cultural heritage management and adaptive urban planning. By leveraging social media sentiment, it bridges the gap between big data analytics and heritage studies, enabling scalable, practical monitoring of visitor experiences in complex historic contexts.
Source: openalex_inverted_index · Quality: baseline

Research context

OpenAlex topics: Diverse Aspects of Tourism Research · Digital Marketing and Social Media · Halal products and consumer behavior

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

References (49)

Show source-provided references
1. Cao, Z., Xu, H. & Teo, B. S.-X. Sentiment of Chinese tourists towards Malaysian cultural heritage based on online travel reviews. Sustainability 15, 3478 (2023).10.3390/su15043478 ↗
2. Jia, M., Feng, J., Chen, Y. & Zhao, C. Visual analysis of social media data on experiences at a world heritage tourist destination: historic centre of Macau. Buildings 14, 2188 (2024).10.3390/buildings14072188 ↗
3. Antonio, N., Correia, M. B. & Ribeiro, F. P. Exploring user-generated content for improving destination knowledge: the case of two world heritage cities. Sustainability 12, 9654 (2020).10.3390/su12229654 ↗
4. Rosley, M. S. F. et al. From Urban heritage resources: social media analytics of Johor Bahru tourists’ experience and motivation for exploring heritage buildings. Asia Pac. J. Tour. Res. 29, 1113–1132 (2024).10.1080/10941665.2024.2379285 ↗
5. Wang, J., Fan, W. & You, J. Evaluation of tourism elements in historical and cultural blocks using machine learning: a case study of Taiping Street in Hunan Province. npj Herit. Sci. 13, 30 (2025).10.1038/s40494-025-01641-x ↗
6. Surugiu, C., Surugiu, M.-R. & Grădinaru, C. Targeting creativity through sentiment analysis: a survey on Bucharest city tourism. SAGE Open 13, 21582440231167346 (2023).10.1177/21582440231167346 ↗
7. Karayazi, S. S., Dane, G. & Arentze, T. Analyzing the influence of visitor types on location choices and revisit intentions in urban heritage destinations. ISPRS Int. J. Geo Inf. 13, 115 (2024).10.3390/ijgi13040115 ↗
8. Foroughi, M., de Andrade, B. & Roders, A. P. Capturing public voices: the role of social media in heritage management. Habitat Int. 142, 102934 (2023).10.1016/j.habitatint.2023.102934 ↗
9. Van der Zee, E., Bertocchi, D. & Vanneste, D. Distribution of tourists within urban heritage destinations: a hot spot/cold spot analysis of TripAdvisor data as support for destination management. Curr. Issues Tour. 23, 175–196 (2020).10.1080/13683500.2018.1491955 ↗
10. Qiu, B. et al. Construction of urban collective memory maps based on social media data: a case study of Nanjing, China. npj Herit. Sci. 13, 259 (2025).10.1038/s40494-025-01806-8 ↗
11. Solso, R. L., MacLin, M. K. & MacLin, O. H. Cognitive psychology. (Pearson Education New Zealand, 2005).
12. Garner, W. R., Hake, H. W. & Eriksen, C. W. Operationism and the concept of perception. Psychol. Rev. 63, 149 (1956).10.1037/h0042992 ↗
13. Merleau-Ponty, M., Landes, D., Carman, T. & Lefort, C. Phenomenology of perception. (Routledge, 2013).10.4324/9780203720714 ↗
14. Merleau-Ponty, M. The world of perception. (Routledge, 2004).10.4324/9780203491829 ↗
15. Alrawadieh, Z., Alrawadieh, Z. & Kozak, M. Exploring the impact of tourist harassment on destination image, tourist expenditure, and destination loyalty. Tour. Manag. 73, 13–20 (2019).10.1016/j.tourman.2019.01.015 ↗
16. Avrami, E. In Conservation (eds A. Richmond & A. Bracker) 16, 177–183 (Routledge, 2010).
17. Xia, R., Genovese, P. V., Li, Z. & Zhao, Y. Analyzing spatiotemporal features of Suzhou’s old canal city: an optimized composite space syntax model based on multifaceted historical-modern data. Herit. Sci. 12, 391 (2024).10.1186/s40494-024-01499-5 ↗
18. Long, B. in Encyclopedia of global archaeology. 3975–3979 (Springer, 2014).10.1007/978-1-4419-0465-2_1034 ↗
19. Zhang, S., Wei, Z., Wang, Y. & Liao, T. Sentiment analysis of Chinese micro-blog text based on extended sentiment dictionary. Futur. Gener. Comp. Syst. 81, 395–403 (2018).10.1016/j.future.2017.09.048 ↗
20. Jiao, J. & Zhou, Y. Sentiment polarity analysis based multi-dictionary. Phys. Procedia 22, 590–596 (2011).10.1016/j.phpro.2011.11.091 ↗
21. Brandão, J. G. et al. Optimization of machine learning models for sentiment analysis in social media. Inf. Sci. 694, 121704 (2025).10.1016/j.ins.2024.121704 ↗
22. Alsemaree, O., Alam, A. S., Gill, S. S. & Uhlig, S. Sentiment analysis of Arabic social media texts: a machine learning approach to deciphering customer perceptions. Heliyon 10, e27863 (2024).10.1016/j.heliyon.2024.e27863 ↗
23. Mehra, P. Unexpected surprise: Emotion analysis and aspect based sentiment analysis (ABSA) of user generated comments to study behavioral intentions of tourists. Tour. Manag. Perspect. 45, 101063 (2023).
24. Hasan, M., Ghani, M. R. & Hasan, K. A. Aspect based sentiment analysis datasets for Bangla text. Data Brief. 57, 111107 (2024).10.1016/j.dib.2024.111107 ↗
25. Ekbal, A. Quality achhi hai (is good), satisfied! Towards aspect based sentiment analysis in code-mixed language. Comput. Speech Lang. 89, 101668 (2025).10.1016/j.csl.2024.101668 ↗
26. Chauhan, A., Sharma, A. & Mohana, R. A pre-trained model for aspect-based sentiment analysis task: using online social networking. Procedia Comput. Sci. 233, 35–44 (2024).10.1016/j.procs.2024.03.193 ↗
27. Zhou, S. et al. Revealing public attitudes toward mobile cabin hospitals during Covid-19 pandemic: Sentiment and topic analyses using social media data in China. Sust. Cities Soc. 107, 105440 (2024).10.1016/j.scs.2024.105440 ↗
28. Li, S. & Chen, J. Virtual human on social media: text mining and sentiment analysis. Technol. Soc. 78, 102666 (2024).10.1016/j.techsoc.2024.102666 ↗
29. Alturayeif, N. & Ahmad, I. EASE: an enhanced active learning framework for aspect-based sentiment analysis based on sample diversity and data augmentation. Expert Syst. Appl. 261, 125525 (2025).10.1016/j.eswa.2024.125525 ↗
30. Siino, M., Tinnirello, I. & La Cascia, M. Is text preprocessing still worth the time? A comparative survey on the influence of popular preprocessing methods on Transformers and traditional classifiers. Inf. Syst. 121, 102342 (2024).10.1016/j.is.2023.102342 ↗
31. Patil, H. B. & Patil, A. S. Evaluating the effect of preprocessing tools for Marathi text retrieval. Procedia Comput. Sci. 233, 902–908 (2024).10.1016/j.procs.2024.03.279 ↗
32. Zhou, J. et al. Investigating response behavior through TF-IDF and Word2vec text analysis: A case study of PISA 2012 problem-solving process data. Heliyon 10, e35945 (2024).10.1016/j.heliyon.2024.e35945 ↗
33. Chen, L.-C. An extended TF-IDF method for improving keyword extraction in traditional corpus-based research: an example of a climate change corpus. Data Knowl. Eng. 153, 102322 (2024).10.1016/j.datak.2024.102322 ↗
34. Matharaarachchi, S., Domaratzki, M. & Muthukumarana, S. Enhancing SMOTE for imbalanced data with abnormal minority instances. Mach. Learn. Appl. 18, 100597 (2024).
35. Liaw, L. C. M., Tan, S. C., Goh, P. Y. & Lim, C. P. A histogram SMOTE-based sampling algorithm with incremental learning for imbalanced data classification. Inf. Sci. 686, 121193 (2025).10.1016/j.ins.2024.121193 ↗
36. Huang, J. et al. Deciphering decision-making mechanisms for the susceptibility of different slope geohazards: a case study on a SMOTE-RF-SHAP hybrid model. J. Rock. Mech. Geotech. Eng. 17, 1612–1630 (2025).10.1016/j.jrmge.2024.03.008 ↗
37. Zeng, Q. et al. Measuring cyclists’ subjective perceptions of the street riding environment using K-means SMOTE-RF model and street view imagery. Int. J. Appl. Earth Obs. Geoinf. 128, 103739 (2024).
38. Elamrani et al. A human-in-the-loop ensemble fusion framework for road crash prediction: coping with imbalanced heterogeneous data from the driver-vehicle-environment system. Transp. Lett. 17, 827–843 (2025).10.1080/19427867.2024.2392063 ↗
39. Georganos, S. et al. Very high resolution object-based land use–land cover urban classification using extreme gradient boosting. IEEE Geosci. Remote Sens. Lett. 15, 607–611 (2018).10.1109/LGRS.2018.2803259 ↗
40. Chen, T. & Guestrin, C. In Proceedings of the 22nd acm sigkdd international conference on knowledge discovery and data mining.785-794 (Association for Computing Machinery, 2016).10.1145/2939672.2939785 ↗
41. Zhang, F. et al. EVFeX: An efficient vertical federated XGBoost algorithm based on optimized secure matrix multiplication. Signal Process 227, 109686 (2025).10.1016/j.sigpro.2024.109686 ↗
42. Situ, Z. et al. Improving urban flood prediction using LSTM-DeepLabv3+ and Bayesian optimization with spatiotemporal feature fusion. J. Hydrol. 630, 130743 (2024).10.1016/j.jhydrol.2024.130743 ↗
43. Lei, X., Feng, R., Dong, Y. & Zhai, C. Bayesian-optimized interpretable surrogate model for seismic demand prediction of urban highway bridges. Eng. Struct. 301, 117307 (2024).10.1016/j.engstruct.2023.117307 ↗
44. Zhu, S., Yan, Y., Zhao, B. & Wang, H. Assessing the impact of adjacent urban morphology on street temperature: A multisource analysis using random forest and SHAP. Build. Environ. 267, 112326 (2025).10.1016/j.buildenv.2024.112326 ↗
45. Yang, C. et al. How can SHAP (SHapley Additive exPlanations) interpretations improve deep learning based urban cellular automata model? Comput. Environ. Urban Syst. 111, 102133 (2024).10.1016/j.compenvurbsys.2024.102133 ↗
46. Yuan, Y., Guo, W., Tang, S. & Zhang, J. Effects of patterns of urban green-blue landscape on carbon sequestration using XGBoost-SHAP model. J. Clean. Prod. 476, 143640 (2024).10.1016/j.jclepro.2024.143640 ↗
47. Vahidnia, M. H. Meta ensemble learning in geospatial sentiment analysis and community survey mapping: a water supply case study. Earth Sci. Inform. 17, 3233–3252 (2024).10.1007/s12145-024-01345-z ↗
48. Turner, M. UNESCO Recommendation on the Historic Urban Landscape¹. Underst. Herit. 1, 77 (2013).10.1515/9783110308389.77 ↗
49. WHITRAP & Ballarat, C. o. The HUL Guidebook: Managing Heritage in Dynamic and Constantly Changing Urban Environments, https://unesdoc.unesco.org/ark:/48223/pf0000259684 (2016).