Nonlinear relationship and spatial heterogeneity between built environment and residents' sentiments: A comprehensive framework integrating multimodal data with AI | 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 Nonlinear relationship and spatial heterogeneity between built environment and residents' sentiments: A comprehensive framework integrating multimodal data with AI Wanshu Wu, Yang Zhou, Huan Yu, Xinyi Niu, Yu Gao This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-7821458/v1 This work is licensed under a CC BY 4.0 License Status: Under Review Version 1 posted 14 You are reading this latest preprint version Abstract The impact of built environment on residents’ sentiments is a critical concern. This study integrates multiple AI models, including Large Language Model (LLM), Pyramid Scene Parsing Network (PSPNet), eXtreme Gradient Boosting (XGBoost), SHapley Additive exPlanations (SHAP), Geographically Weighted Regression (GWR), and automatic clustering models, to establish an environment-emotion framework for analyzing the nonlinear relationships and spatial heterogeneity between the built environment and residents' sentiments. LLMs are used to analyze social media data, revealing the spatial distribution characteristics of residents' sentiments. Multimodal data are combined with PSPNet models and spatial econometric models to measure the characteristics of the built environment. The nonlinear relationships and spatial heterogeneity between the built environment and residents' sentiments are uncovered through XGBoost, SHAP and GWR models. Automatic clustering method is employed to select typical cases to examine how spatial heterogeneity influences the nonlinear and interaction effects. The findings reveal that the relationships between built environment and residents’ sentiments exhibited complex nonlinear patterns, with threshold effects observed for specific indicators. Inter-element interactions demonstrated context-dependent synergies or antagonisms. And the influence of built environment on residents’ sentiments varied significantly across spatial contexts. Moreover, identical built environment exerted divergent effects on residents’ sentiments due to spatial heterogeneity in nonlinear relationships. This study constructs a comprehensive framework integrating multimodal data with AI and offers actionable insights for urban livability enhancement. The findings contribute to an understanding of how built environment might be effectively optimized to improve residents’ sentiments in urban areas, which deepens the action mechanism and implementation pathways through which AI technology empowers sustainable development planning. Scientific community and society/Geography Social science/Geography Physical sciences/Mathematics and computing Residents’ sentiment Built environment Artificial intelligence Nonlinear relationship Spatial heterogeneity Figures Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 Figure 8 Figure 9 Figure 10 Figure 11 Figure 12 Figure 13 Figure 14 1 Introduction The United Nations adopted the 2030 Agenda for Sustainable Development in 2015, which proposed 17 Sustainable Development Goals (SDGs), which not only focus on environmental protection, economic growth and social equity, but also emphasize the importance of human well-being and social health. Residents' sentiments, as an important aspect of social health, are closely related to these goals. Residents' sentiments are humans' subjective reactions to the objective environment, exert profound influences on psychological well-being, social behavior, and quality of life. A seminal study has demonstrated that positive emotional states foster social cohesion and productivity, while chronic negative sentiments may trigger anxiety or depressive disorders (Feng et al., 2012). Therefore, identifying and quantifying residents' sentiments is crucial to improving social well-being and promoting sustainable development. Although traditional sentiment analysis methods have achieved certain results, they are often limited by the amount of data and the depth of analysis. Artificial intelligence (AI) has become a revolutionary technology with the potential to revolutionize sustainable development planning and implementation. It plays a key role in sustainable urban development. As a branch of AI, large language models provide a powerful tool for in-depth mining and analysis of residents' sentiments. As the physical substrate of daily life, the built environment shapes residents' emotional states through multifaceted factors, including building density, functional diversity, transportation accessibility, and green infrastructure (Song et al., 2024). A compelling case was made by He et al. (2024) which leveraged Twitter data to demonstrate that areas with high population density, characterized by mixed land use and visually rich streetscapes, exhibited more positive public sentiment. Concurrently, Chen et al. (2022) employed street-view imagery and machine learning algorithms to establish a robust positive correlation between street greenery visibility and emotional pleasantness. Notably, existing literature presents conflicting conclusions that merit critical scrutiny. For example, Zhou et al. (2024) reported an inverse relationship between building density and emotional pleasantness during outdoor activities like running, whereas Wenning et al. (2023) posited that high-rise architectures could enhance positive sentiments by offering panoramic views. Discrepancies also emerge in studies on functional diversity: Tse and Tung (2022) found that commercial-residential mixing in historic districts dampened residents' emotional well-being due to tourist-induced disturbances, while Su et al. (2025) observed that moderate functional mixing effectively alleviated emotional stress. These inconsistencies underscore a critical gap: the lack of systematic theoretical frameworks and mechanistic explanations, which in turn hinders the development of targeted interventions to optimize emotional well-being through built environment modifications. Recent studies have employed multi-source data—including questionnaires, social media texts, and street-view imagery—coupled with linear regression or machine learning algorithms to examine the associations between built environment attributes and emotional responses (Chen et al., 2024). Notable advancements include the use of Twitter-derived mental health indices and Large Language Model (LLM)-based sentiment lexicons to quantify spatial sentimental patterns (Park et al., 2024), as well as the application of the eXtreme Gradient Boosting (XGBoost) model to identify threshold effects of built environment factors on elderly travelers' emotional states (Wang et al., 2021). However, critical limitations in data and methodology persist: firstly, overreliance on small-scale surveys or static geographic datasets, which disregard spatiotemporal dynamics in emotional experiences (Conzo et al., 2021); secondly, linear modeling assumptions that fail to capture threshold effects and non-trivial interactions among environmental elements (Guo et al., 2025; Heng et al., 2021); thirdly, inadequate consideration of spatial heterogeneity, a constraint that severely limits the generalizability of findings across diverse urban contexts (Ma et al., 2021; Liu et al., 2024). These gaps not only hinder the mechanistic understanding of environment-sentiment relationships but also compromise the translational utility of research findings for evidence-based urban planning. To bridge these research gaps, this study integrates multimodal data with social media analytics, employing the Chinese-RoBERTa-wwm-ext model for semantic understanding and semantic segmentation techniques for spatial feature extraction. Innovatively combining the Extreme Gradient Boosting (XGBoost) model, SHapley Additive exPlanations (SHAP) interpreters, and Geographically Weighted Regression (GWR), this study aims to unravel the nonlinear relationships and spatial heterogeneity in the associations between built environment attributes and residents' emotional responses. The contributions of this study are threefold: first, overcoming traditional data constraints by leveraging Weibo data and high-resolution geographic big data to capture spatiotemporal dynamics in emotional experiences; second, advancing analytical rigor through the integration of Large Language Models (LLMs) and machine learning, enabling nuanced sentiment analysis and nonlinear pattern recognition; third, incorporating geospatial contextualization to decode the threshold effects and spatially varying interdependencies between built environment elements and emotional well-being. This paper is structured and organized as follows. Section 2 provides a literature review. Section 3 lists the necessary data sets and discusses the measurement of variables as well as the adopted methodology. The results are described in Section 4 . Section 5 offers discussions on this study and concluding remarks. 2 Research overview 2.1 Connotation and measurement of residents' sentiments Sentiment encompasses the full spectrum of subjective cognitive experiences (He et al., 2020), encapsulating both individuals' attitudinal reactions to external stimuli and the corresponding behavioral manifestations (Zhang et al., 2020). In urban settings, the emotional responses that arise from residents' daily activities are collectively defined as residents’ sentiments (Bi and Gu, 2024). Traditional investigations into residents' sentiments predominantly rely on manual surveys (Pang et al., 2020; Strohbehn et al., 2020). The measurement toolkit spans a diverse range of techniques, including health scale assessments, wearable device monitoring, in-depth interviews, and experimental simulations (Baba et al., 2021; Lee et al., 2019; Ma et al., 2024). For instance, Cao et al. (2024) utilized the Positive and Negative Affect Schedule (PANAS) scale and the perceived restrictiveness scale (PRS) to derive psychological indicators, examining how specific greenway environmental features influence resident sentimental and psychological well-being. Xiang et al. (2021) leveraged wearable devices to conduct real-time tracking of heart rate variability and galvanic skin response, thereby quantifying the emotional stress levels of pedestrians in Hong Kong's high-density urban environments. However, interviews and surveys are inherently susceptible to subjective biases, posing challenges for ensuring data consistency and scalability (Conzo et al., 2021). Currently, with the widespread use of the mobile internet, a growing number of studies have attempted to adopt social media data and Natural Language Processing (NLP) technologies to conduct refined mining and analysis of residents' sentiments on a larger scale (Arora et al., 2022; Han et al., 2022). NLP technologies mainly include methods based on machine learning and deep learning. Machine learning refers to the use of methods such as support vector machines (SVM) and naive Bayes for text analysis, which tends to ignore the order of words and fails to represent the semantics of sentences and contextual relevant information (Gao et al., 2022). Deep learning mainly employs models like Bidirectional Encoder Representation from Transformers (BERT) and Long Short-Term Memory networks (LSTM)-Convolutional Neural Networks (CNN) models for sentiment scoring (Li et al., 2023). LLM is a typical application of this method (Chen et al., 2024). The approach relies on abstract features, thereby reducing the work of manual feature extraction. Moreover, it can simulate the connections between words and possesses the capabilities of local feature abstraction and memory. For instance, Guo et al. (2022) harnessed Weibo text data to analyze residents' negative emotions during the COVID-19 pandemic in Beijing. By applying a Long Short-Term Memory (LSTM) model to extract sentiment polarity indexes, they obtained scores quantifying positive and negative sentiment intensities. This paradigm overcomes traditional constraints in data volume, quality, and analytical flexibility, demonstrating distinct advantages for capturing dynamic emotional patterns (Zhang et al., 2024). 2.2 Connotation and measurement of built environment The built environment is defined as the aggregate of human-constructed physical spaces that shape daily life, encompassing architectural structures, transportation networks, green spaces, and urban infrastructure (Hills et al.,2019). Ewing and Cervero’s seminal "5D" framework—comprising density, diversity, design, destination accessibility, and distance to transit—has become a foundational model for quantifying its characteristics (Ewing and Cervero, 2010). Building on this, recent studies have leveraged street-view imagery and machine learning: deep convolutional neural networks, for instance, have been used to identify seven categories of built environment elements and quantify their frequency and spatial distribution at the street-segment level (Hipp et al., 2022). Other research has integrated satellite remote sensing with geographic big data, employing atmospheric correction, spatiotemporal alignment, and grid processing to derive 2D and 3D classified indicators of the built environment (Yi et al., 2025). As both the physical substrate and emotional landscape of urban life, the built environment acts as a critical determinant of residents' emotional states. Well-designed environments can foster positive sentiments through multiple mechanisms (Feng and Li, 2025), whereas contemporary urbanization patterns—marked by excessive building density, discontinuous streetscapes, and insufficient green infrastructure—pose risks to emotional health. Prolonged exposure to such suboptimal environments has been linked to emotional disorders, underscoring the urgent need to prioritize built environment optimization. This endeavor holds the potential to simultaneously enhance emotional well-being, promote mental health, and advance sustainable urban development. 2.3 Nonlinear relationship between built environment and residents' sentiments Previous research has predominantly focused on the linear associations between the built environment and residents' emotional states. For instance, Hills et al. (2019) found a positive correlation between urban green space ratio, pedestrian-friendliness, and residents' perceived pleasantness. Some studies argued that urban amenities significantly boost positive emotional responses in residents (Heng et al., 2021). Additionally, Rundle et al. (2007) concluded that high-density building development directly elevates residents' stress levels. In contrast, investigations into the nonlinear relationships between the built environment and residents' sentiments remain in the nascent stage. A recent study by Chen et al. (2024) employed the XGBoost model to explore the nonlinear associations between the built environment of traditional villages and tourists' positive emotions. The findings revealed an optimal green coverage interval of 15–25%, beyond which the positive emotional response diminishes as green coverage increases. This research offers valuable insights for studies focusing on urban residents' emotional well-being in relation to the built environment. The XGBoost model, an advanced variant of Gradient Boosted Decision Trees (GBDT), outperforms traditional nonlinear regression methods in terms of prediction accuracy and generalization ability. It dynamically adjusts the weights of predictor variables through iterative learning and mitigates multicollinearity issues by explicitly accounting for interactions among variables (Wang et al., 2022). However, its "black-box" nature poses challenges: the decision-making process lacks transparency, and the results often suffer from low interpretability and credibility. To address this limitation, Lundberg and Lee (2017) introduced SHapley Additive exPlanations (SHAP), a widely adopted interpretive framework that quantifies the contribution of individual features to prediction outcomes. This approach enhances model transparency, enabling researchers to decipher complex nonlinear relationships and has proven instrumental in diverse fields exploring nonlinear relationships. 2.4 Spatial heterogeneity of built environment’s impact on residents' sentiments Recent research has underscored the pronounced spatial heterogeneity in how the built environment influences residents’ emotional states. For example, Ma et al. (2021) employed Geographically Weighted Regression (GWR) to analyze sentimental patterns in Wuhan, identifying land use structure and road network density as pivotal factors shaping the spatial distribution of positive emotions. Liu et al. (2024) further validated these spatial variations through multiscale GWR analyses, particularly highlighting distinct patterns in high-density urban zones. However, a critical research gap persists: few studies have concurrently explored the spatial heterogeneity of built environment–sentiment associations and their underlying nonlinear dynamics. Given that spatial heterogeneity directly informs the design and implementation of urban optimization strategies, an integrated investigation of these two dimensions is imperative for evidence-based decision-making. This study addresses this gap by integrating Weibo data with multimodal data to examine spatial heterogeneity in Qingdao, China. By combining XGBoost modeling with SHAP (SHapley Additive exPlanations) for interpretability, this study aims to uncover nonlinear relationships and interaction effects between built environment attributes and residents' sentiments. The resulting insights will offer targeted strategies to address urban emotional health challenges and advance sustainable urban development. 3 Research design 3.1 Study area Qingdao, a prominent coastal city located on the southern Shandong Peninsula, serves as a key economic hub and international gateway in northern China (Fig. 1 ). Its unique administrative significance and comprehensive development advantages are rooted in a complex historical trajectory, including late 19th to early 20th century colonial influences from Germany and Japan. This historical backdrop has fostered a multicultural urban landscape characterized by a rich built environment—an eclectic blend of colonial-era architecture, modern infrastructure, and diverse cultural spaces. As documented in China's seventh national population census, the city's demographic structure is marked by gender balance, a multi-generational age distribution, high population density, and occupational diversity. Rapid urbanization has intensified developmental pressures, creating a spatial mosaic of historic and contemporary urban districts. This environmental complexity, combined with accelerating urban lifestyles, subjects residents to elevated social and psychological stressors that may modulate their emotional states. Qingdao's heterogeneous urban fabric thus provides an ideal research setting for investigating how built environments influence emotional well-being. The city's diverse built environment elements offer robust spatial data for analysis, while its multifaceted population ensures representative sampling—attributes that enhance the generalizability and practical relevance of this study's findings. Note These maps are from China’s Standard Map Service System. 3.2 Research Framework The research framework of this study is shown in Fig. 2 . We collected and processed residents' sentiments data from Sina Weibo alongside comprehensive built environment metrics to establish explanatory and response variables. Then employing R, Python, and ArcGIS platforms, we applied both XGBoost and GWR analyses to examine spatial variations in environmental effects, nonlinear relationships, and interaction patterns between built environment factors. Finally, we integrated these spatial and nonlinear findings to identify Typical samples for in-depth investigation of built environment impacts on residents' sentiments. 3.3 Data 3.3.1 Sina Weibo text data As China’s leading microblogging platform, Sina Weibo provides geotagged user-generated content that captures real-time snapshots of daily activities, experiences, and emotional expressions. Using web crawling techniques, we collected geolocated Weibo posts in Qingdao from November 2023 to October 2024, amassing over 166,865 original entries. Each record included user demographic attributes, spatiotemporal metadata, engagement metrics, and unstructured text content. After rigorous data cleaning—including the removal of advertisements, spam, and non-semantic posts—over 150,794 high-quality texts remained, suitable for in-depth analysis of residents' emotional states. These georeferenced data points were then aggregated and processed in ArcGIS to establish neighborhood-level analysis units, enabling spatial sentiment mapping at the community scale. 3.3.2 Street-view imagery data Baidu Maps, one of China's premier digital mapping services, boasts a massive user base and delivers highly accurate, frequently updated geographic data. To characterize Qingdao's built environment, we systematically sampled the urban landscape by generating 726,631 geospatial points at 30-meter intervals, yielding 123,188 Baidu Street View images from 2024 (each with a resolution of 2048×664 pixels). Following rigorous quality control—including image validation and removal of transient elements like vehicles—we employed semantic segmentation using a pretrained PSPNet model. As illustrated in Fig. 3 , this deep convolutional neural network, trained on the ADE20K dataset, identifies 150 object categories (e.g., buildings, vegetation, urban infrastructure). The segmentation results enabled quantitative measurement of key streetscape features including pedestrian space allocation, visual permeability through interface transparency, and environmental exposure indices for sky and greenery visibility. 3.3.3 Point of Interest (POI) data We acquired over 420,000 POI records in Qingdao for 2024 through the Baidu Map API, followed by rigorous quality control: coordinate calibration, name standardization, and removal of duplicate or outdated entries. The refined dataset is categorized into ten functional groups: shopping centers, food services, commercial facilities, daily living services, leisure and entertainment venues, tourist attractions, hotels, transportation hubs, educational institutions, and medical centers. 3.3.4 Building footprints data Three complementary datasets were collected via the Baidu Map API in 2024. The building outline dataset underwent rigorous validation using satellite imagery and street-view photographs to rectify positional deviations and remove records of demolished structures. Following filtering by functional type and exclusion of temporary constructions, 2,230,360 validated building records were retained, each containing detailed geometric parameters (e.g., footprint area, perimeter) and dimensional attributes (e.g., height, floor count). 3.3.5 Transportation data Transportation data for Qingdao was acquired via the Baidu Map API in 2024. Road network datasets underwent topological processing to resolve connectivity inconsistencies, followed by classification into hierarchical road types (e.g., expressways, arterials, local streets). After excluding elevated highways and tunnels, the refined road network comprised 8,562 valid road segments. Transportation infrastructure data—including 172 subway stations and 9,154 bus stops within the municipal boundary—was manually validated against official route maps to ensure spatial accuracy. 3.3.6 Urban greening data Urban green space boundaries (parks, public green areas) in Qingdao for 2024 were acquired via the Baidu Map API, with entrance locations manually validated using integrated Baidu Map interfaces and street-view imagery. To quantify vegetation characteristics, 2023 remote sensing data from the Geospatial Data Cloud was utilized to derive the Normalized Difference Vegetation Index (NDVI). ArcGIS was employed to perform cloud removal on the NDVI raster dataset, followed by masking non-vegetated areas (NDVI ≤ 0) to exclude outliers from subsequent analyses. 3.3.7 Population demographic data Street-level demographic statistics from China's seventh national population census were integrated with Qingdao's administrative boundary data using ArcGIS. Through spatial linkage analysis, population metrics were reconciled with township-level boundaries, involving toponymic standardization to resolve geographical discrepancies. This spatial matching process enabled the precise calculation of population density indices for each neighborhood-level analysis unit, furnishing critical demographic controls for analyzing residents’ emotional patterns across diverse built environment contexts. 3.4 Variables 3.4.1 Spatial unit division The 15-minute community life circle concept defines the basic activity radius for residents' daily needs and emotional experiences, serving as the fundamental spatial scale for investigating built environment–sentiment associations. In this study, ArcGIS was used to generate 15-minute community life circles as service areas through network analysis. Using Qingdao's road infrastructure as the transport network, neighborhood centroids as facility nodes, and a 15-minute travel time as the impedance threshold, we derived 2,902 spatial units. This approach ensures that each unit captures the functional connectivity and mobility patterns relevant to residents' daily sentimental experiences. 3.4.2 Explained variables For sentiment detection in Weibo texts, we employed the Chinese-RoBERTa-wwm-ext model, an advanced BERT variant leveraging bidirectional Transformer architecture (analysis process outlined in Fig. 4 ). Distinct from conventional unidirectional models, this approach processes contextual information in both forward and backward directions, enabling nuanced interpretation of textual emotions (Wenning et al., 2023). The model's superior contextual comprehension allows for accurate extraction of residents' sentiments indicators from social media discourse. To enhance sentiment classification accuracy, the model structure was optimized by replacing the traditional Linear Layer with a Gate Recurrent Unit (GRU) as the output layer. The SMP2020 Weibo Sentiment Classification Evaluation dataset—rich in labeled samples—was employed for training, randomly split into training/validation/test sets at an 8:1:1 ratio. Auxiliary data were integrated into the training set to expand the model’s semantic understanding and emotional recognition capabilities. During training, model parameters were iteratively updated using the Cross Entropy Loss Function (CELF) over ~ 40 epochs until loss convergence and validation set performance stabilization, yielding a transfer-learning Weibo sentiment model. Evaluation metrics demonstrated strong performance: accuracy of 0.9025, precision of 0.9045, recall of 0.900, and F1-score of 0.9023, meeting subsequent prediction requirements. Comparison experiments with two mainstream pre-training models—Roberta-wwm-ext-large and Baidu's open-source ERNIE 3.0—validated model superiority. Roberta-wwm-ext-large achieved 0.89 precision, while ERNIE 3.0 reached 0.82, both below the Chinese-RoBERTa-wwm-ext model's performance. The final model outputs probabilities of positive/negative sentiments (ranging from 0 to 1), serving as sentiment scores for subsequent analysis. The sentiment analysis results were mapped in ArcGIS (Fig. 5 ). Warmer colors indicate positive sentiment, while cooler colors denote negative sentiment. Urban cores and coastal areas show predominantly warm hues, reflecting higher emotional levels. In contrast, fringe areas exhibit cooler tones, suggesting lower sentiment scores. 3.4.3 Explanatory variables Drawing on the established "5D" framework (Ewing and Cervero, 2010) and Qingdao's unique urban characteristics, we developed a comprehensive set of built environment metrics. Table 1 details the indicator categories and measurement methods. Table 1 Built environment indicators and measurement methods Category Variable Data source Measurement method Density Plot ratio Building footprints Ratio of Gross floor area to living area Building density Building footprints Ratio of ground floor area to living area Population density Population Ratio of the population of the street to the area of the street Function Functional density POI Density of the number of POIs in this life circle Functional completeness POI Ratio of the number of POI types to the number of all types of POIs in this life circle Functional diversity POI Using the information entropy formula, n is the number of POI categories and Pi denotes the ratio of the total number of POIs in the life circle where the number of POIs of a particular category is located Transportation Transportation accessibility Transportation Minimum walking time from the center of the life circle to the nearest subway entrance Walking accessibility Transportation Minimum walking time from the center of the life circle to the nearest bus stop Street space D/H ratio Building footprints Transportation Ratio of road width to the height of building facades along the street The proportion of pedestrian space Street-view imagery Width of sidewalk as a percentage of pedestrian field of view Interface transparency Street-view imagery Ratio of the total length of open frontage and clear windows and doors on both sides of the street to the total building footprint length Openness of sky Street-view imagery Proportion of sky to pedestrian's field of view Proportion Vegetation Accessibility of park Urban greening Minimum walking time from the center of the life circle to the nearest park entrance Green visual index Street-view imagery Proportion of street greening to pedestrian view Vegetation coverage Urban greening Substitute the formula: VFC = (NDVI - NDVIs)/ ( NDVIv - NDVIs) 3.5 Methods 3.5.1 eXtreme Gradient Boosting (XGBoost) To characterize the nonlinear associations between built environment attributes and residents' emotional states, we employed the XGBoost model, an advanced ensemble learning algorithm. As a gradient-boosted decision tree (GBDT) framework, XGBoost surpasses traditional regression models in predictive accuracy and generalization capability, primarily through two key innovations: 1) second-order Taylor expansion for loss function approximation, which enhances computational precision; and 2) algorithmic optimizations that balance efficiency and performance (Chen and Guestrin, 2016; Friedman, 2001). However, the model’s "black-box" nature necessitates interpretive tools. To address this, we integrated SHapley Additive exPlanations (SHAP), a game theory-based approach that quantifies each feature’s marginal contribution to predictions relative to a baseline. This enables precise evaluation of feature importance and directional effects (positive/negative) (Lundberg et al., 2018). The model specifies built environment indicators as independent variables and residents' sentiment scores as the dependent variable, with the objective function defined as: $$\:\mathcal{L}=\sum\:_{i=1}^{n}l\left({y}_{i},{\widehat{y}}_{i}\right)+\sum\:_{k=1}^{K}\varOmega\:\left({f}_{k}\right)$$ 1 where \(\:{\Omega\:}\left({\text{f}}_{\text{k}}\right)\) denotes the regularization term for the k-th tree, typically formulated as: $$\:\varOmega\:\left(f\right)=\gamma\:T+\frac{1}{2}\lambda\:\sum\:_{j=1}^{T}{w}_{j}^{2}$$ 2 where \(\:T\) represents the number of leaf nodes of the tree, \(\:\gamma\:\) and \(\:\lambda\:\) are regularization parameters, and \(\:{w}_{j}\) is the weight of the j-th leaf node. To decode feature contributions in predictive modeling, SHAP (SHapley Additive exPlanations) quantifies the marginal impact of each explanatory variable on model outputs relative to a predefined baseline. This method enables fine-grained interpretation of individual built environment indicators—revealing not only their absolute importance but also the nonlinear nature of their associations with residents’ emotional states. Partial dependence plots (PDPs) visually characterize these relationships, illustrating how sentiment scores shift as a specific feature varies while averaging out other variables' effects. This dual approach of SHAP value calculation and PDP visualization bridges the gap between black-box modeling and interpretable insights, facilitating evidence-based interpretation of complex environment-emotion interdependencies. 3.5.2 Geographically Weighted Regression (GWR) Geographically Weighted Regression (GWR) represents a spatially explicit analytical framework widely utilized to characterize spatial non-stationarity in variable relationships. Distinct from Ordinary Least Squares (OLS) regression, GWR elevates model precision by enabling regression coefficients to adapt across geographic locations, thus facilitating a more nuanced capture of localized spatial dynamics. This methodology has found extensive applications in domains including urban planning, public health, and environmental science (Fotheringham and Oshan, 2016). Notwithstanding its utility, the optimization of model performance and validation of robust outcomes necessitate careful attention to critical factors, such as bandwidth calibration and the mitigation of multicollinearity issues. In this study, we leveraged the R-language packages spgwr and related dependencies to explore the spatial heterogeneity of built environment impacts on residents' sentiments in Qingdao. The analytical workflow entailed: preprocessing missing values, calculating optimal bandwidths via cross-validation, and mapping the spatially varying coefficients of built environment indicators (e.g., green space ratio, street connectivity). GWR outputs were subsequently converted to sf objects for spatial visualization and interpretation in ArcGIS, enabling the identification of localized effect patterns and hotspots of environmental-sentiment relationships. 3.5.3 Integrative Framework of XGBoost and GWR The XGBoost algorithm was employed to identify critical predictive factors while accommodating their nonlinear threshold effects and intricate interactions through gradient-boosted feature importance ranking. Concurrently, GWR was applied to model spatial non-stationarity in the built environment-sentiment nexus, enabling the visualization of geographically varying coefficient estimates. This hybrid approach addresses the limitations of traditional spatial regression models in capturing nonlinearity while enhancing interpretability through SHAP (SHapley Additive exPlanations) value decomposition. To systematically analyze spatial heterogeneity, we classified life circles into three typologies based on urban form indices (e.g., density, diversity, design). From each typology, four life circles exhibiting the highest residual variances in GWR modeling were selected as representative cases. This strategic sampling allowed for in-depth exploration of context-specific environmental-sentiment relationships, with SHAP waterfall plots offering granular insights into feature contributions at the local scale. 4 Results 4.1 Nonlinear relationships between residents’ sentiments and built environment The XGBoost model evaluation yielded an accuracy of 0.815, precision of 0.901, recall of 0.852, and F1 score of 0.895, demonstrating robust predictive performance for subsequent analyses. Feature contribution analysis results are visualized in Fig. 6 . The left panels of Fig. 6 (a) and 6(b) display descending-ranked average SHAP (SHapley Additive exPlanations) values for each feature, while the right panels illustrate distributional SHAP values across all samples—including both positive and negative effect directions. In these visualizations, individual data points represent SHAP values indicating each feature's contribution to specific predictions, ordered by mean absolute SHAP values to highlight the most influential predictors. The x-axis denotes SHAP values, reflecting both the magnitude and direction of feature impacts, while a blue-to-red color gradient corresponds to feature value intensities (blue = lower values, red = higher values). Key findings reveal that functional density exhibits the strongest positive association with residents' sentiments, whereas park accessibility and sky openness show significant negative correlations. By contrast, walking accessibility, green visual index, and plot ratio exerted relatively muted effects. These results suggest that strategically increasing urban facility density could enhance resident wellbeing, while Qingdao’s existing park infrastructure may already be sufficient—with potential diminishing returns from further development. Notably, while adequate sky exposure is beneficial, excessive openness may exacerbate environmental stressors and degrade sentimental wellbeing, underscoring the need for balanced urban design that reconciles spatial openness with human comfort. The partial dependence plot in Fig. 7 illuminates the nonlinear relationships between built environment factors and residents' sentiments, illustrating how the magnitude of impact fluctuates across distinct value spectrums of explanatory variables. This visualization uncovers nuanced threshold effects. Such insights underscore the importance of context-specific design thresholds in urban planning, as linear assumptions may overlook critical inflection points in environmental-sentiment relationships. ( 1 ) Density The analysis uncovers nuanced relationships between built environment indicators and residents' emotional states. The plot ratio demonstrates negligible influence, with effect sizes consistently fluctuating around zero. For building density, negative impacts gradually diminish when values are below 0.03, while densities exceeding 0.3 show trivial effects. Population density exhibits a threshold-dependent pattern: it enhances positive sentiment when below 0.002 people/m², but becomes detrimental above this threshold. Extremely high densities (exceeding 0.006 people/m²) initially produce alternating effects before stabilizing. ( 2 ) Function The analysis reveals that functional density exerts differential impacts on residents' sentimental health. When values are below 0.0003, functional density significantly undermines sentiment, with negative effects gradually waning as the density surpasses this threshold. Regarding functional completeness, it shifts from a neutral to a positive influence when exceeding 0.7, underscoring the pivotal role of comprehensive amenities in enhancing emotional well-being. Functional diversity, conversely, exhibits an optimal range below − 0.7; beyond this point, excessive variety may attenuate the positive effects on sentiment. Collectively, these findings underscore the criticality of achieving a balanced mix of facilities to promote residents' psychological wellness. ( 3 ) Transportation Mirroring Qingdao’s status as a tourist-centric city, subway stations are characterized by high pedestrian congestion. When the walking time to subway stations is within 20 minutes, the negative impact on residents' sentiment suggests a tendency to avoid these crowded areas. As the walking time extends beyond 20 minutes, the influence gradually shifts from negative to positive before reaching a stable state. Regarding bus stops, those within a 2-minute walking distance often feature noisy environments, which significantly deteriorate residents’ sentimental health. Conversely, the impact becomes positive when the walking distance ranges from 2 to 10 minutes. However, bus stops located excessively far away compromise travel convenience, potentially inducing negative sentiment among residents. ( 4 ) Street space The analysis indicates that a D/H ratio below 0.8 exerts a favorable influence on residents' emotional states. Conversely, when the ratio exceeds 1.3, the impact fluctuates around zero before gradually intensifying. Regarding the pedestrian space proportion, values below 0.13 are associated with a negative effect, suggesting that expanding walkways to create more spacious pedestrian areas could enhance residents' sentiment. Interface transparency below 0.0005 positively affects residents' emotions, yet building facades with higher permeability beyond this threshold do not yield additional benefits. Sky openness within the range of 0.4 to 0.55 significantly elevates residents' emotional well-being; however, overly restricted sky views may trigger depressive feelings, while overly expansive views can evoke a sense of isolation. ( 5 ) Vegetation The results demonstrate that when park accessibility is within a 10-minute range, it exerts a positive influence, consistent with residents' preferences for nearby green spaces. However, as the travel time exceeds this threshold, the impact turns negative, potentially contributing to adverse emotional states. For parks situated 40 to 50 minutes away, residents tend to favor larger-scale green areas; yet, when accessibility extends beyond 50 minutes, the benefits of such parks significantly diminish. Vegetation coverage below 0.25 could be augmented to enhance residents' sentiment, as denser vegetation may impede pedestrian mobility and natural light penetration. Similarly, a green visual index below 0.15 indicates that increased street greening would likely improve residents' emotional well-being, but values surpassing this threshold may paradoxically reduce positive sentiment. 4.2 Interaction effects This section quantifies the interaction effects among built environment indicators and identifies the top 10 variable pairs with the strongest interactive influences for in-depth analysis (Fig. 8 ). The results of this study reveal complex interactions between various built environment variables and residents' emotional states, with the relationships evolving as one factor influences another (Fig. 9 ). Notably, there is no positive correlation between interface transparency and functional density in Qingdao's high-density functional zones. This lack of correlation can be attributed to the prevalence of brick-walled streetscapes with limited permeable glazing. However, as functional density exceeds a certain threshold of 0.003, the interaction between these variables shifts from negative to positive before stabilizing. In terms of sky openness, the data show a gradual decrease as population density increases. Higher density typically reduces street-level visibility due to functional agglomeration and neighborhood congestion. When population density is below 0.002 persons/m², the relationship remains strongly positive, but it weakens and approaches neutrality as density increases. Furthermore, a positive correlation between functional density and population density is consistent with typical urban development patterns. This reflects how urban functions tend to attract greater demographic aggregation, stabilizing at higher values above 0.0003. The relationship between transportation accessibility and functional density exhibits a nuanced dynamic. Specifically, when transit times are less than 20 minutes, the interaction is negative, but it reverses to positive values when transit times exceed this threshold. As functional density increases, the interaction with functional diversity becomes increasingly positive, particularly when the density exceeds 0.0003. In contrast, samples with higher park accessibility tend to contribute more significantly to the green visual index when the accessibility is below 0.15, while those with lower accessibility show a more substantial contribution above this threshold. Building density, which promotes a greater diversity of urban functions, also plays a crucial role in enhancing functional completeness. The interaction between these two variables initially appears negative, becomes neutral at a density of 0.2, and then turns negative again. Similarly, the relationship between functional diversity and park accessibility does not follow a simple linear trend. It alternates between positive and negative effects when accessibility is under 50 minutes but becomes uniformly negative beyond this point. Another significant finding is the positive correlation between sky openness and interface transparency within the range of 0.4 to 0.6. This relationship suggests that well-designed streetscapes, where both factors are optimized, can enhance residents' emotional states. However, this synergy begins to deteriorate rapidly when sky openness exceeds 0.55. Finally, the data suggest that functional completeness increases as functional density rises. Notably, this enhanced completeness contributes synergistically to the improvement of residents' sentiments when functional density surpasses 0.0003. 4.3 Spatial heterogeneity The GWR model results indicate significant spatial autocorrelation (Moran's I = 0.222, p < 0.001). With a Z-score of 1.033 falling within the random distribution range, the model residuals exhibit random spatial patterns, confirming appropriate model specification. The analysis reveals pronounced spatial heterogeneity in the impacts of built environment elements on residents' emotional states across Qingdao (Fig. 10 ). The analysis reveals distinct spatial gradients in the impacts of built environment variables across Qingdao: building density, functional density, walking accessibility, sky openness, and vegetation coverage exhibit stronger effects in northern Qingdao, following a south-to-north increasing gradient, while transportation accessibility, D/H ratio, green visual index, and interface transparency exert greater influence in southern regions with a clear north-to-south increasing trend. Functional completeness, plot ratio, functional diversity, and pedestrian space proportion show stronger impacts in western areas with effects diminishing eastward, whereas vegetation coverage follows the opposite west-to-east increasing pattern. Notably, park accessibility demonstrates weaker effects in Qingdao's urban core compared to surrounding regions. The contextual mechanisms of these spatial patterns are rooted in multiple interrelated factors: Qingdao's urban core and surrounding developing areas, characterized by high-density built environments, fast-paced lifestyles, and comprehensive amenities, strongly shape residents' emotional states, with established districts hosting stable, concentrated populations and emerging areas experiencing dynamic fluctuations from urban-rural migration and transient workers. The urban core's high functional density and diversity efficiently meets daily needs, yielding moderate sentiment effects, while remote townships with limited facilities show more pronounced impacts—further modulated by the core's innovative tourist amenities boosting local incomes. Although Qingdao's transportation network serves most districts adequately, developing industrial bases in some areas heighten reliance on transport and pedestrian access, amplifying emotional effects. Central urban areas, featuring architectural landmarks and iconic streets, are particularly sensitive to the D/H ratio, pedestrian space proportion, and interface transparency, with sky openness exerting strong effects as both overly dense and sparse configurations undermine wellbeing. Lastly, the fast-paced urban core's emotional stress makes accessible parks and moderate street vegetation critical for recovery, with the urban center's sparser greenery compared to outskirts exacerbating this need and underscoring vegetation's pivotal role in emotional health. 4.4 Typical case analysis Using clustering algorithms in R, we categorized the life circles with the NBClust package identifying three optimal clusters (spatial distribution shown in Fig. 11 ). Class A areas predominantly occupy the peripheries of administrative cities, characterized by sparse distributions. These slowly developing zones exhibit low building density, obsolete functional facilities, poor transportation accessibility, inadequate street planning, and predominantly natural vegetation coverage. Class B areas are concentrated in the urban cores of each administrative division, forming centralized clusters. These zones feature high building density, complete functional amenities, excellent transportation accessibility, well-designed pedestrian spaces, and concentrated park access with substantial vegetation coverage. Class C areas primarily lie in the central zones of administrative divisions, displaying clustered distributions. Despite high building density and quality facilities, these areas have mixed building ages, high population density, traffic congestion, disorganized pedestrian spaces, and uneven distribution of the green visual index. Class A life circles are predominantly situated in the peripheral zones of municipal administrative districts, characterized by developmental constraints—including aging infrastructure, incomplete urban amenities, limited transportation access, subpar street design, and insufficient green spaces. Analysis of typical samples identifies five built environment indicators with particularly pronounced impacts on residents' emotional states: functional density, park accessibility, sky openness, vegetation coverage, and interface transparency, among which functional density exerts the most substantial effect (Fig. 12 ). This result is relatively consistent with the contribution degree of global characteristic variables. The presence of comprehensive functional facilities fosters economic opportunities that significantly influence residents' daily routines and sustainably shape their emotional well-being. While the findings from the four studied life circles generally align with the GWR model's spatial patterns, local spatial and socioeconomic contexts give rise to indicator variations. For example, Life circle A1 features vegetation coverage significantly higher than the district average, attributed to its proximity to Mengwangshan Park. This abundant greenery substantially elevates local environmental quality and emotional wellness. Similarly, Life circle A3 exhibits unique park accessibility dynamics: although located near coastal parks, its tourism-oriented economy results in visitor-dominated green spaces, making accessible urban parks particularly vital for maintaining residents' positive sentiment. Class B life circles predominantly concentrate in the urban cores of administrative divisions, characterized by mature infrastructure and comprehensive amenities that foster optimal living conditions. Analysis of typical samples identifies five built environment indicators with significant impacts on residents' emotional states: functional density, vegetation coverage, park accessibility, population density, and sky openness—with functional density demonstrating the strongest influence (Fig. 13 ). The high population density in urban centers necessitates robust functional support to meet daily needs, substantially shaping residents' sentiments. Notably, four life circles exhibit indicator variations from GWR model predictions. Life circle B1, due to its peripheral location within the urban core and underdeveloped infrastructure, displays atypical functional density—targeted enhancements here could potentially improve residents’ emotional well-being. In Life circle B2, the impact of vegetation coverage deviates from district norms: adjacent apparel industries prioritize production over greening, such that excessive vegetation expansion might encroach on industrial spaces, potentially diminishing sentiment. Life circle B4 presents unique interactions between population density and vegetation coverage: hosting university students and tech professionals near exhibition facilities, this configuration fosters positive sentiment, though measured increases in park greening could further enhance well-being without compromising existing advantages. Class C life circles predominantly cluster in Qingdao's central urban areas, where the juxtaposition of historic and contemporary urban fabrics creates intricate spatial configurations. While the built environment meets daily needs adequately, it concurrently struggles with environmental disarray and traffic congestion. Analysis of typical samples identifies five key built environment indicators significantly shaping residents' emotional states: functional density, vegetation coverage, park accessibility, population density, and green visual index—with functional density emerging as the most influential factor (Fig. 14 ). Similar to the results of the GWR model, in the southern central urban area, factors such as greening and accessibility have a relatively significant impact on residents' sentiments. Life circle C1 demonstrates typical vegetation coverage effects, where existing parks and high building density limit potential gains in sky openness, implying marginal returns from additional greening. Life circle C2 displays unconventional building density impacts, benefiting from measured density increases that introduce mixed-use functions and foster social interaction. Life circle C3 shows exceptional sensitivity to functional density, population density, and sky openness, influenced by its proximity to the International Convention Center, which enhances functionality but may impede mobility. Life circle C4 reveals unique dynamics between functional density and park accessibility: modernizing aging facilities could improve convenience, while alleviating congestion on popular park access routes would significantly boost sentiment. 5 Discussion and Conclusion 5.1 Discussion This study innovatively constructs a comprehensive framework based on multimodal data and AI to explore the nonlinear relationships and spatial heterogeneity between the built environment and residents’ sentiments. This approach addresses critical gaps in existing research through methodological and data-source innovations, and deepens the role of AI in enhancing sustainable development planning. ( 1 ) Innovations in this study Our methodology overcomes the constraints of traditional research by using an LLM to extract sentiments from Weibo data, combined with comprehensive geographic datasets, thus enhancing data objectivity and spatial representativeness. The integrated application of the Geographically Weighted Regression (GWR) and XGBoost models enables simultaneous analysis of spatial patterns, nonlinear effects, and interactive relationships—markedly advancing beyond traditional analytical frameworks. In the field of contemporary research on sustainable urban development, the in-depth integration of various artificial intelligence technologies and multimodal data is exerting a revolutionary influence, providing a new paradigm for the construction of data-empowered decision-making mechanisms and the advancement of municipal research. From the perspective of artificial intelligence technologies, they cover a variety of cutting-edge technologies such as machine learning, deep learning, natural language processing, and computer vision. These technologies can conduct pattern mining on the massive historical data generated in urban operations and effectively identify the underlying laws behind nonlinear problems such as changes in urban environmental quality. Computer vision technology, in particular, can rely on image data to monitor spatial information such as urban green space coverage, building density, and road conditions in real-time, thus providing an intuitive and dynamic visual basis for urban planning. ( 2 ) Theoretical contributions brought by the combination of multiple AI technologies The integration of multiple artificial intelligence technologies with multimodal data can open up new theoretical perspectives for the research on the relationship between residents' sentiments and the built environment. Firstly, we break through the single focus on linear relationships in previous studies. By systematically integrating machine learning, SHAP, GWR, and automatic clustering models, a multi-dimensional analysis system is formed. Machine learning models can capture complex association patterns that are difficult to identify by traditional linear models; the SHAP explanation framework can accurately decompose the action mechanism of various influencing factors. For instance, we find that walking accessibility beyond 10 minutes has a minimal effect on enhancing residents' sentiments; Sky openness demonstrates an inverted U-curve relationship with sentiment, peaking at 0.4–0.55. The GWR model further incorporates spatial dimensions into consideration, and the automatic clustering model can classify regions with similar impact patterns, providing a basis for subsequent targeted analysis. For instance, the plot ratio in suburban areas has a much greater effect on enhancing residents' sentiments than that in the central urban areas. This multi-model collaborative approach has completely broken the limitations of linear thinking, making the research more in line with the complex and changing actual situations in reality. Secondly, the limitations of micro-level research have been broken. With the combination of LLMs and PSPNet models, this study realizes refined exploration at the macro scale. Previous studies mostly focused on micro levels such as small-scale communities or blocks, making it difficult to reflect the overall spatial distribution law of residents' sentiments in cities. LLMs can conduct in-depth semantic analysis of massive amounts of residents' text information, quickly extracting the characteristics of residents' sentiments at the macro level; the PSPNet model can depict the macro spatial pattern of the built environment in detail. For instance, we have clarified that at the macro level, the built environment elements with the most significant effect on emotional enhancement are functional density and accessibility of park. The combination of LLMs and PSPNet models not only ensures a macro perspective of the research but also enables refined analysis of the relationship between sentiments and the environment, making up for the limitations of traditional micro-level research. Thirdly, the collaborative application of multiple AI technologies has constructed a research paradigm that crosses data types and analysis dimensions, which is conducive to revealing the deep-seated characteristics that have not been touched upon in previous studies. For instance, the findings not only corroborate established theories, such as the positive correlation between appropriate green space ratios and emotional recovery (Hills et al., 2019) and the mental health benefits of moderate physical activity (Mu et al., 2024), but also identifies the threshold ranges and spatial characteristics within which these two factors exert their effects. Notably, we extend existing knowledge by demonstrating significant spatial variation in vegetation coverage effects: these effects not only differ in magnitude but can even exhibit opposing directions across spatial units, underscoring the need for location-specific analyses in built environment research. ( 3 ) Practical implications and limitations This study elucidates the complex dynamics between the built environment and emotional well-being, providing a basis for context-specific optimization strategies. For instance, regulating urban building density and strategically adjusting green spaces can enhance positive emotions, supporting effective urban renewal. These findings offer quantitative guidance for promoting emotional health and inform precision urban planning policies. While this research advances the field, it has limitations: the single-city focus on Qingdao necessitates validation in other urban contexts, and the reliance on static built environment indicators may overlook temporal dynamics affecting sentiments. Future studies should incorporate multi-city comparisons and temporal analyses to deepen understanding of these complex relationships and strengthen policy relevance. 5.2 Conclusion This study systematically characterizes the spatial heterogeneity, nonlinear relationships, and interaction effects between the built environment and residents’ emotional states, yielding four key insights: First, threshold effects in built environment indicators. Some indicators exhibit clear threshold effects: building density shows plateaued impacts above 0.3, while functional completeness shifts from detrimental to beneficial effects beyond 0.7. These thresholds underscore the need for evidence-based urban design within optimal parameter ranges, discouraging extreme planning approaches. Second, interactive dynamics and context-sensitive coordination. Functional density synergizes with population density to enhance sentiment when exceeding 0.0003, whereas interface transparency negatively interacts with sky openness above 0.6, impairing emotional well-being. Notably, the green visual index and park accessibility demonstrate a threshold-dependent interaction: positive below 0.15 but negative above. These findings highlight the importance of context-sensitive coordination between street greening and park facility planning in urban design. Third, spatial heterogeneity in impact patterns. Spatial analysis reveals significant geographic variation: well-developed central areas maintain stable sentiment levels due to mature infrastructure, while peripheral zones exhibit sentiment fluctuations tied to population dynamics and infrastructure gaps. Fourth, regional disparities in effect directions. Identical built environment elements can exert divergent effects across regions. For example, vegetation coverage may either enhance or suppress positive sentiment in urban cores versus peripheries, reflecting spatial disparities in the nonlinear built environment–sentiment relationship. Declarations Ethical approval This article does not include any studies involving human participants. All authors affirm that the study was carried out in full compliance with the research integrity and ethical scholarship policies of their respective institutions. Funding This research was funded by the National Natural Science Foundation of China [Grant Number: 51908229] and Shandong Provincial Natural Science Foundation [Grant Number: ZR2024QE171]. Author Contribution WW elaborated the analyses presented in the results, discussion and conclusions. XN proposed the methodology, Supplementary Material and protocol. YZ and HY wrote the text of the paper and the translation. YG screened the articles, prepared figures and tables. All authors defined the variables, participated in the selection of the included papers and made corrections to the manuscript. Data Availability Data is provided within the manuscript or supplementary information files. References Arora S, Debesay J, Eslen-Ziya H (2022) Persuasive narrative during the COVID-19 pandemic: Norwegian prime minister Erna Solberg’s posts on Facebook. Humanit Soc Sci Commun 9:1–10. https://doi.org/10.1057/s41599-022-01051-5 Bi J, Gu C (2024) Understanding tourists' ambassador role of their origin places from perspective of residents' attitudes towards tourists. Sci Rep 14:2214. https://doi.org/10.1038/s41598-024-52718-9 Cao S, Song C, Jiang S et al (2024) Effects of urban greenway environmental types and landscape characteristics on physical and mental health restoration. Forests 15(4):19994907. https://doi.org/10.3390/f15040679 Chen C, Li H, Luo W (2022) Predicting the effect of street environment on residents' mood states in large urban areas using machine learning and street view images. Sci Total Environ 816:151605. https://doi.org/10.1016/j.scitotenv.2021.151605 Chen T, Guestrin C (2016) XGBoost: A Scalable Tree Boosting System. In: Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining: 785–794. https://doi.org/10.1145/2939672.2939785 Chen Z, Yang H, Lin Y et al (2024) Exploring the association between the built environment and positive sentiments of tourists in traditional villages in Fuzhou, China. Ecol Inf 80:102465. https://doi.org/10.1016/j.ecoinf.2024.102465 Conzo P, Fuochi G, Anfossi L et al (2021) Negative media portrayals of immigrants increase ingroup favoritism and hostile physiological and emotional reactions. Sci Rep 11:16407. https://doi.org/10.1038/s41598-021-95800-2 Baba SE, Antoun J, Mladenovic A et al (2021) Impact of Sleep on Medical Residents' Emotions: A Cross-Sectional Study Using a Wearable Device. Fam Med 53:275–281. https://doi.org/10.22454/FamMed.2021.585102 Ewing R, Cervero R (2010) Travel and the built environment: A Meta-Analysis. J Am Plann Association 76:265–294. https://doi.org/10.1080/01944361003766766 Fan C, Gai Z, Li S et al (2023) Does the built environment of settlements affect our sentiments? A multi-level and non-linear analysis of Xiamen, China, using social media data. Front Public Health 10:1094036. https://doi.org/10.3389/fpubh.2022.1094036 Feng J, Li Q (2025) Investigate physiological and psychological responses to environment scenes, elements and components in different urban settings. Sci Rep 15:12345. https://doi.org/10.1038/s41598-025-86448-3 Feng Y, Lou C, Gao E et al (2012) Adolescents' and Young Adults' Perception of Homosexuality and Related Factors in Three Asian Cities. J Adolesc Health 50:S52–S60. https://doi.org/10.1016/j.jadohealth.2011.12.008 Fotheringham AS, Oshan TM (2016) Geographically weighted regression and multicollinearity: dispelling the myth. J Geogr Syst 18:303–329. https://doi.org/10.1007/s10109-016-0239-5 Friedman JH (2001) Greedy function approximation: A gradient boosting machine. Ann Stat 29:1189–1232. https://doi.org/10.1214/aos/1013203451 Gao H, Guo DF, Wu J et al (2022) Weibo users’ emotion and sentiment orientation in traditional Chinese medicine (TCM) during the COVID-19 pandemic. Disaster Med Public Health Prep 16:1835–1838. https://doi.org/10.1017/dmp.2021.259 Guo H, Zhang S, You Y et al (2025) Assessing the impact of street-level greenery on older adults' emotional well-being: A longitudinal study of equigenic potential and socioeconomic disparities. Build Environ 267:112309. https://doi.org/10.1016/j.buildenv.2025.112309 Guo X, Tu X, Huang G (2022) Urban greenspace helps ameliorate people's negative sentiments during the COVID-19 pandemic: The case of Beijing. Build Environ 223:109449. https://doi.org/10.1016/j.buildenv.2022.109449 Han Z, Shen M, Liu H al (2022) Topical and emotional expressions regarding extreme weather disasters on social media: A comparison of posts from official media and the public. Humanit Soc Sci Commun 9:1–10. https://doi.org/10.1057/s41599-022-01457-1 He P, Yu B, Ma J (2024) Exploring the non-linear relationship and synergistic effect between urban built environment and public sentiment integrating macro- and micro-level perspective: a case study in San Francisco. Front Psychol 15:1276923. https://doi.org/10.3389/fpsyg.2024.1276923 He Z, Li Z, Yang F et al (2020) Advances in Multimodal Emotion Recognition Based on Brain-Computer Interfaces. Brain Sci 10:797. https://doi.org/10.3390/brainsci10110797 Heng D, Ritchie BW, Benckendorff PJ (2021) Beyond cost-benefit analysis: resident emotions, appraisals and support toward tourism performing arts developments. Curr Issues Tourism 24:668–684. https://doi.org/10.1080/13683500.2020.1825354 Hills AP, Farpour-Lambert NJ, Byrne NM (2019) Precision medicine and healthy living: The importance of the built environment. Prog Cardiovasc Dis 62,:34–45. https://doi.org/10.1016/j.pcad.2019.01.003 Hipp JR, Lee S, Ki D et al (2022) Measuring the built environment with Google Street View and Machine Learning: Consequences for Crime on Street Segments. J Quant Criminol 38:537–565. https://doi.org/10.1007/s10940-021-09522-9 Lee M, Park S, Yoon K (2019) Does Health Promotion Program Affect Local Resident's Emotions? Int J Environ Res Public Health 16:549. https://doi.org/10.3390/ijerph16040549 Li W, Sun RH, He HB et al (2023) How does three-dimensional landscape pattern affect urban residents’ sentiments. Cities 143:104619. https://doi.org/10.1016/j.cities.2023.104619 Liu W, Li D, Meng Y et al (2024) The Relationship between Emotional Perception and High-Density built environment Based on Social Media Data: Evidence from Spatial Analyses in Wuhan. Land 13:294. https://doi.org/10.3390/land13030294 Lundberg SM, Erion GG, Lee SI (2018) Consistent individualized feature attribution for tree ensembles. arXiv Preprint arXiv. https://doi.org/10.48550/arXiv.1802.03888 . 1802.03888 Lundberg SM, Lee SI (2017) A unified approach to interpreting model predictions. Adv Neural Inf Process Syst 30:4768–4777 Ma W, Wei F, Yang L et al (2024) Research on the Measurement, Evaluation and Compensation of Traditional Village Residents' Emotional Perception: A Case of 14 Traditional Villages in Guanzhong Region. Sustainability 16:2546. https://doi.org/10.3390/su16062546 Ma Y, Yang Y, Jiao H (2021) Exploring the Impact of Urban built environment on Public Emotions Based on Social Media Data: A Case Study of Wuhan. Land 10:986. https://doi.org/10.3390/land10090986 Mu FZ, Liu J, Lou H et al (2024) Influence of physical exercise on negative emotions in college students: chain mediating role of sleep quality and self-rated health. Front Public Health 12:1402801. https://doi.org/10.3389/fpubh.2024.1402801 Pang L, Zhang J, Cao X et al (2020) The effects of carbon dioxide exposure concentrations on human vigilance and sentiment in an enclosed workplace environment. Indoor Air 30:209–1225. https://doi.org/10.1111/ina.12746 Park J, Tsou MH, Nara A (2024) Developing a social sensing index for monitoring place-oriented mental health issues using social media (twitter) data. Urban Inf 3(1):2. https://doi.org/10.1007/s44212-024-00031-1 Rundle A, Diez Roux AV, Free LM (2007) The urban built environment and obesity in New York City: a multilevel analysis. Am J Health Promotion 21:326–334. https://doi.org/10.4278/0890-1171-21.4s.326 Song Y, Liu Y, Bai X et al (2024) Effects of neighborhood built environment on cognitive function in older adults: a systematic review. BMC Geriatr 24(1):194. https://doi.org/10.1186/s12877-024-04776-x Strohbehn GW, Levy K, Tsao PA et al (2020) The July Effect in supervisory residents: assessing the emotions of rising internal medicine PGY2 residents and the impact of an orientation retreat. Med Educ Online 25:1728168. https://doi.org/10.1080/10872981.2020.1728168 Su H, Qi Z, Wang Q (2025) Impacts of land use characteristics on extreme heat events: Insights from explainable machine learning model. Sustainable Cities Soc 120:106139. https://doi.org/10.1016/j.scs.2025.106139 Tse S, Tung VWS (2022) Understanding residents' attitudes towards tourists: Connecting stereotypes, emotions and behaviours. Tour Manag 89:104435. https://doi.org/10.1016/j.tourman.2021.104435 Wang L, Zhao C, Liu X et al (2021) Non-Linear Effects of the built environment and Social Environment on Bus Use among Older Adults in China: An application of the XGBoost model. Int J Environ Res Public Health 18:9592. https://doi.org/10.3390/ijerph18189592 Wang X, Yoo K, Chen H (2022) Antagonistic network signature of motor function in Parkinson's disease revealed by connectome-based predictive modeling. npj Parkinson's Disease 8:135. https://doi.org/10.1038/s41531-022-00315-w Wenning L, Sun R, Hongbin H (2023) How does three-dimensional landscape pattern affect urban residents' sentiments? Cities 143:104619. https://doi.org/10.1016/j.cities.2023.104619 Xiang L, Cai M, Ren C et al (2021) Modeling pedestrian emotion in high-density cities using visual exposure and machine learning: Tracking real-time physiology and psychology in Hong Kong. Build Environ 205:108273. https://doi.org/10.1016/j.buildenv.2021.108273 Ye J, Hai J, Wang Z et al (2023) Leveraging natural language processing and geospatial time series model to analyze COVID-19 vaccination sentiment dynamics on Tweets. JAMIA Open 6:ooad023. https://doi.org/10.1093/jamiaopen/ooad023 Yi S, Li X, Ma C et al (2025) Assessing the differential impact of vegetated and built-up areas on heat exposure environment: A case study of Los Angeles. Build Environ 271:112538. https://doi.org/10.1016/j.buildenv.2025.112538 Zhang J, Liu L, Wang J (2024) Exploring the relationship between the sentiments of young people and urban green space by using a check-in microblog. Forests 15(5):796. https://doi.org/10.3390/f15050796 Zhang Y, Cao X, Wang P et al (2020) Emotional inflection point in public health emergencies with the 2019 new coronavirus pneumonia (NCP) in China. J Affect Disord 276:797–803. https://doi.org/10.1016/j.jad.2020.07.097 Zhou W, Liang Z, Fan Z (2024) Spatio-temporal effects of built environment on running activity based on a random forest approach in nanjing. China Health Place 85:103176. https://doi.org/10.1016/j.healthplace.2024.103176 Additional Declarations No competing interests reported. Cite Share Download PDF Status: Under Review Version 1 posted Editorial decision: Revision requested 16 Feb, 2026 Reviewers agreed at journal 12 Dec, 2025 Reviews received at journal 10 Dec, 2025 Reviewers agreed at journal 10 Dec, 2025 Reviews received at journal 07 Dec, 2025 Reviews received at journal 25 Nov, 2025 Reviewers agreed at journal 10 Nov, 2025 Reviewers agreed at journal 09 Nov, 2025 Reviewers agreed at journal 07 Nov, 2025 Reviewers invited by journal 07 Nov, 2025 Editor assigned by journal 07 Nov, 2025 Editor invited by journal 07 Nov, 2025 Submission checks completed at journal 23 Oct, 2025 First submitted to journal 23 Oct, 2025 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-7821458","acceptedTermsAndConditions":true,"allowDirectSubmit":false,"archivedVersions":[],"articleType":"Article","associatedPublications":[],"authors":[{"id":546265699,"identity":"76e3a079-a9a3-4a5a-b70d-4971f87d41f0","order_by":0,"name":"Wanshu Wu","email":"","orcid":"","institution":"Qingdao University of Technology","correspondingAuthor":false,"prefix":"","firstName":"Wanshu","middleName":"","lastName":"Wu","suffix":""},{"id":546265700,"identity":"4aaf8c75-afc1-4c90-a16a-9c4a8892100a","order_by":1,"name":"Yang Zhou","email":"","orcid":"","institution":"Qingdao University of Technology","correspondingAuthor":false,"prefix":"","firstName":"Yang","middleName":"","lastName":"Zhou","suffix":""},{"id":546265701,"identity":"6c53363f-3602-431a-b87f-1d2a6591dc55","order_by":2,"name":"Huan Yu","email":"","orcid":"","institution":"Qingdao University of Technology","correspondingAuthor":false,"prefix":"","firstName":"Huan","middleName":"","lastName":"Yu","suffix":""},{"id":546265702,"identity":"5bb172ae-a6ba-4916-9345-b1e09a0968c1","order_by":3,"name":"Xinyi Niu","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA50lEQVRIiWNgGAWjYDACZiBOYGDg4QfzeCQgXKK0SLYRrQUGDI7BmQS0mLPzmEk83HFYxvh+87GHX2QsGPjZcwwYfu7ArcWymcfYIPHMYR6zY2zpxjJAh0n2vDFg7D2Dxz2HeQwfJLaBtPCYSUsAtRjcyDFgZmzDq8XgAEiLcRtUiz0RWiC2GLDxmEl+ANkiQVALW7FBYls6j8SxtDRpYCDzSJx5VnCwF5+W84e3Sf5ss7bnbz58TPJnT50cf3vyxgc/8WiBgmYwyczbw8ADYhwgqIGBoQ5MMv74QYTaUTAKRsEoGHEAAGObRdEVKFwqAAAAAElFTkSuQmCC","orcid":"","institution":"Tongji University","correspondingAuthor":true,"prefix":"","firstName":"Xinyi","middleName":"","lastName":"Niu","suffix":""},{"id":546265703,"identity":"b321f814-f73e-468e-b470-a822b2ffb287","order_by":4,"name":"Yu Gao","email":"","orcid":"","institution":"Qingdao University","correspondingAuthor":false,"prefix":"","firstName":"Yu","middleName":"","lastName":"Gao","suffix":""}],"badges":[],"createdAt":"2025-10-10 01:23:23","currentVersionCode":1,"declarations":"","doi":"10.21203/rs.3.rs-7821458/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-7821458/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":96201312,"identity":"f5c14f5e-7df7-4362-86e8-c30515cd46b5","added_by":"auto","created_at":"2025-11-18 16:36:56","extension":"docx","order_by":0,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":51309179,"visible":true,"origin":"","legend":"","description":"","filename":"manuscript1023.docx","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/291d53c55c6c947c69bc3e86.docx"},{"id":96201296,"identity":"120d9859-2723-4190-86aa-6cf3fd8dd87d","added_by":"auto","created_at":"2025-11-18 16:36:55","extension":"json","order_by":1,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":7225,"visible":true,"origin":"","legend":"","description":"","filename":"f8abafdd12b84521ad73723e2f5485c0.json","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/1257b97850a3746ff3363ca7.json"},{"id":96252486,"identity":"8e8add65-07b2-4656-a0be-3b768598fb18","added_by":"auto","created_at":"2025-11-19 07:41:02","extension":"xml","order_by":2,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":153761,"visible":true,"origin":"","legend":"","description":"","filename":"f8abafdd12b84521ad73723e2f5485c01enriched.xml","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/754e8063a80e727293a1bdd8.xml"},{"id":96251348,"identity":"827f7ba6-61c9-47f2-bb5f-fe870a977714","added_by":"auto","created_at":"2025-11-19 07:39:39","extension":"jpeg","order_by":3,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":7988834,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage1.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/024089e8f3ee01a0d0d901d4.jpeg"},{"id":96201304,"identity":"c082f271-522b-4128-acaa-5cd9d9c1b9af","added_by":"auto","created_at":"2025-11-18 16:36:55","extension":"jpeg","order_by":4,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":5473756,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage10.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/505b3e44a8847f1e678abae6.jpeg"},{"id":96201297,"identity":"cb40d785-1e13-468e-95c5-54efc9cd4e06","added_by":"auto","created_at":"2025-11-18 16:36:55","extension":"jpeg","order_by":5,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":741199,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage11.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/6a1aa5b389a8ec79745fd909.jpeg"},{"id":96201298,"identity":"edcc358b-9b8d-433e-9518-a30da628cc87","added_by":"auto","created_at":"2025-11-18 16:36:55","extension":"jpeg","order_by":6,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":4881962,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage12.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/8884fb9267f872a0460fd80a.jpeg"},{"id":96201319,"identity":"6ce14933-8385-4ff4-893c-b3ced2298271","added_by":"auto","created_at":"2025-11-18 16:36:56","extension":"jpeg","order_by":7,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":5215580,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage13.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/3c6dab4e47137c3fb93b3055.jpeg"},{"id":96201309,"identity":"1bb5444a-636a-4e97-b401-469d32cce737","added_by":"auto","created_at":"2025-11-18 16:36:56","extension":"jpeg","order_by":8,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":4795883,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage14.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/68de08d3459fce5926f189b2.jpeg"},{"id":96201315,"identity":"a0ee3363-e308-49a2-8cb9-3e5065afd31a","added_by":"auto","created_at":"2025-11-18 16:36:56","extension":"jpeg","order_by":9,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":6602001,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage2.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/470cd8a9c81c3856ea05cb98.jpeg"},{"id":96252819,"identity":"09d89617-a3c9-4391-ab69-ab5a0713cf03","added_by":"auto","created_at":"2025-11-19 07:41:30","extension":"jpeg","order_by":10,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":2685336,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage3.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/be1678697979d8b5e581781b.jpeg"},{"id":96201313,"identity":"c3b74d7a-c0b6-4f78-86cf-e96184c7ad22","added_by":"auto","created_at":"2025-11-18 16:36:56","extension":"jpeg","order_by":11,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":297256,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage4.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/f9db12585ce3bad8f6caa0e5.jpeg"},{"id":96201327,"identity":"b6097fec-d26d-4c3d-af7c-020c3dbd6312","added_by":"auto","created_at":"2025-11-18 16:36:56","extension":"jpeg","order_by":12,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":1565614,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage5.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/913e3c63e070d23c8000cd97.jpeg"},{"id":96201326,"identity":"0f5a7b8a-f95c-4fa8-b71f-a3a4de805e04","added_by":"auto","created_at":"2025-11-18 16:36:56","extension":"jpeg","order_by":13,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":293984,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage6.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/ca3da6a24f4f270a5a4dc024.jpeg"},{"id":96201318,"identity":"5b3f2457-246b-4a7e-820d-800395a3e912","added_by":"auto","created_at":"2025-11-18 16:36:56","extension":"jpeg","order_by":14,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":5361152,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage7.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/c2cda1d17ca33e62922ee67b.jpeg"},{"id":96252720,"identity":"832cca51-2537-4742-b7ec-826a6a7d1927","added_by":"auto","created_at":"2025-11-19 07:41:23","extension":"png","order_by":15,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":307509,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage8.png","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/125c244a94944f814973aa03.png"},{"id":96201308,"identity":"0a2eb294-372c-4e67-82c8-859cd933a8f9","added_by":"auto","created_at":"2025-11-18 16:36:55","extension":"jpeg","order_by":16,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":4639625,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage9.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/7f3d718d6e97905c076aa5a2.jpeg"},{"id":96250325,"identity":"08ec460c-54ce-4b8a-8533-30f9e8efe2b0","added_by":"auto","created_at":"2025-11-19 07:38:08","extension":"png","order_by":17,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":1863353,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage1.png","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/91a5680674e6b4fa420afe65.png"},{"id":96201300,"identity":"186ee543-0557-486b-b88c-057b925db9ae","added_by":"auto","created_at":"2025-11-18 16:36:55","extension":"png","order_by":18,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":1086881,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage10.png","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/e17ef668d2cfe9a298e25e1d.png"},{"id":96201328,"identity":"438c5a21-30f3-4cf9-83c6-e9c0ed6e5629","added_by":"auto","created_at":"2025-11-18 16:36:56","extension":"png","order_by":19,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":143213,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage11.png","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/9610a2bd25d9b987c47d523d.png"},{"id":96201331,"identity":"8e1fba7c-f442-47b1-b28c-72ea73169020","added_by":"auto","created_at":"2025-11-18 16:36:56","extension":"png","order_by":20,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":1497055,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage12.png","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/8be231f3d38d0d4e9231d047.png"},{"id":96201317,"identity":"1367329f-5dc8-4d65-a9ea-e4ea9140b48b","added_by":"auto","created_at":"2025-11-18 16:36:56","extension":"png","order_by":21,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":1536383,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage13.png","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/e1eaf2a2caa537092af367ed.png"},{"id":96201338,"identity":"74ed2a1a-8b1c-4e19-b294-02633b59e4e8","added_by":"auto","created_at":"2025-11-18 16:36:57","extension":"png","order_by":22,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":1465534,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage14.png","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/06438a30ea362aab71041b21.png"},{"id":96201339,"identity":"debd799d-d612-4de7-99d0-f2a2a8f70a47","added_by":"auto","created_at":"2025-11-18 16:36:57","extension":"png","order_by":23,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":1123140,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage2.png","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/83bc4b11266adc84055a3f3d.png"},{"id":96201334,"identity":"41592cad-6dd5-44ba-ad51-76367fba6235","added_by":"auto","created_at":"2025-11-18 16:36:56","extension":"png","order_by":24,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":506014,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage3.png","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/a62fbeb5afe00ec2fbccda58.png"},{"id":96201314,"identity":"e98463a6-7d19-4dce-bbf2-59cf646c94e2","added_by":"auto","created_at":"2025-11-18 16:36:56","extension":"png","order_by":25,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":38915,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage4.png","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/2deb2d5959050163550868bd.png"},{"id":96201320,"identity":"90148d67-35dd-4cd2-ba19-82150aeab9fb","added_by":"auto","created_at":"2025-11-18 16:36:56","extension":"png","order_by":26,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":283074,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage5.png","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/c1dc56718ae78dba51788ad2.png"},{"id":96201340,"identity":"a3de2bae-46e8-401f-bcab-2ad287d805ce","added_by":"auto","created_at":"2025-11-18 16:36:57","extension":"png","order_by":27,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":49263,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage6.png","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/364575fb6d422830c2bc1eb1.png"},{"id":96251302,"identity":"1ed6e3b4-5801-4b2c-b259-a7b366c5ee62","added_by":"auto","created_at":"2025-11-19 07:39:37","extension":"png","order_by":28,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":1187244,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage7.png","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/0b2f9c126362e4a5a3b52729.png"},{"id":96201324,"identity":"d7291e31-6984-4bb4-b4a9-7f146e6f0dfa","added_by":"auto","created_at":"2025-11-18 16:36:56","extension":"png","order_by":29,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":51255,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage8.png","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/d2bf39fde20a5f5893ce1a56.png"},{"id":96253015,"identity":"3719dd14-e497-406a-bf13-0911c314135f","added_by":"auto","created_at":"2025-11-19 07:41:47","extension":"png","order_by":30,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":996075,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage9.png","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/910a7ac9b4515f77d6114767.png"},{"id":96251436,"identity":"26130bb7-d6b0-4792-854f-563700952c8b","added_by":"auto","created_at":"2025-11-19 07:39:44","extension":"xml","order_by":31,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":145233,"visible":true,"origin":"","legend":"","description":"","filename":"f8abafdd12b84521ad73723e2f5485c01structuring.xml","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/1196bced98d7870818d741be.xml"},{"id":96201337,"identity":"2011cd70-0372-4165-b566-2908ba914115","added_by":"auto","created_at":"2025-11-18 16:36:56","extension":"html","order_by":32,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":165888,"visible":true,"origin":"","legend":"","description":"","filename":"earlyproof.html","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/5c6c8ecb0ac51b3cfb960422.html"},{"id":96252282,"identity":"eca3afb1-637c-486b-b475-c54a96e42e84","added_by":"auto","created_at":"2025-11-19 07:40:44","extension":"jpg","order_by":1,"title":"Figure 1","display":"","copyAsset":false,"role":"figure","size":284793,"visible":true,"origin":"","legend":"\u003cp\u003eResearch area\u003c/p\u003e\n\u003cp\u003eNote: These maps are from China’s Standard Map Service System.\u003c/p\u003e","description":"","filename":"image1.jpg","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/99addef4b9046d15fc23afab.jpg"},{"id":96201293,"identity":"d44e7547-30ae-4105-bca3-5e7d1ffba5f5","added_by":"auto","created_at":"2025-11-18 16:36:55","extension":"jpg","order_by":2,"title":"Figure 2","display":"","copyAsset":false,"role":"figure","size":752190,"visible":true,"origin":"","legend":"\u003cp\u003eResearch framework\u003c/p\u003e","description":"","filename":"image2.jpg","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/0463294ccac2140b6d3e3045.jpg"},{"id":96252475,"identity":"bbf9bde4-3dda-4fb8-b8a6-e95bba010b3f","added_by":"auto","created_at":"2025-11-19 07:41:00","extension":"jpg","order_by":3,"title":"Figure 3","display":"","copyAsset":false,"role":"figure","size":271701,"visible":true,"origin":"","legend":"\u003cp\u003ePrinciples of street view image recognition\u003c/p\u003e","description":"","filename":"image3.jpg","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/27454579cd31b8d56ff947d4.jpg"},{"id":96201294,"identity":"bf0fdb32-96f9-4f53-bcc2-952c0be19992","added_by":"auto","created_at":"2025-11-18 16:36:55","extension":"jpeg","order_by":4,"title":"Figure 4","display":"","copyAsset":false,"role":"figure","size":297256,"visible":true,"origin":"","legend":"\u003cp\u003ePrinciples of sentiment recognition in LLM\u003c/p\u003e","description":"","filename":"image4.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/07e58299797826ea97540a13.jpeg"},{"id":96201295,"identity":"233b23e6-d16c-496a-8b35-671174b9b044","added_by":"auto","created_at":"2025-11-18 16:36:55","extension":"jpg","order_by":5,"title":"Figure 5","display":"","copyAsset":false,"role":"figure","size":251498,"visible":true,"origin":"","legend":"\u003cp\u003eSpatial distribution of residents' sentiments\u003c/p\u003e","description":"","filename":"image5.jpg","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/e9a2340cf7f2272854407f1b.jpg"},{"id":96201322,"identity":"895fb941-4cf7-4ed2-b8db-3fa343497d58","added_by":"auto","created_at":"2025-11-18 16:36:56","extension":"jpg","order_by":6,"title":"Figure 6","display":"","copyAsset":false,"role":"figure","size":683363,"visible":true,"origin":"","legend":"\u003cp\u003eContribution of characterization variables\u003c/p\u003e","description":"","filename":"image6.jpg","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/f4a472305b575373962a5f92.jpg"},{"id":96250431,"identity":"487d517c-fdad-4390-ad9f-2a61bd14e46f","added_by":"auto","created_at":"2025-11-19 07:38:22","extension":"jpg","order_by":7,"title":"Figure 7","display":"","copyAsset":false,"role":"figure","size":354811,"visible":true,"origin":"","legend":"\u003cp\u003eNonlinear effects of built environment indicators on resident sentiment\u003c/p\u003e","description":"","filename":"image7.jpg","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/9ff955fc84f982d7ff92cc47.jpg"},{"id":96251343,"identity":"243e0e1b-364c-42e1-9071-f6a6baa5663c","added_by":"auto","created_at":"2025-11-19 07:39:39","extension":"png","order_by":8,"title":"Figure 8","display":"","copyAsset":false,"role":"figure","size":307509,"visible":true,"origin":"","legend":"\u003cp\u003eSHAP summary plot for built environment\u003c/p\u003e","description":"","filename":"image8.png","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/88a776cd76c7303b8b9657c0.png"},{"id":96201307,"identity":"6708dd0a-fcd5-4088-be3a-1ea0e37241e7","added_by":"auto","created_at":"2025-11-18 16:36:55","extension":"jpg","order_by":9,"title":"Figure 9","display":"","copyAsset":false,"role":"figure","size":383891,"visible":true,"origin":"","legend":"\u003cp\u003eInteraction effects of the built environment on resident sentiment\u003c/p\u003e","description":"","filename":"image9.jpg","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/5f2a71b3f9e2d360ee2529ef.jpg"},{"id":96201299,"identity":"859fe9e3-dc5d-4fc0-8e06-f9d04f804308","added_by":"auto","created_at":"2025-11-18 16:36:55","extension":"jpg","order_by":10,"title":"Figure 10","display":"","copyAsset":false,"role":"figure","size":455728,"visible":true,"origin":"","legend":"\u003cp\u003eGWR results for built environment effects on residents’ sentiments\u003c/p\u003e","description":"","filename":"image10.jpg","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/e3ab8817b4c5cf669b35153c.jpg"},{"id":96201321,"identity":"245ef5a8-046c-4078-9497-b50ab0df21ec","added_by":"auto","created_at":"2025-11-18 16:36:56","extension":"jpg","order_by":11,"title":"Figure 11","display":"","copyAsset":false,"role":"figure","size":741199,"visible":true,"origin":"","legend":"\u003cp\u003eNumber of the 15-minute community life circle clusters and spatial settlement\u003c/p\u003e","description":"","filename":"image11.jpg","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/5d93d052ca3c93343e7cf726.jpg"},{"id":96201323,"identity":"35a54b0f-9d0a-47b2-8fc6-ae190c6a62ff","added_by":"auto","created_at":"2025-11-18 16:36:56","extension":"jpg","order_by":12,"title":"Figure 12","display":"","copyAsset":false,"role":"figure","size":326337,"visible":true,"origin":"","legend":"\u003cp\u003eEffects of the built environment on resident sentiment in typical life circles of Class A\u003c/p\u003e","description":"","filename":"image12.jpg","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/cf15fa4b382f05342bed8fdd.jpg"},{"id":96201301,"identity":"b191b233-6f99-40ac-bd52-55bcc430f90d","added_by":"auto","created_at":"2025-11-18 16:36:55","extension":"jpg","order_by":13,"title":"Figure 13","display":"","copyAsset":false,"role":"figure","size":365083,"visible":true,"origin":"","legend":"\u003cp\u003eEffects of the built environment on resident sentiment in typical life circles of Class B\u003c/p\u003e","description":"","filename":"image13.jpg","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/478c8653bec242af1f9e31c6.jpg"},{"id":96252734,"identity":"6b65375e-6b5b-4fb7-aef1-d2eae1a5bb42","added_by":"auto","created_at":"2025-11-19 07:41:24","extension":"jpg","order_by":14,"title":"Figure 14","display":"","copyAsset":false,"role":"figure","size":365925,"visible":true,"origin":"","legend":"\u003cp\u003eEffects of the built environment on resident sentiment in typical life circles of Class C\u003c/p\u003e","description":"","filename":"image14.jpg","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/491ec3367f76658b5adab564.jpg"},{"id":96602938,"identity":"8cc75938-599f-4ae3-88fa-abe29ce062ab","added_by":"auto","created_at":"2025-11-24 09:05:08","extension":"pdf","order_by":0,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":6877124,"visible":true,"origin":"","legend":"","description":"","filename":"manuscript.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7821458/v1/639079c9-7656-495b-a220-2737ba8664b3.pdf"}],"financialInterests":"No competing interests reported.","formattedTitle":"Nonlinear relationship and spatial heterogeneity between built environment and residents' sentiments: A comprehensive framework integrating multimodal data with AI","fulltext":[{"header":"1 Introduction","content":"\u003cp\u003eThe United Nations adopted the 2030 Agenda for Sustainable Development in 2015, which proposed 17 Sustainable Development Goals (SDGs), which not only focus on environmental protection, economic growth and social equity, but also emphasize the importance of human well-being and social health. Residents' sentiments, as an important aspect of social health, are closely related to these goals. Residents' sentiments are humans' subjective reactions to the objective environment, exert profound influences on psychological well-being, social behavior, and quality of life. A seminal study has demonstrated that positive emotional states foster social cohesion and productivity, while chronic negative sentiments may trigger anxiety or depressive disorders (Feng et al., 2012). Therefore, identifying and quantifying residents' sentiments is crucial to improving social well-being and promoting sustainable development. Although traditional sentiment analysis methods have achieved certain results, they are often limited by the amount of data and the depth of analysis. Artificial intelligence (AI) has become a revolutionary technology with the potential to revolutionize sustainable development planning and implementation. It plays a key role in sustainable urban development. As a branch of AI, large language models provide a powerful tool for in-depth mining and analysis of residents' sentiments.\u003c/p\u003e\u003cp\u003eAs the physical substrate of daily life, the built environment shapes residents' emotional states through multifaceted factors, including building density, functional diversity, transportation accessibility, and green infrastructure (Song et al., 2024). A compelling case was made by He et al. (2024) which leveraged Twitter data to demonstrate that areas with high population density, characterized by mixed land use and visually rich streetscapes, exhibited more positive public sentiment. Concurrently, Chen et al. (2022) employed street-view imagery and machine learning algorithms to establish a robust positive correlation between street greenery visibility and emotional pleasantness. Notably, existing literature presents conflicting conclusions that merit critical scrutiny. For example, Zhou et al. (2024) reported an inverse relationship between building density and emotional pleasantness during outdoor activities like running, whereas Wenning et al. (2023) posited that high-rise architectures could enhance positive sentiments by offering panoramic views. Discrepancies also emerge in studies on functional diversity: Tse and Tung (2022) found that commercial-residential mixing in historic districts dampened residents' emotional well-being due to tourist-induced disturbances, while Su et al. (2025) observed that moderate functional mixing effectively alleviated emotional stress. These inconsistencies underscore a critical gap: the lack of systematic theoretical frameworks and mechanistic explanations, which in turn hinders the development of targeted interventions to optimize emotional well-being through built environment modifications.\u003c/p\u003e\u003cp\u003eRecent studies have employed multi-source data\u0026mdash;including questionnaires, social media texts, and street-view imagery\u0026mdash;coupled with linear regression or machine learning algorithms to examine the associations between built environment attributes and emotional responses (Chen et al., 2024). Notable advancements include the use of Twitter-derived mental health indices and Large Language Model (LLM)-based sentiment lexicons to quantify spatial sentimental patterns (Park et al., 2024), as well as the application of the eXtreme Gradient Boosting (XGBoost) model to identify threshold effects of built environment factors on elderly travelers' emotional states (Wang et al., 2021). However, critical limitations in data and methodology persist: firstly, overreliance on small-scale surveys or static geographic datasets, which disregard spatiotemporal dynamics in emotional experiences (Conzo et al., 2021); secondly, linear modeling assumptions that fail to capture threshold effects and non-trivial interactions among environmental elements (Guo et al., 2025; Heng et al., 2021); thirdly, inadequate consideration of spatial heterogeneity, a constraint that severely limits the generalizability of findings across diverse urban contexts (Ma et al., 2021; Liu et al., 2024). These gaps not only hinder the mechanistic understanding of environment-sentiment relationships but also compromise the translational utility of research findings for evidence-based urban planning.\u003c/p\u003e\u003cp\u003eTo bridge these research gaps, this study integrates multimodal data with social media analytics, employing the Chinese-RoBERTa-wwm-ext model for semantic understanding and semantic segmentation techniques for spatial feature extraction. Innovatively combining the Extreme Gradient Boosting (XGBoost) model, SHapley Additive exPlanations (SHAP) interpreters, and Geographically Weighted Regression (GWR), this study aims to unravel the nonlinear relationships and spatial heterogeneity in the associations between built environment attributes and residents' emotional responses.\u003c/p\u003e\u003cp\u003eThe contributions of this study are threefold: first, overcoming traditional data constraints by leveraging Weibo data and high-resolution geographic big data to capture spatiotemporal dynamics in emotional experiences; second, advancing analytical rigor through the integration of Large Language Models (LLMs) and machine learning, enabling nuanced sentiment analysis and nonlinear pattern recognition; third, incorporating geospatial contextualization to decode the threshold effects and spatially varying interdependencies between built environment elements and emotional well-being.\u003c/p\u003e\u003cp\u003eThis paper is structured and organized as follows. Section \u003cspan refid=\"Sec2\" class=\"InternalRef\"\u003e2\u003c/span\u003e provides a literature review. Section \u003cspan refid=\"Sec7\" class=\"InternalRef\"\u003e3\u003c/span\u003e lists the necessary data sets and discusses the measurement of variables as well as the adopted methodology. The results are described in Section \u003cspan refid=\"Sec26\" class=\"InternalRef\"\u003e4\u003c/span\u003e. Section \u003cspan refid=\"Sec31\" class=\"InternalRef\"\u003e5\u003c/span\u003e offers discussions on this study and concluding remarks.\u003c/p\u003e"},{"header":"2 Research overview","content":"\u003cdiv id=\"Sec3\" class=\"Section2\"\u003e\u003ch2\u003e2.1 \u0026zwnj;Connotation and measurement of residents' sentiments\u003c/h2\u003e\u003cp\u003eSentiment encompasses the full spectrum of subjective cognitive experiences (He et al., 2020), encapsulating both individuals' attitudinal reactions to external stimuli and the corresponding behavioral manifestations (Zhang et al., 2020). In urban settings, the emotional responses that arise from residents' daily activities are collectively defined as residents\u0026rsquo; sentiments (Bi and Gu, 2024).\u003c/p\u003e\u003cp\u003eTraditional investigations into residents' sentiments predominantly rely on manual surveys (Pang et al., 2020; Strohbehn et al., 2020). The measurement toolkit spans a diverse range of techniques, including health scale assessments, wearable device monitoring, in-depth interviews, and experimental simulations (Baba et al., 2021; Lee et al., 2019; Ma et al., 2024). For instance, Cao et al. (2024) utilized the Positive and Negative Affect Schedule (PANAS) scale and the perceived restrictiveness scale (PRS) to derive psychological indicators, examining how specific greenway environmental features influence resident sentimental and psychological well-being. Xiang et al. (2021) leveraged wearable devices to conduct real-time tracking of heart rate variability and galvanic skin response, thereby quantifying the emotional stress levels of pedestrians in Hong Kong's high-density urban environments. However, interviews and surveys are inherently susceptible to subjective biases, posing challenges for ensuring data consistency and scalability (Conzo et al., 2021).\u003c/p\u003e\u003cp\u003eCurrently, with the widespread use of the mobile internet, a growing number of studies have attempted to adopt social media data and Natural Language Processing (NLP) technologies to conduct refined mining and analysis of residents' sentiments on a larger scale (Arora et al., 2022; Han et al., 2022). NLP technologies mainly include methods based on machine learning and deep learning. Machine learning refers to the use of methods such as support vector machines (SVM) and naive Bayes for text analysis, which tends to ignore the order of words and fails to represent the semantics of sentences and contextual relevant information (Gao et al., 2022). Deep learning mainly employs models like Bidirectional Encoder Representation from Transformers (BERT) and Long Short-Term Memory networks (LSTM)-Convolutional Neural Networks (CNN) models for sentiment scoring (Li et al., 2023). LLM is a typical application of this method (Chen et al., 2024). The approach relies on abstract features, thereby reducing the work of manual feature extraction. Moreover, it can simulate the connections between words and possesses the capabilities of local feature abstraction and memory. For instance, Guo et al. (2022) harnessed Weibo text data to analyze residents' negative emotions during the COVID-19 pandemic in Beijing. By applying a Long Short-Term Memory (LSTM) model to extract sentiment polarity indexes, they obtained scores quantifying positive and negative sentiment intensities. This paradigm overcomes traditional constraints in data volume, quality, and analytical flexibility, demonstrating distinct advantages for capturing dynamic emotional patterns (Zhang et al., 2024).\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec4\" class=\"Section2\"\u003e\u003ch2\u003e2.2 Connotation and measurement of built environment\u003c/h2\u003e\u003cp\u003eThe built environment is defined as the aggregate of human-constructed physical spaces that shape daily life, encompassing architectural structures, transportation networks, green spaces, and urban infrastructure (Hills et al.,2019). Ewing and Cervero\u0026rsquo;s seminal \"5D\" framework\u0026mdash;comprising density, diversity, design, destination accessibility, and distance to transit\u0026mdash;has become a foundational model for quantifying its characteristics (Ewing and Cervero, 2010). Building on this, recent studies have leveraged street-view imagery and machine learning: deep convolutional neural networks, for instance, have been used to identify seven categories of built environment elements and quantify their frequency and spatial distribution at the street-segment level (Hipp et al., 2022). Other research has integrated satellite remote sensing with geographic big data, employing atmospheric correction, spatiotemporal alignment, and grid processing to derive 2D and 3D classified indicators of the built environment (Yi et al., 2025).\u003c/p\u003e\u003cp\u003eAs both the physical substrate and emotional landscape of urban life, the built environment acts as a critical determinant of residents' emotional states. Well-designed environments can foster positive sentiments through multiple mechanisms (Feng and Li, 2025), whereas contemporary urbanization patterns\u0026mdash;marked by excessive building density, discontinuous streetscapes, and insufficient green infrastructure\u0026mdash;pose risks to emotional health. Prolonged exposure to such suboptimal environments has been linked to emotional disorders, underscoring the urgent need to prioritize built environment optimization. This endeavor holds the potential to simultaneously enhance emotional well-being, promote mental health, and advance sustainable urban development.\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec5\" class=\"Section2\"\u003e\u003ch2\u003e2.3 Nonlinear relationship between built environment and residents' sentiments\u003c/h2\u003e\u003cp\u003ePrevious research has predominantly focused on the linear associations between the built environment and residents' emotional states. For instance, Hills et al. (2019) found a positive correlation between urban green space ratio, pedestrian-friendliness, and residents' perceived pleasantness. Some studies argued that urban amenities significantly boost positive emotional responses in residents (Heng et al., 2021). Additionally, Rundle et al. (2007) concluded that high-density building development directly elevates residents' stress levels.\u003c/p\u003e\u003cp\u003eIn contrast, investigations into the nonlinear relationships between the built environment and residents' sentiments remain in the nascent stage. A recent study by Chen et al. (2024) employed the XGBoost model to explore the nonlinear associations between the built environment of traditional villages and tourists' positive emotions. The findings revealed an optimal green coverage interval of 15\u0026ndash;25%, beyond which the positive emotional response diminishes as green coverage increases. This research offers valuable insights for studies focusing on urban residents' emotional well-being in relation to the built environment. The XGBoost model, an advanced variant of Gradient Boosted Decision Trees (GBDT), outperforms traditional nonlinear regression methods in terms of prediction accuracy and generalization ability. It dynamically adjusts the weights of predictor variables through iterative learning and mitigates multicollinearity issues by explicitly accounting for interactions among variables (Wang et al., 2022). However, its \"black-box\" nature poses challenges: the decision-making process lacks transparency, and the results often suffer from low interpretability and credibility. To address this limitation, Lundberg and Lee (2017) introduced SHapley Additive exPlanations (SHAP), a widely adopted interpretive framework that quantifies the contribution of individual features to prediction outcomes. This approach enhances model transparency, enabling researchers to decipher complex nonlinear relationships and has proven instrumental in diverse fields exploring nonlinear relationships.\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec6\" class=\"Section2\"\u003e\u003ch2\u003e2.4 Spatial heterogeneity of built environment\u0026rsquo;s impact on residents' sentiments\u003c/h2\u003e\u003cp\u003eRecent research has underscored the pronounced spatial heterogeneity in how the built environment influences residents\u0026rsquo; emotional states. For example, Ma et al. (2021) employed Geographically Weighted Regression (GWR) to analyze sentimental patterns in Wuhan, identifying land use structure and road network density as pivotal factors shaping the spatial distribution of positive emotions. Liu et al. (2024) further validated these spatial variations through multiscale GWR analyses, particularly highlighting distinct patterns in high-density urban zones. However, a critical research gap persists: few studies have concurrently explored the spatial heterogeneity of built environment\u0026ndash;sentiment associations and their underlying nonlinear dynamics. Given that spatial heterogeneity directly informs the design and implementation of urban optimization strategies, an integrated investigation of these two dimensions is imperative for evidence-based decision-making.\u003c/p\u003e\u003cp\u003eThis study addresses this gap by integrating Weibo data with multimodal data to examine spatial heterogeneity in Qingdao, China. By combining XGBoost modeling with SHAP (SHapley Additive exPlanations) for interpretability, this study aims to uncover nonlinear relationships and interaction effects between built environment attributes and residents' sentiments. The resulting insights will offer targeted strategies to address urban emotional health challenges and advance sustainable urban development.\u003c/p\u003e\u003c/div\u003e"},{"header":"3 Research design","content":"\u003cdiv id=\"Sec8\" class=\"Section2\"\u003e\u003ch2\u003e3.1 Study area\u003c/h2\u003e\u003cp\u003eQingdao, a prominent coastal city located on the southern Shandong Peninsula, serves as a key economic hub and international gateway in northern China (Fig.\u0026nbsp;\u003cspan refid=\"Fig1\" class=\"InternalRef\"\u003e1\u003c/span\u003e). Its unique administrative significance and comprehensive development advantages are rooted in a complex historical trajectory, including late 19th to early 20th century colonial influences from Germany and Japan. This historical backdrop has fostered a multicultural urban landscape characterized by a rich built environment\u0026mdash;an eclectic blend of colonial-era architecture, modern infrastructure, and diverse cultural spaces. As documented in China's seventh national population census, the city's demographic structure is marked by gender balance, a multi-generational age distribution, high population density, and occupational diversity.\u003c/p\u003e\u003cp\u003eRapid urbanization has intensified developmental pressures, creating a spatial mosaic of historic and contemporary urban districts. This environmental complexity, combined with accelerating urban lifestyles, subjects residents to elevated social and psychological stressors that may modulate their emotional states. Qingdao's heterogeneous urban fabric thus provides an ideal research setting for investigating how built environments influence emotional well-being. The city's diverse built environment elements offer robust spatial data for analysis, while its multifaceted population ensures representative sampling\u0026mdash;attributes that enhance the generalizability and practical relevance of this study's findings.\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003cp\u003e\u003cstrong\u003eNote\u003c/strong\u003e\u003cp\u003eThese maps are from China\u0026rsquo;s Standard Map Service System.\u003c/p\u003e\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec9\" class=\"Section2\"\u003e\u003ch2\u003e3.2 Research Framework\u003c/h2\u003e\u003cp\u003eThe research framework of this study is shown in Fig.\u0026nbsp;\u003cspan refid=\"Fig2\" class=\"InternalRef\"\u003e2\u003c/span\u003e. We collected and processed residents' sentiments data from Sina Weibo alongside comprehensive built environment metrics to establish explanatory and response variables. Then employing R, Python, and ArcGIS platforms, we applied both XGBoost and GWR analyses to examine spatial variations in environmental effects, nonlinear relationships, and interaction patterns between built environment factors. Finally, we integrated these spatial and nonlinear findings to identify Typical samples for in-depth investigation of built environment impacts on residents' sentiments.\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec10\" class=\"Section2\"\u003e\u003ch2\u003e3.3 Data\u003c/h2\u003e\u003cdiv id=\"Sec11\" class=\"Section3\"\u003e\u003ch2\u003e3.3.1 Sina Weibo text data\u003c/h2\u003e\u003cp\u003eAs China\u0026rsquo;s leading microblogging platform, Sina Weibo provides geotagged user-generated content that captures real-time snapshots of daily activities, experiences, and emotional expressions. Using web crawling techniques, we collected geolocated Weibo posts in Qingdao from November 2023 to October 2024, amassing over 166,865 original entries. Each record included user demographic attributes, spatiotemporal metadata, engagement metrics, and unstructured text content. After rigorous data cleaning\u0026mdash;including the removal of advertisements, spam, and non-semantic posts\u0026mdash;over 150,794 high-quality texts remained, suitable for in-depth analysis of residents' emotional states. These georeferenced data points were then aggregated and processed in ArcGIS to establish neighborhood-level analysis units, enabling spatial sentiment mapping at the community scale.\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec12\" class=\"Section3\"\u003e\u003ch2\u003e3.3.2 Street-view imagery data\u003c/h2\u003e\u003cp\u003eBaidu Maps, one of China's premier digital mapping services, boasts a massive user base and delivers highly accurate, frequently updated geographic data. To characterize Qingdao's built environment, we systematically sampled the urban landscape by generating 726,631 geospatial points at 30-meter intervals, yielding 123,188 Baidu Street View images from 2024 (each with a resolution of 2048\u0026times;664 pixels). Following rigorous quality control\u0026mdash;including image validation and removal of transient elements like vehicles\u0026mdash;we employed semantic segmentation using a pretrained PSPNet model. As illustrated in Fig.\u0026nbsp;\u003cspan refid=\"Fig3\" class=\"InternalRef\"\u003e3\u003c/span\u003e, this deep convolutional neural network, trained on the ADE20K dataset, identifies 150 object categories (e.g., buildings, vegetation, urban infrastructure). The segmentation results enabled quantitative measurement of key streetscape features including pedestrian space allocation, visual permeability through interface transparency, and environmental exposure indices for sky and greenery visibility.\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec13\" class=\"Section3\"\u003e\u003ch2\u003e3.3.3 Point of Interest (POI) data\u003c/h2\u003e\u003cp\u003eWe acquired over 420,000 POI records in Qingdao for 2024 through the Baidu Map API, followed by rigorous quality control: coordinate calibration, name standardization, and removal of duplicate or outdated entries. The refined dataset is categorized into ten functional groups: shopping centers, food services, commercial facilities, daily living services, leisure and entertainment venues, tourist attractions, hotels, transportation hubs, educational institutions, and medical centers.\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec14\" class=\"Section3\"\u003e\u003ch2\u003e3.3.4 Building footprints data\u003c/h2\u003e\u003cp\u003eThree complementary datasets were collected via the Baidu Map API in 2024. The building outline dataset underwent rigorous validation using satellite imagery and street-view photographs to rectify positional deviations and remove records of demolished structures. Following filtering by functional type and exclusion of temporary constructions, 2,230,360 validated building records were retained, each containing detailed geometric parameters (e.g., footprint area, perimeter) and dimensional attributes (e.g., height, floor count).\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec15\" class=\"Section3\"\u003e\u003ch2\u003e3.3.5 Transportation data\u003c/h2\u003e\u003cp\u003eTransportation data for Qingdao was acquired via the Baidu Map API in 2024. Road network datasets underwent topological processing to resolve connectivity inconsistencies, followed by classification into hierarchical road types (e.g., expressways, arterials, local streets). After excluding elevated highways and tunnels, the refined road network comprised 8,562 valid road segments. Transportation infrastructure data\u0026mdash;including 172 subway stations and 9,154 bus stops within the municipal boundary\u0026mdash;was manually validated against official route maps to ensure spatial accuracy.\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec16\" class=\"Section3\"\u003e\u003ch2\u003e3.3.6 Urban greening data\u003c/h2\u003e\u003cp\u003eUrban green space boundaries (parks, public green areas) in Qingdao for 2024 were acquired via the Baidu Map API, with entrance locations manually validated using integrated Baidu Map interfaces and street-view imagery. To quantify vegetation characteristics, 2023 remote sensing data from the Geospatial Data Cloud was utilized to derive the Normalized Difference Vegetation Index (NDVI). ArcGIS was employed to perform cloud removal on the NDVI raster dataset, followed by masking non-vegetated areas (NDVI\u0026thinsp;\u0026le;\u0026thinsp;0) to exclude outliers from subsequent analyses.\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec17\" class=\"Section3\"\u003e\u003ch2\u003e3.3.7 Population demographic data\u003c/h2\u003e\u003cp\u003eStreet-level demographic statistics from China's seventh national population census were integrated with Qingdao's administrative boundary data using ArcGIS. Through spatial linkage analysis, population metrics were reconciled with township-level boundaries, involving toponymic standardization to resolve geographical discrepancies. This spatial matching process enabled the precise calculation of population density indices for each neighborhood-level analysis unit, furnishing critical demographic controls for analyzing residents\u0026rsquo; emotional patterns across diverse built environment contexts.\u003c/p\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv id=\"Sec18\" class=\"Section2\"\u003e\u003ch2\u003e3.4 Variables\u003c/h2\u003e\u003cdiv id=\"Sec19\" class=\"Section3\"\u003e\u003ch2\u003e3.4.1 Spatial unit division\u003c/h2\u003e\u003cp\u003eThe 15-minute community life circle concept defines the basic activity radius for residents' daily needs and emotional experiences, serving as the fundamental spatial scale for investigating built environment\u0026ndash;sentiment associations. In this study, ArcGIS was used to generate 15-minute community life circles as service areas through network analysis. Using Qingdao's road infrastructure as the transport network, neighborhood centroids as facility nodes, and a 15-minute travel time as the impedance threshold, we derived 2,902 spatial units. This approach ensures that each unit captures the functional connectivity and mobility patterns relevant to residents' daily sentimental experiences.\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec20\" class=\"Section3\"\u003e\u003ch2\u003e3.4.2 Explained variables\u003c/h2\u003e\u003cp\u003eFor sentiment detection in Weibo texts, we employed the Chinese-RoBERTa-wwm-ext model, an advanced BERT variant leveraging bidirectional Transformer architecture (analysis process outlined in Fig.\u0026nbsp;\u003cspan refid=\"Fig4\" class=\"InternalRef\"\u003e4\u003c/span\u003e). Distinct from conventional unidirectional models, this approach processes contextual information in both forward and backward directions, enabling nuanced interpretation of textual emotions (Wenning et al., 2023). The model's superior contextual comprehension allows for accurate extraction of residents' sentiments indicators from social media discourse.\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003cp\u003eTo enhance sentiment classification accuracy, the model structure was optimized by replacing the traditional Linear Layer with a Gate Recurrent Unit (GRU) as the output layer. The SMP2020 Weibo Sentiment Classification Evaluation dataset\u0026mdash;rich in labeled samples\u0026mdash;was employed for training, randomly split into training/validation/test sets at an 8:1:1 ratio. Auxiliary data were integrated into the training set to expand the model\u0026rsquo;s semantic understanding and emotional recognition capabilities. During training, model parameters were iteratively updated using the Cross Entropy Loss Function (CELF) over ~\u0026thinsp;40 epochs until loss convergence and validation set performance stabilization, yielding a transfer-learning Weibo sentiment model. Evaluation metrics demonstrated strong performance: accuracy of 0.9025, precision of 0.9045, recall of 0.900, and F1-score of 0.9023, meeting subsequent prediction requirements.\u003c/p\u003e\u003cp\u003eComparison experiments with two mainstream pre-training models\u0026mdash;Roberta-wwm-ext-large and Baidu's open-source ERNIE 3.0\u0026mdash;validated model superiority. Roberta-wwm-ext-large achieved 0.89 precision, while ERNIE 3.0 reached 0.82, both below the Chinese-RoBERTa-wwm-ext model's performance. The final model outputs probabilities of positive/negative sentiments (ranging from 0 to 1), serving as sentiment scores for subsequent analysis.\u003c/p\u003e\u003cp\u003eThe sentiment analysis results were mapped in ArcGIS (Fig.\u0026nbsp;\u003cspan refid=\"Fig5\" class=\"InternalRef\"\u003e5\u003c/span\u003e). Warmer colors indicate positive sentiment, while cooler colors denote negative sentiment. Urban cores and coastal areas show predominantly warm hues, reflecting higher emotional levels. In contrast, fringe areas exhibit cooler tones, suggesting lower sentiment scores.\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec21\" class=\"Section3\"\u003e\u003ch2\u003e3.4.3 Explanatory variables\u003c/h2\u003e\u003cp\u003eDrawing on the established \"5D\" framework (Ewing and Cervero, 2010) and Qingdao's unique urban characteristics, we developed a comprehensive set of built environment metrics. Table\u0026nbsp;\u003cspan refid=\"Tab1\" class=\"InternalRef\"\u003e1\u003c/span\u003e details the indicator categories and measurement methods.\u003c/p\u003e\u003cp\u003e\u003cdiv class=\"gridtable\"\u003e\u003ctable float=\"Yes\" id=\"Tab1\" border=\"1\"\u003e\u003ccaption language=\"En\"\u003e\u003cdiv class=\"CaptionNumber\"\u003eTable 1\u003c/div\u003e\u003cdiv class=\"CaptionContent\"\u003e\u003cp\u003eBuilt environment indicators and measurement methods\u003c/p\u003e\u003c/div\u003e\u003c/caption\u003e\u003ccolgroup cols=\"4\"\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c1\" colnum=\"1\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c2\" colnum=\"2\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c3\" colnum=\"3\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c4\" colnum=\"4\"\u003e\u003c/div\u003e\u003cthead\u003e\u003ctr\u003e\u003cth align=\"left\" colname=\"c1\"\u003e\u003cp\u003eCategory\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c2\"\u003e\u003cp\u003eVariable\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c3\"\u003e\u003cp\u003eData source\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c4\"\u003e\u003cp\u003eMeasurement method\u003c/p\u003e\u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eDensity\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003ePlot ratio\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eBuilding footprints\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003eRatio of Gross floor area to living area\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u0026nbsp;\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eBuilding density\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eBuilding footprints\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003eRatio of ground floor area to living area\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u0026nbsp;\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003ePopulation density\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003ePopulation\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003eRatio of the population of the street to the area of the street\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eFunction\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eFunctional density\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003ePOI\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003eDensity of the number of POIs in this life circle\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u0026nbsp;\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eFunctional completeness\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003ePOI\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003eRatio of the number of POI types to the number of all types of POIs in this life circle\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u0026nbsp;\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eFunctional diversity\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003ePOI\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003eUsing the information entropy formula, n is the number of POI categories and Pi denotes the ratio of the total number of POIs in the life circle where the number of POIs of a particular category is located\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eTransportation\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eTransportation accessibility\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eTransportation\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003eMinimum walking time from the center of the life circle to the nearest subway entrance\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u0026nbsp;\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eWalking accessibility\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eTransportation\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003eMinimum walking time from the center of the life circle to the nearest bus stop\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eStreet space\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eD/H ratio\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eBuilding footprints\u003c/p\u003e\u003cp\u003eTransportation\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003eRatio of road width to the height of building facades along the street\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u0026nbsp;\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eThe proportion of pedestrian space\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eStreet-view imagery\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003eWidth of sidewalk as a percentage of pedestrian field of view\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u0026nbsp;\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eInterface transparency\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eStreet-view imagery\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003eRatio of the total length of open frontage and clear windows and doors on both sides of the street to the total building footprint length\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u0026nbsp;\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eOpenness of sky\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eStreet-view imagery\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003eProportion of sky to pedestrian's field of view Proportion\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eVegetation\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eAccessibility of park\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eUrban greening\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003eMinimum walking time from the center of the life circle to the nearest park entrance\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u0026nbsp;\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eGreen visual index\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eStreet-view imagery\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003eProportion of street greening to pedestrian view\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u0026nbsp;\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eVegetation coverage\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eUrban greening\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003eSubstitute the formula: VFC = (NDVI - NDVIs)/ ( NDVIv - NDVIs)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/colgroup\u003e\u003c/table\u003e\u003c/div\u003e\u003c/p\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv id=\"Sec22\" class=\"Section2\"\u003e\u003ch2\u003e3.5 Methods\u003c/h2\u003e\u003cdiv id=\"Sec23\" class=\"Section3\"\u003e\u003ch2\u003e3.5.1 eXtreme Gradient Boosting (XGBoost)\u003c/h2\u003e\u003cp\u003eTo characterize the nonlinear associations between built environment attributes and residents' emotional states, we employed the XGBoost model, an advanced ensemble learning algorithm. As a gradient-boosted decision tree (GBDT) framework, XGBoost surpasses traditional regression models in predictive accuracy and generalization capability, primarily through two key innovations: 1) second-order Taylor expansion for loss function approximation, which enhances computational precision; and 2) algorithmic optimizations that balance efficiency and performance (Chen and Guestrin, 2016; Friedman, 2001). However, the model\u0026rsquo;s \"black-box\" nature necessitates interpretive tools. To address this, we integrated SHapley Additive exPlanations (SHAP), a game theory-based approach that quantifies each feature\u0026rsquo;s marginal contribution to predictions relative to a baseline. This enables precise evaluation of feature importance and directional effects (positive/negative) (Lundberg et al., 2018).\u003c/p\u003e\u003cp\u003eThe model specifies built environment indicators as independent variables and residents' sentiment scores as the dependent variable, with the objective function defined as:\u003cdiv id=\"Equ1\" class=\"Equation\"\u003e\u003cdiv format=\"TEX\" class=\"mathdisplay\" id=\"FileID_Equ1\" name=\"EquationSource\"\u003e\n$$\\:\\mathcal{L}=\\sum\\:_{i=1}^{n}l\\left({y}_{i},{\\widehat{y}}_{i}\\right)+\\sum\\:_{k=1}^{K}\\varOmega\\:\\left({f}_{k}\\right)$$\u003c/div\u003e\u003cdiv class=\"EquationNumber\"\u003e1\u003c/div\u003e\u003c/div\u003e\u003c/p\u003e\u003cp\u003ewhere \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\(\\:{\\Omega\\:}\\left({\\text{f}}_{\\text{k}}\\right)\\)\u003c/span\u003e\u003c/span\u003e denotes the regularization term for the k-th tree, typically formulated as:\u003cdiv id=\"Equ2\" class=\"Equation\"\u003e\u003cdiv format=\"TEX\" class=\"mathdisplay\" id=\"FileID_Equ2\" name=\"EquationSource\"\u003e\n$$\\:\\varOmega\\:\\left(f\\right)=\\gamma\\:T+\\frac{1}{2}\\lambda\\:\\sum\\:_{j=1}^{T}{w}_{j}^{2}$$\u003c/div\u003e\u003cdiv class=\"EquationNumber\"\u003e2\u003c/div\u003e\u003c/div\u003e\u003c/p\u003e\u003cp\u003ewhere \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\(\\:T\\)\u003c/span\u003e\u003c/span\u003e represents the number of leaf nodes of the tree, \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\(\\:\\gamma\\:\\)\u003c/span\u003e\u003c/span\u003e and \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\(\\:\\lambda\\:\\)\u003c/span\u003e\u003c/span\u003e are regularization parameters, and \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\(\\:{w}_{j}\\)\u003c/span\u003e\u003c/span\u003e is the weight of the j-th leaf node.\u003c/p\u003e\u003cp\u003eTo decode feature contributions in predictive modeling, SHAP (SHapley Additive exPlanations) quantifies the marginal impact of each explanatory variable on model outputs relative to a predefined baseline. This method enables fine-grained interpretation of individual built environment indicators\u0026mdash;revealing not only their absolute importance but also the nonlinear nature of their associations with residents\u0026rsquo; emotional states. Partial dependence plots (PDPs) visually characterize these relationships, illustrating how sentiment scores shift as a specific feature varies while averaging out other variables' effects. This dual approach of SHAP value calculation and PDP visualization bridges the gap between black-box modeling and interpretable insights, facilitating evidence-based interpretation of complex environment-emotion interdependencies.\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec24\" class=\"Section3\"\u003e\u003ch2\u003e3.5.2 Geographically Weighted Regression (GWR)\u003c/h2\u003e\u003cp\u003eGeographically Weighted Regression (GWR) represents a spatially explicit analytical framework widely utilized to characterize spatial non-stationarity in variable relationships. Distinct from Ordinary Least Squares (OLS) regression, GWR elevates model precision by enabling regression coefficients to adapt across geographic locations, thus facilitating a more nuanced capture of localized spatial dynamics. This methodology has found extensive applications in domains including urban planning, public health, and environmental science (Fotheringham and Oshan, 2016). Notwithstanding its utility, the optimization of model performance and validation of robust outcomes necessitate careful attention to critical factors, such as bandwidth calibration and the mitigation of multicollinearity issues.\u003c/p\u003e\u003cp\u003eIn this study, we leveraged the R-language packages spgwr and related dependencies to explore the spatial heterogeneity of built environment impacts on residents' sentiments in Qingdao. The analytical workflow entailed: preprocessing missing values, calculating optimal bandwidths via cross-validation, and mapping the spatially varying coefficients of built environment indicators (e.g., green space ratio, street connectivity). GWR outputs were subsequently converted to sf objects for spatial visualization and interpretation in ArcGIS, enabling the identification of localized effect patterns and hotspots of environmental-sentiment relationships.\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec25\" class=\"Section3\"\u003e\u003ch2\u003e3.5.3 Integrative Framework of XGBoost and GWR\u003c/h2\u003e\u003cp\u003eThe XGBoost algorithm was employed to identify critical predictive factors while accommodating their nonlinear threshold effects and intricate interactions through gradient-boosted feature importance ranking. Concurrently, GWR was applied to model spatial non-stationarity in the built environment-sentiment nexus, enabling the visualization of geographically varying coefficient estimates. This hybrid approach addresses the limitations of traditional spatial regression models in capturing nonlinearity while enhancing interpretability through SHAP (SHapley Additive exPlanations) value decomposition.\u003c/p\u003e\u003cp\u003eTo systematically analyze spatial heterogeneity, we classified life circles into three typologies based on urban form indices (e.g., density, diversity, design). From each typology, four life circles exhibiting the highest residual variances in GWR modeling were selected as representative cases. This strategic sampling allowed for in-depth exploration of context-specific environmental-sentiment relationships, with SHAP waterfall plots offering granular insights into feature contributions at the local scale.\u003c/p\u003e\u003c/div\u003e\u003c/div\u003e"},{"header":"4 Results","content":"\u003cdiv id=\"Sec27\" class=\"Section2\"\u003e\u003ch2\u003e4.1 Nonlinear relationships between residents\u0026rsquo; sentiments and built environment\u003c/h2\u003e\u003cp\u003eThe XGBoost model evaluation yielded an accuracy of 0.815, precision of 0.901, recall of 0.852, and F1 score of 0.895, demonstrating robust predictive performance for subsequent analyses. Feature contribution analysis results are visualized in Fig.\u0026nbsp;\u003cspan refid=\"Fig6\" class=\"InternalRef\"\u003e6\u003c/span\u003e. The left panels of Fig.\u0026nbsp;\u003cspan refid=\"Fig6\" class=\"InternalRef\"\u003e6\u003c/span\u003e(a) and 6(b) display descending-ranked average SHAP (SHapley Additive exPlanations) values for each feature, while the right panels illustrate distributional SHAP values across all samples\u0026mdash;including both positive and negative effect directions. In these visualizations, individual data points represent SHAP values indicating each feature's contribution to specific predictions, ordered by mean absolute SHAP values to highlight the most influential predictors. The x-axis denotes SHAP values, reflecting both the magnitude and direction of feature impacts, while a blue-to-red color gradient corresponds to feature value intensities (blue\u0026thinsp;=\u0026thinsp;lower values, red\u0026thinsp;=\u0026thinsp;higher values).\u003c/p\u003e\u003cp\u003eKey findings reveal that functional density exhibits the strongest positive association with residents' sentiments, whereas park accessibility and sky openness show significant negative correlations. By contrast, walking accessibility, green visual index, and plot ratio exerted relatively muted effects. These results suggest that strategically increasing urban facility density could enhance resident wellbeing, while Qingdao\u0026rsquo;s existing park infrastructure may already be sufficient\u0026mdash;with potential diminishing returns from further development. Notably, while adequate sky exposure is beneficial, excessive openness may exacerbate environmental stressors and degrade sentimental wellbeing, underscoring the need for balanced urban design that reconciles spatial openness with human comfort.\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003cp\u003eThe partial dependence plot in Fig.\u0026nbsp;\u003cspan refid=\"Fig7\" class=\"InternalRef\"\u003e7\u003c/span\u003e illuminates the nonlinear relationships between built environment factors and residents' sentiments, illustrating how the magnitude of impact fluctuates across distinct value spectrums of explanatory variables. This visualization uncovers nuanced threshold effects. Such insights underscore the importance of context-specific design thresholds in urban planning, as linear assumptions may overlook critical inflection points in environmental-sentiment relationships.\u003c/p\u003e\u003cp\u003e(\u003cspan citationid=\"CR1\" class=\"CitationRef\"\u003e1\u003c/span\u003e) \u003cb\u003eDensity\u003c/b\u003e\u003c/p\u003e\u003cp\u003eThe analysis uncovers nuanced relationships between built environment indicators and residents' emotional states. The plot ratio demonstrates negligible influence, with effect sizes consistently fluctuating around zero. For building density, negative impacts gradually diminish when values are below 0.03, while densities exceeding 0.3 show trivial effects. Population density exhibits a threshold-dependent pattern: it enhances positive sentiment when below 0.002 people/m\u0026sup2;, but becomes detrimental above this threshold. Extremely high densities (exceeding 0.006 people/m\u0026sup2;) initially produce alternating effects before stabilizing.\u003c/p\u003e\u003cp\u003e(\u003cspan citationid=\"CR2\" class=\"CitationRef\"\u003e2\u003c/span\u003e) \u003cb\u003eFunction\u003c/b\u003e\u003c/p\u003e\u003cp\u003eThe analysis reveals that functional density exerts differential impacts on residents' sentimental health. When values are below 0.0003, functional density significantly undermines sentiment, with negative effects gradually waning as the density surpasses this threshold. Regarding functional completeness, it shifts from a neutral to a positive influence when exceeding 0.7, underscoring the pivotal role of comprehensive amenities in enhancing emotional well-being. Functional diversity, conversely, exhibits an optimal range below \u0026minus;\u0026thinsp;0.7; beyond this point, excessive variety may attenuate the positive effects on sentiment. Collectively, these findings underscore the criticality of achieving a balanced mix of facilities to promote residents' psychological wellness.\u003c/p\u003e\u003cp\u003e(\u003cspan citationid=\"CR3\" class=\"CitationRef\"\u003e3\u003c/span\u003e) \u003cb\u003eTransportation\u003c/b\u003e\u003c/p\u003e\u003cp\u003eMirroring Qingdao\u0026rsquo;s status as a tourist-centric city, subway stations are characterized by high pedestrian congestion. When the walking time to subway stations is within 20 minutes, the negative impact on residents' sentiment suggests a tendency to avoid these crowded areas. As the walking time extends beyond 20 minutes, the influence gradually shifts from negative to positive before reaching a stable state. Regarding bus stops, those within a 2-minute walking distance often feature noisy environments, which significantly deteriorate residents\u0026rsquo; sentimental health. Conversely, the impact becomes positive when the walking distance ranges from 2 to 10 minutes. However, bus stops located excessively far away compromise travel convenience, potentially inducing negative sentiment among residents.\u003c/p\u003e\u003cp\u003e(\u003cspan citationid=\"CR4\" class=\"CitationRef\"\u003e4\u003c/span\u003e) \u003cb\u003eStreet space\u003c/b\u003e\u003c/p\u003e\u003cp\u003eThe analysis indicates that a D/H ratio below 0.8 exerts a favorable influence on residents' emotional states. Conversely, when the ratio exceeds 1.3, the impact fluctuates around zero before gradually intensifying. Regarding the pedestrian space proportion, values below 0.13 are associated with a negative effect, suggesting that expanding walkways to create more spacious pedestrian areas could enhance residents' sentiment. Interface transparency below 0.0005 positively affects residents' emotions, yet building facades with higher permeability beyond this threshold do not yield additional benefits. Sky openness within the range of 0.4 to 0.55 significantly elevates residents' emotional well-being; however, overly restricted sky views may trigger depressive feelings, while overly expansive views can evoke a sense of isolation.\u003c/p\u003e\u003cp\u003e(\u003cspan citationid=\"CR5\" class=\"CitationRef\"\u003e5\u003c/span\u003e) \u003cb\u003eVegetation\u003c/b\u003e\u003c/p\u003e\u003cp\u003eThe results demonstrate that when park accessibility is within a 10-minute range, it exerts a positive influence, consistent with residents' preferences for nearby green spaces. However, as the travel time exceeds this threshold, the impact turns negative, potentially contributing to adverse emotional states. For parks situated 40 to 50 minutes away, residents tend to favor larger-scale green areas; yet, when accessibility extends beyond 50 minutes, the benefits of such parks significantly diminish. Vegetation coverage below 0.25 could be augmented to enhance residents' sentiment, as denser vegetation may impede pedestrian mobility and natural light penetration. Similarly, a green visual index below 0.15 indicates that increased street greening would likely improve residents' emotional well-being, but values surpassing this threshold may paradoxically reduce positive sentiment.\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec28\" class=\"Section2\"\u003e\u003ch2\u003e4.2 Interaction effects\u003c/h2\u003e\u003cp\u003eThis section quantifies the interaction effects among built environment indicators and identifies the top 10 variable pairs with the strongest interactive influences for in-depth analysis (Fig.\u0026nbsp;\u003cspan refid=\"Fig8\" class=\"InternalRef\"\u003e8\u003c/span\u003e).\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003cp\u003eThe results of this study reveal complex interactions between various built environment variables and residents' emotional states, with the relationships evolving as one factor influences another (Fig.\u0026nbsp;\u003cspan refid=\"Fig9\" class=\"InternalRef\"\u003e9\u003c/span\u003e). Notably, there is no positive correlation between interface transparency and functional density in Qingdao's high-density functional zones. This lack of correlation can be attributed to the prevalence of brick-walled streetscapes with limited permeable glazing. However, as functional density exceeds a certain threshold of 0.003, the interaction between these variables shifts from negative to positive before stabilizing. In terms of sky openness, the data show a gradual decrease as population density increases. Higher density typically reduces street-level visibility due to functional agglomeration and neighborhood congestion. When population density is below 0.002 persons/m\u0026sup2;, the relationship remains strongly positive, but it weakens and approaches neutrality as density increases. Furthermore, a positive correlation between functional density and population density is consistent with typical urban development patterns. This reflects how urban functions tend to attract greater demographic aggregation, stabilizing at higher values above 0.0003. The relationship between transportation accessibility and functional density exhibits a nuanced dynamic. Specifically, when transit times are less than 20 minutes, the interaction is negative, but it reverses to positive values when transit times exceed this threshold. As functional density increases, the interaction with functional diversity becomes increasingly positive, particularly when the density exceeds 0.0003. In contrast, samples with higher park accessibility tend to contribute more significantly to the green visual index when the accessibility is below 0.15, while those with lower accessibility show a more substantial contribution above this threshold. Building density, which promotes a greater diversity of urban functions, also plays a crucial role in enhancing functional completeness. The interaction between these two variables initially appears negative, becomes neutral at a density of 0.2, and then turns negative again. Similarly, the relationship between functional diversity and park accessibility does not follow a simple linear trend. It alternates between positive and negative effects when accessibility is under 50 minutes but becomes uniformly negative beyond this point. Another significant finding is the positive correlation between sky openness and interface transparency within the range of 0.4 to 0.6. This relationship suggests that well-designed streetscapes, where both factors are optimized, can enhance residents' emotional states. However, this synergy begins to deteriorate rapidly when sky openness exceeds 0.55. Finally, the data suggest that functional completeness increases as functional density rises. Notably, this enhanced completeness contributes synergistically to the improvement of residents' sentiments when functional density surpasses 0.0003.\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec29\" class=\"Section2\"\u003e\u003ch2\u003e4.3 Spatial heterogeneity\u003c/h2\u003e\u003cp\u003eThe GWR model results indicate significant spatial autocorrelation (Moran's I\u0026thinsp;=\u0026thinsp;0.222, p\u0026thinsp;\u0026lt;\u0026thinsp;0.001). With a Z-score of 1.033 falling within the random distribution range, the model residuals exhibit random spatial patterns, confirming appropriate model specification. The analysis reveals pronounced spatial heterogeneity in the impacts of built environment elements on residents' emotional states across Qingdao (Fig.\u0026nbsp;\u003cspan refid=\"Fig10\" class=\"InternalRef\"\u003e10\u003c/span\u003e).\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003cp\u003eThe analysis reveals distinct spatial gradients in the impacts of built environment variables across Qingdao: building density, functional density, walking accessibility, sky openness, and vegetation coverage exhibit stronger effects in northern Qingdao, following a south-to-north increasing gradient, while transportation accessibility, D/H ratio, green visual index, and interface transparency exert greater influence in southern regions with a clear north-to-south increasing trend. Functional completeness, plot ratio, functional diversity, and pedestrian space proportion show stronger impacts in western areas with effects diminishing eastward, whereas vegetation coverage follows the opposite west-to-east increasing pattern. Notably, park accessibility demonstrates weaker effects in Qingdao's urban core compared to surrounding regions.\u003c/p\u003e\u003cp\u003eThe contextual mechanisms of these spatial patterns are rooted in multiple interrelated factors: Qingdao's urban core and surrounding developing areas, characterized by high-density built environments, fast-paced lifestyles, and comprehensive amenities, strongly shape residents' emotional states, with established districts hosting stable, concentrated populations and emerging areas experiencing dynamic fluctuations from urban-rural migration and transient workers. The urban core's high functional density and diversity efficiently meets daily needs, yielding moderate sentiment effects, while remote townships with limited facilities show more pronounced impacts\u0026mdash;further modulated by the core's innovative tourist amenities boosting local incomes. Although Qingdao's transportation network serves most districts adequately, developing industrial bases in some areas heighten reliance on transport and pedestrian access, amplifying emotional effects. Central urban areas, featuring architectural landmarks and iconic streets, are particularly sensitive to the D/H ratio, pedestrian space proportion, and interface transparency, with sky openness exerting strong effects as both overly dense and sparse configurations undermine wellbeing. Lastly, the fast-paced urban core's emotional stress makes accessible parks and moderate street vegetation critical for recovery, with the urban center's sparser greenery compared to outskirts exacerbating this need and underscoring vegetation's pivotal role in emotional health.\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec30\" class=\"Section2\"\u003e\u003ch2\u003e4.4 Typical case analysis\u003c/h2\u003e\u003cp\u003eUsing clustering algorithms in R, we categorized the life circles with the NBClust package identifying three optimal clusters (spatial distribution shown in Fig.\u0026nbsp;\u003cspan refid=\"Fig11\" class=\"InternalRef\"\u003e11\u003c/span\u003e). Class A areas predominantly occupy the peripheries of administrative cities, characterized by sparse distributions. These slowly developing zones exhibit low building density, obsolete functional facilities, poor transportation accessibility, inadequate street planning, and predominantly natural vegetation coverage. Class B areas are concentrated in the urban cores of each administrative division, forming centralized clusters. These zones feature high building density, complete functional amenities, excellent transportation accessibility, well-designed pedestrian spaces, and concentrated park access with substantial vegetation coverage. Class C areas primarily lie in the central zones of administrative divisions, displaying clustered distributions. Despite high building density and quality facilities, these areas have mixed building ages, high population density, traffic congestion, disorganized pedestrian spaces, and uneven distribution of the green visual index.\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003cp\u003eClass A life circles are predominantly situated in the peripheral zones of municipal administrative districts, characterized by developmental constraints\u0026mdash;including aging infrastructure, incomplete urban amenities, limited transportation access, subpar street design, and insufficient green spaces. Analysis of typical samples identifies five built environment indicators with particularly pronounced impacts on residents' emotional states: functional density, park accessibility, sky openness, vegetation coverage, and interface transparency, among which functional density exerts the most substantial effect (Fig.\u0026nbsp;\u003cspan refid=\"Fig12\" class=\"InternalRef\"\u003e12\u003c/span\u003e). This result is relatively consistent with the contribution degree of global characteristic variables. The presence of comprehensive functional facilities fosters economic opportunities that significantly influence residents' daily routines and sustainably shape their emotional well-being. While the findings from the four studied life circles generally align with the GWR model's spatial patterns, local spatial and socioeconomic contexts give rise to indicator variations. For example, Life circle A1 features vegetation coverage significantly higher than the district average, attributed to its proximity to Mengwangshan Park. This abundant greenery substantially elevates local environmental quality and emotional wellness. Similarly, Life circle A3 exhibits unique park accessibility dynamics: although located near coastal parks, its tourism-oriented economy results in visitor-dominated green spaces, making accessible urban parks particularly vital for maintaining residents' positive sentiment.\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003cp\u003eClass B life circles predominantly concentrate in the urban cores of administrative divisions, characterized by mature infrastructure and comprehensive amenities that foster optimal living conditions. Analysis of typical samples identifies five built environment indicators with significant impacts on residents' emotional states: functional density, vegetation coverage, park accessibility, population density, and sky openness\u0026mdash;with functional density demonstrating the strongest influence (Fig.\u0026nbsp;\u003cspan refid=\"Fig13\" class=\"InternalRef\"\u003e13\u003c/span\u003e). The high population density in urban centers necessitates robust functional support to meet daily needs, substantially shaping residents' sentiments. Notably, four life circles exhibit indicator variations from GWR model predictions. Life circle B1, due to its peripheral location within the urban core and underdeveloped infrastructure, displays atypical functional density\u0026mdash;targeted enhancements here could potentially improve residents\u0026rsquo; emotional well-being. In Life circle B2, the impact of vegetation coverage deviates from district norms: adjacent apparel industries prioritize production over greening, such that excessive vegetation expansion might encroach on industrial spaces, potentially diminishing sentiment. Life circle B4 presents unique interactions between population density and vegetation coverage: hosting university students and tech professionals near exhibition facilities, this configuration fosters positive sentiment, though measured increases in park greening could further enhance well-being without compromising existing advantages.\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003cp\u003eClass C life circles predominantly cluster in Qingdao's central urban areas, where the juxtaposition of historic and contemporary urban fabrics creates intricate spatial configurations. While the built environment meets daily needs adequately, it concurrently struggles with environmental disarray and traffic congestion. Analysis of typical samples identifies five key built environment indicators significantly shaping residents' emotional states: functional density, vegetation coverage, park accessibility, population density, and green visual index\u0026mdash;with functional density emerging as the most influential factor (Fig.\u0026nbsp;\u003cspan refid=\"Fig14\" class=\"InternalRef\"\u003e14\u003c/span\u003e). Similar to the results of the GWR model, in the southern central urban area, factors such as greening and accessibility have a relatively significant impact on residents' sentiments. Life circle C1 demonstrates typical vegetation coverage effects, where existing parks and high building density limit potential gains in sky openness, implying marginal returns from additional greening. Life circle C2 displays unconventional building density impacts, benefiting from measured density increases that introduce mixed-use functions and foster social interaction. Life circle C3 shows exceptional sensitivity to functional density, population density, and sky openness, influenced by its proximity to the International Convention Center, which enhances functionality but may impede mobility. Life circle C4 reveals unique dynamics between functional density and park accessibility: modernizing aging facilities could improve convenience, while alleviating congestion on popular park access routes would significantly boost sentiment.\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003c/div\u003e"},{"header":"5 Discussion and Conclusion","content":"\u003cdiv id=\"Sec32\" class=\"Section2\"\u003e\u003ch2\u003e5.1 Discussion\u003c/h2\u003e\u003cp\u003eThis study innovatively constructs a comprehensive framework based on multimodal data and AI to explore the nonlinear relationships and spatial heterogeneity between the built environment and residents\u0026rsquo; sentiments. This approach addresses critical gaps in existing research through methodological and data-source innovations, and deepens the role of AI in enhancing sustainable development planning.\u003c/p\u003e\u003cp\u003e(\u003cspan citationid=\"CR1\" class=\"CitationRef\"\u003e1\u003c/span\u003e) \u003cb\u003eInnovations in this study\u003c/b\u003e\u003c/p\u003e\u003cp\u003eOur methodology overcomes the constraints of traditional research by using an LLM to extract sentiments from Weibo data, combined with comprehensive geographic datasets, thus enhancing data objectivity and spatial representativeness. The integrated application of the Geographically Weighted Regression (GWR) and XGBoost models enables simultaneous analysis of spatial patterns, nonlinear effects, and interactive relationships\u0026mdash;markedly advancing beyond traditional analytical frameworks.\u003c/p\u003e\u003cp\u003eIn the field of contemporary research on sustainable urban development, the in-depth integration of various artificial intelligence technologies and multimodal data is exerting a revolutionary influence, providing a new paradigm for the construction of data-empowered decision-making mechanisms and the advancement of municipal research. From the perspective of artificial intelligence technologies, they cover a variety of cutting-edge technologies such as machine learning, deep learning, natural language processing, and computer vision. These technologies can conduct pattern mining on the massive historical data generated in urban operations and effectively identify the underlying laws behind nonlinear problems such as changes in urban environmental quality. Computer vision technology, in particular, can rely on image data to monitor spatial information such as urban green space coverage, building density, and road conditions in real-time, thus providing an intuitive and dynamic visual basis for urban planning.\u003c/p\u003e\u003cp\u003e(\u003cspan citationid=\"CR2\" class=\"CitationRef\"\u003e2\u003c/span\u003e) \u003cb\u003eTheoretical contributions brought by the combination of multiple AI technologies\u003c/b\u003e\u003c/p\u003e\u003cp\u003eThe integration of multiple artificial intelligence technologies with multimodal data can open up new theoretical perspectives for the research on the relationship between residents' sentiments and the built environment. \u003c/p\u003e\u003cp\u003eFirstly, we break through the single focus on linear relationships in previous studies. By systematically integrating machine learning, SHAP, GWR, and automatic clustering models, a multi-dimensional analysis system is formed. Machine learning models can capture complex association patterns that are difficult to identify by traditional linear models; the SHAP explanation framework can accurately decompose the action mechanism of various influencing factors. For instance, we find that walking accessibility beyond 10 minutes has a minimal effect on enhancing residents' sentiments; Sky openness demonstrates an inverted U-curve relationship with sentiment, peaking at 0.4\u0026ndash;0.55. The GWR model further incorporates spatial dimensions into consideration, and the automatic clustering model can classify regions with similar impact patterns, providing a basis for subsequent targeted analysis. For instance, the plot ratio in suburban areas has a much greater effect on enhancing residents' sentiments than that in the central urban areas. This multi-model collaborative approach has completely broken the limitations of linear thinking, making the research more in line with the complex and changing actual situations in reality.\u003c/p\u003e\u003cp\u003eSecondly, the limitations of micro-level research have been broken. With the combination of LLMs and PSPNet models, this study realizes refined exploration at the macro scale. Previous studies mostly focused on micro levels such as small-scale communities or blocks, making it difficult to reflect the overall spatial distribution law of residents' sentiments in cities. LLMs can conduct in-depth semantic analysis of massive amounts of residents' text information, quickly extracting the characteristics of residents' sentiments at the macro level; the PSPNet model can depict the macro spatial pattern of the built environment in detail. For instance, we have clarified that at the macro level, the built environment elements with the most significant effect on emotional enhancement are functional density and accessibility of park. The combination of LLMs and PSPNet models not only ensures a macro perspective of the research but also enables refined analysis of the relationship between sentiments and the environment, making up for the limitations of traditional micro-level research.\u003c/p\u003e\u003cp\u003eThirdly, the collaborative application of multiple AI technologies has constructed a research paradigm that crosses data types and analysis dimensions, which is conducive to revealing the deep-seated characteristics that have not been touched upon in previous studies. For instance, the findings not only corroborate established theories, such as the positive correlation between appropriate green space ratios and emotional recovery (Hills et al., 2019) and the mental health benefits of moderate physical activity (Mu et al., 2024), but also identifies the threshold ranges and spatial characteristics within which these two factors exert their effects. Notably, we extend existing knowledge by demonstrating significant spatial variation in vegetation coverage effects: these effects not only differ in magnitude but can even exhibit opposing directions across spatial units, underscoring the need for location-specific analyses in built environment research.\u003c/p\u003e\u003cp\u003e(\u003cspan citationid=\"CR3\" class=\"CitationRef\"\u003e3\u003c/span\u003e) \u003cb\u003ePractical implications and limitations\u003c/b\u003e\u003c/p\u003e\u003cp\u003eThis study elucidates the complex dynamics between the built environment and emotional well-being, providing a basis for context-specific optimization strategies. For instance, regulating urban building density and strategically adjusting green spaces can enhance positive emotions, supporting effective urban renewal. These findings offer quantitative guidance for promoting emotional health and inform precision urban planning policies.\u003c/p\u003e\u003cp\u003eWhile this research advances the field, it has limitations: the single-city focus on Qingdao necessitates validation in other urban contexts, and the reliance on static built environment indicators may overlook temporal dynamics affecting sentiments. Future studies should incorporate multi-city comparisons and temporal analyses to deepen understanding of these complex relationships and strengthen policy relevance.\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec33\" class=\"Section2\"\u003e\u003ch2\u003e5.2 Conclusion\u003c/h2\u003e\u003cp\u003eThis study systematically characterizes the spatial heterogeneity, nonlinear relationships, and interaction effects between the built environment and residents\u0026rsquo; emotional states, yielding four key insights:\u003c/p\u003e\u003cp\u003eFirst, threshold effects in built environment indicators. Some indicators exhibit clear threshold effects: building density shows plateaued impacts above 0.3, while functional completeness shifts from detrimental to beneficial effects beyond 0.7. These thresholds underscore the need for evidence-based urban design within optimal parameter ranges, discouraging extreme planning approaches.\u003c/p\u003e\u003cp\u003eSecond, interactive dynamics and context-sensitive coordination. Functional density synergizes with population density to enhance sentiment when exceeding 0.0003, whereas interface transparency negatively interacts with sky openness above 0.6, impairing emotional well-being. Notably, the green visual index and park accessibility demonstrate a threshold-dependent interaction: positive below 0.15 but negative above. These findings highlight the importance of context-sensitive coordination between street greening and park facility planning in urban design.\u003c/p\u003e\u003cp\u003eThird, spatial heterogeneity in impact patterns. Spatial analysis reveals significant geographic variation: well-developed central areas maintain stable sentiment levels due to mature infrastructure, while peripheral zones exhibit sentiment fluctuations tied to population dynamics and infrastructure gaps.\u003c/p\u003e\u003cp\u003eFourth, regional disparities in effect directions. Identical built environment elements can exert divergent effects across regions. For example, vegetation coverage may either enhance or suppress positive sentiment in urban cores versus peripheries, reflecting spatial disparities in the nonlinear built environment\u0026ndash;sentiment relationship.\u003c/p\u003e\u003c/div\u003e"},{"header":"Declarations","content":"\u003ch2\u003eEthical approval\u003c/h2\u003e\u003cp\u003eThis article does not include any studies involving human participants. All authors affirm that the study was carried out in full compliance with the research integrity and ethical scholarship policies of their respective institutions.\u003c/p\u003e\u003ch2\u003eFunding\u003c/h2\u003e\u003cp\u003eThis research was funded by the National Natural Science Foundation of China [Grant Number: 51908229] and Shandong Provincial Natural Science Foundation [Grant Number: ZR2024QE171].\u003c/p\u003e\u003ch2\u003eAuthor Contribution\u003c/h2\u003e\u003cp\u003eWW elaborated the analyses presented in the results, discussion and conclusions. XN proposed the methodology, Supplementary Material and protocol. YZ and HY wrote the text of the paper and the translation. YG screened the articles, prepared figures and tables. All authors defined the variables, participated in the selection of the included papers and made corrections to the manuscript.\u003c/p\u003e\u003ch2\u003eData Availability\u003c/h2\u003e\u003cp\u003eData is provided within the manuscript or supplementary information files.\u003c/p\u003e"},{"header":"References","content":"\u003col\u003e\u003cli\u003e\u003cspan\u003eArora S, Debesay J, Eslen-Ziya H (2022) Persuasive narrative during the COVID-19 pandemic: Norwegian prime minister Erna Solberg\u0026rsquo;s posts on Facebook. Humanit Soc Sci Commun 9:1\u0026ndash;10. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1057/s41599-022-01051-5\u003c/span\u003e\u003cspan address=\"10.1057/s41599-022-01051-5\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eBi J, Gu C (2024) Understanding tourists' ambassador role of their origin places from perspective of residents' attitudes towards tourists. Sci Rep 14:2214. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1038/s41598-024-52718-9\u003c/span\u003e\u003cspan address=\"10.1038/s41598-024-52718-9\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eCao S, Song C, Jiang S et al (2024) Effects of urban greenway environmental types and landscape characteristics on physical and mental health restoration. Forests 15(4):19994907. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.3390/f15040679\u003c/span\u003e\u003cspan address=\"10.3390/f15040679\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eChen C, Li H, Luo W (2022) Predicting the effect of street environment on residents' mood states in large urban areas using machine learning and street view images. Sci Total Environ 816:151605. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1016/j.scitotenv.2021.151605\u003c/span\u003e\u003cspan address=\"10.1016/j.scitotenv.2021.151605\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eChen T, Guestrin C (2016) XGBoost: A Scalable Tree Boosting System. In: Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining: 785\u0026ndash;794. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1145/2939672.2939785\u003c/span\u003e\u003cspan address=\"10.1145/2939672.2939785\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eChen Z, Yang H, Lin Y et al (2024) Exploring the association between the built environment and positive sentiments of tourists in traditional villages in Fuzhou, China. Ecol Inf 80:102465. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1016/j.ecoinf.2024.102465\u003c/span\u003e\u003cspan address=\"10.1016/j.ecoinf.2024.102465\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eConzo P, Fuochi G, Anfossi L et al (2021) Negative media portrayals of immigrants increase ingroup favoritism and hostile physiological and emotional reactions. Sci Rep 11:16407. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1038/s41598-021-95800-2\u003c/span\u003e\u003cspan address=\"10.1038/s41598-021-95800-2\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eBaba SE, Antoun J, Mladenovic A et al (2021) Impact of Sleep on Medical Residents' Emotions: A Cross-Sectional Study Using a Wearable Device. Fam Med 53:275\u0026ndash;281. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.22454/FamMed.2021.585102\u003c/span\u003e\u003cspan address=\"10.22454/FamMed.2021.585102\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eEwing R, Cervero R (2010) Travel and the built environment: A Meta-Analysis. J Am Plann Association 76:265\u0026ndash;294. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1080/01944361003766766\u003c/span\u003e\u003cspan address=\"10.1080/01944361003766766\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eFan C, Gai Z, Li S et al (2023) Does the built environment of settlements affect our sentiments? A multi-level and non-linear analysis of Xiamen, China, using social media data. Front Public Health 10:1094036. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.3389/fpubh.2022.1094036\u003c/span\u003e\u003cspan address=\"10.3389/fpubh.2022.1094036\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eFeng J, Li Q (2025) Investigate physiological and psychological responses to environment scenes, elements and components in different urban settings. Sci Rep 15:12345. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1038/s41598-025-86448-3\u003c/span\u003e\u003cspan address=\"10.1038/s41598-025-86448-3\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eFeng Y, Lou C, Gao E et al (2012) Adolescents' and Young Adults' Perception of Homosexuality and Related Factors in Three Asian Cities. J Adolesc Health 50:S52\u0026ndash;S60. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1016/j.jadohealth.2011.12.008\u003c/span\u003e\u003cspan address=\"10.1016/j.jadohealth.2011.12.008\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eFotheringham AS, Oshan TM (2016) Geographically weighted regression and multicollinearity: dispelling the myth. J Geogr Syst 18:303\u0026ndash;329. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1007/s10109-016-0239-5\u003c/span\u003e\u003cspan address=\"10.1007/s10109-016-0239-5\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eFriedman JH (2001) Greedy function approximation: A gradient boosting machine. Ann Stat 29:1189\u0026ndash;1232. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1214/aos/1013203451\u003c/span\u003e\u003cspan address=\"10.1214/aos/1013203451\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eGao H, Guo DF, Wu J et al (2022) Weibo users\u0026rsquo; emotion and sentiment orientation in traditional Chinese medicine (TCM) during the COVID-19 pandemic. Disaster Med Public Health Prep 16:1835\u0026ndash;1838. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1017/dmp.2021.259\u003c/span\u003e\u003cspan address=\"10.1017/dmp.2021.259\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eGuo H, Zhang S, You Y et al (2025) Assessing the impact of street-level greenery on older adults' emotional well-being: A longitudinal study of equigenic potential and socioeconomic disparities. Build Environ 267:112309. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1016/j.buildenv.2025.112309\u003c/span\u003e\u003cspan address=\"10.1016/j.buildenv.2025.112309\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eGuo X, Tu X, Huang G (2022) Urban greenspace helps ameliorate people's negative sentiments during the COVID-19 pandemic: The case of Beijing. Build Environ 223:109449. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1016/j.buildenv.2022.109449\u003c/span\u003e\u003cspan address=\"10.1016/j.buildenv.2022.109449\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eHan Z, Shen M, Liu H al (2022) Topical and emotional expressions regarding extreme weather disasters on social media: A comparison of posts from official media and the public. Humanit Soc Sci Commun 9:1\u0026ndash;10. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1057/s41599-022-01457-1\u003c/span\u003e\u003cspan address=\"10.1057/s41599-022-01457-1\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eHe P, Yu B, Ma J (2024) Exploring the non-linear relationship and synergistic effect between urban built environment and public sentiment integrating macro- and micro-level perspective: a case study in San Francisco. Front Psychol 15:1276923. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.3389/fpsyg.2024.1276923\u003c/span\u003e\u003cspan address=\"10.3389/fpsyg.2024.1276923\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eHe Z, Li Z, Yang F et al (2020) Advances in Multimodal Emotion Recognition Based on Brain-Computer Interfaces. Brain Sci 10:797. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.3390/brainsci10110797\u003c/span\u003e\u003cspan address=\"10.3390/brainsci10110797\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eHeng D, Ritchie BW, Benckendorff PJ (2021) Beyond cost-benefit analysis: resident emotions, appraisals and support toward tourism performing arts developments. Curr Issues Tourism 24:668\u0026ndash;684. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1080/13683500.2020.1825354\u003c/span\u003e\u003cspan address=\"10.1080/13683500.2020.1825354\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eHills AP, Farpour-Lambert NJ, Byrne NM (2019) Precision medicine and healthy living: The importance of the built environment. Prog Cardiovasc Dis 62,:34\u0026ndash;45. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1016/j.pcad.2019.01.003\u003c/span\u003e\u003cspan address=\"10.1016/j.pcad.2019.01.003\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eHipp JR, Lee S, Ki D et al (2022) Measuring the built environment with Google Street View and Machine Learning: Consequences for Crime on Street Segments. J Quant Criminol 38:537\u0026ndash;565. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1007/s10940-021-09522-9\u003c/span\u003e\u003cspan address=\"10.1007/s10940-021-09522-9\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eLee M, Park S, Yoon K (2019) Does Health Promotion Program Affect Local Resident's Emotions? Int J Environ Res Public Health 16:549. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.3390/ijerph16040549\u003c/span\u003e\u003cspan address=\"10.3390/ijerph16040549\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eLi W, Sun RH, He HB et al (2023) How does three-dimensional landscape pattern affect urban residents\u0026rsquo; sentiments. Cities 143:104619. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1016/j.cities.2023.104619\u003c/span\u003e\u003cspan address=\"10.1016/j.cities.2023.104619\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eLiu W, Li D, Meng Y et al (2024) The Relationship between Emotional Perception and High-Density built environment Based on Social Media Data: Evidence from Spatial Analyses in Wuhan. Land 13:294. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.3390/land13030294\u003c/span\u003e\u003cspan address=\"10.3390/land13030294\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eLundberg SM, Erion GG, Lee SI (2018) Consistent individualized feature attribution for tree ensembles. arXiv Preprint arXiv. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.48550/arXiv.1802.03888\u003c/span\u003e\u003cspan address=\"10.48550/arXiv.1802.03888\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e. 1802.03888\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eLundberg SM, Lee SI (2017) A unified approach to interpreting model predictions. Adv Neural Inf Process Syst 30:4768\u0026ndash;4777\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eMa W, Wei F, Yang L et al (2024) Research on the Measurement, Evaluation and Compensation of Traditional Village Residents' Emotional Perception: A Case of 14 Traditional Villages in Guanzhong Region. Sustainability 16:2546. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.3390/su16062546\u003c/span\u003e\u003cspan address=\"10.3390/su16062546\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eMa Y, Yang Y, Jiao H (2021) Exploring the Impact of Urban built environment on Public Emotions Based on Social Media Data: A Case Study of Wuhan. Land 10:986. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.3390/land10090986\u003c/span\u003e\u003cspan address=\"10.3390/land10090986\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eMu FZ, Liu J, Lou H et al (2024) Influence of physical exercise on negative emotions in college students: chain mediating role of sleep quality and self-rated health. Front Public Health 12:1402801. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.3389/fpubh.2024.1402801\u003c/span\u003e\u003cspan address=\"10.3389/fpubh.2024.1402801\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003ePang L, Zhang J, Cao X et al (2020) The effects of carbon dioxide exposure concentrations on human vigilance and sentiment in an enclosed workplace environment. Indoor Air 30:209\u0026ndash;1225. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1111/ina.12746\u003c/span\u003e\u003cspan address=\"10.1111/ina.12746\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003ePark J, Tsou MH, Nara A (2024) Developing a social sensing index for monitoring place-oriented mental health issues using social media (twitter) data. Urban Inf 3(1):2. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1007/s44212-024-00031-1\u003c/span\u003e\u003cspan address=\"10.1007/s44212-024-00031-1\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eRundle A, Diez Roux AV, Free LM (2007) The urban built environment and obesity in New York City: a multilevel analysis. Am J Health Promotion 21:326\u0026ndash;334. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.4278/0890-1171-21.4s.326\u003c/span\u003e\u003cspan address=\"10.4278/0890-1171-21.4s.326\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eSong Y, Liu Y, Bai X et al (2024) Effects of neighborhood built environment on cognitive function in older adults: a systematic review. BMC Geriatr 24(1):194. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1186/s12877-024-04776-x\u003c/span\u003e\u003cspan address=\"10.1186/s12877-024-04776-x\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eStrohbehn GW, Levy K, Tsao PA et al (2020) The July Effect in supervisory residents: assessing the emotions of rising internal medicine PGY2 residents and the impact of an orientation retreat. Med Educ Online 25:1728168. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1080/10872981.2020.1728168\u003c/span\u003e\u003cspan address=\"10.1080/10872981.2020.1728168\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eSu H, Qi Z, Wang Q (2025) Impacts of land use characteristics on extreme heat events: Insights from explainable machine learning model. Sustainable Cities Soc 120:106139. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1016/j.scs.2025.106139\u003c/span\u003e\u003cspan address=\"10.1016/j.scs.2025.106139\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eTse S, Tung VWS (2022) Understanding residents' attitudes towards tourists: Connecting stereotypes, emotions and behaviours. Tour Manag 89:104435. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1016/j.tourman.2021.104435\u003c/span\u003e\u003cspan address=\"10.1016/j.tourman.2021.104435\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eWang L, Zhao C, Liu X et al (2021) Non-Linear Effects of the built environment and Social Environment on Bus Use among Older Adults in China: An application of the XGBoost model. Int J Environ Res Public Health 18:9592. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.3390/ijerph18189592\u003c/span\u003e\u003cspan address=\"10.3390/ijerph18189592\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eWang X, Yoo K, Chen H (2022) Antagonistic network signature of motor function in Parkinson's disease revealed by connectome-based predictive modeling. npj Parkinson's Disease 8:135. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1038/s41531-022-00315-w\u003c/span\u003e\u003cspan address=\"10.1038/s41531-022-00315-w\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eWenning L, Sun R, Hongbin H (2023) How does three-dimensional landscape pattern affect urban residents' sentiments? Cities 143:104619. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1016/j.cities.2023.104619\u003c/span\u003e\u003cspan address=\"10.1016/j.cities.2023.104619\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eXiang L, Cai M, Ren C et al (2021) Modeling pedestrian emotion in high-density cities using visual exposure and machine learning: Tracking real-time physiology and psychology in Hong Kong. Build Environ 205:108273. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1016/j.buildenv.2021.108273\u003c/span\u003e\u003cspan address=\"10.1016/j.buildenv.2021.108273\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eYe J, Hai J, Wang Z et al (2023) Leveraging natural language processing and geospatial time series model to analyze COVID-19 vaccination sentiment dynamics on Tweets. JAMIA Open 6:ooad023. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1093/jamiaopen/ooad023\u003c/span\u003e\u003cspan address=\"10.1093/jamiaopen/ooad023\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eYi S, Li X, Ma C et al (2025) Assessing the differential impact of vegetated and built-up areas on heat exposure environment: A case study of Los Angeles. Build Environ 271:112538. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1016/j.buildenv.2025.112538\u003c/span\u003e\u003cspan address=\"10.1016/j.buildenv.2025.112538\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eZhang J, Liu L, Wang J (2024) Exploring the relationship between the sentiments of young people and urban green space by using a check-in microblog. Forests 15(5):796. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.3390/f15050796\u003c/span\u003e\u003cspan address=\"10.3390/f15050796\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eZhang Y, Cao X, Wang P et al (2020) Emotional inflection point in public health emergencies with the 2019 new coronavirus pneumonia (NCP) in China. J Affect Disord 276:797\u0026ndash;803. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1016/j.jad.2020.07.097\u003c/span\u003e\u003cspan address=\"10.1016/j.jad.2020.07.097\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli\u003e\u003cspan\u003eZhou W, Liang Z, Fan Z (2024) Spatio-temporal effects of built environment on running activity based on a random forest approach in nanjing. China Health Place 85:103176. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1016/j.healthplace.2024.103176\u003c/span\u003e\u003cspan address=\"10.1016/j.healthplace.2024.103176\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003c/ol\u003e"}],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":true,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":false,"hideJournal":false,"highlight":"","institution":"","isAcceptedByJournal":false,"isAuthorSuppliedPdf":false,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":false,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"
[email protected]","identity":"humanities-and-social-sciences-communications","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"palcomms","sideBox":"Learn more about [Humanities \u0026 Social Sciences Communications](http://www.nature.com/palcomms/)","snPcode":"41599","submissionUrl":"https://submission.springernature.com/new-submission/41599/3","title":"Humanities and Social Sciences Communications","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"stoa","reportingPortfolio":"Nature AJ","inReviewEnabled":true,"inReviewRevisionsEnabled":false},"keywords":"Residents’ sentiment, Built environment, Artificial intelligence, Nonlinear relationship, Spatial heterogeneity","lastPublishedDoi":"10.21203/rs.3.rs-7821458/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-7821458/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003eThe impact of built environment on residents’ sentiments is a critical concern. This study integrates multiple AI models, including Large Language Model (LLM), Pyramid Scene Parsing Network (PSPNet), eXtreme Gradient Boosting (XGBoost), SHapley Additive exPlanations (SHAP), Geographically Weighted Regression (GWR), and automatic clustering models, to establish an environment-emotion framework for analyzing the nonlinear relationships and spatial heterogeneity between the built environment and residents' sentiments. LLMs are used to analyze social media data, revealing the spatial distribution characteristics of residents' sentiments. Multimodal data are combined with PSPNet models and spatial econometric models to measure the characteristics of the built environment. The nonlinear relationships and spatial heterogeneity between the built environment and residents' sentiments are uncovered through XGBoost, SHAP and GWR models. Automatic clustering method is employed to select typical cases to examine how spatial heterogeneity influences the nonlinear and interaction effects. The findings reveal that the relationships between built environment and residents’ sentiments exhibited complex nonlinear patterns, with threshold effects observed for specific indicators. Inter-element interactions demonstrated context-dependent synergies or antagonisms. And the influence of built environment on residents’ sentiments varied significantly across spatial contexts. Moreover, identical built environment exerted divergent effects on residents’ sentiments due to spatial heterogeneity in nonlinear relationships. This study constructs a comprehensive framework integrating multimodal data with AI and offers actionable insights for urban livability enhancement. The findings contribute to an understanding of how built environment might be effectively optimized to improve residents’ sentiments in urban areas, which deepens the action mechanism and implementation pathways through which AI technology empowers sustainable development planning.\u003c/p\u003e","manuscriptTitle":"Nonlinear relationship and spatial heterogeneity between built environment and residents' sentiments: A comprehensive framework integrating multimodal data with AI","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2025-11-18 16:36:50","doi":"10.21203/rs.3.rs-7821458/v1","editorialEvents":[{"type":"communityComments","content":0},{"type":"decision","content":"Revision requested","date":"2026-02-16T13:04:49+00:00","index":"","fulltext":""},{"type":"reviewerAgreed","content":"289555790536183044262898398048283094276","date":"2025-12-12T08:11:35+00:00","index":"hide","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2025-12-10T16:43:51+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"198342618535788922512644645020159005611","date":"2025-12-10T07:18:39+00:00","index":"hide","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2025-12-07T07:13:46+00:00","index":"hide","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2025-11-26T01:26:45+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"278960638322768773036123963830641006346","date":"2025-11-10T05:49:51+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"309643137450516282142797747349965964790","date":"2025-11-09T16:42:26+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"172312563087005450397069056000141484623","date":"2025-11-07T12:54:14+00:00","index":"hide","fulltext":""},{"type":"reviewersInvited","content":"","date":"2025-11-07T11:48:10+00:00","index":"","fulltext":""},{"type":"editorAssigned","content":"","date":"2025-11-07T11:45:31+00:00","index":"","fulltext":""},{"type":"editorInvited","content":"","date":"2025-11-07T10:40:29+00:00","index":"","fulltext":""},{"type":"checksComplete","content":"","date":"2025-10-23T12:24:03+00:00","index":"","fulltext":""},{"type":"submitted","content":"Humanities and Social Sciences Communications","date":"2025-10-23T12:19:23+00:00","index":"","fulltext":""}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"humanities-and-social-sciences-communications","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"palcomms","sideBox":"Learn more about [Humanities \u0026 Social Sciences Communications](http://www.nature.com/palcomms/)","snPcode":"41599","submissionUrl":"https://submission.springernature.com/new-submission/41599/3","title":"Humanities and Social Sciences Communications","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"stoa","reportingPortfolio":"Nature AJ","inReviewEnabled":true,"inReviewRevisionsEnabled":false}}],"origin":"","ownerIdentity":"b27e7466-40fa-48cc-9a67-2506013824ea","owner":[],"postedDate":"November 18th, 2025","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"under-review","subjectAreas":[{"id":58109575,"name":"Scientific community and society/Geography"},{"id":58109576,"name":"Social science/Geography"},{"id":58109577,"name":"Physical sciences/Mathematics and computing"}],"tags":[],"updatedAt":"2026-05-12T06:09:56+00:00","versionOfRecord":[],"versionCreatedAt":"2025-11-18 16:36:50","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-7821458","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-7821458","identity":"rs-7821458","version":["v1"]},"buildId":"8U1c8b4HqxoKbykW_rLl7","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.