We developed explainable machine learning models leveraging the largest accelerometer-derived PA dataset from the UK Biobank and 137 multi-domain features for 53,614 adults to predict and explain overall PAEE and proportion attributable to MVPA. Our models were able to map and explain the most impactful features by measuring the magnitude and directionality of their relative contributions to prediction. Overall, for PAEE, lifestyle features contributed 35.7% of population-level prediction, socio-demographics 28%, and physical environment 13.5%. For PAEE attributable to MVPA, lifestyle contributed 28.3%, socio-demographics 27%, and physical environment 16.9% to the prediction. Previous epidemiological studies have reported statistical associations between predictor features and PA, and our results largely corroborate this evidence as well as provide newer insights in terms of accounting for a wider range of multi-domain predictor features, mapping domain-specific contributions to prediction, exploring non-linear relationships as well as individualised explanations of PAEE.
Explainable machine learning enabled us to include a range of lifestyle, sociodemographic and physical environment features and identify the top-most important predictors. Our study was informed by previous studies in the cohort and prior literature. Our models included 14 lifestyle-level predictors of PAEE informed by a prior UK Biobank study37 plus other predictors related to smoking, alcohol consumption, sleeping traits, and eleven dietary features. Lifestyle factors such as active lifestyle behaviours (self-reported MVPA minutes per day, daily time in exercise activities, walking for pleasure, strenuous sports, heavy DIY), sedentary time (time spent watching TV, computer use and playing computer games), and sleep duration were top features predicting PAEE and its proportion attributable to MVPA. These results corroborate prior evidence showing a positive association of mobility-encouraging activities with PAEE increment28, and inverse associations between sedentary behaviour38 and sleep duration39 with energy expenditure. Socio-demographics, including age, sex, minutes per day in specific job type (sedentary work, heavy manual or physical work, walking or standing work), and educational level, were found to be the key predictors of PAEE. Prior evidence from the UK Biobank has been consistent, showing that the mean acceleration vector magnitude declined by 7.5% per decade of age and remained lower in men as compared to women16. The observed gradual decline of energy expenditure with aging is plausibly related to tissue metabolism40. Our results also confirm previous UK-based findings from the Fenland study of higher energy expenditure among people in energy-demanding occupations relative to their sedentary counterparts14. The inverse relationship between educational attainment and predicted PAEE is consistent with previous findings that more educated people derive less PA from their commutes41. Predictive built environment features included proximity to retail service agents, street betweenness (a measure of connectivity), density of PA facilities, density of housing, exposure to PM2.5 and neighbourhood deprivation. Previous studies have reported that residential proximity to points of interest such as grocery stores24 and supermarkets23 facilitate active daily travel. A higher number of PA facilities within a residential catchment has also been associated with more minutes of accrued MVPA per day42. The influence of destination density on walking behaviour is commonly assumed, making ‘mixed land-use’ a standard ‘tick-box’ item on place-based health impact assessments12. We were able to verify this with accelerometer data. Higher local-scale (800 m) betweenness centrality of a person’s place of residence in relation to the neighbourhood road grid may serve as a proxy for both activity-promoting and inhibiting neighbourhoods. A suburb with high betweenness may indicate a compact, well-designed and walkable community promoting active living. While in a high-density neighbourhood, betweenness may plausibly be a proxy for crowdedness, traffic intensity and poor perception of safety43, suppressing the protective contributions of good design and discouraging PA, as observed in our data. The beeswarm plots and dependence plots in explainable machine learning help deconstruct how underlying nuances at the individual level constitute building blocks for population-level non-linearity. In other words, it enables us to succinctly disaggregate overall population-level (global) explanations into individual-level (local) positive and negative contributions within the cohort. A similar non-linear association was observed between housing density and PAEE, suggesting that up to a point, housing density provides more opportunities for PA (social visits, more vibrant commercial centres), but that beyond the inflection point, crowding, security and anomie take over as negative influences on physical activity44. Previously, a US study found that higher residential density was associated with the purpose of walking (such as recreational, transport) but not the overall PA45. Another study from Metro Vancouver and Metro Portland reported that traffic hazards and safety may constitute obstacles to PA in high-density neighbourhoods relative to those of lower density46. Our evidence reemphasises that higher residential density alone is not the panacea towards a more active lifestyle. Relatedly, there has been growing attention on exploring the composite walkability index of multiple types of urban features, including residential density, which was found to be associated with moderate levels of PA47. How density can be configured with other attributes of built and natural environments to create multi-functional compact communities that can promote PA deserves more attention. As expected, both PM2.5 and neighbourhood deprivation drove the prediction towards lower PAEE. Prior evidence from this cohort has consistently reported positive associations between mean accelerations and number of PA facilities and walkability, while negative associations with PM2.5 and neighbourhood deprivation were found48. Higher whole body fat mass and waist-hip-ratio predicted lower PAEE due to low PA engagement among obese individuals, as previously reported14. This also corroborates previous findings from the cohort that body mass index and body fat percentage were inversely associated with survey-based PA49. The observed decrement in energy expenditure with weight loss can be attributed to altered skeletal muscle50. Among individual health factors, the positive predictive PAEE contribution of lower resting pulse rate may be a response to enduring exercises51, although a lower heart rate may also be associated with heart-rate-lowering drug use, thereby acting as a proxy of cardiovascular conditions such as myocardial infarction52. Our models were able to adjust for cardiovascular disease by including it as a predictor feature. Illness, disability or infirmity, and slow gait speed may be markers of frailty and constitute barriers to mobility due to greater activity-induced energy cost in older adults53.
Our population-level findings, whilst confirmatory of previous work, integrate these findings in a novel way and demonstrate the complex interplay across multi-domain predictors in explaining variation in individual energy expenditure. Our reported domain-specific contributions to PAEE explainability demonstrate the synergy and trade-offs across the five domains in influencing PAEE. This is important for holistic healthy city policy, informing the design of effective and efficient interventions to promote active living as well as protecting against sedentary lifestyles and obesogenic environments. The motives and barriers to engaging in an active lifestyle depend on socio-demographic factors, physical environment and individual health vulnerabilities. City planners and designers, on the other hand, can co-locate activity-promoting facilities and services to constitute multifunctional compact communities, thereby providing a quality environment which can encourage engagement in an active lifestyle. Apart from linear associational studies, a few prior studies have examined potential non-linearity in the associations between built environment and health19,54. From a policy perspective, such details enable development of prescriptive policy thresholds for urban interventions. The IPEN adult study of 14 cities in ten countries54, for example, used generalised additive mixed models to examine nuanced non-linear associations between probability of walking for transport and urban design variables with an objective of identifying inflection points or minimum thresholds for these variables beyond which they may promote walking, thereby informing/refining existing policies. The dependence plots in XML approach can consistently confirm such non-linearity by identifying and visualising how the relative contributions of each predictor feature to PAEE for every cohort participant, and how they combine to produce global (population-level) explanations. Besides providing overall population-level explanations of PAEE for the cohort, the XML approach can also decipher city-specific and individual-level explanations which have thus far not been possible using conventional approaches. These multi-level nuances in PAEE explanations are crucial in informing strategies and policies at population-, city- and individual-levels.
Our city-scale analysis identified contextual differences in the relative importance of key predictors explaining PAEE across cities. Among the contextual environmental features, in the London borough of Croydon, residing in close proximity to GPs and clinics, post offices, and community services may be a proxy for a walkable community, predicting higher PAEE. While in Bristol, higher density of educational institutions, neighbourhood deprivation and noise level all pushed towards lower PAEE prediction. In Liverpool, higher density of PA facilities predicted higher PAEE, while higher betweenness, traffic intensity on the nearest road and higher density of educational institutions predicted lower PAEE. These results can provide guidance for geographically and socially contextualised place-based planning interventions, investments and policies for active travel and living. The observed variations in the relative importance of features to PAEE predictions across cities (Fig. 4) reflect the complex interactions between population characteristics of individual residents, environmental exposures, socio-cultural norms and existing health-specific policies with the potential to influence active living in a city. The city-scale variations observed within the physical environment domain may also reflect that beyond accessibility, actual usage of urban environments, for example, public space in a city, depends upon factors such as quality and vitality, which form an individual’s environmental perception of a place. Local models present the relative importance of each predictor feature measured for each individual residing in a specific city, which constitute building blocks for city-specific averages. Though the models comprised a more rigorous set of predictor features than have been previously accounted for, we don’t rule out residual confounding associated with potential unmeasured variables and their interactions.
Our individualised explanations, which identify weighted sets of predictive features unique to individuals, provide further insights. The illustrated difference in PAEE prediction profiles between individuals with high, medium and low PAEE (Fig. 5) illustrates the value of targeted precision strategies for improving PA. Specifically, these multi-domain individualised explanations can help optimise behavioural and clinical interventions. For participant A, at the higher end of PAEE and MVPA, our model predicted a PAEE of 48.7 kJ/kg/d, 62% of which was attributable to MVPA. He achieved the better-than-mean prediction by a combination of regular strenuous sports, a healthy lifestyle such as low sedentary time and residing in an activity-friendly environment with low PM2.5. For participant B, also on the higher end of PAEE but with a lower MVPA proportion of 18.5%, our model interestingly predicted a higher than the upper tertile of the PAEE value at 46.1 kJ/kg/d; roughly equivalent to participant A. But importantly, this was achieved by a different mix of factors: a limited MVPA, no exercise activities; but less sedentary time, undertaking heavy DIY, and residing in a neighbourhood with a low level of betweenness and low PM2.5 exposure. The latter activities and physical environments had a compensatory effect, being able to compensate for the absence of exercise activities (in the form of high MVPA), with multiple low-intensity activities in daily routines. For participant C, however, compensatory factors are not present: a sedentary lifestyle (TV watching for 7 h per day), high waist-hip ratio and pulse rate, slow gait speed, residing in a highly deprived neighbourhood, and a non-exerciser all contributed to low predicted PAEE. These results illustrate the need for coordinated multi-domain interventions targeting individual (motivational), community (amenity enrichment), built environment (planning), and policy-led (health education) mechanisms to leverage more PA in cities. They also highlight the urgent necessity of customising interventions based on the needs of vulnerable groups55.
Of particular interest is the compensatory effect, that is, individuals not engaging in high-intensity PA can still achieve higher PAEE levels through engagement in low-intensity PA. Evidence shows that as much as 89% of body movements can be attributable to ambulation, which has been classified as purpose-oriented non-exercise activity thermogenesis56. Our findings show that while social and built environment features might be down the ladder in terms of their relative individual contributions to PAEE, they can have a multiple and synergistic compensatory role in enhancing overall PAEE through higher volume of activity in the low intensity spectrum among non-exercisers. Just as a mixed and varied diet is considered to provide health benefits, so a mixed and varied PA schedule could be a realistic means of maintaining PAEE levels, with attendant health benefits. This is a novel finding with implications for creating and designing healthy cities.
Strengths of our study include its large and diverse multi-city population cohort, the use of objective PA measurement, the use of XML to identify and explain contributions to the predictions, and the inclusion of a broad range of multi-domain predictors. Estimating PA in terms of PAEE and MVPA by accelerometry reduces the impact of reporting bias. The use of XML in identifying and explaining important determinants of PAEE is innovative. Tree-based models, including categorical boosting, can capture underlying non-linear relationships and feature interaction effects with minimal assumptions regarding data distribution57. The explanations reported in the present study are generally consistent with those previously reported within the cohort. The availability of a broad range of multi-domain predictors enabled a relatively comprehensive picture of the determinants of PAEE and attributable MVPA, and their potential synergies captured in our XML models, providing a stronger evidence base for designing interventions and policies. This evidence with respect to domain-specific contributions to PAEE explanations is of importance, given the increasing use of HIAs, health-extended EIAs and other check-box methods that assume a relationship between an urban feature, PA and health. For the first time, as far as we know, our local XML analysis demonstrates the possibility of trade-offs between categories of impact assessment factors, which is likely to lead to more thoughtful application of such instruments.
Among the limitations, firstly, a cross-sectional design means the case for causal inference may not be wholly compelling. For example, we cannot completely rule out the impact of reverse causation. Secondly, machine learning approaches have been criticised for their ability to achieve high prediction at the expense of explanatory power. We hence employed XML, which goes beyond prediction, profiling the relative importance of features contributing to the predicted PAEE and MVPA. We limited the selection of features to those closely related to PA in order to minimise noise associated with high-dimensional data. Thirdly, overfitting remains a challenge in machine learning models. The selected Catboost model belongs to the family of gradient-boosting algorithms that are robust to multicollinearity between features through boosting29. Our study employed a large country-wide dataset and incorporated five-fold cross-validation and hyperparameter optimisation for optimal model tuning to minimise overfitting, though this cannot be completely ruled out. Fourth, it must be acknowledged that the accelerometry data in the UK Biobank were collected after the baseline as part of post-baseline data enhancements. The mean time lag between baseline assessments of self-reported predictor features and accelerometer-derived PAEE assessment was 5.6 years. The environmental exposure metrics were measured towards the end of baseline (built environment around 2010, air pollution in 2010, noise pollution in 2010 and Townsend’s index in 2011). We were able to ameliorate this temporal mismatch to the degree possible by measuring age and features related to health status up to the time of accelerometry assessment. UK Biobank participants had relatively stable residential histories, and the urbanisation phenomenon is mostly stabilised in the UK, yet it is likely that some of the self-reported predictors, such as those related to employment status, commute patterns and self-reported behaviours may have changed over this time lag. Fifth, it must be acknowledged that our models were developed based on the available large predominantly white UK cohort; as such, it is necessary to ascertain the external validity of our findings to diverse contexts and racial groups. The accuracy and sensitivity of PAEE may likely vary by the type of accelerometer device used (sensor type, wrist-worn, arm-worn etc58). As such, our models represent first work in capturing local optimality (UK-context), while universal optimality remains desirable. Resources must be invested to collect and share harmonised accelerometry datasets internationally58. Future studies should leverage multi-cohort datasets with harmonised variables for PAEE, lifestyle, environment and socio-demographic data to examine generalisability to other populations from diverse geographical settings, thereby strengthening the external validity of the developed machine learning approach. Sixth, our complete case analysis may be subject to bias attributed to missingness in predictor features, potentially reducing statistical power. Supplementary analysis with an imputed dataset for 96,636 participants produced consistent results with models of equivalent optimal RMSE values. Lastly, the UK Biobank is not a representative sample. Compared with the national survey data59, UK Biobank had a higher proportion of white ethnicity (94.6% vs. 91.3%) and participants remained relatively healthy, with lower mean body mass index (kg/m2) as compared with the Health Survey for England59 (27.9 vs. 28.5 in men and 27.3 vs. 28.0 in women aged 55-64) and lower prevalence of self-reported cardiovascular disease (11.5% vs. 18.5% in men and 5% vs. 15.2% in women aged 55-64) and diabetes (7.8% vs. 10.5% in men and 6.3% vs. 8.0% in women aged 55-64). Despite being non-representative, its large scale and measurements across a wide range of exposure distributions mean our results are broadly generalisable, even if the prevalence profiles are not.
In summary, applying an explainable machine learning models to national cohort data, we predicted and explained PA Energy Expenditure at population, city, and individual levels for the first time. A moderate correlation between accelerometer-measured and predicted PAEE was achieved. The use of a high-dimensional but explainable data plane enabled us to characterise the relative importance of the five key domains (lifestyle, socio-demographics, physical environment, anthropometrics and health) and measure contributions of their component predictor features to PAEE at the population and city levels. We found that lifestyle features contributed 35.7% to predicted PAEE, socio-demographics 28%, physical environment 13.5%, anthropometry 13.8% and individual health 9%. For the proportion of PAEE from moderate-to-vigorous PA, the respective contributions to prediction were 28.3%, 27%, 16.9%, 14% and 13.8%. These results, highlighting synergistic trade-offs between important predictors across five domains, are novel and have important implications for ongoing research in lifestyle medicine53, place-based planning for healthy cities11 and population health policy12. Our individualised models found that similar levels of PAEE can be achieved via different factor mixes, implying that healthy lifestyle and physical environment may encourage higher volume of low-intensity (light) PA among non-exercisers, thereby compensating for high-intensity PA prevalent among exercisers. This is under-emphasised or ignored in studies and practice and has not been examined systematically at such a large scale before. We suggest leveraging a mix of context-specific multi-level strategies, including individual- (motivational), community- (amenity enrichment), built environment- (planning and design), and policy- (health education) levels for promoting an active lifestyle.