USING CONTEXTUAL CUES IN UNDERSTANDING URBAN MENTAL WELL-BEING

It is well established that city life can impact on individuals’ mental well-being. Factors associated with modes of transport in a city, such as cycle corridors and the reliability of bus network, and environment factors, such as availability of green spaces, have been shown to relate to individuals’ well-being in the city. Smart cities contain a wealth of digital data which has been used in the management and organisation of cities. Such data is gathered from sensors, networks and systems which contain rich insights on factors associated with city life. Such as, for example, the availability of open spaces in the city, traffic congestion, and air quality levels. We propose that these smart city data sources and data flows can act as contextual cues to indicate the mental well-being of individuals in the city. That is, we propose harnessing indicators and patterns in datasets known to be associated with well-being, and using these as contextual cues for automated city well-being level estimation. In this initial investigation, we focus on contextual cues associated with active travel and transportation, environmental information and green infrastructure. We propose an AI-based system which uses these contextual cues to generate an indicator of mental well-being in the city.


INTRODUCTION
Smart cities utilise a wide range of advanced digital technologies to sense, examine, process and integrate large volumes of data and information from systems, sensors and networks to assist in the management and organisation of that city. From a citizen's viewpoint, a smart city can provide intelligent insights into citizens' livelihood, security systems, public transportation, environmental management, public health provision, and commercial activities. Smart city data sources come from a variety of producers: Internet-of-things (IoT) sensor data streams, GPS data, transactional data, and even social media and voice call data. There are unexploited opportunities here to generate insights helpful to citizens including in supporting everyday living and decision-making, etc. As citizens move and interact within this physical and virtual infrastructure researchers have opportunities to ask questions and investigate problems which previously may have been impossible due to the lack of data and information. In this paper we set out a proposal to use contextual cues from smart city data sources and data flows to automatically provide some understanding of the mental well-being of citizens living in a smart city. Such autogenerated mental well-being indicators could then be used in Intelligent Digital Assistance which support individuals' wellbeing for example. By contextual cues we mean known indicators or patterns in datasets which have been shown to be strongly linked to mental well-being. For example, indicators of good environmental quality (Zhang et al., 2017) in a city or efficient transportation (Gatersleben and Uzzell, 2007) have been strongly linked to having positive effects on mental wellbeing of citizens in urban environments.
In this paper we outline and motivate our proposal which seeks to use multiple heterogeneous sources of smart city data to automatically compute the potential picture of mental well-being in the host city. Our proposal is based around the development of an Artificial Intelligence (AI)-based software system which can be used to learn and predict an estimation of mental well-being in a given city. As more data becomes available, giving additional contextual cues, this learning and prediction can become more sensitive to the characteristics and dynamics of a given city. We emphasise that this proposed system does not attempt to replace population-wide clinical-based assessment of mental well-being.
The paper is organised as follows. In section 2 we provide a discussion of related work in this area with a focus on literature around active travel, public transportation, green infrastructure and environmental factors. AI-based systems for smart cities are also reviewed. The overall description of our proposed system is provided in section 3 with details around the data collection and AI aspects of the system. The paper closes with section 4 where some conclusions are provided followed by a brief description of potential directions for future work.

RELATED WORK
Extensive literature is available on using smart city datasets for urban analytics, analysis or application development. The topic of smart cities and mental health or mental well-being has also been well studied. See Table 1 for an overview of this work. In the work by Gruebner et al. (Gruebner et al., 2017) the authors indicate that many studies have shown that the risk for serious mental illness is generally higher in cities compared to rural areas but the authors stress that "there remains much we need to know about the functional relationships between city living or upbringing and mental health problems in urban population". Indeed, interdisciplinary research between architecture, city planning, epidemiology, geography, neurosciences, and sociology are crucial to better understand to what extent urban socio-ecological environments affect population mental health. Our work acknowledges the challenges of these complex interdisciplinary relationships. The United Nations has recognized the importance of urban planning for citizens well-being in part of their 26 sustainable development goals for the year 2020 1 . According to the UN, in 2019 it was calculated that only half of the urban population in the world has access to well-established

Contextual Cues
Connection to our work (Yigitcanlar et al., 2020) Artificial Intelligence Artificial Intelligence methods contribute to the development of smart cities. AI contributes with algorithms, data analysis, and automation to aid in problem solving for smart cities. (Knott et al., 2018) Active Travel Commuting and physical activity shows positive associations for reducing stress, anxiety, and depressive symptoms. Research shows favourable associations between physical activity and depression. Active commuting represents an opportunity for increasing physical activity. (Ma et al., 2021) Public Transportation Utilitarian bicycling has a positive effect on mental health by reducing psychological distress and increase levels of life satisfaction. (Maas et al., 2009) Green Infrastructure Green spaces have positive impact on human health including mental well being and physical health (Buoli et al., 2018) Air Pollution Air pollutants may have a potential role in the onset or worsening of mental conditions. More consistent data regard the association of depression with air pollutants. (Trencher and Karvonen, 2019) Smart City Digital technologies are a tool for smart cities to establish smart health and well-being strategies. Smart city approaches can enhance the well-being of society.. It was calculated that 9 out of 10 people living in an urban area are exposed to air pollutant levels of PM2.5, which poses a health risk. In particular, Sustainable Development Goal 11 states that there must be efforts to"make cities and human settlements inclusive, safe, resilient and sustainable". This goal promotes open spaces as places of commerce are critical to the informal economy, which many people depend on for their livelihoods (Koch andKrellenberg, 2018, Choi et al., 2016). This paper aims to further demonstrate the necessity of urban planning to maintain and increase the mental health of citizens in urban areas. In the next three subsections we provide some details of related work on AI applied to smart city data and the contextual cues found and used by other researchers.

AI and smart city data
As mentioned above, smart cities generate data in many different ways. This data can be available in real-time (as it is generated), near real-time (with a specified delay between availability of the data and its generation) or as historical data which could be considered any data older than the current day. A discussion of the characteristics of smart city data is beyond the scope of this paper (authors such as (Kitchin, 2014) are a suggested starting point) but we can easily state that smart city data is generated quickly, in large volumes and heterogeneous formats and structures. This makes the analysis of such data difficult to standard data analytics approaches. More advanced forms of data mining, pattern extraction, prediction etc. are required. The dynamic nature of smart cities requires approaches that are flexible and adaptable to cope with this data in order to perform analytics and learn from real-time data (Mohammadi and Al-Fuqaha, 2018). AI-based systems such as Artificial Neural Networks (ANN) and Deep Learning approaches have been shown to output high accuracy results using smart city-data in various scenarios (Nosratabadi et al., 2019, Bhattacharya et al., 2020. The computational models employed have various processing layers that learn a representation of data that contain multiple levels of abstraction that results in complex structures. The type of ANNs employed on a dataset depends on the smart city category that being considered, and includes transportation, health care, environment, and public safety. There are many existing examples. One such study carried out in Japan (Chen et al., 2019), researchers used Long Short-Term Memory (LSTM) based Recurrent Neural Network (RNN) that learned to predict future human mobility and their transportation mode patterns in urban areas (Chen et al., 2019). In a similar study (Ong et al., 2016), researchers applied Conventional Neural Networks (CNNs) on bike trip data and other GPS data to predict the flow of bike traffic certain parts of a city and modelled spatial correlation. Likewise, applying RNN to air quality sensors resulted in high accuracy when predicting the density of particulate matter aerosols (PM2.5) in terms of air quality (Kök et al., 2017).

Contextual cues used in the literature
In this work we use the term 'contextual cue' in a flexible manner related to the input datasets and data sources available to us. Contextual cues, in our situation, are computable quantities related to characteristics of the input data. For example, the reliability of a public transport bus network can be computed from a dataset describing departure and arrival times over a given period of time. Citizen access to public transportation is a more complex contextual cue which needs to incorporate several measures including availability of suitable public transport, access in terms of distance to the nearest transit station or stop, cost of usage against average wage or income, etc. If we consider air quality as a contextual cue it will be necessary to calculate several different air quality indicators related to public health. Therefore, we think of a contextual cue as a computable value where research has established a linkage from this cue to citizen mental well-being. We considered existing literature linking various urban systems and smart city data sources to mental well-being. Our chosen contextual cues for initial investigation are outlined as follows: demonstrating that active travel positively impacts physical and mental health. Yang et al. (Yang et al., 2019) indicate that the presence of cycling paths promotes cycling behavior which lead to better mental health outcomes.
• Public Transportation: This includes public transportation modes such as bus, train, etc. Rambaldini-Gooding et al. (Rambaldini-Gooding et al., 2021) report that having good access to public transportation can improve a person's mental and physical health. Additionally, they find that public transportation can contribute to reducing the feeling of loneliness. In the study conducted by Craig S.Knott (Knott et al., 2018), commuters that usually get to their destination by car were asked to switch transportation modes and include active travel in their commute. The people who incorporated active travel stated having fewer depressive symptoms than before.
• Green Infrastructure and Environment: This includes the availability of urban green leisure spaces and an overall clean environment. Green Infrastructure in a city positively impacts human well-being as it reduces environmental stress. Tzoulas et al. (Tzoulas et al., 2007) indicates that participants visit green spaces to reduce their stress and achieve better mental health while Zhang et al. (Zhang et al., 2017) show that high levels of air pollution index can negatively impact mental health by reducing hedonic happiness. Artificial Intelligence (AI) methods have been used (Chen et al., 2019) to analyse smart city data where green infrastructure, air pollution, and transportation are target smart city data sources. Their goal is to enable knowledge discovery and provide the public with a better understanding of their surroundings.
Urbanization has increased over the past few years which promoted the decrease of the exposure of green spaces to citizens. Research in (Maas et al., 2009) presents evidence that a high number of green spaces in a city positively affects a person's mental health and well-being. Additionally, green spaces in a person's living environment impact the rate of morbidity diagnosed by a physician. These studies (Maas et al., 2009) have shown that a person's exposure to nature can heal mental stress and fatigue. Thus, a lack of green spaces may negatively impact a person's health. (Maas et al., 2009) conducted a study where morbidity data was collected in cities and found that anxiety and depression are correlated with the percentage of green spaces in an urban area. Similarly, (Buoli et al., 2018) states in their research that depression symptoms increased when women were exposed to high air pollutants rates. Additionally, high air pollutant rates have proven to worsen mental health symptoms that lead to an increase in emergency hospitalisation.
There are of course many other contextual cues that one could include when exploring well-being in the city. For example, the housing crisis has affected the health of many citizens in the EU since 2008 (Clair et al., 2016). It has been reported that in 2010, 4 percent of the population in the EU suffered from housing debt. In this same study, it is stated that experiencing housing arrears has a statistical impact negatively affecting self-perceived health. This is seen the most in people who are renting, rather than house owners. Our proposal, as described in the next section, will be flexible to allow the integration of other contextual cues as data becomes available or accessible. We acknowledge that the contextual cues described above are only a small subset of a potential larger set of cues we could include. However, in our initial investigations we tried to limit our exploration of contextual cues to those of which could be computed from available smart-city data sources.

SYSTEM DESCRIPTION
We describe the development of a semi-automated computational-based software system which, for a given city, uses heterogeneous smart city datasets to compute a generalised assessment of citizen mental well-being in the city based on a wide selection of contextual cues. Figure 1 illustrates the high-level concept of our proposed approach. This consists of the input of contextual cues from the smart city to a computation component. The computation component applies AI approaches to assess, and output details of, citizens mental well being based on the contextual cues. Updated contextual cues are fed into this component on an on-going basis, allowing for the assessment of well-being to be revised as new and updated contextual cues become available. The output from the system is a simple indicator based on a Likert-type scoring scale. The higher the numerical value on this scale the better the perceived mental well-being of the citizens of the city is estimated to be. Low numerical values on this scale indicates less positive indications of good mental well-being of the citizens. This approach is detailed in the following sections.

Data Collection
The contextual cues which are input to our AI based computation component, are derived from smart city data. For our initial study we focus on one city as a use case, namely Dublin City, Ireland. Existing, openly available, smart city datasets and data sources for this city were gathered. Gathered datasets were in the active travel, public transportation, green infrastructure and environment categories, and include: bicycle path lengths, air pollution rates, number of green spaces, etc.
These datasets are analysed using a predefined set of contextual cues. These contextual cues are drawn from the literature. For example, for air quality data we have the concentration levels of various air quality parameters which are related to positive or negative effects on mental well-being. For active transportation we have, for example, the usage levels of publicly available bike rental schemes which are related to positive or negative effects on mental well-being. Contextual cues for green infrastructure involve quantitative values for available green space, public usage of green space, total length of usable cycle path currently available, weather conditions for outdoor activities such as walking and cycling, etc. The contextual cues are represented as rules in a computer-readable schema. This schema can be implemented in JSON or XML which can be easily consumed by most programming language implementations.
As new and updated datasets and data sources become available the training and/or classification component of the system is also updated. New training or classification may be required depending on the availability of new data sources or changes in contextual cues. After updating, the overall assessment of mental well-being is then updated. To allow for training and classification this proposed approach will update with near realtime frequency. Some datasets such as cycle infrastructure will not change frequently whereas usage of bicycle rental schemes, air quality and weather change very frequently.

Training and Classification
We are currently evaluating selected AI approaches such as Deep Learning (DL) networks and machine learning algorithms to evaluate how our proposed system is trained to compute an overall assessment of the mental well-being of the citizens of the city based on the input data. AI methods have proven to output high accuracy results with smart city data, including transportation data and environmental data, in a different context (Chen et al., 2019) and the authors report that there are still significant opportunities for DL and other AI approaches. Deep learning is a promising AI method that has been used to analyze data acquired from smart cities. In the work by (Chen et al., 2019) a four-layer approach is presented to successfully analyze smart city-data. The first layer collects and stores data retrieved from a variety of sources, while the second layer pre-processes the data to output clean and high-quality data. The third layer applies machine learning techniques to discover trends and the final layer applies the output from layer three to create new smart systems. Deep learning derives from Artificial Neural Networks (ANNs) which allow for computational models with various processing layers that learn a representation of data that contain multiple levels of abstraction that outputs complex structures. This allows for researchers to apply deep learning features to smart city categories such as air quality and smart health care systems. Depending on the type of data, there is a specific deep learning method that can be applied to ensure high accuracy (Serrano and Bajo, 2019).
In the case of our approach we build a large matrix or array of all contextual cues from the input schema. A label is assigned to each condition for all contextual cues. This labelling process is manual and could be considered a bottleneck for the process (Serrano and Bajo, 2019) as we must try to account for all reasonable and sensible scenarios for each contextual cue. For example, mean citizen access distance of within 400m to a public transportation station would be labelled with a high utility value with this value reducing as mean access distance increases for a given mode of public transportation. The deep learning network is then configured to learn the representation based on this large labelled input dataset. Given a new description of the current set of contextual cues machine learning approaches are then used to compute which scenario this most closely represents. New descriptions are calculated when the input datasets are updated. This can happen frequently in the case of many real-time datasets. However, it is not feasible to update the outputs from the deep learning approach in real-time. Therefore, at the moment, we consider updates every week or so. Some volatile contextual cues, such as air quality, traffic flow, public transport effeciency can show major fluctuations during a single day but these can even out and return to normal levels when considered over a longer cycle such as the working week (Monday to Friday) or the entire week (Monday to Sunday). Contextual cues, such as available green space or public amenity available change very seldom and can be updated over longer timescales such as yearly.

Limitations of this study
Our study is still within its preliminary exploration phase and new results will be reported in future papers and outputs. We recognise that this study has several important limitations. The first limitation is that the data gathered is not based on population surveys and it is not real time. The evidence of calculating mental well-being, in some cases, is self-perceived and self-reported which means that it may not be clinically accurate. Our labelling approach, as briefly outlined in Section 3.3 above, is driven by established findings from the literature as described in section 2 and table 1. There is some subjectivity related to the labelling when attaching scoring labels or utility values to each contextual cue. We do make the claim that these shall be robust enough for the testing and validation of our approach but may need adjustment for the application of the same contextual cues in different smart city environments.

CONCLUSIONS AND FUTURE WORK
We have briefly outlined our proposed AI-based system for understanding urban mental well-being using contextual cues drawn from datasets and data sources commonly generated by smart cities. In our work we have chosen to focus on active travel and transportation, environmental information and green infrastructure. We understand the general limitations of our approach in regard to making inferences about the mental wellbeing of large populations within modern urban environments. However, we believe this approach can use well established contextual cues to give some indications about the general mental well-being of an urban population based on data and information being generated by the urban environment. Where appropriate our suggestions of mental well-being within the urban population could be compared to actual clinical research studies which may be carried out by other researchers.

Next steps and future work
There are a number of interesting opportunities for future work. The full implementation of our proposed system is ongoing and as a result our future work will focus on: (i) extending this approach to other case-study cities where appropriate datasets and data sources are available; and (ii) the major task of evaluating the accuracy of our proposed approach against clinical studies and surveys. Citizen feedback on our initial results would be an good next step as it would be interesting to see citizen-reaction to a computer-generated estimation of their mental well-being within their own city. We must also extend the work to use contextual information from larger population-based clinical studies around mental health and mental well-being in modern urban environments. Of course, accessing these types of studies will be challenging for a number of reasons, none more so than ethical considerations and privacy.